@elementor/editor-editing-panel 1.37.0 → 1.38.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 +6 -0
- package/dist/index.js +231 -209
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +183 -161
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/style-sections/typography-section/column-count-field.tsx +22 -0
- package/src/components/style-sections/typography-section/column-gap-field.tsx +22 -0
- package/src/components/style-sections/typography-section/typography-section.tsx +14 -0
package/package.json
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { NumberControl } from '@elementor/editor-controls';
|
|
3
|
+
import { Grid } from '@elementor/ui';
|
|
4
|
+
import { __ } from '@wordpress/i18n';
|
|
5
|
+
|
|
6
|
+
import { StylesField } from '../../../controls-registry/styles-field';
|
|
7
|
+
import { ControlLabel } from '../../control-label';
|
|
8
|
+
|
|
9
|
+
export const ColumnCountField = () => {
|
|
10
|
+
return (
|
|
11
|
+
<StylesField bind="column-count">
|
|
12
|
+
<Grid container gap={ 2 } alignItems="center" flexWrap="nowrap">
|
|
13
|
+
<Grid item xs={ 6 }>
|
|
14
|
+
<ControlLabel>{ __( 'Columns', 'elementor' ) }</ControlLabel>
|
|
15
|
+
</Grid>
|
|
16
|
+
<Grid item xs={ 6 }>
|
|
17
|
+
<NumberControl shouldForceInt min={ 0 } step={ 1 } />
|
|
18
|
+
</Grid>
|
|
19
|
+
</Grid>
|
|
20
|
+
</StylesField>
|
|
21
|
+
);
|
|
22
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { SizeControl } from '@elementor/editor-controls';
|
|
3
|
+
import { Grid } from '@elementor/ui';
|
|
4
|
+
import { __ } from '@wordpress/i18n';
|
|
5
|
+
|
|
6
|
+
import { StylesField } from '../../../controls-registry/styles-field';
|
|
7
|
+
import { ControlLabel } from '../../control-label';
|
|
8
|
+
|
|
9
|
+
export const ColumnGapField = () => {
|
|
10
|
+
return (
|
|
11
|
+
<StylesField bind="column-gap">
|
|
12
|
+
<Grid container gap={ 2 } alignItems="center" flexWrap="nowrap">
|
|
13
|
+
<Grid item xs={ 6 }>
|
|
14
|
+
<ControlLabel>{ __( 'Column gap', 'elementor' ) }</ControlLabel>
|
|
15
|
+
</Grid>
|
|
16
|
+
<Grid item xs={ 6 }>
|
|
17
|
+
<SizeControl />
|
|
18
|
+
</Grid>
|
|
19
|
+
</Grid>
|
|
20
|
+
</StylesField>
|
|
21
|
+
);
|
|
22
|
+
};
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import type { NumberPropValue } from '@elementor/editor-props';
|
|
3
|
+
import { isExperimentActive } from '@elementor/editor-v1-adapters';
|
|
2
4
|
|
|
5
|
+
import { useStylesField } from '../../../hooks/use-styles-field';
|
|
3
6
|
import { CollapsibleContent } from '../../collapsible-content';
|
|
4
7
|
import { PanelDivider } from '../../panel-divider';
|
|
5
8
|
import { SectionContent } from '../../section-content';
|
|
9
|
+
import { ColumnCountField } from './column-count-field';
|
|
10
|
+
import { ColumnGapField } from './column-gap-field';
|
|
6
11
|
import { FontFamilyField } from './font-family-field';
|
|
7
12
|
import { FontSizeField } from './font-size-field';
|
|
8
13
|
import { FontStyleField } from './font-style-field';
|
|
@@ -18,6 +23,9 @@ import { TransformField } from './transform-field';
|
|
|
18
23
|
import { WordSpacingField } from './word-spacing-field';
|
|
19
24
|
|
|
20
25
|
export const TypographySection = () => {
|
|
26
|
+
const [ columnCount ] = useStylesField< NumberPropValue >( 'column-count' );
|
|
27
|
+
const isVersion330Active = isExperimentActive( 'e_v_3_30' );
|
|
28
|
+
const hasMultiColumns = columnCount?.value && columnCount?.value > 1;
|
|
21
29
|
return (
|
|
22
30
|
<SectionContent>
|
|
23
31
|
<FontFamilyField />
|
|
@@ -31,6 +39,12 @@ export const TypographySection = () => {
|
|
|
31
39
|
<LineHeightField />
|
|
32
40
|
<LetterSpacingField />
|
|
33
41
|
<WordSpacingField />
|
|
42
|
+
{ isVersion330Active && (
|
|
43
|
+
<>
|
|
44
|
+
<ColumnCountField />
|
|
45
|
+
{ hasMultiColumns && <ColumnGapField /> }
|
|
46
|
+
</>
|
|
47
|
+
) }
|
|
34
48
|
<PanelDivider />
|
|
35
49
|
<TextDecorationField />
|
|
36
50
|
<TransformField />
|