@wordpress/components 23.4.0 → 23.6.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 (978) hide show
  1. package/CHANGELOG.md +54 -6
  2. package/build/animate/index.js +3 -1
  3. package/build/animate/index.js.map +1 -1
  4. package/build/animation/index.js.map +1 -1
  5. package/build/autocomplete/autocompleter-ui.js +46 -22
  6. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  7. package/build/autocomplete/get-default-use-items.js.map +1 -1
  8. package/build/autocomplete/index.js +51 -119
  9. package/build/autocomplete/index.js.map +1 -1
  10. package/build/autocomplete/types.js +6 -0
  11. package/build/autocomplete/types.js.map +1 -0
  12. package/build/circular-option-picker/index.js +63 -14
  13. package/build/circular-option-picker/index.js.map +1 -1
  14. package/build/circular-option-picker/types.js +6 -0
  15. package/build/circular-option-picker/types.js.map +1 -0
  16. package/build/custom-gradient-picker/gradient-bar/control-points.js +2 -0
  17. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  18. package/build/custom-gradient-picker/gradient-bar/index.js +2 -0
  19. package/build/custom-gradient-picker/gradient-bar/index.js.map +1 -1
  20. package/build/custom-gradient-picker/gradient-bar/utils.js +2 -0
  21. package/build/custom-gradient-picker/gradient-bar/utils.js.map +1 -1
  22. package/build/custom-gradient-picker/index.js +2 -0
  23. package/build/custom-gradient-picker/index.js.map +1 -1
  24. package/build/custom-gradient-picker/serializer.js +1 -0
  25. package/build/custom-gradient-picker/serializer.js.map +1 -1
  26. package/build/custom-gradient-picker/utils.js +2 -0
  27. package/build/custom-gradient-picker/utils.js.map +1 -1
  28. package/build/dimension-control/index.js +31 -5
  29. package/build/dimension-control/index.js.map +1 -1
  30. package/build/dimension-control/sizes.js +2 -4
  31. package/build/dimension-control/sizes.js.map +1 -1
  32. package/build/dimension-control/types.js +6 -0
  33. package/build/dimension-control/types.js.map +1 -0
  34. package/build/dropdown-menu/index.js +6 -2
  35. package/build/dropdown-menu/index.js.map +1 -1
  36. package/build/flex/flex/hook.js +3 -3
  37. package/build/flex/flex/hook.js.map +1 -1
  38. package/build/font-size-picker/index.js +2 -1
  39. package/build/font-size-picker/index.js.map +1 -1
  40. package/build/form-token-field/index.js +1 -1
  41. package/build/form-token-field/index.js.map +1 -1
  42. package/build/gradient-picker/index.js +2 -0
  43. package/build/gradient-picker/index.js.map +1 -1
  44. package/build/guide/icons.js.map +1 -1
  45. package/build/guide/index.js +46 -8
  46. package/build/guide/index.js.map +1 -1
  47. package/build/guide/page-control.js.map +1 -1
  48. package/build/guide/page.js.map +1 -1
  49. package/build/guide/types.js +6 -0
  50. package/build/guide/types.js.map +1 -0
  51. package/build/h-stack/utils.js +5 -5
  52. package/build/h-stack/utils.js.map +1 -1
  53. package/build/higher-order/navigate-regions/index.js +33 -3
  54. package/build/higher-order/navigate-regions/index.js.map +1 -1
  55. package/build/higher-order/with-constrained-tabbing/index.js +9 -0
  56. package/build/higher-order/with-constrained-tabbing/index.js.map +1 -1
  57. package/build/higher-order/with-fallback-styles/index.js +2 -2
  58. package/build/higher-order/with-fallback-styles/index.js.map +1 -1
  59. package/build/higher-order/with-filters/index.js +31 -7
  60. package/build/higher-order/with-filters/index.js.map +1 -1
  61. package/build/higher-order/with-focus-return/index.js +10 -10
  62. package/build/higher-order/with-focus-return/index.js.map +1 -1
  63. package/build/higher-order/with-notices/index.js +28 -25
  64. package/build/higher-order/with-notices/index.js.map +1 -1
  65. package/build/higher-order/with-notices/types.js +6 -0
  66. package/build/higher-order/with-notices/types.js.map +1 -0
  67. package/build/higher-order/with-spoken-messages/index.js.map +1 -1
  68. package/build/icon/index.js +1 -8
  69. package/build/icon/index.js.map +1 -1
  70. package/build/index.native.js +18 -9
  71. package/build/index.native.js.map +1 -1
  72. package/build/mobile/bottom-sheet/cell.native.js +1 -1
  73. package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
  74. package/build/mobile/bottom-sheet-text-control/index.native.js +4 -3
  75. package/build/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
  76. package/build/mobile/global-styles-context/utils.native.js +2 -1
  77. package/build/mobile/global-styles-context/utils.native.js.map +1 -1
  78. package/build/navigation/back-button/index.js +6 -5
  79. package/build/navigation/back-button/index.js.map +1 -1
  80. package/build/navigation/constants.js.map +1 -1
  81. package/build/navigation/context.js +7 -4
  82. package/build/navigation/context.js.map +1 -1
  83. package/build/navigation/group/context.js.map +1 -1
  84. package/build/navigation/group/index.js +5 -1
  85. package/build/navigation/group/index.js.map +1 -1
  86. package/build/navigation/index.js +49 -3
  87. package/build/navigation/index.js.map +1 -1
  88. package/build/navigation/item/base-content.js +0 -1
  89. package/build/navigation/item/base-content.js.map +1 -1
  90. package/build/navigation/item/base.js.map +1 -1
  91. package/build/navigation/item/index.js +5 -1
  92. package/build/navigation/item/index.js.map +1 -1
  93. package/build/navigation/item/use-navigation-tree-item.js +1 -1
  94. package/build/navigation/item/use-navigation-tree-item.js.map +1 -1
  95. package/build/navigation/menu/context.js.map +1 -1
  96. package/build/navigation/menu/index.js +5 -1
  97. package/build/navigation/menu/index.js.map +1 -1
  98. package/build/navigation/menu/menu-title-search.js +8 -6
  99. package/build/navigation/menu/menu-title-search.js.map +1 -1
  100. package/build/navigation/menu/menu-title.js +4 -2
  101. package/build/navigation/menu/menu-title.js.map +1 -1
  102. package/build/navigation/menu/search-no-results-found.js.map +1 -1
  103. package/build/navigation/menu/use-navigation-tree-menu.js.map +1 -1
  104. package/build/navigation/styles/navigation-styles.js +36 -36
  105. package/build/navigation/styles/navigation-styles.js.map +1 -1
  106. package/build/navigation/types.js +6 -0
  107. package/build/navigation/types.js.map +1 -0
  108. package/build/navigation/use-create-navigation-tree.js +7 -0
  109. package/build/navigation/use-create-navigation-tree.js.map +1 -1
  110. package/build/navigation/use-navigation-tree-nodes.js +3 -5
  111. package/build/navigation/use-navigation-tree-nodes.js.map +1 -1
  112. package/build/navigation/utils.js.map +1 -1
  113. package/build/navigator/navigator-screen/component.js +5 -3
  114. package/build/navigator/navigator-screen/component.js.map +1 -1
  115. package/build/number-control/index.js +1 -3
  116. package/build/number-control/index.js.map +1 -1
  117. package/build/palette-edit/index.js +67 -27
  118. package/build/palette-edit/index.js.map +1 -1
  119. package/build/palette-edit/types.js +6 -0
  120. package/build/palette-edit/types.js.map +1 -0
  121. package/build/panel/body.js +15 -17
  122. package/build/panel/body.js.map +1 -1
  123. package/build/placeholder/index.js.map +1 -1
  124. package/build/query-controls/author-select.js +0 -4
  125. package/build/query-controls/author-select.js.map +1 -1
  126. package/build/query-controls/category-select.js +0 -4
  127. package/build/query-controls/category-select.js.map +1 -1
  128. package/build/query-controls/terms.js +30 -15
  129. package/build/query-controls/terms.js.map +1 -1
  130. package/build/range-control/index.js +1 -0
  131. package/build/range-control/index.js.map +1 -1
  132. package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +4 -4
  133. package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js.map +1 -1
  134. package/build/responsive-wrapper/index.js +12 -13
  135. package/build/responsive-wrapper/index.js.map +1 -1
  136. package/build/select-control/index.js +19 -16
  137. package/build/select-control/index.js.map +1 -1
  138. package/build/toolbar/toolbar-button/index.js +32 -10
  139. package/build/toolbar/toolbar-button/index.js.map +1 -1
  140. package/build/toolbar/toolbar-button/toolbar-button-container.js +12 -4
  141. package/build/toolbar/toolbar-button/toolbar-button-container.js.map +1 -1
  142. package/build/toolbar/toolbar-button/types.js +6 -0
  143. package/build/toolbar/toolbar-button/types.js.map +1 -0
  144. package/build/toolbar/toolbar-context/index.js +4 -2
  145. package/build/toolbar/toolbar-context/index.js.map +1 -1
  146. package/build/tools-panel/context.js +2 -0
  147. package/build/tools-panel/context.js.map +1 -1
  148. package/build/tools-panel/tools-panel/hook.js +18 -12
  149. package/build/tools-panel/tools-panel/hook.js.map +1 -1
  150. package/build/tools-panel/tools-panel-item/hook.js +14 -2
  151. package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
  152. package/build/tooltip/index.js +18 -6
  153. package/build/tooltip/index.js.map +1 -1
  154. package/build/tree-select/index.js.map +1 -1
  155. package/build/ui/context/context-system-provider.js +8 -4
  156. package/build/ui/context/context-system-provider.js.map +1 -1
  157. package/build/ui/context/get-styled-class-name-from-key.js +2 -2
  158. package/build/ui/context/get-styled-class-name-from-key.js.map +1 -1
  159. package/build/utils/font.js +3 -7
  160. package/build/utils/font.js.map +1 -1
  161. package/build/v-stack/hook.js +2 -0
  162. package/build/v-stack/hook.js.map +1 -1
  163. package/build-module/animate/index.js +3 -1
  164. package/build-module/animate/index.js.map +1 -1
  165. package/build-module/animation/index.js.map +1 -1
  166. package/build-module/autocomplete/autocompleter-ui.js +45 -24
  167. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  168. package/build-module/autocomplete/get-default-use-items.js.map +1 -1
  169. package/build-module/autocomplete/index.js +54 -122
  170. package/build-module/autocomplete/index.js.map +1 -1
  171. package/build-module/autocomplete/types.js +2 -0
  172. package/build-module/autocomplete/types.js.map +1 -0
  173. package/build-module/circular-option-picker/index.js +59 -16
  174. package/build-module/circular-option-picker/index.js.map +1 -1
  175. package/build-module/circular-option-picker/types.js +2 -0
  176. package/build-module/circular-option-picker/types.js.map +1 -0
  177. package/build-module/custom-gradient-picker/gradient-bar/control-points.js +1 -0
  178. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  179. package/build-module/custom-gradient-picker/gradient-bar/index.js +1 -0
  180. package/build-module/custom-gradient-picker/gradient-bar/index.js.map +1 -1
  181. package/build-module/custom-gradient-picker/gradient-bar/utils.js +2 -0
  182. package/build-module/custom-gradient-picker/gradient-bar/utils.js.map +1 -1
  183. package/build-module/custom-gradient-picker/index.js +1 -0
  184. package/build-module/custom-gradient-picker/index.js.map +1 -1
  185. package/build-module/custom-gradient-picker/serializer.js +1 -0
  186. package/build-module/custom-gradient-picker/serializer.js.map +1 -1
  187. package/build-module/custom-gradient-picker/utils.js +2 -0
  188. package/build-module/custom-gradient-picker/utils.js.map +1 -1
  189. package/build-module/dimension-control/index.js +28 -3
  190. package/build-module/dimension-control/index.js.map +1 -1
  191. package/build-module/dimension-control/sizes.js +6 -5
  192. package/build-module/dimension-control/sizes.js.map +1 -1
  193. package/build-module/dimension-control/types.js +2 -0
  194. package/build-module/dimension-control/types.js.map +1 -0
  195. package/build-module/dropdown-menu/index.js +6 -2
  196. package/build-module/dropdown-menu/index.js.map +1 -1
  197. package/build-module/flex/flex/hook.js +3 -3
  198. package/build-module/flex/flex/hook.js.map +1 -1
  199. package/build-module/font-size-picker/index.js +2 -1
  200. package/build-module/font-size-picker/index.js.map +1 -1
  201. package/build-module/form-token-field/index.js +1 -1
  202. package/build-module/form-token-field/index.js.map +1 -1
  203. package/build-module/gradient-picker/index.js +1 -0
  204. package/build-module/gradient-picker/index.js.map +1 -1
  205. package/build-module/guide/icons.js.map +1 -1
  206. package/build-module/guide/index.js +45 -8
  207. package/build-module/guide/index.js.map +1 -1
  208. package/build-module/guide/page-control.js.map +1 -1
  209. package/build-module/guide/page.js +4 -0
  210. package/build-module/guide/page.js.map +1 -1
  211. package/build-module/guide/types.js +2 -0
  212. package/build-module/guide/types.js.map +1 -0
  213. package/build-module/h-stack/utils.js +5 -5
  214. package/build-module/h-stack/utils.js.map +1 -1
  215. package/build-module/higher-order/navigate-regions/index.js +33 -3
  216. package/build-module/higher-order/navigate-regions/index.js.map +1 -1
  217. package/build-module/higher-order/with-constrained-tabbing/index.js +9 -0
  218. package/build-module/higher-order/with-constrained-tabbing/index.js.map +1 -1
  219. package/build-module/higher-order/with-fallback-styles/index.js +2 -2
  220. package/build-module/higher-order/with-fallback-styles/index.js.map +1 -1
  221. package/build-module/higher-order/with-filters/index.js +31 -7
  222. package/build-module/higher-order/with-filters/index.js.map +1 -1
  223. package/build-module/higher-order/with-focus-return/index.js +10 -10
  224. package/build-module/higher-order/with-focus-return/index.js.map +1 -1
  225. package/build-module/higher-order/with-notices/index.js +29 -26
  226. package/build-module/higher-order/with-notices/index.js.map +1 -1
  227. package/build-module/higher-order/with-notices/types.js +2 -0
  228. package/build-module/higher-order/with-notices/types.js.map +1 -0
  229. package/build-module/higher-order/with-spoken-messages/index.js.map +1 -1
  230. package/build-module/icon/index.js +2 -9
  231. package/build-module/icon/index.js.map +1 -1
  232. package/build-module/index.native.js +1 -0
  233. package/build-module/index.native.js.map +1 -1
  234. package/build-module/mobile/bottom-sheet/cell.native.js +1 -1
  235. package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
  236. package/build-module/mobile/bottom-sheet-text-control/index.native.js +4 -3
  237. package/build-module/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
  238. package/build-module/mobile/global-styles-context/utils.native.js +2 -1
  239. package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
  240. package/build-module/navigation/back-button/index.js +4 -3
  241. package/build-module/navigation/back-button/index.js.map +1 -1
  242. package/build-module/navigation/constants.js.map +1 -1
  243. package/build-module/navigation/context.js +7 -4
  244. package/build-module/navigation/context.js.map +1 -1
  245. package/build-module/navigation/group/context.js +4 -0
  246. package/build-module/navigation/group/context.js.map +1 -1
  247. package/build-module/navigation/group/index.js +2 -1
  248. package/build-module/navigation/group/index.js.map +1 -1
  249. package/build-module/navigation/index.js +46 -3
  250. package/build-module/navigation/index.js.map +1 -1
  251. package/build-module/navigation/item/base-content.js +0 -1
  252. package/build-module/navigation/item/base-content.js.map +1 -1
  253. package/build-module/navigation/item/base.js.map +1 -1
  254. package/build-module/navigation/item/index.js +2 -1
  255. package/build-module/navigation/item/index.js.map +1 -1
  256. package/build-module/navigation/item/use-navigation-tree-item.js +1 -1
  257. package/build-module/navigation/item/use-navigation-tree-item.js.map +1 -1
  258. package/build-module/navigation/menu/context.js +4 -0
  259. package/build-module/navigation/menu/context.js.map +1 -1
  260. package/build-module/navigation/menu/index.js +2 -1
  261. package/build-module/navigation/menu/index.js.map +1 -1
  262. package/build-module/navigation/menu/menu-title-search.js +8 -6
  263. package/build-module/navigation/menu/menu-title-search.js.map +1 -1
  264. package/build-module/navigation/menu/menu-title.js +4 -2
  265. package/build-module/navigation/menu/menu-title.js.map +1 -1
  266. package/build-module/navigation/menu/search-no-results-found.js.map +1 -1
  267. package/build-module/navigation/menu/use-navigation-tree-menu.js.map +1 -1
  268. package/build-module/navigation/styles/navigation-styles.js +36 -36
  269. package/build-module/navigation/styles/navigation-styles.js.map +1 -1
  270. package/build-module/navigation/types.js +2 -0
  271. package/build-module/navigation/types.js.map +1 -0
  272. package/build-module/navigation/use-create-navigation-tree.js +7 -0
  273. package/build-module/navigation/use-create-navigation-tree.js.map +1 -1
  274. package/build-module/navigation/use-navigation-tree-nodes.js +2 -2
  275. package/build-module/navigation/use-navigation-tree-nodes.js.map +1 -1
  276. package/build-module/navigation/utils.js.map +1 -1
  277. package/build-module/navigator/navigator-screen/component.js +5 -3
  278. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  279. package/build-module/number-control/index.js +1 -3
  280. package/build-module/number-control/index.js.map +1 -1
  281. package/build-module/palette-edit/index.js +65 -27
  282. package/build-module/palette-edit/index.js.map +1 -1
  283. package/build-module/palette-edit/types.js +2 -0
  284. package/build-module/palette-edit/types.js.map +1 -0
  285. package/build-module/panel/body.js +12 -12
  286. package/build-module/panel/body.js.map +1 -1
  287. package/build-module/placeholder/index.js.map +1 -1
  288. package/build-module/query-controls/author-select.js +0 -4
  289. package/build-module/query-controls/author-select.js.map +1 -1
  290. package/build-module/query-controls/category-select.js +1 -5
  291. package/build-module/query-controls/category-select.js.map +1 -1
  292. package/build-module/query-controls/terms.js +29 -16
  293. package/build-module/query-controls/terms.js.map +1 -1
  294. package/build-module/range-control/index.js +1 -0
  295. package/build-module/range-control/index.js.map +1 -1
  296. package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +5 -5
  297. package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js.map +1 -1
  298. package/build-module/responsive-wrapper/index.js +12 -12
  299. package/build-module/responsive-wrapper/index.js.map +1 -1
  300. package/build-module/select-control/index.js +20 -17
  301. package/build-module/select-control/index.js.map +1 -1
  302. package/build-module/toolbar/toolbar-button/index.js +32 -9
  303. package/build-module/toolbar/toolbar-button/index.js.map +1 -1
  304. package/build-module/toolbar/toolbar-button/toolbar-button-container.js +12 -4
  305. package/build-module/toolbar/toolbar-button/toolbar-button-container.js.map +1 -1
  306. package/build-module/toolbar/toolbar-button/types.js +2 -0
  307. package/build-module/toolbar/toolbar-button/types.js.map +1 -0
  308. package/build-module/toolbar/toolbar-context/index.js +4 -2
  309. package/build-module/toolbar/toolbar-context/index.js.map +1 -1
  310. package/build-module/tools-panel/context.js +2 -0
  311. package/build-module/tools-panel/context.js.map +1 -1
  312. package/build-module/tools-panel/tools-panel/hook.js +18 -12
  313. package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
  314. package/build-module/tools-panel/tools-panel-item/hook.js +14 -2
  315. package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
  316. package/build-module/tooltip/index.js +16 -6
  317. package/build-module/tooltip/index.js.map +1 -1
  318. package/build-module/tree-select/index.js.map +1 -1
  319. package/build-module/ui/context/context-system-provider.js +7 -4
  320. package/build-module/ui/context/context-system-provider.js.map +1 -1
  321. package/build-module/ui/context/get-styled-class-name-from-key.js +1 -1
  322. package/build-module/ui/context/get-styled-class-name-from-key.js.map +1 -1
  323. package/build-module/utils/font.js +3 -6
  324. package/build-module/utils/font.js.map +1 -1
  325. package/build-module/v-stack/hook.js +2 -0
  326. package/build-module/v-stack/hook.js.map +1 -1
  327. package/build-style/style-rtl.css +15 -11
  328. package/build-style/style.css +15 -11
  329. package/build-types/alignment-matrix-control/types.d.ts +4 -4
  330. package/build-types/alignment-matrix-control/types.d.ts.map +1 -1
  331. package/build-types/angle-picker-control/types.d.ts +2 -2
  332. package/build-types/angle-picker-control/types.d.ts.map +1 -1
  333. package/build-types/animate/index.d.ts +2 -2
  334. package/build-types/animate/index.d.ts.map +1 -1
  335. package/build-types/animation/index.d.ts +8 -1
  336. package/build-types/animation/index.d.ts.map +1 -1
  337. package/build-types/autocomplete/autocompleter-ui.d.ts +4 -0
  338. package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -0
  339. package/build-types/autocomplete/get-default-use-items.d.ts +3 -0
  340. package/build-types/autocomplete/get-default-use-items.d.ts.map +1 -0
  341. package/build-types/autocomplete/index.d.ts +23 -0
  342. package/build-types/autocomplete/index.d.ts.map +1 -0
  343. package/build-types/autocomplete/test/index.d.ts +2 -0
  344. package/build-types/autocomplete/test/index.d.ts.map +1 -0
  345. package/build-types/autocomplete/types.d.ts +201 -0
  346. package/build-types/autocomplete/types.d.ts.map +1 -0
  347. package/build-types/base-control/types.d.ts +2 -2
  348. package/build-types/base-control/types.d.ts.map +1 -1
  349. package/build-types/border-box-control/border-box-control/hook.d.ts +1 -1
  350. package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
  351. package/build-types/border-box-control/styles.d.ts +3 -3
  352. package/build-types/border-box-control/styles.d.ts.map +1 -1
  353. package/build-types/border-box-control/types.d.ts +8 -8
  354. package/build-types/border-box-control/types.d.ts.map +1 -1
  355. package/build-types/border-box-control/utils.d.ts +5 -5
  356. package/build-types/border-box-control/utils.d.ts.map +1 -1
  357. package/build-types/border-control/border-control/hook.d.ts +3 -3
  358. package/build-types/border-control/border-control/hook.d.ts.map +1 -1
  359. package/build-types/border-control/border-control-dropdown/hook.d.ts +2 -2
  360. package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
  361. package/build-types/border-control/styles.d.ts +4 -4
  362. package/build-types/border-control/styles.d.ts.map +1 -1
  363. package/build-types/border-control/types.d.ts +6 -6
  364. package/build-types/border-control/types.d.ts.map +1 -1
  365. package/build-types/box-control/types.d.ts +6 -6
  366. package/build-types/box-control/types.d.ts.map +1 -1
  367. package/build-types/button/deprecated.d.ts +6 -6
  368. package/build-types/button/types.d.ts +10 -10
  369. package/build-types/button/types.d.ts.map +1 -1
  370. package/build-types/button-group/types.d.ts +1 -1
  371. package/build-types/button-group/types.d.ts.map +1 -1
  372. package/build-types/card/card/hook.d.ts +1 -1
  373. package/build-types/card/card/hook.d.ts.map +1 -1
  374. package/build-types/card/types.d.ts +10 -10
  375. package/build-types/card/types.d.ts.map +1 -1
  376. package/build-types/checkbox-control/types.d.ts +1 -1
  377. package/build-types/checkbox-control/types.d.ts.map +1 -1
  378. package/build-types/circular-option-picker/index.d.ts +56 -7
  379. package/build-types/circular-option-picker/index.d.ts.map +1 -1
  380. package/build-types/circular-option-picker/stories/index.d.ts +14 -0
  381. package/build-types/circular-option-picker/stories/index.d.ts.map +1 -0
  382. package/build-types/circular-option-picker/types.d.ts +49 -0
  383. package/build-types/circular-option-picker/types.d.ts.map +1 -0
  384. package/build-types/color-indicator/types.d.ts +1 -1
  385. package/build-types/color-indicator/types.d.ts.map +1 -1
  386. package/build-types/color-list-picker/types.d.ts +2 -2
  387. package/build-types/color-list-picker/types.d.ts.map +1 -1
  388. package/build-types/color-palette/types.d.ts +7 -7
  389. package/build-types/color-palette/types.d.ts.map +1 -1
  390. package/build-types/color-palette/utils.d.ts +1 -1
  391. package/build-types/color-palette/utils.d.ts.map +1 -1
  392. package/build-types/color-picker/legacy-adapter.d.ts +1 -1
  393. package/build-types/color-picker/legacy-adapter.d.ts.map +1 -1
  394. package/build-types/color-picker/styles.d.ts +3 -3
  395. package/build-types/color-picker/types.d.ts +2 -2
  396. package/build-types/color-picker/types.d.ts.map +1 -1
  397. package/build-types/color-picker/use-deprecated-props.d.ts +2 -2
  398. package/build-types/color-picker/use-deprecated-props.d.ts.map +1 -1
  399. package/build-types/combobox-control/types.d.ts +2 -2
  400. package/build-types/combobox-control/types.d.ts.map +1 -1
  401. package/build-types/confirm-dialog/component.d.ts +4 -4
  402. package/build-types/confirm-dialog/types.d.ts +5 -5
  403. package/build-types/confirm-dialog/types.d.ts.map +1 -1
  404. package/build-types/custom-gradient-picker/constants.d.ts +25 -0
  405. package/build-types/custom-gradient-picker/constants.d.ts.map +1 -0
  406. package/build-types/custom-gradient-picker/gradient-bar/constants.d.ts +8 -0
  407. package/build-types/custom-gradient-picker/gradient-bar/constants.d.ts.map +1 -0
  408. package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts +25 -0
  409. package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts.map +1 -0
  410. package/build-types/custom-gradient-picker/gradient-bar/index.d.ts +10 -0
  411. package/build-types/custom-gradient-picker/gradient-bar/index.d.ts.map +1 -0
  412. package/build-types/custom-gradient-picker/gradient-bar/utils.d.ts +138 -0
  413. package/build-types/custom-gradient-picker/gradient-bar/utils.d.ts.map +1 -0
  414. package/build-types/custom-gradient-picker/index.d.ts +7 -0
  415. package/build-types/custom-gradient-picker/index.d.ts.map +1 -0
  416. package/build-types/custom-gradient-picker/serializer.d.ts +17 -0
  417. package/build-types/custom-gradient-picker/serializer.d.ts.map +1 -0
  418. package/build-types/custom-gradient-picker/styles/custom-gradient-picker-styles.d.ts +11 -0
  419. package/build-types/custom-gradient-picker/styles/custom-gradient-picker-styles.d.ts.map +1 -0
  420. package/build-types/custom-gradient-picker/utils.d.ts +5 -0
  421. package/build-types/custom-gradient-picker/utils.d.ts.map +1 -0
  422. package/build-types/custom-select-control/styles.d.ts +1 -1
  423. package/build-types/custom-select-control/styles.d.ts.map +1 -1
  424. package/build-types/dashicon/types.d.ts +2 -2
  425. package/build-types/dashicon/types.d.ts.map +1 -1
  426. package/build-types/date-time/date-time/styles.d.ts +1 -4
  427. package/build-types/date-time/date-time/styles.d.ts.map +1 -1
  428. package/build-types/date-time/time/styles.d.ts +1 -1
  429. package/build-types/date-time/types.d.ts +4 -4
  430. package/build-types/date-time/types.d.ts.map +1 -1
  431. package/build-types/dimension-control/index.d.ts +28 -0
  432. package/build-types/dimension-control/index.d.ts.map +1 -0
  433. package/build-types/dimension-control/sizes.d.ts +26 -0
  434. package/build-types/dimension-control/sizes.d.ts.map +1 -0
  435. package/build-types/dimension-control/stories/index.d.ts +12 -0
  436. package/build-types/dimension-control/stories/index.d.ts.map +1 -0
  437. package/build-types/dimension-control/types.d.ts +47 -0
  438. package/build-types/dimension-control/types.d.ts.map +1 -0
  439. package/build-types/divider/types.d.ts +1 -1
  440. package/build-types/divider/types.d.ts.map +1 -1
  441. package/build-types/draggable/types.d.ts +1 -1
  442. package/build-types/draggable/types.d.ts.map +1 -1
  443. package/build-types/drop-zone/types.d.ts +2 -2
  444. package/build-types/drop-zone/types.d.ts.map +1 -1
  445. package/build-types/dropdown/types.d.ts +3 -3
  446. package/build-types/dropdown/types.d.ts.map +1 -1
  447. package/build-types/dropdown-menu/index.d.ts.map +1 -1
  448. package/build-types/elevation/types.d.ts +1 -1
  449. package/build-types/elevation/types.d.ts.map +1 -1
  450. package/build-types/external-link/styles/external-link-styles.d.ts +1 -1
  451. package/build-types/external-link/types.d.ts +1 -1
  452. package/build-types/external-link/types.d.ts.map +1 -1
  453. package/build-types/flex/types.d.ts +4 -4
  454. package/build-types/flex/types.d.ts.map +1 -1
  455. package/build-types/focal-point-picker/types.d.ts +7 -7
  456. package/build-types/focal-point-picker/types.d.ts.map +1 -1
  457. package/build-types/font-size-picker/index.d.ts.map +1 -1
  458. package/build-types/font-size-picker/stories/index.d.ts.map +1 -1
  459. package/build-types/font-size-picker/types.d.ts +9 -5
  460. package/build-types/font-size-picker/types.d.ts.map +1 -1
  461. package/build-types/form-file-upload/types.d.ts +1 -1
  462. package/build-types/form-file-upload/types.d.ts.map +1 -1
  463. package/build-types/form-toggle/types.d.ts +1 -1
  464. package/build-types/form-toggle/types.d.ts.map +1 -1
  465. package/build-types/form-token-field/index.d.ts.map +1 -1
  466. package/build-types/form-token-field/stories/index.d.ts +6 -0
  467. package/build-types/form-token-field/stories/index.d.ts.map +1 -1
  468. package/build-types/form-token-field/styles.d.ts +1 -1
  469. package/build-types/form-token-field/styles.d.ts.map +1 -1
  470. package/build-types/form-token-field/types.d.ts +1 -1
  471. package/build-types/form-token-field/types.d.ts.map +1 -1
  472. package/build-types/gradient-picker/index.d.ts +12 -0
  473. package/build-types/gradient-picker/index.d.ts.map +1 -0
  474. package/build-types/grid/types.d.ts +2 -2
  475. package/build-types/grid/types.d.ts.map +1 -1
  476. package/build-types/guide/icons.d.ts +5 -0
  477. package/build-types/guide/icons.d.ts.map +1 -0
  478. package/build-types/guide/index.d.ts +37 -0
  479. package/build-types/guide/index.d.ts.map +1 -0
  480. package/build-types/guide/page-control.d.ts +4 -0
  481. package/build-types/guide/page-control.d.ts.map +1 -0
  482. package/build-types/guide/page.d.ts +7 -0
  483. package/build-types/guide/page.d.ts.map +1 -0
  484. package/build-types/guide/stories/index.d.ts +9 -0
  485. package/build-types/guide/stories/index.d.ts.map +1 -0
  486. package/build-types/guide/test/index.d.ts +2 -0
  487. package/build-types/guide/test/index.d.ts.map +1 -0
  488. package/build-types/guide/types.d.ts +65 -0
  489. package/build-types/guide/types.d.ts.map +1 -0
  490. package/build-types/h-stack/stories/e2e/index.d.ts +9 -0
  491. package/build-types/h-stack/stories/e2e/index.d.ts.map +1 -0
  492. package/build-types/h-stack/types.d.ts +6 -6
  493. package/build-types/h-stack/types.d.ts.map +1 -1
  494. package/build-types/heading/hook.d.ts +1 -1
  495. package/build-types/heading/types.d.ts +2 -2
  496. package/build-types/heading/types.d.ts.map +1 -1
  497. package/build-types/higher-order/navigate-regions/index.d.ts +46 -0
  498. package/build-types/higher-order/navigate-regions/index.d.ts.map +1 -0
  499. package/build-types/higher-order/with-constrained-tabbing/index.d.ts +10 -1
  500. package/build-types/higher-order/with-constrained-tabbing/index.d.ts.map +1 -1
  501. package/build-types/higher-order/with-fallback-styles/index.d.ts +44 -0
  502. package/build-types/higher-order/with-fallback-styles/index.d.ts.map +1 -0
  503. package/build-types/higher-order/with-filters/index.d.ts +89 -0
  504. package/build-types/higher-order/with-filters/index.d.ts.map +1 -0
  505. package/build-types/higher-order/with-filters/test/index.d.ts +2 -0
  506. package/build-types/higher-order/with-filters/test/index.d.ts.map +1 -0
  507. package/build-types/higher-order/with-focus-outside/index.d.ts +1 -1
  508. package/build-types/higher-order/with-focus-return/index.d.ts +20 -0
  509. package/build-types/higher-order/with-focus-return/index.d.ts.map +1 -0
  510. package/build-types/higher-order/with-focus-return/test/index.d.ts +2 -0
  511. package/build-types/higher-order/with-focus-return/test/index.d.ts.map +1 -0
  512. package/build-types/higher-order/with-notices/index.d.ts +37 -0
  513. package/build-types/higher-order/with-notices/index.d.ts.map +1 -0
  514. package/build-types/higher-order/with-notices/test/index.d.ts +2 -0
  515. package/build-types/higher-order/with-notices/test/index.d.ts.map +1 -0
  516. package/build-types/higher-order/with-notices/types.d.ts +34 -0
  517. package/build-types/higher-order/with-notices/types.d.ts.map +1 -0
  518. package/build-types/higher-order/with-spoken-messages/index.d.ts +13 -2
  519. package/build-types/higher-order/with-spoken-messages/index.d.ts.map +1 -1
  520. package/build-types/higher-order/with-spoken-messages/test/index.d.ts +2 -0
  521. package/build-types/higher-order/with-spoken-messages/test/index.d.ts.map +1 -0
  522. package/build-types/icon/index.d.ts +10 -6
  523. package/build-types/icon/index.d.ts.map +1 -1
  524. package/build-types/icon/test/index.d.ts +2 -0
  525. package/build-types/icon/test/index.d.ts.map +1 -0
  526. package/build-types/input-control/reducer/actions.d.ts +15 -15
  527. package/build-types/input-control/reducer/actions.d.ts.map +1 -1
  528. package/build-types/input-control/reducer/state.d.ts +1 -1
  529. package/build-types/input-control/reducer/state.d.ts.map +1 -1
  530. package/build-types/input-control/styles/input-control-styles.d.ts +4 -4
  531. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  532. package/build-types/input-control/types.d.ts +7 -7
  533. package/build-types/input-control/types.d.ts.map +1 -1
  534. package/build-types/item-group/item/hook.d.ts +1 -1
  535. package/build-types/item-group/types.d.ts +2 -2
  536. package/build-types/item-group/types.d.ts.map +1 -1
  537. package/build-types/keyboard-shortcuts/types.d.ts +3 -3
  538. package/build-types/keyboard-shortcuts/types.d.ts.map +1 -1
  539. package/build-types/menu-group/types.d.ts +1 -1
  540. package/build-types/menu-group/types.d.ts.map +1 -1
  541. package/build-types/menu-item/index.d.ts +1 -1
  542. package/build-types/menu-items-choice/types.d.ts +2 -2
  543. package/build-types/menu-items-choice/types.d.ts.map +1 -1
  544. package/build-types/modal/types.d.ts +1 -1
  545. package/build-types/modal/types.d.ts.map +1 -1
  546. package/build-types/navigable-container/container.d.ts +1 -1
  547. package/build-types/navigable-container/menu.d.ts +1 -1
  548. package/build-types/navigable-container/tabbable.d.ts +1 -1
  549. package/build-types/navigation/back-button/index.d.ts +5 -0
  550. package/build-types/navigation/back-button/index.d.ts.map +1 -0
  551. package/build-types/navigation/constants.d.ts +3 -0
  552. package/build-types/navigation/constants.d.ts.map +1 -0
  553. package/build-types/navigation/context.d.ts +5 -0
  554. package/build-types/navigation/context.d.ts.map +1 -0
  555. package/build-types/navigation/group/context.d.ts +8 -0
  556. package/build-types/navigation/group/context.d.ts.map +1 -0
  557. package/build-types/navigation/group/index.d.ts +5 -0
  558. package/build-types/navigation/group/index.d.ts.map +1 -0
  559. package/build-types/navigation/index.d.ts +46 -0
  560. package/build-types/navigation/index.d.ts.map +1 -0
  561. package/build-types/navigation/item/base-content.d.ts +4 -0
  562. package/build-types/navigation/item/base-content.d.ts.map +1 -0
  563. package/build-types/navigation/item/base.d.ts +4 -0
  564. package/build-types/navigation/item/base.d.ts.map +1 -0
  565. package/build-types/navigation/item/index.d.ts +5 -0
  566. package/build-types/navigation/item/index.d.ts.map +1 -0
  567. package/build-types/navigation/item/use-navigation-tree-item.d.ts +3 -0
  568. package/build-types/navigation/item/use-navigation-tree-item.d.ts.map +1 -0
  569. package/build-types/navigation/menu/context.d.ts +8 -0
  570. package/build-types/navigation/menu/context.d.ts.map +1 -0
  571. package/build-types/navigation/menu/index.d.ts +5 -0
  572. package/build-types/navigation/menu/index.d.ts.map +1 -0
  573. package/build-types/navigation/menu/menu-title-search.d.ts +4 -0
  574. package/build-types/navigation/menu/menu-title-search.d.ts.map +1 -0
  575. package/build-types/navigation/menu/menu-title.d.ts +4 -0
  576. package/build-types/navigation/menu/menu-title.d.ts.map +1 -0
  577. package/build-types/navigation/menu/search-no-results-found.d.ts +4 -0
  578. package/build-types/navigation/menu/search-no-results-found.d.ts.map +1 -0
  579. package/build-types/navigation/menu/use-navigation-tree-menu.d.ts +3 -0
  580. package/build-types/navigation/menu/use-navigation-tree-menu.d.ts.map +1 -0
  581. package/build-types/navigation/stories/index.d.ts +18 -0
  582. package/build-types/navigation/stories/index.d.ts.map +1 -0
  583. package/build-types/navigation/stories/utils/controlled-state.d.ts +7 -0
  584. package/build-types/navigation/stories/utils/controlled-state.d.ts.map +1 -0
  585. package/build-types/navigation/stories/utils/default.d.ts +10 -0
  586. package/build-types/navigation/stories/utils/default.d.ts.map +1 -0
  587. package/build-types/navigation/stories/utils/group.d.ts +10 -0
  588. package/build-types/navigation/stories/utils/group.d.ts.map +1 -0
  589. package/build-types/navigation/stories/utils/hide-if-empty.d.ts +10 -0
  590. package/build-types/navigation/stories/utils/hide-if-empty.d.ts.map +1 -0
  591. package/build-types/navigation/stories/utils/more-examples.d.ts +10 -0
  592. package/build-types/navigation/stories/utils/more-examples.d.ts.map +1 -0
  593. package/build-types/navigation/stories/utils/search.d.ts +10 -0
  594. package/build-types/navigation/stories/utils/search.d.ts.map +1 -0
  595. package/build-types/navigation/styles/navigation-styles.d.ts +58 -0
  596. package/build-types/navigation/styles/navigation-styles.d.ts.map +1 -0
  597. package/build-types/navigation/test/index.d.ts +2 -0
  598. package/build-types/navigation/test/index.d.ts.map +1 -0
  599. package/build-types/navigation/types.d.ts +267 -0
  600. package/build-types/navigation/types.d.ts.map +1 -0
  601. package/build-types/navigation/use-create-navigation-tree.d.ts +15 -0
  602. package/build-types/navigation/use-create-navigation-tree.d.ts.map +1 -0
  603. package/build-types/navigation/use-navigation-tree-nodes.d.ts +11 -0
  604. package/build-types/navigation/use-navigation-tree-nodes.d.ts.map +1 -0
  605. package/build-types/navigation/utils.d.ts +3 -0
  606. package/build-types/navigation/utils.d.ts.map +1 -0
  607. package/build-types/navigator/navigator-back-button/component.d.ts +1 -1
  608. package/build-types/navigator/navigator-back-button/hook.d.ts +1 -1
  609. package/build-types/navigator/navigator-button/component.d.ts +1 -1
  610. package/build-types/navigator/navigator-button/hook.d.ts +1 -1
  611. package/build-types/navigator/navigator-screen/component.d.ts +1 -1
  612. package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
  613. package/build-types/navigator/navigator-to-parent-button/component.d.ts +1 -1
  614. package/build-types/navigator/types.d.ts +12 -12
  615. package/build-types/navigator/types.d.ts.map +1 -1
  616. package/build-types/notice/types.d.ts +7 -7
  617. package/build-types/notice/types.d.ts.map +1 -1
  618. package/build-types/number-control/index.d.ts.map +1 -1
  619. package/build-types/number-control/types.d.ts +1 -1
  620. package/build-types/number-control/types.d.ts.map +1 -1
  621. package/build-types/palette-edit/index.d.ts +37 -0
  622. package/build-types/palette-edit/index.d.ts.map +1 -0
  623. package/build-types/palette-edit/stories/index.d.ts +13 -0
  624. package/build-types/palette-edit/stories/index.d.ts.map +1 -0
  625. package/build-types/palette-edit/styles.d.ts +51 -0
  626. package/build-types/palette-edit/styles.d.ts.map +1 -0
  627. package/build-types/palette-edit/test/index.d.ts +2 -0
  628. package/build-types/palette-edit/test/index.d.ts.map +1 -0
  629. package/build-types/palette-edit/types.d.ts +114 -0
  630. package/build-types/palette-edit/types.d.ts.map +1 -0
  631. package/build-types/panel/body.d.ts +9 -0
  632. package/build-types/panel/body.d.ts.map +1 -0
  633. package/build-types/panel/stories/index.d.ts +19 -0
  634. package/build-types/panel/stories/index.d.ts.map +1 -0
  635. package/build-types/panel/test/body.d.ts +2 -0
  636. package/build-types/panel/test/body.d.ts.map +1 -0
  637. package/build-types/panel/types.d.ts +73 -3
  638. package/build-types/panel/types.d.ts.map +1 -1
  639. package/build-types/placeholder/index.d.ts +1 -1
  640. package/build-types/placeholder/index.d.ts.map +1 -1
  641. package/build-types/placeholder/types.d.ts +2 -2
  642. package/build-types/placeholder/types.d.ts.map +1 -1
  643. package/build-types/popover/limit-shift.d.ts +2 -2
  644. package/build-types/popover/limit-shift.d.ts.map +1 -1
  645. package/build-types/popover/types.d.ts +10 -10
  646. package/build-types/popover/types.d.ts.map +1 -1
  647. package/build-types/popover/utils.d.ts +2 -2
  648. package/build-types/popover/utils.d.ts.map +1 -1
  649. package/build-types/query-controls/author-select.d.ts.map +1 -1
  650. package/build-types/query-controls/category-select.d.ts.map +1 -1
  651. package/build-types/query-controls/terms.d.ts.map +1 -1
  652. package/build-types/query-controls/types.d.ts +12 -12
  653. package/build-types/query-controls/types.d.ts.map +1 -1
  654. package/build-types/radio-control/types.d.ts +1 -1
  655. package/build-types/radio-control/types.d.ts.map +1 -1
  656. package/build-types/radio-group/index.d.ts +1 -1
  657. package/build-types/radio-group/radio/index.d.ts +1 -1
  658. package/build-types/range-control/index.d.ts +2 -2
  659. package/build-types/range-control/types.d.ts +17 -17
  660. package/build-types/range-control/types.d.ts.map +1 -1
  661. package/build-types/resizable-box/resize-tooltip/index.d.ts +1 -1
  662. package/build-types/resizable-box/resize-tooltip/index.d.ts.map +1 -1
  663. package/build-types/resizable-box/resize-tooltip/label.d.ts +1 -1
  664. package/build-types/resizable-box/resize-tooltip/label.d.ts.map +1 -1
  665. package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts.map +1 -1
  666. package/build-types/resizable-box/resize-tooltip/utils.d.ts +2 -2
  667. package/build-types/resizable-box/resize-tooltip/utils.d.ts.map +1 -1
  668. package/build-types/responsive-wrapper/index.d.ts.map +1 -1
  669. package/build-types/responsive-wrapper/stories/index.d.ts +10 -0
  670. package/build-types/responsive-wrapper/stories/index.d.ts.map +1 -1
  671. package/build-types/responsive-wrapper/types.d.ts +3 -3
  672. package/build-types/responsive-wrapper/types.d.ts.map +1 -1
  673. package/build-types/sandbox/types.d.ts +1 -1
  674. package/build-types/sandbox/types.d.ts.map +1 -1
  675. package/build-types/scrollable/types.d.ts +2 -2
  676. package/build-types/scrollable/types.d.ts.map +1 -1
  677. package/build-types/search-control/types.d.ts +1 -1
  678. package/build-types/search-control/types.d.ts.map +1 -1
  679. package/build-types/select-control/index.d.ts +2 -1
  680. package/build-types/select-control/index.d.ts.map +1 -1
  681. package/build-types/select-control/stories/index.d.ts +3 -3
  682. package/build-types/select-control/stories/index.d.ts.map +1 -1
  683. package/build-types/select-control/types.d.ts +44 -20
  684. package/build-types/select-control/types.d.ts.map +1 -1
  685. package/build-types/shortcut/types.d.ts +1 -1
  686. package/build-types/shortcut/types.d.ts.map +1 -1
  687. package/build-types/slot-fill/bubbles-virtually/slot.d.ts +1 -1
  688. package/build-types/slot-fill/provider.d.ts +1 -0
  689. package/build-types/slot-fill/provider.d.ts.map +1 -1
  690. package/build-types/snackbar/types.d.ts +3 -3
  691. package/build-types/snackbar/types.d.ts.map +1 -1
  692. package/build-types/spacer/types.d.ts +1 -1
  693. package/build-types/spacer/types.d.ts.map +1 -1
  694. package/build-types/spinner/index.d.ts +1 -1
  695. package/build-types/style-provider/types.d.ts +1 -1
  696. package/build-types/style-provider/types.d.ts.map +1 -1
  697. package/build-types/surface/types.d.ts +2 -2
  698. package/build-types/surface/types.d.ts.map +1 -1
  699. package/build-types/tab-panel/stories/index.d.ts +1 -0
  700. package/build-types/tab-panel/stories/index.d.ts.map +1 -1
  701. package/build-types/tab-panel/types.d.ts +5 -5
  702. package/build-types/tab-panel/types.d.ts.map +1 -1
  703. package/build-types/text/types.d.ts +3 -3
  704. package/build-types/text/types.d.ts.map +1 -1
  705. package/build-types/text-control/types.d.ts +1 -1
  706. package/build-types/text-control/types.d.ts.map +1 -1
  707. package/build-types/text-highlight/types.d.ts +1 -1
  708. package/build-types/text-highlight/types.d.ts.map +1 -1
  709. package/build-types/textarea-control/types.d.ts +1 -1
  710. package/build-types/textarea-control/types.d.ts.map +1 -1
  711. package/build-types/theme/types.d.ts +3 -3
  712. package/build-types/theme/types.d.ts.map +1 -1
  713. package/build-types/tip/types.d.ts +1 -1
  714. package/build-types/tip/types.d.ts.map +1 -1
  715. package/build-types/toggle-control/types.d.ts +1 -1
  716. package/build-types/toggle-control/types.d.ts.map +1 -1
  717. package/build-types/toggle-group-control/types.d.ts +10 -10
  718. package/build-types/toggle-group-control/types.d.ts.map +1 -1
  719. package/build-types/toolbar/toolbar/types.d.ts +1 -1
  720. package/build-types/toolbar/toolbar/types.d.ts.map +1 -1
  721. package/build-types/toolbar/toolbar-button/index.d.ts +165 -11
  722. package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
  723. package/build-types/toolbar/toolbar-button/toolbar-button-container.d.ts +6 -1
  724. package/build-types/toolbar/toolbar-button/toolbar-button-container.d.ts.map +1 -1
  725. package/build-types/toolbar/toolbar-button/types.d.ts +45 -0
  726. package/build-types/toolbar/toolbar-button/types.d.ts.map +1 -0
  727. package/build-types/toolbar/toolbar-context/index.d.ts +6 -1
  728. package/build-types/toolbar/toolbar-context/index.d.ts.map +1 -1
  729. package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts +1 -1
  730. package/build-types/toolbar/toolbar-item/index.d.ts +1 -1
  731. package/build-types/tools-panel/context.d.ts.map +1 -1
  732. package/build-types/tools-panel/test/index.d.ts +2 -0
  733. package/build-types/tools-panel/test/index.d.ts.map +1 -0
  734. package/build-types/tools-panel/tools-panel/hook.d.ts +3 -1
  735. package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
  736. package/build-types/tools-panel/tools-panel-header/hook.d.ts +1 -1
  737. package/build-types/tools-panel/tools-panel-item/component.d.ts +1 -0
  738. package/build-types/tools-panel/tools-panel-item/component.d.ts.map +1 -1
  739. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  740. package/build-types/tools-panel/types.d.ts +21 -19
  741. package/build-types/tools-panel/types.d.ts.map +1 -1
  742. package/build-types/tooltip/index.d.ts.map +1 -1
  743. package/build-types/tree-grid/types.d.ts +5 -5
  744. package/build-types/tree-grid/types.d.ts.map +1 -1
  745. package/build-types/tree-select/index.d.ts.map +1 -1
  746. package/build-types/tree-select/types.d.ts +4 -10
  747. package/build-types/tree-select/types.d.ts.map +1 -1
  748. package/build-types/truncate/types.d.ts +2 -2
  749. package/build-types/truncate/types.d.ts.map +1 -1
  750. package/build-types/ui/context/context-connect.d.ts +1 -1
  751. package/build-types/ui/context/context-connect.d.ts.map +1 -1
  752. package/build-types/ui/context/context-system-provider.d.ts.map +1 -1
  753. package/build-types/ui/context/wordpress-component.d.ts +3 -3
  754. package/build-types/ui/context/wordpress-component.d.ts.map +1 -1
  755. package/build-types/ui/control-group/types.d.ts +2 -2
  756. package/build-types/ui/control-group/types.d.ts.map +1 -1
  757. package/build-types/ui/control-label/types.d.ts +1 -1
  758. package/build-types/ui/control-label/types.d.ts.map +1 -1
  759. package/build-types/ui/form-group/form-group-content.d.ts +1 -1
  760. package/build-types/ui/form-group/form-group-help.d.ts +1 -1
  761. package/build-types/ui/form-group/form-group-label.d.ts +1 -1
  762. package/build-types/ui/form-group/types.d.ts +5 -5
  763. package/build-types/ui/form-group/types.d.ts.map +1 -1
  764. package/build-types/ui/form-group/use-form-group.d.ts +3 -3
  765. package/build-types/ui/spinner/component.d.ts +1 -1
  766. package/build-types/ui/tooltip/content.d.ts +1 -1
  767. package/build-types/ui/tooltip/types.d.ts +2 -2
  768. package/build-types/ui/tooltip/types.d.ts.map +1 -1
  769. package/build-types/ui/utils/font-size.d.ts +1 -1
  770. package/build-types/ui/utils/font-size.d.ts.map +1 -1
  771. package/build-types/ui/utils/space.d.ts +1 -1
  772. package/build-types/ui/utils/space.d.ts.map +1 -1
  773. package/build-types/ui/utils/types.d.ts +4 -4
  774. package/build-types/ui/utils/types.d.ts.map +1 -1
  775. package/build-types/unit-control/styles/unit-control-styles.d.ts +1 -1
  776. package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
  777. package/build-types/unit-control/types.d.ts +5 -5
  778. package/build-types/unit-control/types.d.ts.map +1 -1
  779. package/build-types/utils/breakpoint-values.d.ts +1 -1
  780. package/build-types/utils/colors-values.d.ts +1 -1
  781. package/build-types/utils/config-values.d.ts +9 -9
  782. package/build-types/utils/events.d.ts +1 -1
  783. package/build-types/utils/events.d.ts.map +1 -1
  784. package/build-types/utils/font-values.d.ts +1 -1
  785. package/build-types/utils/font.d.ts.map +1 -1
  786. package/build-types/utils/hooks/use-controlled-value.d.ts +1 -1
  787. package/build-types/utils/hooks/use-controlled-value.d.ts.map +1 -1
  788. package/build-types/utils/types.d.ts +4 -4
  789. package/build-types/utils/types.d.ts.map +1 -1
  790. package/build-types/v-stack/component.d.ts +1 -4
  791. package/build-types/v-stack/component.d.ts.map +1 -1
  792. package/build-types/v-stack/hook.d.ts.map +1 -1
  793. package/build-types/v-stack/stories/e2e/index.d.ts +9 -0
  794. package/build-types/v-stack/stories/e2e/index.d.ts.map +1 -0
  795. package/build-types/v-stack/stories/index.d.ts +1 -4
  796. package/build-types/v-stack/stories/index.d.ts.map +1 -1
  797. package/build-types/v-stack/types.d.ts +5 -3
  798. package/build-types/v-stack/types.d.ts.map +1 -1
  799. package/build-types/view/types.d.ts +1 -1
  800. package/build-types/view/types.d.ts.map +1 -1
  801. package/build-types/visually-hidden/types.d.ts +1 -1
  802. package/build-types/visually-hidden/types.d.ts.map +1 -1
  803. package/build-types/z-stack/types.d.ts +1 -1
  804. package/build-types/z-stack/types.d.ts.map +1 -1
  805. package/package.json +24 -22
  806. package/src/animate/index.js +3 -1
  807. package/src/autocomplete/README.md +51 -0
  808. package/src/autocomplete/autocompleter-ui.tsx +167 -0
  809. package/src/autocomplete/{get-default-use-items.js → get-default-use-items.tsx} +11 -6
  810. package/src/autocomplete/{index.js → index.tsx} +107 -141
  811. package/src/autocomplete/test/{index.js → index.tsx} +31 -20
  812. package/src/autocomplete/types.ts +220 -0
  813. package/src/border-control/test/index.js +0 -2
  814. package/src/button/style.scss +12 -1
  815. package/src/button/types.ts +2 -2
  816. package/src/circular-option-picker/README.md +141 -0
  817. package/src/circular-option-picker/{index.js → index.tsx} +74 -14
  818. package/src/circular-option-picker/stories/index.tsx +134 -0
  819. package/src/circular-option-picker/types.ts +69 -0
  820. package/src/color-palette/test/__snapshots__/index.tsx.snap +17 -15
  821. package/src/custom-gradient-picker/gradient-bar/control-points.js +2 -0
  822. package/src/custom-gradient-picker/gradient-bar/index.js +2 -0
  823. package/src/custom-gradient-picker/gradient-bar/utils.js +2 -0
  824. package/src/custom-gradient-picker/index.js +2 -0
  825. package/src/custom-gradient-picker/serializer.js +2 -0
  826. package/src/custom-gradient-picker/utils.js +2 -0
  827. package/src/dimension-control/README.md +22 -55
  828. package/src/dimension-control/index.tsx +101 -0
  829. package/src/dimension-control/{sizes.js → sizes.ts} +8 -5
  830. package/src/dimension-control/stories/index.tsx +48 -0
  831. package/src/dimension-control/types.ts +48 -0
  832. package/src/dropdown-menu/index.js +6 -3
  833. package/src/flex/flex/hook.ts +2 -2
  834. package/src/font-size-picker/README.md +26 -20
  835. package/src/font-size-picker/index.tsx +2 -1
  836. package/src/font-size-picker/stories/index.tsx +1 -0
  837. package/src/font-size-picker/test/index.tsx +23 -0
  838. package/src/font-size-picker/types.ts +4 -0
  839. package/src/form-token-field/index.tsx +4 -1
  840. package/src/form-token-field/stories/index.tsx +13 -0
  841. package/src/form-token-field/test/index.tsx +80 -0
  842. package/src/gradient-picker/index.js +2 -0
  843. package/src/guide/README.md +17 -15
  844. package/src/guide/{icons.js → icons.tsx} +1 -1
  845. package/src/guide/{index.js → index.tsx} +47 -7
  846. package/src/guide/{page-control.js → page-control.tsx} +2 -1
  847. package/src/guide/{page.js → page.tsx} +8 -1
  848. package/src/guide/stories/{index.js → index.tsx} +11 -5
  849. package/src/guide/test/{index.js → index.tsx} +22 -4
  850. package/src/guide/types.ts +68 -0
  851. package/src/h-stack/README.md +2 -2
  852. package/src/h-stack/stories/e2e/index.tsx +36 -0
  853. package/src/h-stack/types.ts +2 -2
  854. package/src/h-stack/utils.ts +3 -3
  855. package/src/higher-order/navigate-regions/{index.js → index.tsx} +47 -11
  856. package/src/higher-order/navigate-regions/style.scss +2 -1
  857. package/src/higher-order/with-constrained-tabbing/index.tsx +30 -0
  858. package/src/higher-order/with-fallback-styles/{index.js → index.tsx} +22 -5
  859. package/src/higher-order/with-filters/{index.js → index.tsx} +44 -12
  860. package/src/higher-order/with-filters/test/{index.js → index.tsx} +5 -1
  861. package/src/higher-order/with-focus-return/index.tsx +74 -0
  862. package/src/higher-order/with-focus-return/test/{index.js → index.tsx} +2 -2
  863. package/src/higher-order/with-notices/README.md +4 -1
  864. package/src/higher-order/with-notices/index.tsx +116 -0
  865. package/src/higher-order/with-notices/test/{index.js → index.tsx} +11 -6
  866. package/src/higher-order/with-notices/types.ts +35 -0
  867. package/src/higher-order/with-spoken-messages/test/{index.js → index.tsx} +2 -1
  868. package/src/icon/index.tsx +11 -15
  869. package/src/icon/test/{index.js → index.tsx} +6 -2
  870. package/src/index.native.js +1 -0
  871. package/src/mobile/bottom-sheet/bottom-sheet-navigation/test/navigation-container.native.js +1 -1
  872. package/src/mobile/bottom-sheet/cell.native.js +1 -1
  873. package/src/mobile/bottom-sheet-text-control/README.md +8 -1
  874. package/src/mobile/bottom-sheet-text-control/index.native.js +2 -1
  875. package/src/mobile/global-styles-context/utils.native.js +1 -0
  876. package/src/mobile/link-settings/test/link-settings-navigation.native.js +1 -1
  877. package/src/navigation/README.md +16 -2
  878. package/src/navigation/back-button/{index.js → index.tsx} +22 -6
  879. package/src/navigation/{context.js → context.tsx} +8 -5
  880. package/src/navigation/group/context.tsx +15 -0
  881. package/src/navigation/group/{index.js → index.tsx} +9 -1
  882. package/src/navigation/{index.js → index.tsx} +63 -7
  883. package/src/navigation/item/{base-content.js → base-content.tsx} +5 -2
  884. package/src/navigation/item/{base.js → base.tsx} +3 -1
  885. package/src/navigation/item/{index.js → index.tsx} +8 -2
  886. package/src/navigation/item/{use-navigation-tree-item.js → use-navigation-tree-item.tsx} +9 -2
  887. package/src/navigation/menu/context.tsx +18 -0
  888. package/src/navigation/menu/{index.js → index.tsx} +5 -1
  889. package/src/navigation/menu/{menu-title-search.js → menu-title-search.tsx} +11 -7
  890. package/src/navigation/menu/{menu-title.js → menu-title.tsx} +5 -3
  891. package/src/navigation/menu/{search-no-results-found.js → search-no-results-found.tsx} +5 -1
  892. package/src/navigation/menu/{use-navigation-tree-menu.js → use-navigation-tree-menu.tsx} +3 -1
  893. package/src/navigation/stories/index.tsx +53 -0
  894. package/src/navigation/stories/utils/{controlled-state.js → controlled-state.tsx} +32 -13
  895. package/src/navigation/stories/utils/{default.js → default.tsx} +20 -6
  896. package/src/navigation/stories/utils/{group.js → group.tsx} +21 -7
  897. package/src/navigation/stories/utils/{hide-if-empty.js → hide-if-empty.tsx} +19 -6
  898. package/src/navigation/stories/utils/{more-examples.js → more-examples.tsx} +30 -12
  899. package/src/navigation/stories/utils/{search.js → search.tsx} +21 -7
  900. package/src/navigation/test/{index.js → index.tsx} +17 -4
  901. package/src/navigation/types.ts +325 -0
  902. package/src/navigation/{use-create-navigation-tree.js → use-create-navigation-tree.tsx} +37 -25
  903. package/src/navigation/{use-navigation-tree-nodes.js → use-navigation-tree-nodes.tsx} +10 -6
  904. package/src/navigation/{utils.js → utils.tsx} +2 -2
  905. package/src/navigator/navigator-screen/component.tsx +13 -7
  906. package/src/navigator/test/index.tsx +65 -22
  907. package/src/number-control/index.tsx +0 -2
  908. package/src/palette-edit/{index.js → index.tsx} +115 -48
  909. package/src/palette-edit/stories/index.tsx +82 -0
  910. package/src/palette-edit/test/{index.js → index.tsx} +15 -3
  911. package/src/palette-edit/types.ts +126 -0
  912. package/src/panel/README.md +53 -35
  913. package/src/panel/{body.js → body.tsx} +31 -17
  914. package/src/panel/stories/{index.js → index.tsx} +16 -6
  915. package/src/panel/test/{body.js → body.tsx} +12 -17
  916. package/src/panel/types.ts +78 -0
  917. package/src/placeholder/index.tsx +2 -6
  918. package/src/placeholder/test/index.tsx +1 -1
  919. package/src/placeholder/types.ts +2 -2
  920. package/src/popover/test/index.tsx +5 -2
  921. package/src/query-controls/author-select.tsx +1 -6
  922. package/src/query-controls/category-select.tsx +1 -6
  923. package/src/query-controls/terms.ts +29 -18
  924. package/src/range-control/index.tsx +7 -7
  925. package/src/range-control/types.ts +3 -3
  926. package/src/resizable-box/resize-tooltip/styles/resize-tooltip.styles.ts +2 -1
  927. package/src/responsive-wrapper/README.md +8 -2
  928. package/src/responsive-wrapper/index.tsx +18 -17
  929. package/src/responsive-wrapper/stories/index.tsx +41 -0
  930. package/src/responsive-wrapper/style.scss +5 -11
  931. package/src/responsive-wrapper/types.ts +2 -2
  932. package/src/select-control/index.tsx +16 -16
  933. package/src/select-control/stories/index.tsx +24 -12
  934. package/src/select-control/types.ts +68 -40
  935. package/src/tab-panel/stories/index.tsx +41 -0
  936. package/src/tab-panel/test/index.tsx +794 -262
  937. package/src/tab-panel/types.ts +4 -4
  938. package/src/toolbar/toolbar-button/README.md +13 -1
  939. package/src/toolbar/toolbar-button/{index.js → index.tsx} +55 -20
  940. package/src/toolbar/toolbar-button/toolbar-button-container.tsx +13 -0
  941. package/src/toolbar/toolbar-button/types.ts +46 -0
  942. package/src/toolbar/toolbar-context/index.ts +15 -0
  943. package/src/tools-panel/context.ts +2 -0
  944. package/src/tools-panel/test/{index.js → index.tsx} +171 -61
  945. package/src/tools-panel/tools-panel/hook.ts +30 -11
  946. package/src/tools-panel/tools-panel-item/hook.ts +18 -2
  947. package/src/tools-panel/types.ts +12 -9
  948. package/src/tooltip/index.js +11 -1
  949. package/src/tree-grid/test/__snapshots__/index.tsx.snap +1 -1
  950. package/src/tree-select/index.tsx +5 -2
  951. package/src/tree-select/types.ts +6 -13
  952. package/src/ui/context/context-system-provider.js +7 -4
  953. package/src/ui/context/get-styled-class-name-from-key.ts +1 -1
  954. package/src/utils/font.js +1 -6
  955. package/src/v-stack/README.md +2 -2
  956. package/src/v-stack/hook.ts +6 -4
  957. package/src/v-stack/stories/e2e/index.tsx +36 -0
  958. package/src/v-stack/stories/index.tsx +28 -7
  959. package/src/v-stack/test/__snapshots__/index.tsx.snap +20 -18
  960. package/src/v-stack/types.ts +5 -3
  961. package/tsconfig.json +1 -14
  962. package/tsconfig.tsbuildinfo +1 -1
  963. package/src/autocomplete/autocompleter-ui.js +0 -118
  964. package/src/dimension-control/index.js +0 -73
  965. package/src/higher-order/with-constrained-tabbing/index.js +0 -22
  966. package/src/higher-order/with-focus-return/index.js +0 -64
  967. package/src/higher-order/with-notices/index.js +0 -104
  968. package/src/navigation/group/context.js +0 -9
  969. package/src/navigation/menu/context.js +0 -11
  970. package/src/navigation/stories/index.js +0 -33
  971. package/src/toolbar/toolbar-button/toolbar-button-container.js +0 -6
  972. package/src/toolbar/toolbar-context/index.js +0 -10
  973. /package/src/animation/{index.js → index.tsx} +0 -0
  974. /package/src/higher-order/with-filters/test/__snapshots__/{index.js.snap → index.tsx.snap} +0 -0
  975. /package/src/higher-order/with-spoken-messages/{index.js → index.tsx} +0 -0
  976. /package/src/navigation/{constants.js → constants.tsx} +0 -0
  977. /package/src/navigation/styles/{navigation-styles.js → navigation-styles.tsx} +0 -0
  978. /package/src/panel/test/__snapshots__/{body.js.snap → body.tsx.snap} +0 -0
