@elementor/editor-controls 4.2.0-854 → 4.2.0-856
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 +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +124 -85
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +95 -57
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -15
- package/src/controls/grid-span-control.tsx +51 -0
- package/src/index.ts +1 -0
package/dist/index.d.mts
CHANGED
|
@@ -540,6 +540,16 @@ type Props$3 = {
|
|
|
540
540
|
};
|
|
541
541
|
declare const UnstableSizeControl: ControlComponent$1<({ variant, placeholder: propPlaceholder, anchorRef, startIcon, ariaLabel, min }: Props$3) => React$1.JSX.Element>;
|
|
542
542
|
|
|
543
|
+
declare const GridSpanControl: ControlComponent$1<({ placeholder: propPlaceholder, error, inputValue, inputDisabled, helperText, sx, ariaLabel, }: {
|
|
544
|
+
placeholder?: string;
|
|
545
|
+
error?: boolean;
|
|
546
|
+
inputValue?: string;
|
|
547
|
+
inputDisabled?: boolean;
|
|
548
|
+
helperText?: string;
|
|
549
|
+
sx?: SxProps;
|
|
550
|
+
ariaLabel?: string;
|
|
551
|
+
}) => React$1.JSX.Element>;
|
|
552
|
+
|
|
543
553
|
declare const ControlFormLabel: (props: FormLabelProps) => React$1.JSX.Element;
|
|
544
554
|
|
|
545
555
|
declare const DisplayConditionsControl: ControlComponent$1<() => React$1.JSX.Element>;
|
|
@@ -861,4 +871,4 @@ declare function useTypingBuffer(options?: UseTypingBufferOptions): {
|
|
|
861
871
|
startsWith: (haystack: string, needle: string) => boolean;
|
|
862
872
|
};
|
|
863
873
|
|
|
864
|
-
export { type AdornmentComponent, type AngleUnit$1 as AngleUnit, AspectRatioControl, AttachmentTypeControl, AttributesControl, BackgroundControl, BoxShadowRepeaterControl, ChipsControl, ClearIconButton, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent$1 as ControlComponent, ControlFormLabel, type ControlReplacement, ControlReplacementsProvider, ControlToggleButtonGroup, DateRangeControl, DateTimeControl, DisplayConditionsControl, EmailFormActionControl, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, type FontCategory, FontFamilyControl, GapControl, HtmlTagControl, ImageControl, InlineEditingControl, InlineEditor, InlineEditorToolbar, type InlineEditorToolbarProps, ItemSelector, type ItemsActionPayload, KeyValueControl, type LengthUnit$1 as LengthUnit, LinkControl, LinkedDimensionsControl, MentionTextAreaControl, NumberControl, NumberInput, PopoverContent, PopoverGridContainer, PositionControl, type PromotionTrackingData, PromotionTrigger, type PromotionTriggerRef, PropKeyProvider, PropProvider, type PropProviderProps, QueryChipsControl, QueryControl, RepeatableControl, Repeater, type RepeaterItem, SelectControl, SelectControlWrapper, type SetRepeaterValuesMeta, type SetValue, type SetValueMeta, SizeComponent, SizeControl, StrokeControl, StyledToggleButton, StyledToggleButtonGroup, SvgMediaControl, SwitchControl, TextAreaControl, TextControl, TimeRangeControl, TimeStringControl, type TimeUnit$1 as TimeUnit, type ToggleButtonGroupItem, ToggleButtonGroupUi, ToggleControl, type ToggleControlProps, TransformRepeaterControl, TransformSettingsControl, TransitionRepeaterControl, type Unit$1 as Unit, UnstableSizeControl, UnstableSizeField, UrlControl, type UseTypingBufferOptions, type V4PromotionData, type V4PromotionKey, VideoMediaControl, createControl, createControlReplacementsRegistry, enqueueFont, getControlReplacements, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, isUnitExtendedOption, registerControlReplacement, trackUpgradePromotionClick, trackViewPromotion, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useControlReplacement, useFontFamilies, useSyncExternalState, useTypingBuffer };
|
|
874
|
+
export { type AdornmentComponent, type AngleUnit$1 as AngleUnit, AspectRatioControl, AttachmentTypeControl, AttributesControl, BackgroundControl, BoxShadowRepeaterControl, ChipsControl, ClearIconButton, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent$1 as ControlComponent, ControlFormLabel, type ControlReplacement, ControlReplacementsProvider, ControlToggleButtonGroup, DateRangeControl, DateTimeControl, DisplayConditionsControl, EmailFormActionControl, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, type FontCategory, FontFamilyControl, GapControl, GridSpanControl, HtmlTagControl, ImageControl, InlineEditingControl, InlineEditor, InlineEditorToolbar, type InlineEditorToolbarProps, ItemSelector, type ItemsActionPayload, KeyValueControl, type LengthUnit$1 as LengthUnit, LinkControl, LinkedDimensionsControl, MentionTextAreaControl, NumberControl, NumberInput, PopoverContent, PopoverGridContainer, PositionControl, type PromotionTrackingData, PromotionTrigger, type PromotionTriggerRef, PropKeyProvider, PropProvider, type PropProviderProps, QueryChipsControl, QueryControl, RepeatableControl, Repeater, type RepeaterItem, SelectControl, SelectControlWrapper, type SetRepeaterValuesMeta, type SetValue, type SetValueMeta, SizeComponent, SizeControl, StrokeControl, StyledToggleButton, StyledToggleButtonGroup, SvgMediaControl, SwitchControl, TextAreaControl, TextControl, TimeRangeControl, TimeStringControl, type TimeUnit$1 as TimeUnit, type ToggleButtonGroupItem, ToggleButtonGroupUi, ToggleControl, type ToggleControlProps, TransformRepeaterControl, TransformSettingsControl, TransitionRepeaterControl, type Unit$1 as Unit, UnstableSizeControl, UnstableSizeField, UrlControl, type UseTypingBufferOptions, type V4PromotionData, type V4PromotionKey, VideoMediaControl, createControl, createControlReplacementsRegistry, enqueueFont, getControlReplacements, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, isUnitExtendedOption, registerControlReplacement, trackUpgradePromotionClick, trackViewPromotion, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useControlReplacement, useFontFamilies, useSyncExternalState, useTypingBuffer };
|
package/dist/index.d.ts
CHANGED
|
@@ -540,6 +540,16 @@ type Props$3 = {
|
|
|
540
540
|
};
|
|
541
541
|
declare const UnstableSizeControl: ControlComponent$1<({ variant, placeholder: propPlaceholder, anchorRef, startIcon, ariaLabel, min }: Props$3) => React$1.JSX.Element>;
|
|
542
542
|
|
|
543
|
+
declare const GridSpanControl: ControlComponent$1<({ placeholder: propPlaceholder, error, inputValue, inputDisabled, helperText, sx, ariaLabel, }: {
|
|
544
|
+
placeholder?: string;
|
|
545
|
+
error?: boolean;
|
|
546
|
+
inputValue?: string;
|
|
547
|
+
inputDisabled?: boolean;
|
|
548
|
+
helperText?: string;
|
|
549
|
+
sx?: SxProps;
|
|
550
|
+
ariaLabel?: string;
|
|
551
|
+
}) => React$1.JSX.Element>;
|
|
552
|
+
|
|
543
553
|
declare const ControlFormLabel: (props: FormLabelProps) => React$1.JSX.Element;
|
|
544
554
|
|
|
545
555
|
declare const DisplayConditionsControl: ControlComponent$1<() => React$1.JSX.Element>;
|
|
@@ -861,4 +871,4 @@ declare function useTypingBuffer(options?: UseTypingBufferOptions): {
|
|
|
861
871
|
startsWith: (haystack: string, needle: string) => boolean;
|
|
862
872
|
};
|
|
863
873
|
|
|
864
|
-
export { type AdornmentComponent, type AngleUnit$1 as AngleUnit, AspectRatioControl, AttachmentTypeControl, AttributesControl, BackgroundControl, BoxShadowRepeaterControl, ChipsControl, ClearIconButton, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent$1 as ControlComponent, ControlFormLabel, type ControlReplacement, ControlReplacementsProvider, ControlToggleButtonGroup, DateRangeControl, DateTimeControl, DisplayConditionsControl, EmailFormActionControl, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, type FontCategory, FontFamilyControl, GapControl, HtmlTagControl, ImageControl, InlineEditingControl, InlineEditor, InlineEditorToolbar, type InlineEditorToolbarProps, ItemSelector, type ItemsActionPayload, KeyValueControl, type LengthUnit$1 as LengthUnit, LinkControl, LinkedDimensionsControl, MentionTextAreaControl, NumberControl, NumberInput, PopoverContent, PopoverGridContainer, PositionControl, type PromotionTrackingData, PromotionTrigger, type PromotionTriggerRef, PropKeyProvider, PropProvider, type PropProviderProps, QueryChipsControl, QueryControl, RepeatableControl, Repeater, type RepeaterItem, SelectControl, SelectControlWrapper, type SetRepeaterValuesMeta, type SetValue, type SetValueMeta, SizeComponent, SizeControl, StrokeControl, StyledToggleButton, StyledToggleButtonGroup, SvgMediaControl, SwitchControl, TextAreaControl, TextControl, TimeRangeControl, TimeStringControl, type TimeUnit$1 as TimeUnit, type ToggleButtonGroupItem, ToggleButtonGroupUi, ToggleControl, type ToggleControlProps, TransformRepeaterControl, TransformSettingsControl, TransitionRepeaterControl, type Unit$1 as Unit, UnstableSizeControl, UnstableSizeField, UrlControl, type UseTypingBufferOptions, type V4PromotionData, type V4PromotionKey, VideoMediaControl, createControl, createControlReplacementsRegistry, enqueueFont, getControlReplacements, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, isUnitExtendedOption, registerControlReplacement, trackUpgradePromotionClick, trackViewPromotion, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useControlReplacement, useFontFamilies, useSyncExternalState, useTypingBuffer };
|
|
874
|
+
export { type AdornmentComponent, type AngleUnit$1 as AngleUnit, AspectRatioControl, AttachmentTypeControl, AttributesControl, BackgroundControl, BoxShadowRepeaterControl, ChipsControl, ClearIconButton, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent$1 as ControlComponent, ControlFormLabel, type ControlReplacement, ControlReplacementsProvider, ControlToggleButtonGroup, DateRangeControl, DateTimeControl, DisplayConditionsControl, EmailFormActionControl, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, type FontCategory, FontFamilyControl, GapControl, GridSpanControl, HtmlTagControl, ImageControl, InlineEditingControl, InlineEditor, InlineEditorToolbar, type InlineEditorToolbarProps, ItemSelector, type ItemsActionPayload, KeyValueControl, type LengthUnit$1 as LengthUnit, LinkControl, LinkedDimensionsControl, MentionTextAreaControl, NumberControl, NumberInput, PopoverContent, PopoverGridContainer, PositionControl, type PromotionTrackingData, PromotionTrigger, type PromotionTriggerRef, PropKeyProvider, PropProvider, type PropProviderProps, QueryChipsControl, QueryControl, RepeatableControl, Repeater, type RepeaterItem, SelectControl, SelectControlWrapper, type SetRepeaterValuesMeta, type SetValue, type SetValueMeta, SizeComponent, SizeControl, StrokeControl, StyledToggleButton, StyledToggleButtonGroup, SvgMediaControl, SwitchControl, TextAreaControl, TextControl, TimeRangeControl, TimeStringControl, type TimeUnit$1 as TimeUnit, type ToggleButtonGroupItem, ToggleButtonGroupUi, ToggleControl, type ToggleControlProps, TransformRepeaterControl, TransformSettingsControl, TransitionRepeaterControl, type Unit$1 as Unit, UnstableSizeControl, UnstableSizeField, UrlControl, type UseTypingBufferOptions, type V4PromotionData, type V4PromotionKey, VideoMediaControl, createControl, createControlReplacementsRegistry, enqueueFont, getControlReplacements, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, isUnitExtendedOption, registerControlReplacement, trackUpgradePromotionClick, trackViewPromotion, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useControlReplacement, useFontFamilies, useSyncExternalState, useTypingBuffer };
|
package/dist/index.js
CHANGED
|
@@ -52,6 +52,7 @@ __export(index_exports, {
|
|
|
52
52
|
FilterRepeaterControl: () => FilterRepeaterControl,
|
|
53
53
|
FontFamilyControl: () => FontFamilyControl,
|
|
54
54
|
GapControl: () => GapControl,
|
|
55
|
+
GridSpanControl: () => GridSpanControl,
|
|
55
56
|
HtmlTagControl: () => HtmlTagControl,
|
|
56
57
|
ImageControl: () => ImageControl,
|
|
57
58
|
InlineEditingControl: () => InlineEditingControl,
|
|
@@ -8145,18 +8146,55 @@ var AttachmentTypeControl = createControl(({ label, options }) => {
|
|
|
8145
8146
|
))));
|
|
8146
8147
|
});
|
|
8147
8148
|
|
|
8149
|
+
// src/controls/grid-span-control.tsx
|
|
8150
|
+
var React117 = __toESM(require("react"));
|
|
8151
|
+
var import_editor_props65 = require("@elementor/editor-props");
|
|
8152
|
+
var import_ui101 = require("@elementor/ui");
|
|
8153
|
+
var GridSpanControl = createControl(
|
|
8154
|
+
({
|
|
8155
|
+
placeholder: propPlaceholder,
|
|
8156
|
+
error,
|
|
8157
|
+
inputValue,
|
|
8158
|
+
inputDisabled,
|
|
8159
|
+
helperText,
|
|
8160
|
+
sx,
|
|
8161
|
+
ariaLabel
|
|
8162
|
+
}) => {
|
|
8163
|
+
const { value, setValue, disabled, placeholder: boundPlaceholder } = useBoundProp(import_editor_props65.spanPropTypeUtil);
|
|
8164
|
+
const handleChange = (event) => setValue(event.target.value);
|
|
8165
|
+
const placeholder = propPlaceholder ?? boundPlaceholder ?? void 0;
|
|
8166
|
+
return /* @__PURE__ */ React117.createElement(ControlActions, null, /* @__PURE__ */ React117.createElement(
|
|
8167
|
+
import_ui101.TextField,
|
|
8168
|
+
{
|
|
8169
|
+
size: "tiny",
|
|
8170
|
+
fullWidth: true,
|
|
8171
|
+
disabled: inputDisabled ?? disabled,
|
|
8172
|
+
value: inputValue ?? value ?? "",
|
|
8173
|
+
onChange: handleChange,
|
|
8174
|
+
placeholder,
|
|
8175
|
+
error,
|
|
8176
|
+
helperText,
|
|
8177
|
+
sx,
|
|
8178
|
+
inputProps: {
|
|
8179
|
+
...ariaLabel ? { "aria-label": ariaLabel } : {}
|
|
8180
|
+
}
|
|
8181
|
+
}
|
|
8182
|
+
));
|
|
8183
|
+
}
|
|
8184
|
+
);
|
|
8185
|
+
|
|
8148
8186
|
// src/components/promotions/display-conditions-control.tsx
|
|
8149
|
-
var
|
|
8187
|
+
var React119 = __toESM(require("react"));
|
|
8150
8188
|
var import_react69 = require("react");
|
|
8151
8189
|
var import_icons36 = require("@elementor/icons");
|
|
8152
|
-
var
|
|
8190
|
+
var import_ui103 = require("@elementor/ui");
|
|
8153
8191
|
var import_i18n58 = require("@wordpress/i18n");
|
|
8154
8192
|
|
|
8155
8193
|
// src/components/promotions/promotion-trigger.tsx
|
|
8156
|
-
var
|
|
8194
|
+
var React118 = __toESM(require("react"));
|
|
8157
8195
|
var import_react68 = require("react");
|
|
8158
8196
|
var import_editor_ui17 = require("@elementor/editor-ui");
|
|
8159
|
-
var
|
|
8197
|
+
var import_ui102 = require("@elementor/ui");
|
|
8160
8198
|
function getV4Promotion(key) {
|
|
8161
8199
|
return window.elementor?.config?.v4Promotions?.[key];
|
|
8162
8200
|
}
|
|
@@ -8173,7 +8211,7 @@ var PromotionTrigger = (0, import_react68.forwardRef)(
|
|
|
8173
8211
|
});
|
|
8174
8212
|
}, [trackingData]);
|
|
8175
8213
|
(0, import_react68.useImperativeHandle)(ref, () => ({ toggle }), [toggle]);
|
|
8176
|
-
return /* @__PURE__ */
|
|
8214
|
+
return /* @__PURE__ */ React118.createElement(React118.Fragment, null, promotion && /* @__PURE__ */ React118.createElement(
|
|
8177
8215
|
import_editor_ui17.PromotionInfotip,
|
|
8178
8216
|
{
|
|
8179
8217
|
title: promotion.title,
|
|
@@ -8187,8 +8225,8 @@ var PromotionTrigger = (0, import_react68.forwardRef)(
|
|
|
8187
8225
|
},
|
|
8188
8226
|
onCtaClick: () => trackUpgradePromotionClick(trackingData)
|
|
8189
8227
|
},
|
|
8190
|
-
/* @__PURE__ */
|
|
8191
|
-
|
|
8228
|
+
/* @__PURE__ */ React118.createElement(
|
|
8229
|
+
import_ui102.Box,
|
|
8192
8230
|
{
|
|
8193
8231
|
onClick: (e) => {
|
|
8194
8232
|
e.stopPropagation();
|
|
@@ -8196,7 +8234,7 @@ var PromotionTrigger = (0, import_react68.forwardRef)(
|
|
|
8196
8234
|
},
|
|
8197
8235
|
sx: { cursor: "pointer", display: "inline-flex" }
|
|
8198
8236
|
},
|
|
8199
|
-
children ?? /* @__PURE__ */
|
|
8237
|
+
children ?? /* @__PURE__ */ React118.createElement(import_editor_ui17.PromotionChip, null)
|
|
8200
8238
|
)
|
|
8201
8239
|
));
|
|
8202
8240
|
}
|
|
@@ -8207,8 +8245,8 @@ var ARIA_LABEL = (0, import_i18n58.__)("Display Conditions", "elementor");
|
|
|
8207
8245
|
var TRACKING_DATA = { target_name: "display_conditions", location_l2: "general" };
|
|
8208
8246
|
var DisplayConditionsControl = createControl(() => {
|
|
8209
8247
|
const triggerRef = (0, import_react69.useRef)(null);
|
|
8210
|
-
return /* @__PURE__ */
|
|
8211
|
-
|
|
8248
|
+
return /* @__PURE__ */ React119.createElement(
|
|
8249
|
+
import_ui103.Stack,
|
|
8212
8250
|
{
|
|
8213
8251
|
direction: "row",
|
|
8214
8252
|
spacing: 2,
|
|
@@ -8217,9 +8255,9 @@ var DisplayConditionsControl = createControl(() => {
|
|
|
8217
8255
|
alignItems: "center"
|
|
8218
8256
|
}
|
|
8219
8257
|
},
|
|
8220
|
-
/* @__PURE__ */
|
|
8221
|
-
/* @__PURE__ */
|
|
8222
|
-
|
|
8258
|
+
/* @__PURE__ */ React119.createElement(PromotionTrigger, { ref: triggerRef, promotionKey: "displayConditions", trackingData: TRACKING_DATA }),
|
|
8259
|
+
/* @__PURE__ */ React119.createElement(import_ui103.Tooltip, { title: ARIA_LABEL, placement: "top" }, /* @__PURE__ */ React119.createElement(
|
|
8260
|
+
import_ui103.IconButton,
|
|
8223
8261
|
{
|
|
8224
8262
|
size: "tiny",
|
|
8225
8263
|
"aria-label": ARIA_LABEL,
|
|
@@ -8231,23 +8269,23 @@ var DisplayConditionsControl = createControl(() => {
|
|
|
8231
8269
|
borderRadius: 1
|
|
8232
8270
|
}
|
|
8233
8271
|
},
|
|
8234
|
-
/* @__PURE__ */
|
|
8272
|
+
/* @__PURE__ */ React119.createElement(import_icons36.SitemapIcon, { fontSize: "tiny", color: "disabled" })
|
|
8235
8273
|
))
|
|
8236
8274
|
);
|
|
8237
8275
|
});
|
|
8238
8276
|
|
|
8239
8277
|
// src/components/promotions/attributes-control.tsx
|
|
8240
|
-
var
|
|
8278
|
+
var React120 = __toESM(require("react"));
|
|
8241
8279
|
var import_react70 = require("react");
|
|
8242
8280
|
var import_icons37 = require("@elementor/icons");
|
|
8243
|
-
var
|
|
8281
|
+
var import_ui104 = require("@elementor/ui");
|
|
8244
8282
|
var import_i18n59 = require("@wordpress/i18n");
|
|
8245
8283
|
var ARIA_LABEL2 = (0, import_i18n59.__)("Attributes", "elementor");
|
|
8246
8284
|
var TRACKING_DATA2 = { target_name: "attributes", location_l2: "general" };
|
|
8247
8285
|
var AttributesControl = createControl(() => {
|
|
8248
8286
|
const triggerRef = (0, import_react70.useRef)(null);
|
|
8249
|
-
return /* @__PURE__ */
|
|
8250
|
-
|
|
8287
|
+
return /* @__PURE__ */ React120.createElement(
|
|
8288
|
+
import_ui104.Stack,
|
|
8251
8289
|
{
|
|
8252
8290
|
direction: "row",
|
|
8253
8291
|
spacing: 2,
|
|
@@ -8256,8 +8294,8 @@ var AttributesControl = createControl(() => {
|
|
|
8256
8294
|
alignItems: "center"
|
|
8257
8295
|
}
|
|
8258
8296
|
},
|
|
8259
|
-
/* @__PURE__ */
|
|
8260
|
-
/* @__PURE__ */
|
|
8297
|
+
/* @__PURE__ */ React120.createElement(PromotionTrigger, { ref: triggerRef, promotionKey: "attributes", trackingData: TRACKING_DATA2 }),
|
|
8298
|
+
/* @__PURE__ */ React120.createElement(import_ui104.Tooltip, { title: ARIA_LABEL2, placement: "top" }, /* @__PURE__ */ React120.createElement(
|
|
8261
8299
|
import_icons37.PlusIcon,
|
|
8262
8300
|
{
|
|
8263
8301
|
"aria-label": ARIA_LABEL2,
|
|
@@ -8271,20 +8309,20 @@ var AttributesControl = createControl(() => {
|
|
|
8271
8309
|
});
|
|
8272
8310
|
|
|
8273
8311
|
// src/components/icon-buttons/clear-icon-button.tsx
|
|
8274
|
-
var
|
|
8312
|
+
var React121 = __toESM(require("react"));
|
|
8275
8313
|
var import_icons38 = require("@elementor/icons");
|
|
8276
|
-
var
|
|
8277
|
-
var CustomIconButton = (0,
|
|
8314
|
+
var import_ui105 = require("@elementor/ui");
|
|
8315
|
+
var CustomIconButton = (0, import_ui105.styled)(import_ui105.IconButton)(({ theme }) => ({
|
|
8278
8316
|
width: theme.spacing(2.5),
|
|
8279
8317
|
height: theme.spacing(2.5)
|
|
8280
8318
|
}));
|
|
8281
|
-
var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */
|
|
8319
|
+
var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */ React121.createElement(import_ui105.Tooltip, { title: tooltipText, placement: "top", disableInteractive: true }, /* @__PURE__ */ React121.createElement(CustomIconButton, { "aria-label": tooltipText, size, onClick, disabled }, /* @__PURE__ */ React121.createElement(import_icons38.BrushBigIcon, { fontSize: size })));
|
|
8282
8320
|
|
|
8283
8321
|
// src/components/repeater/repeater.tsx
|
|
8284
|
-
var
|
|
8322
|
+
var React122 = __toESM(require("react"));
|
|
8285
8323
|
var import_react71 = require("react");
|
|
8286
8324
|
var import_icons39 = require("@elementor/icons");
|
|
8287
|
-
var
|
|
8325
|
+
var import_ui106 = require("@elementor/ui");
|
|
8288
8326
|
var import_i18n60 = require("@wordpress/i18n");
|
|
8289
8327
|
var SIZE12 = "tiny";
|
|
8290
8328
|
var EMPTY_OPEN_ITEM2 = -1;
|
|
@@ -8366,8 +8404,8 @@ var Repeater3 = ({
|
|
|
8366
8404
|
};
|
|
8367
8405
|
const isButtonDisabled = disabled || disableAddItemButton;
|
|
8368
8406
|
const shouldShowInfotip = isButtonDisabled && addButtonInfotipContent;
|
|
8369
|
-
const addButton = /* @__PURE__ */
|
|
8370
|
-
|
|
8407
|
+
const addButton = /* @__PURE__ */ React122.createElement(
|
|
8408
|
+
import_ui106.IconButton,
|
|
8371
8409
|
{
|
|
8372
8410
|
size: SIZE12,
|
|
8373
8411
|
sx: {
|
|
@@ -8377,30 +8415,30 @@ var Repeater3 = ({
|
|
|
8377
8415
|
onClick: addRepeaterItem,
|
|
8378
8416
|
"aria-label": (0, import_i18n60.__)("Add item", "elementor")
|
|
8379
8417
|
},
|
|
8380
|
-
/* @__PURE__ */
|
|
8418
|
+
/* @__PURE__ */ React122.createElement(import_icons39.PlusIcon, { fontSize: SIZE12 })
|
|
8381
8419
|
);
|
|
8382
|
-
return /* @__PURE__ */
|
|
8383
|
-
|
|
8420
|
+
return /* @__PURE__ */ React122.createElement(SectionContent, { gap: 2 }, /* @__PURE__ */ React122.createElement(RepeaterHeader, { label, adornment: ControlAdornments }, shouldShowInfotip ? /* @__PURE__ */ React122.createElement(
|
|
8421
|
+
import_ui106.Infotip,
|
|
8384
8422
|
{
|
|
8385
8423
|
placement: "right",
|
|
8386
8424
|
content: addButtonInfotipContent,
|
|
8387
8425
|
color: "secondary",
|
|
8388
8426
|
slotProps: { popper: { sx: { width: 300 } } }
|
|
8389
8427
|
},
|
|
8390
|
-
/* @__PURE__ */
|
|
8391
|
-
) : addButton), 0 < uniqueKeys.length && /* @__PURE__ */
|
|
8428
|
+
/* @__PURE__ */ React122.createElement(import_ui106.Box, { sx: { ...isButtonDisabled ? { cursor: "not-allowed" } : {} } }, addButton)
|
|
8429
|
+
) : addButton), 0 < uniqueKeys.length && /* @__PURE__ */ React122.createElement(SortableProvider, { value: uniqueKeys, onChange: onChangeOrder }, uniqueKeys.map((key) => {
|
|
8392
8430
|
const index = uniqueKeys.indexOf(key);
|
|
8393
8431
|
const value = items2[index];
|
|
8394
8432
|
if (!value) {
|
|
8395
8433
|
return null;
|
|
8396
8434
|
}
|
|
8397
|
-
return /* @__PURE__ */
|
|
8435
|
+
return /* @__PURE__ */ React122.createElement(SortableItem, { id: key, key: `sortable-${key}`, disabled: !isSortable }, /* @__PURE__ */ React122.createElement(
|
|
8398
8436
|
RepeaterItem,
|
|
8399
8437
|
{
|
|
8400
8438
|
disabled,
|
|
8401
8439
|
propDisabled: value?.disabled,
|
|
8402
|
-
label: /* @__PURE__ */
|
|
8403
|
-
startIcon: /* @__PURE__ */
|
|
8440
|
+
label: /* @__PURE__ */ React122.createElement(RepeaterItemLabelSlot, { value }, /* @__PURE__ */ React122.createElement(itemSettings.Label, { value, index })),
|
|
8441
|
+
startIcon: /* @__PURE__ */ React122.createElement(RepeaterItemIconSlot, { value }, /* @__PURE__ */ React122.createElement(itemSettings.Icon, { value })),
|
|
8404
8442
|
removeItem: () => removeRepeaterItem(index),
|
|
8405
8443
|
duplicateItem: () => duplicateRepeaterItem(index),
|
|
8406
8444
|
toggleDisableItem: () => toggleDisableRepeaterItem(index),
|
|
@@ -8414,7 +8452,7 @@ var Repeater3 = ({
|
|
|
8414
8452
|
actions: itemSettings.actions,
|
|
8415
8453
|
value
|
|
8416
8454
|
},
|
|
8417
|
-
(props) => /* @__PURE__ */
|
|
8455
|
+
(props) => /* @__PURE__ */ React122.createElement(
|
|
8418
8456
|
itemSettings.Content,
|
|
8419
8457
|
{
|
|
8420
8458
|
...props,
|
|
@@ -8454,12 +8492,12 @@ var RepeaterItem = ({
|
|
|
8454
8492
|
},
|
|
8455
8493
|
wrappedOnPopoverClose
|
|
8456
8494
|
);
|
|
8457
|
-
const triggerProps = (0,
|
|
8495
|
+
const triggerProps = (0, import_ui106.bindTrigger)(popoverState);
|
|
8458
8496
|
usePopoverDismiss({ isOpen: popoverState.isOpen, onClose: popoverProps.onClose });
|
|
8459
8497
|
const duplicateLabel = (0, import_i18n60.__)("Duplicate", "elementor");
|
|
8460
8498
|
const toggleLabel = propDisabled ? (0, import_i18n60.__)("Show", "elementor") : (0, import_i18n60.__)("Hide", "elementor");
|
|
8461
8499
|
const removeLabel = (0, import_i18n60.__)("Remove", "elementor");
|
|
8462
|
-
return /* @__PURE__ */
|
|
8500
|
+
return /* @__PURE__ */ React122.createElement(import_ui106.Box, { sx: { display: "contents" } }, /* @__PURE__ */ React122.createElement(
|
|
8463
8501
|
RepeaterTag,
|
|
8464
8502
|
{
|
|
8465
8503
|
disabled,
|
|
@@ -8474,14 +8512,14 @@ var RepeaterItem = ({
|
|
|
8474
8512
|
}
|
|
8475
8513
|
},
|
|
8476
8514
|
startIcon,
|
|
8477
|
-
actions: /* @__PURE__ */
|
|
8515
|
+
actions: /* @__PURE__ */ React122.createElement(React122.Fragment, null, showDuplicate && /* @__PURE__ */ React122.createElement(import_ui106.Tooltip, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React122.createElement(import_ui106.IconButton, { size: SIZE12, onClick: duplicateItem, "aria-label": duplicateLabel }, /* @__PURE__ */ React122.createElement(import_icons39.CopyIcon, { fontSize: SIZE12 }))), showToggle && /* @__PURE__ */ React122.createElement(import_ui106.Tooltip, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React122.createElement(import_ui106.IconButton, { size: SIZE12, onClick: toggleDisableItem, "aria-label": toggleLabel }, propDisabled ? /* @__PURE__ */ React122.createElement(import_icons39.EyeOffIcon, { fontSize: SIZE12 }) : /* @__PURE__ */ React122.createElement(import_icons39.EyeIcon, { fontSize: SIZE12 }))), actions?.(value), showRemove && /* @__PURE__ */ React122.createElement(import_ui106.Tooltip, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React122.createElement(import_ui106.IconButton, { size: SIZE12, onClick: removeItem, "aria-label": removeLabel }, /* @__PURE__ */ React122.createElement(import_icons39.XIcon, { fontSize: SIZE12 }))))
|
|
8478
8516
|
}
|
|
8479
|
-
), /* @__PURE__ */
|
|
8517
|
+
), /* @__PURE__ */ React122.createElement(RepeaterPopover, { width: ref?.getBoundingClientRect().width, ...popoverProps, anchorEl: ref }, /* @__PURE__ */ React122.createElement(import_ui106.Box, null, children({ anchorEl: ref }))));
|
|
8480
8518
|
};
|
|
8481
8519
|
var usePopover = (openOnMount, onOpen, onPopoverClose) => {
|
|
8482
8520
|
const [ref, setRef] = (0, import_react71.useState)(null);
|
|
8483
|
-
const popoverState = (0,
|
|
8484
|
-
const popoverProps = (0,
|
|
8521
|
+
const popoverState = (0, import_ui106.usePopupState)({ variant: "popover" });
|
|
8522
|
+
const popoverProps = (0, import_ui106.bindPopover)(popoverState);
|
|
8485
8523
|
(0, import_react71.useEffect)(() => {
|
|
8486
8524
|
if (openOnMount && ref) {
|
|
8487
8525
|
popoverState.open(ref);
|
|
@@ -8501,19 +8539,19 @@ var usePopover = (openOnMount, onOpen, onPopoverClose) => {
|
|
|
8501
8539
|
};
|
|
8502
8540
|
|
|
8503
8541
|
// src/components/inline-editor-toolbar.tsx
|
|
8504
|
-
var
|
|
8542
|
+
var React124 = __toESM(require("react"));
|
|
8505
8543
|
var import_react73 = require("react");
|
|
8506
8544
|
var import_editor_elements7 = require("@elementor/editor-elements");
|
|
8507
8545
|
var import_icons41 = require("@elementor/icons");
|
|
8508
|
-
var
|
|
8546
|
+
var import_ui108 = require("@elementor/ui");
|
|
8509
8547
|
var import_react74 = require("@tiptap/react");
|
|
8510
8548
|
var import_i18n62 = require("@wordpress/i18n");
|
|
8511
8549
|
|
|
8512
8550
|
// src/components/url-popover.tsx
|
|
8513
|
-
var
|
|
8551
|
+
var React123 = __toESM(require("react"));
|
|
8514
8552
|
var import_react72 = require("react");
|
|
8515
8553
|
var import_icons40 = require("@elementor/icons");
|
|
8516
|
-
var
|
|
8554
|
+
var import_ui107 = require("@elementor/ui");
|
|
8517
8555
|
var import_i18n61 = require("@wordpress/i18n");
|
|
8518
8556
|
var UrlPopover = ({
|
|
8519
8557
|
popupState,
|
|
@@ -8534,19 +8572,19 @@ var UrlPopover = ({
|
|
|
8534
8572
|
restoreValue();
|
|
8535
8573
|
popupState.close();
|
|
8536
8574
|
};
|
|
8537
|
-
return /* @__PURE__ */
|
|
8538
|
-
|
|
8575
|
+
return /* @__PURE__ */ React123.createElement(
|
|
8576
|
+
import_ui107.Popover,
|
|
8539
8577
|
{
|
|
8540
8578
|
slotProps: {
|
|
8541
8579
|
paper: { sx: { borderRadius: "16px", width: anchorRef.current?.offsetWidth + "px", marginTop: -1 } }
|
|
8542
8580
|
},
|
|
8543
|
-
...(0,
|
|
8581
|
+
...(0, import_ui107.bindPopover)(popupState),
|
|
8544
8582
|
anchorOrigin: { vertical: "top", horizontal: "left" },
|
|
8545
8583
|
transformOrigin: { vertical: "top", horizontal: "left" },
|
|
8546
8584
|
onClose: handleClose
|
|
8547
8585
|
},
|
|
8548
|
-
/* @__PURE__ */
|
|
8549
|
-
|
|
8586
|
+
/* @__PURE__ */ React123.createElement(import_ui107.Stack, { direction: "row", alignItems: "center", gap: 1, sx: { p: 1.5 } }, /* @__PURE__ */ React123.createElement(
|
|
8587
|
+
import_ui107.TextField,
|
|
8550
8588
|
{
|
|
8551
8589
|
value,
|
|
8552
8590
|
onChange,
|
|
@@ -8558,8 +8596,8 @@ var UrlPopover = ({
|
|
|
8558
8596
|
InputProps: { sx: { borderRadius: "8px" } },
|
|
8559
8597
|
onKeyUp: (event) => event.key === "Enter" && handleClose()
|
|
8560
8598
|
}
|
|
8561
|
-
), /* @__PURE__ */
|
|
8562
|
-
|
|
8599
|
+
), /* @__PURE__ */ React123.createElement(import_ui107.Tooltip, { title: (0, import_i18n61.__)("Open in a new tab", "elementor") }, /* @__PURE__ */ React123.createElement(
|
|
8600
|
+
import_ui107.ToggleButton,
|
|
8563
8601
|
{
|
|
8564
8602
|
size: "tiny",
|
|
8565
8603
|
value: "newTab",
|
|
@@ -8568,7 +8606,7 @@ var UrlPopover = ({
|
|
|
8568
8606
|
"aria-label": (0, import_i18n61.__)("Open in a new tab", "elementor"),
|
|
8569
8607
|
sx: { borderRadius: "8px" }
|
|
8570
8608
|
},
|
|
8571
|
-
/* @__PURE__ */
|
|
8609
|
+
/* @__PURE__ */ React123.createElement(import_icons40.ExternalLinkIcon, { fontSize: "tiny" })
|
|
8572
8610
|
)))
|
|
8573
8611
|
);
|
|
8574
8612
|
};
|
|
@@ -8578,7 +8616,7 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
|
8578
8616
|
const [urlValue, setUrlValue] = (0, import_react73.useState)("");
|
|
8579
8617
|
const [openInNewTab, setOpenInNewTab] = (0, import_react73.useState)(false);
|
|
8580
8618
|
const toolbarRef = (0, import_react73.useRef)(null);
|
|
8581
|
-
const linkPopupState = (0,
|
|
8619
|
+
const linkPopupState = (0, import_ui108.usePopupState)({ variant: "popover" });
|
|
8582
8620
|
const isElementClickable = elementId ? checkIfElementIsClickable(elementId) : false;
|
|
8583
8621
|
const editorState = (0, import_react74.useEditorState)({
|
|
8584
8622
|
editor,
|
|
@@ -8624,8 +8662,8 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
|
8624
8662
|
(0, import_react73.useEffect)(() => {
|
|
8625
8663
|
editor?.commands?.focus();
|
|
8626
8664
|
}, [editor]);
|
|
8627
|
-
return /* @__PURE__ */
|
|
8628
|
-
|
|
8665
|
+
return /* @__PURE__ */ React124.createElement(
|
|
8666
|
+
import_ui108.Box,
|
|
8629
8667
|
{
|
|
8630
8668
|
ref: toolbarRef,
|
|
8631
8669
|
sx: {
|
|
@@ -8641,9 +8679,9 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
|
8641
8679
|
...sx
|
|
8642
8680
|
}
|
|
8643
8681
|
},
|
|
8644
|
-
/* @__PURE__ */
|
|
8645
|
-
/* @__PURE__ */
|
|
8646
|
-
|
|
8682
|
+
/* @__PURE__ */ React124.createElement(import_ui108.Tooltip, { title: clearButton.label, placement: "top", sx: { borderRadius: "8px" } }, /* @__PURE__ */ React124.createElement(import_ui108.IconButton, { "aria-label": clearButton.label, onClick: () => clearButton.method(editor), size: "tiny" }, clearButton.icon)),
|
|
8683
|
+
/* @__PURE__ */ React124.createElement(
|
|
8684
|
+
import_ui108.ToggleButtonGroup,
|
|
8647
8685
|
{
|
|
8648
8686
|
value: editorState,
|
|
8649
8687
|
size: "tiny",
|
|
@@ -8651,7 +8689,7 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
|
8651
8689
|
display: "flex",
|
|
8652
8690
|
gap: 0.5,
|
|
8653
8691
|
border: "none",
|
|
8654
|
-
[`& .${
|
|
8692
|
+
[`& .${import_ui108.toggleButtonGroupClasses.firstButton}, & .${import_ui108.toggleButtonGroupClasses.middleButton}, & .${import_ui108.toggleButtonGroupClasses.lastButton}`]: {
|
|
8655
8693
|
borderRadius: "8px",
|
|
8656
8694
|
border: "none",
|
|
8657
8695
|
marginLeft: 0,
|
|
@@ -8664,8 +8702,8 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
|
8664
8702
|
}
|
|
8665
8703
|
}
|
|
8666
8704
|
},
|
|
8667
|
-
formatButtonsList.map((button) => /* @__PURE__ */
|
|
8668
|
-
|
|
8705
|
+
formatButtonsList.map((button) => /* @__PURE__ */ React124.createElement(import_ui108.Tooltip, { title: button.label, key: button.action, placement: "top" }, /* @__PURE__ */ React124.createElement(
|
|
8706
|
+
import_ui108.ToggleButton,
|
|
8669
8707
|
{
|
|
8670
8708
|
value: button.action,
|
|
8671
8709
|
"aria-label": button.label,
|
|
@@ -8682,7 +8720,7 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
|
8682
8720
|
button.icon
|
|
8683
8721
|
)))
|
|
8684
8722
|
),
|
|
8685
|
-
/* @__PURE__ */
|
|
8723
|
+
/* @__PURE__ */ React124.createElement(
|
|
8686
8724
|
UrlPopover,
|
|
8687
8725
|
{
|
|
8688
8726
|
popupState: linkPopupState,
|
|
@@ -8706,7 +8744,7 @@ var checkIfElementIsClickable = (elementId) => {
|
|
|
8706
8744
|
var toolbarButtons = {
|
|
8707
8745
|
clear: {
|
|
8708
8746
|
label: (0, import_i18n62.__)("Clear", "elementor"),
|
|
8709
|
-
icon: /* @__PURE__ */
|
|
8747
|
+
icon: /* @__PURE__ */ React124.createElement(import_icons41.MinusIcon, { fontSize: "tiny" }),
|
|
8710
8748
|
action: "clear",
|
|
8711
8749
|
method: (editor) => {
|
|
8712
8750
|
editor.chain().focus().clearNodes().unsetAllMarks().run();
|
|
@@ -8714,7 +8752,7 @@ var toolbarButtons = {
|
|
|
8714
8752
|
},
|
|
8715
8753
|
bold: {
|
|
8716
8754
|
label: (0, import_i18n62.__)("Bold", "elementor"),
|
|
8717
|
-
icon: /* @__PURE__ */
|
|
8755
|
+
icon: /* @__PURE__ */ React124.createElement(import_icons41.BoldIcon, { fontSize: "tiny" }),
|
|
8718
8756
|
action: "bold",
|
|
8719
8757
|
method: (editor) => {
|
|
8720
8758
|
editor.chain().focus().toggleBold().run();
|
|
@@ -8722,7 +8760,7 @@ var toolbarButtons = {
|
|
|
8722
8760
|
},
|
|
8723
8761
|
italic: {
|
|
8724
8762
|
label: (0, import_i18n62.__)("Italic", "elementor"),
|
|
8725
|
-
icon: /* @__PURE__ */
|
|
8763
|
+
icon: /* @__PURE__ */ React124.createElement(import_icons41.ItalicIcon, { fontSize: "tiny" }),
|
|
8726
8764
|
action: "italic",
|
|
8727
8765
|
method: (editor) => {
|
|
8728
8766
|
editor.chain().focus().toggleItalic().run();
|
|
@@ -8730,7 +8768,7 @@ var toolbarButtons = {
|
|
|
8730
8768
|
},
|
|
8731
8769
|
underline: {
|
|
8732
8770
|
label: (0, import_i18n62.__)("Underline", "elementor"),
|
|
8733
|
-
icon: /* @__PURE__ */
|
|
8771
|
+
icon: /* @__PURE__ */ React124.createElement(import_icons41.UnderlineIcon, { fontSize: "tiny" }),
|
|
8734
8772
|
action: "underline",
|
|
8735
8773
|
method: (editor) => {
|
|
8736
8774
|
editor.chain().focus().toggleUnderline().run();
|
|
@@ -8738,7 +8776,7 @@ var toolbarButtons = {
|
|
|
8738
8776
|
},
|
|
8739
8777
|
strike: {
|
|
8740
8778
|
label: (0, import_i18n62.__)("Strikethrough", "elementor"),
|
|
8741
|
-
icon: /* @__PURE__ */
|
|
8779
|
+
icon: /* @__PURE__ */ React124.createElement(import_icons41.StrikethroughIcon, { fontSize: "tiny" }),
|
|
8742
8780
|
action: "strike",
|
|
8743
8781
|
method: (editor) => {
|
|
8744
8782
|
editor.chain().focus().toggleStrike().run();
|
|
@@ -8746,7 +8784,7 @@ var toolbarButtons = {
|
|
|
8746
8784
|
},
|
|
8747
8785
|
superscript: {
|
|
8748
8786
|
label: (0, import_i18n62.__)("Superscript", "elementor"),
|
|
8749
|
-
icon: /* @__PURE__ */
|
|
8787
|
+
icon: /* @__PURE__ */ React124.createElement(import_icons41.SuperscriptIcon, { fontSize: "tiny" }),
|
|
8750
8788
|
action: "superscript",
|
|
8751
8789
|
method: (editor) => {
|
|
8752
8790
|
editor.chain().focus().toggleSuperscript().run();
|
|
@@ -8754,7 +8792,7 @@ var toolbarButtons = {
|
|
|
8754
8792
|
},
|
|
8755
8793
|
subscript: {
|
|
8756
8794
|
label: (0, import_i18n62.__)("Subscript", "elementor"),
|
|
8757
|
-
icon: /* @__PURE__ */
|
|
8795
|
+
icon: /* @__PURE__ */ React124.createElement(import_icons41.SubscriptIcon, { fontSize: "tiny" }),
|
|
8758
8796
|
action: "subscript",
|
|
8759
8797
|
method: (editor) => {
|
|
8760
8798
|
editor.chain().focus().toggleSubscript().run();
|
|
@@ -8762,7 +8800,7 @@ var toolbarButtons = {
|
|
|
8762
8800
|
},
|
|
8763
8801
|
link: {
|
|
8764
8802
|
label: (0, import_i18n62.__)("Link", "elementor"),
|
|
8765
|
-
icon: /* @__PURE__ */
|
|
8803
|
+
icon: /* @__PURE__ */ React124.createElement(import_icons41.LinkIcon, { fontSize: "tiny" }),
|
|
8766
8804
|
action: "link",
|
|
8767
8805
|
method: null
|
|
8768
8806
|
}
|
|
@@ -8771,8 +8809,8 @@ var { clear: clearButton, ...formatButtons } = toolbarButtons;
|
|
|
8771
8809
|
var possibleFormats = Object.keys(formatButtons);
|
|
8772
8810
|
|
|
8773
8811
|
// src/components/size/unstable-size-field.tsx
|
|
8774
|
-
var
|
|
8775
|
-
var
|
|
8812
|
+
var React127 = __toESM(require("react"));
|
|
8813
|
+
var import_ui110 = require("@elementor/ui");
|
|
8776
8814
|
|
|
8777
8815
|
// src/hooks/use-size-value.ts
|
|
8778
8816
|
var DEFAULT_UNIT2 = "px";
|
|
@@ -8814,17 +8852,17 @@ var differsFromExternal = (newState, externalState) => {
|
|
|
8814
8852
|
};
|
|
8815
8853
|
|
|
8816
8854
|
// src/components/size/unit-select.tsx
|
|
8817
|
-
var
|
|
8855
|
+
var React125 = __toESM(require("react"));
|
|
8818
8856
|
var import_react75 = require("react");
|
|
8819
8857
|
var import_editor_ui18 = require("@elementor/editor-ui");
|
|
8820
|
-
var
|
|
8858
|
+
var import_ui109 = require("@elementor/ui");
|
|
8821
8859
|
var menuItemContentStyles2 = {
|
|
8822
8860
|
display: "flex",
|
|
8823
8861
|
flexDirection: "column",
|
|
8824
8862
|
justifyContent: "center"
|
|
8825
8863
|
};
|
|
8826
8864
|
var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
|
|
8827
|
-
const popupState = (0,
|
|
8865
|
+
const popupState = (0, import_ui109.usePopupState)({
|
|
8828
8866
|
variant: "popover",
|
|
8829
8867
|
popupId: (0, import_react75.useId)()
|
|
8830
8868
|
});
|
|
@@ -8832,7 +8870,7 @@ var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
|
|
|
8832
8870
|
onClick(options[index]);
|
|
8833
8871
|
popupState.close();
|
|
8834
8872
|
};
|
|
8835
|
-
return /* @__PURE__ */
|
|
8873
|
+
return /* @__PURE__ */ React125.createElement(React125.Fragment, null, /* @__PURE__ */ React125.createElement(StyledButton3, { isPrimaryColor: showPrimaryColor, size: "small", ...(0, import_ui109.bindTrigger)(popupState) }, value), /* @__PURE__ */ React125.createElement(import_ui109.Menu, { MenuListProps: { dense: true }, ...(0, import_ui109.bindMenu)(popupState) }, options.map((option, index) => /* @__PURE__ */ React125.createElement(
|
|
8836
8874
|
import_editor_ui18.MenuListItem,
|
|
8837
8875
|
{
|
|
8838
8876
|
key: option,
|
|
@@ -8851,7 +8889,7 @@ var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
|
|
|
8851
8889
|
option.toUpperCase()
|
|
8852
8890
|
))));
|
|
8853
8891
|
};
|
|
8854
|
-
var StyledButton3 = (0,
|
|
8892
|
+
var StyledButton3 = (0, import_ui109.styled)(import_ui109.Button, {
|
|
8855
8893
|
shouldForwardProp: (prop) => prop !== "isPrimaryColor"
|
|
8856
8894
|
})(({ isPrimaryColor, theme }) => ({
|
|
8857
8895
|
color: isPrimaryColor ? theme.palette.text.primary : theme.palette.text.tertiary,
|
|
@@ -8861,11 +8899,11 @@ var StyledButton3 = (0, import_ui108.styled)(import_ui108.Button, {
|
|
|
8861
8899
|
}));
|
|
8862
8900
|
|
|
8863
8901
|
// src/components/size/unstable-size-input.tsx
|
|
8864
|
-
var
|
|
8902
|
+
var React126 = __toESM(require("react"));
|
|
8865
8903
|
var import_react76 = require("react");
|
|
8866
8904
|
var UnstableSizeInput = (0, import_react76.forwardRef)(
|
|
8867
8905
|
({ type, value, onChange, onKeyDown, onKeyUp, InputProps, onBlur, focused, disabled }, ref) => {
|
|
8868
|
-
return /* @__PURE__ */
|
|
8906
|
+
return /* @__PURE__ */ React126.createElement(
|
|
8869
8907
|
NumberInput,
|
|
8870
8908
|
{
|
|
8871
8909
|
ref,
|
|
@@ -8903,7 +8941,7 @@ var UnstableSizeField = ({
|
|
|
8903
8941
|
const shouldHighlightUnit2 = () => {
|
|
8904
8942
|
return hasValue(size);
|
|
8905
8943
|
};
|
|
8906
|
-
return /* @__PURE__ */
|
|
8944
|
+
return /* @__PURE__ */ React127.createElement(
|
|
8907
8945
|
UnstableSizeInput,
|
|
8908
8946
|
{
|
|
8909
8947
|
type: "number",
|
|
@@ -8912,8 +8950,8 @@ var UnstableSizeField = ({
|
|
|
8912
8950
|
onChange: (event) => setSize(event.target.value),
|
|
8913
8951
|
InputProps: {
|
|
8914
8952
|
...InputProps,
|
|
8915
|
-
startAdornment: startIcon && /* @__PURE__ */
|
|
8916
|
-
endAdornment: /* @__PURE__ */
|
|
8953
|
+
startAdornment: startIcon && /* @__PURE__ */ React127.createElement(import_ui110.InputAdornment, { position: "start" }, startIcon),
|
|
8954
|
+
endAdornment: /* @__PURE__ */ React127.createElement(import_ui110.InputAdornment, { position: "end" }, /* @__PURE__ */ React127.createElement(
|
|
8917
8955
|
UnitSelect,
|
|
8918
8956
|
{
|
|
8919
8957
|
options: units2,
|
|
@@ -8985,6 +9023,7 @@ var useFontFamilies = () => {
|
|
|
8985
9023
|
FilterRepeaterControl,
|
|
8986
9024
|
FontFamilyControl,
|
|
8987
9025
|
GapControl,
|
|
9026
|
+
GridSpanControl,
|
|
8988
9027
|
HtmlTagControl,
|
|
8989
9028
|
ImageControl,
|
|
8990
9029
|
InlineEditingControl,
|