@wordpress/block-editor 8.5.2 → 8.6.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 (186) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/block-list/block.native.js +3 -1
  3. package/build/components/block-list/block.native.js.map +1 -1
  4. package/build/components/block-mover/button.js +4 -4
  5. package/build/components/block-mover/button.js.map +1 -1
  6. package/build/components/block-mover/index.js +39 -65
  7. package/build/components/block-mover/index.js.map +1 -1
  8. package/build/components/block-popover/inbetween.js +183 -0
  9. package/build/components/block-popover/inbetween.js.map +1 -0
  10. package/build/components/block-popover/index.js +82 -0
  11. package/build/components/block-popover/index.js.map +1 -0
  12. package/build/components/{block-tools → block-popover}/use-popover-scroll.js +4 -1
  13. package/build/components/block-popover/use-popover-scroll.js.map +1 -0
  14. package/build/components/block-styles/index.js +1 -10
  15. package/build/components/block-styles/index.js.map +1 -1
  16. package/build/components/block-tools/back-compat.js +2 -2
  17. package/build/components/block-tools/back-compat.js.map +1 -1
  18. package/build/components/block-tools/block-selection-button.js +4 -2
  19. package/build/components/block-tools/block-selection-button.js.map +1 -1
  20. package/build/components/block-tools/index.js +5 -5
  21. package/build/components/block-tools/index.js.map +1 -1
  22. package/build/components/block-tools/insertion-point.js +14 -121
  23. package/build/components/block-tools/insertion-point.js.map +1 -1
  24. package/build/components/block-tools/{block-popover.js → selected-block-popover.js} +25 -108
  25. package/build/components/block-tools/selected-block-popover.js.map +1 -0
  26. package/build/components/duotone-control/index.js +5 -1
  27. package/build/components/duotone-control/index.js.map +1 -1
  28. package/build/components/inserter/index.native.js +30 -8
  29. package/build/components/inserter/index.native.js.map +1 -1
  30. package/build/components/rich-text/index.js +0 -5
  31. package/build/components/rich-text/index.js.map +1 -1
  32. package/build/components/rich-text/index.native.js +0 -4
  33. package/build/components/rich-text/index.native.js.map +1 -1
  34. package/build/components/use-block-display-information/index.js +3 -1
  35. package/build/components/use-block-display-information/index.js.map +1 -1
  36. package/build/hooks/border.js +468 -44
  37. package/build/hooks/border.js.map +1 -1
  38. package/build/hooks/duotone.js +66 -16
  39. package/build/hooks/duotone.js.map +1 -1
  40. package/build/hooks/index.js +8 -2
  41. package/build/hooks/index.js.map +1 -1
  42. package/build/hooks/use-border-props.js +22 -32
  43. package/build/hooks/use-border-props.js.map +1 -1
  44. package/build/index.js +7 -0
  45. package/build/index.js.map +1 -1
  46. package/build/store/actions.js +14 -2
  47. package/build/store/actions.js.map +1 -1
  48. package/build/store/reducer.js +0 -26
  49. package/build/store/reducer.js.map +1 -1
  50. package/build/store/selectors.js +9 -3
  51. package/build/store/selectors.js.map +1 -1
  52. package/build-module/components/block-list/block.native.js +3 -1
  53. package/build-module/components/block-list/block.native.js.map +1 -1
  54. package/build-module/components/block-mover/button.js +5 -5
  55. package/build-module/components/block-mover/button.js.map +1 -1
  56. package/build-module/components/block-mover/index.js +38 -63
  57. package/build-module/components/block-mover/index.js.map +1 -1
  58. package/build-module/components/block-popover/inbetween.js +165 -0
  59. package/build-module/components/block-popover/inbetween.js.map +1 -0
  60. package/build-module/components/block-popover/index.js +67 -0
  61. package/build-module/components/block-popover/index.js.map +1 -0
  62. package/build-module/components/{block-tools → block-popover}/use-popover-scroll.js +3 -1
  63. package/build-module/components/block-popover/use-popover-scroll.js.map +1 -0
  64. package/build-module/components/block-styles/index.js +1 -9
  65. package/build-module/components/block-styles/index.js.map +1 -1
  66. package/build-module/components/block-tools/back-compat.js +1 -1
  67. package/build-module/components/block-tools/back-compat.js.map +1 -1
  68. package/build-module/components/block-tools/block-selection-button.js +3 -2
  69. package/build-module/components/block-tools/block-selection-button.js.map +1 -1
  70. package/build-module/components/block-tools/index.js +3 -3
  71. package/build-module/components/block-tools/index.js.map +1 -1
  72. package/build-module/components/block-tools/insertion-point.js +16 -121
  73. package/build-module/components/block-tools/insertion-point.js.map +1 -1
  74. package/build-module/components/block-tools/{block-popover.js → selected-block-popover.js} +25 -105
  75. package/build-module/components/block-tools/selected-block-popover.js.map +1 -0
  76. package/build-module/components/duotone-control/index.js +4 -1
  77. package/build-module/components/duotone-control/index.js.map +1 -1
  78. package/build-module/components/inserter/index.native.js +31 -10
  79. package/build-module/components/inserter/index.native.js.map +1 -1
  80. package/build-module/components/rich-text/index.js +0 -4
  81. package/build-module/components/rich-text/index.js.map +1 -1
  82. package/build-module/components/rich-text/index.native.js +0 -4
  83. package/build-module/components/rich-text/index.native.js.map +1 -1
  84. package/build-module/components/use-block-display-information/index.js +3 -1
  85. package/build-module/components/use-block-display-information/index.js.map +1 -1
  86. package/build-module/hooks/border.js +458 -44
  87. package/build-module/hooks/border.js.map +1 -1
  88. package/build-module/hooks/duotone.js +63 -16
  89. package/build-module/hooks/duotone.js.map +1 -1
  90. package/build-module/hooks/index.js +2 -1
  91. package/build-module/hooks/index.js.map +1 -1
  92. package/build-module/hooks/use-border-props.js +21 -30
  93. package/build-module/hooks/use-border-props.js.map +1 -1
  94. package/build-module/index.js +1 -1
  95. package/build-module/index.js.map +1 -1
  96. package/build-module/store/actions.js +14 -2
  97. package/build-module/store/actions.js.map +1 -1
  98. package/build-module/store/reducer.js +0 -24
  99. package/build-module/store/reducer.js.map +1 -1
  100. package/build-module/store/selectors.js +8 -3
  101. package/build-module/store/selectors.js.map +1 -1
  102. package/build-style/style-rtl.css +111 -246
  103. package/build-style/style.css +111 -246
  104. package/package.json +28 -28
  105. package/src/components/block-list/block.native.js +2 -0
  106. package/src/components/block-mover/button.js +5 -7
  107. package/src/components/block-mover/index.js +37 -60
  108. package/src/components/block-mover/stories/index.js +110 -0
  109. package/src/components/block-mover/style.scss +48 -138
  110. package/src/components/block-popover/README.md +41 -0
  111. package/src/components/block-popover/inbetween.js +180 -0
  112. package/src/components/block-popover/index.js +73 -0
  113. package/src/components/block-popover/style.scss +24 -0
  114. package/src/components/{block-tools → block-popover}/use-popover-scroll.js +3 -1
  115. package/src/components/block-styles/index.js +1 -12
  116. package/src/components/block-switcher/style.scss +0 -4
  117. package/src/components/block-toolbar/style.scss +0 -12
  118. package/src/components/block-tools/back-compat.js +1 -1
  119. package/src/components/block-tools/block-selection-button.js +3 -1
  120. package/src/components/block-tools/index.js +6 -4
  121. package/src/components/block-tools/insertion-point.js +19 -152
  122. package/src/components/block-tools/{block-popover.js → selected-block-popover.js} +24 -116
  123. package/src/components/block-tools/style.scss +11 -123
  124. package/src/components/border-radius-control/style.scss +5 -2
  125. package/src/components/default-block-appender/style.scss +1 -2
  126. package/src/components/duotone-control/index.js +8 -1
  127. package/src/components/gradients/README.md +29 -0
  128. package/src/components/inserter/index.native.js +60 -25
  129. package/src/components/inserter/style.native.scss +24 -3
  130. package/src/components/navigable-toolbar/README.md +16 -0
  131. package/src/components/rich-text/index.js +0 -2
  132. package/src/components/rich-text/index.native.js +0 -4
  133. package/src/components/use-block-display-information/index.js +2 -0
  134. package/src/hooks/border.js +438 -72
  135. package/src/hooks/border.scss +48 -0
  136. package/src/hooks/duotone.js +98 -62
  137. package/src/hooks/index.js +2 -1
  138. package/src/hooks/use-border-props.js +15 -32
  139. package/src/index.js +1 -0
  140. package/src/store/actions.js +14 -2
  141. package/src/store/reducer.js +0 -21
  142. package/src/store/selectors.js +12 -3
  143. package/src/store/test/actions.js +0 -18
  144. package/src/store/test/reducer.js +0 -19
  145. package/src/store/test/selectors.js +0 -19
  146. package/src/style.scss +1 -1
  147. package/build/components/block-mobile-toolbar/index.js +0 -42
  148. package/build/components/block-mobile-toolbar/index.js.map +0 -1
  149. package/build/components/block-tools/block-popover.js.map +0 -1
  150. package/build/components/block-tools/use-popover-scroll.js.map +0 -1
  151. package/build/components/list-view/appender.js +0 -93
  152. package/build/components/list-view/appender.js.map +0 -1
  153. package/build/components/list-view/list-item.js +0 -62
  154. package/build/components/list-view/list-item.js.map +0 -1
  155. package/build/components/rich-text/use-caret-in-format.js +0 -43
  156. package/build/components/rich-text/use-caret-in-format.js.map +0 -1
  157. package/build/hooks/border-color.js +0 -302
  158. package/build/hooks/border-color.js.map +0 -1
  159. package/build/hooks/border-style.js +0 -96
  160. package/build/hooks/border-style.js.map +0 -1
  161. package/build/hooks/border-width.js +0 -162
  162. package/build/hooks/border-width.js.map +0 -1
  163. package/build-module/components/block-mobile-toolbar/index.js +0 -31
  164. package/build-module/components/block-mobile-toolbar/index.js.map +0 -1
  165. package/build-module/components/block-tools/block-popover.js.map +0 -1
  166. package/build-module/components/block-tools/use-popover-scroll.js.map +0 -1
  167. package/build-module/components/list-view/appender.js +0 -76
  168. package/build-module/components/list-view/appender.js.map +0 -1
  169. package/build-module/components/list-view/list-item.js +0 -47
  170. package/build-module/components/list-view/list-item.js.map +0 -1
  171. package/build-module/components/rich-text/use-caret-in-format.js +0 -33
  172. package/build-module/components/rich-text/use-caret-in-format.js.map +0 -1
  173. package/build-module/hooks/border-color.js +0 -276
  174. package/build-module/hooks/border-color.js.map +0 -1
  175. package/build-module/hooks/border-style.js +0 -78
  176. package/build-module/hooks/border-style.js.map +0 -1
  177. package/build-module/hooks/border-width.js +0 -143
  178. package/build-module/hooks/border-width.js.map +0 -1
  179. package/src/components/block-mobile-toolbar/index.js +0 -24
  180. package/src/components/block-mobile-toolbar/style.scss +0 -29
  181. package/src/components/list-view/appender.js +0 -82
  182. package/src/components/list-view/list-item.js +0 -59
  183. package/src/components/rich-text/use-caret-in-format.js +0 -28
  184. package/src/hooks/border-color.js +0 -315
  185. package/src/hooks/border-style.js +0 -64
  186. package/src/hooks/border-width.js +0 -139
