@wordpress/block-library 9.24.0 → 9.26.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 (300) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/avatar/edit.js +84 -39
  3. package/build/avatar/edit.js.map +1 -1
  4. package/build/avatar/user-control.js +32 -17
  5. package/build/avatar/user-control.js.map +1 -1
  6. package/build/button/edit.js +29 -17
  7. package/build/button/edit.js.map +1 -1
  8. package/build/columns/edit.js +18 -22
  9. package/build/columns/edit.js.map +1 -1
  10. package/build/comment-author-name/edit.js +41 -12
  11. package/build/comment-author-name/edit.js.map +1 -1
  12. package/build/comment-date/edit.js +41 -12
  13. package/build/comment-date/edit.js.map +1 -1
  14. package/build/comment-edit-link/edit.js +27 -7
  15. package/build/comment-edit-link/edit.js.map +1 -1
  16. package/build/comments/edit/comments-inspector-controls.js +1 -3
  17. package/build/comments/edit/comments-inspector-controls.js.map +1 -1
  18. package/build/comments-pagination/edit.js +23 -9
  19. package/build/comments-pagination/edit.js.map +1 -1
  20. package/build/comments-title/edit.js +41 -12
  21. package/build/comments-title/edit.js.map +1 -1
  22. package/build/details/edit.js +27 -3
  23. package/build/details/edit.js.map +1 -1
  24. package/build/embed/edit.js +2 -4
  25. package/build/embed/edit.js.map +1 -1
  26. package/build/embed/embed-controls.js +41 -22
  27. package/build/embed/embed-controls.js.map +1 -1
  28. package/build/embed/variations.js +0 -10
  29. package/build/embed/variations.js.map +1 -1
  30. package/build/file/inspector.js +73 -30
  31. package/build/file/inspector.js.map +1 -1
  32. package/build/form/edit.js +67 -38
  33. package/build/form/edit.js.map +1 -1
  34. package/build/form/index.js +3 -3
  35. package/build/form/index.js.map +1 -1
  36. package/build/form-input/edit.js +47 -18
  37. package/build/form-input/edit.js.map +1 -1
  38. package/build/form-input/index.js +2 -1
  39. package/build/form-input/index.js.map +1 -1
  40. package/build/form-submission-notification/index.js +2 -1
  41. package/build/form-submission-notification/index.js.map +1 -1
  42. package/build/form-submit-button/index.js +2 -1
  43. package/build/form-submit-button/index.js.map +1 -1
  44. package/build/image/image.js +1 -0
  45. package/build/image/image.js.map +1 -1
  46. package/build/image/view.js +0 -3
  47. package/build/image/view.js.map +1 -1
  48. package/build/latest-posts/edit.js +154 -82
  49. package/build/latest-posts/edit.js.map +1 -1
  50. package/build/list/ordered-list-settings.js +131 -52
  51. package/build/list/ordered-list-settings.js.map +1 -1
  52. package/build/navigation/edit/index.js +93 -51
  53. package/build/navigation/edit/index.js.map +1 -1
  54. package/build/navigation/edit/overlay-menu-preview.js +43 -27
  55. package/build/navigation/edit/overlay-menu-preview.js.map +1 -1
  56. package/build/navigation-link/edit.js +11 -0
  57. package/build/navigation-link/edit.js.map +1 -1
  58. package/build/navigation-link/index.js +3 -0
  59. package/build/navigation-link/index.js.map +1 -1
  60. package/build/navigation-link/transforms.js +2 -0
  61. package/build/navigation-link/transforms.js.map +1 -1
  62. package/build/navigation-link/update-attributes.js +1 -0
  63. package/build/navigation-link/update-attributes.js.map +1 -1
  64. package/build/navigation-submenu/index.js +3 -0
  65. package/build/navigation-submenu/index.js.map +1 -1
  66. package/build/post-author/edit.js +75 -18
  67. package/build/post-author/edit.js.map +1 -1
  68. package/build/post-comments-count/index.js +3 -1
  69. package/build/post-comments-count/index.js.map +1 -1
  70. package/build/post-comments-count/transforms.js +26 -0
  71. package/build/post-comments-count/transforms.js.map +1 -0
  72. package/build/post-comments-link/index.js +3 -1
  73. package/build/post-comments-link/index.js.map +1 -1
  74. package/build/post-comments-link/transforms.js +26 -0
  75. package/build/post-comments-link/transforms.js.map +1 -0
  76. package/build/post-navigation-link/edit.js +72 -33
  77. package/build/post-navigation-link/edit.js.map +1 -1
  78. package/build/post-title/edit.js +56 -18
  79. package/build/post-title/edit.js.map +1 -1
  80. package/build/query/edit/enhanced-pagination-modal.js +1 -1
  81. package/build/query/edit/enhanced-pagination-modal.js.map +1 -1
  82. package/build/query/edit/inspector-controls/enhanced-pagination-control.js +3 -6
  83. package/build/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
  84. package/build/rss/edit.js +120 -46
  85. package/build/rss/edit.js.map +1 -1
  86. package/build/separator/edit.js +52 -20
  87. package/build/separator/edit.js.map +1 -1
  88. package/build/shortcode/index.js +2 -1
  89. package/build/shortcode/index.js.map +1 -1
  90. package/build/site-logo/edit.js +53 -19
  91. package/build/site-logo/edit.js.map +1 -1
  92. package/build/social-link/edit.js +21 -5
  93. package/build/social-link/edit.js.map +1 -1
  94. package/build/social-link/edit.native.js +13 -5
  95. package/build/social-link/edit.native.js.map +1 -1
  96. package/build/social-link/social-list.js +17 -25
  97. package/build/social-link/social-list.js.map +1 -1
  98. package/build/social-link/variations.js +53 -48
  99. package/build/social-link/variations.js.map +1 -1
  100. package/build/social-links/edit.js +38 -45
  101. package/build/social-links/edit.js.map +1 -1
  102. package/build/video/tracks-editor.js +63 -21
  103. package/build/video/tracks-editor.js.map +1 -1
  104. package/build-module/avatar/edit.js +83 -38
  105. package/build-module/avatar/edit.js.map +1 -1
  106. package/build-module/avatar/user-control.js +33 -18
  107. package/build-module/avatar/user-control.js.map +1 -1
  108. package/build-module/button/edit.js +30 -18
  109. package/build-module/button/edit.js.map +1 -1
  110. package/build-module/columns/edit.js +18 -22
  111. package/build-module/columns/edit.js.map +1 -1
  112. package/build-module/comment-author-name/edit.js +42 -13
  113. package/build-module/comment-author-name/edit.js.map +1 -1
  114. package/build-module/comment-date/edit.js +42 -13
  115. package/build-module/comment-date/edit.js.map +1 -1
  116. package/build-module/comment-edit-link/edit.js +28 -8
  117. package/build-module/comment-edit-link/edit.js.map +1 -1
  118. package/build-module/comments/edit/comments-inspector-controls.js +1 -3
  119. package/build-module/comments/edit/comments-inspector-controls.js.map +1 -1
  120. package/build-module/comments-pagination/edit.js +24 -10
  121. package/build-module/comments-pagination/edit.js.map +1 -1
  122. package/build-module/comments-title/edit.js +42 -13
  123. package/build-module/comments-title/edit.js.map +1 -1
  124. package/build-module/details/edit.js +29 -5
  125. package/build-module/details/edit.js.map +1 -1
  126. package/build-module/embed/edit.js +2 -4
  127. package/build-module/embed/edit.js.map +1 -1
  128. package/build-module/embed/embed-controls.js +42 -23
  129. package/build-module/embed/embed-controls.js.map +1 -1
  130. package/build-module/embed/variations.js +0 -10
  131. package/build-module/embed/variations.js.map +1 -1
  132. package/build-module/file/inspector.js +74 -31
  133. package/build-module/file/inspector.js.map +1 -1
  134. package/build-module/form/edit.js +68 -39
  135. package/build-module/form/edit.js.map +1 -1
  136. package/build-module/form/index.js +3 -3
  137. package/build-module/form/index.js.map +1 -1
  138. package/build-module/form-input/edit.js +48 -19
  139. package/build-module/form-input/edit.js.map +1 -1
  140. package/build-module/form-input/index.js +2 -1
  141. package/build-module/form-input/index.js.map +1 -1
  142. package/build-module/form-submission-notification/index.js +2 -1
  143. package/build-module/form-submission-notification/index.js.map +1 -1
  144. package/build-module/form-submit-button/index.js +2 -1
  145. package/build-module/form-submit-button/index.js.map +1 -1
  146. package/build-module/image/image.js +1 -0
  147. package/build-module/image/image.js.map +1 -1
  148. package/build-module/image/view.js +0 -3
  149. package/build-module/image/view.js.map +1 -1
  150. package/build-module/latest-posts/edit.js +155 -83
  151. package/build-module/latest-posts/edit.js.map +1 -1
  152. package/build-module/list/ordered-list-settings.js +132 -53
  153. package/build-module/list/ordered-list-settings.js.map +1 -1
  154. package/build-module/navigation/edit/index.js +94 -52
  155. package/build-module/navigation/edit/index.js.map +1 -1
  156. package/build-module/navigation/edit/overlay-menu-preview.js +44 -28
  157. package/build-module/navigation/edit/overlay-menu-preview.js.map +1 -1
  158. package/build-module/navigation-link/edit.js +11 -0
  159. package/build-module/navigation-link/edit.js.map +1 -1
  160. package/build-module/navigation-link/index.js +3 -0
  161. package/build-module/navigation-link/index.js.map +1 -1
  162. package/build-module/navigation-link/transforms.js +2 -0
  163. package/build-module/navigation-link/transforms.js.map +1 -1
  164. package/build-module/navigation-link/update-attributes.js +1 -0
  165. package/build-module/navigation-link/update-attributes.js.map +1 -1
  166. package/build-module/navigation-submenu/index.js +3 -0
  167. package/build-module/navigation-submenu/index.js.map +1 -1
  168. package/build-module/post-author/edit.js +76 -19
  169. package/build-module/post-author/edit.js.map +1 -1
  170. package/build-module/post-comments-count/index.js +3 -1
  171. package/build-module/post-comments-count/index.js.map +1 -1
  172. package/build-module/post-comments-count/transforms.js +19 -0
  173. package/build-module/post-comments-count/transforms.js.map +1 -0
  174. package/build-module/post-comments-link/index.js +3 -1
  175. package/build-module/post-comments-link/index.js.map +1 -1
  176. package/build-module/post-comments-link/transforms.js +19 -0
  177. package/build-module/post-comments-link/transforms.js.map +1 -0
  178. package/build-module/post-navigation-link/edit.js +73 -34
  179. package/build-module/post-navigation-link/edit.js.map +1 -1
  180. package/build-module/post-title/edit.js +57 -19
  181. package/build-module/post-title/edit.js.map +1 -1
  182. package/build-module/query/edit/enhanced-pagination-modal.js +1 -1
  183. package/build-module/query/edit/enhanced-pagination-modal.js.map +1 -1
  184. package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js +3 -6
  185. package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
  186. package/build-module/rss/edit.js +121 -47
  187. package/build-module/rss/edit.js.map +1 -1
  188. package/build-module/separator/edit.js +54 -22
  189. package/build-module/separator/edit.js.map +1 -1
  190. package/build-module/shortcode/index.js +2 -1
  191. package/build-module/shortcode/index.js.map +1 -1
  192. package/build-module/site-logo/edit.js +54 -20
  193. package/build-module/site-logo/edit.js.map +1 -1
  194. package/build-module/social-link/edit.js +24 -8
  195. package/build-module/social-link/edit.js.map +1 -1
  196. package/build-module/social-link/edit.native.js +15 -6
  197. package/build-module/social-link/edit.native.js.map +1 -1
  198. package/build-module/social-link/social-list.js +16 -21
  199. package/build-module/social-link/social-list.js.map +1 -1
  200. package/build-module/social-link/variations.js +53 -48
  201. package/build-module/social-link/variations.js.map +1 -1
  202. package/build-module/social-links/edit.js +40 -47
  203. package/build-module/social-links/edit.js.map +1 -1
  204. package/build-module/video/tracks-editor.js +65 -23
  205. package/build-module/video/tracks-editor.js.map +1 -1
  206. package/build-style/calendar/style-rtl.css +7 -7
  207. package/build-style/calendar/style.css +7 -7
  208. package/build-style/comments-pagination/editor-rtl.css +0 -12
  209. package/build-style/comments-pagination/editor.css +0 -14
  210. package/build-style/comments-pagination/style-rtl.css +0 -7
  211. package/build-style/comments-pagination/style.css +0 -9
  212. package/build-style/editor-rtl.css +9 -21
  213. package/build-style/editor.css +9 -23
  214. package/build-style/gallery/style-rtl.css +1 -0
  215. package/build-style/gallery/style.css +1 -0
  216. package/build-style/navigation/editor-rtl.css +8 -3
  217. package/build-style/navigation/editor.css +8 -3
  218. package/build-style/navigation/style-rtl.css +4 -0
  219. package/build-style/navigation/style.css +4 -0
  220. package/build-style/pullquote/editor-rtl.css +1 -1
  221. package/build-style/pullquote/editor.css +1 -1
  222. package/build-style/pullquote/style-rtl.css +2 -3
  223. package/build-style/pullquote/style.css +2 -3
  224. package/build-style/pullquote/theme-rtl.css +2 -2
  225. package/build-style/pullquote/theme.css +2 -2
  226. package/build-style/style-rtl.css +14 -17
  227. package/build-style/style.css +14 -19
  228. package/build-style/theme-rtl.css +2 -2
  229. package/build-style/theme.css +2 -2
  230. package/package.json +35 -35
  231. package/src/avatar/edit.js +99 -51
  232. package/src/avatar/user-control.js +34 -29
  233. package/src/button/edit.js +44 -29
  234. package/src/calendar/style.scss +10 -10
  235. package/src/columns/edit.js +20 -31
  236. package/src/comment-author-name/edit.js +54 -13
  237. package/src/comment-date/edit.js +50 -15
  238. package/src/comment-edit-link/edit.js +39 -11
  239. package/src/comments/edit/comments-inspector-controls.js +0 -2
  240. package/src/comments-pagination/edit.js +29 -9
  241. package/src/comments-pagination/editor.scss +0 -15
  242. package/src/comments-pagination/style.scss +0 -8
  243. package/src/comments-title/edit.js +53 -15
  244. package/src/details/edit.js +36 -4
  245. package/src/editor.scss +0 -1
  246. package/src/embed/edit.js +3 -5
  247. package/src/embed/embed-controls.js +55 -33
  248. package/src/embed/variations.js +0 -8
  249. package/src/file/inspector.js +99 -45
  250. package/src/form/block.json +1 -2
  251. package/src/form/edit.js +91 -47
  252. package/src/form/index.js +1 -0
  253. package/src/form-input/edit.js +56 -18
  254. package/src/form-input/index.js +1 -0
  255. package/src/form-submission-notification/index.js +1 -0
  256. package/src/form-submit-button/index.js +1 -0
  257. package/src/gallery/style.scss +1 -0
  258. package/src/image/image.js +1 -0
  259. package/src/image/index.php +4 -1
  260. package/src/image/view.js +0 -3
  261. package/src/latest-posts/edit.js +206 -98
  262. package/src/list/ordered-list-settings.js +172 -62
  263. package/src/navigation/edit/index.js +127 -64
  264. package/src/navigation/edit/overlay-menu-preview.js +43 -26
  265. package/src/navigation/editor.scss +8 -4
  266. package/src/navigation/style.scss +8 -0
  267. package/src/navigation-link/block.json +3 -0
  268. package/src/navigation-link/edit.js +14 -1
  269. package/src/navigation-link/index.php +4 -0
  270. package/src/navigation-link/transforms.js +2 -1
  271. package/src/navigation-link/update-attributes.js +1 -0
  272. package/src/navigation-submenu/block.json +3 -0
  273. package/src/navigation-submenu/index.php +4 -0
  274. package/src/post-author/edit.js +91 -27
  275. package/src/post-comments-count/index.js +2 -0
  276. package/src/post-comments-count/transforms.js +20 -0
  277. package/src/post-comments-link/index.js +2 -0
  278. package/src/post-comments-link/transforms.js +20 -0
  279. package/src/post-navigation-link/edit.js +96 -51
  280. package/src/post-title/edit.js +76 -24
  281. package/src/pullquote/editor.scss +1 -1
  282. package/src/pullquote/style.scss +2 -3
  283. package/src/pullquote/theme.scss +2 -2
  284. package/src/query/edit/enhanced-pagination-modal.js +1 -5
  285. package/src/query/edit/inspector-controls/enhanced-pagination-control.js +3 -13
  286. package/src/rss/edit.js +141 -55
  287. package/src/separator/edit.js +66 -21
  288. package/src/shortcode/block.json +2 -1
  289. package/src/site-logo/edit.js +69 -26
  290. package/src/site-title/index.php +1 -1
  291. package/src/social-link/edit.js +18 -7
  292. package/src/social-link/edit.native.js +10 -4
  293. package/src/social-link/index.php +62 -49
  294. package/src/social-link/social-list.js +15 -20
  295. package/src/social-link/variations.js +53 -48
  296. package/src/social-links/edit.js +38 -60
  297. package/src/video/tracks-editor.js +75 -22
  298. package/build-style/post-author/editor-rtl.css +0 -140
  299. package/build-style/post-author/editor.css +0 -140
  300. package/src/post-author/editor.scss +0 -7