@@ -16,23 +16,40 @@ import { createHigherOrderComponent } from '@wordpress/compose';
16
16
  */
17
17
 
18
18
  import NoticeList from '../../notice/list';
19
+
19
20
  /**
20
21
  * Override the default edit UI to include notices if supported.
21
22
  *
22
- * @param {WPComponent} OriginalComponent Original component.
23
+ * Wrapping the original component with `withNotices` encapsulates the component
24
+ * with the additional props `noticeOperations` and `noticeUI`.
25
+ *
26
+ * ```jsx
27
+ * import { withNotices, Button } from '@wordpress/components';
28
+ *
29
+ * const MyComponentWithNotices = withNotices(
30
+ * ( { noticeOperations, noticeUI } ) => {
31
+ * const addError = () =>
32
+ * noticeOperations.createErrorNotice( 'Error message' );
33
+ * return (
34
+ * <div>
35
+ * { noticeUI }
36
+ * <Button variant="secondary" onClick={ addError }>
37
+ * Add error
38
+ * </Button>
39
+ * </div>
40
+ * );
41
+ * }
42
+ * );
43
+ * ```
23
44
  *
24
- * @return {WPComponent} Wrapped component.
45
+ * @param OriginalComponent Original component.
46
+ *
47
+ * @return Wrapped component.
25
48
  */
