@wordpress/components 23.9.0 → 25.0.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 (423) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/CONTRIBUTING.md +75 -1
  3. package/README.md +1 -3
  4. package/build/autocomplete/autocompleter-ui.js +0 -2
  5. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  6. package/build/autocomplete/index.js +2 -0
  7. package/build/autocomplete/index.js.map +1 -1
  8. package/build/button/index.js +2 -0
  9. package/build/button/index.js.map +1 -1
  10. package/build/card/card-media/component.js +2 -1
  11. package/build/card/card-media/component.js.map +1 -1
  12. package/build/color-picker/styles.js +8 -8
  13. package/build/color-picker/styles.js.map +1 -1
  14. package/build/combobox-control/index.js +7 -5
  15. package/build/combobox-control/index.js.map +1 -1
  16. package/build/combobox-control/styles.js +3 -3
  17. package/build/combobox-control/styles.js.map +1 -1
  18. package/build/date-time/date-time/index.js +3 -84
  19. package/build/date-time/date-time/index.js.map +1 -1
  20. package/build/date-time/date-time/styles.js +4 -19
  21. package/build/date-time/date-time/styles.js.map +1 -1
  22. package/build/dimension-control/index.js +1 -1
  23. package/build/dimension-control/index.js.map +1 -1
  24. package/build/draggable/index.js +2 -7
  25. package/build/draggable/index.js.map +1 -1
  26. package/build/dropdown-menu/index.js +87 -11
  27. package/build/dropdown-menu/index.js.map +1 -1
  28. package/build/dropdown-menu/types.js +6 -0
  29. package/build/dropdown-menu/types.js.map +1 -0
  30. package/build/dropdown-menu-v2/index.js +195 -0
  31. package/build/dropdown-menu-v2/index.js.map +1 -0
  32. package/build/dropdown-menu-v2/styles.js +176 -0
  33. package/build/dropdown-menu-v2/styles.js.map +1 -0
  34. package/build/dropdown-menu-v2/types.js +6 -0
  35. package/build/dropdown-menu-v2/types.js.map +1 -0
  36. package/build/form-token-field/index.js +5 -3
  37. package/build/form-token-field/index.js.map +1 -1
  38. package/build/form-token-field/styles.js +3 -3
  39. package/build/form-token-field/styles.js.map +1 -1
  40. package/build/index.native.js +0 -9
  41. package/build/index.native.js.map +1 -1
  42. package/build/input-control/styles/input-control-styles.js +30 -23
  43. package/build/input-control/styles/input-control-styles.js.map +1 -1
  44. package/build/mobile/bottom-sheet/cell.native.js +16 -8
  45. package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
  46. package/build/mobile/bottom-sheet/range-cell.native.js +3 -2
  47. package/build/mobile/bottom-sheet/range-cell.native.js.map +1 -1
  48. package/build/mobile/bottom-sheet/stepper-cell/index.native.js +4 -2
  49. package/build/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
  50. package/build/mobile/bottom-sheet/switch-cell.native.js +8 -2
  51. package/build/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  52. package/build/mobile/bottom-sheet-select-control/index.native.js +4 -2
  53. package/build/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
  54. package/build/mobile/bottom-sheet-text-control/index.native.js +4 -2
  55. package/build/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
  56. package/build/mobile/global-styles-context/index.native.js +13 -1
  57. package/build/mobile/global-styles-context/index.native.js.map +1 -1
  58. package/build/mobile/link-picker/link-picker-results.native.js +3 -1
  59. package/build/mobile/link-picker/link-picker-results.native.js.map +1 -1
  60. package/build/navigable-container/container.js +39 -19
  61. package/build/navigable-container/container.js.map +1 -1
  62. package/build/navigable-container/index.js.map +1 -1
  63. package/build/navigable-container/menu.js +37 -5
  64. package/build/navigable-container/menu.js.map +1 -1
  65. package/build/navigable-container/tabbable.js +45 -4
  66. package/build/navigable-container/tabbable.js.map +1 -1
  67. package/build/navigable-container/types.js +6 -0
  68. package/build/navigable-container/types.js.map +1 -0
  69. package/build/palette-edit/index.js +34 -12
  70. package/build/palette-edit/index.js.map +1 -1
  71. package/build/private-apis.js +13 -1
  72. package/build/private-apis.js.map +1 -1
  73. package/build/range-control/index.native.js +5 -2
  74. package/build/range-control/index.native.js.map +1 -1
  75. package/build/sandbox/index.native.js +6 -2
  76. package/build/sandbox/index.native.js.map +1 -1
  77. package/build/slot-fill/bubbles-virtually/fill.js +2 -1
  78. package/build/slot-fill/bubbles-virtually/fill.js.map +1 -1
  79. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +45 -35
  80. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  81. package/build/slot-fill/bubbles-virtually/use-slot.js +11 -26
  82. package/build/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
  83. package/build/slot-fill/fill.js +7 -31
  84. package/build/slot-fill/fill.js.map +1 -1
  85. package/build/slot-fill/index.js.map +1 -1
  86. package/build/slot-fill/provider.js +0 -6
  87. package/build/slot-fill/provider.js.map +1 -1
  88. package/build/slot-fill/slot.js +0 -5
  89. package/build/slot-fill/slot.js.map +1 -1
  90. package/build/snackbar/list.js +0 -2
  91. package/build/snackbar/list.js.map +1 -1
  92. package/build/tab-panel/index.js.map +1 -1
  93. package/build/theme/color-algorithms.js +1 -1
  94. package/build/theme/color-algorithms.js.map +1 -1
  95. package/build/toggle-group-control/toggle-group-control/styles.js +7 -7
  96. package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  97. package/build/toolbar/toolbar-button/index.js +1 -2
  98. package/build/toolbar/toolbar-button/index.js.map +1 -1
  99. package/build/toolbar/toolbar-item/index.js +4 -2
  100. package/build/toolbar/toolbar-item/index.js.map +1 -1
  101. package/build/utils/colors-values.js +3 -3
  102. package/build/utils/colors-values.js.map +1 -1
  103. package/build/utils/use-deprecated-props.js +35 -0
  104. package/build/utils/use-deprecated-props.js.map +1 -0
  105. package/build-module/autocomplete/autocompleter-ui.js +1 -3
  106. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  107. package/build-module/autocomplete/index.js +3 -3
  108. package/build-module/autocomplete/index.js.map +1 -1
  109. package/build-module/button/index.js +2 -0
  110. package/build-module/button/index.js.map +1 -1
  111. package/build-module/card/card-media/component.js +2 -1
  112. package/build-module/card/card-media/component.js.map +1 -1
  113. package/build-module/color-picker/styles.js +8 -8
  114. package/build-module/color-picker/styles.js.map +1 -1
  115. package/build-module/combobox-control/index.js +6 -5
  116. package/build-module/combobox-control/index.js.map +1 -1
  117. package/build-module/combobox-control/styles.js +3 -3
  118. package/build-module/combobox-control/styles.js.map +1 -1
  119. package/build-module/date-time/date-time/index.js +6 -81
  120. package/build-module/date-time/date-time/index.js.map +1 -1
  121. package/build-module/date-time/date-time/styles.js +3 -17
  122. package/build-module/date-time/date-time/styles.js.map +1 -1
  123. package/build-module/dimension-control/index.js +1 -1
  124. package/build-module/dimension-control/index.js.map +1 -1
  125. package/build-module/draggable/index.js +2 -7
  126. package/build-module/draggable/index.js.map +1 -1
  127. package/build-module/dropdown-menu/index.js +87 -10
  128. package/build-module/dropdown-menu/index.js.map +1 -1
  129. package/build-module/dropdown-menu/types.js +2 -0
  130. package/build-module/dropdown-menu/types.js.map +1 -0
  131. package/build-module/dropdown-menu-v2/index.js +149 -0
  132. package/build-module/dropdown-menu-v2/index.js.map +1 -0
  133. package/build-module/dropdown-menu-v2/styles.js +153 -0
  134. package/build-module/dropdown-menu-v2/styles.js.map +1 -0
  135. package/build-module/dropdown-menu-v2/types.js +2 -0
  136. package/build-module/dropdown-menu-v2/types.js.map +1 -0
  137. package/build-module/form-token-field/index.js +4 -3
  138. package/build-module/form-token-field/index.js.map +1 -1
  139. package/build-module/form-token-field/styles.js +3 -3
  140. package/build-module/form-token-field/styles.js.map +1 -1
  141. package/build-module/index.native.js +0 -1
  142. package/build-module/index.native.js.map +1 -1
  143. package/build-module/input-control/styles/input-control-styles.js +30 -23
  144. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  145. package/build-module/mobile/bottom-sheet/cell.native.js +16 -8
  146. package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
  147. package/build-module/mobile/bottom-sheet/range-cell.native.js +3 -2
  148. package/build-module/mobile/bottom-sheet/range-cell.native.js.map +1 -1
  149. package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js +4 -2
  150. package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
  151. package/build-module/mobile/bottom-sheet/switch-cell.native.js +7 -2
  152. package/build-module/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  153. package/build-module/mobile/bottom-sheet-select-control/index.native.js +4 -2
  154. package/build-module/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
  155. package/build-module/mobile/bottom-sheet-text-control/index.native.js +4 -2
  156. package/build-module/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
  157. package/build-module/mobile/global-styles-context/index.native.js +13 -1
  158. package/build-module/mobile/global-styles-context/index.native.js.map +1 -1
  159. package/build-module/mobile/link-picker/link-picker-results.native.js +3 -1
  160. package/build-module/mobile/link-picker/link-picker-results.native.js.map +1 -1
  161. package/build-module/navigable-container/container.js +43 -19
  162. package/build-module/navigable-container/container.js.map +1 -1
  163. package/build-module/navigable-container/index.js +0 -2
  164. package/build-module/navigable-container/index.js.map +1 -1
  165. package/build-module/navigable-container/menu.js +36 -4
  166. package/build-module/navigable-container/menu.js.map +1 -1
  167. package/build-module/navigable-container/tabbable.js +44 -3
  168. package/build-module/navigable-container/tabbable.js.map +1 -1
  169. package/build-module/navigable-container/types.js +2 -0
  170. package/build-module/navigable-container/types.js.map +1 -0
  171. package/build-module/palette-edit/index.js +34 -13
  172. package/build-module/palette-edit/index.js.map +1 -1
  173. package/build-module/private-apis.js +12 -1
  174. package/build-module/private-apis.js.map +1 -1
  175. package/build-module/range-control/index.native.js +5 -2
  176. package/build-module/range-control/index.native.js.map +1 -1
  177. package/build-module/sandbox/index.native.js +6 -2
  178. package/build-module/sandbox/index.native.js.map +1 -1
  179. package/build-module/slot-fill/bubbles-virtually/fill.js +2 -1
  180. package/build-module/slot-fill/bubbles-virtually/fill.js.map +1 -1
  181. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +46 -36
  182. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  183. package/build-module/slot-fill/bubbles-virtually/use-slot.js +12 -27
  184. package/build-module/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
  185. package/build-module/slot-fill/fill.js +7 -31
  186. package/build-module/slot-fill/fill.js.map +1 -1
  187. package/build-module/slot-fill/index.js +1 -2
  188. package/build-module/slot-fill/index.js.map +1 -1
  189. package/build-module/slot-fill/provider.js +0 -6
  190. package/build-module/slot-fill/provider.js.map +1 -1
  191. package/build-module/slot-fill/slot.js +0 -5
  192. package/build-module/slot-fill/slot.js.map +1 -1
  193. package/build-module/snackbar/list.js +0 -2
  194. package/build-module/snackbar/list.js.map +1 -1
  195. package/build-module/tab-panel/index.js.map +1 -1
  196. package/build-module/theme/color-algorithms.js +1 -1
  197. package/build-module/theme/color-algorithms.js.map +1 -1
  198. package/build-module/toggle-group-control/toggle-group-control/styles.js +7 -7
  199. package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  200. package/build-module/toolbar/toolbar-button/index.js +1 -2
  201. package/build-module/toolbar/toolbar-button/index.js.map +1 -1
  202. package/build-module/toolbar/toolbar-item/index.js +5 -2
  203. package/build-module/toolbar/toolbar-item/index.js.map +1 -1
  204. package/build-module/utils/colors-values.js +3 -3
  205. package/build-module/utils/colors-values.js.map +1 -1
  206. package/build-module/utils/use-deprecated-props.js +25 -0
  207. package/build-module/utils/use-deprecated-props.js.map +1 -0
  208. package/build-style/style-rtl.css +67 -67
  209. package/build-style/style.css +67 -67
  210. package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -1
  211. package/build-types/autocomplete/index.d.ts.map +1 -1
  212. package/build-types/autocomplete/types.d.ts +2 -18
  213. package/build-types/autocomplete/types.d.ts.map +1 -1
  214. package/build-types/button/deprecated.d.ts +6 -0
  215. package/build-types/button/deprecated.d.ts.map +1 -1
  216. package/build-types/button/index.d.ts.map +1 -1
  217. package/build-types/button/types.d.ts +7 -0
  218. package/build-types/button/types.d.ts.map +1 -1
  219. package/build-types/card/card-media/component.d.ts +2 -1
  220. package/build-types/card/card-media/component.d.ts.map +1 -1
  221. package/build-types/card/stories/index.d.ts +21 -1
  222. package/build-types/card/stories/index.d.ts.map +1 -1
  223. package/build-types/color-picker/styles.d.ts.map +1 -1
  224. package/build-types/combobox-control/index.d.ts +1 -1
  225. package/build-types/combobox-control/index.d.ts.map +1 -1
  226. package/build-types/combobox-control/stories/index.d.ts.map +1 -1
  227. package/build-types/combobox-control/styles.d.ts +1 -1
  228. package/build-types/combobox-control/types.d.ts +8 -1
  229. package/build-types/combobox-control/types.d.ts.map +1 -1
  230. package/build-types/date-time/date-time/index.d.ts +3 -4
  231. package/build-types/date-time/date-time/index.d.ts.map +1 -1
  232. package/build-types/date-time/date-time/styles.d.ts +0 -4
  233. package/build-types/date-time/date-time/styles.d.ts.map +1 -1
  234. package/build-types/date-time/stories/date-time.d.ts.map +1 -1
  235. package/build-types/date-time/types.d.ts +0 -14
  236. package/build-types/date-time/types.d.ts.map +1 -1
  237. package/build-types/dimension-control/index.d.ts +1 -1
  238. package/build-types/draggable/index.d.ts.map +1 -1
  239. package/build-types/dropdown-menu/index.d.ts +83 -1
  240. package/build-types/dropdown-menu/index.d.ts.map +1 -1
  241. package/build-types/dropdown-menu/stories/index.d.ts +13 -0
  242. package/build-types/dropdown-menu/stories/index.d.ts.map +1 -0
  243. package/build-types/dropdown-menu/test/index.d.ts +2 -0
  244. package/build-types/dropdown-menu/test/index.d.ts.map +1 -0
  245. package/build-types/dropdown-menu/types.d.ts +134 -0
  246. package/build-types/dropdown-menu/types.d.ts.map +1 -0
  247. package/build-types/dropdown-menu-v2/index.d.ts +17 -0
  248. package/build-types/dropdown-menu-v2/index.d.ts.map +1 -0
  249. package/build-types/dropdown-menu-v2/stories/index.d.ts +13 -0
  250. package/build-types/dropdown-menu-v2/stories/index.d.ts.map +1 -0
  251. package/build-types/dropdown-menu-v2/styles.d.ts +41 -0
  252. package/build-types/dropdown-menu-v2/styles.d.ts.map +1 -0
  253. package/build-types/dropdown-menu-v2/test/index.d.ts +2 -0
  254. package/build-types/dropdown-menu-v2/test/index.d.ts.map +1 -0
  255. package/build-types/dropdown-menu-v2/types.d.ts +242 -0
  256. package/build-types/dropdown-menu-v2/types.d.ts.map +1 -0
  257. package/build-types/form-token-field/index.d.ts.map +1 -1
  258. package/build-types/form-token-field/styles.d.ts +1 -1
  259. package/build-types/form-token-field/types.d.ts +8 -1
  260. package/build-types/form-token-field/types.d.ts.map +1 -1
  261. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  262. package/build-types/navigable-container/container.d.ts +20 -1
  263. package/build-types/navigable-container/container.d.ts.map +1 -1
  264. package/build-types/navigable-container/index.d.ts +5 -2
  265. package/build-types/navigable-container/index.d.ts.map +1 -1
  266. package/build-types/navigable-container/menu.d.ts +45 -11
  267. package/build-types/navigable-container/menu.d.ts.map +1 -1
  268. package/build-types/navigable-container/stories/navigable-menu.d.ts +12 -0
  269. package/build-types/navigable-container/stories/navigable-menu.d.ts.map +1 -0
  270. package/build-types/navigable-container/stories/tabbable-container.d.ts +12 -0
  271. package/build-types/navigable-container/stories/tabbable-container.d.ts.map +1 -0
  272. package/build-types/navigable-container/tabbable.d.ts +52 -9
  273. package/build-types/navigable-container/tabbable.d.ts.map +1 -1
  274. package/build-types/navigable-container/test/navigable-menu.d.ts +2 -0
  275. package/build-types/navigable-container/test/navigable-menu.d.ts.map +1 -0
  276. package/build-types/navigable-container/test/tababble-container.d.ts +2 -0
  277. package/build-types/navigable-container/test/tababble-container.d.ts.map +1 -0
  278. package/build-types/navigable-container/types.d.ts +61 -0
  279. package/build-types/navigable-container/types.d.ts.map +1 -0
  280. package/build-types/navigator/navigator-back-button/component.d.ts +1 -0
  281. package/build-types/navigator/navigator-back-button/component.d.ts.map +1 -1
  282. package/build-types/navigator/navigator-back-button/hook.d.ts +1 -0
  283. package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
  284. package/build-types/navigator/navigator-button/component.d.ts +1 -0
  285. package/build-types/navigator/navigator-button/component.d.ts.map +1 -1
  286. package/build-types/navigator/navigator-button/hook.d.ts +1 -0
  287. package/build-types/navigator/navigator-button/hook.d.ts.map +1 -1
  288. package/build-types/navigator/navigator-to-parent-button/component.d.ts +1 -0
  289. package/build-types/navigator/navigator-to-parent-button/component.d.ts.map +1 -1
  290. package/build-types/palette-edit/index.d.ts +1 -1
  291. package/build-types/palette-edit/index.d.ts.map +1 -1
  292. package/build-types/palette-edit/stories/index.d.ts.map +1 -1
  293. package/build-types/palette-edit/types.d.ts +8 -0
  294. package/build-types/palette-edit/types.d.ts.map +1 -1
  295. package/build-types/private-apis.d.ts.map +1 -1
  296. package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +1 -1
  297. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +1 -1
  298. package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts.map +1 -1
  299. package/build-types/slot-fill/fill.d.ts +4 -2
  300. package/build-types/slot-fill/fill.d.ts.map +1 -1
  301. package/build-types/slot-fill/index.d.ts +1 -2
  302. package/build-types/slot-fill/index.d.ts.map +1 -1
  303. package/build-types/slot-fill/provider.d.ts +0 -2
  304. package/build-types/slot-fill/provider.d.ts.map +1 -1
  305. package/build-types/slot-fill/slot.d.ts.map +1 -1
  306. package/build-types/snackbar/list.d.ts.map +1 -1
  307. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
  308. package/build-types/toolbar/stories/index.d.ts.map +1 -1
  309. package/build-types/toolbar/toolbar-button/index.d.ts +6 -0
  310. package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
  311. package/build-types/toolbar/toolbar-item/index.d.ts +6 -4
  312. package/build-types/toolbar/toolbar-item/index.d.ts.map +1 -1
  313. package/build-types/tree-grid/types.d.ts +7 -0
  314. package/build-types/tree-grid/types.d.ts.map +1 -1
  315. package/build-types/ui/context/get-styled-class-name-from-key.d.ts +1 -10
  316. package/build-types/ui/context/get-styled-class-name-from-key.d.ts.map +1 -1
  317. package/build-types/utils/use-deprecated-props.d.ts +9 -0
  318. package/build-types/utils/use-deprecated-props.d.ts.map +1 -0
  319. package/package.json +21 -20
  320. package/src/autocomplete/README.md +78 -52
  321. package/src/autocomplete/autocompleter-ui.tsx +0 -2
  322. package/src/autocomplete/index.tsx +1 -2
  323. package/src/autocomplete/types.ts +3 -19
  324. package/src/button/index.tsx +2 -0
  325. package/src/button/style.scss +18 -18
  326. package/src/button/types.ts +7 -0
  327. package/src/card/card-media/README.md +1 -1
  328. package/src/card/card-media/component.tsx +2 -1
  329. package/src/card/stories/index.tsx +47 -26
  330. package/src/checkbox-control/style.scss +1 -4
  331. package/src/color-picker/styles.ts +7 -2
  332. package/src/combobox-control/index.tsx +24 -18
  333. package/src/combobox-control/stories/index.tsx +0 -1
  334. package/src/combobox-control/styles.ts +4 -4
  335. package/src/combobox-control/types.ts +8 -1
  336. package/src/custom-gradient-picker/style.scss +2 -2
  337. package/src/date-time/README.md +0 -16
  338. package/src/date-time/date-time/index.tsx +17 -155
  339. package/src/date-time/date-time/styles.ts +0 -4
  340. package/src/date-time/stories/date-time.tsx +0 -4
  341. package/src/date-time/types.ts +0 -16
  342. package/src/dimension-control/index.tsx +1 -1
  343. package/src/draggable/index.tsx +1 -9
  344. package/src/dropdown-menu/README.md +12 -22
  345. package/src/dropdown-menu/{index.js → index.tsx} +111 -25
  346. package/src/dropdown-menu/stories/{index.js → index.tsx} +14 -22
  347. package/src/dropdown-menu/test/{index.js → index.tsx} +6 -5
  348. package/src/dropdown-menu/types.ts +143 -0
  349. package/src/dropdown-menu-v2/README.md +392 -0
  350. package/src/dropdown-menu-v2/index.tsx +241 -0
  351. package/src/dropdown-menu-v2/stories/index.tsx +193 -0
  352. package/src/dropdown-menu-v2/styles.ts +263 -0
  353. package/src/dropdown-menu-v2/test/index.tsx +816 -0
  354. package/src/dropdown-menu-v2/types.ts +250 -0
  355. package/src/form-toggle/style.scss +1 -5
  356. package/src/form-token-field/index.tsx +7 -3
  357. package/src/form-token-field/styles.ts +4 -4
  358. package/src/form-token-field/types.ts +8 -1
  359. package/src/index.native.js +0 -1
  360. package/src/input-control/styles/input-control-styles.tsx +7 -0
  361. package/src/mobile/bottom-sheet/cell.native.js +26 -5
  362. package/src/mobile/bottom-sheet/range-cell.native.js +2 -1
  363. package/src/mobile/bottom-sheet/stepper-cell/index.native.js +2 -0
  364. package/src/mobile/bottom-sheet/styles.native.scss +13 -1
  365. package/src/mobile/bottom-sheet/switch-cell.native.js +10 -2
  366. package/src/mobile/bottom-sheet-select-control/index.native.js +2 -0
  367. package/src/mobile/bottom-sheet-text-control/index.native.js +2 -0
  368. package/src/mobile/global-styles-context/index.native.js +12 -1
  369. package/src/mobile/link-picker/link-picker-results.native.js +3 -0
  370. package/src/modal/style.scss +1 -1
  371. package/src/navigable-container/README.md +24 -13
  372. package/src/navigable-container/{container.js → container.tsx} +57 -27
  373. package/src/navigable-container/{index.js → index.tsx} +0 -1
  374. package/src/navigable-container/menu.tsx +100 -0
  375. package/src/navigable-container/stories/{navigable-menu.js → navigable-menu.tsx} +15 -10
  376. package/src/navigable-container/stories/{tabbable-container.js → tabbable-container.tsx} +15 -6
  377. package/src/navigable-container/tabbable.tsx +92 -0
  378. package/src/navigable-container/test/{navigable-menu.js → navigable-menu.tsx} +3 -1
  379. package/src/navigable-container/test/{tababble-container.js → tababble-container.tsx} +53 -24
  380. package/src/navigable-container/types.ts +76 -0
  381. package/src/palette-edit/index.tsx +45 -7
  382. package/src/palette-edit/stories/index.tsx +4 -0
  383. package/src/palette-edit/types.ts +11 -0
  384. package/src/private-apis.ts +22 -0
  385. package/src/range-control/index.native.js +3 -0
  386. package/src/sandbox/index.native.js +4 -0
  387. package/src/search-control/style.scss +2 -0
  388. package/src/slot-fill/bubbles-virtually/fill.js +2 -1
  389. package/src/slot-fill/bubbles-virtually/slot-fill-provider.js +46 -60
  390. package/src/slot-fill/bubbles-virtually/use-slot.js +14 -41
  391. package/src/slot-fill/fill.js +4 -26
  392. package/src/slot-fill/index.js +1 -3
  393. package/src/slot-fill/provider.js +0 -6
  394. package/src/slot-fill/slot.js +0 -5
  395. package/src/snackbar/list.tsx +0 -1
  396. package/src/style.scss +6 -0
  397. package/src/tab-panel/index.tsx +1 -1
  398. package/src/theme/color-algorithms.ts +1 -1
  399. package/src/theme/stories/index.tsx +1 -1
  400. package/src/theme/test/color-algorithms.ts +2 -2
  401. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +10 -6
  402. package/src/toggle-group-control/toggle-group-control/styles.ts +6 -1
  403. package/src/toolbar/stories/index.tsx +25 -26
  404. package/src/toolbar/toolbar-button/index.tsx +10 -13
  405. package/src/toolbar/toolbar-item/{index.js → index.tsx} +12 -3
  406. package/src/tooltip/style.scss +2 -2
  407. package/src/tree-grid/README.md +18 -0
  408. package/src/tree-grid/types.ts +7 -0
  409. package/src/utils/colors-values.js +3 -3
  410. package/src/utils/theme-variables.scss +4 -4
  411. package/src/utils/use-deprecated-props.ts +29 -0
  412. package/tsconfig.json +1 -0
  413. package/tsconfig.tsbuildinfo +1 -1
  414. package/build/mobile/readable-content-view/index.native.js +0 -97
  415. package/build/mobile/readable-content-view/index.native.js.map +0 -1
  416. package/build-module/mobile/readable-content-view/index.native.js +0 -81
  417. package/build-module/mobile/readable-content-view/index.native.js.map +0 -1
  418. package/src/CONTRIBUTING.md +0 -78
  419. package/src/README.md +0 -20
  420. package/src/mobile/readable-content-view/index.native.js +0 -85
  421. package/src/mobile/readable-content-view/style.native.scss +0 -30
  422. package/src/navigable-container/menu.js +0 -62
  423. package/src/navigable-container/tabbable.js +0 -46
