@elementor/editor-editing-panel 1.11.1 → 1.13.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 +45 -0
- package/dist/index.js +431 -426
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +383 -378
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -8
- package/src/components/add-or-remove-content.tsx +5 -3
- package/src/components/collapsible-content.tsx +2 -1
- package/src/components/css-classes/css-class-item.tsx +2 -0
- package/src/components/css-classes/css-class-selector.tsx +2 -7
- package/src/components/panel-divider.tsx +4 -0
- package/src/components/popover-content.tsx +15 -0
- package/src/components/section-content.tsx +16 -0
- package/src/components/style-sections/border-section/border-color-field.tsx +1 -1
- package/src/components/style-sections/border-section/border-radius-field.tsx +5 -6
- package/src/components/style-sections/border-section/border-section.tsx +5 -4
- package/src/components/style-sections/border-section/border-style-field.tsx +2 -2
- package/src/components/style-sections/border-section/border-width-field.tsx +1 -1
- package/src/components/style-sections/effects-section/effects-section.tsx +3 -3
- package/src/components/style-sections/layout-section/flex-order-field.tsx +4 -3
- package/src/components/style-sections/layout-section/flex-size-field.tsx +4 -3
- package/src/components/style-sections/layout-section/layout-section.tsx +6 -5
- package/src/components/style-sections/position-section/position-field.tsx +1 -1
- package/src/components/style-sections/position-section/position-section.tsx +3 -3
- package/src/components/style-sections/size-section/overflow-field.tsx +2 -2
- package/src/components/style-sections/size-section/size-section.tsx +10 -8
- package/src/components/style-sections/spacing-section/spacing-section.tsx +5 -4
- package/src/components/style-sections/typography-section/font-family-field.tsx +2 -2
- package/src/components/style-sections/typography-section/font-size-field.tsx +1 -1
- package/src/components/style-sections/typography-section/font-style-field.tsx +36 -0
- package/src/components/style-sections/typography-section/font-weight-field.tsx +2 -2
- package/src/components/style-sections/typography-section/letter-spacing-field.tsx +1 -1
- package/src/components/style-sections/typography-section/line-height-field.tsx +1 -1
- package/src/components/style-sections/typography-section/text-color-field.tsx +1 -1
- package/src/components/style-sections/typography-section/{text-style-field.tsx → text-decoration-field.tsx} +3 -24
- package/src/components/style-sections/typography-section/text-stroke-field.tsx +1 -1
- package/src/components/style-sections/typography-section/transform-field.tsx +1 -1
- package/src/components/style-sections/typography-section/typography-section.tsx +12 -9
- package/src/components/style-sections/typography-section/word-spacing-field.tsx +1 -1
- package/src/controls-registry/settings-field.tsx +1 -7
- package/src/dynamics/components/dynamic-selection-control.tsx +4 -3
- package/src/dynamics/components/dynamic-selection.tsx +5 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-editing-panel",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Elementor Team",
|
|
6
6
|
"homepage": "https://elementor.com/",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@elementor/editor": "0.18.0",
|
|
43
|
-
"@elementor/editor-controls": "0.
|
|
44
|
-
"@elementor/editor-elements": "0.5.
|
|
45
|
-
"@elementor/editor-panels": "0.11.
|
|
46
|
-
"@elementor/editor-props": "0.9.
|
|
43
|
+
"@elementor/editor-controls": "0.12.0",
|
|
44
|
+
"@elementor/editor-elements": "0.5.4",
|
|
45
|
+
"@elementor/editor-panels": "0.11.1",
|
|
46
|
+
"@elementor/editor-props": "0.9.2",
|
|
47
47
|
"@elementor/editor-responsive": "0.13.0",
|
|
48
|
-
"@elementor/editor-styles": "0.5.
|
|
49
|
-
"@elementor/editor-styles-repository": "0.7.
|
|
50
|
-
"@elementor/editor-ui": "0.
|
|
48
|
+
"@elementor/editor-styles": "0.5.7",
|
|
49
|
+
"@elementor/editor-styles-repository": "0.7.2",
|
|
50
|
+
"@elementor/editor-ui": "0.4.0",
|
|
51
51
|
"@elementor/editor-v1-adapters": "0.10.0",
|
|
52
52
|
"@elementor/icons": "1.31.0",
|
|
53
53
|
"@elementor/locations": "0.7.6",
|
|
@@ -4,6 +4,8 @@ import { ControlLabel } from '@elementor/editor-controls';
|
|
|
4
4
|
import { MinusIcon, PlusIcon } from '@elementor/icons';
|
|
5
5
|
import { Collapse, IconButton, Stack } from '@elementor/ui';
|
|
6
6
|
|
|
7
|
+
import { SectionContent } from './section-content';
|
|
8
|
+
|
|
7
9
|
const SIZE = 'tiny';
|
|
8
10
|
|
|
9
11
|
type Props = {
|
|
@@ -15,7 +17,7 @@ type Props = {
|
|
|
15
17
|
|
|
16
18
|
export const AddOrRemoveContent = ( { isAdded, label, onAdd, onRemove, children }: PropsWithChildren< Props > ) => {
|
|
17
19
|
return (
|
|
18
|
-
<
|
|
20
|
+
<SectionContent>
|
|
19
21
|
<Stack
|
|
20
22
|
direction="row"
|
|
21
23
|
sx={ {
|
|
@@ -35,8 +37,8 @@ export const AddOrRemoveContent = ( { isAdded, label, onAdd, onRemove, children
|
|
|
35
37
|
) }
|
|
36
38
|
</Stack>
|
|
37
39
|
<Collapse in={ isAdded } unmountOnExit>
|
|
38
|
-
<
|
|
40
|
+
<SectionContent>{ children }</SectionContent>
|
|
39
41
|
</Collapse>
|
|
40
|
-
</
|
|
42
|
+
</SectionContent>
|
|
41
43
|
);
|
|
42
44
|
};
|
|
@@ -17,7 +17,7 @@ export const CollapsibleContent = ( { children, defaultOpen = false }: Collapsib
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
return (
|
|
20
|
-
<Stack
|
|
20
|
+
<Stack>
|
|
21
21
|
<Button
|
|
22
22
|
fullWidth
|
|
23
23
|
size="small"
|
|
@@ -25,6 +25,7 @@ export const CollapsibleContent = ( { children, defaultOpen = false }: Collapsib
|
|
|
25
25
|
variant="outlined"
|
|
26
26
|
onClick={ handleToggle }
|
|
27
27
|
endIcon={ <CollapseIcon open={ open } /> }
|
|
28
|
+
sx={ { my: 0.5 } }
|
|
28
29
|
>
|
|
29
30
|
{ open ? __( 'Show less', 'elementor' ) : __( 'Show more', 'elementor' ) }
|
|
30
31
|
</Button>
|
|
@@ -169,13 +169,8 @@ function useCreateActions( {
|
|
|
169
169
|
pushAppliedId( createdId );
|
|
170
170
|
setActiveId( createdId );
|
|
171
171
|
},
|
|
172
|
-
condition: (
|
|
173
|
-
|
|
174
|
-
( option ) => option.label.toLowerCase() === inputValue.toLowerCase()
|
|
175
|
-
);
|
|
176
|
-
|
|
177
|
-
return !! inputValue && isUniqueLabel;
|
|
178
|
-
},
|
|
172
|
+
condition: ( _, inputValue ) =>
|
|
173
|
+
stylesRepository.isLabelValid( inputValue ) && ! stylesRepository.isLabelExist( inputValue ),
|
|
179
174
|
// translators: %s is the singular label of css class provider (e.g "Global CSS Class").
|
|
180
175
|
group: __( 'Create New %s', 'elementor' ).replace( '%s', provider.labels?.singular ?? '' ),
|
|
181
176
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type FC, type PropsWithChildren } from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Stack } from '@elementor/ui';
|
|
4
|
+
|
|
5
|
+
type PopoverContentProps = PropsWithChildren< {
|
|
6
|
+
alignItems?: 'center';
|
|
7
|
+
gap?: number;
|
|
8
|
+
p?: 1.5 | 2 | 2.5;
|
|
9
|
+
} >;
|
|
10
|
+
|
|
11
|
+
export const PopoverContent: FC< PopoverContentProps > = ( { alignItems, gap = 1.5, p, children } ) => (
|
|
12
|
+
<Stack alignItems={ alignItems } gap={ gap } p={ p }>
|
|
13
|
+
{ children }
|
|
14
|
+
</Stack>
|
|
15
|
+
);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type FC, type PropsWithChildren } from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Stack } from '@elementor/ui';
|
|
4
|
+
|
|
5
|
+
type SectionContentProps = PropsWithChildren< {
|
|
6
|
+
gap?: number;
|
|
7
|
+
sx?: {
|
|
8
|
+
pt?: number;
|
|
9
|
+
};
|
|
10
|
+
} >;
|
|
11
|
+
|
|
12
|
+
export const SectionContent: FC< SectionContentProps > = ( { gap = 2, sx, children } ) => (
|
|
13
|
+
<Stack gap={ gap } sx={ { ...sx } }>
|
|
14
|
+
{ children }
|
|
15
|
+
</Stack>
|
|
16
|
+
);
|
|
@@ -10,7 +10,7 @@ export const BorderColorField = () => {
|
|
|
10
10
|
<StylesField bind={ 'border-color' }>
|
|
11
11
|
<Grid container gap={ 2 } alignItems="center" flexWrap="nowrap">
|
|
12
12
|
<Grid item xs={ 6 }>
|
|
13
|
-
<ControlLabel>{ __( 'Border
|
|
13
|
+
<ControlLabel>{ __( 'Border color', 'elementor' ) }</ControlLabel>
|
|
14
14
|
</Grid>
|
|
15
15
|
<Grid item xs={ 6 }>
|
|
16
16
|
<ColorControl />
|
|
@@ -21,14 +21,13 @@ const EndStartIcon = withDirection( RadiusBottomLeftIcon );
|
|
|
21
21
|
const EndEndIcon = withDirection( RadiusBottomRightIcon );
|
|
22
22
|
|
|
23
23
|
const getStartStartLabel = ( isSiteRtl: boolean ) =>
|
|
24
|
-
isSiteRtl ? __( 'Top
|
|
24
|
+
isSiteRtl ? __( 'Top right', 'elementor' ) : __( 'Top left', 'elementor' );
|
|
25
25
|
const getStartEndLabel = ( isSiteRtl: boolean ) =>
|
|
26
|
-
isSiteRtl ? __( 'Top
|
|
26
|
+
isSiteRtl ? __( 'Top left', 'elementor' ) : __( 'Top right', 'elementor' );
|
|
27
27
|
const getEndStartLabel = ( isSiteRtl: boolean ) =>
|
|
28
|
-
isSiteRtl ? __( 'Bottom
|
|
28
|
+
isSiteRtl ? __( 'Bottom right', 'elementor' ) : __( 'Bottom left', 'elementor' );
|
|
29
29
|
const getEndEndLabel = ( isSiteRtl: boolean ) =>
|
|
30
|
-
isSiteRtl ? __( 'Bottom
|
|
31
|
-
|
|
30
|
+
isSiteRtl ? __( 'Bottom left', 'elementor' ) : __( 'Bottom right', 'elementor' );
|
|
32
31
|
const getCorners = ( isSiteRtl: boolean ): EqualUnequalItems => [
|
|
33
32
|
{
|
|
34
33
|
label: getStartStartLabel( isSiteRtl ),
|
|
@@ -59,7 +58,7 @@ export const BorderRadiusField = () => {
|
|
|
59
58
|
<StylesField bind={ 'border-radius' }>
|
|
60
59
|
<EqualUnequalSizesControl
|
|
61
60
|
items={ getCorners( isSiteRtl ) }
|
|
62
|
-
label={ __( 'Border
|
|
61
|
+
label={ __( 'Border radius', 'elementor' ) }
|
|
63
62
|
icon={ <BorderCornersIcon fontSize={ 'tiny' } /> }
|
|
64
63
|
multiSizePropTypeUtil={ borderRadiusPropTypeUtil }
|
|
65
64
|
/>
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Divider, Stack } from '@elementor/ui';
|
|
3
2
|
|
|
3
|
+
import { PanelDivider } from '../../panel-divider';
|
|
4
|
+
import { SectionContent } from '../../section-content';
|
|
4
5
|
import { BorderField } from './border-field';
|
|
5
6
|
import { BorderRadiusField } from './border-radius-field';
|
|
6
7
|
|
|
7
8
|
export const BorderSection = () => (
|
|
8
|
-
<
|
|
9
|
+
<SectionContent>
|
|
9
10
|
<BorderRadiusField />
|
|
10
|
-
<
|
|
11
|
+
<PanelDivider />
|
|
11
12
|
<BorderField />
|
|
12
|
-
</
|
|
13
|
+
</SectionContent>
|
|
13
14
|
);
|
|
@@ -21,9 +21,9 @@ export const BorderStyleField = () => {
|
|
|
21
21
|
<StylesField bind={ 'border-style' }>
|
|
22
22
|
<Grid container gap={ 2 } alignItems="center" flexWrap="nowrap">
|
|
23
23
|
<Grid item xs={ 6 }>
|
|
24
|
-
<ControlLabel>{ __( 'Border
|
|
24
|
+
<ControlLabel>{ __( 'Border type', 'elementor' ) }</ControlLabel>
|
|
25
25
|
</Grid>
|
|
26
|
-
<Grid item xs={ 6 }>
|
|
26
|
+
<Grid item xs={ 6 } sx={ { overflow: 'hidden' } }>
|
|
27
27
|
<SelectControl options={ borderStyles } />
|
|
28
28
|
</Grid>
|
|
29
29
|
</Grid>
|
|
@@ -34,7 +34,7 @@ export const BorderWidthField = () => {
|
|
|
34
34
|
<StylesField bind={ 'border-width' }>
|
|
35
35
|
<EqualUnequalSizesControl
|
|
36
36
|
items={ edges }
|
|
37
|
-
label={ __( 'Border
|
|
37
|
+
label={ __( 'Border width', 'elementor' ) }
|
|
38
38
|
icon={ <SideAllIcon fontSize={ 'tiny' } /> }
|
|
39
39
|
multiSizePropTypeUtil={ borderWidthPropTypeUtil }
|
|
40
40
|
/>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { BoxShadowRepeaterControl } from '@elementor/editor-controls';
|
|
3
|
-
import { Stack } from '@elementor/ui';
|
|
4
3
|
|
|
5
4
|
import { StylesField } from '../../../controls-registry/styles-field';
|
|
5
|
+
import { SectionContent } from '../../section-content';
|
|
6
6
|
|
|
7
7
|
export const EffectsSection = () => {
|
|
8
8
|
return (
|
|
9
|
-
<
|
|
9
|
+
<SectionContent>
|
|
10
10
|
<StylesField bind="box-shadow">
|
|
11
11
|
<BoxShadowRepeaterControl />
|
|
12
12
|
</StylesField>
|
|
13
|
-
</
|
|
13
|
+
</SectionContent>
|
|
14
14
|
);
|
|
15
15
|
};
|
|
@@ -8,12 +8,13 @@ import {
|
|
|
8
8
|
} from '@elementor/editor-controls';
|
|
9
9
|
import { type NumberPropValue } from '@elementor/editor-props';
|
|
10
10
|
import { ArrowDownSmallIcon, ArrowUpSmallIcon, PencilIcon } from '@elementor/icons';
|
|
11
|
-
import { DirectionProvider, Grid,
|
|
11
|
+
import { DirectionProvider, Grid, ThemeProvider } from '@elementor/ui';
|
|
12
12
|
import { __ } from '@wordpress/i18n';
|
|
13
13
|
|
|
14
14
|
import { StylesField } from '../../../controls-registry/styles-field';
|
|
15
15
|
import { useDirection } from '../../../hooks/use-direction';
|
|
16
16
|
import { useStylesField } from '../../../hooks/use-styles-field';
|
|
17
|
+
import { SectionContent } from '../../section-content';
|
|
17
18
|
|
|
18
19
|
type GroupControlItemOption = 'first' | 'last' | 'custom';
|
|
19
20
|
|
|
@@ -70,7 +71,7 @@ export const FlexOrderField = () => {
|
|
|
70
71
|
return (
|
|
71
72
|
<DirectionProvider rtl={ isSiteRtl }>
|
|
72
73
|
<ThemeProvider>
|
|
73
|
-
<
|
|
74
|
+
<SectionContent>
|
|
74
75
|
<Grid container gap={ 2 } alignItems="center" flexWrap="nowrap">
|
|
75
76
|
<Grid item xs={ 6 }>
|
|
76
77
|
<ControlLabel>{ __( 'Order', 'elementor' ) }</ControlLabel>
|
|
@@ -101,7 +102,7 @@ export const FlexOrderField = () => {
|
|
|
101
102
|
</Grid>
|
|
102
103
|
</StylesField>
|
|
103
104
|
) }
|
|
104
|
-
</
|
|
105
|
+
</SectionContent>
|
|
105
106
|
</ThemeProvider>
|
|
106
107
|
</DirectionProvider>
|
|
107
108
|
);
|
|
@@ -9,12 +9,13 @@ import {
|
|
|
9
9
|
} from '@elementor/editor-controls';
|
|
10
10
|
import type { NumberPropValue, SizePropValue } from '@elementor/editor-props';
|
|
11
11
|
import { ExpandIcon, PencilIcon, ShrinkIcon } from '@elementor/icons';
|
|
12
|
-
import { DirectionProvider, Grid,
|
|
12
|
+
import { DirectionProvider, Grid, ThemeProvider } from '@elementor/ui';
|
|
13
13
|
import { __ } from '@wordpress/i18n';
|
|
14
14
|
|
|
15
15
|
import { StylesField } from '../../../controls-registry/styles-field';
|
|
16
16
|
import { useDirection } from '../../../hooks/use-direction';
|
|
17
17
|
import { useStylesField } from '../../../hooks/use-styles-field';
|
|
18
|
+
import { SectionContent } from '../../section-content';
|
|
18
19
|
|
|
19
20
|
type GroupItem = 'flex-grow' | 'flex-shrink' | 'custom';
|
|
20
21
|
|
|
@@ -79,7 +80,7 @@ export const FlexSizeField = () => {
|
|
|
79
80
|
return (
|
|
80
81
|
<DirectionProvider rtl={ isSiteRtl }>
|
|
81
82
|
<ThemeProvider>
|
|
82
|
-
<
|
|
83
|
+
<SectionContent>
|
|
83
84
|
<Grid container gap={ 2 } alignItems="center" flexWrap="nowrap">
|
|
84
85
|
<Grid item xs={ 6 }>
|
|
85
86
|
<ControlLabel>{ __( 'Size', 'elementor' ) }</ControlLabel>
|
|
@@ -95,7 +96,7 @@ export const FlexSizeField = () => {
|
|
|
95
96
|
</Grid>
|
|
96
97
|
|
|
97
98
|
{ 'custom' === activeGroup && <FlexCustomField /> }
|
|
98
|
-
</
|
|
99
|
+
</SectionContent>
|
|
99
100
|
</ThemeProvider>
|
|
100
101
|
</DirectionProvider>
|
|
101
102
|
);
|
|
@@ -2,12 +2,13 @@ import * as React from 'react';
|
|
|
2
2
|
import { ControlLabel } from '@elementor/editor-controls';
|
|
3
3
|
import { useParentElement } from '@elementor/editor-elements';
|
|
4
4
|
import { type StringPropValue } from '@elementor/editor-props';
|
|
5
|
-
import { Divider, Stack } from '@elementor/ui';
|
|
6
5
|
import { __ } from '@wordpress/i18n';
|
|
7
6
|
|
|
8
7
|
import { useElement } from '../../../contexts/element-context';
|
|
9
8
|
import { useComputedStyle } from '../../../hooks/use-computed-style';
|
|
10
9
|
import { useStylesField } from '../../../hooks/use-styles-field';
|
|
10
|
+
import { PanelDivider } from '../../panel-divider';
|
|
11
|
+
import { SectionContent } from '../../section-content';
|
|
11
12
|
import { AlignItemsField } from './align-items-field';
|
|
12
13
|
import { AlignSelfChild } from './align-self-child-field';
|
|
13
14
|
import { DisplayField } from './display-field';
|
|
@@ -25,11 +26,11 @@ export const LayoutSection = () => {
|
|
|
25
26
|
const parentStyle = useComputedStyle( parent?.id || null );
|
|
26
27
|
|
|
27
28
|
return (
|
|
28
|
-
<
|
|
29
|
+
<SectionContent>
|
|
29
30
|
<DisplayField />
|
|
30
31
|
{ 'flex' === display?.value && <FlexFields /> }
|
|
31
32
|
{ 'flex' === parentStyle?.display && <FlexChildFields /> }
|
|
32
|
-
</
|
|
33
|
+
</SectionContent>
|
|
33
34
|
);
|
|
34
35
|
};
|
|
35
36
|
|
|
@@ -38,7 +39,7 @@ const FlexFields = () => (
|
|
|
38
39
|
<FlexDirectionField />
|
|
39
40
|
<JustifyContentField />
|
|
40
41
|
<AlignItemsField />
|
|
41
|
-
<
|
|
42
|
+
<PanelDivider />
|
|
42
43
|
<GapControlField />
|
|
43
44
|
<WrapField />
|
|
44
45
|
</>
|
|
@@ -46,7 +47,7 @@ const FlexFields = () => (
|
|
|
46
47
|
|
|
47
48
|
const FlexChildFields = () => (
|
|
48
49
|
<>
|
|
49
|
-
<
|
|
50
|
+
<PanelDivider />
|
|
50
51
|
<ControlLabel>{ __( 'Flex child', 'elementor' ) }</ControlLabel>
|
|
51
52
|
<AlignSelfChild />
|
|
52
53
|
<FlexOrderField />
|
|
@@ -24,7 +24,7 @@ export const PositionField = ( { onChange }: Props ) => {
|
|
|
24
24
|
<Grid item xs={ 6 }>
|
|
25
25
|
<ControlLabel>{ __( 'Position', 'elementor' ) }</ControlLabel>
|
|
26
26
|
</Grid>
|
|
27
|
-
<Grid item xs={ 6 }>
|
|
27
|
+
<Grid item xs={ 6 } sx={ { overflow: 'hidden' } }>
|
|
28
28
|
<SelectControl options={ positionOptions } onChange={ onChange } />
|
|
29
29
|
</Grid>
|
|
30
30
|
</Grid>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type StringPropValue } from '@elementor/editor-props';
|
|
3
3
|
import { useSessionStorage } from '@elementor/session';
|
|
4
|
-
import { Stack } from '@elementor/ui';
|
|
5
4
|
|
|
6
5
|
import { useStyle } from '../../../contexts/style-context';
|
|
7
6
|
import { useStylesField } from '../../../hooks/use-styles-field';
|
|
8
7
|
import { useStylesFields } from '../../../hooks/use-styles-fields';
|
|
8
|
+
import { SectionContent } from '../../section-content';
|
|
9
9
|
import { DimensionsField } from './dimensions-field';
|
|
10
10
|
import { PositionField } from './position-field';
|
|
11
11
|
import { ZIndexField } from './z-index-field';
|
|
@@ -58,7 +58,7 @@ export const PositionSection = () => {
|
|
|
58
58
|
const isNotStatic = positionValue && positionValue?.value !== 'static';
|
|
59
59
|
|
|
60
60
|
return (
|
|
61
|
-
<
|
|
61
|
+
<SectionContent>
|
|
62
62
|
<PositionField onChange={ onPositionChange } />
|
|
63
63
|
{ isNotStatic ? (
|
|
64
64
|
<>
|
|
@@ -66,7 +66,7 @@ export const PositionSection = () => {
|
|
|
66
66
|
<ZIndexField />
|
|
67
67
|
</>
|
|
68
68
|
) : null }
|
|
69
|
-
</
|
|
69
|
+
</SectionContent>
|
|
70
70
|
);
|
|
71
71
|
};
|
|
72
72
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ControlLabel, type ToggleButtonGroupItem, ToggleControl } from '@elementor/editor-controls';
|
|
3
|
-
import {
|
|
3
|
+
import { EyeIcon, EyeOffIcon, LetterAIcon } from '@elementor/icons';
|
|
4
4
|
import { Grid } from '@elementor/ui';
|
|
5
5
|
import { __ } from '@wordpress/i18n';
|
|
6
6
|
|
|
@@ -24,7 +24,7 @@ const options: ToggleButtonGroupItem< Overflows >[] = [
|
|
|
24
24
|
{
|
|
25
25
|
value: 'auto',
|
|
26
26
|
label: __( 'Auto', 'elementor' ),
|
|
27
|
-
renderContent: ( { size } ) => <
|
|
27
|
+
renderContent: ( { size } ) => <LetterAIcon fontSize={ size } />,
|
|
28
28
|
showTooltip: true,
|
|
29
29
|
},
|
|
30
30
|
];
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ControlLabel, SizeControl } from '@elementor/editor-controls';
|
|
3
|
-
import {
|
|
3
|
+
import { Grid, Stack } from '@elementor/ui';
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
5
5
|
|
|
6
6
|
import { StylesField, type StylesFieldProps } from '../../../controls-registry/styles-field';
|
|
7
|
+
import { PanelDivider } from '../../panel-divider';
|
|
8
|
+
import { SectionContent } from '../../section-content';
|
|
7
9
|
import { OverflowField } from './overflow-field';
|
|
8
10
|
|
|
9
11
|
export const SizeSection = () => {
|
|
10
12
|
return (
|
|
11
|
-
<
|
|
13
|
+
<SectionContent>
|
|
12
14
|
<Grid container gap={ 2 } flexWrap="nowrap">
|
|
13
15
|
<Grid item xs={ 6 }>
|
|
14
16
|
<SizeField bind="width" label={ __( 'Width', 'elementor' ) } />
|
|
@@ -19,25 +21,25 @@ export const SizeSection = () => {
|
|
|
19
21
|
</Grid>
|
|
20
22
|
<Grid container gap={ 2 } flexWrap="nowrap">
|
|
21
23
|
<Grid item xs={ 6 }>
|
|
22
|
-
<SizeField bind="min-width" label={ __( 'Min.
|
|
24
|
+
<SizeField bind="min-width" label={ __( 'Min. width', 'elementor' ) } />
|
|
23
25
|
</Grid>
|
|
24
26
|
<Grid item xs={ 6 }>
|
|
25
|
-
<SizeField bind="min-height" label={ __( 'Min.
|
|
27
|
+
<SizeField bind="min-height" label={ __( 'Min. height', 'elementor' ) } />
|
|
26
28
|
</Grid>
|
|
27
29
|
</Grid>
|
|
28
30
|
<Grid container gap={ 2 } flexWrap="nowrap">
|
|
29
31
|
<Grid item xs={ 6 }>
|
|
30
|
-
<SizeField bind="max-width" label={ __( 'Max.
|
|
32
|
+
<SizeField bind="max-width" label={ __( 'Max. width', 'elementor' ) } />
|
|
31
33
|
</Grid>
|
|
32
34
|
<Grid item xs={ 6 }>
|
|
33
|
-
<SizeField bind="max-height" label={ __( 'Max.
|
|
35
|
+
<SizeField bind="max-height" label={ __( 'Max. height', 'elementor' ) } />
|
|
34
36
|
</Grid>
|
|
35
37
|
</Grid>
|
|
36
|
-
<
|
|
38
|
+
<PanelDivider />
|
|
37
39
|
<Stack>
|
|
38
40
|
<OverflowField />
|
|
39
41
|
</Stack>
|
|
40
|
-
</
|
|
42
|
+
</SectionContent>
|
|
41
43
|
);
|
|
42
44
|
};
|
|
43
45
|
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { LinkedDimensionsControl } from '@elementor/editor-controls';
|
|
3
|
-
import { Divider, Stack } from '@elementor/ui';
|
|
4
3
|
import { __ } from '@wordpress/i18n';
|
|
5
4
|
|
|
6
5
|
import { StylesField } from '../../../controls-registry/styles-field';
|
|
6
|
+
import { PanelDivider } from '../../panel-divider';
|
|
7
|
+
import { SectionContent } from '../../section-content';
|
|
7
8
|
|
|
8
9
|
export const SpacingSection = () => {
|
|
9
10
|
return (
|
|
10
|
-
<
|
|
11
|
+
<SectionContent>
|
|
11
12
|
<StylesField bind={ 'padding' }>
|
|
12
13
|
<LinkedDimensionsControl label={ __( 'Padding', 'elementor' ) } />
|
|
13
14
|
</StylesField>
|
|
14
|
-
<
|
|
15
|
+
<PanelDivider />
|
|
15
16
|
<StylesField bind={ 'margin' }>
|
|
16
17
|
<LinkedDimensionsControl label={ __( 'Margin', 'elementor' ) } />
|
|
17
18
|
</StylesField>
|
|
18
|
-
</
|
|
19
|
+
</SectionContent>
|
|
19
20
|
);
|
|
20
21
|
};
|
|
@@ -17,9 +17,9 @@ export const FontFamilyField = () => {
|
|
|
17
17
|
<StylesField bind="font-family">
|
|
18
18
|
<Grid container gap={ 2 } alignItems="center" flexWrap="nowrap">
|
|
19
19
|
<Grid item xs={ 6 }>
|
|
20
|
-
<ControlLabel>{ __( 'Font
|
|
20
|
+
<ControlLabel>{ __( 'Font family', 'elementor' ) }</ControlLabel>
|
|
21
21
|
</Grid>
|
|
22
|
-
<Grid item xs={ 6 }>
|
|
22
|
+
<Grid item xs={ 6 } sx={ { overflow: 'hidden' } }>
|
|
23
23
|
<FontFamilyControl fontFamilies={ fontFamilies } />
|
|
24
24
|
</Grid>
|
|
25
25
|
</Grid>
|
|
@@ -10,7 +10,7 @@ export const FontSizeField = () => {
|
|
|
10
10
|
<StylesField bind="font-size">
|
|
11
11
|
<Grid container gap={ 2 } alignItems="center" flexWrap="nowrap">
|
|
12
12
|
<Grid item xs={ 6 }>
|
|
13
|
-
<ControlLabel>{ __( 'Font
|
|
13
|
+
<ControlLabel>{ __( 'Font size', 'elementor' ) }</ControlLabel>
|
|
14
14
|
</Grid>
|
|
15
15
|
<Grid item xs={ 6 }>
|
|
16
16
|
<SizeControl />
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ControlLabel, type ToggleButtonGroupItem, ToggleControl } from '@elementor/editor-controls';
|
|
3
|
+
import { ItalicIcon, MinusIcon } from '@elementor/icons';
|
|
4
|
+
import { Grid } from '@elementor/ui';
|
|
5
|
+
import { __ } from '@wordpress/i18n';
|
|
6
|
+
|
|
7
|
+
import { StylesField } from '../../../controls-registry/styles-field';
|
|
8
|
+
|
|
9
|
+
type FontStyle = 'normal' | 'italic';
|
|
10
|
+
const options: ToggleButtonGroupItem< FontStyle >[] = [
|
|
11
|
+
{
|
|
12
|
+
value: 'normal',
|
|
13
|
+
label: __( 'Normal', 'elementor' ),
|
|
14
|
+
renderContent: ( { size } ) => <MinusIcon fontSize={ size } />,
|
|
15
|
+
showTooltip: true,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
value: 'italic',
|
|
19
|
+
label: __( 'Italic', 'elementor' ),
|
|
20
|
+
renderContent: ( { size } ) => <ItalicIcon fontSize={ size } />,
|
|
21
|
+
showTooltip: true,
|
|
22
|
+
},
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
export const FontStyleField = () => (
|
|
26
|
+
<StylesField bind="font-style">
|
|
27
|
+
<Grid container gap={ 2 } alignItems="center" flexWrap="nowrap">
|
|
28
|
+
<Grid item xs={ 6 }>
|
|
29
|
+
<ControlLabel>{ __( 'Font Style', 'elementor' ) }</ControlLabel>
|
|
30
|
+
</Grid>
|
|
31
|
+
<Grid item xs={ 6 } display="flex" justifyContent="end">
|
|
32
|
+
<ToggleControl options={ options } />
|
|
33
|
+
</Grid>
|
|
34
|
+
</Grid>
|
|
35
|
+
</StylesField>
|
|
36
|
+
);
|
|
@@ -22,9 +22,9 @@ export const FontWeightField = () => {
|
|
|
22
22
|
<StylesField bind="font-weight">
|
|
23
23
|
<Grid container gap={ 2 } alignItems="center" flexWrap="nowrap">
|
|
24
24
|
<Grid item xs={ 6 }>
|
|
25
|
-
<ControlLabel>{ __( 'Font
|
|
25
|
+
<ControlLabel>{ __( 'Font weight', 'elementor' ) }</ControlLabel>
|
|
26
26
|
</Grid>
|
|
27
|
-
<Grid item xs={ 6 }>
|
|
27
|
+
<Grid item xs={ 6 } sx={ { overflow: 'hidden' } }>
|
|
28
28
|
<SelectControl options={ fontWeightOptions } />
|
|
29
29
|
</Grid>
|
|
30
30
|
</Grid>
|
|
@@ -10,7 +10,7 @@ export const LetterSpacingField = () => {
|
|
|
10
10
|
<StylesField bind="letter-spacing">
|
|
11
11
|
<Grid container gap={ 2 } alignItems="center" flexWrap="nowrap">
|
|
12
12
|
<Grid item xs={ 6 }>
|
|
13
|
-
<ControlLabel>{ __( 'Letter
|
|
13
|
+
<ControlLabel>{ __( 'Letter spacing', 'elementor' ) }</ControlLabel>
|
|
14
14
|
</Grid>
|
|
15
15
|
<Grid item xs={ 6 }>
|
|
16
16
|
<SizeControl />
|
|
@@ -10,7 +10,7 @@ export const LineHeightField = () => {
|
|
|
10
10
|
<StylesField bind="line-height">
|
|
11
11
|
<Grid container gap={ 2 } alignItems="center" flexWrap="nowrap">
|
|
12
12
|
<Grid item xs={ 6 }>
|
|
13
|
-
<ControlLabel>{ __( 'Line
|
|
13
|
+
<ControlLabel>{ __( 'Line height', 'elementor' ) }</ControlLabel>
|
|
14
14
|
</Grid>
|
|
15
15
|
<Grid item xs={ 6 }>
|
|
16
16
|
<SizeControl />
|
|
@@ -10,7 +10,7 @@ export const TextColorField = () => {
|
|
|
10
10
|
<StylesField bind="color">
|
|
11
11
|
<Grid container gap={ 2 } alignItems="center" flexWrap="nowrap">
|
|
12
12
|
<Grid item xs={ 6 }>
|
|
13
|
-
<ControlLabel>{ __( 'Text
|
|
13
|
+
<ControlLabel>{ __( 'Text color', 'elementor' ) }</ControlLabel>
|
|
14
14
|
</Grid>
|
|
15
15
|
<Grid item xs={ 6 }>
|
|
16
16
|
<ColorControl />
|