@wordpress/block-editor 14.21.1-next.719a03cbe.0 → 15.0.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 (69) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/components/block-list/use-block-props/index.js +1 -3
  3. package/build/components/block-list/use-block-props/index.js.map +1 -1
  4. package/build/components/block-list/use-block-props/use-is-hovered.js +8 -25
  5. package/build/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
  6. package/build/components/block-settings-menu/block-settings-dropdown.js +7 -4
  7. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  8. package/build/components/child-layout-control/index.js +53 -34
  9. package/build/components/child-layout-control/index.js.map +1 -1
  10. package/build/components/link-control/search-input.js +4 -2
  11. package/build/components/link-control/search-input.js.map +1 -1
  12. package/build/components/list-view/block.js +5 -4
  13. package/build/components/list-view/block.js.map +1 -1
  14. package/build/components/list-view/use-list-view-images.js +62 -30
  15. package/build/components/list-view/use-list-view-images.js.map +1 -1
  16. package/build/layouts/grid.js +2 -0
  17. package/build/layouts/grid.js.map +1 -1
  18. package/build/store/actions.js +7 -6
  19. package/build/store/actions.js.map +1 -1
  20. package/build/store/reducer.js +0 -18
  21. package/build/store/reducer.js.map +1 -1
  22. package/build/store/selectors.js +13 -9
  23. package/build/store/selectors.js.map +1 -1
  24. package/build-module/components/block-list/use-block-props/index.js +1 -3
  25. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  26. package/build-module/components/block-list/use-block-props/use-is-hovered.js +8 -26
  27. package/build-module/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
  28. package/build-module/components/block-settings-menu/block-settings-dropdown.js +7 -4
  29. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  30. package/build-module/components/child-layout-control/index.js +54 -35
  31. package/build-module/components/child-layout-control/index.js.map +1 -1
  32. package/build-module/components/link-control/search-input.js +4 -2
  33. package/build-module/components/link-control/search-input.js.map +1 -1
  34. package/build-module/components/list-view/block.js +6 -5
  35. package/build-module/components/list-view/block.js.map +1 -1
  36. package/build-module/components/list-view/use-list-view-images.js +62 -30
  37. package/build-module/components/list-view/use-list-view-images.js.map +1 -1
  38. package/build-module/layouts/grid.js +2 -0
  39. package/build-module/layouts/grid.js.map +1 -1
  40. package/build-module/store/actions.js +7 -6
  41. package/build-module/store/actions.js.map +1 -1
  42. package/build-module/store/reducer.js +0 -17
  43. package/build-module/store/reducer.js.map +1 -1
  44. package/build-module/store/selectors.js +12 -9
  45. package/build-module/store/selectors.js.map +1 -1
  46. package/build-style/style-rtl.css +46 -8
  47. package/build-style/style.css +46 -8
  48. package/package.json +34 -34
  49. package/src/components/block-list/use-block-props/index.js +1 -1
  50. package/src/components/block-list/use-block-props/use-is-hovered.js +12 -26
  51. package/src/components/block-lock/style.scss +10 -0
  52. package/src/components/block-settings-menu/block-settings-dropdown.js +4 -1
  53. package/src/components/block-variation-transforms/style.scss +7 -0
  54. package/src/components/border-radius-control/style.scss +5 -0
  55. package/src/components/child-layout-control/index.js +66 -42
  56. package/src/components/colors-gradients/style.scss +5 -0
  57. package/src/components/inserter-list-item/style.scss +9 -6
  58. package/src/components/link-control/search-input.js +9 -2
  59. package/src/components/link-control/style.scss +7 -0
  60. package/src/components/link-control/test/index.js +44 -44
  61. package/src/components/list-view/block.js +9 -5
  62. package/src/components/list-view/use-list-view-images.js +57 -36
  63. package/src/components/media-replace-flow/test/index.js +1 -1
  64. package/src/components/spacing-sizes-control/style.scss +5 -0
  65. package/src/hooks/layout.scss +8 -0
  66. package/src/layouts/grid.js +2 -2
  67. package/src/store/actions.js +7 -6
  68. package/src/store/reducer.js +0 -18
  69. package/src/store/selectors.js +29 -31
