@wordpress/block-editor 14.0.0 → 14.1.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 +2 -0
- package/README.md +9 -14
- package/build/autocompleters/block.js +1 -1
- package/build/autocompleters/block.js.map +1 -1
- package/build/components/block-list/use-block-props/index.js +2 -2
- package/build/components/block-list/use-block-props/index.js.map +1 -1
- package/build/components/block-list/use-in-between-inserter.js +11 -4
- package/build/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build/components/block-settings-menu/block-mode-toggle.js +28 -34
- package/build/components/block-settings-menu/block-mode-toggle.js.map +1 -1
- package/build/components/block-tools/insertion-point.js +14 -3
- package/build/components/block-tools/insertion-point.js.map +1 -1
- package/build/components/block-tools/use-show-block-tools.js +2 -1
- package/build/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build/components/block-tools/zoom-out-mode-inserters.js +8 -4
- package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build/components/border-radius-control/index.js +1 -0
- package/build/components/border-radius-control/index.js.map +1 -1
- package/build/components/convert-to-group-buttons/index.js +1 -1
- package/build/components/convert-to-group-buttons/index.js.map +1 -1
- package/build/components/date-format-picker/index.js +2 -0
- package/build/components/date-format-picker/index.js.map +1 -1
- package/build/components/font-appearance-control/index.js +3 -0
- package/build/components/font-appearance-control/index.js.map +1 -1
- package/build/components/font-family/index.js +3 -0
- package/build/components/font-family/index.js.map +1 -1
- package/build/components/global-styles/background-panel.js +114 -42
- package/build/components/global-styles/background-panel.js.map +1 -1
- package/build/components/global-styles/get-global-styles-changes.js +3 -1
- package/build/components/global-styles/get-global-styles-changes.js.map +1 -1
- package/build/components/global-styles/hooks.js +0 -7
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/index.js +0 -6
- package/build/components/global-styles/index.js.map +1 -1
- package/build/components/global-styles/use-global-styles-output.js +3 -3
- package/build/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build/components/global-styles/utils.js +8 -24
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/grid/grid-visualizer.js +20 -5
- package/build/components/grid/grid-visualizer.js.map +1 -1
- package/build/components/height-control/index.js +1 -0
- package/build/components/height-control/index.js.map +1 -1
- package/build/components/iframe/index.js +4 -2
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/image-editor/zoom-dropdown.js +11 -7
- package/build/components/image-editor/zoom-dropdown.js.map +1 -1
- package/build/components/inner-blocks/button-block-appender.js +8 -8
- package/build/components/inner-blocks/button-block-appender.js.map +1 -1
- package/build/components/inner-blocks/default-block-appender.js +7 -25
- package/build/components/inner-blocks/default-block-appender.js.map +1 -1
- package/build/components/inner-blocks/index.js +9 -11
- package/build/components/inner-blocks/index.js.map +1 -1
- package/build/components/inserter/library.js +4 -2
- package/build/components/inserter/library.js.map +1 -1
- package/build/components/inserter/menu.js +30 -12
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/inserter/quick-inserter.js +4 -0
- package/build/components/inserter/quick-inserter.js.map +1 -1
- package/build/components/line-height-control/index.js +3 -0
- package/build/components/line-height-control/index.js.map +1 -1
- package/build/components/media-placeholder/index.js +9 -4
- package/build/components/media-placeholder/index.js.map +1 -1
- package/build/components/media-upload/index.native.js +4 -1
- package/build/components/media-upload/index.native.js.map +1 -1
- package/build/components/multi-selection-inspector/index.js +12 -12
- package/build/components/multi-selection-inspector/index.js.map +1 -1
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +4 -2
- package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build/components/text-alignment-control/index.js +13 -8
- package/build/components/text-alignment-control/index.js.map +1 -1
- package/build/components/text-decoration-control/index.js +13 -8
- package/build/components/text-decoration-control/index.js.map +1 -1
- package/build/components/text-transform-control/index.js +13 -8
- package/build/components/text-transform-control/index.js.map +1 -1
- package/build/components/url-popover/image-url-input-ui.js +2 -0
- package/build/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build/components/use-block-drop-zone/index.js +14 -2
- package/build/components/use-block-drop-zone/index.js.map +1 -1
- package/build/components/writing-mode-control/index.js +13 -8
- package/build/components/writing-mode-control/index.js.map +1 -1
- package/build/hooks/background.js +19 -23
- package/build/hooks/background.js.map +1 -1
- package/build/hooks/block-bindings.js +37 -79
- package/build/hooks/block-bindings.js.map +1 -1
- package/build/layouts/constrained.js +1 -0
- package/build/layouts/constrained.js.map +1 -1
- package/build/layouts/flex.js +2 -0
- package/build/layouts/flex.js.map +1 -1
- package/build/layouts/grid.js +3 -0
- package/build/layouts/grid.js.map +1 -1
- package/build/private-apis.js +3 -1
- package/build/private-apis.js.map +1 -1
- package/build/store/private-selectors.js +30 -0
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +10 -1
- package/build/store/reducer.js.map +1 -1
- package/build/utils/block-bindings.js +112 -0
- package/build/utils/block-bindings.js.map +1 -0
- package/build-module/autocompleters/block.js +1 -1
- package/build-module/autocompleters/block.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.js +2 -2
- package/build-module/components/block-list/use-block-props/index.js.map +1 -1
- package/build-module/components/block-list/use-in-between-inserter.js +11 -4
- package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
- package/build-module/components/block-settings-menu/block-mode-toggle.js +29 -34
- package/build-module/components/block-settings-menu/block-mode-toggle.js.map +1 -1
- package/build-module/components/block-tools/insertion-point.js +14 -3
- package/build-module/components/block-tools/insertion-point.js.map +1 -1
- package/build-module/components/block-tools/use-show-block-tools.js +2 -1
- package/build-module/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-mode-inserters.js +8 -4
- package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build-module/components/border-radius-control/index.js +1 -0
- package/build-module/components/border-radius-control/index.js.map +1 -1
- package/build-module/components/convert-to-group-buttons/index.js +1 -1
- package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
- package/build-module/components/date-format-picker/index.js +2 -0
- package/build-module/components/date-format-picker/index.js.map +1 -1
- package/build-module/components/font-appearance-control/index.js +3 -0
- package/build-module/components/font-appearance-control/index.js.map +1 -1
- package/build-module/components/font-family/index.js +3 -0
- package/build-module/components/font-family/index.js.map +1 -1
- package/build-module/components/global-styles/background-panel.js +117 -45
- package/build-module/components/global-styles/background-panel.js.map +1 -1
- package/build-module/components/global-styles/get-global-styles-changes.js +3 -1
- package/build-module/components/global-styles/get-global-styles-changes.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +0 -6
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/index.js +1 -1
- package/build-module/components/global-styles/index.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-output.js +5 -5
- package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build-module/components/global-styles/utils.js +8 -23
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/grid/grid-visualizer.js +20 -5
- package/build-module/components/grid/grid-visualizer.js.map +1 -1
- package/build-module/components/height-control/index.js +1 -0
- package/build-module/components/height-control/index.js.map +1 -1
- package/build-module/components/iframe/index.js +4 -2
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/image-editor/zoom-dropdown.js +12 -8
- package/build-module/components/image-editor/zoom-dropdown.js.map +1 -1
- package/build-module/components/inner-blocks/button-block-appender.js +7 -6
- package/build-module/components/inner-blocks/button-block-appender.js.map +1 -1
- package/build-module/components/inner-blocks/default-block-appender.js +6 -23
- package/build-module/components/inner-blocks/default-block-appender.js.map +1 -1
- package/build-module/components/inner-blocks/index.js +9 -11
- package/build-module/components/inner-blocks/index.js.map +1 -1
- package/build-module/components/inserter/library.js +4 -2
- package/build-module/components/inserter/library.js.map +1 -1
- package/build-module/components/inserter/menu.js +30 -12
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/inserter/quick-inserter.js +5 -1
- package/build-module/components/inserter/quick-inserter.js.map +1 -1
- package/build-module/components/line-height-control/index.js +3 -0
- package/build-module/components/line-height-control/index.js.map +1 -1
- package/build-module/components/media-placeholder/index.js +9 -4
- package/build-module/components/media-placeholder/index.js.map +1 -1
- package/build-module/components/media-upload/index.native.js +4 -1
- package/build-module/components/media-upload/index.native.js.map +1 -1
- package/build-module/components/multi-selection-inspector/index.js +12 -12
- package/build-module/components/multi-selection-inspector/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +4 -2
- package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
- package/build-module/components/text-alignment-control/index.js +13 -8
- package/build-module/components/text-alignment-control/index.js.map +1 -1
- package/build-module/components/text-decoration-control/index.js +13 -8
- package/build-module/components/text-decoration-control/index.js.map +1 -1
- package/build-module/components/text-transform-control/index.js +13 -8
- package/build-module/components/text-transform-control/index.js.map +1 -1
- package/build-module/components/url-popover/image-url-input-ui.js +2 -0
- package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build-module/components/use-block-drop-zone/index.js +14 -2
- package/build-module/components/use-block-drop-zone/index.js.map +1 -1
- package/build-module/components/writing-mode-control/index.js +13 -8
- package/build-module/components/writing-mode-control/index.js.map +1 -1
- package/build-module/hooks/background.js +19 -23
- package/build-module/hooks/background.js.map +1 -1
- package/build-module/hooks/block-bindings.js +38 -80
- package/build-module/hooks/block-bindings.js.map +1 -1
- package/build-module/layouts/constrained.js +1 -0
- package/build-module/layouts/constrained.js.map +1 -1
- package/build-module/layouts/flex.js +2 -0
- package/build-module/layouts/flex.js.map +1 -1
- package/build-module/layouts/grid.js +3 -0
- package/build-module/layouts/grid.js.map +1 -1
- package/build-module/private-apis.js +3 -1
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/private-selectors.js +27 -0
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +9 -1
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/utils/block-bindings.js +105 -0
- package/build-module/utils/block-bindings.js.map +1 -0
- package/build-style/content-rtl.css +7 -14
- package/build-style/content.css +7 -14
- package/build-style/default-editor-styles-rtl.css +2 -2
- package/build-style/default-editor-styles.css +2 -2
- package/build-style/style-rtl.css +36 -38
- package/build-style/style.css +36 -38
- package/package.json +32 -32
- package/src/autocompleters/block.js +2 -1
- package/src/components/block-list/content.scss +5 -13
- package/src/components/block-list/use-block-props/index.js +2 -2
- package/src/components/block-list/use-in-between-inserter.js +17 -5
- package/src/components/block-settings-menu/block-mode-toggle.js +28 -31
- package/src/components/block-settings-menu/test/block-mode-toggle.js +26 -23
- package/src/components/block-tools/insertion-point.js +11 -0
- package/src/components/block-tools/style.scss +1 -1
- package/src/components/block-tools/use-show-block-tools.js +4 -1
- package/src/components/block-tools/zoom-out-mode-inserters.js +7 -1
- package/src/components/block-variation-transforms/style.scss +1 -1
- package/src/components/border-radius-control/index.js +1 -0
- package/src/components/border-radius-control/style.scss +0 -10
- package/src/components/convert-to-group-buttons/index.js +1 -1
- package/src/components/date-format-picker/index.js +2 -0
- package/src/components/font-appearance-control/index.js +3 -0
- package/src/components/font-family/README.md +11 -2
- package/src/components/font-family/index.js +3 -0
- package/src/components/global-styles/background-panel.js +132 -53
- package/src/components/global-styles/get-global-styles-changes.js +4 -1
- package/src/components/global-styles/hooks.js +0 -5
- package/src/components/global-styles/index.js +0 -1
- package/src/components/global-styles/style.scss +13 -2
- package/src/components/global-styles/test/use-global-styles-output.js +20 -4
- package/src/components/global-styles/use-global-styles-output.js +5 -6
- package/src/components/global-styles/utils.js +7 -29
- package/src/components/grid/grid-visualizer.js +22 -7
- package/src/components/height-control/index.js +1 -0
- package/src/components/iframe/index.js +4 -2
- package/src/components/image-editor/zoom-dropdown.js +17 -9
- package/src/components/inner-blocks/button-block-appender.js +5 -7
- package/src/components/inner-blocks/default-block-appender.js +4 -23
- package/src/components/inner-blocks/index.js +10 -9
- package/src/components/inserter/library.js +2 -0
- package/src/components/inserter/menu.js +32 -27
- package/src/components/inserter/quick-inserter.js +4 -1
- package/src/components/inserter/style.scss +1 -1
- package/src/components/inserter-list-item/style.scss +1 -0
- package/src/components/line-height-control/README.md +7 -0
- package/src/components/line-height-control/index.js +3 -0
- package/src/components/link-control/style.scss +1 -1
- package/src/components/media-placeholder/index.js +12 -7
- package/src/components/media-upload/README.md +2 -0
- package/src/components/media-upload/index.native.js +2 -0
- package/src/components/multi-selection-inspector/index.js +8 -9
- package/src/components/responsive-block-control/README.md +1 -0
- package/src/components/responsive-block-control/test/index.js +1 -0
- package/src/components/spacing-sizes-control/input-controls/spacing-input-control.js +8 -4
- package/src/components/spacing-sizes-control/style.scss +16 -16
- package/src/components/text-alignment-control/index.js +20 -8
- package/src/components/text-decoration-control/index.js +20 -8
- package/src/components/text-decoration-control/stories/index.story.js +0 -4
- package/src/components/text-transform-control/index.js +20 -8
- package/src/components/text-transform-control/stories/index.story.js +0 -4
- package/src/components/url-input/style.scss +2 -2
- package/src/components/url-popover/image-url-input-ui.js +2 -0
- package/src/components/use-block-drop-zone/index.js +21 -3
- package/src/components/writing-mode-control/index.js +20 -8
- package/src/hooks/background.js +21 -27
- package/src/hooks/block-bindings.js +27 -84
- package/src/hooks/block-bindings.scss +1 -1
- package/src/hooks/test/background.js +60 -0
- package/src/layouts/constrained.js +1 -0
- package/src/layouts/flex.js +2 -0
- package/src/layouts/grid.js +3 -0
- package/src/private-apis.js +2 -0
- package/src/store/private-selectors.js +36 -0
- package/src/store/reducer.js +7 -0
- package/src/store/test/private-selectors.js +89 -0
- package/src/style.scss +0 -1
- package/src/utils/block-bindings.js +98 -0
- package/src/utils/test/transform-styles.js +49 -0
- package/build/components/global-styles/theme-file-uri-utils.js +0 -21
- package/build/components/global-styles/theme-file-uri-utils.js.map +0 -1
- package/build/components/inner-blocks/with-client-id.js +0 -28
- package/build/components/inner-blocks/with-client-id.js.map +0 -1
- package/build/components/segmented-text-control/index.js +0 -63
- package/build/components/segmented-text-control/index.js.map +0 -1
- package/build-module/components/global-styles/theme-file-uri-utils.js +0 -15
- package/build-module/components/global-styles/theme-file-uri-utils.js.map +0 -1
- package/build-module/components/inner-blocks/with-client-id.js +0 -21
- package/build-module/components/inner-blocks/with-client-id.js.map +0 -1
- package/build-module/components/segmented-text-control/index.js +0 -58
- package/build-module/components/segmented-text-control/index.js.map +0 -1
- package/src/components/global-styles/test/theme-file-uri-utils.js +0 -41
- package/src/components/global-styles/theme-file-uri-utils.js +0 -18
- package/src/components/inner-blocks/with-client-id.js +0 -19
- package/src/components/segmented-text-control/index.js +0 -63
- package/src/components/segmented-text-control/style.scss +0 -15
|
@@ -19,6 +19,7 @@ import { range, GridRect, getGridInfo } from './utils';
|
|
|
19
19
|
import { store as blockEditorStore } from '../../store';
|
|
20
20
|
import { useGetNumberOfBlocksBeforeCell } from './use-get-number-of-blocks-before-cell';
|
|
21
21
|
import ButtonBlockAppender from '../button-block-appender';
|
|
22
|
+
import { unlock } from '../../lock-unlock';
|
|
22
23
|
|
|
23
24
|
export function GridVisualizer( { clientId, contentRef, parentLayout } ) {
|
|
24
25
|
const isDistractionFree = useSelect(
|
|
@@ -118,19 +119,25 @@ const GridVisualizerGrid = forwardRef(
|
|
|
118
119
|
function ManualGridVisualizer( { gridClientId, gridInfo } ) {
|
|
119
120
|
const [ highlightedRect, setHighlightedRect ] = useState( null );
|
|
120
121
|
|
|
121
|
-
const
|
|
122
|
-
( select ) =>
|
|
122
|
+
const gridItemStyles = useSelect(
|
|
123
|
+
( select ) => {
|
|
124
|
+
const { getBlockOrder, getBlockStyles } = unlock(
|
|
125
|
+
select( blockEditorStore )
|
|
126
|
+
);
|
|
127
|
+
const blockOrder = getBlockOrder( gridClientId );
|
|
128
|
+
return getBlockStyles( blockOrder );
|
|
129
|
+
},
|
|
123
130
|
[ gridClientId ]
|
|
124
131
|
);
|
|
125
132
|
const occupiedRects = useMemo( () => {
|
|
126
133
|
const rects = [];
|
|
127
|
-
for ( const
|
|
134
|
+
for ( const style of Object.values( gridItemStyles ) ) {
|
|
128
135
|
const {
|
|
129
136
|
columnStart,
|
|
130
137
|
rowStart,
|
|
131
138
|
columnSpan = 1,
|
|
132
139
|
rowSpan = 1,
|
|
133
|
-
} =
|
|
140
|
+
} = style?.layout ?? {};
|
|
134
141
|
if ( ! columnStart || ! rowStart ) {
|
|
135
142
|
continue;
|
|
136
143
|
}
|
|
@@ -144,7 +151,7 @@ function ManualGridVisualizer( { gridClientId, gridInfo } ) {
|
|
|
144
151
|
);
|
|
145
152
|
}
|
|
146
153
|
return rects;
|
|
147
|
-
}, [
|
|
154
|
+
}, [ gridItemStyles ] );
|
|
148
155
|
|
|
149
156
|
return range( 1, gridInfo.numRows ).map( ( row ) =>
|
|
150
157
|
range( 1, gridInfo.numColumns ).map( ( column ) => {
|
|
@@ -206,8 +213,12 @@ function useGridVisualizerDropZone(
|
|
|
206
213
|
gridInfo,
|
|
207
214
|
setHighlightedRect
|
|
208
215
|
) {
|
|
209
|
-
const {
|
|
210
|
-
|
|
216
|
+
const {
|
|
217
|
+
getBlockAttributes,
|
|
218
|
+
getBlockRootClientId,
|
|
219
|
+
canInsertBlockType,
|
|
220
|
+
getBlockName,
|
|
221
|
+
} = useSelect( blockEditorStore );
|
|
211
222
|
const {
|
|
212
223
|
updateBlockAttributes,
|
|
213
224
|
moveBlocksToPosition,
|
|
@@ -221,6 +232,10 @@ function useGridVisualizerDropZone(
|
|
|
221
232
|
|
|
222
233
|
return useDropZoneWithValidation( {
|
|
223
234
|
validateDrag( srcClientId ) {
|
|
235
|
+
const blockName = getBlockName( srcClientId );
|
|
236
|
+
if ( ! canInsertBlockType( blockName, gridClientId ) ) {
|
|
237
|
+
return false;
|
|
238
|
+
}
|
|
224
239
|
const attributes = getBlockAttributes( srcClientId );
|
|
225
240
|
const rect = new GridRect( {
|
|
226
241
|
columnStart: column,
|
|
@@ -242,8 +242,10 @@ function Iframe( {
|
|
|
242
242
|
const isZoomedOut = scale !== 1;
|
|
243
243
|
|
|
244
244
|
useEffect( () => {
|
|
245
|
-
|
|
246
|
-
|
|
245
|
+
if ( ! isZoomedOut ) {
|
|
246
|
+
prevContainerWidth.current = containerWidth;
|
|
247
|
+
}
|
|
248
|
+
}, [ containerWidth, isZoomedOut ] );
|
|
247
249
|
|
|
248
250
|
const disabledRef = useDisabled( { isDisabled: ! readonly } );
|
|
249
251
|
const bodyRef = useMergeRefs( [
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
ToolbarButton,
|
|
6
|
+
RangeControl,
|
|
7
|
+
Dropdown,
|
|
8
|
+
__experimentalDropdownContentWrapper as DropdownContentWrapper,
|
|
9
|
+
} from '@wordpress/components';
|
|
5
10
|
import { __ } from '@wordpress/i18n';
|
|
6
11
|
import { search } from '@wordpress/icons';
|
|
7
12
|
|
|
@@ -27,14 +32,17 @@ export default function ZoomDropdown() {
|
|
|
27
32
|
/>
|
|
28
33
|
) }
|
|
29
34
|
renderContent={ () => (
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
<DropdownContentWrapper paddingSize="medium">
|
|
36
|
+
<RangeControl
|
|
37
|
+
__next40pxDefaultSize
|
|
38
|
+
__nextHasNoMarginBottom
|
|
39
|
+
label={ __( 'Zoom' ) }
|
|
40
|
+
min={ MIN_ZOOM }
|
|
41
|
+
max={ MAX_ZOOM }
|
|
42
|
+
value={ Math.round( zoom ) }
|
|
43
|
+
onChange={ setZoom }
|
|
44
|
+
/>
|
|
45
|
+
</DropdownContentWrapper>
|
|
38
46
|
) }
|
|
39
47
|
/>
|
|
40
48
|
);
|
|
@@ -7,15 +7,15 @@ import clsx from 'clsx';
|
|
|
7
7
|
* Internal dependencies
|
|
8
8
|
*/
|
|
9
9
|
import BaseButtonBlockAppender from '../button-block-appender';
|
|
10
|
-
import
|
|
10
|
+
import { useBlockEditContext } from '../block-edit/context';
|
|
11
11
|
|
|
12
|
-
export
|
|
13
|
-
clientId,
|
|
12
|
+
export default function ButtonBlockAppender( {
|
|
14
13
|
showSeparator,
|
|
15
14
|
isFloating,
|
|
16
15
|
onAddBlock,
|
|
17
16
|
isToggle,
|
|
18
|
-
} )
|
|
17
|
+
} ) {
|
|
18
|
+
const { clientId } = useBlockEditContext();
|
|
19
19
|
return (
|
|
20
20
|
<BaseButtonBlockAppender
|
|
21
21
|
className={ clsx( {
|
|
@@ -27,6 +27,4 @@ export const ButtonBlockAppender = ( {
|
|
|
27
27
|
onAddBlock={ onAddBlock }
|
|
28
28
|
/>
|
|
29
29
|
);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export default withClientId( ButtonBlockAppender );
|
|
30
|
+
}
|
|
@@ -1,29 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { compose } from '@wordpress/compose';
|
|
5
|
-
import { withSelect } from '@wordpress/data';
|
|
6
|
-
|
|
7
1
|
/**
|
|
8
2
|
* Internal dependencies
|
|
9
3
|
*/
|
|
10
4
|
import BaseDefaultBlockAppender from '../default-block-appender';
|
|
11
|
-
import
|
|
12
|
-
import { store as blockEditorStore } from '../../store';
|
|
5
|
+
import { useBlockEditContext } from '../block-edit/context';
|
|
13
6
|
|
|
14
|
-
export
|
|
7
|
+
export default function DefaultBlockAppender() {
|
|
8
|
+
const { clientId } = useBlockEditContext();
|
|
15
9
|
return <BaseDefaultBlockAppender rootClientId={ clientId } />;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export default compose( [
|
|
19
|
-
withClientId,
|
|
20
|
-
withSelect( ( select, { clientId } ) => {
|
|
21
|
-
const { getBlockOrder } = select( blockEditorStore );
|
|
22
|
-
|
|
23
|
-
const blockClientIds = getBlockOrder( clientId );
|
|
24
|
-
|
|
25
|
-
return {
|
|
26
|
-
lastBlockClientId: blockClientIds[ blockClientIds.length - 1 ],
|
|
27
|
-
};
|
|
28
|
-
} ),
|
|
29
|
-
] )( DefaultBlockAppender );
|
|
10
|
+
}
|
|
@@ -206,13 +206,7 @@ export function useInnerBlocksProps( props = {}, options = {} ) {
|
|
|
206
206
|
getSettings,
|
|
207
207
|
} = unlock( select( blockEditorStore ) );
|
|
208
208
|
let _isDropZoneDisabled;
|
|
209
|
-
|
|
210
|
-
// The inner blocks belonging to the section drop zone is
|
|
211
|
-
// already disabled by the blocks themselves being disabled.
|
|
212
|
-
if ( __unstableGetEditorMode() === 'zoom-out' ) {
|
|
213
|
-
const { sectionRootClientId } = unlock( getSettings() );
|
|
214
|
-
_isDropZoneDisabled = clientId !== sectionRootClientId;
|
|
215
|
-
}
|
|
209
|
+
|
|
216
210
|
if ( ! clientId ) {
|
|
217
211
|
return { isDropZoneDisabled: _isDropZoneDisabled };
|
|
218
212
|
}
|
|
@@ -225,8 +219,15 @@ export function useInnerBlocksProps( props = {}, options = {} ) {
|
|
|
225
219
|
const parentClientId = getBlockRootClientId( clientId );
|
|
226
220
|
const [ defaultLayout ] = getBlockSettings( clientId, 'layout' );
|
|
227
221
|
|
|
228
|
-
|
|
229
|
-
|
|
222
|
+
_isDropZoneDisabled = blockEditingMode === 'disabled';
|
|
223
|
+
|
|
224
|
+
if ( __unstableGetEditorMode() === 'zoom-out' ) {
|
|
225
|
+
// In zoom out mode, we want to disable the drop zone for the sections.
|
|
226
|
+
// The inner blocks belonging to the section drop zone is
|
|
227
|
+
// already disabled by the blocks themselves being disabled.
|
|
228
|
+
const { sectionRootClientId } = unlock( getSettings() );
|
|
229
|
+
|
|
230
|
+
_isDropZoneDisabled = clientId !== sectionRootClientId;
|
|
230
231
|
}
|
|
231
232
|
|
|
232
233
|
return {
|
|
@@ -27,6 +27,7 @@ function InserterLibrary(
|
|
|
27
27
|
onSelect = noop,
|
|
28
28
|
shouldFocusBlock = false,
|
|
29
29
|
onClose,
|
|
30
|
+
__experimentalSearchInputRef,
|
|
30
31
|
},
|
|
31
32
|
ref
|
|
32
33
|
) {
|
|
@@ -58,6 +59,7 @@ function InserterLibrary(
|
|
|
58
59
|
shouldFocusBlock={ shouldFocusBlock }
|
|
59
60
|
ref={ ref }
|
|
60
61
|
onClose={ onClose }
|
|
62
|
+
__experimentalSearchInputRef={ __experimentalSearchInputRef }
|
|
61
63
|
/>
|
|
62
64
|
);
|
|
63
65
|
}
|
|
@@ -33,6 +33,7 @@ import useInsertionPoint from './hooks/use-insertion-point';
|
|
|
33
33
|
import { store as blockEditorStore } from '../../store';
|
|
34
34
|
import TabbedSidebar from '../tabbed-sidebar';
|
|
35
35
|
import { useZoomOut } from '../../hooks/use-zoom-out';
|
|
36
|
+
import { unlock } from '../../lock-unlock';
|
|
36
37
|
|
|
37
38
|
const NOOP = () => {};
|
|
38
39
|
function InserterMenu(
|
|
@@ -53,11 +54,16 @@ function InserterMenu(
|
|
|
53
54
|
},
|
|
54
55
|
ref
|
|
55
56
|
) {
|
|
56
|
-
const isZoomOutMode = useSelect(
|
|
57
|
-
|
|
58
|
-
select( blockEditorStore )
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
const { isZoomOutMode, inserterSearchInputRef } = useSelect( ( select ) => {
|
|
58
|
+
const { __unstableGetEditorMode, getInserterSearchInputRef } = unlock(
|
|
59
|
+
select( blockEditorStore )
|
|
60
|
+
);
|
|
61
|
+
return {
|
|
62
|
+
isZoomOutMode: __unstableGetEditorMode() === 'zoom-out',
|
|
63
|
+
inserterSearchInputRef: getInserterSearchInputRef(),
|
|
64
|
+
};
|
|
65
|
+
}, [] );
|
|
66
|
+
|
|
61
67
|
const [ filterValue, setFilterValue, delayedFilterValue ] =
|
|
62
68
|
useDebouncedInput( __experimentalFilterValue );
|
|
63
69
|
const [ hoveredItem, setHoveredItem ] = useState( null );
|
|
@@ -67,9 +73,16 @@ function InserterMenu(
|
|
|
67
73
|
const [ patternFilter, setPatternFilter ] = useState( 'all' );
|
|
68
74
|
const [ selectedMediaCategory, setSelectedMediaCategory ] =
|
|
69
75
|
useState( null );
|
|
70
|
-
|
|
71
|
-
__experimentalInitialTab
|
|
72
|
-
|
|
76
|
+
function getInitialTab() {
|
|
77
|
+
if ( __experimentalInitialTab ) {
|
|
78
|
+
return __experimentalInitialTab;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if ( isZoomOutMode ) {
|
|
82
|
+
return 'patterns';
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
const [ selectedTab, setSelectedTab ] = useState( getInitialTab() );
|
|
73
86
|
|
|
74
87
|
const [ destinationRootClientId, onInsertBlocks, onToggleInsertionPoint ] =
|
|
75
88
|
useInsertionPoint( {
|
|
@@ -104,15 +117,16 @@ function InserterMenu(
|
|
|
104
117
|
}
|
|
105
118
|
} );
|
|
106
119
|
},
|
|
107
|
-
[ onInsertBlocks, onSelect, shouldFocusBlock ]
|
|
120
|
+
[ onInsertBlocks, onSelect, ref, shouldFocusBlock ]
|
|
108
121
|
);
|
|
109
122
|
|
|
110
123
|
const onInsertPattern = useCallback(
|
|
111
124
|
( blocks, patternName ) => {
|
|
125
|
+
onToggleInsertionPoint( false );
|
|
112
126
|
onInsertBlocks( blocks, { patternName } );
|
|
113
127
|
onSelect();
|
|
114
128
|
},
|
|
115
|
-
[ onInsertBlocks, onSelect ]
|
|
129
|
+
[ onInsertBlocks, onSelect, onToggleInsertionPoint ]
|
|
116
130
|
);
|
|
117
131
|
|
|
118
132
|
const onHover = useCallback(
|
|
@@ -123,13 +137,6 @@ function InserterMenu(
|
|
|
123
137
|
[ onToggleInsertionPoint, setHoveredItem ]
|
|
124
138
|
);
|
|
125
139
|
|
|
126
|
-
const onHoverPattern = useCallback(
|
|
127
|
-
( item ) => {
|
|
128
|
-
onToggleInsertionPoint( !! item );
|
|
129
|
-
},
|
|
130
|
-
[ onToggleInsertionPoint ]
|
|
131
|
-
);
|
|
132
|
-
|
|
133
140
|
const onClickPatternCategory = useCallback(
|
|
134
141
|
( patternCategory, filter ) => {
|
|
135
142
|
setSelectedPatternCategory( patternCategory );
|
|
@@ -170,13 +177,14 @@ function InserterMenu(
|
|
|
170
177
|
value={ filterValue }
|
|
171
178
|
label={ __( 'Search for blocks and patterns' ) }
|
|
172
179
|
placeholder={ __( 'Search' ) }
|
|
180
|
+
ref={ inserterSearchInputRef }
|
|
173
181
|
/>
|
|
182
|
+
|
|
174
183
|
{ !! delayedFilterValue && (
|
|
175
184
|
<InserterSearchResults
|
|
176
185
|
filterValue={ delayedFilterValue }
|
|
177
186
|
onSelect={ onSelect }
|
|
178
187
|
onHover={ onHover }
|
|
179
|
-
onHoverPattern={ onHoverPattern }
|
|
180
188
|
rootClientId={ rootClientId }
|
|
181
189
|
clientId={ clientId }
|
|
182
190
|
isAppender={ isAppender }
|
|
@@ -192,19 +200,18 @@ function InserterMenu(
|
|
|
192
200
|
);
|
|
193
201
|
}, [
|
|
194
202
|
selectedTab,
|
|
195
|
-
hoveredItem,
|
|
196
|
-
setHoveredItem,
|
|
197
|
-
setFilterValue,
|
|
198
203
|
filterValue,
|
|
204
|
+
inserterSearchInputRef,
|
|
199
205
|
delayedFilterValue,
|
|
200
206
|
onSelect,
|
|
201
207
|
onHover,
|
|
202
|
-
onHoverPattern,
|
|
203
|
-
shouldFocusBlock,
|
|
204
|
-
clientId,
|
|
205
208
|
rootClientId,
|
|
206
|
-
|
|
209
|
+
clientId,
|
|
207
210
|
isAppender,
|
|
211
|
+
__experimentalInsertionIndex,
|
|
212
|
+
shouldFocusBlock,
|
|
213
|
+
hoveredItem,
|
|
214
|
+
setFilterValue,
|
|
208
215
|
] );
|
|
209
216
|
|
|
210
217
|
const blocksTab = useMemo( () => {
|
|
@@ -249,7 +256,6 @@ function InserterMenu(
|
|
|
249
256
|
<PatternCategoryPreviews
|
|
250
257
|
rootClientId={ destinationRootClientId }
|
|
251
258
|
onInsert={ onInsertPattern }
|
|
252
|
-
onHover={ onHoverPattern }
|
|
253
259
|
category={ selectedPatternCategory }
|
|
254
260
|
patternFilter={ patternFilter }
|
|
255
261
|
showTitlesAsTooltip
|
|
@@ -259,7 +265,6 @@ function InserterMenu(
|
|
|
259
265
|
);
|
|
260
266
|
}, [
|
|
261
267
|
destinationRootClientId,
|
|
262
|
-
onHoverPattern,
|
|
263
268
|
onInsertPattern,
|
|
264
269
|
onClickPatternCategory,
|
|
265
270
|
patternFilter,
|
|
@@ -9,7 +9,7 @@ import clsx from 'clsx';
|
|
|
9
9
|
import { useState, useEffect } from '@wordpress/element';
|
|
10
10
|
import { __ } from '@wordpress/i18n';
|
|
11
11
|
import { Button, SearchControl } from '@wordpress/components';
|
|
12
|
-
import { useSelect } from '@wordpress/data';
|
|
12
|
+
import { useDispatch, useSelect } from '@wordpress/data';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Internal dependencies
|
|
@@ -82,6 +82,8 @@ export default function QuickInserter( {
|
|
|
82
82
|
}
|
|
83
83
|
}, [ setInserterIsOpened ] );
|
|
84
84
|
|
|
85
|
+
const { showInsertionPoint } = useDispatch( blockEditorStore );
|
|
86
|
+
|
|
85
87
|
// When clicking Browse All select the appropriate block so as
|
|
86
88
|
// the insertion point can work as expected.
|
|
87
89
|
const onBrowseAll = () => {
|
|
@@ -91,6 +93,7 @@ export default function QuickInserter( {
|
|
|
91
93
|
filterValue,
|
|
92
94
|
onSelect,
|
|
93
95
|
} );
|
|
96
|
+
showInsertionPoint( rootClientId, insertionIndex );
|
|
94
97
|
};
|
|
95
98
|
|
|
96
99
|
let maxBlockPatterns = 0;
|
|
@@ -36,7 +36,7 @@ $block-inserter-tabs-height: 44px;
|
|
|
36
36
|
.components-popover__content {
|
|
37
37
|
border: none;
|
|
38
38
|
outline: none;
|
|
39
|
-
box-shadow: $
|
|
39
|
+
box-shadow: $elevation-x-small;
|
|
40
40
|
|
|
41
41
|
.block-editor-inserter__quick-inserter > * {
|
|
42
42
|
border-left: $border-width solid $gray-400;
|
|
@@ -36,6 +36,13 @@ The value of the line height.
|
|
|
36
36
|
|
|
37
37
|
A callback function that handles the application of the line height value.
|
|
38
38
|
|
|
39
|
+
#### `__next40pxDefaultSize`
|
|
40
|
+
|
|
41
|
+
- **Type:** `boolean`
|
|
42
|
+
- **Default:** `false`
|
|
43
|
+
|
|
44
|
+
Start opting into the larger default height that will become the default size in a future version.
|
|
45
|
+
|
|
39
46
|
## Related components
|
|
40
47
|
|
|
41
48
|
Block Editor components are components that can be used to compose the UI of your block editor. Thus, they can only be used under a [`BlockEditorProvider`](https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/provider/README.md) in the components tree.
|
|
@@ -16,6 +16,8 @@ import {
|
|
|
16
16
|
} from './utils';
|
|
17
17
|
|
|
18
18
|
const LineHeightControl = ( {
|
|
19
|
+
/** Start opting into the larger default height that will become the default size in a future version. */
|
|
20
|
+
__next40pxDefaultSize = false,
|
|
19
21
|
value: lineHeight,
|
|
20
22
|
onChange,
|
|
21
23
|
__unstableInputWidth = '60px',
|
|
@@ -91,6 +93,7 @@ const LineHeightControl = ( {
|
|
|
91
93
|
<div className="block-editor-line-height-control">
|
|
92
94
|
<NumberControl
|
|
93
95
|
{ ...otherProps }
|
|
96
|
+
__next40pxDefaultSize={ __next40pxDefaultSize }
|
|
94
97
|
__unstableInputWidth={ __unstableInputWidth }
|
|
95
98
|
__unstableStateReducer={ stateReducer }
|
|
96
99
|
onChange={ handleOnChange }
|
|
@@ -77,7 +77,7 @@ $block-editor-link-control-number-of-actions: 1;
|
|
|
77
77
|
&.block-editor-url-input input[type="text"].block-editor-url-input__input {
|
|
78
78
|
@include input-control;
|
|
79
79
|
display: block;
|
|
80
|
-
border:
|
|
80
|
+
border: $border-width solid $gray-600;
|
|
81
81
|
border-radius: $radius-block-ui;
|
|
82
82
|
height: $button-size-next-default-40px; // components do not properly support unstable-large yet.
|
|
83
83
|
margin: 0;
|
|
@@ -491,17 +491,22 @@ export function MediaPlaceholder( {
|
|
|
491
491
|
<>
|
|
492
492
|
{ renderDropZone() }
|
|
493
493
|
<FormFileUpload
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
494
|
+
render={ ( { openFileDialog } ) => (
|
|
495
|
+
<Button
|
|
496
|
+
onClick={ openFileDialog }
|
|
497
|
+
variant="primary"
|
|
498
|
+
className={ clsx(
|
|
499
|
+
'block-editor-media-placeholder__button',
|
|
500
|
+
'block-editor-media-placeholder__upload-button'
|
|
501
|
+
) }
|
|
502
|
+
>
|
|
503
|
+
{ __( 'Upload' ) }
|
|
504
|
+
</Button>
|
|
498
505
|
) }
|
|
499
506
|
onChange={ onUpload }
|
|
500
507
|
accept={ accept }
|
|
501
508
|
multiple={ !! multiple }
|
|
502
|
-
|
|
503
|
-
{ __( 'Upload' ) }
|
|
504
|
-
</FormFileUpload>
|
|
509
|
+
/>
|
|
505
510
|
{ uploadMediaLibraryButton }
|
|
506
511
|
{ renderUrlSelectionUI() }
|
|
507
512
|
{ renderFeaturedImageToggle() }
|
|
@@ -105,6 +105,8 @@ Callback called when the media modal is closed after media is selected.
|
|
|
105
105
|
|
|
106
106
|
This is called subsequent to `onClose` when media is selected. The selected media are passed as an argument.
|
|
107
107
|
|
|
108
|
+
The `image.sizes.full` resolution does always exist. Other defined sizes are only available when the image is larger and thus could be scaled down.
|
|
109
|
+
|
|
108
110
|
- Type: `Function`
|
|
109
111
|
- Required: Yes
|
|
110
112
|
- Platform: Web | Mobile
|
|
@@ -327,6 +327,8 @@ function URLInput( props ) {
|
|
|
327
327
|
>
|
|
328
328
|
<PanelBody style={ styles[ 'media-upload__link-input' ] }>
|
|
329
329
|
<TextControl
|
|
330
|
+
// TODO: Switch to `true` (40px size) if possible
|
|
331
|
+
__next40pxDefaultSize={ false }
|
|
330
332
|
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
331
333
|
autoFocus
|
|
332
334
|
autoCapitalize="none"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { sprintf, _n } from '@wordpress/i18n';
|
|
5
|
-
import {
|
|
5
|
+
import { useSelect } from '@wordpress/data';
|
|
6
6
|
import { serialize } from '@wordpress/blocks';
|
|
7
7
|
import { count as wordCount } from '@wordpress/wordcount';
|
|
8
8
|
import { copy } from '@wordpress/icons';
|
|
@@ -13,7 +13,13 @@ import { copy } from '@wordpress/icons';
|
|
|
13
13
|
import BlockIcon from '../block-icon';
|
|
14
14
|
import { store as blockEditorStore } from '../../store';
|
|
15
15
|
|
|
16
|
-
function MultiSelectionInspector(
|
|
16
|
+
export default function MultiSelectionInspector() {
|
|
17
|
+
const { blocks } = useSelect( ( select ) => {
|
|
18
|
+
const { getMultiSelectedBlocks } = select( blockEditorStore );
|
|
19
|
+
return {
|
|
20
|
+
blocks: getMultiSelectedBlocks(),
|
|
21
|
+
};
|
|
22
|
+
}, [] );
|
|
17
23
|
const words = wordCount( serialize( blocks ), 'words' );
|
|
18
24
|
|
|
19
25
|
return (
|
|
@@ -38,10 +44,3 @@ function MultiSelectionInspector( { blocks } ) {
|
|
|
38
44
|
</div>
|
|
39
45
|
);
|
|
40
46
|
}
|
|
41
|
-
|
|
42
|
-
export default withSelect( ( select ) => {
|
|
43
|
-
const { getMultiSelectedBlocks } = select( blockEditorStore );
|
|
44
|
-
return {
|
|
45
|
-
blocks: getMultiSelectedBlocks(),
|
|
46
|
-
};
|
|
47
|
-
} )( MultiSelectionInspector );
|
|
@@ -64,6 +64,7 @@ registerBlockType( 'my-plugin/my-block', {
|
|
|
64
64
|
const paddingControl = ( labelComponent, viewport ) => {
|
|
65
65
|
return (
|
|
66
66
|
<DimensionControl
|
|
67
|
+
__nextHasNoMarginBottom
|
|
67
68
|
label={ viewport.label }
|
|
68
69
|
onChange={ // handle update to padding value here }
|
|
69
70
|
value={ paddingSize }
|
|
@@ -188,10 +188,12 @@ export default function SpacingInputControl( {
|
|
|
188
188
|
name: size.name,
|
|
189
189
|
} ) );
|
|
190
190
|
|
|
191
|
-
const marks = spacingSizes
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
191
|
+
const marks = spacingSizes
|
|
192
|
+
.slice( 1, spacingSizes.length - 1 )
|
|
193
|
+
.map( ( _newValue, index ) => ( {
|
|
194
|
+
value: index + 1,
|
|
195
|
+
label: undefined,
|
|
196
|
+
} ) );
|
|
195
197
|
|
|
196
198
|
const sideLabel =
|
|
197
199
|
ALL_SIDES.includes( side ) && showSideInLabel ? LABELS[ side ] : '';
|
|
@@ -247,6 +249,7 @@ export default function SpacingInputControl( {
|
|
|
247
249
|
} }
|
|
248
250
|
/>
|
|
249
251
|
<RangeControl
|
|
252
|
+
__next40pxDefaultSize
|
|
250
253
|
onMouseOver={ onMouseOver }
|
|
251
254
|
onMouseOut={ onMouseOut }
|
|
252
255
|
onFocus={ onMouseOver }
|
|
@@ -268,6 +271,7 @@ export default function SpacingInputControl( {
|
|
|
268
271
|
) }
|
|
269
272
|
{ showRangeControl && ! showCustomValueControl && (
|
|
270
273
|
<RangeControl
|
|
274
|
+
__next40pxDefaultSize
|
|
271
275
|
onMouseOver={ onMouseOver }
|
|
272
276
|
onMouseOut={ onMouseOut }
|
|
273
277
|
className="spacing-sizes-control__range-control"
|
|
@@ -4,34 +4,34 @@
|
|
|
4
4
|
margin-bottom: 0;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
+
.is-marked {
|
|
8
|
+
.components-range-control__track {
|
|
9
|
+
transition: width ease 0.1s;
|
|
10
|
+
@include reduce-motion("transition");
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.components-range-control__thumb-wrapper {
|
|
14
|
+
transition: left ease 0.1s;
|
|
15
|
+
@include reduce-motion("transition");
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
7
19
|
.spacing-sizes-control__range-control,
|
|
8
20
|
.spacing-sizes-control__custom-value-range {
|
|
9
|
-
height: 40px;
|
|
10
|
-
/* Vertically center the RangeControl until it has true 40px height. */
|
|
11
|
-
display: flex;
|
|
12
|
-
align-items: center;
|
|
13
|
-
margin-bottom: 0;
|
|
14
21
|
flex: 1;
|
|
15
|
-
|
|
16
|
-
> .components-base-control__field {
|
|
17
|
-
/* Fixes RangeControl contents when the outer wrapper is flex */
|
|
18
|
-
flex: 1;
|
|
19
|
-
}
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
.components-range-control__mark {
|
|
25
|
+
transform: translateX(-50%);
|
|
23
26
|
height: $grid-unit-05;
|
|
24
|
-
width:
|
|
25
|
-
background-color:
|
|
27
|
+
width: math.div($grid-unit-05, 2);
|
|
28
|
+
background-color: $white;
|
|
26
29
|
z-index: 1;
|
|
30
|
+
top: -#{$grid-unit-05};
|
|
27
31
|
}
|
|
28
32
|
|
|
29
33
|
.components-range-control__marks {
|
|
30
34
|
margin-top: 17px;
|
|
31
|
-
|
|
32
|
-
:first-child {
|
|
33
|
-
display: none;
|
|
34
|
-
}
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.components-range-control__thumb-wrapper {
|