@elementor/editor-controls 4.0.0-533 → 4.0.0-535

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/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": "4.0.0-533",
4
+ "version": "4.0.0-535",
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": "4.0.0-533",
44
- "@elementor/editor-elements": "4.0.0-533",
45
- "@elementor/editor-props": "4.0.0-533",
46
- "@elementor/editor-responsive": "4.0.0-533",
47
- "@elementor/editor-ui": "4.0.0-533",
48
- "@elementor/editor-v1-adapters": "4.0.0-533",
49
- "@elementor/env": "4.0.0-533",
50
- "@elementor/http-client": "4.0.0-533",
43
+ "@elementor/editor-current-user": "4.0.0-535",
44
+ "@elementor/editor-elements": "4.0.0-535",
45
+ "@elementor/editor-props": "4.0.0-535",
46
+ "@elementor/editor-responsive": "4.0.0-535",
47
+ "@elementor/editor-ui": "4.0.0-535",
48
+ "@elementor/editor-v1-adapters": "4.0.0-535",
49
+ "@elementor/env": "4.0.0-535",
50
+ "@elementor/http-client": "4.0.0-535",
51
51
  "@elementor/icons": "^1.63.0",
52
- "@elementor/locations": "4.0.0-533",
53
- "@elementor/mixpanel": "4.0.0-533",
54
- "@elementor/query": "4.0.0-533",
55
- "@elementor/session": "4.0.0-533",
52
+ "@elementor/locations": "4.0.0-535",
53
+ "@elementor/mixpanel": "4.0.0-535",
54
+ "@elementor/query": "4.0.0-535",
55
+ "@elementor/session": "4.0.0-535",
56
56
  "@elementor/ui": "1.36.17",
57
- "@elementor/utils": "4.0.0-533",
58
- "@elementor/wp-media": "4.0.0-533",
57
+ "@elementor/utils": "4.0.0-535",
58
+ "@elementor/wp-media": "4.0.0-535",
59
59
  "@wordpress/i18n": "^5.13.0",
60
60
  "@monaco-editor/react": "^4.7.0",
61
61
  "dayjs": "^1.11.18",
@@ -21,6 +21,7 @@ type RenderContentProps = { size: ToggleButtonProps[ 'size' ] };
21
21
 
22
22
  export type ToggleButtonGroupItem< TValue > = {
23
23
  value: TValue;
24
+ disabled?: boolean;
24
25
  label: string;
25
26
  renderContent: ( { size }: RenderContentProps ) => React.ReactNode;
26
27
  showTooltip?: boolean;
@@ -165,30 +166,39 @@ export const ToggleButtonGroupUi = React.forwardRef(
165
166
  width: `100%`,
166
167
  } }
167
168
  >
168
- { fixedItems.map( ( { label, value: buttonValue, renderContent: Content, showTooltip } ) => {
169
- const isPlaceholder =
170
- placeholderArray.length > 0 &&
171
- placeholderArray.includes( buttonValue as string ) &&
172
- ( shouldShowExclusivePlaceholder || shouldShowNonExclusivePlaceholder );
173
-
174
- return (
175
- <ConditionalTooltip
176
- key={ buttonValue as string }
177
- label={ label }
178
- showTooltip={ showTooltip || false }
179
- >
180
- <StyledToggleButton
181
- value={ buttonValue }
182
- aria-label={ label }
183
- size={ size }
184
- fullWidth={ fullWidth }
185
- isPlaceholder={ isPlaceholder }
169
+ { fixedItems.map(
170
+ ( {
171
+ label,
172
+ value: buttonValue,
173
+ renderContent: Content,
174
+ showTooltip,
175
+ disabled: optionDisabled = false,
176
+ } ) => {
177
+ const isPlaceholder =
178
+ placeholderArray.length > 0 &&
179
+ placeholderArray.includes( buttonValue as string ) &&
180
+ ( shouldShowExclusivePlaceholder || shouldShowNonExclusivePlaceholder );
181
+
182
+ return (
183
+ <ConditionalTooltip
184
+ key={ buttonValue as string }
185
+ label={ label }
186
+ showTooltip={ showTooltip || false }
186
187
  >
187
- <Content size={ size } />
188
- </StyledToggleButton>
189
- </ConditionalTooltip>
190
- );
191
- } ) }
188
+ <StyledToggleButton
189
+ value={ buttonValue }
190
+ aria-label={ label }
191
+ size={ size }
192
+ fullWidth={ fullWidth }
193
+ isPlaceholder={ isPlaceholder }
194
+ disabled={ optionDisabled }
195
+ >
196
+ <Content size={ size } />
197
+ </StyledToggleButton>
198
+ </ConditionalTooltip>
199
+ );
200
+ }
201
+ ) }
192
202
 
193
203
  { menuItems.length && exclusive && (
194
204
  <SplitButtonGroup