@@ -0,0 +1,250 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
5
+
6
+ export type DropdownMenuProps = {
7
+ /**
8
+ * The open state of the dropdown menu when it is initially rendered. Use when
9
+ * you do not need to control its open state.
10
+ *
11
+ */
12
+ defaultOpen?: DropdownMenuPrimitive.DropdownMenuProps[ 'defaultOpen' ];
13
+ /**
14
+ * The controlled open state of the dropdown menu. Must be used in conjunction
15
+ * with `onOpenChange`.
16
+ */
17
+ open?: DropdownMenuPrimitive.DropdownMenuProps[ 'open' ];
18
+ /**
19
+ * Event handler called when the open state of the dropdown menu changes.
20
+ */
21
+ onOpenChange?: DropdownMenuPrimitive.DropdownMenuProps[ 'onOpenChange' ];
22
+ /**
23
+ * The modality of the dropdown menu. When set to true, interaction with
24
+ * outside elements will be disabled and only menu content will be visible to
25
+ * screen readers.
26
+ *
27
+ * @default true
28
+ */
29
+ modal?: DropdownMenuPrimitive.DropdownMenuProps[ 'modal' ];
30
+ /**
31
+ * The preferred side of the trigger to render against when open.
32
+ * Will be reversed when collisions occur and avoidCollisions is enabled.
33
+ *
34
+ * @default 'bottom'
35
+ */
36
+ side?: DropdownMenuPrimitive.DropdownMenuContentProps[ 'side' ];
37
+ /**
38
+ * The distance in pixels from the trigger.
39
+ *
40
+ * @default 0
41
+ */
42
+ sideOffset?: DropdownMenuPrimitive.DropdownMenuContentProps[ 'sideOffset' ];
43
+ /**
44
+ * The preferred alignment against the trigger.
45
+ * May change when collisions occur.
46
+ *
47
+ * @default 'center'
48
+ */
49
+ align?: DropdownMenuPrimitive.DropdownMenuContentProps[ 'align' ];
50
+ /**
51
+ * An offset in pixels from the "start" or "end" alignment options.
52
+ *
53
+ * @default 0
54
+ */
55
+ alignOffset?: DropdownMenuPrimitive.DropdownMenuContentProps[ 'alignOffset' ];
56
+ /**
57
+ * The trigger button.
58
+ */
59
+ trigger: React.ReactNode;
60
+ /**
61
+ * The contents of the dropdown
62
+ */
63
+ children: React.ReactNode;
64
+ };
65
+
66
+ export type DropdownSubMenuTriggerProps = {
67
+ /**
68
+ * The contents of the item.
69
+ */
70
+ children: React.ReactNode;
71
+ /**
72
+ * The contents of the item's prefix.
73
+ */
74
+ prefix?: React.ReactNode;
75
+ /**
76
+ * The contents of the item's suffix.
77
+ *
78
+ * @default The standard chevron icon for a submenu trigger.
79
+ */
80
+ suffix?: React.ReactNode;
81
+ };
82
+
83
+ export type DropdownSubMenuProps = {
84
+ /**
85
+ * The open state of the submenu when it is initially rendered. Use when you
86
+ * do not need to control its open state.
87
+ */
88
+ defaultOpen?: DropdownMenuPrimitive.DropdownMenuSubProps[ 'defaultOpen' ];
89
+ /**
90
+ * The controlled open state of the submenu. Must be used in conjunction with
91
+ * `onOpenChange`.
92
+ */
93
+ open?: DropdownMenuPrimitive.DropdownMenuSubProps[ 'open' ];
94
+ /**
95
+ * Event handler called when the open state of the submenu changes.
96
+ */
97
+ onOpenChange?: DropdownMenuPrimitive.DropdownMenuSubProps[ 'onOpenChange' ];
98
+ /**
99
+ * When `true`, prevents the user from interacting with the item.
100
+ */
101
+ disabled?: DropdownMenuPrimitive.DropdownMenuSubTriggerProps[ 'disabled' ];
102
+ /**
103
+ * Optional text used for typeahead purposes for the trigger. By default the typeahead
104
+ * behavior will use the `.textContent` of the trigger. Use this when the content
105
+ * is complex, or you have non-textual content inside.
106
+ */
107
+ textValue?: DropdownMenuPrimitive.DropdownMenuSubTriggerProps[ 'textValue' ];
108
+ /**
109
+ * The contents rendered inside the trigger. The trigger should be
110
+ * an instance of the `DropdownSubMenuTriggerProps` component.
111
+ */
112
+ trigger: React.ReactNode;
113
+ /**
114
+ * The contents of the dropdown sub menu
115
+ */
116
+ children: React.ReactNode;
117
+ };
118
+
119
+ export type DropdownMenuItemProps = {
120
+ /**
121
+ * When true, prevents the user from interacting with the item.
122
+ *
123
+ * @default false
124
+ */
125
+ disabled?: DropdownMenuPrimitive.DropdownMenuItemProps[ 'disabled' ];
126
+ /**
127
+ * Event handler called when the user selects an item (via mouse or keyboard).
128
+ * Calling `event.preventDefault` in this handler will prevent the dropdown
129
+ * menu from closing when selecting that item.
130
+ */
131
+ onSelect?: DropdownMenuPrimitive.DropdownMenuItemProps[ 'onSelect' ];
132
+ /**
133
+ * Optional text used for typeahead purposes. By default the typeahead
134
+ * behavior will use the `.textContent` of the item. Use this when the content
135
+ * is complex, or you have non-textual content inside.
136
+ */
137
+ textValue?: DropdownMenuPrimitive.DropdownMenuItemProps[ 'textValue' ];
138
+ /**
139
+ * The contents of the item
140
+ */
141
+ children: React.ReactNode;
142
+ /**
143
+ * The contents of the item's prefix
144
+ */
145
+ prefix?: React.ReactNode;
146
+ /**
147
+ * The contents of the item's suffix
148
+ */
149
+ suffix?: React.ReactNode;
150
+ };
151
+
152
+ export type DropdownMenuCheckboxItemProps = {
153
+ /**
154
+ * The controlled checked state of the item.
155
+ * Must be used in conjunction with `onCheckedChange`.
156
+ *
157
+ * @default false
158
+ */
159
+ checked?: DropdownMenuPrimitive.DropdownMenuCheckboxItemProps[ 'checked' ];
160
+ /**
161
+ * Event handler called when the checked state changes.
162
+ */
163
+ onCheckedChange?: DropdownMenuPrimitive.DropdownMenuCheckboxItemProps[ 'onCheckedChange' ];
164
+ /**
165
+ * When `true`, prevents the user from interacting with the item.
166
+ */
167
+ disabled?: DropdownMenuPrimitive.DropdownMenuCheckboxItemProps[ 'disabled' ];
168
+ /**
169
+ * Event handler called when the user selects an item (via mouse or keyboard).
170
+ * Calling `event.preventDefault` in this handler will prevent the dropdown
171
+ * menu from closing when selecting that item.
172
+ */
173
+ onSelect?: DropdownMenuPrimitive.DropdownMenuCheckboxItemProps[ 'onSelect' ];
174
+ /**
175
+ * Optional text used for typeahead purposes. By default the typeahead
176
+ * behavior will use the `.textContent` of the item. Use this when the content
177
+ * is complex, or you have non-textual content inside.
178
+ */
179
+ textValue?: DropdownMenuPrimitive.DropdownMenuCheckboxItemProps[ 'textValue' ];
180
+ /**
181
+ * The contents of the checkbox item
182
+ */
183
+ children: React.ReactNode;
184
+ /**
185
+ * The contents of the checkbox item's suffix
186
+ */
187
+ suffix?: React.ReactNode;
188
+ };
189
+
190
+ export type DropdownMenuRadioGroupProps = {
191
+ /**
192
+ * The value of the selected item in the group.
193
+ */
194
+ value?: DropdownMenuPrimitive.DropdownMenuRadioGroupProps[ 'value' ];
195
+ /**
196
+ * Event handler called when the value changes.
197
+ */
198
+ onValueChange?: DropdownMenuPrimitive.DropdownMenuRadioGroupProps[ 'onValueChange' ];
199
+ /**
200
+ * The contents of the radio group
201
+ */
202
+ children: React.ReactNode;
203
+ };
204
+
205
+ export type DropdownMenuRadioItemProps = {
206
+ /**
207
+ * The unique value of the item.
208
+ */
209
+ value: DropdownMenuPrimitive.DropdownMenuRadioItemProps[ 'value' ];
210
+ /**
211
+ * When `true`, prevents the user from interacting with the item.
212
+ */
213
+ disabled?: DropdownMenuPrimitive.DropdownMenuRadioItemProps[ 'disabled' ];
214
+ /**
215
+ * Event handler called when the user selects an item (via mouse or keyboard).
216
+ * Calling `event.preventDefault` in this handler will prevent the dropdown
217
+ * menu from closing when selecting that item.
218
+ */
219
+ onSelect?: DropdownMenuPrimitive.DropdownMenuRadioItemProps[ 'onSelect' ];
220
+ /**
221
+ * Optional text used for typeahead purposes. By default the typeahead
222
+ * behavior will use the `.textContent` of the item. Use this when the content
223
+ * is complex, or you have non-textual content inside.
224
+ */
225
+ textValue?: DropdownMenuPrimitive.DropdownMenuRadioItemProps[ 'textValue' ];
226
+ /**
227
+ * The contents of the radio item
228
+ */
229
+ children: React.ReactNode;
230
+ /**
231
+ * The contents of the radio item's suffix
232
+ */
233
+ suffix?: React.ReactNode;
234
+ };
235
+
236
+ export type DropdownMenuLabelProps = {
237
+ /**
238
+ * The contents of the label
239
+ */
240
+ children: React.ReactNode;
241
+ };
242
+
243
+ export type DropdownMenuGroupProps = {
244
+ /**
245
+ * The contents of the group
246
+ */
247
+ children: React.ReactNode;
248
+ };
249
+
250
+ export type DropdownMenuSeparatorProps = {};
@@ -44,11 +44,7 @@ $toggle-border-width: 1px;
44
44
  }
