@wordpress/edit-post 8.9.0 → 8.10.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 (62) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/init-pattern-modal/index.js +1 -1
  3. package/build/components/init-pattern-modal/index.js.map +1 -1
  4. package/build/components/layout/index.js +175 -170
  5. package/build/components/layout/index.js.map +1 -1
  6. package/build/components/layout/use-padding-appender.js +19 -16
  7. package/build/components/layout/use-padding-appender.js.map +1 -1
  8. package/build/components/meta-boxes/meta-box-visibility.js.map +1 -1
  9. package/build/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  10. package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
  11. package/build/deprecated.js.map +1 -1
  12. package/build/index.js +2 -4
  13. package/build/index.js.map +1 -1
  14. package/build/store/actions.js +1 -1
  15. package/build/store/actions.js.map +1 -1
  16. package/build/store/private-selectors.js.map +1 -1
  17. package/build/store/selectors.js.map +1 -1
  18. package/build/utils/meta-boxes.js.map +1 -1
  19. package/build-module/components/header/header-toolbar/index.native.js +1 -2
  20. package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
  21. package/build-module/components/init-pattern-modal/index.js +2 -4
  22. package/build-module/components/init-pattern-modal/index.js.map +1 -1
  23. package/build-module/components/layout/index.js +177 -174
  24. package/build-module/components/layout/index.js.map +1 -1
  25. package/build-module/components/layout/index.native.js +1 -3
  26. package/build-module/components/layout/index.native.js.map +1 -1
  27. package/build-module/components/layout/use-padding-appender.js +20 -16
  28. package/build-module/components/layout/use-padding-appender.js.map +1 -1
  29. package/build-module/components/meta-boxes/index.js +1 -3
  30. package/build-module/components/meta-boxes/index.js.map +1 -1
  31. package/build-module/components/meta-boxes/meta-box-visibility.js.map +1 -1
  32. package/build-module/components/meta-boxes/meta-boxes-area/index.js +1 -2
  33. package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  34. package/build-module/components/more-menu/index.js +1 -3
  35. package/build-module/components/more-menu/index.js.map +1 -1
  36. package/build-module/components/preferences-modal/enable-custom-fields.js +1 -3
  37. package/build-module/components/preferences-modal/enable-custom-fields.js.map +1 -1
  38. package/build-module/components/preferences-modal/meta-boxes-section.js +1 -2
  39. package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
  40. package/build-module/components/welcome-guide/default.js +1 -3
  41. package/build-module/components/welcome-guide/default.js.map +1 -1
  42. package/build-module/components/welcome-guide/image.js +1 -2
  43. package/build-module/components/welcome-guide/image.js.map +1 -1
  44. package/build-module/components/welcome-guide/template.js +1 -3
  45. package/build-module/components/welcome-guide/template.js.map +1 -1
  46. package/build-module/deprecated.js.map +1 -1
  47. package/build-module/index.js +2 -4
  48. package/build-module/index.js.map +1 -1
  49. package/build-module/store/actions.js +1 -1
  50. package/build-module/store/actions.js.map +1 -1
  51. package/build-module/store/private-selectors.js.map +1 -1
  52. package/build-module/store/selectors.js.map +1 -1
  53. package/build-module/utils/meta-boxes.js.map +1 -1
  54. package/build-style/style-rtl.css +65 -29
  55. package/build-style/style.css +65 -29
  56. package/package.json +32 -32
  57. package/src/components/init-pattern-modal/index.js +2 -2
  58. package/src/components/layout/index.js +169 -173
  59. package/src/components/layout/style.scss +83 -43
  60. package/src/components/layout/use-padding-appender.js +21 -18
  61. package/src/index.js +0 -2
  62. package/src/store/actions.js +1 -1
@@ -192,65 +192,101 @@
192
192
 
