@elementor/editor-controls 0.20.0 → 0.21.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 (27) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/index.d.mts +2 -2
  3. package/dist/index.d.ts +2 -2
  4. package/dist/index.js +294 -260
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.mjs +225 -191
  7. package/dist/index.mjs.map +1 -1
  8. package/package.json +2 -2
  9. package/src/components/control-form-label.tsx +6 -0
  10. package/src/components/control-label.tsx +12 -3
  11. package/src/components/repeater.tsx +9 -2
  12. package/src/controls/background-control/background-control.tsx +2 -2
  13. package/src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-attachment.tsx +2 -2
  14. package/src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx +2 -2
  15. package/src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-repeat.tsx +2 -2
  16. package/src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx +2 -2
  17. package/src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx +18 -4
  18. package/src/controls/color-control.tsx +1 -1
  19. package/src/controls/equal-unequal-sizes-control.tsx +2 -1
  20. package/src/controls/gap-control.tsx +3 -2
  21. package/src/controls/image-control.tsx +3 -3
  22. package/src/controls/link-control.tsx +4 -4
  23. package/src/controls/linked-dimensions-control.tsx +7 -6
  24. package/src/controls/stroke-control.tsx +2 -2
  25. package/src/controls/svg-media-control.tsx +2 -2
  26. package/src/index.ts +2 -1
  27. package/src/control-adornments/control-label-with-adornments.tsx +0 -15
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elementor/editor-controls",
3
3
  "description": "This package contains the controls model and utils for the Elementor editor",
4
- "version": "0.20.0",
4
+ "version": "0.21.0",
5
5
  "private": false,
6
6
  "author": "Elementor Team",
7
7
  "homepage": "https://elementor.com/",
@@ -43,7 +43,7 @@
43
43
  "@elementor/editor-current-user": "0.3.0",
44
44
  "@elementor/editor-elements": "0.7.0",
45
45
  "@elementor/editor-props": "0.11.1",
46
- "@elementor/editor-ui": "0.5.0",
46
+ "@elementor/editor-ui": "0.5.1",
47
47
  "@elementor/env": "0.3.5",
48
48
  "@elementor/http": "0.1.4",
49
49
  "@elementor/icons": "1.37.0",
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import { FormLabel } from '@elementor/ui';
3
+
4
+ export const ControlFormLabel = ( { children }: { children: React.ReactNode } ) => {
5
+ return <FormLabel size="tiny">{ children }</FormLabel>;
6
+ };
@@ -1,6 +1,15 @@
1
1
  import * as React from 'react';
2
- import { FormLabel } from '@elementor/ui';
2
+ import { type PropsWithChildren } from 'react';
3
+ import { Stack } from '@elementor/ui';
3
4
 