45
45
 
46
46
  .components-form-toggle__input:focus + .components-form-toggle__track {
47
- box-shadow: 0 0 0 2px $white, 0 0 0 (2px + $border-width-focus) $components-color-accent;
48
-
49
- // Windows High Contrast mode will show this outline, but not the box-shadow.
50
- outline: 2px solid transparent;
51
- outline-offset: 2px;
47
+ @include button-style-outset__focus($components-color-accent);
52
48
  }
53
49
 
54
50
  &.is-checked {
@@ -27,6 +27,7 @@ import {
27
27
  StyledLabel,
28
28
  } from '../base-control/styles/base-control-styles';
29
29
  import { Spacer } from '../spacer';
30
+ import { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';
30
31
 
31
32
  const identity = ( value: string ) => value;
32
33
 
@@ -69,10 +70,13 @@ export function FormTokenField( props: FormTokenFieldProps ) {
69
70
  __experimentalExpandOnFocus = false,
70
71
  __experimentalValidateInput = () => true,
71
72
  __experimentalShowHowTo = true,
72
- __next36pxDefaultSize = false,
73
+ __next40pxDefaultSize = false,
73
74
  __experimentalAutoSelectFirstMatch = false,
74
75
  __nextHasNoMarginBottom = false,
75
- } = props;
76
+ } = useDeprecated36pxDefaultSizeProp< FormTokenFieldProps >(
77
+ props,
78
+ 'wp.components.FormTokenField'
79
+ );
76
80
 
77
81
  const instanceId = useInstanceId( FormTokenField );
78
82
 
@@ -702,7 +706,7 @@ export function FormTokenField( props: FormTokenFieldProps ) {
702
706
  align="center"
703
707
  gap={ 1 }
704
708
  wrap={ true }
705
- __next36pxDefaultSize={ __next36pxDefaultSize }
709
+ __next40pxDefaultSize={ __next40pxDefaultSize }
706
710
  hasTokens={ !! value.length }
707
711
  >
708
712
  { renderTokensAndInput() }
@@ -11,22 +11,22 @@ import { Flex } from '../flex';
11
11
  import { space } from '../ui/utils/space';
12
12
 
13
13
  type TokensAndInputWrapperProps = {
14
- __next36pxDefaultSize: boolean;
14
+ __next40pxDefaultSize: boolean;
15
15
  hasTokens: boolean;
16
16
  };
17
17
 
18
18
  const deprecatedPaddings = ( {
19
- __next36pxDefaultSize,
19
+ __next40pxDefaultSize,
20
20
  hasTokens,
21
21
  }: TokensAndInputWrapperProps ) =>
22
- ! __next36pxDefaultSize &&
22
+ ! __next40pxDefaultSize &&
23
23
  css`
24
24
  padding-top: ${ space( hasTokens ? 1 : 0.5 ) };
25
25
  padding-bottom: ${ space( hasTokens ? 1 : 0.5 ) };
26
26
  `;
27
27
 
28
28
  export const TokensAndInputWrapperFlex = styled( Flex )`
29
- padding: 5px ${ space( 1 ) };
29
+ padding: 7px;
30
30
 
31
31
  ${ deprecatedPaddings }
32
32
  `;
@@ -151,13 +151,20 @@ export interface FormTokenFieldProps
151
151
  * @default true
152
152
  */
153
153
  __experimentalShowHowTo?: boolean;
154
+ /**
155
+ * Deprecated. Use `__next40pxDefaultSize` instead.
156
+ *
157
+ * @default false
158
+ * @deprecated
159
+ */
160
+ __next36pxDefaultSize?: boolean;
154
161
  /**
155
162
  * Start opting into the larger default height that will become the
156
163
  * default size in a future version.
157
164
  *
158
165
  * @default false
159
166
  */
160
- __next36pxDefaultSize?: boolean;
167
+ __next40pxDefaultSize?: boolean;
161
168
  /**
162
169
  * If true, the select the first matching suggestion when the user presses
163
170
  * the Enter key (or space when tokenizeOnSpace is true).
@@ -94,7 +94,6 @@ export { default as HTMLTextInput } from './mobile/html-text-input';
94
94
  export { default as KeyboardAvoidingView } from './mobile/keyboard-avoiding-view';
95
95
  export { default as KeyboardAwareFlatList } from './mobile/keyboard-aware-flat-list';
96
96
  export { default as Picker } from './mobile/picker';
97
- export { default as ReadableContentView } from './mobile/readable-content-view';
98
97
  export { default as CycleSelectControl } from './mobile/cycle-select-control';
99
98
  export { default as Gradient } from './mobile/gradient';
100
99
  export { default as ColorSettings } from './mobile/color-settings';
@@ -270,9 +270,14 @@ const backdropFocusedStyles = ( {
270
270
  let borderColor = isFocused ? COLORS.ui.borderFocus : COLORS.ui.border;
271
271
 
272
272
  let boxShadow;
273
+ let outline;
274
+ let outlineOffset;
273
275
 
274
276
  if ( isFocused ) {
275
277
  boxShadow = `0 0 0 1px ${ COLORS.ui.borderFocus } inset`;
278
+ // Windows High Contrast mode will show this outline, but not the box-shadow.
279
+ outline = `2px solid transparent`;
280
+ outlineOffset = `-2px`;
276
281
  }
277
282
 
278
283
  if ( disabled ) {
@@ -284,6 +289,8 @@ const backdropFocusedStyles = ( {
284
289
  borderColor,
285
290
  borderStyle: 'solid',
286
291
  borderWidth: 1,
292
+ outline,
293
+ outlineOffset,
287
294
  } );
288
295
  };
289
296
 
@@ -92,6 +92,7 @@ class BottomSheetCell extends Component {
92
92
  accessibilityHint,
93
93
  accessibilityRole,
94
94
  disabled = false,
95
+ disabledStyle = styles.cellDisabled,
95
96
  activeOpacity,
96
97
  onPress,
97
98
  onLongPress,
@@ -223,11 +224,22 @@ class BottomSheetCell extends Component {
223
224
  styles.cellValue,
224
225
  styles.cellTextDark
225
226
  );
226
- const finalStyle = {
227
+ const textInputStyle = {
227
228
  ...cellValueStyle,
228
229
  ...valueStyle,
229
230
  ...styleRTL,
230
231
  };
232
+ const placeholderTextColor = disabled
233
+ ? this.props.getStylesFromColorScheme(
234
+ styles.placeholderColorDisabled,
235
+ styles.placeholderColorDisabledDark
236
+ ).color
237
+ : styles.placeholderColor.color;
238
+ const textStyle = {
239
+ ...( disabled && styles.cellDisabled ),
240
+ ...cellValueStyle,
241
+ ...valueStyle,
242
+ };
231
243
 
232
244
  // To be able to show the `middle` ellipsizeMode on editable cells
233
245
  // we show the TextInput just when the user wants to edit the value,
@@ -238,10 +250,10 @@ class BottomSheetCell extends Component {
238
250
  <TextInput
239
251
  ref={ ( c ) => ( this._valueTextInput = c ) }
240
252
  numberOfLines={ 1 }
241
- style={ finalStyle }
253
+ style={ textInputStyle }
242
254
  value={ value }
243
255
  placeholder={ valuePlaceholder }
244
- placeholderTextColor={ '#87a6bc' }
256
+ placeholderTextColor={ placeholderTextColor }
245
257
  onChangeText={ onChangeValue }
246
258
  editable={ isValueEditable }
247
259
  pointerEvents={
@@ -251,11 +263,12 @@ class BottomSheetCell extends Component {
251
263
  onBlur={ finishEditing }
252
264
  onSubmitEditing={ onSubmit }
253
265
  keyboardType={ this.typeToKeyboardType( type, step ) }
266
+ disabled={ disabled }
254
267
  { ...valueProps }
255
268
  />
256
269
  ) : (
257
270
  <Text
258
- style={ { ...cellValueStyle, ...valueStyle } }
271
+ style={ textStyle }
259
272
  numberOfLines={ 1 }
260
273
  ellipsizeMode={ 'middle' }
261
274
  >
@@ -418,7 +431,15 @@ class BottomSheetCell extends Component {
418
431
  />
419
432
  ) }
420
433
  { showValue && getValueComponent() }
421
- { children }
434
+ <View
435
+ style={ [
436
+ disabled && disabledStyle,
437
+ styles.cellRowContainer,
438
+ ] }
439
+ pointerEvents={ disabled ? 'none' : 'auto' }
440
+ >
441
+ { children }
442
+ </View>
422
443
  </View>
423
444
  { help && (
424
445
  <Text style={ [ cellHelpStyle, styles.placeholderColor ] }>
@@ -218,6 +218,7 @@ class BottomSheetRangeCell extends Component {
218
218
  activeOpacity={ 1 }
219
219
  accessible={ false }
220
220
  valueStyle={ styles.valueStyle }
221
+ disabled={ disabled }
221
222
  >
222
223
  <View style={ containerStyle }>
223
224
  { preview }
@@ -225,7 +226,7 @@ class BottomSheetRangeCell extends Component {
225
226
  testID={ `Slider ${ cellProps.label }` }
226
227
  value={ sliderValue }
227
228
  defaultValue={ defaultValue }
228
- disabled={ disabled }
229
+ disabled={ disabled && ! isIOS }
229
230
  step={ step }
230
231
  minimumValue={ minimumValue }
231
232
  maximumValue={ maximumValue }
@@ -144,6 +144,7 @@ class BottomSheetStepperCell extends Component {
144
144
  openUnitPicker,
145
145
  decimalNum,
146
146
  cellContainerStyle,
147
+ disabled,
147
148
  } = this.props;
148
149
  const { inputValue } = this.state;
149
150
  const isMinValue = value === min;
@@ -215,6 +216,7 @@ class BottomSheetStepperCell extends Component {
215
216
  labelStyle={ labelStyle }
216
217
  leftAlign={ true }
217
218
  separatorType={ separatorType }
219
+ disabled={ disabled }
218
220
  >
219
221
  <View style={ preview && containerStyle }>
220
222
  { preview }
@@ -284,7 +284,15 @@
284
284
 
285
285
  // used in both light and dark modes
286
286
  .placeholderColor {
287
- color: #87a6bc;
287
+ color: $gray;
288
+ }
289
+
290
+ .placeholderColorDisabled {
291
+ color: lighten($gray, 20%);
292
+ }
293
+
294
+ .placeholderColorDisabledDark {
295
+ color: lighten($gray-dark, 10%);
288
296
  }
289
297
 
290
298
  .applyButton {
@@ -317,3 +325,7 @@
317
325
  .cellSubLabelTextDark {
318
326
  color: $sub-heading-dark;
319
327
  }
328
+
329
+ .cellDisabled {
330
+ opacity: 0.3;
331
+ }
@@ -12,8 +12,10 @@ import { __, _x, sprintf } from '@wordpress/i18n';
12
12
  */
13
13
  import Cell from './cell';
14
14
 
15
+ const EMPTY_STYLE = {};
16
+
15
17
  export default function BottomSheetSwitchCell( props ) {
16
- const { value, onValueChange, ...cellProps } = props;
18
+ const { value, onValueChange, disabled, ...cellProps } = props;
17
19
 
18
20
  const onPress = () => {
19
21
  onValueChange( ! value );
@@ -60,8 +62,14 @@ export default function BottomSheetSwitchCell( props ) {
60
62
  onPress={ onPress }
61
63
  editable={ false }
62
64
  value={ '' }
65
+ disabled={ disabled }
66
+ disabledStyle={ EMPTY_STYLE }
63
67
  >
64
- <Switch value={ value } onValueChange={ onValueChange } />
68
+ <Switch
69
+ value={ value }
70
+ onValueChange={ onValueChange }
71
+ disabled={ disabled }
72
+ />
65
73
  </Cell>
66
74
  );
67
75
  }
@@ -22,6 +22,7 @@ const BottomSheetSelectControl = ( {
22
22
  options: items,
23
23
  onChange,
24
24
  value: selectedValue,
25
+ disabled,
25
26
  } ) => {
26
27
  const [ showSubSheet, setShowSubSheet ] = useState( false );
27
28
  const navigation = useNavigation();
@@ -68,6 +69,7 @@ const BottomSheetSelectControl = ( {
68
69
  __( 'Navigates to select %s' ),
69
70
  label
70
71
  ) }
72
+ disabled={ disabled }
71
73
  >
72
74
  <Icon icon={ chevronRight }></Icon>
73
75
  </BottomSheet.Cell>
@@ -29,6 +29,7 @@ const BottomSheetTextControl = ( {
29
29
  icon,
30
30
  footerNote,
31
31
  cellPlaceholder,
32
+ disabled,
32
33
  } ) => {
33
34
  const [ showSubSheet, setShowSubSheet ] = useState( false );
34
35
  const navigation = useNavigation();
@@ -62,6 +63,7 @@ const BottomSheetTextControl = ( {
62
63
  onPress={ openSubSheet }
63
64
  value={ initialValue || '' }
64
65
  placeholder={ cellPlaceholder || placeholder || '' }
66
+ disabled={ disabled }
65
67
  >
66
68
  <Icon icon={ chevronRight }></Icon>
67
69
  </BottomSheet.Cell>
@@ -26,9 +26,20 @@ export const getMergedGlobalStyles = (
26
26
  blockName,
27
27
  fontSizes
28
28
  ) => {
29
+ // Current support for general styles and blocks.
29
30
  const baseGlobalColors = {
30
- baseColors: baseGlobalStyles || {},
31
+ baseColors: {
32
+ color: baseGlobalStyles?.color,
33
+ typography: baseGlobalStyles?.typography,
34
+ elements: {
35
+ link: baseGlobalStyles?.elements?.link,
36
+ },
37
+ blocks: {
38
+ 'core/button': baseGlobalStyles?.blocks?.[ 'core/button' ],
39
+ },
40
+ },
31
41
  };
42
+
32
43
  const blockStyleAttributes = Object.fromEntries(
33
44
  Object.entries( blockAttributes ?? {} ).filter( ( [ key ] ) =>
34
45
  BLOCK_STYLE_ATTRIBUTES.includes( key )
@@ -74,6 +74,9 @@ export default function LinkPickerResults( {
74
74
  return {
75
75
  fetchMoreSuggestions: debounce( fetchMore, REQUEST_DEBOUNCE_DELAY ),
76
76
  };
77
+ // Disable eslint rule for now, to avoid introducing a regression
78
+ // (see https://github.com/WordPress/gutenberg/pull/23922#discussion_r1170634879).
79
+ // eslint-disable-next-line react-hooks/exhaustive-deps
77
80
  }, [] );
78
81
 
79
82
  // Prevent setting state when unmounted.
@@ -135,7 +135,7 @@
135
135
 
136
136
  &.hide-header {
137
137
  margin-top: 0;
138
- padding-top: $grid-unit-30;
138
+ padding-top: $grid-unit-40;
139
139
  }
140
140
 
141
141
  &.is-scrollable:focus-visible {
@@ -2,38 +2,49 @@
2
2
 
3
3
  `NavigableContainer` is a React component to render a container navigable using the keyboard. Only things that are focusable can be navigated to. It will currently always be a `div`.
4
4
 
5
- `NavigableContainer` is exported as two classes: `NavigableMenu` and `TabbableContainer`. `NavigableContainer` itself is **not** exported. `NavigableMenu` and `TabbableContainer` have the props listed below. Any other props will be passed through to the `div`.
5
+ `NavigableContainer` is exported as two components: `NavigableMenu` and `TabbableContainer`. `NavigableContainer` itself is **not** exported. `NavigableMenu` and `TabbableContainer` have the props listed below. Any other props will be passed through to the `div`.
6
6
 
7
7
  ---
8
8
 
9
9
  ## Props
10
10
 
11
- These are the props that `NavigableMenu` and `TabbableContainer`. Any props which are specific to one class are labelled appropriately.
11
+ These are the props that `NavigableMenu` and `TabbableContainer`. Any props which are specific to one component are labelled appropriately.
12
12
 
13
- ### onNavigate
13
+ ### `cycle`: `boolean`
14
14
 
15
- A callback invoked when the menu navigates to one of its children passing the index and child as an argument
15
+ A boolean which tells the component whether or not to cycle from the end back to the beginning and vice versa.
16
16
 
17
- - Type: `Function`
18
17
  - Required: No
18
+ - default: `true`
19
19
 
20
- ### cycle
20
+ ### `eventToOffset`: `( event: KeyboardEvent ) => -1 | 0 | 1 | undefined`
21
21
 
22
- A boolean which tells the component whether or not to cycle from the end back to the beginning and vice versa.
22
+ (TabbableContainer only)
23
+ Gets an offset, given an event.
24
+
25
+ - Required: No
26
+
27
+ ### `onKeydown`: `( event: KeyboardEvent ) => void`
28
+
29
+ A callback invoked on the keydown event.
30
+
31
+ - Required: No
32
+
33
+ ### `onNavigate`: `( index: number, focusable: HTMLElement ) => void`
34
+
35
+ A callback invoked when the menu navigates to one of its children passing the index and child as an argument
23
36
 
24
- - Type: `Boolean`
25
37
  - Required: No
26
- - default: true
27
38
 
28
- ### orientation (NavigableMenu only)
39
+ ### `orientation`: `'vertical' | 'horizontal' | 'both'`
29
40
 
30
- The orientation of the menu. It could be "vertical", "horizontal" or "both"
41
+ (NavigableMenu only)
42
+ The orientation of the menu. It could be "vertical", "horizontal", or "both".
31
43
 
32
- - Type: `String`
33
44
  - Required: No
34
45
  - Default: `"vertical"`
35
46
 
36
- ## Classes
47
+ ## Components
37
48
 
38
49
  ### NavigableMenu
39
50