@@ -502,6 +502,10 @@
502
502
  */
503
503
  .block-editor-block-list__insertion-point {
504
504
  position: absolute;
505
+ top: 0;
506
+ bottom: 0;
507
+ left: 0;
508
+ right: 0;
505
509
  }
506
510
 
507
511
  .block-editor-block-list__insertion-point-indicator {
@@ -541,7 +545,6 @@
541
545
  position: static;
542
546
  }
543
547
 
544
- .block-editor-block-list__empty-block-inserter .block-editor-inserter__toggle.components-button.has-icon,
545
548
  .block-editor-default-block-appender .block-editor-inserter__toggle.components-button.has-icon,
546
549
  .block-editor-block-list__insertion-point-inserter .block-editor-inserter__toggle.components-button.has-icon,
547
550
  .block-editor-block-list__block-popover-inserter .block-editor-inserter__toggle.components-button.has-icon {
@@ -552,7 +555,6 @@
552
555
  min-width: 24px;
553
556
  height: 24px;
554
557
  }
555
- .block-editor-block-list__empty-block-inserter .block-editor-inserter__toggle.components-button.has-icon:hover,
556
558
  .block-editor-default-block-appender .block-editor-inserter__toggle.components-button.has-icon:hover,
557
559
  .block-editor-block-list__insertion-point-inserter .block-editor-inserter__toggle.components-button.has-icon:hover,