@@ -666,12 +666,20 @@ iframe[name=editor-canvas] {
666
666
  z-index: 1000001;
667
667
  }
668
668
 
669
+ .block-editor-block-lock-modal__options {
670
+ border: 0;
671
+ padding: 0;
672
+ margin: 0;
673
+ }
674
+
669
675
  .block-editor-block-lock-modal__options legend {
670
676
  margin-bottom: 16px;
671
677
  padding: 0;
672
678
  }
673
679
 
674
680
  .block-editor-block-lock-modal__checklist {
681
+ list-style: none;
682
+ padding: 0;
675
683
  margin: 0;
676
684
  }
677
685
 
@@ -1612,6 +1620,12 @@ iframe[name=editor-canvas] {
1612
1620
  width: 100%;
1613
1621
  }
1614
1622
 
1623
+ .block-editor-block-variation-transforms:where(fieldset) {
1624
+ border: 0;
1625
+ padding: 0;
1626
+ margin: 0;
1627
+ }
1628
+
1615
1629
  .block-editor-block-variation-transforms {
1616
1630
  padding: 0 52px 16px 16px;
1617
1631
  width: 100%;
@@ -1646,6 +1660,9 @@ iframe[name=editor-canvas] {
1646
1660
  }
1647
1661
 
1648
1662
  .components-border-radius-control {
1663
+ border: 0;
1664
+ padding: 0;
1665
+ margin: 0;
1649
1666
  margin-bottom: 12px;
1650
1667
  }
1651
1668
  .components-border-radius-control legend {
@@ -1686,6 +1703,9 @@ iframe[name=editor-canvas] {
1686
1703
  }
1687
1704
 
1688
1705
  .block-editor-color-gradient-control__fieldset {
1706
+ border: 0;
1707
+ padding: 0;
1708
+ margin: 0;
1689
1709
  min-width: 0;
1690
1710
  }
1691
1711
 
@@ -2216,18 +2236,18 @@ iframe[name=editor-canvas] {
2216
2236
  transition: all 0.05s ease-in-out;
2217
2237
  }
2218
2238
  }
2219
- .components-button.block-editor-block-types-list__item:disabled {
2239
+ .components-button.block-editor-block-types-list__item:disabled, .components-button.block-editor-block-types-list__item[aria-disabled=true] {
2220
2240
  opacity: 0.6;
2221
2241
  cursor: default;
2222
2242
  }
2223
- .components-button.block-editor-block-types-list__item:not(:disabled):hover .block-editor-block-types-list__item-title {
2243
+ .components-button.block-editor-block-types-list__item:not(:disabled, [aria-disabled=true]):hover .block-editor-block-types-list__item-title {
2224
2244
  color: var(--wp-admin-theme-color) !important;
2225
2245
  filter: brightness(0.95);
2226
2246
  }
2227
- .components-button.block-editor-block-types-list__item:not(:disabled):hover svg {
2247
+ .components-button.block-editor-block-types-list__item:not(:disabled, [aria-disabled=true]):hover svg {
2228
2248
  color: var(--wp-admin-theme-color) !important;
2229
2249
  }
2230
- .components-button.block-editor-block-types-list__item:not(:disabled):hover::after {
2250
+ .components-button.block-editor-block-types-list__item:not(:disabled, [aria-disabled=true]):hover::after {
2231
2251
  content: "";
2232
2252
  position: absolute;
2233
2253
  top: 0;
@@ -2239,15 +2259,15 @@ iframe[name=editor-canvas] {
2239
2259
  background: var(--wp-admin-theme-color);
2240
2260
  pointer-events: none;
2241
2261
  }
2242
- .components-button.block-editor-block-types-list__item:not(:disabled):focus {
2243
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
2244
- }
2245
- .components-button.block-editor-block-types-list__item:not(:disabled).is-active {
2262
+ .components-button.block-editor-block-types-list__item:not(:disabled, [aria-disabled=true]).is-active {
2246
2263
  color: #fff;
2247
2264
  background: #1e1e1e;
2248
2265
  outline: 2px solid transparent;
2249
2266
  outline-offset: -2px;
2250
2267
  }
2268
+ .components-button.block-editor-block-types-list__item:not(:disabled):focus {
2269
+ box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
2270
+ }
2251
2271
 
2252
2272
  .block-editor-block-types-list__item-icon {
2253
2273
  padding: 12px 20px;
@@ -2579,6 +2599,12 @@ iframe[name=editor-canvas] {
2579
2599
  position: relative;
2580
2600
  }
2581
2601
 
2602
+ .block-editor-link-control__settings {
2603
+ border: 0;
2604
+ padding: 0;
2605
+ margin: 0;
2606
+ }
2607
+
2582
2608
  .block-editor-link-control__setting {
2583
2609
  margin-bottom: 0;
2584
2610
  flex: 1;
@@ -3632,6 +3658,13 @@ div.block-editor-bindings__panel button:hover .block-editor-bindings__item span
3632
3658
  margin-bottom: 8px;
3633
3659
  }
3634
3660
 
3661
+ .block-editor-hooks__grid-layout-columns-and-rows-controls,
3662
+ .block-editor-hooks__grid-layout-minimum-width-control {
3663
+ border: 0;
3664
+ padding: 0;
3665
+ margin: 0;
3666
+ }
3667
+
3635
3668
  .block-editor__spacing-visualizer {
3636
3669
  position: absolute;
3637
3670
  top: 0;
@@ -4475,6 +4508,11 @@ div.block-editor-bindings__panel button:hover .block-editor-bindings__item span
4475
4508
  }
4476
4509
  }
4477
4510
 
4511
+ .spacing-sizes-control {
4512
+ border: 0;
4513
+ padding: 0;
4514
+ margin: 0;
4515
+ }
4478
4516
  .spacing-sizes-control .spacing-sizes-control__custom-value-input,
4479
4517
  .spacing-sizes-control .spacing-sizes-control__label {
4480
4518
  margin-bottom: 0;
@@ -666,12 +666,20 @@ iframe[name=editor-canvas] {
666
666
  z-index: 1000001;
667
667
  }
668
668
 
669
+ .block-editor-block-lock-modal__options {
670
+ border: 0;
671
+ padding: 0;
672
+ margin: 0;
673
+ }
674
+
669
675
  .block-editor-block-lock-modal__options legend {
670
676
  margin-bottom: 16px;
671
677
  padding: 0;
672
678
  }
673
679
 
674
680
  .block-editor-block-lock-modal__checklist {
681
+ list-style: none;
682
+ padding: 0;
675
683
  margin: 0;
676
684
  }
677
685
 
@@ -1612,6 +1620,12 @@ iframe[name=editor-canvas] {
1612
1620
  width: 100%;
1613
1621
  }
1614
1622
 
1623
+ .block-editor-block-variation-transforms:where(fieldset) {
1624
+ border: 0;
1625
+ padding: 0;
1626
+ margin: 0;
1627
+ }
1628
+
1615
1629
  .block-editor-block-variation-transforms {
1616
1630
  padding: 0 16px 16px 52px;
1617
1631
  width: 100%;
@@ -1646,6 +1660,9 @@ iframe[name=editor-canvas] {
1646
1660
  }
1647
1661
 
1648
1662
  .components-border-radius-control {
1663
+ border: 0;
1664
+ padding: 0;
1665
+ margin: 0;
1649
1666
  margin-bottom: 12px;
1650
1667
  }
1651
1668
  .components-border-radius-control legend {
@@ -1686,6 +1703,9 @@ iframe[name=editor-canvas] {
1686
1703
  }
1687
1704
 
1688
1705
  .block-editor-color-gradient-control__fieldset {
1706
+ border: 0;
1707
+ padding: 0;
1708
+ margin: 0;
1689
1709
  min-width: 0;
1690
1710
  }
1691
1711
 
@@ -2217,18 +2237,18 @@ iframe[name=editor-canvas] {
2217
2237
  transition: all 0.05s ease-in-out;
2218
2238
  }
2219
2239
  }
2220
- .components-button.block-editor-block-types-list__item:disabled {
2240
+ .components-button.block-editor-block-types-list__item:disabled, .components-button.block-editor-block-types-list__item[aria-disabled=true] {
2221
2241
  opacity: 0.6;
2222
2242
  cursor: default;
2223
2243
  }
2224
- .components-button.block-editor-block-types-list__item:not(:disabled):hover .block-editor-block-types-list__item-title {
2244
+ .components-button.block-editor-block-types-list__item:not(:disabled, [aria-disabled=true]):hover .block-editor-block-types-list__item-title {
2225
2245
  color: var(--wp-admin-theme-color) !important;
2226
2246
  filter: brightness(0.95);
2227
2247
  }
2228
- .components-button.block-editor-block-types-list__item:not(:disabled):hover svg {
2248
+ .components-button.block-editor-block-types-list__item:not(:disabled, [aria-disabled=true]):hover svg {
2229
2249
  color: var(--wp-admin-theme-color) !important;
2230
2250
  }
2231
- .components-button.block-editor-block-types-list__item:not(:disabled):hover::after {
2251
+ .components-button.block-editor-block-types-list__item:not(:disabled, [aria-disabled=true]):hover::after {
2232
2252
  content: "";
2233
2253
  position: absolute;
2234
2254
  top: 0;
@@ -2240,15 +2260,15 @@ iframe[name=editor-canvas] {
2240
2260
  background: var(--wp-admin-theme-color);
2241
2261
  pointer-events: none;
2242
2262
  }
2243
- .components-button.block-editor-block-types-list__item:not(:disabled):focus {
2244
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
2245
- }
2246
- .components-button.block-editor-block-types-list__item:not(:disabled).is-active {
2263
+ .components-button.block-editor-block-types-list__item:not(:disabled, [aria-disabled=true]).is-active {
2247
2264
  color: #fff;
2248
2265
  background: #1e1e1e;
2249
2266
  outline: 2px solid transparent;
2250
2267
  outline-offset: -2px;
2251
2268
  }
2269
+ .components-button.block-editor-block-types-list__item:not(:disabled):focus {
2270
+ box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
2271
+ }
2252
2272
 
2253
2273
  .block-editor-block-types-list__item-icon {
2254
2274
  padding: 12px 20px;
@@ -2580,6 +2600,12 @@ iframe[name=editor-canvas] {
2580
2600
  position: relative;
2581
2601
  }
2582
2602
 
2603
+ .block-editor-link-control__settings {
2604
+ border: 0;
2605
+ padding: 0;
2606
+ margin: 0;
2607
+ }
2608
+
2583
2609
  .block-editor-link-control__setting {
2584
2610
  margin-bottom: 0;
2585
2611
  flex: 1;
@@ -3634,6 +3660,13 @@ div.block-editor-bindings__panel button:hover .block-editor-bindings__item span
3634
3660
  margin-bottom: 8px;
3635
3661
  }
3636
3662
 
3663
+ .block-editor-hooks__grid-layout-columns-and-rows-controls,
3664
+ .block-editor-hooks__grid-layout-minimum-width-control {
3665
+ border: 0;
3666
+ padding: 0;
3667
+ margin: 0;
3668
+ }
3669
+
3637
3670
  .block-editor__spacing-visualizer {
3638
3671
  position: absolute;
3639
3672
  top: 0;
@@ -4477,6 +4510,11 @@ div.block-editor-bindings__panel button:hover .block-editor-bindings__item span
4477
4510
  }
4478
4511
  }
4479
4512
 
4513
+ .spacing-sizes-control {
4514
+ border: 0;
4515
+ padding: 0;
4516
+ margin: 0;
4517
+ }
4480
4518
  .spacing-sizes-control .spacing-sizes-control__custom-value-input,
4481
4519
  .spacing-sizes-control .spacing-sizes-control__label {
4482
4520
  margin-bottom: 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-editor",
3
- "version": "14.21.1-next.719a03cbe.0",
3
+ "version": "15.0.0",
4
4
  "description": "Generic block editor.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -37,38 +37,38 @@
37
37
  "@emotion/react": "^11.7.1",
38
38
  "@emotion/styled": "^11.6.0",
39
39
  "@react-spring/web": "^9.4.5",
40
- "@wordpress/a11y": "^4.26.1-next.719a03cbe.0",
41
- "@wordpress/api-fetch": "^7.26.1-next.719a03cbe.0",
42
- "@wordpress/blob": "^4.26.1-next.719a03cbe.0",
43
- "@wordpress/block-serialization-default-parser": "^5.26.1-next.719a03cbe.0",
44
- "@wordpress/blocks": "^14.15.1-next.719a03cbe.0",
45
- "@wordpress/commands": "^1.26.1-next.719a03cbe.0",
46
- "@wordpress/components": "^29.13.1-next.719a03cbe.0",
47
- "@wordpress/compose": "^7.26.1-next.719a03cbe.0",
48
- "@wordpress/data": "^10.26.1-next.719a03cbe.0",
49
- "@wordpress/date": "^5.26.1-next.719a03cbe.0",
50
- "@wordpress/deprecated": "^4.26.1-next.719a03cbe.0",
51
- "@wordpress/dom": "^4.26.1-next.719a03cbe.0",
52
- "@wordpress/element": "^6.26.1-next.719a03cbe.0",
53
- "@wordpress/escape-html": "^3.26.1-next.719a03cbe.0",
54
- "@wordpress/hooks": "^4.26.1-next.719a03cbe.0",
55
- "@wordpress/html-entities": "^4.26.1-next.719a03cbe.0",
56
- "@wordpress/i18n": "^6.0.1-next.719a03cbe.0",
57
- "@wordpress/icons": "^10.26.2-next.719a03cbe.0",
58
- "@wordpress/is-shallow-equal": "^5.26.1-next.719a03cbe.0",
59
- "@wordpress/keyboard-shortcuts": "^5.26.1-next.719a03cbe.0",
60
- "@wordpress/keycodes": "^4.26.1-next.719a03cbe.0",
61
- "@wordpress/notices": "^5.26.1-next.719a03cbe.0",
62
- "@wordpress/preferences": "^4.26.1-next.719a03cbe.0",
63
- "@wordpress/priority-queue": "^3.26.1-next.719a03cbe.0",
64
- "@wordpress/private-apis": "^1.26.1-next.719a03cbe.0",
65
- "@wordpress/rich-text": "^7.26.1-next.719a03cbe.0",
66
- "@wordpress/style-engine": "^2.26.1-next.719a03cbe.0",
67
- "@wordpress/token-list": "^3.26.1-next.719a03cbe.0",
68
- "@wordpress/upload-media": "^0.11.1-next.719a03cbe.0",
69
- "@wordpress/url": "^4.26.1-next.719a03cbe.0",
70
- "@wordpress/warning": "^3.26.1-next.719a03cbe.0",
71
- "@wordpress/wordcount": "^4.26.1-next.719a03cbe.0",
40
+ "@wordpress/a11y": "^4.27.0",
41
+ "@wordpress/api-fetch": "^7.27.0",
42
+ "@wordpress/blob": "^4.27.0",
43
+ "@wordpress/block-serialization-default-parser": "^5.27.0",
44
+ "@wordpress/blocks": "^15.0.0",
45
+ "@wordpress/commands": "^1.27.0",
46
+ "@wordpress/components": "^30.0.0",
47
+ "@wordpress/compose": "^7.27.0",
48
+ "@wordpress/data": "^10.27.0",
49
+ "@wordpress/date": "^5.27.0",
50
+ "@wordpress/deprecated": "^4.27.0",
51
+ "@wordpress/dom": "^4.27.0",
52
+ "@wordpress/element": "^6.27.0",
53
+ "@wordpress/escape-html": "^3.27.0",
54
+ "@wordpress/hooks": "^4.27.0",
55
+ "@wordpress/html-entities": "^4.27.0",
56
+ "@wordpress/i18n": "^6.0.0",
57
+ "@wordpress/icons": "^10.27.0",
58
+ "@wordpress/is-shallow-equal": "^5.27.0",
59
+ "@wordpress/keyboard-shortcuts": "^5.27.0",
60
+ "@wordpress/keycodes": "^4.27.0",
61
+ "@wordpress/notices": "^5.27.0",
62
+ "@wordpress/preferences": "^4.27.0",
63
+ "@wordpress/priority-queue": "^3.27.0",
64
+ "@wordpress/private-apis": "^1.27.0",
65
+ "@wordpress/rich-text": "^7.27.0",
66
+ "@wordpress/style-engine": "^2.27.0",
67
+ "@wordpress/token-list": "^3.27.0",
68
+ "@wordpress/upload-media": "^0.12.0",
69
+ "@wordpress/url": "^4.27.0",
70
+ "@wordpress/warning": "^3.27.0",
71
+ "@wordpress/wordcount": "^4.27.0",
72
72
  "change-case": "^4.1.2",
73
73
  "clsx": "^2.1.1",
74
74
  "colord": "^2.7.0",
@@ -91,5 +91,5 @@
91
91
  "publishConfig": {
92
92
  "access": "public"
93
93
  },
94
- "gitHead": "5e146e949c2765411a8310bcc2641a88d036a6d9"
94
+ "gitHead": "abe06a6f2aef8d03c30ea9d5b3e133f041e523b1"
95
95
  }
@@ -114,7 +114,7 @@ export function useBlockProps( props = {}, { __unstableIsHtml } = {} ) {
114
114
  useBlockRefProvider( clientId ),
115
115
  useFocusHandler( clientId ),
116
116
  useEventHandlers( { clientId, isSelected } ),
117
- useIsHovered( { clientId } ),
117
+ useIsHovered(),
118
118
  useIntersectionObserver(),
119
119
  useMovingAnimation( { triggerAnimationOnChange: index, clientId } ),
120
120
  useDisabled( { isDisabled: ! hasOverlay } ),
@@ -2,37 +2,24 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import { useRefEffect } from '@wordpress/compose';
5
- import { useDispatch } from '@wordpress/data';
6
5
 
7
- /**
8
- * Internal dependencies
9
- */
10
- import { store as blockEditorStore } from '../../../store';
6
+ function listener( event ) {
7
+ if ( event.defaultPrevented ) {
8
+ return;
9
+ }
10
+
11
+ event.preventDefault();
12
+ event.currentTarget.classList.toggle(
13
+ 'is-hovered',
14
+ event.type === 'mouseover'
15
+ );
16
+ }
11
17
 
12
18
  /*
13
19
  * Adds `is-hovered` class when the block is hovered and in navigation or
14
20
  * outline mode.
15
21
  */
16
- export function useIsHovered( { clientId } ) {
17
- const { hoverBlock } = useDispatch( blockEditorStore );
18
-
19
- function listener( event ) {
20
- if ( event.defaultPrevented ) {
21
- return;
22
- }
23
-
24
- const action = event.type === 'mouseover' ? 'add' : 'remove';
25
-
26
- event.preventDefault();
27
- event.currentTarget.classList[ action ]( 'is-hovered' );
28
-
29
- if ( action === 'add' ) {
30
- hoverBlock( clientId );
31
- } else {
32
- hoverBlock( null );
33
- }
34
- }
35
-
22
+ export function useIsHovered() {
36
23
  return useRefEffect( ( node ) => {
37
24
  node.addEventListener( 'mouseout', listener );
38
25
  node.addEventListener( 'mouseover', listener );
@@ -43,7 +30,6 @@ export function useIsHovered( { clientId } ) {
43
30
 
44
31
  // Remove class in case it lingers.
45
32
  node.classList.remove( 'is-hovered' );
46
- hoverBlock( null );
47
33
  };
48
34
  }, [] );
49
35
  }
@@ -2,12 +2,22 @@
2
2
  z-index: z-index(".block-editor-block-lock-modal");
3
3
  }
4
4
 
5
+ .block-editor-block-lock-modal__options {
6
+ // Reset `fieldset` browser defaults.
7
+ border: 0;
8
+ padding: 0;
9
+ margin: 0;
10
+ }
11
+
5
12
  .block-editor-block-lock-modal__options legend {
6
13
  margin-bottom: $grid-unit-20;
7
14
  padding: 0;
8
15
  }
9
16
 
10
17
  .block-editor-block-lock-modal__checklist {
18
+ // Reset `ul` browser defaults.
19
+ list-style: none;
20
+ padding: 0;
11
21
  margin: 0;
12
22
  }
13
23
 
@@ -88,6 +88,7 @@ export function BlockSettingsDropdown( {
88
88
  selectedBlockClientIds,
89
89
  openedBlockSettingsMenu,
90
90
  isContentOnly,
91
+ isZoomOut,
91
92
  } = useSelect(
92
93
  ( select ) => {
93
94
  const {
@@ -98,6 +99,7 @@ export function BlockSettingsDropdown( {
98
99
  getBlockAttributes,
99
100
  getOpenedBlockSettingsMenu,
100
101
  getBlockEditingMode,
102
+ isZoomOut: _isZoomOut,
101
103
  } = unlock( select( blockEditorStore ) );
102
104
 
103
105
  const { getActiveBlockVariation } = select( blocksStore );
@@ -122,6 +124,7 @@ export function BlockSettingsDropdown( {
122
124
  openedBlockSettingsMenu: getOpenedBlockSettingsMenu(),
123
125
  isContentOnly:
124
126
  getBlockEditingMode( firstBlockClientId ) === 'contentOnly',
127
+ isZoomOut: _isZoomOut(),
125
128
  };
126
129
  },
127
130
  [ firstBlockClientId ]
@@ -301,7 +304,7 @@ export function BlockSettingsDropdown( {
301
304
  { __( 'Duplicate' ) }
302
305
  </MenuItem>
303
306
  ) }
304
- { canInsertBlock && ! isContentOnly && (
307
+ { canInsertBlock && ! isZoomOut && (
305
308
  <>
306
309
  <MenuItem
307
310
  onClick={ pipe(
@@ -1,3 +1,10 @@
1
+ .block-editor-block-variation-transforms:where(fieldset) {
2
+ // Reset `fieldset` browser defaults.
3
+ border: 0;
4
+ padding: 0;
5
+ margin: 0;
6
+ }
7
+
1
8
  .block-editor-block-variation-transforms {
2
9
  padding: 0 $grid-unit-20 $grid-unit-20 52px;
3
10
  width: 100%;
@@ -1,4 +1,9 @@
1
1
  .components-border-radius-control {
2
+ // Reset `fieldset` browser defaults.
3
+ border: 0;
4
+ padding: 0;
5
+ margin: 0;
6
+
2
7
  margin-bottom: $grid-unit-15;
3
8
 
4
9
  legend {
@@ -6,7 +6,6 @@ import {
6
6
  __experimentalToggleGroupControlOption as ToggleGroupControlOption,
7
7
  __experimentalUnitControl as UnitControl,
8
8
  __experimentalInputControl as InputControl,
9
- __experimentalHStack as HStack,
10
9
  __experimentalVStack as VStack,
11
10
  __experimentalToolsPanelItem as ToolsPanelItem,
12
11
  __experimentalUseCustomUnits as useCustomUnits,
@@ -210,7 +209,7 @@ function GridControls( {
210
209
  panelId,
211
210
  } ) {
212
211
  const { columnStart, rowStart, columnSpan, rowSpan } = childLayout;
213
- const { columnCount = 3, rowCount } = parentLayout ?? {};
212
+ const { columnCount, rowCount } = parentLayout ?? {};
214
213
  const rootClientId = useSelect( ( select ) =>
215
214
  select( blockEditorStore ).getBlockRootClientId( panelId )
216
215
  );
@@ -218,7 +217,7 @@ function GridControls( {
218
217
  useDispatch( blockEditorStore );
219
218
  const getNumberOfBlocksBeforeCell = useGetNumberOfBlocksBeforeCell(
220
219
  rootClientId,
221
- columnCount
220
+ columnCount || 3
222
221
  );
223
222
  const hasStartValue = () => !! columnStart || !! rowStart;
224
223
  const hasSpanValue = () => !! columnSpan || !! rowSpan;
@@ -235,9 +234,20 @@ function GridControls( {
235
234
  } );
236
235
  };
237
236
 
237
+ // Calculate max column span based on current position and grid width
238
+ const maxColumnSpan = columnCount
239
+ ? columnCount - ( columnStart ?? 1 ) + 1
240
+ : undefined;
241
+
242
+ // Calculate max row span based on current position and grid height
243
+ const maxRowSpan =
244
+ window.__experimentalEnableGridInteractivity && rowCount
245
+ ? rowCount - ( rowStart ?? 1 ) + 1
246
+ : undefined;
247
+
238
248
  return (
239
249
  <>
240
- <HStack
250
+ <Flex
241
251
  as={ ToolsPanelItem }
242
252
  hasValue={ hasSpanValue }
243
253
  label={ __( 'Grid span' ) }
@@ -245,44 +255,58 @@ function GridControls( {
245
255
  isShownByDefault={ isShownByDefault }
246
256
  panelId={ panelId }
247
257
  >
248
- <InputControl
249
- size="__unstable-large"
250
- label={ __( 'Column span' ) }
251
- type="number"
252
- onChange={ ( value ) => {
253
- // Don't allow unsetting.
254
- const newColumnSpan =
255
- value === '' ? 1 : parseInt( value, 10 );
256
- onChange( {
257
- columnStart,
258
- rowStart,
259
- rowSpan,
260
- columnSpan: newColumnSpan,
261
- } );
262
- } }
263
- value={ columnSpan ?? 1 }
264
- min={ 1 }
265
- />
266
- <InputControl
267
- size="__unstable-large"
268
- label={ __( 'Row span' ) }
269
- type="number"
270
- onChange={ ( value ) => {
271
- // Don't allow unsetting.
272
- const newRowSpan =
273
- value === '' ? 1 : parseInt( value, 10 );
274
- onChange( {
275
- columnStart,
276
- rowStart,
277
- columnSpan,
278
- rowSpan: newRowSpan,
279
- } );
280
- } }
281
- value={ rowSpan ?? 1 }
282
- min={ 1 }
283
- />
284
- </HStack>
285
- { window.__experimentalEnableGridInteractivity && columnCount && (
258
+ <FlexItem style={ { width: '50%' } }>
259
+ <InputControl
260
+ size="__unstable-large"
261
+ label={ __( 'Column span' ) }
262
+ type="number"
263
+ onChange={ ( value ) => {
264
+ // Don't allow unsetting.
265
+ const newColumnSpan =
266
+ value === '' ? 1 : parseInt( value, 10 );
267
+ const constrainedValue = maxColumnSpan
268
+ ? Math.min( newColumnSpan, maxColumnSpan )
269
+ : newColumnSpan;
270
+
271
+ onChange( {
272
+ columnStart,
273
+ rowStart,
274
+ rowSpan,
275
+ columnSpan: constrainedValue,
276
+ } );
277
+ } }
278
+ value={ columnSpan ?? 1 }
279
+ min={ 1 }
280
+ max={ maxColumnSpan }
281
+ />
282
+ </FlexItem>
283
+ <FlexItem style={ { width: '50%' } }>
284
+ <InputControl
285
+ size="__unstable-large"
286
+ label={ __( 'Row span' ) }
287
+ type="number"
288
+ onChange={ ( value ) => {
289
+ const newRowSpan =
290
+ value === '' ? 1 : parseInt( value, 10 );
291
+ const constrainedValue = maxRowSpan
292
+ ? Math.min( newRowSpan, maxRowSpan )
293
+ : newRowSpan;
294
+
295
+ onChange( {
296
+ columnStart,
297
+ rowStart,
298
+ columnSpan,
299
+ rowSpan: constrainedValue,
300
+ } );
301
+ } }
302
+ value={ rowSpan ?? 1 }
303
+ min={ 1 }
304
+ max={ maxRowSpan }
305
+ />
306
+ </FlexItem>
307
+ </Flex>
308
+
309
+ { window.__experimentalEnableGridInteractivity && (
286
310
  // Use Flex with an explicit width on the FlexItem instead of HStack to
287
311
  // work around an issue in webkit where inputs with a max attribute are
288
312
  // sized incorrectly.
@@ -10,6 +10,11 @@ $swatch-gap: 12px;
10
10
  }
11
11
 
12
12
  .block-editor-color-gradient-control__fieldset {
13
+ // Reset `fieldset` browser defaults.
14
+ border: 0;
15
+ padding: 0;
16
+ margin: 0;
17
+
13
18
  // Prevents the `fieldset` from growing beyond its parent's size
14
19
  // in order to fit its content.
15
20
  min-width: 0;