@wordpress/editor 12.5.7 → 12.8.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 (46) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/components/post-featured-image/index.js +84 -41
  3. package/build/components/post-featured-image/index.js.map +1 -1
  4. package/build/components/post-text-editor/index.js +6 -6
  5. package/build/components/post-text-editor/index.js.map +1 -1
  6. package/build/components/post-title/index.js +13 -2
  7. package/build/components/post-title/index.js.map +1 -1
  8. package/build/components/post-visibility/index.js +132 -167
  9. package/build/components/post-visibility/index.js.map +1 -1
  10. package/build/components/post-visibility/label.js +5 -22
  11. package/build/components/post-visibility/label.js.map +1 -1
  12. package/build/components/post-visibility/utils.js +14 -13
  13. package/build/components/post-visibility/utils.js.map +1 -1
  14. package/build/components/provider/index.native.js +3 -1
  15. package/build/components/provider/index.native.js.map +1 -1
  16. package/build-module/components/post-featured-image/index.js +86 -42
  17. package/build-module/components/post-featured-image/index.js.map +1 -1
  18. package/build-module/components/post-text-editor/index.js +6 -6
  19. package/build-module/components/post-text-editor/index.js.map +1 -1
  20. package/build-module/components/post-title/index.js +12 -2
  21. package/build-module/components/post-title/index.js.map +1 -1
  22. package/build-module/components/post-visibility/index.js +132 -166
  23. package/build-module/components/post-visibility/index.js.map +1 -1
  24. package/build-module/components/post-visibility/label.js +5 -20
  25. package/build-module/components/post-visibility/label.js.map +1 -1
  26. package/build-module/components/post-visibility/utils.js +14 -13
  27. package/build-module/components/post-visibility/utils.js.map +1 -1
  28. package/build-module/components/provider/index.native.js +2 -1
  29. package/build-module/components/provider/index.native.js.map +1 -1
  30. package/build-style/style-rtl.css +51 -52
  31. package/build-style/style.css +51 -52
  32. package/package.json +28 -27
  33. package/src/components/autosave-monitor/test/index.js +3 -0
  34. package/src/components/editor-help/test/index.native.js +1 -1
  35. package/src/components/post-featured-image/index.js +102 -69
  36. package/src/components/post-saved-state/style.scss +9 -0
  37. package/src/components/post-slug/test/index.js +4 -4
  38. package/src/components/post-text-editor/index.js +5 -6
  39. package/src/components/post-title/index.js +16 -2
  40. package/src/components/post-visibility/index.js +130 -150
  41. package/src/components/post-visibility/label.js +6 -15
  42. package/src/components/post-visibility/style.scss +25 -20
  43. package/src/components/post-visibility/utils.js +7 -12
  44. package/src/components/provider/index.native.js +2 -1
  45. package/src/components/table-of-contents/style.scss +1 -3
  46. package/src/store/test/selectors.js +2 -2
