@elementor/editor-controls 3.33.0-283 → 3.33.0-285
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/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -15
- package/src/components/control-toggle-button-group.tsx +55 -50
- package/src/index.ts +1 -0
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": "3.33.0-
|
|
4
|
+
"version": "3.33.0-285",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Elementor Team",
|
|
7
7
|
"homepage": "https://elementor.com/",
|
|
@@ -40,22 +40,22 @@
|
|
|
40
40
|
"dev": "tsup --config=../../tsup.dev.ts"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@elementor/editor-current-user": "3.33.0-
|
|
44
|
-
"@elementor/editor-elements": "3.33.0-
|
|
45
|
-
"@elementor/editor-props": "3.33.0-
|
|
46
|
-
"@elementor/editor-responsive": "3.33.0-
|
|
47
|
-
"@elementor/editor-ui": "3.33.0-
|
|
48
|
-
"@elementor/editor-v1-adapters": "3.33.0-
|
|
49
|
-
"@elementor/env": "3.33.0-
|
|
50
|
-
"@elementor/http-client": "3.33.0-
|
|
43
|
+
"@elementor/editor-current-user": "3.33.0-285",
|
|
44
|
+
"@elementor/editor-elements": "3.33.0-285",
|
|
45
|
+
"@elementor/editor-props": "3.33.0-285",
|
|
46
|
+
"@elementor/editor-responsive": "3.33.0-285",
|
|
47
|
+
"@elementor/editor-ui": "3.33.0-285",
|
|
48
|
+
"@elementor/editor-v1-adapters": "3.33.0-285",
|
|
49
|
+
"@elementor/env": "3.33.0-285",
|
|
50
|
+
"@elementor/http-client": "3.33.0-285",
|
|
51
51
|
"@elementor/icons": "^1.61.0",
|
|
52
|
-
"@elementor/locations": "3.33.0-
|
|
53
|
-
"@elementor/mixpanel": "3.33.0-
|
|
54
|
-
"@elementor/query": "3.33.0-
|
|
55
|
-
"@elementor/session": "3.33.0-
|
|
52
|
+
"@elementor/locations": "3.33.0-285",
|
|
53
|
+
"@elementor/mixpanel": "3.33.0-285",
|
|
54
|
+
"@elementor/query": "3.33.0-285",
|
|
55
|
+
"@elementor/session": "3.33.0-285",
|
|
56
56
|
"@elementor/ui": "1.36.17",
|
|
57
|
-
"@elementor/utils": "3.33.0-
|
|
58
|
-
"@elementor/wp-media": "3.33.0-
|
|
57
|
+
"@elementor/utils": "3.33.0-285",
|
|
58
|
+
"@elementor/wp-media": "3.33.0-285",
|
|
59
59
|
"@wordpress/i18n": "^5.13.0",
|
|
60
60
|
"@monaco-editor/react": "^4.7.0",
|
|
61
61
|
"dayjs": "^1.11.18",
|
|
@@ -80,8 +80,7 @@ type Props< TValue > = {
|
|
|
80
80
|
onChange: ( value: ExclusiveValue< TValue > ) => void;
|
|
81
81
|
}
|
|
82
82
|
);
|
|
83
|
-
|
|
84
|
-
export const ControlToggleButtonGroup = < TValue, >( {
|
|
83
|
+
export const ToggleButtonGroupUi = < TValue, >( {
|
|
85
84
|
justify = 'end',
|
|
86
85
|
size = 'tiny',
|
|
87
86
|
value,
|
|
@@ -148,55 +147,61 @@ export const ControlToggleButtonGroup = < TValue, >( {
|
|
|
148
147
|
const placeholderArray = getPlaceholderArray( placeholder );
|
|
149
148
|
|
|
150
149
|
return (
|
|
151
|
-
<
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
150
|
+
<StyledToggleButtonGroup
|
|
151
|
+
justify={ justify }
|
|
152
|
+
value={ value }
|
|
153
|
+
onChange={ handleChange }
|
|
154
|
+
exclusive={ exclusive }
|
|
155
|
+
disabled={ disabled }
|
|
156
|
+
sx={ {
|
|
157
|
+
direction: isRtl ? 'rtl /* @noflip */' : 'ltr /* @noflip */',
|
|
158
|
+
display: 'grid',
|
|
159
|
+
gridTemplateColumns: getGridTemplateColumns,
|
|
160
|
+
width: `100%`,
|
|
161
|
+
} }
|
|
162
|
+
>
|
|
163
|
+
{ fixedItems.map( ( { label, value: buttonValue, renderContent: Content, showTooltip } ) => {
|
|
164
|
+
const isPlaceholder =
|
|
165
|
+
placeholderArray.length > 0 &&
|
|
166
|
+
placeholderArray.includes( buttonValue as string ) &&
|
|
167
|
+
( shouldShowExclusivePlaceholder || shouldShowNonExclusivePlaceholder );
|
|
168
|
+
|
|
169
|
+
return (
|
|
170
|
+
<ConditionalTooltip
|
|
171
|
+
key={ buttonValue as string }
|
|
172
|
+
label={ label }
|
|
173
|
+
showTooltip={ showTooltip || false }
|
|
174
|
+
>
|
|
175
|
+
<StyledToggleButton
|
|
176
|
+
value={ buttonValue }
|
|
177
|
+
aria-label={ label }
|
|
178
|
+
size={ size }
|
|
179
|
+
fullWidth={ fullWidth }
|
|
180
|
+
isPlaceholder={ isPlaceholder }
|
|
176
181
|
>
|
|
177
|
-
<
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
)
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
182
|
+
<Content size={ size } />
|
|
183
|
+
</StyledToggleButton>
|
|
184
|
+
</ConditionalTooltip>
|
|
185
|
+
);
|
|
186
|
+
} ) }
|
|
187
|
+
|
|
188
|
+
{ menuItems.length && exclusive && (
|
|
189
|
+
<SplitButtonGroup
|
|
190
|
+
size={ size }
|
|
191
|
+
value={ ( value as ExclusiveValue< TValue > ) || null }
|
|
192
|
+
onChange={ onChange as ( v: ExclusiveValue< TValue > ) => void }
|
|
193
|
+
items={ menuItems }
|
|
194
|
+
fullWidth={ fullWidth }
|
|
195
|
+
/>
|
|
196
|
+
) }
|
|
197
|
+
</StyledToggleButtonGroup>
|
|
198
|
+
);
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
export const ControlToggleButtonGroup = < TValue, >( props: Props< TValue > ) => {
|
|
202
|
+
return (
|
|
203
|
+
<ControlActions>
|
|
204
|
+
<ToggleButtonGroupUi { ...props } />
|
|
200
205
|
</ControlActions>
|
|
201
206
|
);
|
|
202
207
|
};
|
package/src/index.ts
CHANGED
|
@@ -40,6 +40,7 @@ export { InlineEditor } from './components/inline-editor';
|
|
|
40
40
|
// components
|
|
41
41
|
export { ControlFormLabel } from './components/control-form-label';
|
|
42
42
|
export { ControlToggleButtonGroup } from './components/control-toggle-button-group';
|
|
43
|
+
export { ToggleButtonGroupUi } from './components/control-toggle-button-group';
|
|
43
44
|
export { ClearIconButton } from './components/icon-buttons/clear-icon-button';
|
|
44
45
|
export {
|
|
45
46
|
Repeater,
|