@@ -9,6 +9,7 @@ import { postCommentsCount as icon } from '@wordpress/icons';
9
9
  import initBlock from '../utils/init-block';
10
10
  import metadata from './block.json';
11
11
  import edit from './edit';
12
+ import transforms from './transforms';
12
13
 
13
14
  const { name } = metadata;
14
15
  export { metadata, name };
@@ -16,6 +17,7 @@ export { metadata, name };
16
17
  export const settings = {
17
18
  icon,
18
19
  edit,
20
+ transforms,
19
21
  };
20
22
 
21
23
  export const init = () => initBlock( { name, metadata, settings } );
@@ -0,0 +1,20 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { createBlock } from '@wordpress/blocks';
5
+
6
+ const transforms = {
7
+ to: [
8
+ {
9
+ type: 'block',
10
+ blocks: [ 'core/post-comments-link' ],
11
+ transform: ( { textAlign } ) => {
12
+ return createBlock( 'core/post-comments-link', {
13
+ textAlign,
14
+ } );
15
+ },
16
+ },
17
+ ],
18
+ };
19
+
20
+ export default transforms;
@@ -9,6 +9,7 @@ import { postCommentsCount as icon } from '@wordpress/icons';
9
9
  import initBlock from '../utils/init-block';
10
10
  import metadata from './block.json';