26
-
27
49
  export default createHigherOrderComponent(OriginalComponent => {
28
50
  function Component(props, ref) {
29
51
  const [noticeList, setNoticeList] = useState([]);
30
52
  const noticeOperations = useMemo(() => {
31
- /**
32
- * Function passed down as a prop that adds a new notice.
33
- *
34
- * @param {Object} notice Notice to add.
35
- */
36
53
  const createNotice = notice => {
37
54
  const noticeToAdd = notice.id ? notice : { ...notice,
38
55
  id: uuid()
@@ -42,31 +59,16 @@ export default createHigherOrderComponent(OriginalComponent => {
42
59
 
43
60
  return {
44
61
  createNotice,
45
-
46
- /**
47
- * Function passed as a prop that adds a new error notice.
48
- *
49
- * @param {string} msg Error message of the notice.
50
- */
51
62
  createErrorNotice: msg => {
63
+ // @ts-expect-error TODO: Missing `id`, potentially a bug
52
64
  createNotice({
53
65
  status: 'error',
54
66
  content: msg
55
67
  });
56
68
  },
57
-
58
- /**
59
- * Removes a notice by id.
60
- *
61
- * @param {string} id Id of the notice to remove.
62
- */
63
69
  removeNotice: id => {
64
70
  setNoticeList(current => current.filter(notice => notice.id !== id));
65
71
  },
66
-
67
- /**
68
- * Removes all notices
69
- */
70
72
  removeAllNotices: () => {
71
73
  setNoticeList([]);
72
74
  }
@@ -86,7 +88,8 @@ export default createHigherOrderComponent(OriginalComponent => {
86
88
  })) : createElement(OriginalComponent, propsOut);
87
89
  }
88
90
 
89
- let isForwardRef;
91
+ let isForwardRef; // @ts-expect-error - `render` will only be present when OriginalComponent was wrapped with forwardRef().
92
+
90
93
  const {
91
94
  render
92
95
  } = OriginalComponent; // Returns a forwardRef if OriginalComponent appears to be a forwardRef.
@@ -97,5 +100,5 @@ export default createHigherOrderComponent(OriginalComponent => {
97
100
  }
98
101
 
99
102
  return Component;
100
- });
103
+ }, 'withNotices');
101
104
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/higher-order/with-notices/index.js"],"names":["v4","uuid","forwardRef","useState","useMemo","createHigherOrderComponent","NoticeList","OriginalComponent","Component","props","ref","noticeList","setNoticeList","noticeOperations","createNotice","notice","noticeToAdd","id","current","createErrorNotice","msg","status","content","removeNotice","filter","removeAllNotices","propsOut","noticeUI","length","isForwardRef","render"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,EAAE,IAAIC,IAAf,QAA2B,MAA3B;AAEA;AACA;AACA;;AACA,SAASC,UAAT,EAAqBC,QAArB,EAA+BC,OAA/B,QAA8C,oBAA9C;AACA,SAASC,0BAAT,QAA2C,oBAA3C;AAEA;AACA;AACA;;AACA,OAAOC,UAAP,MAAuB,mBAAvB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,eAAeD,0BAA0B,CAAIE,iBAAF,IAAyB;AACnE,WAASC,SAAT,CAAoBC,KAApB,EAA2BC,GAA3B,EAAiC;AAChC,UAAM,CAAEC,UAAF,EAAcC,aAAd,IAAgCT,QAAQ,CAAE,EAAF,CAA9C;AAEA,UAAMU,gBAAgB,GAAGT,OAAO,CAAE,MAAM;AACvC;AACH;AACA;AACA;AACA;AACG,YAAMU,YAAY,GAAKC,MAAF,IAAc;AAClC,cAAMC,WAAW,GAAGD,MAAM,CAACE,EAAP,GACjBF,MADiB,GAEjB,EAAE,GAAGA,MAAL;AAAaE,UAAAA,EAAE,EAAEhB,IAAI;AAArB,SAFH;AAGAW,QAAAA,aAAa,CAAIM,OAAF,IAAe,CAAE,GAAGA,OAAL,EAAcF,WAAd,CAAjB,CAAb;AACA,OALD;;AAOA,aAAO;AACNF,QAAAA,YADM;;AAGN;AACJ;AACA;AACA;AACA;AACIK,QAAAA,iBAAiB,EAAIC,GAAF,IAAW;AAC7BN,UAAAA,YAAY,CAAE;AACbO,YAAAA,MAAM,EAAE,OADK;AAEbC,YAAAA,OAAO,EAAEF;AAFI,WAAF,CAAZ;AAIA,SAbK;;AAeN;AACJ;AACA;AACA;AACA;AACIG,QAAAA,YAAY,EAAIN,EAAF,IAAU;AACvBL,UAAAA,aAAa,CAAIM,OAAF,IACdA,OAAO,CAACM,MAAR,CAAkBT,MAAF,IAAcA,MAAM,CAACE,EAAP,KAAcA,EAA5C,CADY,CAAb;AAGA,SAxBK;;AA0BN;AACJ;AACA;AACIQ,QAAAA,gBAAgB,EAAE,MAAM;AACvBb,UAAAA,aAAa,CAAE,EAAF,CAAb;AACA;AA/BK,OAAP;AAiCA,KA9C+B,EA8C7B,EA9C6B,CAAhC;AAgDA,UAAMc,QAAQ,GAAG,EAChB,GAAGjB,KADa;AAEhBE,MAAAA,UAFgB;AAGhBE,MAAAA,gBAHgB;AAIhBc,MAAAA,QAAQ,EAAEhB,UAAU,CAACiB,MAAX,GAAoB,CAApB,IACT,cAAC,UAAD;AACC,QAAA,SAAS,EAAC,4BADX;AAEC,QAAA,OAAO,EAAGjB,UAFX;AAGC,QAAA,QAAQ,EAAGE,gBAAgB,CAACU;AAH7B;AALe,KAAjB;AAaA,WAAOM,YAAY,GAClB,cAAC,iBAAD,eAAwBH,QAAxB;AAAmC,MAAA,GAAG,EAAGhB;AAAzC,OADkB,GAGlB,cAAC,iBAAD,EAAwBgB,QAAxB,CAHD;AAKA;;AAED,MAAIG,YAAJ;AACA,QAAM;AAAEC,IAAAA;AAAF,MAAavB,iBAAnB,CAzEmE,CA0EnE;;AACA,MAAK,OAAOuB,MAAP,KAAkB,UAAvB,EAAoC;AACnCD,IAAAA,YAAY,GAAG,IAAf;AACA,WAAO3B,UAAU,CAAEM,SAAF,CAAjB;AACA;;AACD,SAAOA,SAAP;AACA,CAhFwC,CAAzC","sourcesContent":["/**\n * External dependencies\n */\nimport { v4 as uuid } from 'uuid';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useState, useMemo } from '@wordpress/element';\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport NoticeList from '../../notice/list';\n\n/**\n * Override the default edit UI to include notices if supported.\n *\n * @param {WPComponent} OriginalComponent Original component.\n *\n * @return {WPComponent} Wrapped component.\n */\nexport default createHigherOrderComponent( ( OriginalComponent ) => {\n\tfunction Component( props, ref ) {\n\t\tconst [ noticeList, setNoticeList ] = useState( [] );\n\n\t\tconst noticeOperations = useMemo( () => {\n\t\t\t/**\n\t\t\t * Function passed down as a prop that adds a new notice.\n\t\t\t *\n\t\t\t * @param {Object} notice Notice to add.\n\t\t\t */\n\t\t\tconst createNotice = ( notice ) => {\n\t\t\t\tconst noticeToAdd = notice.id\n\t\t\t\t\t? notice\n\t\t\t\t\t: { ...notice, id: uuid() };\n\t\t\t\tsetNoticeList( ( current ) => [ ...current, noticeToAdd ] );\n\t\t\t};\n\n\t\t\treturn {\n\t\t\t\tcreateNotice,\n\n\t\t\t\t/**\n\t\t\t\t * Function passed as a prop that adds a new error notice.\n\t\t\t\t *\n\t\t\t\t * @param {string} msg Error message of the notice.\n\t\t\t\t */\n\t\t\t\tcreateErrorNotice: ( msg ) => {\n\t\t\t\t\tcreateNotice( {\n\t\t\t\t\t\tstatus: 'error',\n\t\t\t\t\t\tcontent: msg,\n\t\t\t\t\t} );\n\t\t\t\t},\n\n\t\t\t\t/**\n\t\t\t\t * Removes a notice by id.\n\t\t\t\t *\n\t\t\t\t * @param {string} id Id of the notice to remove.\n\t\t\t\t */\n\t\t\t\tremoveNotice: ( id ) => {\n\t\t\t\t\tsetNoticeList( ( current ) =>\n\t\t\t\t\t\tcurrent.filter( ( notice ) => notice.id !== id )\n\t\t\t\t\t);\n\t\t\t\t},\n\n\t\t\t\t/**\n\t\t\t\t * Removes all notices\n\t\t\t\t */\n\t\t\t\tremoveAllNotices: () => {\n\t\t\t\t\tsetNoticeList( [] );\n\t\t\t\t},\n\t\t\t};\n\t\t}, [] );\n\n\t\tconst propsOut = {\n\t\t\t...props,\n\t\t\tnoticeList,\n\t\t\tnoticeOperations,\n\t\t\tnoticeUI: noticeList.length > 0 && (\n\t\t\t\t<NoticeList\n\t\t\t\t\tclassName=\"components-with-notices-ui\"\n\t\t\t\t\tnotices={ noticeList }\n\t\t\t\t\tonRemove={ noticeOperations.removeNotice }\n\t\t\t\t/>\n\t\t\t),\n\t\t};\n\n\t\treturn isForwardRef ? (\n\t\t\t<OriginalComponent { ...propsOut } ref={ ref } />\n\t\t) : (\n\t\t\t<OriginalComponent { ...propsOut } />\n\t\t);\n\t}\n\n\tlet isForwardRef;\n\tconst { render } = OriginalComponent;\n\t// Returns a forwardRef if OriginalComponent appears to be a forwardRef.\n\tif ( typeof render === 'function' ) {\n\t\tisForwardRef = true;\n\t\treturn forwardRef( Component );\n\t}\n\treturn Component;\n} );\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/higher-order/with-notices/index.tsx"],"names":["v4","uuid","forwardRef","useState","useMemo","createHigherOrderComponent","NoticeList","OriginalComponent","Component","props","ref","noticeList","setNoticeList","noticeOperations","createNotice","notice","noticeToAdd","id","current","createErrorNotice","msg","status","content","removeNotice","filter","removeAllNotices","propsOut","noticeUI","length","isForwardRef","render"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,EAAE,IAAIC,IAAf,QAA2B,MAA3B;AAEA;AACA;AACA;;AACA,SAASC,UAAT,EAAqBC,QAArB,EAA+BC,OAA/B,QAA8C,oBAA9C;AACA,SAASC,0BAAT,QAA2C,oBAA3C;AAEA;AACA;AACA;;AACA,OAAOC,UAAP,MAAuB,mBAAvB;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAeD,0BAA0B,CAAIE,iBAAF,IAAyB;AACnE,WAASC,SAAT,CACCC,KADD,EAECC,GAFD,EAGE;AACD,UAAM,CAAEC,UAAF,EAAcC,aAAd,IAAgCT,QAAQ,CAE3C,EAF2C,CAA9C;AAIA,UAAMU,gBAAgB,GAAGT,OAAO,CAE7B,MAAM;AACR,YAAMU,YAAqE,GACxEC,MAAF,IAAc;AACb,cAAMC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AAnB,CA9DmE,CA+DnE;;AACA,MAAK,OAAOuB,MAAP,KAAkB,UAAvB,EAAoC;AACnCD,IAAAA,YAAY,GAAG,IAAf;AACA,WAAO3B,UAAU,CAAEM,SAAF,CAAjB;AACA;;AACD,SAAOA,SAAP;AACA,CArEwC,EAqEtC,aArEsC,CAAzC","sourcesContent":["/**\n * External dependencies\n */\nimport { v4 as uuid } from 'uuid';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useState, useMemo } from '@wordpress/element';\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport NoticeList from '../../notice/list';\nimport type { WithNoticeProps } from './types';\n\n/**\n * Override the default edit UI to include notices if supported.\n *\n * Wrapping the original component with `withNotices` encapsulates the component\n * with the additional props `noticeOperations` and `noticeUI`.\n *\n * ```jsx\n * import { withNotices, Button } from '@wordpress/components';\n *\n * const MyComponentWithNotices = withNotices(\n * \t( { noticeOperations, noticeUI } ) => {\n * \t\tconst addError = () =>\n * \t\t\tnoticeOperations.createErrorNotice( 'Error message' );\n * \t\treturn (\n * \t\t\t<div>\n * \t\t\t\t{ noticeUI }\n * \t\t\t\t<Button variant=\"secondary\" onClick={ addError }>\n * \t\t\t\t\tAdd error\n * \t\t\t\t</Button>\n * \t\t\t</div>\n * \t\t);\n * \t}\n * );\n * ```\n *\n * @param OriginalComponent Original component.\n *\n * @return Wrapped component.\n */\nexport default createHigherOrderComponent( ( OriginalComponent ) => {\n\tfunction Component(\n\t\tprops: { [ key: string ]: any },\n\t\tref: React.ForwardedRef< any >\n\t) {\n\t\tconst [ noticeList, setNoticeList ] = useState<\n\t\t\tWithNoticeProps[ 'noticeList' ]\n\t\t>( [] );\n\n\t\tconst noticeOperations = useMemo<\n\t\t\tWithNoticeProps[ 'noticeOperations' ]\n\t\t>( () => {\n\t\t\tconst createNotice: WithNoticeProps[ 'noticeOperations' ][ 'createNotice' ] =\n\t\t\t\t( notice ) => {\n\t\t\t\t\tconst noticeToAdd = notice.id\n\t\t\t\t\t\t? notice\n\t\t\t\t\t\t: { ...notice, id: uuid() };\n\t\t\t\t\tsetNoticeList( ( current ) => [ ...current, noticeToAdd ] );\n\t\t\t\t};\n\n\t\t\treturn {\n\t\t\t\tcreateNotice,\n\t\t\t\tcreateErrorNotice: ( msg ) => {\n\t\t\t\t\t// @ts-expect-error TODO: Missing `id`, potentially a bug\n\t\t\t\t\tcreateNotice( {\n\t\t\t\t\t\tstatus: 'error',\n\t\t\t\t\t\tcontent: msg,\n\t\t\t\t\t} );\n\t\t\t\t},\n\t\t\t\tremoveNotice: ( id ) => {\n\t\t\t\t\tsetNoticeList( ( current ) =>\n\t\t\t\t\t\tcurrent.filter( ( notice ) => notice.id !== id )\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\tremoveAllNotices: () => {\n\t\t\t\t\tsetNoticeList( [] );\n\t\t\t\t},\n\t\t\t};\n\t\t}, [] );\n\n\t\tconst propsOut = {\n\t\t\t...props,\n\t\t\tnoticeList,\n\t\t\tnoticeOperations,\n\t\t\tnoticeUI: noticeList.length > 0 && (\n\t\t\t\t<NoticeList\n\t\t\t\t\tclassName=\"components-with-notices-ui\"\n\t\t\t\t\tnotices={ noticeList }\n\t\t\t\t\tonRemove={ noticeOperations.removeNotice }\n\t\t\t\t/>\n\t\t\t),\n\t\t};\n\n\t\treturn isForwardRef ? (\n\t\t\t<OriginalComponent { ...propsOut } ref={ ref } />\n\t\t) : (\n\t\t\t<OriginalComponent { ...propsOut } />\n\t\t);\n\t}\n\n\tlet isForwardRef: boolean;\n\t// @ts-expect-error - `render` will only be present when OriginalComponent was wrapped with forwardRef().\n\tconst { render } = OriginalComponent;\n\t// Returns a forwardRef if OriginalComponent appears to be a forwardRef.\n\tif ( typeof render === 'function' ) {\n\t\tisForwardRef = true;\n\t\treturn forwardRef( Component );\n\t}\n\treturn Component;\n}, 'withNotices' );\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/higher-order/with-spoken-messages/index.js"],"names":["createHigherOrderComponent","useDebounce","speak","Component","props"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,0BAAT,EAAqCC,WAArC,QAAwD,oBAAxD;AACA,SAASC,KAAT,QAAsB,iBAAtB;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,eAAeF,0BAA0B,CACtCG,SAAF,IAAmBC,KAAF,IAEf,cAAC,SAAD,eACMA,KADN;AAEC,EAAA,KAAK,EAAGF,KAFT;AAGC,EAAA,cAAc,EAAGD,WAAW,CAAEC,KAAF,EAAS,GAAT;AAH7B,GAHsC,EASxC,oBATwC,CAAzC","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createHigherOrderComponent, useDebounce } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\n\n/** @typedef {import('@wordpress/element').WPComponent} WPComponent */\n\n/**\n * A Higher Order Component used to be provide speak and debounced speak\n * functions.\n *\n * @see https://developer.wordpress.org/block-editor/packages/packages-a11y/#speak\n *\n * @param {WPComponent} Component The component to be wrapped.\n *\n * @return {WPComponent} The wrapped component.\n */\nexport default createHigherOrderComponent(\n\t( Component ) => ( props ) =>\n\t\t(\n\t\t\t<Component\n\t\t\t\t{ ...props }\n\t\t\t\tspeak={ speak }\n\t\t\t\tdebouncedSpeak={ useDebounce( speak, 500 ) }\n\t\t\t/>\n\t\t),\n\t'withSpokenMessages'\n);\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/higher-order/with-spoken-messages/index.tsx"],"names":["createHigherOrderComponent","useDebounce","speak","Component","props"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,0BAAT,EAAqCC,WAArC,QAAwD,oBAAxD;AACA,SAASC,KAAT,QAAsB,iBAAtB;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,eAAeF,0BAA0B,CACtCG,SAAF,IAAmBC,KAAF,IAEf,cAAC,SAAD,eACMA,KADN;AAEC,EAAA,KAAK,EAAGF,KAFT;AAGC,EAAA,cAAc,EAAGD,WAAW,CAAEC,KAAF,EAAS,GAAT;AAH7B,GAHsC,EASxC,oBATwC,CAAzC","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createHigherOrderComponent, useDebounce } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\n\n/** @typedef {import('@wordpress/element').WPComponent} WPComponent */\n\n/**\n * A Higher Order Component used to be provide speak and debounced speak\n * functions.\n *\n * @see https://developer.wordpress.org/block-editor/packages/packages-a11y/#speak\n *\n * @param {WPComponent} Component The component to be wrapped.\n *\n * @return {WPComponent} The wrapped component.\n */\nexport default createHigherOrderComponent(\n\t( Component ) => ( props ) =>\n\t\t(\n\t\t\t<Component\n\t\t\t\t{ ...props }\n\t\t\t\tspeak={ speak }\n\t\t\t\tdebouncedSpeak={ useDebounce( speak, 500 ) }\n\t\t\t/>\n\t\t),\n\t'withSpokenMessages'\n);\n"]}
@@ -7,7 +7,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
7
7
  /**
8
8
  * WordPress dependencies
9
9
  */
10
- import { cloneElement, createElement, Component, isValidElement } from '@wordpress/element';
10
+ import { cloneElement, createElement, isValidElement } from '@wordpress/element';
11
11
  import { SVG } from '@wordpress/primitives';
12
12
  /**
13
13
  * Internal dependencies
@@ -35,14 +35,7 @@ function Icon(_ref) {
35
35
  }
36
36
 
37
37
  if ('function' === typeof icon) {
38
- if (icon.prototype instanceof Component) {
39
- return createElement(icon, {
40
- size,
41
- ...additionalProps
42
- });
43
- }
44
-
45
- return icon({
38
+ return createElement(icon, {
46
39
  size,
47
40
  ...additionalProps
48
41
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/icon/index.tsx"],"names":["cloneElement","createElement","Component","isValidElement","SVG","Dashicon","Icon","icon","size","additionalProps","type","prototype","appliedProps","props","width","height"],"mappings":";;AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SACCA,YADD,EAECC,aAFD,EAGCC,SAHD,EAICC,cAJD,QAKO,oBALP;AAMA,SAASC,GAAT,QAAoB,uBAApB;AAEA;AACA;AACA;;AACA,OAAOC,QAAP,MAAqB,aAArB;;AA6BA,SAASC,IAAT,OAIgB;AAAA,MAJI;AACnBC,IAAAA,IAAI,GAAG,IADY;AAEnBC,IAAAA,IAAI,GAAG,aAAa,OAAOD,IAApB,GAA2B,EAA3B,GAAgC,EAFpB;AAGnB,OAAGE;AAHgB,GAIJ;;AACf,MAAK,aAAa,OAAOF,IAAzB,EAAgC;AAC/B,WACC,cAAC,QAAD;AACC,MAAA,IAAI,EAAGA,IADR;AAEC,MAAA,IAAI,EAAGC;AAFR,OAGQC,eAHR,EADD;AAOA;;AAED,MAAKN,cAAc,CAAEI,IAAF,CAAd,IAA0BF,QAAQ,KAAKE,IAAI,CAACG,IAAjD,EAAwD;AACvD,WAAOV,YAAY,CAAEO,IAAF,EAAQ,EAC1B,GAAGE;AADuB,KAAR,CAAnB;AAGA;;AAED,MAAK,eAAe,OAAOF,IAA3B,EAAkC;AACjC,QAAKA,IAAI,CAACI,SAAL,YAA0BT,SAA/B,EAA2C;AAC1C,aAAOD,aAAa,CAAEM,IAAF,EAAQ;AAC3BC,QAAAA,IAD2B;AAE3B,WAAGC;AAFwB,OAAR,CAApB;AAIA;;AAED,WAASF,IAAF,CAA+C;AACrDC,MAAAA,IADqD;AAErD,SAAGC;AAFkD,KAA/C,CAAP;AAIA;;AAED,MAAKF,IAAI,KAAMA,IAAI,CAACG,IAAL,KAAc,KAAd,IAAuBH,IAAI,CAACG,IAAL,KAAcN,GAA3C,CAAT,EAA4D;AAC3D,UAAMQ,YAAY,GAAG,EACpB,GAAGL,IAAI,CAACM,KADY;AAEpBC,MAAAA,KAAK,EAAEN,IAFa;AAGpBO,MAAAA,MAAM,EAAEP,IAHY;AAIpB,SAAGC;AAJiB,KAArB;AAOA,WAAO,cAAC,GAAD,EAAUG,YAAV,CAAP;AACA;;AAED,MAAKT,cAAc,CAAEI,IAAF,CAAnB,EAA8B;AAC7B,WAAOP,YAAY,CAAEO,IAAF,EAAQ;AAC1B;AACAC,MAAAA,IAF0B;AAG1B,SAAGC;AAHuB,KAAR,CAAnB;AAKA;;AAED,SAAOF,IAAP;AACA;;AAED,eAAeD,IAAf","sourcesContent":["/**\n * External dependencies\n */\nimport type { ComponentType, HTMLProps, SVGProps } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tcloneElement,\n\tcreateElement,\n\tComponent,\n\tisValidElement,\n} from '@wordpress/element';\nimport { SVG } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport Dashicon from '../dashicon';\nimport type { IconKey as DashiconIconKey } from '../dashicon/types';\n\nexport type IconType< P > = DashiconIconKey | ComponentType< P > | JSX.Element;\n\ninterface BaseProps< P > {\n\t/**\n\t * The icon to render. Supported values are: Dashicons (specified as\n\t * strings), functions, Component instances and `null`.\n\t *\n\t * @default null\n\t */\n\ticon?: IconType< P > | null;\n\t/**\n\t * The size (width and height) of the icon.\n\t *\n\t * @default `20` when a Dashicon is rendered, `24` for all other icons.\n\t */\n\tsize?: number;\n}\n\ntype AdditionalProps< T > = T extends ComponentType< infer U >\n\t? U\n\t: T extends DashiconIconKey\n\t? SVGProps< SVGSVGElement >\n\t: {};\n\nexport type Props< P > = BaseProps< P > & AdditionalProps< IconType< P > >;\n\nfunction Icon< P >( {\n\ticon = null,\n\tsize = 'string' === typeof icon ? 20 : 24,\n\t...additionalProps\n}: Props< P > ) {\n\tif ( 'string' === typeof icon ) {\n\t\treturn (\n\t\t\t<Dashicon\n\t\t\t\ticon={ icon }\n\t\t\t\tsize={ size }\n\t\t\t\t{ ...( additionalProps as HTMLProps< HTMLSpanElement > ) }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( isValidElement( icon ) && Dashicon === icon.type ) {\n\t\treturn cloneElement( icon, {\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\tif ( 'function' === typeof icon ) {\n\t\tif ( icon.prototype instanceof Component ) {\n\t\t\treturn createElement( icon, {\n\t\t\t\tsize,\n\t\t\t\t...additionalProps,\n\t\t\t} as unknown as P );\n\t\t}\n\n\t\treturn ( icon as ( ...args: any[] ) => JSX.Element )( {\n\t\t\tsize,\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\tif ( icon && ( icon.type === 'svg' || icon.type === SVG ) ) {\n\t\tconst appliedProps = {\n\t\t\t...icon.props,\n\t\t\twidth: size,\n\t\t\theight: size,\n\t\t\t...additionalProps,\n\t\t};\n\n\t\treturn <SVG { ...appliedProps } />;\n\t}\n\n\tif ( isValidElement( icon ) ) {\n\t\treturn cloneElement( icon, {\n\t\t\t// @ts-ignore Just forwarding the size prop along\n\t\t\tsize,\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\treturn icon;\n}\n\nexport default Icon;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/icon/index.tsx"],"names":["cloneElement","createElement","isValidElement","SVG","Dashicon","Icon","icon","size","additionalProps","type","appliedProps","props","width","height"],"mappings":";;AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SACCA,YADD,EAECC,aAFD,EAGCC,cAHD,QAIO,oBAJP;AAKA,SAASC,GAAT,QAAoB,uBAApB;AAEA;AACA;AACA;;AACA,OAAOC,QAAP,MAAqB,aAArB;;AAiCA,SAASC,IAAT,OAIW;AAAA,MAJI;AACdC,IAAAA,IAAI,GAAG,IADO;AAEdC,IAAAA,IAAI,GAAG,aAAa,OAAOD,IAApB,GAA2B,EAA3B,GAAgC,EAFzB;AAGd,OAAGE;AAHW,GAIJ;;AACV,MAAK,aAAa,OAAOF,IAAzB,EAAgC;AAC/B,WACC,cAAC,QAAD;AACC,MAAA,IAAI,EAAGA,IADR;AAEC,MAAA,IAAI,EAAGC;AAFR,OAGQC,eAHR,EADD;AAOA;;AAED,MAAKN,cAAc,CAAEI,IAAF,CAAd,IAA0BF,QAAQ,KAAKE,IAAI,CAACG,IAAjD,EAAwD;AACvD,WAAOT,YAAY,CAAEM,IAAF,EAAQ,EAC1B,GAAGE;AADuB,KAAR,CAAnB;AAGA;;AAED,MAAK,eAAe,OAAOF,IAA3B,EAAkC;AACjC,WAAOL,aAAa,CAAEK,IAAF,EAAQ;AAC3BC,MAAAA,IAD2B;AAE3B,SAAGC;AAFwB,KAAR,CAApB;AAIA;;AAED,MAAKF,IAAI,KAAMA,IAAI,CAACG,IAAL,KAAc,KAAd,IAAuBH,IAAI,CAACG,IAAL,KAAcN,GAA3C,CAAT,EAA4D;AAC3D,UAAMO,YAAY,GAAG,EACpB,GAAGJ,IAAI,CAACK,KADY;AAEpBC,MAAAA,KAAK,EAAEL,IAFa;AAGpBM,MAAAA,MAAM,EAAEN,IAHY;AAIpB,SAAGC;AAJiB,KAArB;AAOA,WAAO,cAAC,GAAD,EAAUE,YAAV,CAAP;AACA;;AAED,MAAKR,cAAc,CAAEI,IAAF,CAAnB,EAA8B;AAC7B,WAAON,YAAY,CAAEM,IAAF,EAAQ;AAC1B;AACAC,MAAAA,IAF0B;AAG1B,SAAGC;AAHuB,KAAR,CAAnB;AAKA;;AAED,SAAOF,IAAP;AACA;;AAED,eAAeD,IAAf","sourcesContent":["/**\n * External dependencies\n */\nimport type { ComponentType, HTMLProps, SVGProps } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tcloneElement,\n\tcreateElement,\n\tisValidElement,\n} from '@wordpress/element';\nimport { SVG } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport Dashicon from '../dashicon';\nimport type { IconKey as DashiconIconKey } from '../dashicon/types';\n\nexport type IconType =\n\t| DashiconIconKey\n\t| ComponentType< { size?: number } >\n\t| ( ( props: { size?: number } ) => JSX.Element )\n\t| JSX.Element;\n\ninterface BaseProps {\n\t/**\n\t * The icon to render. Supported values are: Dashicons (specified as\n\t * strings), functions, Component instances and `null`.\n\t *\n\t * @default null\n\t */\n\ticon?: IconType | null;\n\t/**\n\t * The size (width and height) of the icon.\n\t *\n\t * @default `20` when a Dashicon is rendered, `24` for all other icons.\n\t */\n\tsize?: number;\n}\n\ntype AdditionalProps< T > = T extends ComponentType< infer U >\n\t? U\n\t: T extends DashiconIconKey\n\t? SVGProps< SVGSVGElement >\n\t: {};\n\nexport type Props = BaseProps & AdditionalProps< IconType >;\n\nfunction Icon( {\n\ticon = null,\n\tsize = 'string' === typeof icon ? 20 : 24,\n\t...additionalProps\n}: Props ) {\n\tif ( 'string' === typeof icon ) {\n\t\treturn (\n\t\t\t<Dashicon\n\t\t\t\ticon={ icon }\n\t\t\t\tsize={ size }\n\t\t\t\t{ ...( additionalProps as HTMLProps< HTMLSpanElement > ) }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( isValidElement( icon ) && Dashicon === icon.type ) {\n\t\treturn cloneElement( icon, {\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\tif ( 'function' === typeof icon ) {\n\t\treturn createElement( icon, {\n\t\t\tsize,\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\tif ( icon && ( icon.type === 'svg' || icon.type === SVG ) ) {\n\t\tconst appliedProps = {\n\t\t\t...icon.props,\n\t\t\twidth: size,\n\t\t\theight: size,\n\t\t\t...additionalProps,\n\t\t};\n\n\t\treturn <SVG { ...appliedProps } />;\n\t}\n\n\tif ( isValidElement( icon ) ) {\n\t\treturn cloneElement( icon, {\n\t\t\t// @ts-ignore Just forwarding the size prop along\n\t\t\tsize,\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\treturn icon;\n}\n\nexport default Icon;\n"]}
@@ -13,6 +13,7 @@ export { default as Spinner } from './spinner';
13
13
  export { createSlotFill, Slot, Fill, Provider as SlotFillProvider } from './slot-fill';
14
14
  export { default as __experimentalStyleProvider } from './style-provider';
15
15
  export { default as BaseControl } from './base-control';
16
+ export { hasSplitBorders as __experimentalHasSplitBorders } from './border-box-control/utils';
16
17
  export { default as TextareaControl } from './textarea-control';
17
18
  export { default as PanelBody } from './panel/body';
18
19
  export { default as PanelActions } from './panel/actions';
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/index.native.js"],"names":["SVG","Path","Circle","Polygon","Rect","G","HorizontalRule","BlockQuotation","default","ColorIndicator","ColorPalette","ColorPicker","Dashicon","Dropdown","DropdownMenu","FocalPointPicker","Toolbar","ToolbarButton","ToolbarContext","__experimentalToolbarContext","ToolbarDropdownMenu","ToolbarGroup","ToolbarItem","Tooltip","Icon","Spinner","createSlotFill","Slot","Fill","Provider","SlotFillProvider","__experimentalStyleProvider","BaseControl","TextareaControl","PanelBody","PanelActions","Button","__experimentalText","ExternalLink","TextControl","ToggleControl","SandBox","SearchControl","SelectControl","RangeControl","ResizableBox","FooterMessageControl","ColorControl","QueryControls","Notice","NoticeList","RadioControl","UnitControl","useCustomUnits","__experimentalUseCustomUnits","CSS_UNITS","filterUnitsWithSettings","Disabled","Draggable","DraggableTrigger","withConstrainedTabbing","withFallbackStyles","withFilters","FontSizePicker","withFocusOutside","withFocusReturn","withNotices","withSpokenMessages","__unstableAutocompletionItemsFill","__unstableAutocompletionItemsSlot","Autocomplete","BottomSheet","BottomSheetConsumer","BottomSheetProvider","BottomSheetContext","BottomSheetSelectControl","HTMLTextInput","KeyboardAvoidingView","KeyboardAwareFlatList","Picker","ReadableContentView","CycleSelectControl","Gradient","ColorSettings","SegmentedControls","FocalPointSettingsPanel","BottomSheetTextControl","FooterMessageLink","LinkPicker","LinkPickerScreen","LinkSettings","LinkSettingsScreen","LinkSettingsNavigation","ImageLinkDestinationsScreen","SegmentedControl","Image","IMAGE_DEFAULT_FOCAL_POINT","ImageEditingButton","InserterButton","setClipboard","getClipboard","AudioPlayer","Badge","Gridicons","colorsUtils","WIDE_ALIGNMENTS","ALIGNMENT_BREAKPOINTS","alignmentHelpers","convertUnitToMobile","useConvertUnitToMobile","getValueAndUnit","GlobalStylesContext","useGlobalStyles","withGlobalStyles","getMergedGlobalStyles","getGlobalStyles","getColorsAndGradients","useMobileGlobalStylesColors"],"mappings":"AAAA,SACCA,GADD,EAECC,IAFD,EAGCC,MAHD,EAICC,OAJD,EAKCC,IALD,EAMCC,CAND,EAOCC,cAPD,EAQCC,cARD,QASO,uBATP;AAUA,SAASC,OAAO,IAAIC,cAApB,QAA0C,mBAA1C;AACA,SAASD,OAAO,IAAIE,YAApB,QAAwC,iBAAxC;AACA,SAASC,WAAT,QAA4B,gBAA5B;AACA,SAASH,OAAO,IAAII,QAApB,QAAoC,YAApC;AACA,SAASJ,OAAO,IAAIK,QAApB,QAAoC,YAApC;AACA,SAASL,OAAO,IAAIM,YAApB,QAAwC,iBAAxC;AACA,SAASN,OAAO,IAAIO,gBAApB,QAA4C,sBAA5C;AACA,SACCC,OADD,EAECC,aAFD,EAGCC,cAAc,IAAIC,4BAHnB,EAICC,mBAJD,EAKCC,YALD,EAMCC,WAND,QAOO,WAPP;AAQA,SAASd,OAAO,IAAIe,OAApB,QAAmC,WAAnC;AACA,SAASf,OAAO,IAAIgB,IAApB,QAAgC,QAAhC;AACA,SAAShB,OAAO,IAAIiB,OAApB,QAAmC,WAAnC;AACA,SACCC,cADD,EAECC,IAFD,EAGCC,IAHD,EAICC,QAAQ,IAAIC,gBAJb,QAKO,aALP;AAOA,SAAStB,OAAO,IAAIuB,2BAApB,QAAuD,kBAAvD;AACA,SAASvB,OAAO,IAAIwB,WAApB,QAAuC,gBAAvC;AACA,SAASxB,OAAO,IAAIyB,eAApB,QAA2C,oBAA3C;AACA,SAASzB,OAAO,IAAI0B,SAApB,QAAqC,cAArC;AACA,SAAS1B,OAAO,IAAI2B,YAApB,QAAwC,iBAAxC;AACA,SAAS3B,OAAO,IAAI4B,MAApB,QAAkC,UAAlC;AACA,SAAS5B,OAAO,IAAI6B,kBAApB,QAA8C,QAA9C;AACA,SAAS7B,OAAO,IAAI8B,YAApB,QAAwC,iBAAxC;AACA,SAAS9B,OAAO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uF,KAApB,EAA2BC,yBAA3B,QAA4D,gBAA5D;AACA,SAASxF,OAAO,IAAIyF,kBAApB,QAA8C,qCAA9C;AACA,SAASzF,OAAO,IAAI0F,cAApB,QAA0C,0BAA1C;AACA,SAASC,YAAT,EAAuBC,YAAvB,QAA2C,oBAA3C;AACA,SAAS5F,OAAO,IAAI6F,WAApB,QAAuC,uBAAvC;AACA,SAAS7F,OAAO,IAAI8F,KAApB,QAAiC,gBAAjC;AACA,SAAS9F,OAAO,IAAI+F,SAApB,QAAqC,oBAArC,C,CAEA;;AACA,SAASC,WAAT,QAA4B,+BAA5B;AACA,SACCC,eADD,EAECC,qBAFD,EAGCC,gBAHD,QAIO,2BAJP,C,CAMA;;AACA,SACCC,mBADD,EAECC,sBAFD,EAGCC,eAHD,QAIO,6CAJP;AAMA,SACCtG,OAAO,IAAIuG,mBADZ,EAECC,eAFD,EAGCC,gBAHD,EAICC,qBAJD,QAKO,gCALP;AAMA,SACCC,eADD,EAECC,qBAFD,EAGCC,2BAHD,QAIO,sCAJP","sourcesContent":["export {\n\tSVG,\n\tPath,\n\tCircle,\n\tPolygon,\n\tRect,\n\tG,\n\tHorizontalRule,\n\tBlockQuotation,\n} from '@wordpress/primitives';\nexport { default as ColorIndicator } from './color-indicator';\nexport { default as ColorPalette } from './color-palette';\nexport { ColorPicker } from './color-picker';\nexport { default as Dashicon } from './dashicon';\nexport { default as Dropdown } from './dropdown';\nexport { default as DropdownMenu } from './dropdown-menu';\nexport { default as FocalPointPicker } from './focal-point-picker';\nexport {\n\tToolbar,\n\tToolbarButton,\n\tToolbarContext as __experimentalToolbarContext,\n\tToolbarDropdownMenu,\n\tToolbarGroup,\n\tToolbarItem,\n} from './toolbar';\nexport { default as Tooltip } from './tooltip';\nexport { default as Icon } from './icon';\nexport { default as Spinner } from './spinner';\nexport {\n\tcreateSlotFill,\n\tSlot,\n\tFill,\n\tProvider as SlotFillProvider,\n} from './slot-fill';\n\nexport { default as __experimentalStyleProvider } from './style-provider';\nexport { default as BaseControl } from './base-control';\nexport { default as TextareaControl } from './textarea-control';\nexport { default as PanelBody } from './panel/body';\nexport { default as PanelActions } from './panel/actions';\nexport { default as Button } from './button';\nexport { default as __experimentalText } from './text';\nexport { default as ExternalLink } from './external-link';\nexport { default as TextControl } from './text-control';\nexport { default as ToggleControl } from './toggle-control';\nexport { default as SandBox } from './sandbox';\nexport { default as SearchControl } from './search-control';\nexport { default as SelectControl } from './select-control';\nexport { default as RangeControl } from './range-control';\nexport { default as ResizableBox } from './resizable-box';\nexport { default as FooterMessageControl } from './footer-message-control';\nexport { default as ColorControl } from './color-control';\nexport { default as QueryControls } from './query-controls';\nexport { default as Notice } from './notice';\nexport { default as NoticeList } from './notice/list';\nexport { default as RadioControl } from './radio-control';\nexport {\n\tdefault as UnitControl,\n\tuseCustomUnits as __experimentalUseCustomUnits,\n} from './unit-control';\nexport {\n\tCSS_UNITS as CSS_UNITS,\n\tfilterUnitsWithSettings as filterUnitsWithSettings,\n} from './unit-control/utils';\nexport { default as Disabled } from './disabled';\nexport { default as Draggable, DraggableTrigger } from './draggable';\n\n// Higher-Order Components.\nexport { default as withConstrainedTabbing } from './higher-order/with-constrained-tabbing';\nexport { default as withFallbackStyles } from './higher-order/with-fallback-styles';\nexport { default as withFilters } from './higher-order/with-filters';\nexport { default as FontSizePicker } from './font-size-picker'; // Intentionally called after slot-fill and withFilters.\nexport { default as withFocusOutside } from './higher-order/with-focus-outside';\nexport { default as withFocusReturn } from './higher-order/with-focus-return';\nexport { default as withNotices } from './higher-order/with-notices';\nexport { default as withSpokenMessages } from './higher-order/with-spoken-messages';\nexport * from './text';\n\n// Mobile Components.\nexport {\n\t__unstableAutocompletionItemsFill,\n\t__unstableAutocompletionItemsSlot,\n} from './mobile/autocompletion-items';\nexport { default as Autocomplete } from './autocomplete';\nexport { default as BottomSheet } from './mobile/bottom-sheet';\nexport {\n\tBottomSheetConsumer,\n\tBottomSheetProvider,\n\tBottomSheetContext,\n} from './mobile/bottom-sheet/bottom-sheet-context';\nexport { default as BottomSheetSelectControl } from './mobile/bottom-sheet-select-control';\nexport { default as HTMLTextInput } from './mobile/html-text-input';\nexport { default as KeyboardAvoidingView } from './mobile/keyboard-avoiding-view';\nexport { default as KeyboardAwareFlatList } from './mobile/keyboard-aware-flat-list';\nexport { default as Picker } from './mobile/picker';\nexport { default as ReadableContentView } from './mobile/readable-content-view';\nexport { default as CycleSelectControl } from './mobile/cycle-select-control';\nexport { default as Gradient } from './mobile/gradient';\nexport { default as ColorSettings } from './mobile/color-settings';\nexport { default as SegmentedControls } from './mobile/segmented-control';\nexport { default as FocalPointSettingsPanel } from './mobile/focal-point-settings-panel';\nexport { default as BottomSheetTextControl } from './mobile/bottom-sheet-text-control';\nexport { default as FooterMessageLink } from './mobile/bottom-sheet/footer-message-link/footer-message-link';\nexport { LinkPicker } from './mobile/link-picker';\nexport { default as LinkPickerScreen } from './mobile/link-picker/link-picker-screen';\nexport { default as LinkSettings } from './mobile/link-settings';\nexport { default as LinkSettingsScreen } from './mobile/link-settings/link-settings-screen';\nexport { default as LinkSettingsNavigation } from './mobile/link-settings/link-settings-navigation';\nexport { default as ImageLinkDestinationsScreen } from './mobile/link-settings/image-link-destinations-screen';\nexport { default as SegmentedControl } from './mobile/segmented-control';\nexport { default as Image, IMAGE_DEFAULT_FOCAL_POINT } from './mobile/image';\nexport { default as ImageEditingButton } from './mobile/image/image-editing-button';\nexport { default as InserterButton } from './mobile/inserter-button';\nexport { setClipboard, getClipboard } from './mobile/clipboard';\nexport { default as AudioPlayer } from './mobile/audio-player';\nexport { default as Badge } from './mobile/badge';\nexport { default as Gridicons } from './mobile/gridicons';\n\n// Utils.\nexport { colorsUtils } from './mobile/color-settings/utils';\nexport {\n\tWIDE_ALIGNMENTS,\n\tALIGNMENT_BREAKPOINTS,\n\talignmentHelpers,\n} from './mobile/utils/alignments';\n\n// Hooks.\nexport {\n\tconvertUnitToMobile,\n\tuseConvertUnitToMobile,\n\tgetValueAndUnit,\n} from './mobile/utils/use-unit-converter-to-mobile';\n\nexport {\n\tdefault as GlobalStylesContext,\n\tuseGlobalStyles,\n\twithGlobalStyles,\n\tgetMergedGlobalStyles,\n} from './mobile/global-styles-context';\nexport {\n\tgetGlobalStyles,\n\tgetColorsAndGradients,\n\tuseMobileGlobalStylesColors,\n} from './mobile/global-styles-context/utils';\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/index.native.js"],"names":["SVG","Path","Circle","Polygon","Rect","G","HorizontalRule","BlockQuotation","default","ColorIndicator","ColorPalette","ColorPicker","Dashicon","Dropdown","DropdownMenu","FocalPointPicker","Toolbar","ToolbarButton","ToolbarContext","__experimentalToolbarContext","ToolbarDropdownMenu","ToolbarGroup","ToolbarItem","Tooltip","Icon","Spinner","createSlotFill","Slot","Fill","Provider","SlotFillProvider","__experimentalStyleProvider","BaseControl","hasSplitBorders","__experimentalHasSplitBorders","TextareaControl","PanelBody","PanelActions","Button","__experimentalText","ExternalLink","TextControl","ToggleControl","SandBox","SearchControl","SelectControl","RangeControl","ResizableBox","FooterMessageControl","ColorControl","QueryControls","Notice","NoticeList","RadioControl","UnitControl","useCustomUnits","__experimentalUseCustomUnits","CSS_UNITS","filterUnitsWithSettings","Disabled","Draggable","DraggableTrigger","withConstrainedTabbing","withFallbackStyles","withFilters","FontSizePicker","withFocusOutside","withFocusReturn","withNotices","withSpokenMessages","__unstableAutocompletionItemsFill","__unstableAutocompletionItemsSlot","Autocomplete","BottomSheet","BottomSheetConsumer","BottomSheetProvider","BottomSheetContext","BottomSheetSelectControl","HTMLTextInput","KeyboardAvoidingView","KeyboardAwareFlatList","Picker","ReadableContentView","CycleSelectControl","Gradient","ColorSettings","SegmentedControls","FocalPointSettingsPanel","BottomSheetTextControl","FooterMessageLink","LinkPicker","LinkPickerScreen","LinkSettings","LinkSettingsScreen","LinkSettingsNavigation","ImageLinkDestinationsScreen","SegmentedControl","Image","IMAGE_DEFAULT_FOCAL_POINT","ImageEditingButton","InserterButton","setClipboard","getClipboard","AudioPlayer","Badge","Gridicons","colorsUtils","WIDE_ALIGNMENTS","ALIGNMENT_BREAKPOINTS","alignmentHelpers","convertUnitToMobile","useConvertUnitToMobile","getValueAndUnit","GlobalStylesContext","useGlobalStyles","withGlobalStyles","getMergedGlobalStyles","getGlobalStyles","getColorsAndGradients","useMobileGlobalStylesColors"],"mappings":"AAAA,SACCA,GADD,EAECC,IAFD,EAGCC,MAHD,EAICC,OAJD,EAKCC,IALD,EAMCC,CAND,EAOCC,cAPD,EAQCC,cARD,QASO,uBATP;AAUA,SAASC,OAAO,IAAIC,cAApB,QAA0C,mBAA1C;AACA,SAASD,OAAO,IAAIE,YAApB,QAAwC,iBAAxC;AACA,SAASC,WAAT,QAA4B,gBAA5B;AACA,SAASH,OAAO,IAAII,QAApB,QAAoC,YAApC;AACA,SAASJ,OAAO,IAAIK,QAApB,QAAoC,YAApC;AACA,SAASL,OAAO,IAAIM,YAApB,QAAwC,iBAAxC;AACA,SAASN,OAAO,IAAIO,gBAApB,QAA4C,sBAA5C;AACA,SACCC,OADD,EAECC,aAFD,EAGCC,cAAc,IAAIC,4BAHnB,EAICC,mBAJD,EAKCC,YALD,EAMCC,WAND,QAOO,WAPP;AAQA,SAASd,OAAO,IAAIe,OAApB,QAAmC,WAAnC;AACA,SAASf,OAAO,IAAIgB,IAApB,QAAgC,QAAhC;AACA,SAAShB,OAAO,IAAIiB,OAApB,QAAmC,WAAnC;AACA,SACCC,cADD,EAECC,IAFD,EAGCC,IAHD,EAICC,QAAQ,IAAIC,gBAJb,QAKO,aALP;AAOA,SAAStB,OAAO,IAAIuB,2BAApB,QAAuD,kBAAvD;AACA,SAASvB,OAAO,IAAIwB,WAApB,QAAuC,gBAAvC;AACA,SAASC,eAAe,IAAIC,6BAA5B,QAAiE,4BAAjE;AACA,SAAS1B,OAAO,IAAI2B,eAApB,QAA2C,oBAA3C;AACA,SAAS3B,OAAO,IAAI4B,SAApB,QAAqC,cAArC;AACA,SAAS5B,OAAO,IAAI6B,YAApB,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8C,6CAA9C;AACA,SAASrF,OAAO,IAAIsF,sBAApB,QAAkD,iDAAlD;AACA,SAAStF,OAAO,IAAIuF,2BAApB,QAAuD,uDAAvD;AACA,SAASvF,OAAO,IAAIwF,gBAApB,QAA4C,4BAA5C;AACA,SAASxF,OAAO,IAAIyF,KAApB,EAA2BC,yBAA3B,QAA4D,gBAA5D;AACA,SAAS1F,OAAO,IAAI2F,kBAApB,QAA8C,qCAA9C;AACA,SAAS3F,OAAO,IAAI4F,cAApB,QAA0C,0BAA1C;AACA,SAASC,YAAT,EAAuBC,YAAvB,QAA2C,oBAA3C;AACA,SAAS9F,OAAO,IAAI+F,WAApB,QAAuC,uBAAvC;AACA,SAAS/F,OAAO,IAAIgG,KAApB,QAAiC,gBAAjC;AACA,SAAShG,OAAO,IAAIiG,SAApB,QAAqC,oBAArC,C,CAEA;;AACA,SAASC,WAAT,QAA4B,+BAA5B;AACA,SACCC,eADD,EAECC,qBAFD,EAGCC,gBAHD,QAIO,2BAJP,C,CAMA;;AACA,SACCC,mBADD,EAECC,sBAFD,EAGCC,eAHD,QAIO,6CAJP;AAMA,SACCxG,OAAO,IAAIyG,mBADZ,EAECC,eAFD,EAGCC,gBAHD,EAICC,qBAJD,QAKO,gCALP;AAMA,SACCC,eADD,EAECC,qBAFD,EAGCC,2BAHD,QAIO,sCAJP","sourcesContent":["export {\n\tSVG,\n\tPath,\n\tCircle,\n\tPolygon,\n\tRect,\n\tG,\n\tHorizontalRule,\n\tBlockQuotation,\n} from '@wordpress/primitives';\nexport { default as ColorIndicator } from './color-indicator';\nexport { default as ColorPalette } from './color-palette';\nexport { ColorPicker } from './color-picker';\nexport { default as Dashicon } from './dashicon';\nexport { default as Dropdown } from './dropdown';\nexport { default as DropdownMenu } from './dropdown-menu';\nexport { default as FocalPointPicker } from './focal-point-picker';\nexport {\n\tToolbar,\n\tToolbarButton,\n\tToolbarContext as __experimentalToolbarContext,\n\tToolbarDropdownMenu,\n\tToolbarGroup,\n\tToolbarItem,\n} from './toolbar';\nexport { default as Tooltip } from './tooltip';\nexport { default as Icon } from './icon';\nexport { default as Spinner } from './spinner';\nexport {\n\tcreateSlotFill,\n\tSlot,\n\tFill,\n\tProvider as SlotFillProvider,\n} from './slot-fill';\n\nexport { default as __experimentalStyleProvider } from './style-provider';\nexport { default as BaseControl } from './base-control';\nexport { hasSplitBorders as __experimentalHasSplitBorders } from './border-box-control/utils';\nexport { default as TextareaControl } from './textarea-control';\nexport { default as PanelBody } from './panel/body';\nexport { default as PanelActions } from './panel/actions';\nexport { default as Button } from './button';\nexport { default as __experimentalText } from './text';\nexport { default as ExternalLink } from './external-link';\nexport { default as TextControl } from './text-control';\nexport { default as ToggleControl } from './toggle-control';\nexport { default as SandBox } from './sandbox';\nexport { default as SearchControl } from './search-control';\nexport { default as SelectControl } from './select-control';\nexport { default as RangeControl } from './range-control';\nexport { default as ResizableBox } from './resizable-box';\nexport { default as FooterMessageControl } from './footer-message-control';\nexport { default as ColorControl } from './color-control';\nexport { default as QueryControls } from './query-controls';\nexport { default as Notice } from './notice';\nexport { default as NoticeList } from './notice/list';\nexport { default as RadioControl } from './radio-control';\nexport {\n\tdefault as UnitControl,\n\tuseCustomUnits as __experimentalUseCustomUnits,\n} from './unit-control';\nexport {\n\tCSS_UNITS as CSS_UNITS,\n\tfilterUnitsWithSettings as filterUnitsWithSettings,\n} from './unit-control/utils';\nexport { default as Disabled } from './disabled';\nexport { default as Draggable, DraggableTrigger } from './draggable';\n\n// Higher-Order Components.\nexport { default as withConstrainedTabbing } from './higher-order/with-constrained-tabbing';\nexport { default as withFallbackStyles } from './higher-order/with-fallback-styles';\nexport { default as withFilters } from './higher-order/with-filters';\nexport { default as FontSizePicker } from './font-size-picker'; // Intentionally called after slot-fill and withFilters.\nexport { default as withFocusOutside } from './higher-order/with-focus-outside';\nexport { default as withFocusReturn } from './higher-order/with-focus-return';\nexport { default as withNotices } from './higher-order/with-notices';\nexport { default as withSpokenMessages } from './higher-order/with-spoken-messages';\nexport * from './text';\n\n// Mobile Components.\nexport {\n\t__unstableAutocompletionItemsFill,\n\t__unstableAutocompletionItemsSlot,\n} from './mobile/autocompletion-items';\nexport { default as Autocomplete } from './autocomplete';\nexport { default as BottomSheet } from './mobile/bottom-sheet';\nexport {\n\tBottomSheetConsumer,\n\tBottomSheetProvider,\n\tBottomSheetContext,\n} from './mobile/bottom-sheet/bottom-sheet-context';\nexport { default as BottomSheetSelectControl } from './mobile/bottom-sheet-select-control';\nexport { default as HTMLTextInput } from './mobile/html-text-input';\nexport { default as KeyboardAvoidingView } from './mobile/keyboard-avoiding-view';\nexport { default as KeyboardAwareFlatList } from './mobile/keyboard-aware-flat-list';\nexport { default as Picker } from './mobile/picker';\nexport { default as ReadableContentView } from './mobile/readable-content-view';\nexport { default as CycleSelectControl } from './mobile/cycle-select-control';\nexport { default as Gradient } from './mobile/gradient';\nexport { default as ColorSettings } from './mobile/color-settings';\nexport { default as SegmentedControls } from './mobile/segmented-control';\nexport { default as FocalPointSettingsPanel } from './mobile/focal-point-settings-panel';\nexport { default as BottomSheetTextControl } from './mobile/bottom-sheet-text-control';\nexport { default as FooterMessageLink } from './mobile/bottom-sheet/footer-message-link/footer-message-link';\nexport { LinkPicker } from './mobile/link-picker';\nexport { default as LinkPickerScreen } from './mobile/link-picker/link-picker-screen';\nexport { default as LinkSettings } from './mobile/link-settings';\nexport { default as LinkSettingsScreen } from './mobile/link-settings/link-settings-screen';\nexport { default as LinkSettingsNavigation } from './mobile/link-settings/link-settings-navigation';\nexport { default as ImageLinkDestinationsScreen } from './mobile/link-settings/image-link-destinations-screen';\nexport { default as SegmentedControl } from './mobile/segmented-control';\nexport { default as Image, IMAGE_DEFAULT_FOCAL_POINT } from './mobile/image';\nexport { default as ImageEditingButton } from './mobile/image/image-editing-button';\nexport { default as InserterButton } from './mobile/inserter-button';\nexport { setClipboard, getClipboard } from './mobile/clipboard';\nexport { default as AudioPlayer } from './mobile/audio-player';\nexport { default as Badge } from './mobile/badge';\nexport { default as Gridicons } from './mobile/gridicons';\n\n// Utils.\nexport { colorsUtils } from './mobile/color-settings/utils';\nexport {\n\tWIDE_ALIGNMENTS,\n\tALIGNMENT_BREAKPOINTS,\n\talignmentHelpers,\n} from './mobile/utils/alignments';\n\n// Hooks.\nexport {\n\tconvertUnitToMobile,\n\tuseConvertUnitToMobile,\n\tgetValueAndUnit,\n} from './mobile/utils/use-unit-converter-to-mobile';\n\nexport {\n\tdefault as GlobalStylesContext,\n\tuseGlobalStyles,\n\twithGlobalStyles,\n\tgetMergedGlobalStyles,\n} from './mobile/global-styles-context';\nexport {\n\tgetGlobalStyles,\n\tgetColorsAndGradients,\n\tuseMobileGlobalStylesColors,\n} from './mobile/global-styles-context/utils';\n"]}
@@ -189,7 +189,7 @@ class BottomSheetCell extends Component {
189
189
  // and the Text component to display it.
190
190
  // We also show the TextInput to display placeholder.
191
191
 
192
- const shouldShowPlaceholder = isValueEditable && value === '';
192
+ const shouldShowPlaceholder = isInteractive && value === '';
193
193
  return this.state.isEditingValue || shouldShowPlaceholder ? createElement(TextInput, _extends({
194
194
  ref: c => this._valueTextInput = c,
195
195
  numberOfLines: 1,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/mobile/bottom-sheet/cell.native.js"],"names":["TouchableOpacity","Text","View","TextInput","I18nManager","AccessibilityInfo","Platform","isEmpty","get","Icon","check","Component","__","_x","sprintf","withPreferredColorScheme","styles","platformStyles","TouchableRipple","isIOS","OS","BottomSheetCell","constructor","props","arguments","state","isEditingValue","autoFocus","isScreenReaderEnabled","handleScreenReaderToggled","bind","isCurrent","componentDidUpdate","prevProps","prevState","_valueTextInput","focus","componentDidMount","a11yInfoChangeSubscription","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","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","separatorMarginLeft","getValueComponent","styleRTL","isRTL","cellValueRTL","cellValueStyle","cellValue","finalStyle","shouldShowPlaceholder","c","getAccessibilityLabel","iconStyleBase","iconDark","resetButtonStyle","resetButton","resetButtonDark","cellHelpStyle","cellHelpLabel","cellHelpLabelIOS","containerPointerEvents","title","handler","opacity","clipToBounds","cellRowIcon","color","labelIconSeparator","placeholderColor"],"mappings":";;;AAAA;AACA;AACA;AACA,SACCA,gBADD,EAECC,IAFD,EAGCC,IAHD,EAICC,SAJD,EAKCC,WALD,EAMCC,iBAND,EAOCC,QAPD,QAQO,cARP;AASA,SAASC,OAAT,EAAkBC,GAAlB,QAA6B,QAA7B;AAEA;AACA;AACA;;AACA,SAASC,IAAT,QAAqB,uBAArB;AACA,SAASC,KAAT,QAAsB,kBAAtB;AACA,SAASC,SAAT,QAA0B,oBAA1B;AACA,SAASC,EAAT,EAAaC,EAAb,EAAiBC,OAAjB,QAAgC,iBAAhC;AACA,SAASC,wBAAT,QAAyC,oBAAzC;AAEA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,eAAnB;AACA,OAAOC,cAAP,MAA2B,mBAA3B;AACA,OAAOC,eAAP,MAA4B,UAA5B;AAEA,MAAMC,KAAK,GAAGb,QAAQ,CAACc,EAAT,KAAgB,KAA9B;;AACA,MAA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1BF,EAwCG,CAAEA,QAAF,IAAcD,KAAd,IACD,cAAC,IAAD;AACC,MAAA,KAAK,EAAG,CAAEkC,iBAAF,EAAqB3B,UAArB;AADT,OAGGP,KAHH,CAzCF,CADD,EAiDGmB,kBAAkB,IACnB,cAAC,gBAAD;AACC,MAAA,OAAO,EAAG0D,OADX;AAEC,MAAA,iBAAiB,EAAG;AAFrB,OAIC,cAAC,IAAD;AAAM,MAAA,KAAK,EAAGR;AAAd,OACGO,KADH,CAJD,CAlDF,CAJD,EAgEG7D,UAAU,IACX,cAAC,IAAD;AACC,MAAA,IAAI,EAAGhE,KADR;AAEC,MAAA,IAAI,EAAGO,cAAc,CAACyD,UAAf,CAA0BkE;AAFlC,MAjEF,EAsEG1D,SAAS,IAAIkC,iBAAiB,EAtEjC,EAuEG5C,QAvEH,CAtBD,EA+FGQ,IAAI,IACL,cAAC,IAAD;AAAM,MAAA,KAAK,EAAG,CAAEmD,aAAF,EAAiBnH,MAAM,CAAC8H,gBAAxB;AAAd,OACG9D,IADH,CAhGF,EAoGG,CAAEmB,gBAAF,IAAsB,cAAC,IAAD;AAAM,MAAA,KAAK,EAAGD,cAAc;AAA5B,MApGzB,CADD;AAwGA;;AAhZsC;;AAmZxC,eAAenF,wBAAwB,CAAEM,eAAF,CAAvC","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 =\n\t\t\tthis.handleScreenReaderToggled.bind( this );\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 && isScreenReaderEnabled ) {\n\t\t\t\t\tthis.setState( { isScreenReaderEnabled } );\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.isCurrent = false;\n\t\tthis.a11yInfoChangeSubscription.remove();\n\t}\n\n\thandleScreenReaderToggled( isScreenReaderEnabled ) {\n\t\tthis.setState( { isScreenReaderEnabled } );\n\t}\n\n\ttypeToKeyboardType( type, step ) {\n\t\tlet keyboardType = `default`;\n\t\tif ( type === `number` ) {\n\t\t\tif ( step && Math.abs( step ) < 1 ) {\n\t\t\t\tkeyboardType = `decimal-pad`;\n\t\t\t} else {\n\t\t\t\tkeyboardType = `number-pad`;\n\t\t\t}\n\t\t}\n\t\treturn keyboardType;\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\taccessible,\n\t\t\taccessibilityLabel,\n\t\t\taccessibilityHint,\n\t\t\taccessibilityRole,\n\t\t\tdisabled = false,\n\t\t\tactiveOpacity,\n\t\t\tonPress,\n\t\t\tonLongPress,\n\t\t\tlabel,\n\t\t\tsubLabel,\n\t\t\tvalue,\n\t\t\tvaluePlaceholder = '',\n\t\t\ticon,\n\t\t\tleftAlign,\n\t\t\ticonStyle = {},\n\t\t\tlabelStyle = {},\n\t\t\tvalueStyle = {},\n\t\t\tcellContainerStyle = {},\n\t\t\tcellRowContainerStyle = {},\n\t\t\tonChangeValue,\n\t\t\tonSubmit,\n\t\t\tchildren,\n\t\t\teditable = true,\n\t\t\tisSelected = false,\n\t\t\tseparatorType,\n\t\t\tstyle = {},\n\t\t\tgetStylesFromColorScheme,\n\t\t\tcustomActionButton,\n\t\t\ttype,\n\t\t\tstep,\n\t\t\tborderless,\n\t\t\thelp,\n\t\t\t...valueProps\n\t\t} = this.props;\n\n\t\tconst showValue = value !== undefined;\n\t\tconst isValueEditable = editable && onChangeValue !== undefined;\n\t\tconst cellLabelStyle = getStylesFromColorScheme(\n\t\t\tstyles.cellLabel,\n\t\t\tstyles.cellTextDark\n\t\t);\n\t\tconst cellLabelCenteredStyle = getStylesFromColorScheme(\n\t\t\tstyles.cellLabelCentered,\n\t\t\tstyles.cellTextDark\n\t\t);\n\t\tconst cellLabelLeftAlignNoIconStyle = getStylesFromColorScheme(\n\t\t\tstyles.cellLabelLeftAlignNoIcon,\n\t\t\tstyles.cellTextDark\n\t\t);\n\t\tconst defaultMissingIconAndValue = leftAlign\n\t\t\t? cellLabelLeftAlignNoIconStyle\n\t\t\t: cellLabelCenteredStyle;\n\t\tconst defaultLabelStyle =\n\t\t\tshowValue || customActionButton || icon\n\t\t\t\t? cellLabelStyle\n\t\t\t\t: defaultMissingIconAndValue;\n\n\t\tconst defaultSubLabelStyleText = getStylesFromColorScheme(\n\t\t\tstyles.cellSubLabelText,\n\t\t\tstyles.cellSubLabelTextDark\n\t\t);\n\n\t\tconst drawSeparator =\n\t\t\t( separatorType && separatorType !== 'none' ) ||\n\t\t\tseparatorStyle === undefined;\n\t\tconst drawTopSeparator =\n\t\t\tdrawSeparator && separatorType === 'topFullWidth';\n\n\t\tconst cellContainerStyles = [\n\t\t\tstyles.cellContainer,\n\t\t\tcellContainerStyle,\n\t\t];\n\t\tconst rowContainerStyles = [\n\t\t\tstyles.cellRowContainer,\n\t\t\tcellRowContainerStyle,\n\t\t];\n\n\t\tconst isInteractive =\n\t\t\tisValueEditable ||\n\t\t\tonPress !== undefined ||\n\t\t\tonLongPress !== undefined;\n\n\t\tconst onCellPress = () => {\n\t\t\tif ( isValueEditable ) {\n\t\t\t\tstartEditing();\n\t\t\t} else if ( onPress !== undefined ) {\n\t\t\t\tonPress();\n\t\t\t}\n\t\t};\n\n\t\tconst finishEditing = () => {\n\t\t\tthis.setState( { isEditingValue: false } );\n\t\t};\n\n\t\tconst startEditing = () => {\n\t\t\tif ( this.state.isEditingValue === false ) {\n\t\t\t\tthis.setState( { isEditingValue: true } );\n\t\t\t}\n\t\t};\n\n\t\tconst separatorStyle = () => {\n\t\t\t// eslint-disable-next-line @wordpress/no-unused-vars-before-return\n\t\t\tconst defaultSeparatorStyle = this.props.getStylesFromColorScheme(\n\t\t\t\tstyles.separator,\n\t\t\t\tstyles.separatorDark\n\t\t\t);\n\t\t\tconst cellSeparatorStyle = this.props.getStylesFromColorScheme(\n\t\t\t\tstyles.cellSeparator,\n\t\t\t\tstyles.cellSeparatorDark\n\t\t\t);\n\t\t\tconst leftMarginStyle = {\n\t\t\t\t...cellSeparatorStyle,\n\t\t\t\t...platformStyles.separatorMarginLeft,\n\t\t\t};\n\t\t\tswitch ( separatorType ) {\n\t\t\t\tcase 'leftMargin':\n\t\t\t\t\treturn leftMarginStyle;\n\t\t\t\tcase 'fullWidth':\n\t\t\t\tcase 'topFullWidth':\n\t\t\t\t\treturn defaultSeparatorStyle;\n\t\t\t\tcase 'none':\n\t\t\t\t\treturn undefined;\n\t\t\t\tcase undefined:\n\t\t\t\t\tif ( showValue && icon ) {\n\t\t\t\t\t\treturn leftMarginStyle;\n\t\t\t\t\t}\n\t\t\t\t\treturn defaultSeparatorStyle;\n\t\t\t}\n\t\t};\n\n\t\tconst getValueComponent = () => {\n\t\t\tconst styleRTL = I18nManager.isRTL && styles.cellValueRTL;\n\t\t\tconst cellValueStyle = this.props.getStylesFromColorScheme(\n\t\t\t\tstyles.cellValue,\n\t\t\t\tstyles.cellTextDark\n\t\t\t);\n\t\t\tconst finalStyle = {\n\t\t\t\t...cellValueStyle,\n\t\t\t\t...valueStyle,\n\t\t\t\t...styleRTL,\n\t\t\t};\n\n\t\t\t// To be able to show the `middle` ellipsizeMode on editable cells\n\t\t\t// we show the TextInput just when the user wants to edit the value,\n\t\t\t// and the Text component to display it.\n\t\t\t// We also show the TextInput to display placeholder.\n\t\t\tconst shouldShowPlaceholder = isValueEditable && value === '';\n\t\t\treturn this.state.isEditingValue || shouldShowPlaceholder ? (\n\t\t\t\t<TextInput\n\t\t\t\t\tref={ ( c ) => ( this._valueTextInput = c ) }\n\t\t\t\t\tnumberOfLines={ 1 }\n\t\t\t\t\tstyle={ finalStyle }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tplaceholder={ valuePlaceholder }\n\t\t\t\t\tplaceholderTextColor={ '#87a6bc' }\n\t\t\t\t\tonChangeText={ onChangeValue }\n\t\t\t\t\teditable={ isValueEditable }\n\t\t\t\t\tpointerEvents={\n\t\t\t\t\t\tthis.state.isEditingValue ? 'auto' : 'none'\n\t\t\t\t\t}\n\t\t\t\t\tonFocus={ startEditing }\n\t\t\t\t\tonBlur={ finishEditing }\n\t\t\t\t\tonSubmitEditing={ onSubmit }\n\t\t\t\t\tkeyboardType={ this.typeToKeyboardType( type, step ) }\n\t\t\t\t\t{ ...valueProps }\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<Text\n\t\t\t\t\tstyle={ { ...cellValueStyle, ...valueStyle } }\n\t\t\t\t\tnumberOfLines={ 1 }\n\t\t\t\t\tellipsizeMode={ 'middle' }\n\t\t\t\t>\n\t\t\t\t\t{ value }\n\t\t\t\t</Text>\n\t\t\t);\n\t\t};\n\n\t\tconst getAccessibilityLabel = () => {\n\t\t\tif ( accessible === false ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( accessibilityLabel || ! showValue ) {\n\t\t\t\treturn accessibilityLabel || label;\n\t\t\t}\n\n\t\t\tif ( isEmpty( value ) ) {\n\t\t\t\treturn isEmpty( help )\n\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t/* translators: accessibility text. Empty state of a inline textinput cell. %s: The cell's title */\n\t\t\t\t\t\t\t_x( '%s. Empty', 'inline textinput cell' ),\n\t\t\t\t\t\t\tlabel\n\t\t\t\t\t )\n\t\t\t\t\t: // Separating by ',' is necessary to make a pause on urls (non-capitalized text)\n\t\t\t\t\t sprintf(\n\t\t\t\t\t\t\t/* translators: accessibility text. Empty state of a inline textinput cell. %1: Cell title, %2: cell help. */\n\t\t\t\t\t\t\t_x( '%1$s, %2$s. Empty', 'inline textinput cell' ),\n\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\thelp\n\t\t\t\t\t );\n\t\t\t}\n\t\t\treturn isEmpty( help )\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t/* translators: accessibility text. Inline textinput title and value.%1: Cell title, %2: cell value. */\n\t\t\t\t\t\t_x( '%1$s, %2$s', 'inline textinput cell' ),\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t\tvalue\n\t\t\t\t ) // Separating by ',' is necessary to make a pause on urls (non-capitalized text)\n\t\t\t\t: sprintf(\n\t\t\t\t\t\t/* translators: accessibility text. Inline textinput title, value and help text.%1: Cell title, %2: cell value, , %3: cell help. */\n\t\t\t\t\t\t_x( '%1$s, %2$s, %3$s', 'inline textinput cell' ),\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\thelp\n\t\t\t\t );\n\t\t};\n\n\t\tconst iconStyleBase = getStylesFromColorScheme(\n\t\t\tstyles.icon,\n\t\t\tstyles.iconDark\n\t\t);\n\t\tconst resetButtonStyle = getStylesFromColorScheme(\n\t\t\tstyles.resetButton,\n\t\t\tstyles.resetButtonDark\n\t\t);\n\t\tconst cellHelpStyle = [\n\t\t\tstyles.cellHelpLabel,\n\t\t\tisIOS && styles.cellHelpLabelIOS,\n\t\t];\n\t\tconst containerPointerEvents =\n\t\t\tthis.state.isScreenReaderEnabled && accessible ? 'none' : 'auto';\n\t\tconst { title, handler } = customActionButton || {};\n\n\t\tconst opacity =\n\t\t\tactiveOpacity !== undefined\n\t\t\t\t? activeOpacity\n\t\t\t\t: get( platformStyles, 'activeOpacity.opacity' );\n\n\t\treturn (\n\t\t\t<TouchableRipple\n\t\t\t\taccessible={\n\t\t\t\t\taccessible !== undefined\n\t\t\t\t\t\t? accessible\n\t\t\t\t\t\t: ! this.state.isEditingValue\n\t\t\t\t}\n\t\t\t\taccessibilityLabel={ getAccessibilityLabel() }\n\t\t\t\taccessibilityRole={ accessibilityRole || 'button' }\n\t\t\t\taccessibilityHint={\n\t\t\t\t\tisValueEditable\n\t\t\t\t\t\t? /* translators: accessibility text */\n\t\t\t\t\t\t __( 'Double tap to edit this value' )\n\t\t\t\t\t\t: accessibilityHint\n\t\t\t\t}\n\t\t\t\tdisabled={ disabled || ! isInteractive }\n\t\t\t\tactiveOpacity={ opacity }\n\t\t\t\tonPress={ onCellPress }\n\t\t\t\tonLongPress={ onLongPress }\n\t\t\t\tstyle={ [ styles.clipToBounds, style ] }\n\t\t\t\tborderless={ borderless }\n\t\t\t>\n\t\t\t\t{ drawTopSeparator && <View style={ separatorStyle() } /> }\n\t\t\t\t<View\n\t\t\t\t\tstyle={ cellContainerStyles }\n\t\t\t\t\tpointerEvents={ containerPointerEvents }\n\t\t\t\t>\n\t\t\t\t\t<View style={ rowContainerStyles }>\n\t\t\t\t\t\t<View style={ styles.cellRowContainer }>\n\t\t\t\t\t\t\t{ icon && (\n\t\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\t\tstyle={ [\n\t\t\t\t\t\t\t\t\t\tstyles.cellRowContainer,\n\t\t\t\t\t\t\t\t\t\tstyles.cellRowIcon,\n\t\t\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t\t\t\t\t\tfill={\n\t\t\t\t\t\t\t\t\t\t\ticonStyle.color ||\n\t\t\t\t\t\t\t\t\t\t\ticonStyleBase.color\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tstyle={ iconStyle }\n\t\t\t\t\t\t\t\t\t\tisPressed={ false }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t\t\tplatformStyles.labelIconSeparator\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ subLabel && label && (\n\t\t\t\t\t\t\t\t<View>\n\t\t\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\t\t\tstyle={ [\n\t\t\t\t\t\t\t\t\t\t\tdefaultLabelStyle,\n\t\t\t\t\t\t\t\t\t\t\tlabelStyle,\n\t\t\t\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t<Text style={ defaultSubLabelStyleText }>\n\t\t\t\t\t\t\t\t\t\t{ subLabel }\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ ! subLabel && label && (\n\t\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\t\tstyle={ [ defaultLabelStyle, labelStyle ] }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</View>\n\t\t\t\t\t\t{ customActionButton && (\n\t\t\t\t\t\t\t<TouchableOpacity\n\t\t\t\t\t\t\t\tonPress={ handler }\n\t\t\t\t\t\t\t\taccessibilityRole={ 'button' }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Text style={ resetButtonStyle }>\n\t\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t</TouchableOpacity>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</View>\n\t\t\t\t\t{ isSelected && (\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\ticon={ check }\n\t\t\t\t\t\t\tfill={ platformStyles.isSelected.color }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showValue && getValueComponent() }\n\t\t\t\t\t{ children }\n\t\t\t\t</View>\n\t\t\t\t{ help && (\n\t\t\t\t\t<Text style={ [ cellHelpStyle, styles.placeholderColor ] }>\n\t\t\t\t\t\t{ help }\n\t\t\t\t\t</Text>\n\t\t\t\t) }\n\t\t\t\t{ ! drawTopSeparator && <View style={ separatorStyle() } /> }\n\t\t\t</TouchableRipple>\n\t\t);\n\t}\n}\n\nexport default withPreferredColorScheme( BottomSheetCell );\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/mobile/bottom-sheet/cell.native.js"],"names":["TouchableOpacity","Text","View","TextInput","I18nManager","AccessibilityInfo","Platform","isEmpty","get","Icon","check","Component","__","_x","sprintf","withPreferredColorScheme","styles","platformStyles","TouchableRipple","isIOS","OS","BottomSheetCell","constructor","props","arguments","state","isEditingValue","autoFocus","isScreenReaderEnabled","handleScreenReaderToggled","bind","isCurrent","componentDidUpdate","prevProps","prevState","_valueTextInput","focus","componentDidMount","a11yInfoChangeSubscription","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","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","separatorMarginLeft","getValueComponent","styleRTL","isRTL","cellValueRTL","cellValueStyle","cellValue","finalStyle","shouldShowPlaceholder","c","getAccessibilityLabel","iconStyleBase","iconDark","resetButtonStyle","resetButton","resetButtonDark","cellHelpStyle","cellHelpLabel","cellHelpLabelIOS","containerPointerEvents","title","handler","opacity","clipToBounds","cellRowIcon","color","labelIconSeparator","placeholderColor"],"mappings":";;;AAAA;AACA;AACA;AACA,SACCA,gBADD,EAECC,IAFD,EAGCC,IAHD,EAICC,SAJD,EAKCC,WALD,EAMCC,iBAND,EAOCC,QAPD,QAQO,cARP;AASA,SAASC,OAAT,EAAkBC,GAAlB,QAA6B,QAA7B;AAEA;AACA;AACA;;AACA,SAASC,IAAT,QAAqB,uBAArB;AACA,SAASC,KAAT,QAAsB,kBAAtB;AACA,SAASC,SAAT,QAA0B,oBAA1B;AACA,SAASC,EAAT,EAAaC,EAAb,EAAiBC,OAAjB,QAAgC,iBAAhC;AACA,SAASC,wBAAT,QAAyC,oBAAzC;AAEA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,eAAnB;AACA,OAAOC,cAAP,MAA2B,mBAA3B;A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P3B,UAFO;AADT,OAMGP,KANH,CADD,EASC,cAAC,IAAD;AAAM,MAAA,KAAK,EAAGmC;AAAd,OACGlC,QADH,CATD,CA1BF,EAwCG,CAAEA,QAAF,IAAcD,KAAd,IACD,cAAC,IAAD;AACC,MAAA,KAAK,EAAG,CAAEkC,iBAAF,EAAqB3B,UAArB;AADT,OAGGP,KAHH,CAzCF,CADD,EAiDGmB,kBAAkB,IACnB,cAAC,gBAAD;AACC,MAAA,OAAO,EAAG0D,OADX;AAEC,MAAA,iBAAiB,EAAG;AAFrB,OAIC,cAAC,IAAD;AAAM,MAAA,KAAK,EAAGR;AAAd,OACGO,KADH,CAJD,CAlDF,CAJD,EAgEG7D,UAAU,IACX,cAAC,IAAD;AACC,MAAA,IAAI,EAAGhE,KADR;AAEC,MAAA,IAAI,EAAGO,cAAc,CAACyD,UAAf,CAA0BkE;AAFlC,MAjEF,EAsEG1D,SAAS,IAAIkC,iBAAiB,EAtEjC,EAuEG5C,QAvEH,CAtBD,EA+FGQ,IAAI,IACL,cAAC,IAAD;AAAM,MAAA,KAAK,EAAG,CAAEmD,aAAF,EAAiBnH,MAAM,CAAC8H,gBAAxB;AAAd,OACG9D,IADH,CAhGF,EAoGG,CAAEmB,gBAAF,IAAsB,cAAC,IAAD;AAAM,MAAA,KAAK,EAAGD,cAAc;AAA5B,MApGzB,CADD;AAwGA;;AAhZsC;;AAmZxC,eAAenF,wBAAwB,CAAEM,eAAF,CAAvC","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 =\n\t\t\tthis.handleScreenReaderToggled.bind( this );\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 && isScreenReaderEnabled ) {\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 = isInteractive && 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"]}
@@ -26,7 +26,8 @@ const BottomSheetTextControl = _ref => {
26
26
  placeholder,
27
27
  label,
28
28
  icon,
29
- footerNote
29
+ footerNote,
30
+ cellPlaceholder
30
31
  } = _ref;
31
32
  const [showSubSheet, setShowSubSheet] = useState(false);
32
33
  const navigation = useNavigation();
@@ -46,10 +47,10 @@ const BottomSheetTextControl = _ref => {
46
47
  return createElement(BottomSheet.SubSheet, {
47
48
  navigationButton: createElement(BottomSheet.Cell, {
48
49
  icon: icon,
49
- placeholder: placeholder,
50
50
  label: label,
51
51
  onPress: openSubSheet,
52
- value: initialValue || ''
52
+ value: initialValue || '',
53
+ placeholder: cellPlaceholder || placeholder || ''
53
54
  }, createElement(Icon, {
54
55
  icon: chevronRight
55
56
  })),
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/mobile/bottom-sheet-text-control/index.native.js"],"names":["TextInput","useNavigation","useState","Icon","chevronRight","usePreferredColorSchemeStyle","BottomSheet","PanelBody","FooterMessageControl","styles","BottomSheetTextControl","initialValue","onChange","placeholder","label","icon","footerNote","showSubSheet","setShowSubSheet","navigation","goBack","openSubSheet","navigate","SubSheet","screenName","horizontalBorderStyle","horizontalBorder","horizontalBorderDark","textEditorStyle","textEditor","textEditorDark","text","textFooternote"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,cAA1B;AACA,SAASC,aAAT,QAA8B,0BAA9B;AAEA;AACA;AACA;;AACA,SAASC,QAAT,QAAyB,oBAAzB;AACA,SAASC,IAAT,EAAeC,YAAf,QAAmC,kBAAnC;AACA,SAASC,4BAAT,QAA6C,oBAA7C;AACA,SACCC,WADD,EAECC,SAFD,EAGCC,oBAHD,QAIO,uBAJP;AAMA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,eAAnB;;AAEA,MAAMC,sBAAsB,GAAG,QAOxB;AAAA,MAP0B;AAChCC,IAAAA,YADgC;AAEhCC,IAAAA,QAFgC;AAGhCC,IAAAA,WAHgC;AAIhCC,IAAAA,KAJgC;AAKhCC,IAAAA,IALgC;AAMhCC,IAAAA;AANgC,GAO1B;AACN,QAAM,CAAEC,YAAF,EAAgBC,eAAhB,IAAoChB,QAAQ,CAAE,KAAF,CAAlD;AACA,QAAMiB,UAAU,GAAGlB,aAAa,EAAhC;;AAEA,QAAMmB,MAAM,GAAG,MAAM;AACpBF,IAAAA,eAAe,CAAE,KAAF,CAAf;AACAC,IAAAA,UAAU,CAACC,MAAX;AACA,GAHD;;AAKA,QAAMC,YAAY,GAA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CAdD,EAmCGZ,UAAU,IACX,cAAC,SAAD;AAAW,IAAA,KAAK,EAAGP,MAAM,CAACuB;AAA1B,KACC,cAAC,oBAAD;AACC,IAAA,KAAK,EAAGhB,UADT;AAEC,IAAA,SAAS,EAAC;AAFX,IADD,CApCF,CADD;AA8CA,CA7ED;;AA+EA,eAAeN,sBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport { TextInput } from 'react-native';\nimport { useNavigation } from '@react-navigation/native';\n\n/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport { Icon, chevronRight } from '@wordpress/icons';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\nimport {\n\tBottomSheet,\n\tPanelBody,\n\tFooterMessageControl,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport styles from './styles.scss';\n\nconst BottomSheetTextControl = ( {\n\tinitialValue,\n\tonChange,\n\tplaceholder,\n\tlabel,\n\ticon,\n\tfooterNote,\n} ) => {\n\tconst [ showSubSheet, setShowSubSheet ] = useState( false );\n\tconst navigation = useNavigation();\n\n\tconst goBack = () => {\n\t\tsetShowSubSheet( false );\n\t\tnavigation.goBack();\n\t};\n\n\tconst openSubSheet = () => {\n\t\tnavigation.navigate( BottomSheet.SubSheet.screenName );\n\t\tsetShowSubSheet( true );\n\t};\n\n\tconst horizontalBorderStyle = usePreferredColorSchemeStyle(\n\t\tstyles.horizontalBorder,\n\t\tstyles.horizontalBorderDark\n\t);\n\n\tconst textEditorStyle = usePreferredColorSchemeStyle(\n\t\tstyles.textEditor,\n\t\tstyles.textEditorDark\n\t);\n\n\treturn (\n\t\t<BottomSheet.SubSheet\n\t\t\tnavigationButton={\n\t\t\t\t<BottomSheet.Cell\n\t\t\t\t\ticon={ icon }\n\t\t\t\t\tplaceholder={ placeholder }\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tonPress={ openSubSheet }\n\t\t\t\t\tvalue={ initialValue || '' }\n\t\t\t\t>\n\t\t\t\t\t<Icon icon={ chevronRight }></Icon>\n\t\t\t\t</BottomSheet.Cell>\n\t\t\t}\n\t\t\tshowSheet={ showSubSheet }\n\t\t>\n\t\t\t<>\n\t\t\t\t<BottomSheet.NavBar>\n\t\t\t\t\t<BottomSheet.NavBar.BackButton onPress={ goBack } />\n\t\t\t\t\t<BottomSheet.NavBar.Heading>\n\t\t\t\t\t\t{ label }\n\t\t\t\t\t</BottomSheet.NavBar.Heading>\n\t\t\t\t</BottomSheet.NavBar>\n\t\t\t\t<PanelBody style={ horizontalBorderStyle }>\n\t\t\t\t\t<TextInput\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\tonChangeText={ ( text ) => onChange( text ) }\n\t\t\t\t\t\tdefaultValue={ initialValue }\n\t\t\t\t\t\tmultiline={ true }\n\t\t\t\t\t\tplaceholder={ placeholder }\n\t\t\t\t\t\tplaceholderTextColor={ '#87a6bc' }\n\t\t\t\t\t\tstyle={ textEditorStyle }\n\t\t\t\t\t\ttextAlignVertical={ 'top' }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t</>\n\n\t\t\t{ footerNote && (\n\t\t\t\t<PanelBody style={ styles.textFooternote }>\n\t\t\t\t\t<FooterMessageControl\n\t\t\t\t\t\tlabel={ footerNote }\n\t\t\t\t\t\ttextAlign=\"left\"\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t) }\n\t\t</BottomSheet.SubSheet>\n\t);\n};\n\nexport default BottomSheetTextControl;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/mobile/bottom-sheet-text-control/index.native.js"],"names":["TextInput","useNavigation","useState","Icon","chevronRight","usePreferredColorSchemeStyle","BottomSheet","PanelBody","FooterMessageControl","styles","BottomSheetTextControl","initialValue","onChange","placeholder","label","icon","footerNote","cellPlaceholder","showSubSheet","setShowSubSheet","navigation","goBack","openSubSheet","navigate","SubSheet","screenName","horizontalBorderStyle","horizontalBorder","horizontalBorderDark","textEditorStyle","textEditor","textEditorDark","text","textFooternote"],"m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GhB,IADR;AAEC,MAAA,KAAK,EAAGD,KAFT;AAGC,MAAA,OAAO,EAAGQ,YAHX;AAIC,MAAA,KAAK,EAAGX,YAAY,IAAI,EAJzB;AAKC,MAAA,WAAW,EAAGM,eAAe,IAAIJ,WAAnB,IAAkC;AALjD,OAOC,cAAC,IAAD;AAAM,MAAA,IAAI,EAAGT;AAAb,MAPD,CAFF;AAYC,IAAA,SAAS,EAAGc;AAZb,KAcC,8BACC,cAAC,WAAD,CAAa,MAAb,QACC,cAAC,WAAD,CAAa,MAAb,CAAoB,UAApB;AAA+B,IAAA,OAAO,EAAGG;AAAzC,IADD,EAEC,cAAC,WAAD,CAAa,MAAb,CAAoB,OAApB,QACGP,KADH,CAFD,CADD,EAOC,cAAC,SAAD;AAAW,IAAA,KAAK,EAAGY;AAAnB,KACC,cAAC,SAAD;AACC,IAAA,KAAK,EAAGZ,KADT;AAEC,IAAA,YAAY,EAAKkB,IAAF,IAAYpB,QAAQ,CAAEoB,IAAF,CAFpC;AAGC,IAAA,YAAY,EAAGrB,YAHhB;AAIC,IAAA,SAAS,EAAG,IAJb;AAKC,IAAA,WAAW,EAAGE,WALf;AAMC,IAAA,oBAAoB,EAAG,SANxB;AAOC,IAAA,KAAK,EAAGgB,eAPT;AAQC,IAAA,iBAAiB,EAAG;AARrB,IADD,CAPD,CAdD,EAmCGb,UAAU,IACX,cAAC,SAAD;AAAW,IAAA,KAAK,EAAGP,MAAM,CAACwB;AAA1B,KACC,cAAC,oBAAD;AACC,IAAA,KAAK,EAAGjB,UADT;AAEC,IAAA,SAAS,EAAC;AAFX,IADD,CApCF,CADD;AA8CA,CA9ED;;AAgFA,eAAeN,sBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport { TextInput } from 'react-native';\nimport { useNavigation } from '@react-navigation/native';\n\n/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport { Icon, chevronRight } from '@wordpress/icons';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\nimport {\n\tBottomSheet,\n\tPanelBody,\n\tFooterMessageControl,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport styles from './styles.scss';\n\nconst BottomSheetTextControl = ( {\n\tinitialValue,\n\tonChange,\n\tplaceholder,\n\tlabel,\n\ticon,\n\tfooterNote,\n\tcellPlaceholder,\n} ) => {\n\tconst [ showSubSheet, setShowSubSheet ] = useState( false );\n\tconst navigation = useNavigation();\n\n\tconst goBack = () => {\n\t\tsetShowSubSheet( false );\n\t\tnavigation.goBack();\n\t};\n\n\tconst openSubSheet = () => {\n\t\tnavigation.navigate( BottomSheet.SubSheet.screenName );\n\t\tsetShowSubSheet( true );\n\t};\n\n\tconst horizontalBorderStyle = usePreferredColorSchemeStyle(\n\t\tstyles.horizontalBorder,\n\t\tstyles.horizontalBorderDark\n\t);\n\n\tconst textEditorStyle = usePreferredColorSchemeStyle(\n\t\tstyles.textEditor,\n\t\tstyles.textEditorDark\n\t);\n\n\treturn (\n\t\t<BottomSheet.SubSheet\n\t\t\tnavigationButton={\n\t\t\t\t<BottomSheet.Cell\n\t\t\t\t\ticon={ icon }\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tonPress={ openSubSheet }\n\t\t\t\t\tvalue={ initialValue || '' }\n\t\t\t\t\tplaceholder={ cellPlaceholder || placeholder || '' }\n\t\t\t\t>\n\t\t\t\t\t<Icon icon={ chevronRight }></Icon>\n\t\t\t\t</BottomSheet.Cell>\n\t\t\t}\n\t\t\tshowSheet={ showSubSheet }\n\t\t>\n\t\t\t<>\n\t\t\t\t<BottomSheet.NavBar>\n\t\t\t\t\t<BottomSheet.NavBar.BackButton onPress={ goBack } />\n\t\t\t\t\t<BottomSheet.NavBar.Heading>\n\t\t\t\t\t\t{ label }\n\t\t\t\t\t</BottomSheet.NavBar.Heading>\n\t\t\t\t</BottomSheet.NavBar>\n\t\t\t\t<PanelBody style={ horizontalBorderStyle }>\n\t\t\t\t\t<TextInput\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\tonChangeText={ ( text ) => onChange( text ) }\n\t\t\t\t\t\tdefaultValue={ initialValue }\n\t\t\t\t\t\tmultiline={ true }\n\t\t\t\t\t\tplaceholder={ placeholder }\n\t\t\t\t\t\tplaceholderTextColor={ '#87a6bc' }\n\t\t\t\t\t\tstyle={ textEditorStyle }\n\t\t\t\t\t\ttextAlignVertical={ 'top' }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t</>\n\n\t\t\t{ footerNote && (\n\t\t\t\t<PanelBody style={ styles.textFooternote }>\n\t\t\t\t\t<FooterMessageControl\n\t\t\t\t\t\tlabel={ footerNote }\n\t\t\t\t\t\ttextAlign=\"left\"\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t) }\n\t\t</BottomSheet.SubSheet>\n\t);\n};\n\nexport default BottomSheetTextControl;\n"]}
@@ -365,7 +365,8 @@ export function getGlobalStyles(rawStyles, rawFeatures) {
365
365
  typography: {
366
366
  fontSizes,
367
367
  customLineHeight: features === null || features === void 0 ? void 0 : (_features$custom = features.custom) === null || _features$custom === void 0 ? void 0 : _features$custom['line-height']
368
- }
368
+ },
369
+ spacing: features === null || features === void 0 ? void 0 : features.spacing
369
370
  },
370
371
  __experimentalGlobalStylesBaseStyles: globalStyles
371
372
  };