558
560
  .block-editor-block-list__block-popover-inserter .block-editor-inserter__toggle.components-button.has-icon:hover {
@@ -595,30 +597,6 @@
595
597
  .block-editor-block-contextual-toolbar.is-fixed .block-editor-block-toolbar .components-toolbar {
596
598
  border-right-color: #e0e0e0;
597
599
  }
598
- .block-editor-block-contextual-toolbar .block-editor-block-mover-button {
599
- overflow: hidden;
600
- }
601
- .block-editor-block-contextual-toolbar .block-editor-block-mover.is-horizontal .block-editor-block-mover-button.block-editor-block-mover-button {
602
- min-width: 24px;
603
- width: 24px;
604
- }
605
- .block-editor-block-contextual-toolbar .block-editor-block-mover.is-horizontal .block-editor-block-mover-button.block-editor-block-mover-button svg {
606
- min-width: 24px;
607
- }
608
-
609
- .block-editor-block-contextual-toolbar .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover-button:focus::before {
610
- left: 0 !important;
611
- min-width: 0;
612
- width: 100%;
613
- }
614
- @media (min-width: 600px) {
615
- .block-editor-block-contextual-toolbar .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover-button.is-up-button svg {
616
- top: 5px;
617
- }
618
- .block-editor-block-contextual-toolbar .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover-button.is-down-button svg {
619
- bottom: 5px;
620
- }
621
- }
622
600
 
623
601
  /**
624
602
  * Block Label for Navigation/Selection Mode
@@ -673,58 +651,15 @@
673
651
  padding: 0;
674
652
  }
675
653
 
676
- /**
677
- * Popovers.
678
- */
679
- .block-editor-block-list__insertion-point-popover.is-without-arrow {
680
- z-index: 28;
681
- position: absolute;
682
- pointer-events: none;
683
- }
684
- .block-editor-block-list__insertion-point-popover.is-without-arrow * {
685
- pointer-events: none;
686
- }
687
- .block-editor-block-list__insertion-point-popover.is-without-arrow .is-with-inserter {
688
- pointer-events: all;
689
- }
690
- .block-editor-block-list__insertion-point-popover.is-without-arrow .is-with-inserter * {
691
- pointer-events: all;
692
- }
693
- .block-editor-block-list__insertion-point-popover.is-without-arrow .components-popover__content.components-popover__content {
694
- background: none;
695
- border: none;
696
- box-shadow: none;
697
- overflow-y: visible;
698
- margin-left: 0;
699
- }
700
-
701
654
  @keyframes hide-during-dragging {
702
655
  to {
703
656
  position: fixed;
704
657
  transform: translate(9999px, 9999px);
705
658
  }
706
659
  }
707
- .components-popover.block-editor-block-list__block-popover {
708
- z-index: 31;
709
- position: absolute;
710
- }
711
- .components-popover.block-editor-block-list__block-popover .components-popover__content {
712
- margin: 0 !important;
713
- min-width: auto;
714
- width: max-content;
715
- background: none;
716
- border: none;
717
- box-shadow: none;
718
- overflow-y: visible;
719
- pointer-events: none;
720
- }
721
- .components-popover.block-editor-block-list__block-popover .components-popover__content .block-editor-block-list__block-selection-button,
722
- .components-popover.block-editor-block-list__block-popover .components-popover__content .block-editor-block-contextual-toolbar,
723
- .components-popover.block-editor-block-list__block-popover .components-popover__content .block-editor-block-list__empty-block-inserter {
660
+ .components-popover.block-editor-block-list__block-popover .block-editor-block-list__block-selection-button,
661
+ .components-popover.block-editor-block-list__block-popover .block-editor-block-contextual-toolbar {
724
662
  pointer-events: all;
725
- }
726
- .components-popover.block-editor-block-list__block-popover .components-popover__content .block-editor-block-list__block-selection-button,
727
- .components-popover.block-editor-block-list__block-popover .components-popover__content .block-editor-block-contextual-toolbar {
728
663
  margin-top: 12px;
729
664
  margin-bottom: 12px;
730
665
  }
@@ -740,47 +675,6 @@
740
675
  display: none;
741
676
  }
742
677
 
743
- .block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot,
744
- .block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar,
745
- .block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown,
746
- .block-editor-block-toolbar .components-toolbar-group {
747
- padding-left: 6px;
748
- padding-right: 6px;
749
- }
750
- .block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot .components-button,
751
- .block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot .components-button.has-icon.has-icon,
752
- .block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar .components-button,
753
- .block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar .components-button.has-icon.has-icon,
754
- .block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown .components-button,
755
- .block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown .components-button.has-icon.has-icon,
756
- .block-editor-block-toolbar .components-toolbar-group .components-button,
757
- .block-editor-block-toolbar .components-toolbar-group .components-button.has-icon.has-icon {
758
- min-width: 36px;
759
- padding-left: 6px;
760
- padding-right: 6px;
761
- }
762
- .block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot .components-button svg,
763
- .block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot .components-button.has-icon.has-icon svg,
764
- .block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar .components-button svg,
765
- .block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar .components-button.has-icon.has-icon svg,
766
- .block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown .components-button svg,
767
- .block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown .components-button.has-icon.has-icon svg,
768
- .block-editor-block-toolbar .components-toolbar-group .components-button svg,
769
- .block-editor-block-toolbar .components-toolbar-group .components-button.has-icon.has-icon svg {
770
- min-width: 24px;
771
- }
772
- .block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot .components-button::before,
773
- .block-editor-block-toolbar > .components-toolbar > .block-editor-block-toolbar__slot .components-button.has-icon.has-icon::before,
774
- .block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar .components-button::before,
775
- .block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-toolbar .components-button.has-icon.has-icon::before,
776
- .block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown .components-button::before,
777
- .block-editor-block-toolbar > .block-editor-block-toolbar__slot > .components-dropdown .components-button.has-icon.has-icon::before,
778
- .block-editor-block-toolbar .components-toolbar-group .components-button::before,
779
- .block-editor-block-toolbar .components-toolbar-group .components-button.has-icon.has-icon::before {
780
- left: 2px;
781
- right: 2px;
782
- }
783
-
784
678
  .is-vertical .block-list-appender {
785
679
  width: 24px;
786
680
  margin-right: auto;
@@ -1084,138 +978,62 @@
1084
978
  content: none !important;
1085
979
  }
1086
980
 
1087
- .block-editor-block-mobile-toolbar {
981
+ .block-editor-block-mover__move-button-container {
1088
982
  display: flex;
1089
- flex-direction: row;
1090
- border-right: 1px solid #ddd;
1091
- }
1092
- .block-editor-block-mobile-toolbar .block-editor-block-mover-button {
1093
- width: 36px;
1094
- height: 36px;
1095
- border-radius: 2px;
1096
- padding: 3px;
1097
- margin: 0;
1098
- justify-content: center;
1099
- align-items: center;
1100
- }
1101
- .block-editor-block-mobile-toolbar .block-editor-block-mover-button .dashicon {
1102
- margin: auto;
1103
- }
1104
- .block-editor-block-mobile-toolbar .block-editor-block-mover {
1105
- display: flex;
1106
- margin-right: auto;
1107
- }
1108
- .block-editor-block-mobile-toolbar .block-editor-block-mover .block-editor-block-mover-button {
1109
- float: left;
1110
- }
1111
-
1112
- .block-editor-block-mover-button__description {
1113
- display: none;
1114
- }
1115
-
1116
- .block-editor-block-mover-button.has-icon {
1117
- padding: 0;
1118
- }
1119
-
1120
- .block-editor-block-mover {
1121
- display: inline-flex;
1122
- flex-direction: row;
1123
- }
1124
- .block-editor-block-mover .block-editor-block-mover__move-button-container,
1125
- .block-editor-block-mover .components-toolbar {
1126
- flex: 1;
1127
- flex-direction: row;
1128
- border-right: none !important;
1129
983
  padding: 0;
984
+ border: none;
1130
985
  }
1131
986
  @media (min-width: 600px) {
1132
- .block-editor-block-mover .block-editor-block-mover__move-button-container,
1133
- .block-editor-block-mover .components-toolbar {
987
+ .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover__move-button-container {
1134
988
  flex-direction: column;
989
+ width: 36px;
1135
990
  }
1136
- }
1137
- .block-editor-block-mover.is-horizontal .block-editor-block-mover__move-button-container, .block-editor-block-mover.is-horizontal .components-toolbar {
1138
- flex-direction: row;
1139
- }
1140
- .block-editor-block-mover .block-editor-block-mover-button.block-editor-block-mover-button {
1141
- padding-right: 0;
1142
- padding-left: 0;
1143
- min-width: 36px;
1144
- }
1145
- @media (min-width: 600px) {
1146
- .block-editor-block-mover .block-editor-block-mover-button {
991
+ .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover__move-button-container > * {
1147
992
  height: 24px;
1148
- width: 42px;
1149
- padding-right: 11px !important;
1150
- padding-left: 6px !important;
993
+ width: 100%;
994
+ min-width: 0 !important;
1151
995
  }
1152
- .block-editor-block-mover .block-editor-block-mover-button.block-editor-block-mover-button {
1153
- min-width: 42px;
996
+ .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover__move-button-container > *::before {
997
+ height: 100%;
998
+ width: 100%;
1154
999
  }
1155
- }
1156
- @media (min-width: 600px) {
1157
- .block-editor-block-mover .block-editor-block-mover-button::before {
1158
- left: 8px !important;
1159
- right: 8px !important;
1000
+ .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover__move-button-container .block-editor-block-mover-button.is-up-button svg {
1001
+ top: 5px;
1002
+ flex-shrink: 0;
1160
1003
  }
1161
- }
1162
- .block-editor-block-mover .block-editor-block-mover__drag-handle {
1163
- width: 24px;
1164
- cursor: grab;
1165
- min-width: 24px !important;
1166
- padding: 0 !important;
1167
- }
1168
- .block-editor-block-mover .block-editor-block-mover__drag-handle:focus::before {
1169
- left: 0 !important;
1170
- right: 0 !important;
1171
- }
1172
- @media (min-width: 600px) {
1173
- .block-editor-block-mover .components-toolbar-group .block-editor-block-mover-button,
1174
- .block-editor-block-mover .components-toolbar .block-editor-block-mover-button {
1175
- margin: 0 auto 0 0;
1004
+ .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover__move-button-container .block-editor-block-mover-button.is-down-button svg {
1005
+ bottom: 5px;
1006
+ flex-shrink: 0;
1176
1007
  }
1177
- .block-editor-block-mover .components-toolbar-group .block-editor-block-mover-button.is-up-button::before,
1178
- .block-editor-block-mover .components-toolbar .block-editor-block-mover-button.is-up-button::before {
1179
- bottom: 0;
1180
- height: calc(100% - 1px);
1008
+ .block-editor-block-mover.is-horizontal .block-editor-block-mover__move-button-container {
1009
+ width: 48px;
1181
1010
  }
1182
- .block-editor-block-mover .components-toolbar-group .block-editor-block-mover-button.is-down-button::before,
1183
- .block-editor-block-mover .components-toolbar .block-editor-block-mover-button.is-down-button::before {
1184
- top: 0;
1185
- height: calc(100% - 1px);
1011
+ .block-editor-block-mover.is-horizontal .block-editor-block-mover__move-button-container > * {
1012
+ width: 24px;
1013
+ min-width: 0 !important;
1014
+ padding-left: 0 !important;
1015
+ padding-right: 0 !important;
1016
+ overflow: hidden;
1017
+ }
1018
+ .block-editor-block-mover.is-horizontal .block-editor-block-mover__move-button-container > *::before {
1019
+ height: 100%;
1020
+ }
1021
+ .block-editor-block-mover.is-horizontal .block-editor-block-mover__move-button-container .block-editor-block-mover-button.is-up-button svg {
1022
+ left: 5px;
1023
+ }
1024
+ .block-editor-block-mover.is-horizontal .block-editor-block-mover__move-button-container .block-editor-block-mover-button.is-down-button svg {
1025
+ right: 5px;
1186
1026
  }
1187
1027
  }
1188
- .block-editor-block-mover.is-horizontal .block-editor-block-mover-button.has-icon {
1189
- height: 48px;
1190
- width: 24px;
1191
- padding-left: 0;
1192
- padding-right: 0;
1193
- }
1194
- .block-editor-block-mover.is-horizontal .block-editor-block-mover-button.has-icon::before {
1195
- top: 1px;
1196
- bottom: 1px;
1197
- min-width: 0;
1198
- width: auto;
1199
- height: auto;
1200
- }
1201
- .block-editor-block-mover.is-horizontal .block-editor-block-mover-button.is-up-button.has-icon svg {
1202
- margin-left: 0;
1203
- margin-right: -8px;
1204
- margin-bottom: 0;
1205
- }
1206
- .block-editor-block-mover.is-horizontal .block-editor-block-mover-button.is-up-button.has-icon::before {
1207
- left: 0 !important;
1208
- right: 0 !important;
1209
- }
1210
- .block-editor-block-mover.is-horizontal .block-editor-block-mover-button.is-down-button.has-icon svg {
1211
- margin-left: -8px;
1212
- margin-right: 0;
1213
- margin-top: 0;
1214
- }
1215
- .block-editor-block-mover.is-horizontal .block-editor-block-mover-button.is-down-button.has-icon::before {
1216
- left: 0 !important;
1217
- right: 0 !important;
1218
- width: calc(100% + 1px);
1028
+
1029
+ @media (min-width: 600px) {
1030
+ .block-editor-block-mover__drag-handle {
1031
+ width: 24px;
1032
+ min-width: 0 !important;
1033
+ padding-left: 0 !important;
1034
+ padding-right: 0 !important;
1035
+ overflow: hidden;
1036
+ }
1219
1037
  }
1220
1038
 
1221
1039
  .block-editor-block-navigation__container {
@@ -1278,6 +1096,24 @@
1278
1096
  color: var(--wp-admin-theme-color);
1279
1097
  }
1280
1098
 
1099
+ .components-popover.block-editor-block-popover {
1100
+ z-index: 31;
1101
+ position: absolute;
1102
+ }
1103
+ .components-popover.block-editor-block-popover .components-popover__content {
1104
+ margin: 0 !important;
1105
+ min-width: auto;
1106
+ width: max-content;
1107
+ background: none;
1108
+ border: none;
1109
+ box-shadow: none;
1110
+ overflow-y: visible;
1111
+ pointer-events: none;
1112
+ }
1113
+ .components-popover.block-editor-block-popover .components-popover__content > * {
1114
+ pointer-events: all;
1115
+ }
1116
+
1281
1117
  .block-editor-block-preview__container {
1282
1118
  position: relative;
1283
1119
  width: 100%;
@@ -1384,7 +1220,6 @@
1384
1220
 
1385
1221
  .block-editor-block-switcher {
1386
1222
  position: relative;
1387
- padding: 0 6px;
1388
1223
  }
1389
1224
  .block-editor-block-switcher .components-button.components-dropdown-menu__toggle.has-icon.has-icon {
1390
1225
  min-width: 36px;
@@ -1423,7 +1258,6 @@
1423
1258
 
1424
1259
  .components-button.block-editor-block-switcher__no-switcher-icon {
1425
1260
  display: flex;
1426
- padding: 6px 12px !important;
1427
1261
  }
1428
1262
  .components-button.block-editor-block-switcher__no-switcher-icon .block-editor-block-icon {
1429
1263
  margin-right: auto;
@@ -1807,11 +1641,13 @@
1807
1641
  align-items: flex-start;
1808
1642
  }
1809
1643
  .components-border-radius-control .components-border-radius-control__wrapper > .components-unit-control-wrapper {
1810
- width: calc(50% - 26px);
1644
+ width: 110px;
1811
1645
  margin-bottom: 0;
1646
+ margin-right: 8px;
1647
+ flex-shrink: 0;
1812
1648
  }
1813
1649
  .components-border-radius-control .components-border-radius-control__wrapper .components-range-control {
1814
- width: calc(50% - 26px);
1650
+ flex: 1;
1815
1651
  margin-bottom: 0;
1816
1652
  }
1817
1653
  .components-border-radius-control .components-border-radius-control__wrapper .components-range-control .components-base-control__field {
@@ -1837,6 +1673,7 @@
1837
1673
  .components-border-radius-control .component-border-radius-control__linked-button.has-icon {
1838
1674
  display: flex;
1839
1675
  justify-content: center;
1676
+ margin-left: 2px;
1840
1677
  }
1841
1678
  .components-border-radius-control .component-border-radius-control__linked-button.has-icon svg {
1842
1679
  margin-right: 0;
@@ -1985,15 +1822,13 @@
1985
1822
  display: none;
1986
1823
  }
1987
1824
 
1988
- .block-editor-default-block-appender .block-editor-inserter,
1989
- .block-editor-block-list__empty-block-inserter.block-editor-block-list__empty-block-inserter {
1825
+ .block-editor-default-block-appender .block-editor-inserter {
1990
1826
  position: absolute;
1991
1827
  top: 0;
1992
1828
  right: 0;
1993
1829
  line-height: 0;
1994
1830
  }
1995
- .block-editor-default-block-appender .block-editor-inserter:disabled,
1996
- .block-editor-block-list__empty-block-inserter.block-editor-block-list__empty-block-inserter:disabled {
1831
+ .block-editor-default-block-appender .block-editor-inserter:disabled {
1997
1832
  display: none;
1998
1833
  }
1999
1834
 
@@ -3770,6 +3605,44 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
3770
3605
  grid-column: span 1;
3771
3606
  }
3772
3607
 
3608
+ .block-editor__border-box-control__popover .components-popover__content,
3609
+ .block-editor__border-box-control__popover-top .components-popover__content,
3610
+ .block-editor__border-box-control__popover-right .components-popover__content,
3611
+ .block-editor__border-box-control__popover-bottom .components-popover__content,
3612
+ .block-editor__border-box-control__popover-left .components-popover__content {
3613
+ width: 282px;
3614
+ }
3615
+
3616
+ @media (min-width: 782px) {
3617
+ .block-editor__border-box-control__popover .components-popover__content,
3618
+ .block-editor__border-box-control__popover-left .components-popover__content {
3619
+ margin-right: 52px !important;
3620
+ }
3621
+
3622
+ .block-editor__border-box-control__popover-top .components-popover__content,
3623
+ .block-editor__border-box-control__popover-bottom .components-popover__content {
3624
+ margin-right: 107px !important;
3625
+ }
3626
+
3627
+ .block-editor__border-box-control__popover-right .components-popover__content {
3628
+ margin-right: 162px !important;
3629
+ }
3630
+
3631
+ .block-editor__border-box-control__popover.is-from-top .components-popover__content,
3632
+ .block-editor__border-box-control__popover-top.is-from-top .components-popover__content,
3633
+ .block-editor__border-box-control__popover-right.is-from-top .components-popover__content,
3634
+ .block-editor__border-box-control__popover-bottom.is-from-top .components-popover__content,
3635
+ .block-editor__border-box-control__popover-left.is-from-top .components-popover__content {
3636
+ margin-top: -52px !important;
3637
+ }
3638
+ .block-editor__border-box-control__popover.is-from-bottom .components-popover__content,
3639
+ .block-editor__border-box-control__popover-top.is-from-bottom .components-popover__content,
3640
+ .block-editor__border-box-control__popover-right.is-from-bottom .components-popover__content,
3641
+ .block-editor__border-box-control__popover-bottom.is-from-bottom .components-popover__content,
3642
+ .block-editor__border-box-control__popover-left.is-from-bottom .components-popover__content {
3643
+ margin-bottom: -52px !important;
3644
+ }
3645
+ }
3773
3646
  .dimensions-block-support-panel .single-column {
3774
3647
  grid-column: span 1;
3775
3648
  }
@@ -3911,19 +3784,11 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
3911
3784
  margin-bottom: -1px;
3912
3785
  }
3913
3786
 
3914
- .block-editor-block-toolbar__block-controls {
3915
- height: auto !important;
3916
- padding: 0 !important;
3917
- margin-left: -1px;
3918
- }
3919
3787
  .block-editor-block-toolbar__block-controls .block-editor-block-switcher .components-dropdown-menu__toggle .block-editor-block-icon,
3920
3788
  .block-editor-block-toolbar__block-controls .block-editor-block-switcher__no-switcher-icon .block-editor-block-icon {
3921
3789
  width: 24px !important;
3922
3790
  margin: 0 !important;
3923
3791
  }
3924
- .block-editor-block-toolbar__block-controls .block-editor-block-mover {
3925
- margin-left: -6px;
3926
- }
3927
3792
  .block-editor-block-toolbar__block-controls .block-editor-block-lock-toolbar {
3928
3793
  margin-left: -6px !important;
3929
3794
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-editor",
3
- "version": "8.5.2",
3
+ "version": "8.6.0",
4
4
  "description": "Generic block editor.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -33,32 +33,32 @@
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.16.0",
35
35
  "@react-spring/web": "^9.2.4",
36
- "@wordpress/a11y": "^3.6.1",
37
- "@wordpress/api-fetch": "^6.3.1",
38
- "@wordpress/blob": "^3.6.1",
39
- "@wordpress/blocks": "^11.5.2",
40
- "@wordpress/components": "^19.8.1",
41
- "@wordpress/compose": "^5.4.1",
42
- "@wordpress/data": "^6.6.1",
43
- "@wordpress/date": "^4.6.1",
44
- "@wordpress/deprecated": "^3.6.1",
45
- "@wordpress/dom": "^3.6.1",
46
- "@wordpress/element": "^4.4.1",
47
- "@wordpress/hooks": "^3.6.1",
48
- "@wordpress/html-entities": "^3.6.1",
49
- "@wordpress/i18n": "^4.6.1",
50
- "@wordpress/icons": "^8.2.1",
51
- "@wordpress/is-shallow-equal": "^4.6.1",
52
- "@wordpress/keyboard-shortcuts": "^3.4.1",
53
- "@wordpress/keycodes": "^3.6.1",
54
- "@wordpress/notices": "^3.6.1",
55
- "@wordpress/rich-text": "^5.4.1",
56
- "@wordpress/shortcode": "^3.6.1",
57
- "@wordpress/style-engine": "^0.5.1",
58
- "@wordpress/token-list": "^2.6.1",
59
- "@wordpress/url": "^3.7.1",
60
- "@wordpress/warning": "^2.6.1",
61
- "@wordpress/wordcount": "^3.6.1",
36
+ "@wordpress/a11y": "^3.7.0",
37
+ "@wordpress/api-fetch": "^6.4.0",
38
+ "@wordpress/blob": "^3.7.0",
39
+ "@wordpress/blocks": "^11.6.0",
40
+ "@wordpress/components": "^19.9.0",
41
+ "@wordpress/compose": "^5.5.0",
42
+ "@wordpress/data": "^6.7.0",
43
+ "@wordpress/date": "^4.7.0",
44
+ "@wordpress/deprecated": "^3.7.0",
45
+ "@wordpress/dom": "^3.7.0",
46
+ "@wordpress/element": "^4.5.0",
47
+ "@wordpress/hooks": "^3.7.0",
48
+ "@wordpress/html-entities": "^3.7.0",
49
+ "@wordpress/i18n": "^4.7.0",
50
+ "@wordpress/icons": "^8.3.0",
51
+ "@wordpress/is-shallow-equal": "^4.7.0",
52
+ "@wordpress/keyboard-shortcuts": "^3.5.0",
53
+ "@wordpress/keycodes": "^3.7.0",
54
+ "@wordpress/notices": "^3.7.0",
55
+ "@wordpress/rich-text": "^5.5.0",
56
+ "@wordpress/shortcode": "^3.7.0",
57
+ "@wordpress/style-engine": "^0.6.0",
58
+ "@wordpress/token-list": "^2.7.0",
59
+ "@wordpress/url": "^3.8.0",
60
+ "@wordpress/warning": "^2.7.0",
61
+ "@wordpress/wordcount": "^3.7.0",
62
62
  "classnames": "^2.3.1",
63
63
  "colord": "^2.7.0",
64
64
  "diff": "^4.0.2",
@@ -77,5 +77,5 @@
77
77
  "publishConfig": {
78
78
  "access": "public"
79
79
  },
80
- "gitHead": "446565ecaa40370173c18926535e975ec5652b71"
80
+ "gitHead": "1ba52312b56db563df2d8d4fba5b00613fb46d8c"
81
81
  }
@@ -47,6 +47,7 @@ function BlockForType( {
47
47
  onDeleteBlock,
48
48
  onReplace,
49
49
  parentWidth,
50
+ parentBlockAlignment,
50
51
  wrapperProps,
51
52
  blockWidth,
52
53
  baseGlobalStyles,
@@ -95,6 +96,7 @@ function BlockForType( {
95
96
  contentStyle={ contentStyle }
96
97
  onDeleteBlock={ onDeleteBlock }
97
98
  blockWidth={ blockWidth }
99
+ parentBlockAlignment={ parentBlockAlignment }
98
100
  />
99
101
  <View onLayout={ getBlockWidth } />
100
102
  </GlobalStylesContext.Provider>
@@ -8,7 +8,7 @@ import { castArray, first, last } from 'lodash';
8
8
  * WordPress dependencies
9
9
  */
10
10
  import { getBlockType } from '@wordpress/blocks';
11
- import { Button } from '@wordpress/components';
11
+ import { Button, VisuallyHidden } from '@wordpress/components';
12
12
  import { useInstanceId } from '@wordpress/compose';
13
13
  import { useSelect, useDispatch } from '@wordpress/data';
14
14
  import { forwardRef } from '@wordpress/element';
@@ -139,12 +139,10 @@ const BlockMoverButton = forwardRef(
139
139
  aria-describedby={ descriptionId }
140
140
  { ...props }
141
141
  onClick={ isDisabled ? null : onClick }
142
- aria-disabled={ isDisabled }
142
+ disabled={ isDisabled }
143
+ __experimentalIsFocusable
143
144
  />
144
- <span
145
- id={ descriptionId }
146
- className="block-editor-block-mover-button__description"
147
- >
145
+ <VisuallyHidden id={ descriptionId }>
148
146
  { getBlockMoverDescription(
149
147
  blocksCount,
150
148
  blockType && blockType.title,
@@ -154,7 +152,7 @@ const BlockMoverButton = forwardRef(
154
152
  direction === 'up' ? -1 : 1,
155
153
  orientation
156
154
  ) }
157
- </span>
155
+ </VisuallyHidden>
158
156
  </>
159
157
  );
160
158
  }