@@ -1,39 +1,44 @@
1
- .edit-post-post-visibility__dialog,
2
- .editor-post-visibility__dialog-fieldset {
3
- padding: $grid-unit-05;
4
- padding-top: 0;
1
+ .editor-post-visibility__close {
2
+ position: absolute;
3
+ right: $grid-unit-20;
4
+ top: $grid-unit-20;
5
+ }
6
+
7
+ .editor-post-visibility__fieldset {
8
+ padding: $grid-unit-10;
5
9
 
6
- .editor-post-visibility__dialog-legend {
10
+ .editor-post-visibility__legend {
7
11
  font-weight: 600;
8
- margin-bottom: 1em;
12
+ padding: 1em 0 0 0;
13
+ }
14
+
15
+ .editor-post-visibility__description {
9
16
  margin-top: 0.5em;
10
- padding: 0;
11
17
  }
12
18
 
13
- .editor-post-visibility__dialog-radio[type="radio"] {
19
+ .editor-post-visibility__radio[type="radio"] {
14
20
  @include radio-control;
15
21
  margin-top: 2px;
16
22
  }
17
23
 
18
- .editor-post-visibility__dialog-label {
19
- font-weight: 600;
20
- }
24
+ .editor-post-visibility__info {
25
+ color: $gray-700;
26
+ margin-left: $grid-unit-15 + $radio-input-size-sm;
27
+ margin-top: 0.5em;
21
28
 
22
- .editor-post-visibility__dialog-info {
23
- margin-top: 0;
24
- margin-left: $grid-unit-40;
29
+ @include break-small {
30
+ margin-left: $grid-unit-15 + $radio-input-size;
31
+ }
25
32
  }
26
33
 
27
34
  // Remove bottom margin on the last label only.
28
- .editor-post-visibility__choice:last-child .editor-post-visibility__dialog-info {
35
+ .editor-post-visibility__choice:last-child .editor-post-visibility__info {
29
36
  margin-bottom: 0;
30
37
  }
31
- }
32
38
 
33
- .editor-post-visibility__dialog-password {
34
- .editor-post-visibility__dialog-password-input[type="text"] {
39
+ .editor-post-visibility__password .editor-post-visibility__password-input[type="text"] {
35
40
  @include input-control;
36
- margin-left: $grid-unit * 4.5;
37
- margin-top: $grid-unit-10;
41
+ margin-left: $grid-unit * 4;
42
+ width: calc(100% - #{$grid-unit * 4});
38
43
  }
39
44
  }
@@ -3,22 +3,17 @@
3
3
  */
4
4
  import { __ } from '@wordpress/i18n';
5
5
 
6
- export const visibilityOptions = [
7
- {
8
- value: 'public',
6
+ export const visibilityOptions = {
7
+ public: {
9
8
  label: __( 'Public' ),
10
9
  info: __( 'Visible to everyone.' ),
11
10
  },
12
- {
13
- value: 'private',
11
+ private: {
14
12
  label: __( 'Private' ),
15
13
  info: __( 'Only visible to site admins and editors.' ),
16
14
  },
17
- {
18
- value: 'password',
19
- label: __( 'Password Protected' ),
20
- info: __(
21
- 'Protected with a password you choose. Only those with the password can view this post.'
22
- ),
15
+ password: {
16
+ label: __( 'Password protected' ),
17
+ info: __( 'Only those with the password can view this post.' ),
23
18
  },
24
- ];
19
+ };
@@ -2,6 +2,7 @@
2
2
  * External dependencies
3
3
  */
4
4
  import memize from 'memize';
5
+ import { SafeAreaProvider } from 'react-native-safe-area-context';
5
6
 
6
7
  /**
7
8
  * WordPress dependencies
@@ -333,7 +334,7 @@ class NativeEditorProvider extends Component {
333
334
  settings={ editorSettings }
334
335
  { ...props }
335
336
  >
336
- { children }
337
+ <SafeAreaProvider>{ children }</SafeAreaProvider>
337
338
  </EditorProvider>
338
339
  <EditorHelpTopics
339
340
  isVisible={ this.state.isHelpVisible }
@@ -8,9 +8,7 @@
8
8
 
9
9
  .table-of-contents__popover {
10
10
  .components-popover__content {
11
- > div {
12
- padding: $grid-unit-20;
13
- }
11
+ padding: $grid-unit-20;
14
12
 
15
13
  @include break-small {
16
14
  max-height: calc(100vh - 120px);
@@ -2149,7 +2149,7 @@ describe( 'selectors', () => {
2149
2149
  expect( didPostSaveRequestSucceed( state ) ).toBe( true );
2150
2150
  } );
2151
2151
 
2152
- it( 'should return true if the post save request has failed', () => {
2152
+ it( 'should return false if the post save request has failed', () => {
2153
2153
  const state = {
2154
2154
  saving: {
2155
2155
  successful: false,
@@ -2171,7 +2171,7 @@ describe( 'selectors', () => {
2171
2171
  expect( didPostSaveRequestFail( state ) ).toBe( true );
2172
2172
  } );
2173
2173
 
2174
- it( 'should return true if the post save request is successful', () => {
2174
+ it( 'should return false if the post save request is successful', () => {
2175
2175
  const state = {
2176
2176
  saving: {
2177
2177
  error: false,