@wordpress/patterns 1.7.0 → 1.9.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 +4 -0
- package/build/components/category-selector.js +2 -1
- package/build/components/category-selector.js.map +1 -1
- package/build/components/create-pattern-modal.js +6 -3
- package/build/components/create-pattern-modal.js.map +1 -1
- package/build/components/duplicate-pattern-modal.js +3 -3
- package/build/components/duplicate-pattern-modal.js.map +1 -1
- package/build/components/index.js +4 -2
- package/build/components/index.js.map +1 -1
- package/build/components/partial-syncing-controls.js +91 -0
- package/build/components/partial-syncing-controls.js.map +1 -0
- package/build/components/pattern-convert-button.js +7 -4
- package/build/components/pattern-convert-button.js.map +1 -1
- package/build/components/patterns-manage-button.js +1 -2
- package/build/components/patterns-manage-button.js.map +1 -1
- package/build/components/rename-pattern-category-modal.js +3 -0
- package/build/components/rename-pattern-category-modal.js.map +1 -1
- package/build/components/rename-pattern-modal.js +3 -0
- package/build/components/rename-pattern-modal.js.map +1 -1
- package/build/constants.js +14 -1
- package/build/constants.js.map +1 -1
- package/build/private-apis.js +4 -1
- package/build/private-apis.js.map +1 -1
- package/build-module/components/category-selector.js +2 -1
- package/build-module/components/category-selector.js.map +1 -1
- package/build-module/components/create-pattern-modal.js +6 -3
- package/build-module/components/create-pattern-modal.js.map +1 -1
- package/build-module/components/duplicate-pattern-modal.js +4 -4
- package/build-module/components/duplicate-pattern-modal.js.map +1 -1
- package/build-module/components/index.js +4 -2
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/partial-syncing-controls.js +83 -0
- package/build-module/components/partial-syncing-controls.js.map +1 -0
- package/build-module/components/pattern-convert-button.js +7 -4
- package/build-module/components/pattern-convert-button.js.map +1 -1
- package/build-module/components/patterns-manage-button.js +1 -2
- package/build-module/components/patterns-manage-button.js.map +1 -1
- package/build-module/components/rename-pattern-category-modal.js +3 -0
- package/build-module/components/rename-pattern-category-modal.js.map +1 -1
- package/build-module/components/rename-pattern-modal.js +3 -0
- package/build-module/components/rename-pattern-modal.js.map +1 -1
- package/build-module/constants.js +11 -0
- package/build-module/constants.js.map +1 -1
- package/build-module/private-apis.js +5 -2
- package/build-module/private-apis.js.map +1 -1
- package/build-style/style-rtl.css +6 -9
- package/build-style/style.css +6 -9
- package/package.json +17 -16
- package/src/components/category-selector.js +1 -0
- package/src/components/create-pattern-modal.js +5 -2
- package/src/components/duplicate-pattern-modal.js +7 -6
- package/src/components/index.js +2 -1
- package/src/components/partial-syncing-controls.js +98 -0
- package/src/components/pattern-convert-button.js +10 -4
- package/src/components/patterns-manage-button.js +34 -37
- package/src/components/rename-pattern-category-modal.js +7 -1
- package/src/components/rename-pattern-modal.js +11 -2
- package/src/components/style.scss +9 -14
- package/src/constants.js +10 -0
- package/src/private-apis.js +4 -0
|
@@ -93,6 +93,7 @@ export default function RenamePatternModal( {
|
|
|
93
93
|
<VStack spacing="5">
|
|
94
94
|
<TextControl
|
|
95
95
|
__nextHasNoMarginBottom
|
|
96
|
+
__next40pxDefaultSize
|
|
96
97
|
label={ __( 'Name' ) }
|
|
97
98
|
value={ name }
|
|
98
99
|
onChange={ setName }
|
|
@@ -100,11 +101,19 @@ export default function RenamePatternModal( {
|
|
|
100
101
|
/>
|
|
101
102
|
|
|
102
103
|
<HStack justify="right">
|
|
103
|
-
<Button
|
|
104
|
+
<Button
|
|
105
|
+
__next40pxDefaultSize
|
|
106
|
+
variant="tertiary"
|
|
107
|
+
onClick={ onRequestClose }
|
|
108
|
+
>
|
|
104
109
|
{ __( 'Cancel' ) }
|
|
105
110
|
</Button>
|
|
106
111
|
|
|
107
|
-
<Button
|
|
112
|
+
<Button
|
|
113
|
+
__next40pxDefaultSize
|
|
114
|
+
variant="primary"
|
|
115
|
+
type="submit"
|
|
116
|
+
>
|
|
108
117
|
{ __( 'Save' ) }
|
|
109
118
|
</Button>
|
|
110
119
|
</HStack>
|
|
@@ -7,32 +7,27 @@
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
.patterns-menu-items__convert-modal-categories {
|
|
10
|
-
width: 100%;
|
|
11
10
|
position: relative;
|
|
12
|
-
min-height: 40px;
|
|
13
11
|
}
|
|
14
|
-
|
|
12
|
+
|
|
13
|
+
.components-form-token-field__suggestions-list:not(:empty) {
|
|
15
14
|
position: absolute;
|
|
15
|
+
border: $border-width solid var(--wp-admin-theme-color);
|
|
16
|
+
border-bottom-left-radius: $radius-block-ui;
|
|
17
|
+
border-bottom-right-radius: $radius-block-ui;
|
|
18
|
+
box-shadow: 0 0 0.5px 0.5px var(--wp-admin-theme-color);
|
|
16
19
|
box-sizing: border-box;
|
|
17
20
|
z-index: 1;
|
|
18
21
|
background-color: $white;
|
|
19
|
-
// Account for the border width of the token field.
|
|
20
|
-
width: calc(100% + 2px);
|
|
22
|
+
width: calc(100% + 2px); // Account for the border width of the token field.
|
|
21
23
|
left: -1px;
|
|
22
24
|
min-width: initial;
|
|
23
|
-
|
|
24
|
-
border-top: none;
|
|
25
|
-
box-shadow: 0 0 0 0.5px var(--wp-admin-theme-color);
|
|
26
|
-
border-bottom-left-radius: 2px;
|
|
27
|
-
border-bottom-right-radius: 2px;
|
|
25
|
+
max-height: $grid-unit-60 * 2; // Adjust to not cover the save button, showing three items.
|
|
28
26
|
}
|
|
29
27
|
}
|
|
30
28
|
|
|
31
29
|
.patterns-create-modal__name-input input[type="text"] {
|
|
32
|
-
//
|
|
33
|
-
min-height: 40px;
|
|
34
|
-
// Override the default 1px margin-x.
|
|
35
|
-
margin: 0;
|
|
30
|
+
margin: 0; // Override the default 1px margin-x.
|
|
36
31
|
}
|
|
37
32
|
|
|
38
33
|
.patterns-rename-pattern-category-modal__validation-message {
|
package/src/constants.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { __ } from '@wordpress/i18n';
|
|
5
|
+
|
|
1
6
|
export const PATTERN_TYPES = {
|
|
2
7
|
theme: 'pattern',
|
|
3
8
|
user: 'wp_block',
|
|
@@ -14,3 +19,8 @@ export const PATTERN_SYNC_TYPES = {
|
|
|
14
19
|
full: 'fully',
|
|
15
20
|
unsynced: 'unsynced',
|
|
16
21
|
};
|
|
22
|
+
|
|
23
|
+
// TODO: This should not be hardcoded. Maybe there should be a config and/or an UI.
|
|
24
|
+
export const PARTIAL_SYNCING_SUPPORTED_BLOCKS = {
|
|
25
|
+
'core/paragraph': { content: __( 'Content' ) },
|
|
26
|
+
};
|
package/src/private-apis.js
CHANGED
|
@@ -7,12 +7,14 @@ import DuplicatePatternModal from './components/duplicate-pattern-modal';
|
|
|
7
7
|
import RenamePatternModal from './components/rename-pattern-modal';
|
|
8
8
|
import PatternsMenuItems from './components';
|
|
9
9
|
import RenamePatternCategoryModal from './components/rename-pattern-category-modal';
|
|
10
|
+
import PartialSyncingControls from './components/partial-syncing-controls';
|
|
10
11
|
import {
|
|
11
12
|
PATTERN_TYPES,
|
|
12
13
|
PATTERN_DEFAULT_CATEGORY,
|
|
13
14
|
PATTERN_USER_CATEGORY,
|
|
14
15
|
EXCLUDED_PATTERN_SOURCES,
|
|
15
16
|
PATTERN_SYNC_TYPES,
|
|
17
|
+
PARTIAL_SYNCING_SUPPORTED_BLOCKS,
|
|
16
18
|
} from './constants';
|
|
17
19
|
|
|
18
20
|
export const privateApis = {};
|
|
@@ -22,9 +24,11 @@ lock( privateApis, {
|
|
|
22
24
|
RenamePatternModal,
|
|
23
25
|
PatternsMenuItems,
|
|
24
26
|
RenamePatternCategoryModal,
|
|
27
|
+
PartialSyncingControls,
|
|
25
28
|
PATTERN_TYPES,
|
|
26
29
|
PATTERN_DEFAULT_CATEGORY,
|
|
27
30
|
PATTERN_USER_CATEGORY,
|
|
28
31
|
EXCLUDED_PATTERN_SOURCES,
|
|
29
32
|
PATTERN_SYNC_TYPES,
|
|
33
|
+
PARTIAL_SYNCING_SUPPORTED_BLOCKS,
|
|
30
34
|
} );
|