11
11
  import edit from './edit';
12
+ import transforms from './transforms';
12
13
 
13
14
  const { name } = metadata;
14
15
  export { metadata, name };
@@ -16,6 +17,7 @@ export { metadata, name };
16
17
  export const settings = {
17
18
  edit,
18
19
  icon,
20
+ transforms,
19
21
  };
20
22
 
21
23
  export const init = () => initBlock( { name, metadata, settings } );
@@ -0,0 +1,20 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { createBlock } from '@wordpress/blocks';
5
+
6
+ const transforms = {
7
+ to: [
8
+ {
9
+ type: 'block',
10
+ blocks: [ 'core/post-comments-count' ],
11
+ transform: ( { textAlign } ) => {
12
+ return createBlock( 'core/post-comments-count', {
13
+ textAlign,
14
+ } );
15
+ },
16
+ },
17
+ ],
18
+ };
19
+
20
+ export default transforms;
@@ -9,9 +9,10 @@ import clsx from 'clsx';
9
9
  import {
10
10
  __experimentalToggleGroupControl as ToggleGroupControl,
11
11
  __experimentalToggleGroupControlOption as ToggleGroupControlOption,
12
+ __experimentalToolsPanel as ToolsPanel,
13
+ __experimentalToolsPanelItem as ToolsPanelItem,
12
14
  ToggleControl,
13
15
  SelectControl,
14
- PanelBody,
15
16
  } from '@wordpress/components';
