@wordpress/block-library 8.18.1-next.5a1d1283.0 → 8.19.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.
- package/CHANGELOG.md +2 -0
- package/README.md +1 -1
- package/build/block/edit.js +53 -2
- package/build/block/edit.js.map +1 -1
- package/build/button/edit.js +7 -4
- package/build/button/edit.js.map +1 -1
- package/build/button/index.js +11 -2
- package/build/button/index.js.map +1 -1
- package/build/button/save.js +10 -4
- package/build/button/save.js.map +1 -1
- package/build/buttons/edit.js +12 -3
- package/build/buttons/edit.js.map +1 -1
- package/build/code/edit.js +8 -2
- package/build/code/edit.js.map +1 -1
- package/build/code/index.js +7 -1
- package/build/code/index.js.map +1 -1
- package/build/column/index.js +1 -0
- package/build/column/index.js.map +1 -1
- package/build/columns/index.js +2 -0
- package/build/columns/index.js.map +1 -1
- package/build/file/edit.native.js +1 -1
- package/build/file/edit.native.js.map +1 -1
- package/build/file/index.js +2 -1
- package/build/file/index.js.map +1 -1
- package/build/file/utils/index.js +1 -15
- package/build/file/utils/index.js.map +1 -1
- package/build/file/view.js +14 -1
- package/build/file/view.js.map +1 -1
- package/build/footnotes/edit.js +12 -2
- package/build/footnotes/edit.js.map +1 -1
- package/build/gallery/edit.js +1 -1
- package/build/gallery/edit.js.map +1 -1
- package/build/group/edit.js +0 -1
- package/build/group/edit.js.map +1 -1
- package/build/group/index.js +4 -0
- package/build/group/index.js.map +1 -1
- package/build/heading/edit.js +0 -1
- package/build/heading/edit.js.map +1 -1
- package/build/heading/index.js +2 -0
- package/build/heading/index.js.map +1 -1
- package/build/heading/transforms.js +3 -6
- package/build/heading/transforms.js.map +1 -1
- package/build/image/deprecated.js +191 -7
- package/build/image/deprecated.js.map +1 -1
- package/build/image/edit.js +27 -12
- package/build/image/edit.js.map +1 -1
- package/build/image/image.js +75 -40
- package/build/image/image.js.map +1 -1
- package/build/image/index.js +7 -4
- package/build/image/index.js.map +1 -1
- package/build/image/{view-interactivity.js → view.js} +1 -1
- package/build/image/view.js.map +1 -0
- package/build/list/deprecated.js +93 -1
- package/build/list/deprecated.js.map +1 -1
- package/build/list/edit.js +10 -10
- package/build/list/edit.js.map +1 -1
- package/build/list/ordered-list-settings.js +10 -10
- package/build/list/ordered-list-settings.js.map +1 -1
- package/build/list/save.js +4 -2
- package/build/list/save.js.map +1 -1
- package/build/list/utils.js +21 -2
- package/build/list/utils.js.map +1 -1
- package/build/navigation/constants.js +1 -1
- package/build/navigation/constants.js.map +1 -1
- package/build/navigation/index.js +4 -2
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/view.js +168 -82
- package/build/navigation/view.js.map +1 -1
- package/build/navigation-link/edit.js +3 -9
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-link/transforms.js +24 -0
- package/build/navigation-link/transforms.js.map +1 -1
- package/build/page-list/edit.js +2 -1
- package/build/page-list/edit.js.map +1 -1
- package/build/post-comments-form/edit.js +10 -2
- package/build/post-comments-form/edit.js.map +1 -1
- package/build/post-comments-form/form.js +5 -3
- package/build/post-comments-form/form.js.map +1 -1
- package/build/post-content/edit.js +8 -7
- package/build/post-content/edit.js.map +1 -1
- package/build/post-content/index.js +3 -0
- package/build/post-content/index.js.map +1 -1
- package/build/post-featured-image/overlay.js +2 -1
- package/build/post-featured-image/overlay.js.map +1 -1
- package/build/preformatted/edit.js +4 -1
- package/build/preformatted/edit.js.map +1 -1
- package/build/preformatted/index.js +1 -1
- package/build/preformatted/index.js.map +1 -1
- package/build/pullquote/deprecated.js +6 -7
- package/build/pullquote/deprecated.js.map +1 -1
- package/build/query/edit/enhanced-pagination-modal.js +56 -0
- package/build/query/edit/enhanced-pagination-modal.js.map +1 -0
- package/build/query/edit/inspector-controls/enhanced-pagination-control.js +42 -0
- package/build/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -0
- package/build/query/edit/inspector-controls/index.js +8 -25
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/query/edit/query-content.js +8 -2
- package/build/query/edit/query-content.js.map +1 -1
- package/build/query/utils.js +19 -0
- package/build/query/utils.js.map +1 -1
- package/build/query/view.js +4 -5
- package/build/query/view.js.map +1 -1
- package/build/search/index.js +1 -0
- package/build/search/index.js.map +1 -1
- package/build/search/view.js +81 -150
- package/build/search/view.js.map +1 -1
- package/build/social-link/edit.native.js +3 -1
- package/build/social-link/edit.native.js.map +1 -1
- package/build/table/edit.js +7 -7
- package/build/table/edit.js.map +1 -1
- package/build/table-of-contents/edit.js +2 -130
- package/build/table-of-contents/edit.js.map +1 -1
- package/build/table-of-contents/hooks.js +145 -0
- package/build/table-of-contents/hooks.js.map +1 -0
- package/build/table-of-contents/index.js +2 -1
- package/build/table-of-contents/index.js.map +1 -1
- package/build/verse/edit.js +4 -1
- package/build/verse/edit.js.map +1 -1
- package/build/verse/index.js +1 -1
- package/build/verse/index.js.map +1 -1
- package/build-module/block/edit.js +54 -3
- package/build-module/block/edit.js.map +1 -1
- package/build-module/button/edit.js +7 -4
- package/build-module/button/edit.js.map +1 -1
- package/build-module/button/index.js +11 -2
- package/build-module/button/index.js.map +1 -1
- package/build-module/button/save.js +10 -4
- package/build-module/button/save.js.map +1 -1
- package/build-module/buttons/edit.js +12 -3
- package/build-module/buttons/edit.js.map +1 -1
- package/build-module/code/edit.js +8 -2
- package/build-module/code/edit.js.map +1 -1
- package/build-module/code/index.js +7 -1
- package/build-module/code/index.js.map +1 -1
- package/build-module/column/index.js +1 -0
- package/build-module/column/index.js.map +1 -1
- package/build-module/columns/index.js +2 -0
- package/build-module/columns/index.js.map +1 -1
- package/build-module/file/edit.native.js +1 -1
- package/build-module/file/edit.native.js.map +1 -1
- package/build-module/file/index.js +2 -1
- package/build-module/file/index.js.map +1 -1
- package/build-module/file/utils/index.js +0 -13
- package/build-module/file/utils/index.js.map +1 -1
- package/build-module/file/view.js +14 -2
- package/build-module/file/view.js.map +1 -1
- package/build-module/footnotes/edit.js +12 -2
- package/build-module/footnotes/edit.js.map +1 -1
- package/build-module/gallery/edit.js +1 -1
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/group/edit.js +0 -1
- package/build-module/group/edit.js.map +1 -1
- package/build-module/group/index.js +4 -0
- package/build-module/group/index.js.map +1 -1
- package/build-module/heading/edit.js +0 -1
- package/build-module/heading/edit.js.map +1 -1
- package/build-module/heading/index.js +2 -0
- package/build-module/heading/index.js.map +1 -1
- package/build-module/heading/transforms.js +3 -6
- package/build-module/heading/transforms.js.map +1 -1
- package/build-module/image/deprecated.js +191 -7
- package/build-module/image/deprecated.js.map +1 -1
- package/build-module/image/edit.js +27 -12
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/image.js +77 -42
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/index.js +7 -4
- package/build-module/image/index.js.map +1 -1
- package/build-module/image/{view-interactivity.js → view.js} +1 -1
- package/build-module/image/view.js.map +1 -0
- package/build-module/list/deprecated.js +95 -3
- package/build-module/list/deprecated.js.map +1 -1
- package/build-module/list/edit.js +10 -10
- package/build-module/list/edit.js.map +1 -1
- package/build-module/list/ordered-list-settings.js +10 -10
- package/build-module/list/ordered-list-settings.js.map +1 -1
- package/build-module/list/save.js +4 -2
- package/build-module/list/save.js.map +1 -1
- package/build-module/list/utils.js +20 -2
- package/build-module/list/utils.js.map +1 -1
- package/build-module/navigation/constants.js +1 -1
- package/build-module/navigation/constants.js.map +1 -1
- package/build-module/navigation/index.js +4 -2
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigation/view.js +168 -83
- package/build-module/navigation/view.js.map +1 -1
- package/build-module/navigation-link/edit.js +3 -9
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-link/transforms.js +24 -0
- package/build-module/navigation-link/transforms.js.map +1 -1
- package/build-module/page-list/edit.js +2 -1
- package/build-module/page-list/edit.js.map +1 -1
- package/build-module/post-comments-form/edit.js +10 -2
- package/build-module/post-comments-form/edit.js.map +1 -1
- package/build-module/post-comments-form/form.js +5 -3
- package/build-module/post-comments-form/form.js.map +1 -1
- package/build-module/post-content/edit.js +8 -7
- package/build-module/post-content/edit.js.map +1 -1
- package/build-module/post-content/index.js +3 -0
- package/build-module/post-content/index.js.map +1 -1
- package/build-module/post-featured-image/overlay.js +2 -1
- package/build-module/post-featured-image/overlay.js.map +1 -1
- package/build-module/preformatted/edit.js +4 -1
- package/build-module/preformatted/edit.js.map +1 -1
- package/build-module/preformatted/index.js +1 -1
- package/build-module/preformatted/index.js.map +1 -1
- package/build-module/pullquote/deprecated.js +6 -7
- package/build-module/pullquote/deprecated.js.map +1 -1
- package/build-module/query/edit/enhanced-pagination-modal.js +50 -0
- package/build-module/query/edit/enhanced-pagination-modal.js.map +1 -0
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js +35 -0
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -0
- package/build-module/query/edit/inspector-controls/index.js +9 -26
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/query/edit/query-content.js +8 -2
- package/build-module/query/edit/query-content.js.map +1 -1
- package/build-module/query/utils.js +17 -0
- package/build-module/query/utils.js.map +1 -1
- package/build-module/query/view.js +4 -5
- package/build-module/query/view.js.map +1 -1
- package/build-module/search/index.js +1 -0
- package/build-module/search/index.js.map +1 -1
- package/build-module/search/view.js +81 -151
- package/build-module/search/view.js.map +1 -1
- package/build-module/social-link/edit.native.js +3 -1
- package/build-module/social-link/edit.native.js.map +1 -1
- package/build-module/table/edit.js +7 -7
- package/build-module/table/edit.js.map +1 -1
- package/build-module/table-of-contents/edit.js +3 -131
- package/build-module/table-of-contents/edit.js.map +1 -1
- package/build-module/table-of-contents/hooks.js +137 -0
- package/build-module/table-of-contents/hooks.js.map +1 -0
- package/build-module/table-of-contents/index.js +2 -1
- package/build-module/table-of-contents/index.js.map +1 -1
- package/build-module/verse/edit.js +4 -1
- package/build-module/verse/edit.js.map +1 -1
- package/build-module/verse/index.js +1 -1
- package/build-module/verse/index.js.map +1 -1
- package/build-style/cover/style-rtl.css +9 -0
- package/build-style/cover/style.css +9 -0
- package/build-style/editor-rtl.css +15 -9
- package/build-style/editor.css +15 -9
- package/build-style/file/style-rtl.css +5 -0
- package/build-style/file/style.css +5 -0
- package/build-style/heading/style-rtl.css +13 -0
- package/build-style/heading/style.css +13 -0
- package/build-style/navigation-link/editor-rtl.css +0 -9
- package/build-style/navigation-link/editor.css +0 -9
- package/build-style/paragraph/editor-rtl.css +5 -0
- package/build-style/paragraph/editor.css +5 -0
- package/build-style/paragraph/style-rtl.css +5 -0
- package/build-style/paragraph/style.css +5 -0
- package/build-style/post-navigation-link/style-rtl.css +3 -0
- package/build-style/post-navigation-link/style.css +3 -0
- package/build-style/query/editor-rtl.css +10 -0
- package/build-style/query/editor.css +10 -0
- package/build-style/query/style-rtl.css +1 -1
- package/build-style/query/style.css +1 -1
- package/build-style/reset-rtl.css +27 -27
- package/build-style/reset.css +27 -27
- package/build-style/style-rtl.css +35 -0
- package/build-style/style.css +35 -0
- package/package.json +32 -33
- package/src/audio/test/__snapshots__/edit.native.js.snap +78 -106
- package/src/avatar/index.php +2 -2
- package/src/block/edit.js +58 -2
- package/src/block/test/edit.native.js +2 -3
- package/src/button/block.json +11 -2
- package/src/button/edit.js +27 -11
- package/src/button/save.js +10 -4
- package/src/buttons/edit.js +13 -3
- package/src/buttons/test/edit.native.js +28 -24
- package/src/calendar/index.php +2 -2
- package/src/code/block.json +2 -1
- package/src/code/edit.js +13 -1
- package/src/code/index.js +5 -0
- package/src/column/block.json +1 -0
- package/src/columns/block.json +2 -0
- package/src/comment-template/index.php +1 -1
- package/src/comments-pagination-next/index.php +1 -1
- package/src/comments-pagination-previous/index.php +1 -1
- package/src/cover/style.scss +12 -1
- package/src/cover/test/edit.js +7 -7
- package/src/cover/test/edit.native.js +18 -27
- package/src/embed/test/index.native.js +30 -45
- package/src/file/block.json +2 -1
- package/src/file/edit.native.js +1 -1
- package/src/file/index.php +19 -21
- package/src/file/style.scss +6 -1
- package/src/file/test/__snapshots__/edit.native.js.snap +162 -218
- package/src/file/utils/index.js +0 -15
- package/src/file/view.js +14 -5
- package/src/footnotes/edit.js +13 -1
- package/src/gallery/edit.js +1 -1
- package/src/gallery/index.php +1 -1
- package/src/group/block.json +4 -0
- package/src/group/edit.js +0 -1
- package/src/heading/block.json +2 -0
- package/src/heading/edit.js +0 -1
- package/src/heading/style.scss +4 -0
- package/src/heading/transforms.js +1 -6
- package/src/image/block.json +7 -4
- package/src/image/deprecated.js +210 -7
- package/src/image/edit.js +43 -29
- package/src/image/image.js +86 -43
- package/src/image/index.php +251 -28
- package/src/latest-posts/index.php +1 -1
- package/src/list/deprecated.js +84 -3
- package/src/list/edit.js +6 -3
- package/src/list/ordered-list-settings.js +20 -5
- package/src/list/save.js +10 -1
- package/src/list/test/edit.native.js +2 -4
- package/src/list/utils.js +22 -1
- package/src/navigation/block.json +4 -2
- package/src/navigation/constants.js +1 -0
- package/src/navigation/index.php +85 -123
- package/src/navigation/view.js +192 -96
- package/src/navigation-link/edit.js +21 -36
- package/src/navigation-link/editor.scss +0 -8
- package/src/navigation-link/transforms.js +22 -0
- package/src/page-list/edit.js +2 -1
- package/src/paragraph/editor.scss +5 -0
- package/src/paragraph/style.scss +5 -0
- package/src/pattern/index.php +2 -2
- package/src/post-comments-form/edit.js +10 -0
- package/src/post-comments-form/form.js +7 -1
- package/src/post-content/block.json +3 -0
- package/src/post-content/edit.js +14 -6
- package/src/post-excerpt/index.php +2 -2
- package/src/post-featured-image/index.php +2 -2
- package/src/post-featured-image/overlay.js +1 -0
- package/src/post-navigation-link/index.php +0 -5
- package/src/post-navigation-link/style.scss +4 -0
- package/src/post-template/index.php +1 -1
- package/src/post-terms/index.php +5 -2
- package/src/preformatted/edit.js +5 -0
- package/src/preformatted/index.js +1 -1
- package/src/pullquote/deprecated.js +8 -13
- package/src/query/edit/enhanced-pagination-modal.js +65 -0
- package/src/query/edit/inspector-controls/enhanced-pagination-control.js +49 -0
- package/src/query/edit/inspector-controls/index.js +9 -45
- package/src/query/edit/query-content.js +8 -0
- package/src/query/editor.scss +10 -0
- package/src/query/index.php +29 -16
- package/src/query/style.scss +2 -2
- package/src/query/utils.js +22 -0
- package/src/query/view.js +5 -5
- package/src/query-pagination-next/index.php +1 -1
- package/src/query-pagination-previous/index.php +1 -1
- package/src/reset.scss +1 -1
- package/src/search/block.json +1 -0
- package/src/search/index.php +45 -4
- package/src/search/test/__snapshots__/edit.native.js.snap +265 -363
- package/src/search/view.js +70 -169
- package/src/social-link/edit.native.js +1 -1
- package/src/social-link/editor.native.scss +4 -0
- package/src/table/edit.js +21 -19
- package/src/table-of-contents/block.json +2 -1
- package/src/table-of-contents/edit.js +5 -162
- package/src/table-of-contents/hooks.js +156 -0
- package/src/verse/edit.js +5 -0
- package/src/verse/index.js +1 -1
- package/src/verse/test/edit.native.js +2 -3
- package/build/file/view-interactivity.js +0 -22
- package/build/file/view-interactivity.js.map +0 -1
- package/build/image/view-interactivity.js.map +0 -1
- package/build/navigation/view-interactivity.js +0 -172
- package/build/navigation/view-interactivity.js.map +0 -1
- package/build/navigation/view-modal.js +0 -115
- package/build/navigation/view-modal.js.map +0 -1
- package/build-module/file/view-interactivity.js +0 -18
- package/build-module/file/view-interactivity.js.map +0 -1
- package/build-module/image/view-interactivity.js.map +0 -1
- package/build-module/navigation/view-interactivity.js +0 -169
- package/build-module/navigation/view-interactivity.js.map +0 -1
- package/build-module/navigation/view-modal.js +0 -112
- package/build-module/navigation/view-modal.js.map +0 -1
- package/src/file/view-interactivity.js +0 -18
- package/src/navigation/view-interactivity.js +0 -196
- package/src/navigation/view-modal.js +0 -127
- /package/src/image/{view-interactivity.js → view.js} +0 -0
package/src/code/edit.js
CHANGED
|
@@ -3,20 +3,32 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
5
5
|
import { RichText, useBlockProps } from '@wordpress/block-editor';
|
|
6
|
+
import { createBlock, getDefaultBlockName } from '@wordpress/blocks';
|
|
6
7
|
|
|
7
|
-
export default function CodeEdit( {
|
|
8
|
+
export default function CodeEdit( {
|
|
9
|
+
attributes,
|
|
10
|
+
setAttributes,
|
|
11
|
+
onRemove,
|
|
12
|
+
insertBlocksAfter,
|
|
13
|
+
mergeBlocks,
|
|
14
|
+
} ) {
|
|
8
15
|
const blockProps = useBlockProps();
|
|
9
16
|
return (
|
|
10
17
|
<pre { ...blockProps }>
|
|
11
18
|
<RichText
|
|
12
19
|
tagName="code"
|
|
20
|
+
identifier="content"
|
|
13
21
|
value={ attributes.content }
|
|
14
22
|
onChange={ ( content ) => setAttributes( { content } ) }
|
|
15
23
|
onRemove={ onRemove }
|
|
24
|
+
onMerge={ mergeBlocks }
|
|
16
25
|
placeholder={ __( 'Write code…' ) }
|
|
17
26
|
aria-label={ __( 'Code' ) }
|
|
18
27
|
preserveWhiteSpace
|
|
19
28
|
__unstablePastePlainText
|
|
29
|
+
__unstableOnSplitAtDoubleLineEnd={ () =>
|
|
30
|
+
insertBlocksAfter( createBlock( getDefaultBlockName() ) )
|
|
31
|
+
}
|
|
20
32
|
/>
|
|
21
33
|
</pre>
|
|
22
34
|
);
|
package/src/code/index.js
CHANGED
|
@@ -29,6 +29,11 @@ export const settings = {
|
|
|
29
29
|
/* eslint-enable @wordpress/i18n-no-collapsible-whitespace */
|
|
30
30
|
},
|
|
31
31
|
},
|
|
32
|
+
merge( attributes, attributesToMerge ) {
|
|
33
|
+
return {
|
|
34
|
+
content: attributes.content + '\n\n' + attributesToMerge.content,
|
|
35
|
+
};
|
|
36
|
+
},
|
|
32
37
|
transforms,
|
|
33
38
|
edit,
|
|
34
39
|
save,
|
package/src/column/block.json
CHANGED
package/src/columns/block.json
CHANGED
|
@@ -28,7 +28,7 @@ function block_core_comment_template_render_comments( $comments, $block ) {
|
|
|
28
28
|
$content = '';
|
|
29
29
|
foreach ( $comments as $comment ) {
|
|
30
30
|
$comment_id = $comment->comment_ID;
|
|
31
|
-
$filter_block_context = static function( $context ) use ( $comment_id ) {
|
|
31
|
+
$filter_block_context = static function ( $context ) use ( $comment_id ) {
|
|
32
32
|
$context['commentId'] = $comment_id;
|
|
33
33
|
return $context;
|
|
34
34
|
};
|
|
@@ -26,7 +26,7 @@ function render_block_core_comments_pagination_next( $attributes, $content, $blo
|
|
|
26
26
|
$label = isset( $attributes['label'] ) && ! empty( $attributes['label'] ) ? $attributes['label'] : $default_label;
|
|
27
27
|
$pagination_arrow = get_comments_pagination_arrow( $block, 'next' );
|
|
28
28
|
|
|
29
|
-
$filter_link_attributes = static function() {
|
|
29
|
+
$filter_link_attributes = static function () {
|
|
30
30
|
return get_block_wrapper_attributes();
|
|
31
31
|
};
|
|
32
32
|
add_filter( 'next_comments_link_attributes', $filter_link_attributes );
|
|
@@ -22,7 +22,7 @@ function render_block_core_comments_pagination_previous( $attributes, $content,
|
|
|
22
22
|
$label = $pagination_arrow . $label;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
$filter_link_attributes = static function() {
|
|
25
|
+
$filter_link_attributes = static function () {
|
|
26
26
|
return get_block_wrapper_attributes();
|
|
27
27
|
};
|
|
28
28
|
add_filter( 'previous_comments_link_attributes', $filter_link_attributes );
|
package/src/cover/style.scss
CHANGED
|
@@ -171,8 +171,19 @@
|
|
|
171
171
|
&.has-custom-content-position.has-custom-content-position {
|
|
172
172
|
.wp-block-cover__inner-container {
|
|
173
173
|
margin: 0;
|
|
174
|
-
width: auto;
|
|
175
174
|
}
|
|
175
|
+
&.is-position-top-left,
|
|
176
|
+
&.is-position-top-right,
|
|
177
|
+
&.is-position-center-left,
|
|
178
|
+
&.is-position-center-right,
|
|
179
|
+
&.is-position-bottom-left,
|
|
180
|
+
&.is-position-bottom-right {
|
|
181
|
+
.wp-block-cover__inner-container {
|
|
182
|
+
margin: 0;
|
|
183
|
+
width: auto;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
176
187
|
}
|
|
177
188
|
|
|
178
189
|
// Extra specificity for in edit mode where other styles would override it otherwise.
|
package/src/cover/test/edit.js
CHANGED
|
@@ -47,7 +47,7 @@ async function setup( attributes, useCoreBlocks, customSettings ) {
|
|
|
47
47
|
|
|
48
48
|
async function createAndSelectBlock() {
|
|
49
49
|
await userEvent.click(
|
|
50
|
-
screen.getByRole( '
|
|
50
|
+
screen.getByRole( 'option', {
|
|
51
51
|
name: 'Color: Black',
|
|
52
52
|
} )
|
|
53
53
|
);
|
|
@@ -72,7 +72,7 @@ describe( 'Cover block', () => {
|
|
|
72
72
|
|
|
73
73
|
test( 'can set overlay color using color picker on block placeholder', async () => {
|
|
74
74
|
const { container } = await setup();
|
|
75
|
-
const colorPicker = screen.getByRole( '
|
|
75
|
+
const colorPicker = screen.getByRole( 'option', {
|
|
76
76
|
name: 'Color: Black',
|
|
77
77
|
} );
|
|
78
78
|
await userEvent.click( colorPicker );
|
|
@@ -96,7 +96,7 @@ describe( 'Cover block', () => {
|
|
|
96
96
|
await setup();
|
|
97
97
|
|
|
98
98
|
await userEvent.click(
|
|
99
|
-
screen.getByRole( '
|
|
99
|
+
screen.getByRole( 'option', {
|
|
100
100
|
name: 'Color: Black',
|
|
101
101
|
} )
|
|
102
102
|
);
|
|
@@ -389,7 +389,7 @@ describe( 'Cover block', () => {
|
|
|
389
389
|
describe( 'isDark settings', () => {
|
|
390
390
|
test( 'should toggle is-light class if background changed from light to dark', async () => {
|
|
391
391
|
await setup();
|
|
392
|
-
const colorPicker = screen.getByRole( '
|
|
392
|
+
const colorPicker = screen.getByRole( 'option', {
|
|
393
393
|
name: 'Color: White',
|
|
394
394
|
} );
|
|
395
395
|
await userEvent.click( colorPicker );
|
|
@@ -405,7 +405,7 @@ describe( 'Cover block', () => {
|
|
|
405
405
|
} )
|
|
406
406
|
);
|
|
407
407
|
await userEvent.click( screen.getByText( 'Overlay' ) );
|
|
408
|
-
const popupColorPicker = screen.getByRole( '
|
|
408
|
+
const popupColorPicker = screen.getByRole( 'option', {
|
|
409
409
|
name: 'Color: Black',
|
|
410
410
|
} );
|
|
411
411
|
await userEvent.click( popupColorPicker );
|
|
@@ -413,7 +413,7 @@ describe( 'Cover block', () => {
|
|
|
413
413
|
} );
|
|
414
414
|
test( 'should remove is-light class if overlay color is removed', async () => {
|
|
415
415
|
await setup();
|
|
416
|
-
const colorPicker = screen.getByRole( '
|
|
416
|
+
const colorPicker = screen.getByRole( 'option', {
|
|
417
417
|
name: 'Color: White',
|
|
418
418
|
} );
|
|
419
419
|
await userEvent.click( colorPicker );
|
|
@@ -428,7 +428,7 @@ describe( 'Cover block', () => {
|
|
|
428
428
|
await userEvent.click( screen.getByText( 'Overlay' ) );
|
|
429
429
|
// The default color is black, so clicking the black color option will remove the background color,
|
|
430
430
|
// which should remove the isDark setting and assign the is-light class.
|
|
431
|
-
const popupColorPicker = screen.getByRole( '
|
|
431
|
+
const popupColorPicker = screen.getByRole( 'option', {
|
|
432
432
|
name: 'Color: White',
|
|
433
433
|
} );
|
|
434
434
|
await userEvent.click( popupColorPicker );
|
|
@@ -169,9 +169,8 @@ describe( 'when an image is attached', () => {
|
|
|
169
169
|
/>
|
|
170
170
|
);
|
|
171
171
|
fireEvent.press( screen.getByLabelText( 'Edit image' ) );
|
|
172
|
-
const [ clearMediaButton ] =
|
|
173
|
-
'Clear Media'
|
|
174
|
-
);
|
|
172
|
+
const [ clearMediaButton ] =
|
|
173
|
+
await screen.findAllByText( 'Clear Media' );
|
|
175
174
|
fireEvent.press( clearMediaButton );
|
|
176
175
|
|
|
177
176
|
expect( setAttributes ).toHaveBeenCalledWith(
|
|
@@ -191,9 +190,8 @@ describe( 'when an image is attached', () => {
|
|
|
191
190
|
setAttributes={ setAttributes }
|
|
192
191
|
/>
|
|
193
192
|
);
|
|
194
|
-
const fixedBackgroundButton =
|
|
195
|
-
'Fixed background'
|
|
196
|
-
);
|
|
193
|
+
const fixedBackgroundButton =
|
|
194
|
+
await screen.findByText( 'Fixed background' );
|
|
197
195
|
fireEvent.press( fixedBackgroundButton );
|
|
198
196
|
|
|
199
197
|
expect( setAttributes ).toHaveBeenCalledWith(
|
|
@@ -210,9 +208,8 @@ describe( 'when an image is attached', () => {
|
|
|
210
208
|
setAttributes={ setAttributes }
|
|
211
209
|
/>
|
|
212
210
|
);
|
|
213
|
-
const editFocalPointButton =
|
|
214
|
-
'Edit focal point'
|
|
215
|
-
);
|
|
211
|
+
const editFocalPointButton =
|
|
212
|
+
await screen.findByText( 'Edit focal point' );
|
|
216
213
|
fireEvent.press( editFocalPointButton );
|
|
217
214
|
fireEvent(
|
|
218
215
|
screen.getByTestId( 'Slider Y-Axis Position', { hidden: true } ),
|
|
@@ -239,9 +236,8 @@ describe( 'when an image is attached', () => {
|
|
|
239
236
|
setAttributes={ setAttributes }
|
|
240
237
|
/>
|
|
241
238
|
);
|
|
242
|
-
const editFocalPointButton =
|
|
243
|
-
'Edit focal point'
|
|
244
|
-
);
|
|
239
|
+
const editFocalPointButton =
|
|
240
|
+
await screen.findByText( 'Edit focal point' );
|
|
245
241
|
fireEvent.press( editFocalPointButton );
|
|
246
242
|
fireEvent.press(
|
|
247
243
|
screen.getByText( ( attributes.focalPoint.x * 100 ).toString(), {
|
|
@@ -268,9 +264,8 @@ describe( 'when an image is attached', () => {
|
|
|
268
264
|
setAttributes={ setAttributes }
|
|
269
265
|
/>
|
|
270
266
|
);
|
|
271
|
-
const editFocalPointButton =
|
|
272
|
-
'Edit focal point'
|
|
273
|
-
);
|
|
267
|
+
const editFocalPointButton =
|
|
268
|
+
await screen.findByText( 'Edit focal point' );
|
|
274
269
|
fireEvent.press( editFocalPointButton );
|
|
275
270
|
fireEvent.press(
|
|
276
271
|
screen.getByText( ( attributes.focalPoint.x * 100 ).toString(), {
|
|
@@ -360,9 +355,8 @@ describe( 'color settings', () => {
|
|
|
360
355
|
fireEvent.press( colorButton );
|
|
361
356
|
|
|
362
357
|
// Wait for the block to be created.
|
|
363
|
-
const [ coverBlockWithOverlay ] =
|
|
364
|
-
/Cover Block\. Row 1/
|
|
365
|
-
);
|
|
358
|
+
const [ coverBlockWithOverlay ] =
|
|
359
|
+
await screen.findAllByLabelText( /Cover Block\. Row 1/ );
|
|
366
360
|
fireEvent.press( coverBlockWithOverlay );
|
|
367
361
|
|
|
368
362
|
// Open Block Settings.
|
|
@@ -399,9 +393,8 @@ describe( 'color settings', () => {
|
|
|
399
393
|
} );
|
|
400
394
|
|
|
401
395
|
// Wait for the block to be created.
|
|
402
|
-
const [ coverBlock ] =
|
|
403
|
-
/Cover Block\. Row 1/
|
|
404
|
-
);
|
|
396
|
+
const [ coverBlock ] =
|
|
397
|
+
await screen.findAllByLabelText( /Cover Block\. Row 1/ );
|
|
405
398
|
fireEvent.press( coverBlock );
|
|
406
399
|
|
|
407
400
|
// Open Block Settings.
|
|
@@ -455,9 +448,8 @@ describe( 'color settings', () => {
|
|
|
455
448
|
fireEvent.press( colorButton );
|
|
456
449
|
|
|
457
450
|
// Wait for the block to be created.
|
|
458
|
-
const [ coverBlockWithOverlay ] =
|
|
459
|
-
/Cover Block\. Row 1/
|
|
460
|
-
);
|
|
451
|
+
const [ coverBlockWithOverlay ] =
|
|
452
|
+
await screen.findAllByLabelText( /Cover Block\. Row 1/ );
|
|
461
453
|
fireEvent.press( coverBlockWithOverlay );
|
|
462
454
|
|
|
463
455
|
// Open Block Settings.
|
|
@@ -511,9 +503,8 @@ describe( 'color settings', () => {
|
|
|
511
503
|
} );
|
|
512
504
|
|
|
513
505
|
// Wait for the block to be created.
|
|
514
|
-
const [ coverBlock ] =
|
|
515
|
-
/Cover Block\. Row 1/
|
|
516
|
-
);
|
|
506
|
+
const [ coverBlock ] =
|
|
507
|
+
await screen.findAllByLabelText( /Cover Block\. Row 1/ );
|
|
517
508
|
fireEvent.press( coverBlock );
|
|
518
509
|
|
|
519
510
|
// Open Block Settings.
|
|
@@ -432,9 +432,8 @@ describe( 'Embed block', () => {
|
|
|
432
432
|
|
|
433
433
|
describe( 'edit URL', () => {
|
|
434
434
|
it( 'keeps the previous URL if no URL is set', async () => {
|
|
435
|
-
const editor =
|
|
436
|
-
RICH_TEXT_EMBED_HTML
|
|
437
|
-
);
|
|
435
|
+
const editor =
|
|
436
|
+
await initializeWithEmbedBlock( RICH_TEXT_EMBED_HTML );
|
|
438
437
|
|
|
439
438
|
// Open Block Settings.
|
|
440
439
|
fireEvent.press( await editor.findByLabelText( 'Open Settings' ) );
|
|
@@ -456,9 +455,8 @@ describe( 'Embed block', () => {
|
|
|
456
455
|
const initialURL = 'https://twitter.com/notnownikki';
|
|
457
456
|
const expectedURL = 'https://www.youtube.com/watch?v=lXMskKTw3Bc';
|
|
458
457
|
|
|
459
|
-
const editor =
|
|
460
|
-
RICH_TEXT_EMBED_HTML
|
|
461
|
-
);
|
|
458
|
+
const editor =
|
|
459
|
+
await initializeWithEmbedBlock( RICH_TEXT_EMBED_HTML );
|
|
462
460
|
|
|
463
461
|
// Open Block Settings.
|
|
464
462
|
fireEvent.press( await editor.findByLabelText( 'Open Settings' ) );
|
|
@@ -501,9 +499,8 @@ describe( 'Embed block', () => {
|
|
|
501
499
|
const previousURL = 'https://twitter.com/notnownikki';
|
|
502
500
|
const invalidURL = 'http://';
|
|
503
501
|
|
|
504
|
-
const editor =
|
|
505
|
-
RICH_TEXT_EMBED_HTML
|
|
506
|
-
);
|
|
502
|
+
const editor =
|
|
503
|
+
await initializeWithEmbedBlock( RICH_TEXT_EMBED_HTML );
|
|
507
504
|
|
|
508
505
|
// Open Block Settings.
|
|
509
506
|
fireEvent.press( await editor.findByLabelText( 'Open Settings' ) );
|
|
@@ -541,9 +538,8 @@ describe( 'Embed block', () => {
|
|
|
541
538
|
it( 'sets empty state when setting an empty URL', async () => {
|
|
542
539
|
const previousURL = 'https://twitter.com/notnownikki';
|
|
543
540
|
|
|
544
|
-
const editor =
|
|
545
|
-
RICH_TEXT_EMBED_HTML
|
|
546
|
-
);
|
|
541
|
+
const editor =
|
|
542
|
+
await initializeWithEmbedBlock( RICH_TEXT_EMBED_HTML );
|
|
547
543
|
|
|
548
544
|
// Open Block Settings.
|
|
549
545
|
fireEvent.press( await editor.findByLabelText( 'Open Settings' ) );
|
|
@@ -570,9 +566,8 @@ describe( 'Embed block', () => {
|
|
|
570
566
|
fireEvent( blockSettingsModal, MODAL_DISMISS_EVENT );
|
|
571
567
|
|
|
572
568
|
// Get empty embed link.
|
|
573
|
-
const emptyLinkTextInput =
|
|
574
|
-
'Add link'
|
|
575
|
-
);
|
|
569
|
+
const emptyLinkTextInput =
|
|
570
|
+
await editor.findByPlaceholderText( 'Add link' );
|
|
576
571
|
|
|
577
572
|
expect( emptyLinkTextInput ).toBeDefined();
|
|
578
573
|
expect( getEditorHtml() ).toMatchSnapshot();
|
|
@@ -680,9 +675,8 @@ describe( 'Embed block', () => {
|
|
|
680
675
|
'Full width',
|
|
681
676
|
].forEach( ( alignmentOption ) =>
|
|
682
677
|
it( `sets ${ alignmentOption } option`, async () => {
|
|
683
|
-
const editor =
|
|
684
|
-
RICH_TEXT_EMBED_HTML
|
|
685
|
-
);
|
|
678
|
+
const editor =
|
|
679
|
+
await initializeWithEmbedBlock( RICH_TEXT_EMBED_HTML );
|
|
686
680
|
|
|
687
681
|
// Open alignment options.
|
|
688
682
|
fireEvent.press( await editor.findByLabelText( 'Align' ) );
|
|
@@ -714,9 +708,8 @@ describe( 'Embed block', () => {
|
|
|
714
708
|
return mockOtherResponses( req );
|
|
715
709
|
} );
|
|
716
710
|
|
|
717
|
-
const editor =
|
|
718
|
-
RICH_TEXT_EMBED_HTML
|
|
719
|
-
);
|
|
711
|
+
const editor =
|
|
712
|
+
await initializeWithEmbedBlock( RICH_TEXT_EMBED_HTML );
|
|
720
713
|
|
|
721
714
|
await editor.findByText( 'Unable to embed media' );
|
|
722
715
|
|
|
@@ -749,9 +742,8 @@ describe( 'Embed block', () => {
|
|
|
749
742
|
return mockOtherResponses( req );
|
|
750
743
|
} );
|
|
751
744
|
|
|
752
|
-
const editor =
|
|
753
|
-
RICH_TEXT_EMBED_HTML
|
|
754
|
-
);
|
|
745
|
+
const editor =
|
|
746
|
+
await initializeWithEmbedBlock( RICH_TEXT_EMBED_HTML );
|
|
755
747
|
|
|
756
748
|
// Convert embed to link.
|
|
757
749
|
fireEvent.press( editor.getByText( 'More options' ) );
|
|
@@ -826,9 +818,8 @@ describe( 'Embed block', () => {
|
|
|
826
818
|
|
|
827
819
|
describe( 'preview coming soon', () => {
|
|
828
820
|
it( 'previews post for providers which embed preview is not available yet', async () => {
|
|
829
|
-
const { getByText, getByTestId } =
|
|
830
|
-
PHOTO_EMBED_HTML
|
|
831
|
-
);
|
|
821
|
+
const { getByText, getByTestId } =
|
|
822
|
+
await initializeWithEmbedBlock( PHOTO_EMBED_HTML );
|
|
832
823
|
|
|
833
824
|
// Try to preview the post.
|
|
834
825
|
fireEvent.press( getByText( 'PREVIEW POST' ) );
|
|
@@ -848,9 +839,8 @@ describe( 'Embed block', () => {
|
|
|
848
839
|
} );
|
|
849
840
|
|
|
850
841
|
it( 'dismisses no preview modal', async () => {
|
|
851
|
-
const { getByText, getByTestId } =
|
|
852
|
-
PHOTO_EMBED_HTML
|
|
853
|
-
);
|
|
842
|
+
const { getByText, getByTestId } =
|
|
843
|
+
await initializeWithEmbedBlock( PHOTO_EMBED_HTML );
|
|
854
844
|
|
|
855
845
|
// Try to preview the post.
|
|
856
846
|
fireEvent.press( getByText( 'PREVIEW POST' ) );
|
|
@@ -908,9 +898,8 @@ describe( 'Embed block', () => {
|
|
|
908
898
|
);
|
|
909
899
|
|
|
910
900
|
// Get the created embed block.
|
|
911
|
-
const [ embedBlock ] =
|
|
912
|
-
/Embed Block\. Row 1/
|
|
913
|
-
);
|
|
901
|
+
const [ embedBlock ] =
|
|
902
|
+
await editor.findAllByLabelText( /Embed Block\. Row 1/ );
|
|
914
903
|
|
|
915
904
|
expect( embedBlock ).toBeDefined();
|
|
916
905
|
|
|
@@ -996,9 +985,8 @@ describe( 'Embed block', () => {
|
|
|
996
985
|
|
|
997
986
|
fireEvent.press( await editor.findByText( 'Embed' ) );
|
|
998
987
|
|
|
999
|
-
const [ block ] =
|
|
1000
|
-
/Embed Block\. Row 1/
|
|
1001
|
-
);
|
|
988
|
+
const [ block ] =
|
|
989
|
+
await editor.findAllByLabelText( /Embed Block\. Row 1/ );
|
|
1002
990
|
|
|
1003
991
|
const blockName = within( block ).getByText( 'Embed' );
|
|
1004
992
|
|
|
@@ -1037,9 +1025,8 @@ describe( 'Embed block', () => {
|
|
|
1037
1025
|
|
|
1038
1026
|
fireEvent.press( await editor.findByText( title ) );
|
|
1039
1027
|
|
|
1040
|
-
const [ block ] =
|
|
1041
|
-
/Embed Block\. Row 1/
|
|
1042
|
-
);
|
|
1028
|
+
const [ block ] =
|
|
1029
|
+
await editor.findAllByLabelText( /Embed Block\. Row 1/ );
|
|
1043
1030
|
|
|
1044
1031
|
const blockName = within( block ).getByText( title );
|
|
1045
1032
|
|
|
@@ -1096,9 +1083,8 @@ describe( 'Embed block', () => {
|
|
|
1096
1083
|
|
|
1097
1084
|
describe( 'block settings', () => {
|
|
1098
1085
|
it( 'toggles resize for smaller devices media settings', async () => {
|
|
1099
|
-
const screen =
|
|
1100
|
-
RICH_TEXT_EMBED_HTML
|
|
1101
|
-
);
|
|
1086
|
+
const screen =
|
|
1087
|
+
await initializeWithEmbedBlock( RICH_TEXT_EMBED_HTML );
|
|
1102
1088
|
|
|
1103
1089
|
// Open Block Settings.
|
|
1104
1090
|
fireEvent.press( await screen.findByLabelText( 'Open Settings' ) );
|
|
@@ -1120,9 +1106,8 @@ describe( 'Embed block', () => {
|
|
|
1120
1106
|
// Wait for media settings panel.
|
|
1121
1107
|
let mediaSettingsPanel;
|
|
1122
1108
|
try {
|
|
1123
|
-
mediaSettingsPanel =
|
|
1124
|
-
'Media settings'
|
|
1125
|
-
);
|
|
1109
|
+
mediaSettingsPanel =
|
|
1110
|
+
await screen.findByText( 'Media settings' );
|
|
1126
1111
|
} catch ( e ) {
|
|
1127
1112
|
// NOOP.
|
|
1128
1113
|
}
|
package/src/file/block.json
CHANGED
package/src/file/edit.native.js
CHANGED
|
@@ -552,7 +552,7 @@ export class FileEdit extends Component {
|
|
|
552
552
|
icon={ <BlockIcon icon={ icon } /> }
|
|
553
553
|
labels={ {
|
|
554
554
|
title: __( 'File' ),
|
|
555
|
-
instructions: __( '
|
|
555
|
+
instructions: __( 'Choose a file' ),
|
|
556
556
|
} }
|
|
557
557
|
onSelect={ this.onSelectFile }
|
|
558
558
|
onFocus={ this.props.onFocus }
|
package/src/file/index.php
CHANGED
|
@@ -5,24 +5,6 @@
|
|
|
5
5
|
* @package WordPress
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
if ( gutenberg_should_block_use_interactivity_api( 'core/file' ) ) {
|
|
9
|
-
/**
|
|
10
|
-
* Replaces view script for the File block with version using Interactivity API.
|
|
11
|
-
*
|
|
12
|
-
* @param array $metadata Block metadata as read in via block.json.
|
|
13
|
-
*
|
|
14
|
-
* @return array Filtered block type metadata.
|
|
15
|
-
*/
|
|
16
|
-
function gutenberg_block_core_file_update_interactive_view_script( $metadata ) {
|
|
17
|
-
if ( 'core/file' === $metadata['name'] ) {
|
|
18
|
-
$metadata['viewScript'] = array( 'file:./view-interactivity.min.js' );
|
|
19
|
-
$metadata['supports']['interactivity'] = true;
|
|
20
|
-
}
|
|
21
|
-
return $metadata;
|
|
22
|
-
}
|
|
23
|
-
add_filter( 'block_type_metadata', 'gutenberg_block_core_file_update_interactive_view_script', 10, 1 );
|
|
24
|
-
}
|
|
25
|
-
|
|
26
8
|
/**
|
|
27
9
|
* When the `core/file` block is rendering, check if we need to enqueue the `wp-block-file-view` script.
|
|
28
10
|
*
|
|
@@ -72,19 +54,35 @@ function render_block_core_file( $attributes, $content, $block ) {
|
|
|
72
54
|
);
|
|
73
55
|
|
|
74
56
|
// If it uses the Interactivity API, add the directives.
|
|
75
|
-
if (
|
|
57
|
+
if ( $should_load_view_script ) {
|
|
76
58
|
$processor = new WP_HTML_Tag_Processor( $content );
|
|
77
59
|
$processor->next_tag();
|
|
78
60
|
$processor->set_attribute( 'data-wp-interactive', '' );
|
|
79
61
|
$processor->next_tag( 'object' );
|
|
80
|
-
$processor->set_attribute( 'data-wp-
|
|
81
|
-
$processor->set_attribute( 'hidden', true );
|
|
62
|
+
$processor->set_attribute( 'data-wp-style--display', 'selectors.core.file.hasPdfPreview' );
|
|
82
63
|
return $processor->get_updated_html();
|
|
83
64
|
}
|
|
84
65
|
|
|
85
66
|
return $content;
|
|
86
67
|
}
|
|
87
68
|
|
|
69
|
+
/**
|
|
70
|
+
* Ensure that the view script has the `wp-interactivity` dependency.
|
|
71
|
+
*
|
|
72
|
+
* @since 6.4.0
|
|
73
|
+
*/
|
|
74
|
+
function block_core_file_ensure_interactivity_dependency() {
|
|
75
|
+
global $wp_scripts;
|
|
76
|
+
if (
|
|
77
|
+
isset( $wp_scripts->registered['wp-block-file-view'] ) &&
|
|
78
|
+
! in_array( 'wp-interactivity', $wp_scripts->registered['wp-block-file-view']->deps, true )
|
|
79
|
+
) {
|
|
80
|
+
$wp_scripts->registered['wp-block-file-view']->deps[] = 'wp-interactivity';
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
add_action( 'wp_print_scripts', 'block_core_file_ensure_interactivity_dependency' );
|
|
85
|
+
|
|
88
86
|
/**
|
|
89
87
|
* Registers the `core/file` block on server.
|
|
90
88
|
*/
|
package/src/file/style.scss
CHANGED
|
@@ -29,6 +29,12 @@
|
|
|
29
29
|
margin-bottom: 1em;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
@media (max-width: 768px) {
|
|
33
|
+
.wp-block-file__embed {
|
|
34
|
+
display: none;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
32
38
|
//This needs a low specificity so it won't override the rules from the button element if defined in theme.json.
|
|
33
39
|
:where(.wp-block-file__button) {
|
|
34
40
|
border-radius: 2em;
|
|
@@ -36,7 +42,6 @@
|
|
|
36
42
|
display: inline-block;
|
|
37
43
|
|
|
38
44
|
&:is(a) {
|
|
39
|
-
|
|
40
45
|
&:hover,
|
|
41
46
|
&:visited,
|
|
42
47
|
&:focus,
|