@elementor/editor-global-classes 0.14.0 → 0.15.3
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 +65 -0
- package/dist/index.js +81 -61
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +88 -73
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -8
- package/src/components/class-manager/class-manager-button.tsx +3 -6
- package/src/components/class-manager/class-manager-introduction.tsx +21 -24
- package/src/components/class-manager/class-manager-panel.tsx +14 -22
- package/src/components/class-manager/delete-class.ts +34 -0
- package/src/components/class-manager/delete-confirmation-dialog.tsx +4 -4
- package/src/components/class-manager/global-classes-list.tsx +8 -5
- package/src/global-classes-styles-provider.ts +2 -2
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
List,
|
|
12
12
|
ListItemButton,
|
|
13
13
|
type ListItemButtonProps,
|
|
14
|
-
ListItemText,
|
|
15
14
|
Menu,
|
|
16
15
|
Stack,
|
|
17
16
|
styled,
|
|
@@ -164,7 +163,9 @@ const ClassItem = ( { id, label, renameClass, selected, disabled, sortableTrigge
|
|
|
164
163
|
openEditMode();
|
|
165
164
|
} }
|
|
166
165
|
>
|
|
167
|
-
<
|
|
166
|
+
<Typography variant="caption" sx={ { color: 'text.primary' } }>
|
|
167
|
+
{ __( 'Rename', 'elementor' ) }
|
|
168
|
+
</Typography>
|
|
168
169
|
</MenuListItem>
|
|
169
170
|
<MenuListItem
|
|
170
171
|
onClick={ () => {
|
|
@@ -172,7 +173,9 @@ const ClassItem = ( { id, label, renameClass, selected, disabled, sortableTrigge
|
|
|
172
173
|
openDialog( { id, label } );
|
|
173
174
|
} }
|
|
174
175
|
>
|
|
175
|
-
<
|
|
176
|
+
<Typography variant="caption" sx={ { color: 'error.light' } }>
|
|
177
|
+
{ __( 'Delete', 'elementor' ) }
|
|
178
|
+
</Typography>
|
|
176
179
|
</MenuListItem>
|
|
177
180
|
</Menu>
|
|
178
181
|
</>
|
|
@@ -255,11 +258,11 @@ const getIndicatorBorder = ( { isActive, isError, theme }: { isActive: boolean;
|
|
|
255
258
|
|
|
256
259
|
const validateLabel = ( newLabel: string ) => {
|
|
257
260
|
if ( ! stylesRepository.isLabelValid( newLabel ) ) {
|
|
258
|
-
return __( '
|
|
261
|
+
return __( 'Invalid format', 'elementor' );
|
|
259
262
|
}
|
|
260
263
|
|
|
261
264
|
if ( stylesRepository.isLabelExist( newLabel ) ) {
|
|
262
|
-
return __( '
|
|
265
|
+
return __( 'Name exists', 'elementor' );
|
|
263
266
|
}
|
|
264
267
|
|
|
265
268
|
return null;
|
|
@@ -67,7 +67,7 @@ export const globalClassesStylesProvider = {
|
|
|
67
67
|
},
|
|
68
68
|
subscribe: ( cb ) => subscribeWithSelector( ( state: StateWithGlobalClasses ) => state.globalClasses, cb ),
|
|
69
69
|
labels: {
|
|
70
|
-
singular: __( '
|
|
71
|
-
plural: __( '
|
|
70
|
+
singular: __( 'class', 'elementor' ),
|
|
71
|
+
plural: __( 'classes', 'elementor' ),
|
|
72
72
|
},
|
|
73
73
|
} satisfies StylesProvider;
|