16
17
  import {
17
18
  InspectorControls,
@@ -25,6 +26,11 @@ import { __, _x } from '@wordpress/i18n';
25
26
  import { useSelect } from '@wordpress/data';
26
27
  import { store as coreStore } from '@wordpress/core-data';
27
28
 
29
+ /**
30
+ * Internal dependencies
31
+ */
32
+ import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
33
+
28
34
  export default function PostNavigationLinkEdit( {
29
35
  context: { postType },
30
36
  attributes: {
@@ -94,73 +100,112 @@ export default function PostNavigationLinkEdit( {
94
100
  return [ selectOption, ...taxonomyOptions ];
95
101
  };
96
102
 
103
+ const dropdownMenuProps = useToolsPanelDropdownMenuProps();
104
+
97
105
  return (
98
106
  <>
99
107
  <InspectorControls>
100
- <PanelBody>
101
- <ToggleControl
102
- __nextHasNoMarginBottom
108
+ <ToolsPanel
109
+ label={ __( 'Settings' ) }
110
+ resetAll={ () => {
111
+ setAttributes( {
112
+ showTitle: false,
113
+ linkLabel: false,
114
+ arrow: 'none',
115
+ } );
116
+ } }
117
+ dropdownMenuProps={ dropdownMenuProps }
118
+ >
119
+ <ToolsPanelItem
103
120
  label={ __( 'Display the title as a link' ) }
104
- help={ __(
105
- 'If you have entered a custom label, it will be prepended before the title.'
106
- ) }
107
- checked={ !! showTitle }
108
- onChange={ () =>
109
- setAttributes( {
110
- showTitle: ! showTitle,
111
- } )
121
+ isShownByDefault
122
+ hasValue={ () => showTitle }
123
+ onDeselect={ () =>
124
+ setAttributes( { showTitle: false } )
112
125
  }
113
- />
114
- { showTitle && (
126
+ >
115
127
  <ToggleControl
116
128
  __nextHasNoMarginBottom
117
- label={ __(
118
- 'Include the label as part of the link'
129
+ label={ __( 'Display the title as a link' ) }
130
+ help={ __(
131
+ 'If you have entered a custom label, it will be prepended before the title.'
119
132
  ) }
120
- checked={ !! linkLabel }
133
+ checked={ !! showTitle }
121
134
  onChange={ () =>
122
135
  setAttributes( {
123
- linkLabel: ! linkLabel,
136
+ showTitle: ! showTitle,
124
137
  } )
125
138
  }
126
139
  />
140
+ </ToolsPanelItem>
141
+ { showTitle && (
142
+ <ToolsPanelItem
143
+ label={ __(
144
+ 'Include the label as part of the link'
145
+ ) }
146
+ isShownByDefault
147
+ hasValue={ () => !! linkLabel }
148
+ onDeselect={ () =>
149
+ setAttributes( { linkLabel: false } )
150
+ }
151
+ >
152
+ <ToggleControl
153
+ __nextHasNoMarginBottom
154
+ label={ __(
155
+ 'Include the label as part of the link'
156
+ ) }
157
+ checked={ !! linkLabel }
158
+ onChange={ () =>
159
+ setAttributes( {
160
+ linkLabel: ! linkLabel,
161
+ } )
162
+ }
163
+ />
164
+ </ToolsPanelItem>
127
165
  ) }
128
- <ToggleGroupControl
129
- __next40pxDefaultSize
130
- __nextHasNoMarginBottom
166
+ <ToolsPanelItem
131
167
  label={ __( 'Arrow' ) }
132
- value={ arrow }
133
- onChange={ ( value ) => {
134
- setAttributes( { arrow: value } );
135
- } }
136
- help={ __(
137
- 'A decorative arrow for the next and previous link.'
138
- ) }
139
- isBlock
168
+ isShownByDefault
169
+ hasValue={ () => arrow !== 'none' }
170
+ onDeselect={ () => setAttributes( { arrow: 'none' } ) }
140
171
  >
141
- <ToggleGroupControlOption
142
- value="none"
143
- label={ _x(
144
- 'None',
145
- 'Arrow option for Next/Previous link'
146
- ) }
147
- />
148
- <ToggleGroupControlOption
149
- value="arrow"
150
- label={ _x(
151
- 'Arrow',
152
- 'Arrow option for Next/Previous link'
153
- ) }
154
- />
155
- <ToggleGroupControlOption
156
- value="chevron"
157
- label={ _x(
158
- 'Chevron',
159
- 'Arrow option for Next/Previous link'
172
+ <ToggleGroupControl
173
+ __next40pxDefaultSize
174
+ __nextHasNoMarginBottom
175
+ label={ __( 'Arrow' ) }
176
+ value={ arrow }
177
+ onChange={ ( value ) => {
178
+ setAttributes( { arrow: value } );
179
+ } }
180
+ help={ __(
181
+ 'A decorative arrow for the next and previous link.'
160
182
  ) }
161
- />
162
- </ToggleGroupControl>
163
- </PanelBody>
183
+ isBlock
184
+ >
185
+ <ToggleGroupControlOption
186
+ value="none"
187
+ label={ _x(
188
+ 'None',
189
+ 'Arrow option for Next/Previous link'
190
+ ) }
191
+ />
192
+ <ToggleGroupControlOption
193
+ value="arrow"
194
+ label={ _x(
195
+ 'Arrow',
196
+ 'Arrow option for Next/Previous link'
197
+ ) }
198
+ />
199
+ <ToggleGroupControlOption
200
+ value="chevron"
201
+ label={ _x(
202
+ 'Chevron',
203
+ 'Arrow option for Next/Previous link'
204
+ ) }
205
+ />
206
+ </ToggleGroupControl>
207
+ </ToolsPanelItem>
208
+ </ToolsPanel>
164
209
  </InspectorControls>
165
210
  <InspectorControls group="advanced">
166
211
  <SelectControl
@@ -15,12 +15,22 @@ import {
15
15
  HeadingLevelDropdown,
16
16
  useBlockEditingMode,
17
17
  } from '@wordpress/block-editor';
18
- import { ToggleControl, TextControl, PanelBody } from '@wordpress/components';
18
+ import {
19
+ ToggleControl,
20
+ TextControl,
21
+ __experimentalToolsPanel as ToolsPanel,
22
+ __experimentalToolsPanelItem as ToolsPanelItem,
23
+ } from '@wordpress/components';
19
24
  import { __ } from '@wordpress/i18n';
20
25
  import { createBlock, getDefaultBlockName } from '@wordpress/blocks';
21
26
  import { useEntityProp, store as coreStore } from '@wordpress/core-data';
22
27
  import { useSelect } from '@wordpress/data';
23
28
 
29
+ /**
30
+ * Internal dependencies
31
+ */
32
+ import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
33
+
24
34
  export default function PostTitleEdit( {
25
35
  attributes: { level, levelOptions, textAlign, isLink, rel, linkTarget },
26
36
  setAttributes,
@@ -66,6 +76,7 @@ export default function PostTitleEdit( {
66
76
  } ),
67
77
  } );
68
78
  const blockEditingMode = useBlockEditingMode();
79
+ const dropdownMenuProps = useToolsPanelDropdownMenuProps();
69
80
 
70
81
  let titleElement = <TagName { ...blockProps }>{ __( 'Title' ) }</TagName>;
71
82
 
@@ -138,41 +149,82 @@ export default function PostTitleEdit( {
138
149
  />
139
150
  </BlockControls>
140
151
  <InspectorControls>
141
- <PanelBody title={ __( 'Settings' ) }>
142
- <ToggleControl
143
- __nextHasNoMarginBottom
152
+ <ToolsPanel
153
+ label={ __( 'Settings' ) }
154
+ resetAll={ () => {
155
+ setAttributes( {
156
+ rel: '',
157
+ linkTarget: '_self',
158
+ isLink: false,
159
+ } );
160
+ } }
161
+ dropdownMenuProps={ dropdownMenuProps }
162
+ >
163
+ <ToolsPanelItem
144
164
  label={ __( 'Make title a link' ) }
145
- onChange={ () =>
146
- setAttributes( { isLink: ! isLink } )
165
+ isShownByDefault
166
+ hasValue={ () => isLink }
167
+ onDeselect={ () =>
168
+ setAttributes( { isLink: false } )
147
169
  }
148
- checked={ isLink }
149
- />
170
+ >
171
+ <ToggleControl
172
+ __nextHasNoMarginBottom
173
+ label={ __( 'Make title a link' ) }
174
+ onChange={ () =>
175
+ setAttributes( { isLink: ! isLink } )
176
+ }
177
+ checked={ isLink }
178
+ />
179
+ </ToolsPanelItem>
150
180
  { isLink && (
151
181
  <>
152
- <ToggleControl
153
- __nextHasNoMarginBottom
182
+ <ToolsPanelItem
154
183
  label={ __( 'Open in new tab' ) }
155
- onChange={ ( value ) =>
184
+ isShownByDefault
185
+ hasValue={ () =>
186
+ linkTarget === '_blank'
187
+ }
188
+ onDeselect={ () =>
156
189
  setAttributes( {
157
- linkTarget: value
158
- ? '_blank'
159
- : '_self',
190
+ linkTarget: '_self',
160
191
  } )
161
192
  }
162
- checked={ linkTarget === '_blank' }
163
- />
164
- <TextControl
165
- __next40pxDefaultSize
166
- __nextHasNoMarginBottom
193
+ >
194
+ <ToggleControl
195
+ __nextHasNoMarginBottom
196
+ label={ __( 'Open in new tab' ) }
197
+ onChange={ ( value ) =>
198
+ setAttributes( {
199
+ linkTarget: value
200
+ ? '_blank'
201
+ : '_self',
202
+ } )
203
+ }
204
+ checked={ linkTarget === '_blank' }
205
+ />
206
+ </ToolsPanelItem>
207
+ <ToolsPanelItem
167
208
  label={ __( 'Link rel' ) }
168
- value={ rel }
169
- onChange={ ( newRel ) =>
170
- setAttributes( { rel: newRel } )
209
+ isShownByDefault
210
+ hasValue={ () => !! rel }
211
+ onDeselect={ () =>
212
+ setAttributes( { rel: '' } )
171
213
  }
172
- />
214
+ >
215
+ <TextControl
216
+ __next40pxDefaultSize
217
+ __nextHasNoMarginBottom
218
+ label={ __( 'Link rel' ) }
219
+ value={ rel }
220
+ onChange={ ( newRel ) =>
221
+ setAttributes( { rel: newRel } )
222
+ }
223
+ />
224
+ </ToolsPanelItem>
173
225
  </>
174
226
  ) }
175
- </PanelBody>
227
+ </ToolsPanel>
176
228
  </InspectorControls>
177
229
  </>
178
230
  ) }
@@ -12,6 +12,6 @@
12
12
  }
13
13
  }
14
14
 
15
- .wp-block-pullquote .wp-block-pullquote__citation {
15
+ .wp-block-pullquote__citation {
16
16
  color: inherit;
17
17
  }
@@ -6,8 +6,7 @@
6
6
  padding: 4em 0;
7
7
 
8
8
  p,
9
- blockquote,
10
- cite {
9
+ blockquote {
11
10
  color: inherit;
12
11
  }
13
12
 
@@ -74,7 +73,7 @@
74
73
  }
75
74
  }
76
75
 
77
- .wp-block-pullquote cite {
76
+ .wp-block-pullquote :where(cite) {
78
77
  color: inherit;
79
78
  display: block;
80
79
  }
@@ -4,8 +4,8 @@
4
4
  margin-bottom: 1.75em;
5
5
  color: currentColor;
6
6
 
7
- cite,
8
- footer,
7
+ :where(cite),
8
+ :where(footer),
9
9
  &__citation {
10
10
  color: currentColor;
11
11
  text-transform: uppercase;
@@ -27,11 +27,7 @@ export default function EnhancedPaginationModal( {
27
27
  useUnsupportedBlocks( clientId );
28
28
 
29
29
  useEffect( () => {
30
- if (
31
- enhancedPagination &&
32
- hasUnsupportedBlocks &&
33
- ! window.__experimentalFullPageClientSideNavigation
34
- ) {
30
+ if ( enhancedPagination && hasUnsupportedBlocks ) {
35
31
  setAttributes( { enhancedPagination: false } );
36
32
  setOpen( true );
37
33
  }
@@ -15,17 +15,11 @@ export default function EnhancedPaginationControl( {
15
15
  clientId,
16
16
  } ) {
17
17
  const { hasUnsupportedBlocks } = useUnsupportedBlocks( clientId );
18
- const fullPageClientSideNavigation =
19
- window.__experimentalFullPageClientSideNavigation;
20
18
 
21
19
  let help = __(
22
20
  'Reload the full page—instead of just the posts list—when visitors navigate between pages.'
23
21
  );
24
- if ( fullPageClientSideNavigation ) {
25
- help = __(
26
- 'Experimental full-page client-side navigation setting enabled.'
27
- );
28
- } else if ( hasUnsupportedBlocks ) {
22
+ if ( hasUnsupportedBlocks ) {
29
23
  help = __(
30
24
  'Enhancement disabled because there are non-compatible blocks inside the Query block.'
31
25
  );
@@ -37,12 +31,8 @@ export default function EnhancedPaginationControl( {
37
31
  __nextHasNoMarginBottom
38
32
  label={ __( 'Reload full page' ) }
39
33
  help={ help }
40
- checked={
41
- ! enhancedPagination && ! fullPageClientSideNavigation
42
- }
43
- disabled={
44
- hasUnsupportedBlocks || fullPageClientSideNavigation
45
- }
34
+ checked={ ! enhancedPagination }
35
+ disabled={ hasUnsupportedBlocks }
46
36
  onChange={ ( value ) => {
47
37
  setAttributes( {
48
38
  enhancedPagination: ! value,