4
- export const ControlLabel = ( { children }: { children: React.ReactNode } ) => {
5
- return <FormLabel size="tiny">{ children }</FormLabel>;
5
+ import { ControlAdornments } from '../control-adornments/control-adornments';
6
+ import { ControlFormLabel } from './control-form-label';
7
+
8
+ export const ControlLabel = ( { children }: PropsWithChildren< object > ) => {
9
+ return (
10
+ <Stack direction="row" alignItems="center" justifyItems="start" gap={ 1 }>
11
+ <ControlFormLabel>{ children }</ControlFormLabel>
12
+ <ControlAdornments />
13
+ </Stack>
14
+ );
6
15
  };
@@ -17,6 +17,7 @@ import {
17
17
  } from '@elementor/ui';
18
18
  import { __ } from '@wordpress/i18n';
19
19
 
20
+ import { ControlAdornments } from '../control-adornments/control-adornments';
20
21
  import { useSyncExternalState } from '../hooks/use-sync-external-state';
21
22
  import { SectionContent } from './section-content';
22
23
  import { SortableItem, SortableProvider } from './sortable';
@@ -139,11 +140,17 @@ export const Repeater = < T, >( {
139
140
 
140
141
  return (
141
142
  <SectionContent>
142
- <Stack direction="row" justifyContent="space-between" alignItems="center">
143
+ <Stack direction="row" justifyContent="start" alignItems="center" gap={ 1 }>
143
144
  <Typography component="label" variant="caption" color="text.secondary">
144
145
  { label }
145
146
  </Typography>
146
- <IconButton size={ SIZE } onClick={ addRepeaterItem } aria-label={ __( 'Add item', 'elementor' ) }>
147
+ <ControlAdornments />
148
+ <IconButton
149
+ sx={ { ml: 'auto' } }
150
+ size={ SIZE }
151
+ onClick={ addRepeaterItem }
152
+ aria-label={ __( 'Add item', 'elementor' ) }
153
+ >
147
154
  <PlusIcon fontSize={ SIZE } />
148
155
  </IconButton>
149
156
  </Stack>
@@ -4,7 +4,7 @@ import { Grid } from '@elementor/ui';
4
4
  import { __ } from '@wordpress/i18n';
5
5
 
6
6
  import { PropKeyProvider, PropProvider, useBoundProp } from '../../bound-prop-context';
7
- import { ControlLabel } from '../../components/control-label';
7
+ import { ControlFormLabel } from '../../components/control-form-label';
8
8
  import { SectionContent } from '../../components/section-content';
9
9
  import { createControl } from '../../create-control';
10
10
  import { ColorControl } from '../color-control';
@@ -22,7 +22,7 @@ export const BackgroundControl = createControl( () => {
22
22
  <PropKeyProvider bind="color">
23
23
  <Grid container gap={ 2 } alignItems="center" flexWrap="nowrap">
24
24
  <Grid item xs={ 6 }>
25
- <ControlLabel>{ __( 'Color', 'elementor' ) }</ControlLabel>
25
+ <ControlFormLabel>{ __( 'Color', 'elementor' ) }</ControlFormLabel>
26
26
  </Grid>
27
27
  <Grid item xs={ 6 }>
28
28
  <ColorControl />
@@ -3,7 +3,7 @@ import { PinIcon, PinnedOffIcon } from '@elementor/icons';
3
3
  import { Grid } from '@elementor/ui';
4
4
  import { __ } from '@wordpress/i18n';
5
5
 
6
- import { ControlLabel } from '../../../../components/control-label';
6
+ import { ControlFormLabel } from '../../../../components/control-form-label';
7
7
  import { type ToggleButtonGroupItem } from '../../../../components/control-toggle-button-group';
8
8
  import { PopoverGridContainer } from '../../../../components/popover-grid-container';
9
9
  import { ToggleControl } from '../../../toggle-control';
@@ -29,7 +29,7 @@ export const BackgroundImageOverlayAttachment = () => {
29
29
  return (
30
30
  <PopoverGridContainer>
31
31
  <Grid item xs={ 6 }>
32
- <ControlLabel>{ __( 'Attachment', 'elementor' ) }</ControlLabel>
32
+ <ControlFormLabel>{ __( 'Attachment', 'elementor' ) }</ControlFormLabel>
33
33
  </Grid>
34
34
  <Grid item xs={ 6 } sx={ { display: 'flex', justifyContent: 'flex-end', overflow: 'hidden' } }>
35
35
  <ToggleControl options={ attachmentControlOptions } />
@@ -6,7 +6,7 @@ import { Grid, Select, type SelectChangeEvent } from '@elementor/ui';
6
6
  import { __ } from '@wordpress/i18n';
7
7
 
8
8
  import { PropKeyProvider, PropProvider, useBoundProp } from '../../../../bound-prop-context';
9
- import { ControlLabel } from '../../../../components/control-label';
9
+ import { ControlFormLabel } from '../../../../components/control-form-label';
10
10
  import { PopoverGridContainer } from '../../../../components/popover-grid-container';
11
11
  import { SizeControl } from '../../../size-control';
12
12
 
@@ -56,7 +56,7 @@ export const BackgroundImageOverlayPosition = () => {
56
56
  <Grid item xs={ 12 }>
57
57
  <PopoverGridContainer>
58
58
  <Grid item xs={ 6 }>
59
- <ControlLabel>{ __( 'Position', 'elementor' ) }</ControlLabel>
59
+ <ControlFormLabel>{ __( 'Position', 'elementor' ) }</ControlFormLabel>
60
60
  </Grid>
61
61
  <Grid item xs={ 6 } sx={ { display: 'flex', justifyContent: 'flex-end', overflow: 'hidden' } }>
62
62
  <Select
@@ -3,7 +3,7 @@ import { DotsHorizontalIcon, DotsVerticalIcon, GridDotsIcon, XIcon } from '@elem
3
3
  import { Grid } from '@elementor/ui';
4
4
  import { __ } from '@wordpress/i18n';
5
5
 
6
- import { ControlLabel } from '../../../../components/control-label';
6
+ import { ControlFormLabel } from '../../../../components/control-form-label';
7
7
  import { type ToggleButtonGroupItem } from '../../../../components/control-toggle-button-group';
8
8
  import { PopoverGridContainer } from '../../../../components/popover-grid-container';
9
9
  import { ToggleControl } from '../../../toggle-control';
@@ -41,7 +41,7 @@ export const BackgroundImageOverlayRepeat = () => {
41
41
  return (
42
42
  <PopoverGridContainer>
43
43
  <Grid item xs={ 6 }>
44
- <ControlLabel>{ __( 'Repeat', 'elementor' ) }</ControlLabel>
44
+ <ControlFormLabel>{ __( 'Repeat', 'elementor' ) }</ControlFormLabel>
45
45
  </Grid>
46
46
  <Grid item xs={ 6 } sx={ { display: 'flex', justifyContent: 'flex-end' } }>
47
47
  <ToggleControl options={ repeatControlOptions } />
@@ -12,7 +12,7 @@ import { Grid } from '@elementor/ui';
12
12
  import { __ } from '@wordpress/i18n';
13
13
 
14
14
  import { PropKeyProvider, PropProvider, useBoundProp } from '../../../../bound-prop-context';
15
- import { ControlLabel } from '../../../../components/control-label';
15
+ import { ControlFormLabel } from '../../../../components/control-form-label';
16
16
  import {
17
17
  ControlToggleButtonGroup,
18
18
  type ToggleButtonGroupItem,
@@ -68,7 +68,7 @@ export const BackgroundImageOverlaySize = () => {
68
68
  <Grid item xs={ 12 }>
69
69
  <PopoverGridContainer>
70
70
  <Grid item xs={ 6 }>
71
- <ControlLabel>{ __( 'Size', 'elementor' ) }</ControlLabel>
71
+ <ControlFormLabel>{ __( 'Size', 'elementor' ) }</ControlFormLabel>
72
72
  </Grid>
73
73
  <Grid item xs={ 6 } sx={ { display: 'flex', justifyContent: 'flex-end' } }>
74
74
  <ControlToggleButtonGroup
@@ -7,7 +7,7 @@ import {
7
7
  colorPropTypeUtil,
8
8
  type PropKey,
9
9
  } from '@elementor/editor-props';
10
- import { Box, CardMedia, Grid, Tab, TabPanel, Tabs, UnstableColorIndicator } from '@elementor/ui';
10
+ import { Box, CardMedia, Grid, styled, Tab, TabPanel, Tabs, type Theme, UnstableColorIndicator } from '@elementor/ui';
11
11
  import { useWpMediaAttachment } from '@elementor/wp-media';
12
12
  import { __ } from '@wordpress/i18n';
13
13
 
@@ -160,19 +160,29 @@ const extractColorFrom = ( prop: BackgroundOverlayItemPropValue ) => {
160
160
 
161
161
  const ItemIconColor = ( { value: prop }: { value: BackgroundOverlayItemPropValue } ) => {
162
162
  const color = extractColorFrom( prop );
163
- return <UnstableColorIndicator size="inherit" component="span" value={ color } />;
163
+ return <StyledUnstableColorIndicator size="inherit" component="span" value={ color } />;
164
164
  };
165
165
 
166
166
  const ItemIconImage = ( { value }: { value: BackgroundImageOverlay } ) => {
167
167
  const { imageUrl } = useImage( value );
168
168
 
169
- return <CardMedia image={ imageUrl } sx={ { height: 13, width: 13, borderRadius: '4px' } } />;
169
+ return (
170
+ <CardMedia
171
+ image={ imageUrl }
172
+ sx={ ( theme: Theme ) => ( {
173
+ height: '1em',
174
+ width: '1em',
175
+ borderRadius: `${ theme.shape.borderRadius / 2 }px`,
176
+ outline: `1px solid ${ theme.palette.action.disabled }`,
177
+ } ) }
178
+ />
179
+ );
170
180
  };
171
181
 
172
182
  const ItemIconGradient = ( { value }: { value: BackgroundOverlayItemPropValue } ) => {
173
183
  const gradient = getGradientValue( value );
174
184
 
175
- return <UnstableColorIndicator size="inherit" component="span" value={ gradient } />;
185
+ return <StyledUnstableColorIndicator size="inherit" component="span" value={ gradient } />;
176
186
  };
177
187
 
178
188
  const ItemLabel = ( { value }: { value: BackgroundOverlayItemPropValue } ) => {
@@ -249,6 +259,10 @@ const ImageOverlayContent = () => {
249
259
  );
250
260
  };
251
261
 
262
+ const StyledUnstableColorIndicator = styled( UnstableColorIndicator )( ( { theme } ) => ( {
263
+ borderRadius: `${ theme.shape.borderRadius / 2 }px`,
264
+ } ) );
265
+
252
266
  const useImage = ( image: BackgroundImageOverlay ) => {
253
267
  let imageTitle,
254
268
  imageUrl: string | null = null;
@@ -14,7 +14,7 @@ export const ColorControl = createControl( ( { propTypeUtil = colorPropTypeUtil,
14
14
  const { value, setValue } = useBoundProp( propTypeUtil );
15
15
 
16
16
  const handleChange = ( selectedColor: string ) => {
17
- setValue( selectedColor );
17
+ setValue( selectedColor || null );
18
18
  };
19
19
 
20
20
  return (
@@ -5,6 +5,7 @@ import { bindPopover, bindToggle, Grid, Popover, Stack, ToggleButton, Tooltip, u
5
5
  import { __ } from '@wordpress/i18n';
6
6
 
7
7
  import { PropKeyProvider, PropProvider, useBoundProp } from '../bound-prop-context';
8
+ import { ControlFormLabel } from '../components/control-form-label';
8
9
  import { ControlLabel } from '../components/control-label';
9
10
  import { PopoverContent } from '../components/popover-content';
10
11
  import { PopoverGridContainer } from '../components/popover-grid-container';
@@ -160,7 +161,7 @@ const MultiSizeValueControl = ( { item }: { item: Item } ) => (
160
161
  <Grid item xs={ 6 }>
161
162
  <Grid container gap={ 0.75 } alignItems="center">
162
163
  <Grid item xs={ 12 }>
163
- <ControlLabel>{ item.label }</ControlLabel>
164
+ <ControlFormLabel>{ item.label }</ControlFormLabel>
164
165
  </Grid>
165
166
  <Grid item xs={ 12 }>
166
167
  <SizeControl startIcon={ item.icon } />
@@ -5,6 +5,7 @@ import { Grid, Stack, ToggleButton, Tooltip } from '@elementor/ui';
5
5
  import { __ } from '@wordpress/i18n';
6
6
 
7
7
  import { PropKeyProvider, PropProvider, useBoundProp } from '../bound-prop-context';
8
+ import { ControlFormLabel } from '../components/control-form-label';
8
9
  import { ControlLabel } from '../components/control-label';
9
10
  import { createControl } from '../create-control';
10
11
  import { SizeControl } from './size-control';
@@ -61,7 +62,7 @@ export const GapControl = createControl( ( { label }: { label: string } ) => {
61
62
  <Stack direction="row" gap={ 2 } flexWrap="nowrap">
62
63
  <Grid container gap={ 0.75 } alignItems="center">
63
64
  <Grid item xs={ 12 }>
64
- <ControlLabel>{ __( 'Column', 'elementor' ) }</ControlLabel>
65
+ <ControlFormLabel>{ __( 'Column', 'elementor' ) }</ControlFormLabel>
65
66
  </Grid>
66
67
  <Grid item xs={ 12 }>
67
68
  <Control bind={ 'column' } isLinked={ isLinked } />
@@ -69,7 +70,7 @@ export const GapControl = createControl( ( { label }: { label: string } ) => {
69
70
  </Grid>
70
71
  <Grid container gap={ 0.75 } alignItems="center">
71
72
  <Grid item xs={ 12 }>
72
- <ControlLabel>{ __( 'Row', 'elementor' ) }</ControlLabel>
73
+ <ControlFormLabel>{ __( 'Row', 'elementor' ) }</ControlFormLabel>
73
74
  </Grid>
74
75
  <Grid item xs={ 12 }>
75
76
  <Control bind={ 'row' } isLinked={ isLinked } />
@@ -5,7 +5,7 @@ import { type MediaType } from '@elementor/wp-media';
5
5
  import { __ } from '@wordpress/i18n';
6
6
 
7
7
  import { PropKeyProvider, PropProvider, useBoundProp } from '../bound-prop-context';
8
- import { ControlLabel } from '../components/control-label';
8
+ import { ControlFormLabel } from '../components/control-form-label';
9
9
  import { createControl } from '../create-control';
10
10
  import { useUnfilteredFilesUpload } from '../hooks/use-unfiltered-files-upload';
11
11
  import { ImageMediaControl } from './image-media-control';
@@ -27,13 +27,13 @@ export const ImageControl = createControl(
27
27
  <PropProvider { ...propContext }>
28
28
  <Stack gap={ 1.5 }>
29
29
  <PropKeyProvider bind={ 'src' }>
30
- <ControlLabel> { __( 'Image', 'elementor' ) } </ControlLabel>
30
+ <ControlFormLabel> { __( 'Image', 'elementor' ) } </ControlFormLabel>
31
31
  <ImageMediaControl mediaTypes={ mediaTypes } />
32
32
  </PropKeyProvider>
33
33
  <PropKeyProvider bind={ 'size' }>
34
34
  <Grid container gap={ 1.5 } alignItems="center" flexWrap="nowrap">
35
35
  <Grid item xs={ 6 }>
36
- <ControlLabel> { resolutionLabel } </ControlLabel>
36
+ <ControlFormLabel> { resolutionLabel } </ControlFormLabel>
37
37
  </Grid>
38
38
  <Grid item xs={ 6 } sx={ { overflow: 'hidden' } }>
39
39
  <SelectControl options={ sizes } />
@@ -24,7 +24,7 @@ import {
24
24
  type FlatOption,
25
25
  isCategorizedOptionPool,
26
26
  } from '../components/autocomplete';
27
- import { ControlLabel } from '../components/control-label';
27
+ import { ControlFormLabel } from '../components/control-form-label';
28
28
  import ControlActions from '../control-actions/control-actions';
29
29
  import { createControl } from '../create-control';
30
30
  import { type ControlProps } from '../utils/types';
@@ -144,7 +144,7 @@ export const LinkControl = createControl( ( props: Props ) => {
144
144
  alignItems: 'center',
145
145
  } }
146
146
  >
147
- <ControlLabel>{ __( 'Link', 'elementor' ) }</ControlLabel>
147
+ <ControlFormLabel>{ __( 'Link', 'elementor' ) }</ControlFormLabel>
148
148
  <ToggleIconControl
149
149
  enabled={ isEnabled }
150
150
  onIconClick={ onEnabledChange }
@@ -159,7 +159,7 @@ export const LinkControl = createControl( ( props: Props ) => {
159
159
  options={ options }
160
160
  allowCustomValues={ allowCustomValues }
161
161
  placeholder={ placeholder }
162
- value={ value?.destination?.value }
162
+ value={ value?.destination?.value?.settings?.label || value?.destination?.value }
163
163
  onOptionChange={ onOptionChange }
164
164
  onTextChange={ onTextChange }
165
165
  minInputLength={ minInputLength }
@@ -201,7 +201,7 @@ const SwitchControl = () => {
201
201
  return (
202
202
  <Grid container alignItems="center" flexWrap="nowrap" justifyContent="space-between">
203
203
  <Grid item>
204
- <ControlLabel>{ __( 'Open in a new tab', 'elementor' ) }</ControlLabel>
204
+ <ControlFormLabel>{ __( 'Open in a new tab', 'elementor' ) }</ControlFormLabel>
205
205
  </Grid>
206
206
  <Grid item>
207
207
  <Switch checked={ value } onClick={ onClick } />
@@ -5,6 +5,7 @@ import { Grid, Stack, ToggleButton, Tooltip } from '@elementor/ui';
5
5
  import { __ } from '@wordpress/i18n';
6
6
 
7
7
  import { PropKeyProvider, PropProvider, useBoundProp } from '../bound-prop-context';
8
+ import { ControlFormLabel } from '../components/control-form-label';
8
9
  import { ControlLabel } from '../components/control-label';
9
10
  import { createControl } from '../create-control';
10
11
  import { type ExtendedValue, SizeControl } from './size-control';
@@ -72,7 +73,7 @@ export const LinkedDimensionsControl = createControl(
72
73
  <Stack direction="row" gap={ 2 } flexWrap="nowrap">
73
74
  <Grid container gap={ 0.75 } alignItems="center">
74
75
  <Grid item xs={ 12 }>
75
- <ControlLabel>{ __( 'Top', 'elementor' ) }</ControlLabel>
76
+ <ControlFormLabel>{ __( 'Top', 'elementor' ) }</ControlFormLabel>
76
77
  </Grid>
77
78
  <Grid item xs={ 12 }>
78
79
  <Control
@@ -85,9 +86,9 @@ export const LinkedDimensionsControl = createControl(
85
86
  </Grid>
86
87
  <Grid container gap={ 0.75 } alignItems="center">
87
88
  <Grid item xs={ 12 }>
88
- <ControlLabel>
89
+ <ControlFormLabel>
89
90
  { isSiteRtl ? __( 'Left', 'elementor' ) : __( 'Right', 'elementor' ) }
90
- </ControlLabel>
91
+ </ControlFormLabel>
91
92
  </Grid>
92
93
  <Grid item xs={ 12 }>
93
94
  <Control
@@ -108,7 +109,7 @@ export const LinkedDimensionsControl = createControl(
108
109
  <Stack direction="row" gap={ 2 } flexWrap="nowrap">
109
110
  <Grid container gap={ 0.75 } alignItems="center">
110
111
  <Grid item xs={ 12 }>
111
- <ControlLabel>{ __( 'Bottom', 'elementor' ) }</ControlLabel>
112
+ <ControlFormLabel>{ __( 'Bottom', 'elementor' ) }</ControlFormLabel>
112
113
  </Grid>
113
114
  <Grid item xs={ 12 }>
114
115
  <Control
@@ -121,9 +122,9 @@ export const LinkedDimensionsControl = createControl(
121
122
  </Grid>
122
123
  <Grid container gap={ 0.75 } alignItems="center">
123
124
  <Grid item xs={ 12 }>
124
- <ControlLabel>
125
+ <ControlFormLabel>
125
126
  { isSiteRtl ? __( 'Right', 'elementor' ) : __( 'Left', 'elementor' ) }
126
- </ControlLabel>
127
+ </ControlFormLabel>
127
128
  </Grid>
128
129
  <Grid item xs={ 12 }>
129
130
  <Control
@@ -4,7 +4,7 @@ import { Grid } from '@elementor/ui';
4
4
  import { __ } from '@wordpress/i18n';
5
5
 
6
6
  import { PropKeyProvider, PropProvider, useBoundProp } from '../bound-prop-context';
7
- import { ControlLabel } from '../components/control-label';
7
+ import { ControlFormLabel } from '../components/control-form-label';
8
8
  import { SectionContent } from '../components/section-content';
9
9
  import { createControl } from '../create-control';
10
10
  import { ColorControl } from './color-control';
@@ -39,7 +39,7 @@ const Control = ( { bind, label, children }: StrokeProps ) => (
39
39
  <PropKeyProvider bind={ bind }>
40
40
  <Grid container gap={ 2 } alignItems="center" flexWrap="nowrap">
41
41
  <Grid item xs={ 6 }>
42
- <ControlLabel>{ label }</ControlLabel>
42
+ <ControlFormLabel>{ label }</ControlFormLabel>
43
43
  </Grid>
44
44
  <Grid item xs={ 6 }>
45
45
  { children }
@@ -7,7 +7,7 @@ import { type OpenOptions, useWpMediaAttachment, useWpMediaFrame } from '@elemen
7
7
  import { __ } from '@wordpress/i18n';
8
8
 
9
9
  import { useBoundProp } from '../bound-prop-context';
10
- import { ControlLabel } from '../components/control-label';
10
+ import { ControlFormLabel } from '../components/control-form-label';
11
11
  import { EnableUnfilteredModal } from '../components/enable-unfiltered-modal';
12
12
  import ControlActions from '../control-actions/control-actions';
13
13
  import { createControl } from '../create-control';
@@ -83,7 +83,7 @@ export const SvgMediaControl = createControl( () => {
83
83
  return (
84
84
  <Stack gap={ 1 }>
85
85
  <EnableUnfilteredModal open={ unfilteredModalOpenState } onClose={ onCloseUnfilteredModal } />
86
- <ControlLabel> { __( 'SVG', 'elementor' ) } </ControlLabel>
86
+ <ControlFormLabel> { __( 'SVG', 'elementor' ) } </ControlFormLabel>
87
87
  <ControlActions>
88
88
  <StyledCard variant="outlined">
89
89
  <StyledCardMediaContainer>
package/src/index.ts CHANGED
@@ -19,7 +19,7 @@ export { SvgMediaControl } from './controls/svg-media-control';
19
19
  export { BackgroundControl } from './controls/background-control/background-control';
20
20
 
21
21
  // components
22
- export { ControlLabel } from './components/control-label';
22
+ export { ControlFormLabel } from './components/control-form-label';
23
23
  export { ControlToggleButtonGroup } from './components/control-toggle-button-group';
24
24
 
25
25
  // types
@@ -39,5 +39,6 @@ export { ControlActionsProvider, useControlActions } from './control-actions/con
39
39
  export { useBoundProp, PropProvider, PropKeyProvider } from './bound-prop-context';
40
40
  export { ControlAdornmentsProvider } from './control-adornments/control-adornments-context';
41
41
  export { ControlAdornments } from './control-adornments/control-adornments';
42
+
42
43
  // hooks
43
44
  export { useSyncExternalState } from './hooks/use-sync-external-state';
@@ -1,15 +0,0 @@
1
- import * as React from 'react';
2
- import { type PropsWithChildren } from 'react';
3
- import { Stack } from '@elementor/ui';
4
-
5
- import { ControlLabel } from '../components/control-label';
6
- import { ControlAdornments } from './control-adornments';
7
-
8
- export const ControlLabelWithAdornments = ( { children }: PropsWithChildren< object > ) => {
9
- return (
10
- <Stack direction="row" alignItems="center" justifyItems="start" gap={ 1 }>
11
- <ControlLabel>{ children }</ControlLabel>
12
- <ControlAdornments />
13
- </Stack>
14
- );
15
- };