@wordpress/block-editor 8.3.0 → 8.5.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 (443) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +56 -18
  3. package/build/components/alignment-control/index.js +13 -6
  4. package/build/components/alignment-control/index.js.map +1 -1
  5. package/build/components/block-alignment-control/index.js +13 -6
  6. package/build/components/block-alignment-control/index.js.map +1 -1
  7. package/build/components/block-draggable/index.js +2 -3
  8. package/build/components/block-draggable/index.js.map +1 -1
  9. package/build/components/block-icon/index.js +4 -0
  10. package/build/components/block-icon/index.js.map +1 -1
  11. package/build/components/block-inspector/index.js +6 -1
  12. package/build/components/block-inspector/index.js.map +1 -1
  13. package/build/components/block-list/block-html.js +4 -1
  14. package/build/components/block-list/block-html.js.map +1 -1
  15. package/build/components/block-list/block.js +4 -1
  16. package/build/components/block-list/block.js.map +1 -1
  17. package/build/components/block-list/use-block-props/index.js +1 -6
  18. package/build/components/block-list/use-block-props/index.js.map +1 -1
  19. package/build/components/block-list/use-block-props/use-focus-first-element.js +22 -6
  20. package/build/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  21. package/build/components/block-list/use-block-props/use-focus-handler.js +7 -1
  22. package/build/components/block-list/use-block-props/use-focus-handler.js.map +1 -1
  23. package/build/components/block-list-appender/index.js +6 -1
  24. package/build/components/block-list-appender/index.js.map +1 -1
  25. package/build/components/block-lock/index.js +32 -0
  26. package/build/components/block-lock/index.js.map +1 -0
  27. package/build/components/block-lock/menu-item.js +67 -0
  28. package/build/components/block-lock/menu-item.js.map +1 -0
  29. package/build/components/block-lock/modal.js +134 -0
  30. package/build/components/block-lock/modal.js.map +1 -0
  31. package/build/components/block-lock/toolbar.js +78 -0
  32. package/build/components/block-lock/toolbar.js.map +1 -0
  33. package/build/components/block-mover/index.js +4 -0
  34. package/build/components/block-mover/index.js.map +1 -1
  35. package/build/components/block-settings-menu/block-settings-dropdown.js +75 -10
  36. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  37. package/build/components/block-settings-menu-controls/index.js +19 -9
  38. package/build/components/block-settings-menu-controls/index.js.map +1 -1
  39. package/build/components/block-switcher/index.js +1 -1
  40. package/build/components/block-switcher/index.js.map +1 -1
  41. package/build/components/block-title/index.js +2 -2
  42. package/build/components/block-title/index.js.map +1 -1
  43. package/build/components/block-title/use-block-display-title.js +8 -6
  44. package/build/components/block-title/use-block-display-title.js.map +1 -1
  45. package/build/components/block-toolbar/block-name-context.js +17 -0
  46. package/build/components/block-toolbar/block-name-context.js.map +1 -0
  47. package/build/components/block-toolbar/block-toolbar-last-item.js +20 -0
  48. package/build/components/block-toolbar/block-toolbar-last-item.js.map +1 -0
  49. package/build/components/block-toolbar/index.js +24 -5
  50. package/build/components/block-toolbar/index.js.map +1 -1
  51. package/build/components/block-tools/index.js +0 -16
  52. package/build/components/block-tools/index.js.map +1 -1
  53. package/build/components/block-variation-transforms/index.js +92 -47
  54. package/build/components/block-variation-transforms/index.js.map +1 -1
  55. package/build/components/block-vertical-alignment-control/index.js +13 -6
  56. package/build/components/block-vertical-alignment-control/index.js.map +1 -1
  57. package/build/components/border-radius-control/index.js +0 -1
  58. package/build/components/border-radius-control/index.js.map +1 -1
  59. package/build/components/border-radius-control/utils.js +1 -1
  60. package/build/components/border-radius-control/utils.js.map +1 -1
  61. package/build/components/colors-gradients/control.js +3 -1
  62. package/build/components/colors-gradients/control.js.map +1 -1
  63. package/build/components/contrast-checker/index.js +4 -0
  64. package/build/components/contrast-checker/index.js.map +1 -1
  65. package/build/components/convert-to-group-buttons/index.js +8 -0
  66. package/build/components/convert-to-group-buttons/index.js.map +1 -1
  67. package/build/components/convert-to-group-buttons/toolbar.js +105 -0
  68. package/build/components/convert-to-group-buttons/toolbar.js.map +1 -0
  69. package/build/components/copy-handler/index.js +4 -0
  70. package/build/components/copy-handler/index.js.map +1 -1
  71. package/build/components/date-format-picker/index.js +132 -0
  72. package/build/components/date-format-picker/index.js.map +1 -0
  73. package/build/components/font-sizes/font-size-picker.js +4 -0
  74. package/build/components/font-sizes/font-size-picker.js.map +1 -1
  75. package/build/components/iframe/index.js +6 -9
  76. package/build/components/iframe/index.js.map +1 -1
  77. package/build/components/index.js +27 -0
  78. package/build/components/index.js.map +1 -1
  79. package/build/components/justify-content-control/index.js +13 -6
  80. package/build/components/justify-content-control/index.js.map +1 -1
  81. package/build/components/keyboard-shortcuts/index.js +1 -1
  82. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  83. package/build/components/line-height-control/index.js +15 -6
  84. package/build/components/line-height-control/index.js.map +1 -1
  85. package/build/components/list-view/block-select-button.js +24 -23
  86. package/build/components/list-view/block-select-button.js.map +1 -1
  87. package/build/components/list-view/block.js +38 -13
  88. package/build/components/list-view/block.js.map +1 -1
  89. package/build/components/list-view/branch.js +16 -13
  90. package/build/components/list-view/branch.js.map +1 -1
  91. package/build/components/list-view/index.js +7 -1
  92. package/build/components/list-view/index.js.map +1 -1
  93. package/build/components/list-view/use-block-selection.js +9 -2
  94. package/build/components/list-view/use-block-selection.js.map +1 -1
  95. package/build/components/media-replace-flow/index.js +4 -0
  96. package/build/components/media-replace-flow/index.js.map +1 -1
  97. package/build/components/multi-selection-inspector/index.js +1 -1
  98. package/build/components/multi-selection-inspector/index.js.map +1 -1
  99. package/build/components/rich-text/index.js +27 -5
  100. package/build/components/rich-text/index.js.map +1 -1
  101. package/build/components/rich-text/index.native.js +13 -9
  102. package/build/components/rich-text/index.native.js.map +1 -1
  103. package/build/components/rich-text/split-value.js +12 -2
  104. package/build/components/rich-text/split-value.js.map +1 -1
  105. package/build/components/rich-text/use-firefox-compat.js +49 -0
  106. package/build/components/rich-text/use-firefox-compat.js.map +1 -0
  107. package/build/components/rich-text/use-input-rules.js +34 -2
  108. package/build/components/rich-text/use-input-rules.js.map +1 -1
  109. package/build/components/skip-to-selected-block/index.js +4 -0
  110. package/build/components/skip-to-selected-block/index.js.map +1 -1
  111. package/build/components/url-popover/image-url-input-ui.js +11 -27
  112. package/build/components/url-popover/image-url-input-ui.js.map +1 -1
  113. package/build/components/writing-flow/index.js +9 -1
  114. package/build/components/writing-flow/index.js.map +1 -1
  115. package/build/components/writing-flow/use-arrow-nav.js +3 -44
  116. package/build/components/writing-flow/use-arrow-nav.js.map +1 -1
  117. package/build/components/writing-flow/use-click-selection.js +68 -0
  118. package/build/components/writing-flow/use-click-selection.js.map +1 -0
  119. package/build/components/writing-flow/use-drag-selection.js +134 -0
  120. package/build/components/writing-flow/use-drag-selection.js.map +1 -0
  121. package/build/components/writing-flow/use-input.js +116 -0
  122. package/build/components/writing-flow/use-input.js.map +1 -0
  123. package/build/components/writing-flow/use-multi-selection.js +18 -38
  124. package/build/components/writing-flow/use-multi-selection.js.map +1 -1
  125. package/build/components/writing-flow/use-selection-observer.js +161 -0
  126. package/build/components/writing-flow/use-selection-observer.js.map +1 -0
  127. package/build/components/writing-flow/use-tab-nav.js +1 -8
  128. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  129. package/build/hooks/anchor.js +7 -6
  130. package/build/hooks/anchor.js.map +1 -1
  131. package/build/hooks/border-color.js +3 -3
  132. package/build/hooks/border-color.js.map +1 -1
  133. package/build/hooks/border.js +0 -14
  134. package/build/hooks/border.js.map +1 -1
  135. package/build/hooks/color.js +20 -17
  136. package/build/hooks/color.js.map +1 -1
  137. package/build/hooks/font-family.js +5 -1
  138. package/build/hooks/font-family.js.map +1 -1
  139. package/build/hooks/font-size.js +4 -2
  140. package/build/hooks/font-size.js.map +1 -1
  141. package/build/hooks/gap.js +77 -5
  142. package/build/hooks/gap.js.map +1 -1
  143. package/build/hooks/layout.js +7 -2
  144. package/build/hooks/layout.js.map +1 -1
  145. package/build/hooks/style.js +34 -3
  146. package/build/hooks/style.js.map +1 -1
  147. package/build/hooks/utils.js +29 -0
  148. package/build/hooks/utils.js.map +1 -1
  149. package/build/layouts/flex.js +82 -15
  150. package/build/layouts/flex.js.map +1 -1
  151. package/build/layouts/flow.js +22 -13
  152. package/build/layouts/flow.js.map +1 -1
  153. package/build/store/actions.js +297 -51
  154. package/build/store/actions.js.map +1 -1
  155. package/build/store/defaults.js +5 -1
  156. package/build/store/defaults.js.map +1 -1
  157. package/build/store/reducer.js +25 -13
  158. package/build/store/reducer.js.map +1 -1
  159. package/build/store/selectors.js +171 -21
  160. package/build/store/selectors.js.map +1 -1
  161. package/build/utils/dom.js +2 -1
  162. package/build/utils/dom.js.map +1 -1
  163. package/build-module/components/alignment-control/index.js +12 -4
  164. package/build-module/components/alignment-control/index.js.map +1 -1
  165. package/build-module/components/block-alignment-control/index.js +12 -4
  166. package/build-module/components/block-alignment-control/index.js.map +1 -1
  167. package/build-module/components/block-draggable/index.js +2 -3
  168. package/build-module/components/block-draggable/index.js.map +1 -1
  169. package/build-module/components/block-icon/index.js +4 -0
  170. package/build-module/components/block-icon/index.js.map +1 -1
  171. package/build-module/components/block-inspector/index.js +6 -1
  172. package/build-module/components/block-inspector/index.js.map +1 -1
  173. package/build-module/components/block-list/block-html.js +5 -2
  174. package/build-module/components/block-list/block-html.js.map +1 -1
  175. package/build-module/components/block-list/block.js +5 -2
  176. package/build-module/components/block-list/block.js.map +1 -1
  177. package/build-module/components/block-list/use-block-props/index.js +1 -4
  178. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  179. package/build-module/components/block-list/use-block-props/use-focus-first-element.js +22 -6
  180. package/build-module/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  181. package/build-module/components/block-list/use-block-props/use-focus-handler.js +7 -1
  182. package/build-module/components/block-list/use-block-props/use-focus-handler.js.map +1 -1
  183. package/build-module/components/block-list-appender/index.js +6 -1
  184. package/build-module/components/block-list-appender/index.js.map +1 -1
  185. package/build-module/components/block-lock/index.js +4 -0
  186. package/build-module/components/block-lock/index.js.map +1 -0
  187. package/build-module/components/block-lock/menu-item.js +53 -0
  188. package/build-module/components/block-lock/menu-item.js.map +1 -0
  189. package/build-module/components/block-lock/modal.js +119 -0
  190. package/build-module/components/block-lock/modal.js.map +1 -0
  191. package/build-module/components/block-lock/toolbar.js +63 -0
  192. package/build-module/components/block-lock/toolbar.js.map +1 -0
  193. package/build-module/components/block-mover/index.js +4 -0
  194. package/build-module/components/block-mover/index.js.map +1 -1
  195. package/build-module/components/block-settings-menu/block-settings-dropdown.js +75 -12
  196. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  197. package/build-module/components/block-settings-menu-controls/index.js +18 -9
  198. package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
  199. package/build-module/components/block-switcher/index.js +2 -2
  200. package/build-module/components/block-switcher/index.js.map +1 -1
  201. package/build-module/components/block-title/index.js +2 -2
  202. package/build-module/components/block-title/index.js.map +1 -1
  203. package/build-module/components/block-title/use-block-display-title.js +8 -6
  204. package/build-module/components/block-title/use-block-display-title.js.map +1 -1
  205. package/build-module/components/block-toolbar/block-name-context.js +9 -0
  206. package/build-module/components/block-toolbar/block-name-context.js.map +1 -0
  207. package/build-module/components/block-toolbar/block-toolbar-last-item.js +11 -0
  208. package/build-module/components/block-toolbar/block-toolbar-last-item.js.map +1 -0
  209. package/build-module/components/block-toolbar/index.js +19 -4
  210. package/build-module/components/block-toolbar/index.js.map +1 -1
  211. package/build-module/components/block-tools/index.js +0 -16
  212. package/build-module/components/block-tools/index.js.map +1 -1
  213. package/build-module/components/block-variation-transforms/index.js +95 -49
  214. package/build-module/components/block-variation-transforms/index.js.map +1 -1
  215. package/build-module/components/block-vertical-alignment-control/index.js +12 -4
  216. package/build-module/components/block-vertical-alignment-control/index.js.map +1 -1
  217. package/build-module/components/border-radius-control/index.js +0 -1
  218. package/build-module/components/border-radius-control/index.js.map +1 -1
  219. package/build-module/components/border-radius-control/utils.js +1 -1
  220. package/build-module/components/border-radius-control/utils.js.map +1 -1
  221. package/build-module/components/colors-gradients/control.js +3 -1
  222. package/build-module/components/colors-gradients/control.js.map +1 -1
  223. package/build-module/components/contrast-checker/index.js +4 -0
  224. package/build-module/components/contrast-checker/index.js.map +1 -1
  225. package/build-module/components/convert-to-group-buttons/index.js +2 -1
  226. package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
  227. package/build-module/components/convert-to-group-buttons/toolbar.js +90 -0
  228. package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -0
  229. package/build-module/components/copy-handler/index.js +4 -0
  230. package/build-module/components/copy-handler/index.js.map +1 -1
  231. package/build-module/components/date-format-picker/index.js +122 -0
  232. package/build-module/components/date-format-picker/index.js.map +1 -0
  233. package/build-module/components/font-sizes/font-size-picker.js +4 -0
  234. package/build-module/components/font-sizes/font-size-picker.js.map +1 -1
  235. package/build-module/components/iframe/index.js +6 -9
  236. package/build-module/components/iframe/index.js.map +1 -1
  237. package/build-module/components/index.js +3 -0
  238. package/build-module/components/index.js.map +1 -1
  239. package/build-module/components/justify-content-control/index.js +12 -4
  240. package/build-module/components/justify-content-control/index.js.map +1 -1
  241. package/build-module/components/keyboard-shortcuts/index.js +1 -1
  242. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  243. package/build-module/components/line-height-control/index.js +14 -5
  244. package/build-module/components/line-height-control/index.js.map +1 -1
  245. package/build-module/components/list-view/block-select-button.js +24 -23
  246. package/build-module/components/list-view/block-select-button.js.map +1 -1
  247. package/build-module/components/list-view/block.js +36 -13
  248. package/build-module/components/list-view/block.js.map +1 -1
  249. package/build-module/components/list-view/branch.js +16 -13
  250. package/build-module/components/list-view/branch.js.map +1 -1
  251. package/build-module/components/list-view/index.js +7 -1
  252. package/build-module/components/list-view/index.js.map +1 -1
  253. package/build-module/components/list-view/use-block-selection.js +10 -3
  254. package/build-module/components/list-view/use-block-selection.js.map +1 -1
  255. package/build-module/components/media-replace-flow/index.js +4 -0
  256. package/build-module/components/media-replace-flow/index.js.map +1 -1
  257. package/build-module/components/multi-selection-inspector/index.js +2 -2
  258. package/build-module/components/multi-selection-inspector/index.js.map +1 -1
  259. package/build-module/components/rich-text/index.js +26 -5
  260. package/build-module/components/rich-text/index.js.map +1 -1
  261. package/build-module/components/rich-text/index.native.js +13 -9
  262. package/build-module/components/rich-text/index.native.js.map +1 -1
  263. package/build-module/components/rich-text/split-value.js +12 -2
  264. package/build-module/components/rich-text/split-value.js.map +1 -1
  265. package/build-module/components/rich-text/use-firefox-compat.js +39 -0
  266. package/build-module/components/rich-text/use-firefox-compat.js.map +1 -0
  267. package/build-module/components/rich-text/use-input-rules.js +35 -4
  268. package/build-module/components/rich-text/use-input-rules.js.map +1 -1
  269. package/build-module/components/skip-to-selected-block/index.js +4 -0
  270. package/build-module/components/skip-to-selected-block/index.js.map +1 -1
  271. package/build-module/components/url-popover/image-url-input-ui.js +12 -28
  272. package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
  273. package/build-module/components/writing-flow/index.js +5 -1
  274. package/build-module/components/writing-flow/index.js.map +1 -1
  275. package/build-module/components/writing-flow/use-arrow-nav.js +4 -45
  276. package/build-module/components/writing-flow/use-arrow-nav.js.map +1 -1
  277. package/build-module/components/writing-flow/use-click-selection.js +57 -0
  278. package/build-module/components/writing-flow/use-click-selection.js.map +1 -0
  279. package/build-module/components/writing-flow/use-drag-selection.js +124 -0
  280. package/build-module/components/writing-flow/use-drag-selection.js.map +1 -0
  281. package/build-module/components/writing-flow/use-input.js +104 -0
  282. package/build-module/components/writing-flow/use-input.js.map +1 -0
  283. package/build-module/components/writing-flow/use-multi-selection.js +18 -37
  284. package/build-module/components/writing-flow/use-multi-selection.js.map +1 -1
  285. package/build-module/components/writing-flow/use-selection-observer.js +150 -0
  286. package/build-module/components/writing-flow/use-selection-observer.js.map +1 -0
  287. package/build-module/components/writing-flow/use-tab-nav.js +1 -9
  288. package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
  289. package/build-module/hooks/anchor.js +7 -6
  290. package/build-module/hooks/anchor.js.map +1 -1
  291. package/build-module/hooks/border-color.js +5 -5
  292. package/build-module/hooks/border-color.js.map +1 -1
  293. package/build-module/hooks/border.js +0 -12
  294. package/build-module/hooks/border.js.map +1 -1
  295. package/build-module/hooks/color.js +19 -18
  296. package/build-module/hooks/color.js.map +1 -1
  297. package/build-module/hooks/font-family.js +3 -1
  298. package/build-module/hooks/font-family.js.map +1 -1
  299. package/build-module/hooks/font-size.js +4 -3
  300. package/build-module/hooks/font-size.js.map +1 -1
  301. package/build-module/hooks/gap.js +75 -7
  302. package/build-module/hooks/gap.js.map +1 -1
  303. package/build-module/hooks/layout.js +7 -2
  304. package/build-module/hooks/layout.js.map +1 -1
  305. package/build-module/hooks/style.js +33 -3
  306. package/build-module/hooks/style.js.map +1 -1
  307. package/build-module/hooks/utils.js +26 -0
  308. package/build-module/hooks/utils.js.map +1 -1
  309. package/build-module/layouts/flex.js +81 -16
  310. package/build-module/layouts/flex.js.map +1 -1
  311. package/build-module/layouts/flow.js +20 -13
  312. package/build-module/layouts/flow.js.map +1 -1
  313. package/build-module/store/actions.js +286 -49
  314. package/build-module/store/actions.js.map +1 -1
  315. package/build-module/store/defaults.js +5 -1
  316. package/build-module/store/defaults.js.map +1 -1
  317. package/build-module/store/reducer.js +25 -13
  318. package/build-module/store/reducer.js.map +1 -1
  319. package/build-module/store/selectors.js +162 -20
  320. package/build-module/store/selectors.js.map +1 -1
  321. package/build-module/utils/dom.js +2 -1
  322. package/build-module/utils/dom.js.map +1 -1
  323. package/build-style/style-rtl.css +214 -24
  324. package/build-style/style.css +214 -24
  325. package/build-types/utils/dom.d.ts.map +1 -1
  326. package/package.json +28 -27
  327. package/src/components/alignment-control/index.js +9 -4
  328. package/src/components/block-alignment-control/index.js +9 -4
  329. package/src/components/block-draggable/index.js +2 -5
  330. package/src/components/block-icon/index.js +3 -0
  331. package/src/components/block-inspector/index.js +4 -0
  332. package/src/components/block-list/block-html.js +8 -4
  333. package/src/components/block-list/block.js +5 -1
  334. package/src/components/block-list/style.scss +4 -5
  335. package/src/components/block-list/use-block-props/index.js +0 -5
  336. package/src/components/block-list/use-block-props/use-focus-first-element.js +27 -6
  337. package/src/components/block-list/use-block-props/use-focus-handler.js +8 -0
  338. package/src/components/block-list-appender/index.js +5 -0
  339. package/src/components/block-lock/index.js +3 -0
  340. package/src/components/block-lock/menu-item.js +59 -0
  341. package/src/components/block-lock/modal.js +170 -0
  342. package/src/components/block-lock/style.scss +70 -0
  343. package/src/components/block-lock/toolbar.js +68 -0
  344. package/src/components/block-mover/index.js +3 -0
  345. package/src/components/block-mover/style.scss +4 -0
  346. package/src/components/block-settings-menu/block-settings-dropdown.js +109 -9
  347. package/src/components/block-settings-menu-controls/index.js +33 -12
  348. package/src/components/block-switcher/index.js +2 -2
  349. package/src/components/block-switcher/style.scss +8 -1
  350. package/src/components/block-switcher/test/index.js +2 -2
  351. package/src/components/block-title/README.md +6 -1
  352. package/src/components/block-title/index.js +2 -2
  353. package/src/components/block-title/test/index.js +43 -1
  354. package/src/components/block-title/use-block-display-title.js +10 -7
  355. package/src/components/block-toolbar/block-name-context.js +8 -0
  356. package/src/components/block-toolbar/block-toolbar-last-item.js +12 -0
  357. package/src/components/block-toolbar/index.js +24 -2
  358. package/src/components/block-toolbar/style.scss +10 -0
  359. package/src/components/block-tools/index.js +0 -19
  360. package/src/components/block-tools/style.scss +27 -0
  361. package/src/components/block-variation-transforms/index.js +105 -36
  362. package/src/components/block-variation-transforms/style.scss +1 -1
  363. package/src/components/block-vertical-alignment-control/index.js +9 -4
  364. package/src/components/border-radius-control/index.js +0 -1
  365. package/src/components/border-radius-control/test/utils.js +4 -0
  366. package/src/components/border-radius-control/utils.js +2 -1
  367. package/src/components/button-block-appender/style.scss +5 -1
  368. package/src/components/color-palette/test/__snapshots__/control.js.snap +70 -4
  369. package/src/components/colors-gradients/control.js +1 -1
  370. package/src/components/colors-gradients/style.scss +6 -0
  371. package/src/components/contrast-checker/index.js +3 -0
  372. package/src/components/convert-to-group-buttons/index.js +6 -1
  373. package/src/components/convert-to-group-buttons/toolbar.js +87 -0
  374. package/src/components/copy-handler/index.js +3 -0
  375. package/src/components/date-format-picker/README.md +58 -0
  376. package/src/components/date-format-picker/index.js +161 -0
  377. package/src/components/date-format-picker/style.scss +31 -0
  378. package/src/components/font-sizes/font-size-picker.js +3 -0
  379. package/src/components/iframe/index.js +5 -7
  380. package/src/components/index.js +3 -0
  381. package/src/components/justify-content-control/index.js +9 -4
  382. package/src/components/keyboard-shortcuts/index.js +1 -1
  383. package/src/components/line-height-control/index.js +11 -6
  384. package/src/components/link-control/README.md +1 -1
  385. package/src/components/list-view/block-select-button.js +21 -30
  386. package/src/components/list-view/block.js +55 -13
  387. package/src/components/list-view/branch.js +37 -15
  388. package/src/components/list-view/index.js +6 -0
  389. package/src/components/list-view/style.scss +56 -14
  390. package/src/components/list-view/use-block-selection.js +15 -2
  391. package/src/components/media-placeholder/README.md +8 -0
  392. package/src/components/media-replace-flow/index.js +3 -0
  393. package/src/components/multi-selection-inspector/index.js +2 -2
  394. package/src/components/rich-text/index.js +25 -2
  395. package/src/components/rich-text/index.native.js +24 -8
  396. package/src/components/rich-text/split-value.js +5 -1
  397. package/src/components/rich-text/use-firefox-compat.js +39 -0
  398. package/src/components/rich-text/use-input-rules.js +40 -3
  399. package/src/components/skip-to-selected-block/index.js +3 -0
  400. package/src/components/url-input/style.scss +3 -2
  401. package/src/components/url-popover/image-url-input-ui.js +16 -29
  402. package/src/components/writing-flow/index.js +8 -0
  403. package/src/components/writing-flow/readme.md +28 -0
  404. package/src/components/writing-flow/use-arrow-nav.js +4 -53
  405. package/src/components/writing-flow/use-click-selection.js +65 -0
  406. package/src/components/writing-flow/use-drag-selection.js +126 -0
  407. package/src/components/writing-flow/use-input.js +112 -0
  408. package/src/components/writing-flow/use-multi-selection.js +13 -36
  409. package/src/components/writing-flow/use-selection-observer.js +153 -0
  410. package/src/components/writing-flow/use-tab-nav.js +1 -11
  411. package/src/hooks/anchor.js +8 -6
  412. package/src/hooks/border-color.js +5 -5
  413. package/src/hooks/border.js +0 -13
  414. package/src/hooks/color.js +51 -24
  415. package/src/hooks/font-family.js +5 -2
  416. package/src/hooks/font-size.js +10 -7
  417. package/src/hooks/gap.js +91 -12
  418. package/src/hooks/layout.js +11 -1
  419. package/src/hooks/style.js +40 -4
  420. package/src/hooks/test/gap.js +66 -0
  421. package/src/hooks/test/style.js +94 -0
  422. package/src/hooks/test/utils.js +1 -1
  423. package/src/hooks/utils.js +26 -0
  424. package/src/layouts/flex.js +93 -6
  425. package/src/layouts/flow.js +28 -12
  426. package/src/store/actions.js +349 -32
  427. package/src/store/defaults.js +7 -1
  428. package/src/store/reducer.js +25 -10
  429. package/src/store/selectors.js +207 -25
  430. package/src/store/test/selectors.js +305 -5
  431. package/src/style.scss +2 -0
  432. package/src/utils/dom.js +2 -1
  433. package/tsconfig.tsbuildinfo +1 -1
  434. package/build/components/block-list/use-block-props/use-multi-selection.js +0 -205
  435. package/build/components/block-list/use-block-props/use-multi-selection.js.map +0 -1
  436. package/build/components/block-list/use-block-props/use-scroll-into-view.js +0 -77
  437. package/build/components/block-list/use-block-props/use-scroll-into-view.js.map +0 -1
  438. package/build-module/components/block-list/use-block-props/use-multi-selection.js +0 -192
  439. package/build-module/components/block-list/use-block-props/use-multi-selection.js.map +0 -1
  440. package/build-module/components/block-list/use-block-props/use-scroll-into-view.js +0 -63
  441. package/build-module/components/block-list/use-block-props/use-scroll-into-view.js.map +0 -1
  442. package/src/components/block-list/use-block-props/use-multi-selection.js +0 -227
  443. package/src/components/block-list/use-block-props/use-scroll-into-view.js +0 -73