193
193
  .edit-post-meta-boxes-main {
194
194
  filter: drop-shadow(0 -1px rgba(0, 0, 0, 0.133));
195
+ outline: 1px solid transparent;
195
196
  background-color: #fff;
196
- clear: both;
197
+ display: flex;
198
+ flex-direction: column;
199
+ overflow: hidden;
197
200
  }
198
- .edit-post-meta-boxes-main:not(details) {
199
- padding-top: 24px;
200
- }
201
- .edit-post-meta-boxes-main:is(details) > summary {
202
- cursor: pointer;
203
- color: #1e1e1e;
204
- background-color: #fff;
205
- height: 32px;
206
- line-height: 32px;
207
- font-size: 13px;
208
- padding-right: 24px;
209
- box-shadow: 0 1px #ddd;
210
- }
211
- .edit-post-meta-boxes-main:is(details)[open] > summary {
212
- position: sticky;
213
- top: 0;
214
- z-index: 1;
201
+ .edit-post-meta-boxes-main.is-resizable {
202
+ padding-block-start: 24px;
215
203
  }
216
204
 
217
- .edit-post-meta-boxes-main__resize-handle {
205
+ .edit-post-meta-boxes-main__presenter {
218
206
  display: flex;
219
- inset: 0 0 auto 0;
220
- height: 24px;
221
207
  box-shadow: 0 1px #ddd;
208
+ outline: 1px solid transparent;
209
+ position: relative;
210
+ z-index: 1;
222
211
  }
223
- .edit-post-meta-boxes-main__resize-handle > button {
212
+ .is-toggle-only > .edit-post-meta-boxes-main__presenter, .is-resizable.edit-post-meta-boxes-main .edit-post-meta-boxes-main__presenter > button {
224
213
  appearance: none;
225
- cursor: inherit;
226
- margin: auto;
227
214
  padding: 0;
228
215
  border: none;
229
216
  outline: none;
230
- background-color: #ddd;
217
+ background-color: transparent;
218
+ }
219
+ .is-toggle-only > .edit-post-meta-boxes-main__presenter {
220
+ flex-shrink: 0;
221
+ cursor: pointer;
222
+ height: 32px;
223
+ justify-content: space-between;
224
+ align-items: center;
225
+ padding-inline: 24px 12px;
226
+ }
227
+ .is-toggle-only > .edit-post-meta-boxes-main__presenter:is(:hover, :focus-visible) {
228
+ color: var(--wp-admin-theme-color);
229
+ }
230
+ .is-toggle-only > .edit-post-meta-boxes-main__presenter:focus-visible::after {
231
+ content: "";
232
+ position: absolute;
233
+ inset: var(--wp-admin-border-width-focus);
234
+ box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
235
+ outline: 2px solid transparent;
236
+ }
237
+ .is-toggle-only > .edit-post-meta-boxes-main__presenter > svg {
238
+ fill: currentColor;
239
+ }
240
+ .is-resizable.edit-post-meta-boxes-main .edit-post-meta-boxes-main__presenter {
241
+ inset: 0 0 auto;
242
+ }
243
+ .is-resizable.edit-post-meta-boxes-main .edit-post-meta-boxes-main__presenter > button {
244
+ cursor: inherit;
231
245
  width: 64px;
246
+ height: 24px;
247
+ margin: auto;
248
+ }
249
+ .is-resizable.edit-post-meta-boxes-main .edit-post-meta-boxes-main__presenter > button::before {
250
+ content: "";
251
+ background-color: #ddd;
252
+ outline: 2px solid transparent;
253
+ outline-offset: -2px;
254
+ position: absolute;
255
+ inset-block: calc(50% - 4px / 2) auto;
256
+ transform: translateX(50%);
257
+ width: inherit;
232
258
  height: 4px;
233
259
  border-radius: 2px;
234
260
  transition: width 0.3s ease-out;
235
261
  }
236
262
  @media (prefers-reduced-motion: reduce) {
237
- .edit-post-meta-boxes-main__resize-handle > button {
263
+ .is-resizable.edit-post-meta-boxes-main .edit-post-meta-boxes-main__presenter > button::before {
238
264
  transition-duration: 0s;
239
265
  transition-delay: 0s;
240
266
  }
241
267
  }
242
- .edit-post-meta-boxes-main__resize-handle:hover > button,
243
- .edit-post-meta-boxes-main__resize-handle > button:focus {
268
+ .is-resizable.edit-post-meta-boxes-main .edit-post-meta-boxes-main__presenter:is(:hover, :focus-within) > button::before {
244
269
  background-color: var(--wp-admin-theme-color);
245
270
  width: 80px;
246
271
  }
247
272
 
273
+ @media (pointer: coarse) {
274
+ .is-resizable.edit-post-meta-boxes-main {
275
+ padding-block-start: 32px;
276
+ }
277
+ .is-resizable.edit-post-meta-boxes-main .edit-post-meta-boxes-main__presenter > button {
278
+ height: 32px;
279
+ }
280
+ }
248
281
  .edit-post-meta-boxes-main__liner {
249
282
  overflow: auto;
250
- max-height: 100%;
251
283
  isolation: isolate;
252
284
  }
253
285
 
286
+ .edit-post-layout__metaboxes {
287
+ clear: both;
288
+ }
289
+
254
290
  .has-metaboxes .editor-visual-editor {
255
291
  flex: 1;
256
292
  }
@@ -192,65 +192,101 @@
192
192
 
193
193
  .edit-post-meta-boxes-main {
194
194
  filter: drop-shadow(0 -1px rgba(0, 0, 0, 0.133));
195
+ outline: 1px solid transparent;
195
196
  background-color: #fff;
196
- clear: both;
197
+ display: flex;
198
+ flex-direction: column;
199
+ overflow: hidden;
197
200
  }
198
- .edit-post-meta-boxes-main:not(details) {
199
- padding-top: 24px;
200
- }
201
- .edit-post-meta-boxes-main:is(details) > summary {
202
- cursor: pointer;
203
- color: #1e1e1e;
204
- background-color: #fff;
205
- height: 32px;
206
- line-height: 32px;
207
- font-size: 13px;
208
- padding-left: 24px;
209
- box-shadow: 0 1px #ddd;
210
- }
211
- .edit-post-meta-boxes-main:is(details)[open] > summary {
212
- position: sticky;
213
- top: 0;
214
- z-index: 1;
201
+ .edit-post-meta-boxes-main.is-resizable {
202
+ padding-block-start: 24px;
215
203
  }
216
204
 
217
- .edit-post-meta-boxes-main__resize-handle {
205
+ .edit-post-meta-boxes-main__presenter {
218
206
  display: flex;
219
- inset: 0 0 auto 0;
220
- height: 24px;
221
207
  box-shadow: 0 1px #ddd;
208
+ outline: 1px solid transparent;
209
+ position: relative;
210
+ z-index: 1;
222
211
  }
223
- .edit-post-meta-boxes-main__resize-handle > button {
212
+ .is-toggle-only > .edit-post-meta-boxes-main__presenter, .is-resizable.edit-post-meta-boxes-main .edit-post-meta-boxes-main__presenter > button {
224
213
  appearance: none;
225
- cursor: inherit;
226
- margin: auto;
227
214
  padding: 0;
228
215
  border: none;
229
216
  outline: none;
230
- background-color: #ddd;
217
+ background-color: transparent;
218
+ }
219
+ .is-toggle-only > .edit-post-meta-boxes-main__presenter {
220
+ flex-shrink: 0;
221
+ cursor: pointer;
222
+ height: 32px;
223
+ justify-content: space-between;
224
+ align-items: center;
225
+ padding-inline: 24px 12px;
226
+ }
227
+ .is-toggle-only > .edit-post-meta-boxes-main__presenter:is(:hover, :focus-visible) {
228
+ color: var(--wp-admin-theme-color);
229
+ }
230
+ .is-toggle-only > .edit-post-meta-boxes-main__presenter:focus-visible::after {
231
+ content: "";
232
+ position: absolute;
233
+ inset: var(--wp-admin-border-width-focus);
234
+ box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
235
+ outline: 2px solid transparent;
236
+ }
237
+ .is-toggle-only > .edit-post-meta-boxes-main__presenter > svg {
238
+ fill: currentColor;
239
+ }
240
+ .is-resizable.edit-post-meta-boxes-main .edit-post-meta-boxes-main__presenter {
241
+ inset: 0 0 auto;
242
+ }
243
+ .is-resizable.edit-post-meta-boxes-main .edit-post-meta-boxes-main__presenter > button {
244
+ cursor: inherit;
231
245
  width: 64px;
246
+ height: 24px;
247
+ margin: auto;
248
+ }
249
+ .is-resizable.edit-post-meta-boxes-main .edit-post-meta-boxes-main__presenter > button::before {
250
+ content: "";
251
+ background-color: #ddd;
252
+ outline: 2px solid transparent;
253
+ outline-offset: -2px;
254
+ position: absolute;
255
+ inset-block: calc(50% - 4px / 2) auto;
256
+ transform: translateX(-50%);
257
+ width: inherit;
232
258
  height: 4px;
233
259
  border-radius: 2px;
234
260
  transition: width 0.3s ease-out;
235
261
  }
236
262
  @media (prefers-reduced-motion: reduce) {
237
- .edit-post-meta-boxes-main__resize-handle > button {
263
+ .is-resizable.edit-post-meta-boxes-main .edit-post-meta-boxes-main__presenter > button::before {
238
264
  transition-duration: 0s;
239
265
  transition-delay: 0s;
240
266
  }
241
267
  }
242
- .edit-post-meta-boxes-main__resize-handle:hover > button,
243
- .edit-post-meta-boxes-main__resize-handle > button:focus {
268
+ .is-resizable.edit-post-meta-boxes-main .edit-post-meta-boxes-main__presenter:is(:hover, :focus-within) > button::before {
244
269
  background-color: var(--wp-admin-theme-color);
245
270
  width: 80px;
246
271
  }
247
272
 
273
+ @media (pointer: coarse) {
274
+ .is-resizable.edit-post-meta-boxes-main {
275
+ padding-block-start: 32px;
276
+ }
277
+ .is-resizable.edit-post-meta-boxes-main .edit-post-meta-boxes-main__presenter > button {
278
+ height: 32px;
279
+ }
280
+ }
248
281
  .edit-post-meta-boxes-main__liner {
249
282
  overflow: auto;
250
- max-height: 100%;
251
283
  isolation: isolate;
252
284
  }
253
285
 
286
+ .edit-post-layout__metaboxes {
287
+ clear: both;
288
+ }
289
+
254
290
  .has-metaboxes .editor-visual-editor {
255
291
  flex: 1;
256
292
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-post",
3
- "version": "8.9.0",
3
+ "version": "8.10.0",
4
4
  "description": "Edit Post module for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -27,36 +27,36 @@
27
27
  "module": "build-module/index.js",
28
28
  "react-native": "src/index",
29
29
  "dependencies": {
30
- "@babel/runtime": "^7.16.0",
31
- "@wordpress/a11y": "^4.9.0",
32
- "@wordpress/api-fetch": "^7.9.0",
33
- "@wordpress/block-editor": "^14.4.0",
34
- "@wordpress/block-library": "^9.9.0",
35
- "@wordpress/blocks": "^13.9.0",
36
- "@wordpress/commands": "^1.9.0",
37
- "@wordpress/components": "^28.9.0",
38
- "@wordpress/compose": "^7.9.0",
39
- "@wordpress/core-commands": "^1.9.0",
40
- "@wordpress/core-data": "^7.9.0",
41
- "@wordpress/data": "^10.9.0",
42
- "@wordpress/deprecated": "^4.9.0",
43
- "@wordpress/dom": "^4.9.0",
44
- "@wordpress/editor": "^14.9.0",
45
- "@wordpress/element": "^6.9.0",
46
- "@wordpress/hooks": "^4.9.0",
47
- "@wordpress/html-entities": "^4.9.0",
48
- "@wordpress/i18n": "^5.9.0",
49
- "@wordpress/icons": "^10.9.0",
50
- "@wordpress/keyboard-shortcuts": "^5.9.0",
51
- "@wordpress/keycodes": "^4.9.0",
52
- "@wordpress/notices": "^5.9.0",
53
- "@wordpress/plugins": "^7.9.0",
54
- "@wordpress/preferences": "^4.9.0",
55
- "@wordpress/private-apis": "^1.9.0",
56
- "@wordpress/url": "^4.9.0",
57
- "@wordpress/viewport": "^6.9.0",
58
- "@wordpress/warning": "^3.9.0",
59
- "@wordpress/widgets": "^4.9.0",
30
+ "@babel/runtime": "7.25.7",
31
+ "@wordpress/a11y": "^4.10.0",
32
+ "@wordpress/api-fetch": "^7.10.0",
33
+ "@wordpress/block-editor": "^14.5.0",
34
+ "@wordpress/block-library": "^9.10.0",
35
+ "@wordpress/blocks": "^13.10.0",
36
+ "@wordpress/commands": "^1.10.0",
37
+ "@wordpress/components": "^28.10.0",
38
+ "@wordpress/compose": "^7.10.0",
39
+ "@wordpress/core-commands": "^1.10.0",
40
+ "@wordpress/core-data": "^7.10.0",
41
+ "@wordpress/data": "^10.10.0",
42
+ "@wordpress/deprecated": "^4.10.0",
43
+ "@wordpress/dom": "^4.10.0",
44
+ "@wordpress/editor": "^14.10.0",
45
+ "@wordpress/element": "^6.10.0",
46
+ "@wordpress/hooks": "^4.10.0",
47
+ "@wordpress/html-entities": "^4.10.0",
48
+ "@wordpress/i18n": "^5.10.0",
49
+ "@wordpress/icons": "^10.10.0",
50
+ "@wordpress/keyboard-shortcuts": "^5.10.0",
51
+ "@wordpress/keycodes": "^4.10.0",
52
+ "@wordpress/notices": "^5.10.0",
53
+ "@wordpress/plugins": "^7.10.0",
54
+ "@wordpress/preferences": "^4.10.0",
55
+ "@wordpress/private-apis": "^1.10.0",
56
+ "@wordpress/url": "^4.10.0",
57
+ "@wordpress/viewport": "^6.10.0",
58
+ "@wordpress/warning": "^3.10.0",
59
+ "@wordpress/widgets": "^4.10.0",
60
60
  "clsx": "^2.1.1",
61
61
  "memize": "^2.1.0"
62
62
  },
@@ -67,5 +67,5 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "2e5495c635910cb34bfaca3c6258d2e989f66214"
70
+ "gitHead": "ab34a7ac935fd1478eac63b596242d83270897ee"
71
71
  }
@@ -27,8 +27,8 @@ export default function InitPatternModal() {
27
27
  isNewPost: isCleanNewPost(),
28
28
  };
29
29
  }, [] );
30
- const [ isModalOpen, setIsModalOpen ] = useState( () =>
31
- isNewPost && postType === 'wp_block' ? true : false
30
+ const [ isModalOpen, setIsModalOpen ] = useState(
31
+ () => isNewPost && postType === 'wp_block'
32
32
  );
33
33
 
34
34
  if ( postType !== 'wp_block' || ! isNewPost ) {