@@ -2,47 +2,63 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import { store as blocksStore } from '@wordpress/blocks';
5
- import { __ } from '@wordpress/i18n';
5
+ import { __, sprintf } from '@wordpress/i18n';
6
6
  import {
7
+ Button,
7
8
  DropdownMenu,
8
9
  MenuGroup,
9
10
  MenuItemsChoice,
11
+ VisuallyHidden,
10
12
  } from '@wordpress/components';
11
13
  import { useSelect, useDispatch } from '@wordpress/data';
12
- import { useState, useEffect } from '@wordpress/element';
14
+ import { useMemo } from '@wordpress/element';
13
15
  import { chevronDown } from '@wordpress/icons';
14
16
 
15
17
  /**
16
18
  * Internal dependencies
17
19
  */
18
- import { __experimentalGetMatchingVariation as getMatchingVariation } from '../../utils';
19
20
  import { store as blockEditorStore } from '../../store';
20
21
 
21
- function __experimentalBlockVariationTransforms( { blockClientId } ) {
22
- const [ selectedValue, setSelectedValue ] = useState();
23
- const { updateBlockAttributes } = useDispatch( blockEditorStore );
24
- const { variations, blockAttributes } = useSelect(
25
- ( select ) => {
26
- const { getBlockVariations } = select( blocksStore );
27
- const { getBlockName, getBlockAttributes } = select(
28
- blockEditorStore
29
- );
30
- const blockName = blockClientId && getBlockName( blockClientId );
31
- return {
32
- variations:
33
- blockName && getBlockVariations( blockName, 'transform' ),
34
- blockAttributes: getBlockAttributes( blockClientId ),
35
- };
36
- },
37
- [ blockClientId ]
22
+ function VariationsButtons( {
23
+ className,
24
+ onSelectVariation,
25
+ selectedValue,
26
+ variations,
27
+ } ) {
28
+ return (
29
+ <fieldset className={ className }>
30
+ <VisuallyHidden as="legend">
31
+ { __( 'Transform to variation' ) }
32
+ </VisuallyHidden>
33
+ { variations.map( ( variation ) => (
34
+ <Button
35
+ key={ variation.name }
36
+ icon={ variation.icon }
37
+ isPressed={ selectedValue === variation.name }
38
+ label={
39
+ selectedValue === variation.name
40
+ ? variation.title
41
+ : sprintf(
42
+ /* translators: %s: Name of the block variation */
43
+ __( 'Transform to %s' ),
44
+ variation.title
45
+ )
46
+ }
47
+ onClick={ () => onSelectVariation( variation.name ) }
48
+ aria-label={ variation.title }
49
+ showTooltip
50
+ />
51
+ ) ) }
52
+ </fieldset>
38
53
  );
39
- useEffect( () => {
40
- setSelectedValue(
41
- getMatchingVariation( blockAttributes, variations )?.name
42
- );
43
- }, [ blockAttributes, variations ] );
44
- if ( ! variations?.length ) return null;
54
+ }
45
55
 
56
+ function VariationsDropdown( {
57
+ className,
58
+ onSelectVariation,
59
+ selectedValue,
60
+ variations,
61
+ } ) {
46
62
  const selectOptions = variations.map(
47
63
  ( { name, title, description } ) => ( {
48
64
  value: name,
@@ -50,27 +66,21 @@ function __experimentalBlockVariationTransforms( { blockClientId } ) {
50
66
  info: description,
51
67
  } )
52
68
  );
53
- const onSelectVariation = ( variationName ) => {
54
- updateBlockAttributes( blockClientId, {
55
- ...variations.find( ( { name } ) => name === variationName )
56
- .attributes,
57
- } );
58
- };
59
- const baseClass = 'block-editor-block-variation-transforms';
69
+
60
70
  return (
61
71
  <DropdownMenu
62
- className={ baseClass }
72
+ className={ className }
63
73
  label={ __( 'Transform to variation' ) }
64
74
  text={ __( 'Transform to variation' ) }
65
75
  popoverProps={ {
66
76
  position: 'bottom center',
67
- className: `${ baseClass }__popover`,
77
+ className: `${ className }__popover`,
68
78
  } }
69
79
  icon={ chevronDown }
70
80
  toggleProps={ { iconPosition: 'right' } }
71
81
  >
72
82
  { () => (
73
- <div className={ `${ baseClass }__container` }>
83
+ <div className={ `${ className }__container` }>
74
84
  <MenuGroup>
75
85
  <MenuItemsChoice
76
86
  choices={ selectOptions }
@@ -84,4 +94,63 @@ function __experimentalBlockVariationTransforms( { blockClientId } ) {
84
94
  );
85
95
  }
86
96
 
97
+ function __experimentalBlockVariationTransforms( { blockClientId } ) {
98
+ const { updateBlockAttributes } = useDispatch( blockEditorStore );
99
+ const { activeBlockVariation, variations } = useSelect(
100
+ ( select ) => {
101
+ const { getActiveBlockVariation, getBlockVariations } = select(
102
+ blocksStore
103
+ );
104
+ const { getBlockName, getBlockAttributes } = select(
105
+ blockEditorStore
106
+ );
107
+ const name = blockClientId && getBlockName( blockClientId );
108
+ return {
109
+ activeBlockVariation: getActiveBlockVariation(
110
+ name,
111
+ getBlockAttributes( blockClientId )
112
+ ),
113
+ variations: name && getBlockVariations( name, 'transform' ),
114
+ };
115
+ },
116
+ [ blockClientId ]
117
+ );
118
+
119
+ const selectedValue = activeBlockVariation?.name;
120
+
121
+ // Check if each variation has a unique icon.
122
+ const hasUniqueIcons = useMemo( () => {
123
+ const variationIcons = new Set();
124
+ variations.forEach( ( variation ) => {
125
+ if ( variation.icon ) {
126
+ variationIcons.add( variation.icon );
127
+ }
128
+ } );
129
+ return variationIcons.size === variations.length;
130
+ }, [ variations ] );
131
+
132
+ const onSelectVariation = ( variationName ) => {
133
+ updateBlockAttributes( blockClientId, {
134
+ ...variations.find( ( { name } ) => name === variationName )
135
+ .attributes,
136
+ } );
137
+ };
138
+
139
+ const baseClass = 'block-editor-block-variation-transforms';
140
+
141
+ // Skip rendering if there are no variations
142
+ if ( ! variations?.length ) return null;
143
+
144
+ const Component = hasUniqueIcons ? VariationsButtons : VariationsDropdown;
145
+
146
+ return (
147
+ <Component
148
+ className={ baseClass }
149
+ onSelectVariation={ onSelectVariation }
150
+ selectedValue={ selectedValue }
151
+ variations={ variations }
152
+ />
153
+ );
154
+ }
155
+
87
156
  export default __experimentalBlockVariationTransforms;
@@ -1,5 +1,5 @@
1
1
  .block-editor-block-variation-transforms {
2
- padding: 0 $grid-unit-20 $grid-unit-20 56px;
2
+ padding: 0 $grid-unit-20 $grid-unit-20 52px;
3
3
  width: 100%;
4
4
 
5
5
  .components-dropdown-menu__toggle {
@@ -3,10 +3,15 @@
3
3
  */
4
4
  import BlockVerticalAlignmentUI from './ui';
5
5
 
6
- export function BlockVerticalAlignmentControl( props ) {
6
+ const BlockVerticalAlignmentControl = ( props ) => {
7
7
  return <BlockVerticalAlignmentUI { ...props } isToolbar={ false } />;
8
- }
8
+ };
9
9
 
10
- export function BlockVerticalAlignmentToolbar( props ) {
10
+ const BlockVerticalAlignmentToolbar = ( props ) => {
11
11
  return <BlockVerticalAlignmentUI { ...props } isToolbar />;
12
- }
12
+ };
13
+
14
+ /**
15
+ * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-vertical-alignment-control/README.md
16
+ */
17
+ export { BlockVerticalAlignmentControl, BlockVerticalAlignmentToolbar };
@@ -79,7 +79,6 @@ export default function BorderRadiusControl( { onChange, values } ) {
79
79
  values={ values }
80
80
  min={ MIN_BORDER_RADIUS_VALUE }
81
81
  onChange={ onChange }
82
- unit={ unit }
83
82
  units={ units }
84
83
  />
85
84
  <RangeControl
@@ -150,6 +150,10 @@ describe( 'hasMixedValues', () => {
150
150
  expect( hasMixedValues( '2px' ) ).toBe( false );
151
151
  } );
152
152
 
153
+ it( 'should return false when passed a string value containing a unit with no quantity', () => {
154
+ expect( hasMixedValues( 'em' ) ).toBe( false );
155
+ } );
156
+
153
157
  it( 'should return true when passed mixed values', () => {
154
158
  const values = {
155
159
  bottomLeft: '1em',
@@ -91,7 +91,8 @@ export function getAllValue( values = {} ) {
91
91
  */
92
92
  export function hasMixedValues( values = {} ) {
93
93
  const allValue = getAllValue( values );
94
- const isMixed = isNaN( parseFloat( allValue ) );
94
+ const isMixed =
95
+ typeof values === 'string' ? false : isNaN( parseFloat( allValue ) );
95
96
 
96
97
  return isMixed;
97
98
  }
@@ -3,12 +3,16 @@
3
3
  flex-direction: column;
4
4
  align-items: center;
5
5
  justify-content: center;
6
- padding: $grid-unit-10;
7
6
  width: 100%;
8
7
  height: auto;
9
8
  color: $gray-900;
10
9
  box-shadow: inset 0 0 0 $border-width $gray-900;
11
10
 
11
+ // Needs specificity to override button styles.
12
+ &.components-button.components-button {
13
+ padding: $grid-unit-15;
14
+ }
15
+
12
16
  .is-dark-theme & {
13
17
  color: $light-gray-placeholder;
14
18
  box-shadow: inset 0 0 0 $border-width $light-gray-placeholder;
@@ -69,13 +69,64 @@ exports[`ColorPaletteControl matches the snapshot 1`] = `
69
69
  min-height: 0;
70
70
  }
71
71
 
72
+ .emotion-10 {
73
+ display: -webkit-box;
74
+ display: -webkit-flex;
75
+ display: -ms-flexbox;
76
+ display: flex;
77
+ -webkit-align-items: flex-start;
78
+ -webkit-box-align: flex-start;
79
+ -ms-flex-align: flex-start;
80
+ align-items: flex-start;
81
+ -webkit-flex-direction: row;
82
+ -ms-flex-direction: row;
83
+ flex-direction: row;
84
+ -webkit-box-pack: justify;
85
+ -webkit-justify-content: space-between;
86
+ justify-content: space-between;
87
+ width: 100%;
88
+ }
89
+
90
+ .emotion-10>*+*:not( marquee ) {
91
+ margin-left: calc(4px * 2);
92
+ }
93
+
94
+ .emotion-10>* {
95
+ min-width: 0;
96
+ }
97
+
98
+ .emotion-13 {
99
+ display: block;
100
+ overflow: hidden;
101
+ text-overflow: ellipsis;
102
+ white-space: nowrap;
103
+ display: block;
104
+ max-height: 100%;
105
+ max-width: 100%;
106
+ min-height: 0;
107
+ min-width: 0;
108
+ -webkit-flex: 1;
109
+ -ms-flex: 1;
110
+ flex: 1;
111
+ }
112
+
113
+ .emotion-15 {
114
+ display: block;
115
+ max-height: 100%;
116
+ max-width: 100%;
117
+ min-height: 0;
118
+ min-width: 0;
119
+ }
120
+
72
121
  <div
73
122
  className="components-base-control block-editor-color-gradient-control emotion-0 emotion-1"
74
123
  >
75
124
  <div
76
125
  className="components-base-control__field emotion-2 emotion-3"
77
126
  >
78
- <fieldset>
127
+ <fieldset
128
+ className="block-editor-color-gradient-control__fieldset"
129
+ >
79
130
  <div
80
131
  className="components-flex components-h-stack components-v-stack emotion-4 emotion-5"
81
132
  data-wp-c16t={true}
@@ -104,8 +155,10 @@ exports[`ColorPaletteControl matches the snapshot 1`] = `
104
155
  <button
105
156
  aria-expanded={false}
106
157
  aria-haspopup="true"
107
- aria-label="Custom color picker"
108
- className="components-color-palette__custom-color"
158
+ aria-label="Custom color picker. The currently selected color is called \\"red\\" and has a value of \\"f00\\"."
159
+ className="components-flex components-color-palette__custom-color emotion-10 emotion-5"
160
+ data-wp-c16t={true}
161
+ data-wp-component="Flex"
109
162
  onClick={[Function]}
110
163
  style={
111
164
  Object {
@@ -114,7 +167,20 @@ exports[`ColorPaletteControl matches the snapshot 1`] = `
114
167
  }
115
168
  }
116
169
  >
117
- #f00
170
+ <span
171
+ className="components-truncate components-flex-item components-color-palette__custom-color-name emotion-5 emotion-13 emotion-5"
172
+ data-wp-c16t={true}
173
+ data-wp-component="FlexItem"
174
+ >
175
+ red
176
+ </span>
177
+ <span
178
+ className="components-flex-item components-color-palette__custom-color-value emotion-15 emotion-5"
179
+ data-wp-c16t={true}
180
+ data-wp-component="FlexItem"
181
+ >
182
+ f00
183
+ </span>
118
184
  </button>
119
185
  </div>
120
186
  <div
@@ -66,7 +66,7 @@ function ColorGradientControlInner( {
66
66
  className
67
67
  ) }
68
68
  >
69
- <fieldset>
69
+ <fieldset className="block-editor-color-gradient-control__fieldset">
70
70
  <VStack spacing={ 1 }>
71
71
  { showTitle && (
72
72
  <legend>
@@ -4,6 +4,12 @@
4
4
  }
5
5
  }
6
6
 
7
+ .block-editor-color-gradient-control__fieldset {
8
+ // Prevents the `fieldset` from growing beyond its parent's size
9
+ // in order to fit its content.
10
+ min-width: 0;
11
+ }
12
+
7
13
  .block-editor-panel-color-gradient-settings {
8
14
  .block-editor-panel-color-gradient-settings__panel-title {
9
15
  display: flex;
@@ -138,4 +138,7 @@ function ContrastChecker( {
138
138
  );
139
139
  }
140
140
 
141
+ /**
142
+ * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/contrast-checker/README.md
143
+ */
141
144
  export default ContrastChecker;
@@ -11,6 +11,7 @@ import { useDispatch } from '@wordpress/data';
11
11
  */
12
12
  import { store as blockEditorStore } from '../../store';
13
13
  import useConvertToGroupButtonProps from './use-convert-to-group-button-props';
14
+ import BlockGroupToolbar from './toolbar';
14
15
 
15
16
  function ConvertToGroupButton( {
16
17
  clientIds,
@@ -73,4 +74,8 @@ function ConvertToGroupButton( {
73
74
  );
74
75
  }
75
76
 
76
- export { useConvertToGroupButtonProps, ConvertToGroupButton };
77
+ export {
78
+ BlockGroupToolbar,
79
+ ConvertToGroupButton,
80
+ useConvertToGroupButtonProps,
81
+ };
@@ -0,0 +1,87 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { useDispatch, useSelect } from '@wordpress/data';
5
+ import { switchToBlockType } from '@wordpress/blocks';
6
+ import { ToolbarButton, ToolbarGroup } from '@wordpress/components';
7
+ import { group, row, stack } from '@wordpress/icons';
8
+ import { _x } from '@wordpress/i18n';
9
+
10
+ /**
11
+ * Internal dependencies
12
+ */
13
+ import { useConvertToGroupButtonProps } from '../convert-to-group-buttons';
14
+ import { store as blockEditorStore } from '../../store';
15
+
16
+ const layouts = {
17
+ group: undefined,
18
+ row: { type: 'flex', flexWrap: 'nowrap' },
19
+ stack: { type: 'flex', orientation: 'vertical' },
20
+ };
21
+
22
+ function BlockGroupToolbar() {
23
+ const {
24
+ blocksSelection,
25
+ clientIds,
26
+ groupingBlockName,
27
+ isGroupable,
28
+ } = useConvertToGroupButtonProps();
29
+ const { replaceBlocks } = useDispatch( blockEditorStore );
30
+
31
+ const { canRemove } = useSelect(
32
+ ( select ) => {
33
+ const { canRemoveBlocks } = select( blockEditorStore );
34
+ return {
35
+ canRemove: canRemoveBlocks( clientIds ),
36
+ };
37
+ },
38
+ [ clientIds ]
39
+ );
40
+
41
+ const onConvertToGroup = ( layout = 'group' ) => {
42
+ const newBlocks = switchToBlockType(
43
+ blocksSelection,
44
+ groupingBlockName
45
+ );
46
+
47
+ if ( newBlocks && newBlocks.length > 0 ) {
48
+ // Because the block is not in the store yet we can't use
49
+ // updateBlockAttributes so need to manually update attributes.
50
+ newBlocks[ 0 ].attributes.layout = layouts[ layout ];
51
+ replaceBlocks( clientIds, newBlocks );
52
+ }
53
+ };
54
+
55
+ const onConvertToRow = () => onConvertToGroup( 'row' );
56
+ const onConvertToStack = () => onConvertToGroup( 'stack' );
57
+
58
+ // Don't render the button if the current selection cannot be grouped.
59
+ // A good example is selecting multiple button blocks within a Buttons block:
60
+ // The group block is not a valid child of Buttons, so we should not show the button.
61
+ // Any blocks that are locked against removal also cannot be grouped.
62
+ if ( ! isGroupable || ! canRemove ) {
63
+ return null;
64
+ }
65
+
66
+ return (
67
+ <ToolbarGroup>
68
+ <ToolbarButton
69
+ icon={ group }
70
+ label={ _x( 'Group', 'verb' ) }
71
+ onClick={ onConvertToGroup }
72
+ />
73
+ <ToolbarButton
74
+ icon={ row }
75
+ label={ _x( 'Row', 'single horizontal line' ) }
76
+ onClick={ onConvertToRow }
77
+ />
78
+ <ToolbarButton
79
+ icon={ stack }
80
+ label={ _x( 'Stack', 'verb' ) }
81
+ onClick={ onConvertToStack }
82
+ />
83
+ </ToolbarGroup>
84
+ );
85
+ }
86
+
87
+ export default BlockGroupToolbar;
@@ -171,4 +171,7 @@ function CopyHandler( { children } ) {
171
171
  return <div ref={ useClipboardHandler() }>{ children }</div>;
172
172
  }
173
173
 
174
+ /**
175
+ * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/copy-handler/README.md
176
+ */
174
177
  export default CopyHandler;
@@ -0,0 +1,58 @@
1
+ # DateFormatPicker
2
+
3
+ The `DateFormatPicker` component renders controls that let the user choose a
4
+ _date format_. That is, how they want their dates to be formatted.
5
+
6
+ A user can pick _Default_ to use the default date format (usually set at the
7
+ site level).
8
+
9
+ Otherwise, a user may choose a suggested date format or type in their own date
10
+ format by selecting _Custom_.
11
+
12
+ All date format strings should be in the format accepted by by the [`dateI18n`
13
+ function in
14
+ `@wordpress/date`](https://github.com/WordPress/gutenberg/tree/trunk/packages/date#datei18n).
15
+
16
+ ## Usage
17
+
18
+ ```jsx
19
+ import { DateFormatPicker } from '@wordpress/block-editor';
20
+
21
+ const Example = () => {
22
+ const [ format, setFormat ] = useState( null );
23
+ return (
24
+ <DateFormatPicker
25
+ format={ format }
26
+ defaultFormat={ 'M j, Y' }
27
+ onChange={ ( nextFormat ) =>
28
+ setFormat( nextFormat );
29
+ }
30
+ />
31
+ );
32
+ };
33
+ ```
34
+
35
+ ## Props
36
+
37
+ ### `format`
38
+
39
+ The current date format selected by the user. If `null`, _Default_ is selected.
40
+
41
+ - Type: `string|null`
42
+ - Required: Yes
43
+
44
+ ### `defaultFormat`
45
+
46
+ The default format string. Used to show to the user what the date will look like
47
+ if _Default_ is selected.
48
+
49
+ - Type: `string`
50
+ - Required: Yes
51
+
52
+ ### `onChange`
53
+
54
+ Called when the user makes a selection, or when the user types in a date format.
55
+ `null` indicates that _Default_ is selected.
56
+
57
+ - Type: `( format: string|null ) => void`
58
+ - Required: Yes