@elementor/editor-controls 4.0.0-501 → 4.0.0-503
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 +2 -10
- package/dist/index.d.ts +2 -10
- package/dist/index.js +864 -895
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +566 -595
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -15
- package/src/control-actions/control-actions.tsx +1 -1
- package/src/index.ts +0 -2
- package/src/components/floating-bar.tsx +0 -45
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/controls/image-control.tsx
|
|
2
|
-
import * as
|
|
2
|
+
import * as React13 from "react";
|
|
3
3
|
import { imagePropTypeUtil } from "@elementor/editor-props";
|
|
4
4
|
import { Grid, Stack as Stack3 } from "@elementor/ui";
|
|
5
5
|
import { __ as __2 } from "@wordpress/i18n";
|
|
@@ -323,7 +323,7 @@ var formatResponse = (response) => {
|
|
|
323
323
|
};
|
|
324
324
|
|
|
325
325
|
// src/controls/image-media-control.tsx
|
|
326
|
-
import * as
|
|
326
|
+
import * as React11 from "react";
|
|
327
327
|
import { imageSrcPropTypeUtil } from "@elementor/editor-props";
|
|
328
328
|
import { UploadIcon } from "@elementor/icons";
|
|
329
329
|
import { Button, Card, CardMedia, CardOverlay, CircularProgress, Stack as Stack2 } from "@elementor/ui";
|
|
@@ -331,43 +331,16 @@ import { useWpMediaAttachment, useWpMediaFrame } from "@elementor/wp-media";
|
|
|
331
331
|
import { __ } from "@wordpress/i18n";
|
|
332
332
|
|
|
333
333
|
// src/control-actions/control-actions.tsx
|
|
334
|
-
import * as
|
|
335
|
-
|
|
336
|
-
// src/components/floating-bar.tsx
|
|
337
|
-
import * as React9 from "react";
|
|
338
|
-
import { createContext as createContext5, useContext as useContext5, useState as useState2 } from "react";
|
|
339
|
-
import { styled, UnstableFloatingActionBar } from "@elementor/ui";
|
|
340
|
-
var FloatingBarContainer = styled("span")`
|
|
341
|
-
display: contents;
|
|
342
|
-
|
|
343
|
-
.MuiFloatingActionBar-popper:has( .MuiFloatingActionBar-actions:empty ) {
|
|
344
|
-
display: none;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
.MuiFloatingActionBar-popper {
|
|
348
|
-
z-index: 1000;
|
|
349
|
-
}
|
|
350
|
-
`;
|
|
351
|
-
var FloatingActionsContext = createContext5(null);
|
|
352
|
-
function FloatingActionsBar({ actions, children }) {
|
|
353
|
-
const [open, setOpen] = useState2(false);
|
|
354
|
-
return /* @__PURE__ */ React9.createElement(FloatingActionsContext.Provider, { value: { open, setOpen } }, /* @__PURE__ */ React9.createElement(FloatingBarContainer, null, /* @__PURE__ */ React9.createElement(UnstableFloatingActionBar, { actions, open: open || void 0 }, children)));
|
|
355
|
-
}
|
|
356
|
-
function useFloatingActionsBar() {
|
|
357
|
-
const context = useContext5(FloatingActionsContext);
|
|
358
|
-
if (!context) {
|
|
359
|
-
throw new Error("useFloatingActions must be used within a FloatingActionsBar");
|
|
360
|
-
}
|
|
361
|
-
return context;
|
|
362
|
-
}
|
|
334
|
+
import * as React10 from "react";
|
|
335
|
+
import { FloatingActionsBar } from "@elementor/editor-ui";
|
|
363
336
|
|
|
364
337
|
// src/control-actions/control-actions-context.tsx
|
|
365
|
-
import * as
|
|
366
|
-
import { createContext as
|
|
367
|
-
var Context2 =
|
|
368
|
-
var ControlActionsProvider = ({ children, items: items2 }) => /* @__PURE__ */
|
|
338
|
+
import * as React9 from "react";
|
|
339
|
+
import { createContext as createContext5, useContext as useContext5 } from "react";
|
|
340
|
+
var Context2 = createContext5(null);
|
|
341
|
+
var ControlActionsProvider = ({ children, items: items2 }) => /* @__PURE__ */ React9.createElement(Context2.Provider, { value: { items: items2 } }, children);
|
|
369
342
|
var useControlActions = () => {
|
|
370
|
-
const context =
|
|
343
|
+
const context = useContext5(Context2);
|
|
371
344
|
if (!context) {
|
|
372
345
|
throw new Error("useControlActions must be used within a ControlActionsProvider");
|
|
373
346
|
}
|
|
@@ -381,8 +354,8 @@ function ControlActions({ children }) {
|
|
|
381
354
|
if (items2.length === 0 || disabled) {
|
|
382
355
|
return children;
|
|
383
356
|
}
|
|
384
|
-
const menuItems = items2.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */
|
|
385
|
-
return /* @__PURE__ */
|
|
357
|
+
const menuItems = items2.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React10.createElement(MenuItem2, { key: id }));
|
|
358
|
+
return /* @__PURE__ */ React10.createElement(FloatingActionsBar, { actions: menuItems }, children);
|
|
386
359
|
}
|
|
387
360
|
|
|
388
361
|
// src/controls/image-media-control.tsx
|
|
@@ -405,7 +378,7 @@ var ImageMediaControl = createControl(({ mediaTypes = ["image"] }) => {
|
|
|
405
378
|
});
|
|
406
379
|
}
|
|
407
380
|
});
|
|
408
|
-
return /* @__PURE__ */
|
|
381
|
+
return /* @__PURE__ */ React11.createElement(ControlActions, null, /* @__PURE__ */ React11.createElement(Card, { variant: "outlined" }, /* @__PURE__ */ React11.createElement(CardMedia, { image: src, sx: { height: propType.meta.isDynamic ? 134 : 150 } }, isFetching ? /* @__PURE__ */ React11.createElement(Stack2, { justifyContent: "center", alignItems: "center", width: "100%", height: "100%" }, /* @__PURE__ */ React11.createElement(CircularProgress, null)) : /* @__PURE__ */ React11.createElement(React11.Fragment, null)), /* @__PURE__ */ React11.createElement(CardOverlay, null, /* @__PURE__ */ React11.createElement(Stack2, { gap: 1 }, /* @__PURE__ */ React11.createElement(
|
|
409
382
|
Button,
|
|
410
383
|
{
|
|
411
384
|
size: "tiny",
|
|
@@ -414,13 +387,13 @@ var ImageMediaControl = createControl(({ mediaTypes = ["image"] }) => {
|
|
|
414
387
|
onClick: () => open({ mode: "browse" })
|
|
415
388
|
},
|
|
416
389
|
__("Select image", "elementor")
|
|
417
|
-
), /* @__PURE__ */
|
|
390
|
+
), /* @__PURE__ */ React11.createElement(
|
|
418
391
|
Button,
|
|
419
392
|
{
|
|
420
393
|
size: "tiny",
|
|
421
394
|
variant: "text",
|
|
422
395
|
color: "inherit",
|
|
423
|
-
startIcon: /* @__PURE__ */
|
|
396
|
+
startIcon: /* @__PURE__ */ React11.createElement(UploadIcon, null),
|
|
424
397
|
onClick: () => open({ mode: "upload" })
|
|
425
398
|
},
|
|
426
399
|
__("Upload", "elementor")
|
|
@@ -428,7 +401,7 @@ var ImageMediaControl = createControl(({ mediaTypes = ["image"] }) => {
|
|
|
428
401
|
});
|
|
429
402
|
|
|
430
403
|
// src/controls/select-control.tsx
|
|
431
|
-
import * as
|
|
404
|
+
import * as React12 from "react";
|
|
432
405
|
import { stringPropTypeUtil } from "@elementor/editor-props";
|
|
433
406
|
import { MenuListItem } from "@elementor/editor-ui";
|
|
434
407
|
import { Select, Typography } from "@elementor/ui";
|
|
@@ -448,7 +421,7 @@ var SelectControl = createControl(
|
|
|
448
421
|
setValue(newValue);
|
|
449
422
|
};
|
|
450
423
|
const isDisabled = disabled || options.length === 0;
|
|
451
|
-
return /* @__PURE__ */
|
|
424
|
+
return /* @__PURE__ */ React12.createElement(ControlActions, null, /* @__PURE__ */ React12.createElement(
|
|
452
425
|
Select,
|
|
453
426
|
{
|
|
454
427
|
sx: { overflow: "hidden" },
|
|
@@ -462,7 +435,7 @@ var SelectControl = createControl(
|
|
|
462
435
|
if (placeholder) {
|
|
463
436
|
const placeholderOption = findOptionByValue(placeholder);
|
|
464
437
|
const displayText = placeholderOption?.label || placeholder;
|
|
465
|
-
return /* @__PURE__ */
|
|
438
|
+
return /* @__PURE__ */ React12.createElement(Typography, { component: "span", variant: "caption", color: "text.tertiary" }, displayText);
|
|
466
439
|
}
|
|
467
440
|
return "";
|
|
468
441
|
}
|
|
@@ -474,7 +447,7 @@ var SelectControl = createControl(
|
|
|
474
447
|
disabled: isDisabled,
|
|
475
448
|
fullWidth: true
|
|
476
449
|
},
|
|
477
|
-
options.map(({ label, ...props }) => /* @__PURE__ */
|
|
450
|
+
options.map(({ label, ...props }) => /* @__PURE__ */ React12.createElement(MenuListItem, { key: props.value, ...props, value: props.value ?? "" }, label))
|
|
478
451
|
));
|
|
479
452
|
}
|
|
480
453
|
);
|
|
@@ -482,19 +455,19 @@ var SelectControl = createControl(
|
|
|
482
455
|
// src/controls/image-control.tsx
|
|
483
456
|
var ImageControl = createControl(({ sizes, label = __2("Image", "elementor") }) => {
|
|
484
457
|
const propContext = useBoundProp(imagePropTypeUtil);
|
|
485
|
-
return /* @__PURE__ */
|
|
458
|
+
return /* @__PURE__ */ React13.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React13.createElement(Stack3, { gap: 1.5 }, /* @__PURE__ */ React13.createElement(ControlLabel, null, label), /* @__PURE__ */ React13.createElement(ImageSrcControl, null), /* @__PURE__ */ React13.createElement(Grid, { container: true, gap: 1.5, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React13.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React13.createElement(ControlFormLabel, null, __2("Resolution", "elementor"))), /* @__PURE__ */ React13.createElement(Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React13.createElement(ImageSizeControl, { sizes })))));
|
|
486
459
|
});
|
|
487
460
|
var ImageSrcControl = () => {
|
|
488
461
|
const { data: allowSvgUpload } = useUnfilteredFilesUpload();
|
|
489
462
|
const mediaTypes = allowSvgUpload ? ["image", "svg"] : ["image"];
|
|
490
|
-
return /* @__PURE__ */
|
|
463
|
+
return /* @__PURE__ */ React13.createElement(PropKeyProvider, { bind: "src" }, /* @__PURE__ */ React13.createElement(ImageMediaControl, { mediaTypes }));
|
|
491
464
|
};
|
|
492
465
|
var ImageSizeControl = ({ sizes }) => {
|
|
493
|
-
return /* @__PURE__ */
|
|
466
|
+
return /* @__PURE__ */ React13.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React13.createElement(SelectControl, { options: sizes }));
|
|
494
467
|
};
|
|
495
468
|
|
|
496
469
|
// src/controls/text-control.tsx
|
|
497
|
-
import * as
|
|
470
|
+
import * as React14 from "react";
|
|
498
471
|
import { stringPropTypeUtil as stringPropTypeUtil2 } from "@elementor/editor-props";
|
|
499
472
|
import { TextField } from "@elementor/ui";
|
|
500
473
|
var TextControl = createControl(
|
|
@@ -509,7 +482,7 @@ var TextControl = createControl(
|
|
|
509
482
|
}) => {
|
|
510
483
|
const { value, setValue, disabled } = useBoundProp(stringPropTypeUtil2);
|
|
511
484
|
const handleChange = (event) => setValue(event.target.value);
|
|
512
|
-
return /* @__PURE__ */
|
|
485
|
+
return /* @__PURE__ */ React14.createElement(ControlActions, null, /* @__PURE__ */ React14.createElement(
|
|
513
486
|
TextField,
|
|
514
487
|
{
|
|
515
488
|
size: "tiny",
|
|
@@ -530,7 +503,7 @@ var TextControl = createControl(
|
|
|
530
503
|
);
|
|
531
504
|
|
|
532
505
|
// src/controls/text-area-control.tsx
|
|
533
|
-
import * as
|
|
506
|
+
import * as React15 from "react";
|
|
534
507
|
import { stringPropTypeUtil as stringPropTypeUtil3 } from "@elementor/editor-props";
|
|
535
508
|
import { TextField as TextField2 } from "@elementor/ui";
|
|
536
509
|
var TextAreaControl = createControl(({ placeholder, ariaLabel }) => {
|
|
@@ -538,7 +511,7 @@ var TextAreaControl = createControl(({ placeholder, ariaLabel }) => {
|
|
|
538
511
|
const handleChange = (event) => {
|
|
539
512
|
setValue(event.target.value);
|
|
540
513
|
};
|
|
541
|
-
return /* @__PURE__ */
|
|
514
|
+
return /* @__PURE__ */ React15.createElement(ControlActions, null, /* @__PURE__ */ React15.createElement(
|
|
542
515
|
TextField2,
|
|
543
516
|
{
|
|
544
517
|
size: "tiny",
|
|
@@ -557,14 +530,14 @@ var TextAreaControl = createControl(({ placeholder, ariaLabel }) => {
|
|
|
557
530
|
});
|
|
558
531
|
|
|
559
532
|
// src/controls/size-control.tsx
|
|
560
|
-
import * as
|
|
533
|
+
import * as React20 from "react";
|
|
561
534
|
import { useEffect as useEffect3, useMemo as useMemo2 } from "react";
|
|
562
535
|
import { sizePropTypeUtil as sizePropTypeUtil2 } from "@elementor/editor-props";
|
|
563
536
|
import { useActiveBreakpoint } from "@elementor/editor-responsive";
|
|
564
537
|
import { usePopupState as usePopupState2 } from "@elementor/ui";
|
|
565
538
|
|
|
566
539
|
// src/components/size-control/size-input.tsx
|
|
567
|
-
import * as
|
|
540
|
+
import * as React18 from "react";
|
|
568
541
|
import { useRef } from "react";
|
|
569
542
|
import { MathFunctionIcon } from "@elementor/icons";
|
|
570
543
|
import { Box, InputAdornment as InputAdornment2 } from "@elementor/ui";
|
|
@@ -581,7 +554,7 @@ function isUnitExtendedOption(unit) {
|
|
|
581
554
|
}
|
|
582
555
|
|
|
583
556
|
// src/components/size-control/text-field-inner-selection.tsx
|
|
584
|
-
import * as
|
|
557
|
+
import * as React17 from "react";
|
|
585
558
|
import { forwardRef as forwardRef2, useId } from "react";
|
|
586
559
|
import { sizePropTypeUtil } from "@elementor/editor-props";
|
|
587
560
|
import { MenuListItem as MenuListItem2 } from "@elementor/editor-ui";
|
|
@@ -591,17 +564,17 @@ import {
|
|
|
591
564
|
Button as Button2,
|
|
592
565
|
InputAdornment,
|
|
593
566
|
Menu,
|
|
594
|
-
styled
|
|
567
|
+
styled,
|
|
595
568
|
usePopupState
|
|
596
569
|
} from "@elementor/ui";
|
|
597
570
|
|
|
598
571
|
// src/components/number-input.tsx
|
|
599
|
-
import * as
|
|
600
|
-
import { forwardRef, useState as
|
|
572
|
+
import * as React16 from "react";
|
|
573
|
+
import { forwardRef, useState as useState2 } from "react";
|
|
601
574
|
import { TextField as TextField3 } from "@elementor/ui";
|
|
602
575
|
var RESTRICTED_INPUT_KEYS = ["e", "E", "+"];
|
|
603
576
|
var NumberInput = forwardRef((props, ref) => {
|
|
604
|
-
const [key, setKey] =
|
|
577
|
+
const [key, setKey] = useState2(0);
|
|
605
578
|
const handleKeyDown = (event) => {
|
|
606
579
|
blockRestrictedKeys(event, props.inputProps?.min);
|
|
607
580
|
props.onKeyDown?.(event);
|
|
@@ -613,7 +586,7 @@ var NumberInput = forwardRef((props, ref) => {
|
|
|
613
586
|
setKey((prev) => prev + 1);
|
|
614
587
|
}
|
|
615
588
|
};
|
|
616
|
-
return /* @__PURE__ */
|
|
589
|
+
return /* @__PURE__ */ React16.createElement(TextField3, { ...props, ref, key, onKeyDown: handleKeyDown, onBlur: handleBlur });
|
|
617
590
|
});
|
|
618
591
|
function blockRestrictedKeys(event, min) {
|
|
619
592
|
const restrictedInputKeys = [...RESTRICTED_INPUT_KEYS];
|
|
@@ -645,7 +618,7 @@ var TextFieldInnerSelection = forwardRef2(
|
|
|
645
618
|
const getCursorStyle2 = () => ({
|
|
646
619
|
input: { cursor: InputProps.readOnly ? "default !important" : void 0 }
|
|
647
620
|
});
|
|
648
|
-
return /* @__PURE__ */
|
|
621
|
+
return /* @__PURE__ */ React17.createElement(
|
|
649
622
|
NumberInput,
|
|
650
623
|
{
|
|
651
624
|
ref,
|
|
@@ -690,7 +663,7 @@ var SelectionEndAdornment = ({
|
|
|
690
663
|
flexDirection: "column",
|
|
691
664
|
justifyContent: "center"
|
|
692
665
|
};
|
|
693
|
-
return /* @__PURE__ */
|
|
666
|
+
return /* @__PURE__ */ React17.createElement(InputAdornment, { position: "end" }, /* @__PURE__ */ React17.createElement(
|
|
694
667
|
StyledButton,
|
|
695
668
|
{
|
|
696
669
|
isPrimaryColor: showPrimaryColor,
|
|
@@ -699,7 +672,7 @@ var SelectionEndAdornment = ({
|
|
|
699
672
|
...bindTrigger(popupState)
|
|
700
673
|
},
|
|
701
674
|
placeholder ?? alternativeOptionLabels[value] ?? value
|
|
702
|
-
), /* @__PURE__ */
|
|
675
|
+
), /* @__PURE__ */ React17.createElement(Menu, { MenuListProps: { dense: true }, ...bindMenu(popupState) }, options.map((option, index) => /* @__PURE__ */ React17.createElement(
|
|
703
676
|
MenuListItem2,
|
|
704
677
|
{
|
|
705
678
|
key: option,
|
|
@@ -739,7 +712,7 @@ function useUnitPlaceholder(value) {
|
|
|
739
712
|
showPrimaryColor
|
|
740
713
|
};
|
|
741
714
|
}
|
|
742
|
-
var StyledButton =
|
|
715
|
+
var StyledButton = styled(Button2, {
|
|
743
716
|
shouldForwardProp: (prop) => prop !== "isPrimaryColor"
|
|
744
717
|
})(({ isPrimaryColor, theme }) => ({
|
|
745
718
|
color: isPrimaryColor ? theme.palette.text.primary : theme.palette.text.tertiary,
|
|
@@ -792,7 +765,7 @@ var SizeInput = ({
|
|
|
792
765
|
custom: popupAttributes
|
|
793
766
|
} : void 0;
|
|
794
767
|
const alternativeOptionLabels = {
|
|
795
|
-
custom: /* @__PURE__ */
|
|
768
|
+
custom: /* @__PURE__ */ React18.createElement(MathFunctionIcon, { fontSize: "tiny" })
|
|
796
769
|
};
|
|
797
770
|
const InputProps = {
|
|
798
771
|
...popupAttributes,
|
|
@@ -800,8 +773,8 @@ var SizeInput = ({
|
|
|
800
773
|
autoComplete: "off",
|
|
801
774
|
onClick,
|
|
802
775
|
onFocus,
|
|
803
|
-
startAdornment: startIcon ? /* @__PURE__ */
|
|
804
|
-
endAdornment: /* @__PURE__ */
|
|
776
|
+
startAdornment: startIcon ? /* @__PURE__ */ React18.createElement(InputAdornment2, { position: "start", disabled }, startIcon) : void 0,
|
|
777
|
+
endAdornment: /* @__PURE__ */ React18.createElement(
|
|
805
778
|
SelectionEndAdornment,
|
|
806
779
|
{
|
|
807
780
|
disabled,
|
|
@@ -813,7 +786,7 @@ var SizeInput = ({
|
|
|
813
786
|
}
|
|
814
787
|
)
|
|
815
788
|
};
|
|
816
|
-
return /* @__PURE__ */
|
|
789
|
+
return /* @__PURE__ */ React18.createElement(ControlActions, null, /* @__PURE__ */ React18.createElement(Box, null, /* @__PURE__ */ React18.createElement(
|
|
817
790
|
TextFieldInnerSelection,
|
|
818
791
|
{
|
|
819
792
|
disabled,
|
|
@@ -832,7 +805,7 @@ var SizeInput = ({
|
|
|
832
805
|
};
|
|
833
806
|
|
|
834
807
|
// src/components/text-field-popover.tsx
|
|
835
|
-
import * as
|
|
808
|
+
import * as React19 from "react";
|
|
836
809
|
import { useEffect, useRef as useRef2 } from "react";
|
|
837
810
|
import { PopoverHeader } from "@elementor/editor-ui";
|
|
838
811
|
import { MathFunctionIcon as MathFunctionIcon2 } from "@elementor/icons";
|
|
@@ -855,7 +828,7 @@ var TextFieldPopover = (props) => {
|
|
|
855
828
|
restoreValue();
|
|
856
829
|
popupState.close();
|
|
857
830
|
};
|
|
858
|
-
return /* @__PURE__ */
|
|
831
|
+
return /* @__PURE__ */ React19.createElement(
|
|
859
832
|
Popover,
|
|
860
833
|
{
|
|
861
834
|
disablePortal: true,
|
|
@@ -872,15 +845,15 @@ var TextFieldPopover = (props) => {
|
|
|
872
845
|
transformOrigin: { vertical: "top", horizontal: "center" },
|
|
873
846
|
onClose: handleClose
|
|
874
847
|
},
|
|
875
|
-
/* @__PURE__ */
|
|
848
|
+
/* @__PURE__ */ React19.createElement(
|
|
876
849
|
PopoverHeader,
|
|
877
850
|
{
|
|
878
851
|
title: __3("CSS function", "elementor"),
|
|
879
852
|
onClose: handleClose,
|
|
880
|
-
icon: /* @__PURE__ */
|
|
853
|
+
icon: /* @__PURE__ */ React19.createElement(MathFunctionIcon2, { fontSize: SIZE })
|
|
881
854
|
}
|
|
882
855
|
),
|
|
883
|
-
/* @__PURE__ */
|
|
856
|
+
/* @__PURE__ */ React19.createElement(
|
|
884
857
|
TextField4,
|
|
885
858
|
{
|
|
886
859
|
value,
|
|
@@ -912,7 +885,7 @@ function useSizeExtendedOptions(options, disableCustom) {
|
|
|
912
885
|
}
|
|
913
886
|
|
|
914
887
|
// src/hooks/use-sync-external-state.tsx
|
|
915
|
-
import { useEffect as useEffect2, useState as
|
|
888
|
+
import { useEffect as useEffect2, useState as useState3 } from "react";
|
|
916
889
|
var useSyncExternalState = ({
|
|
917
890
|
external,
|
|
918
891
|
setExternal,
|
|
@@ -931,7 +904,7 @@ var useSyncExternalState = ({
|
|
|
931
904
|
}
|
|
932
905
|
return externalValue;
|
|
933
906
|
}
|
|
934
|
-
const [internal, setInternal] =
|
|
907
|
+
const [internal, setInternal] = useState3(toInternal(external, null));
|
|
935
908
|
useEffect2(() => {
|
|
936
909
|
setInternal((prevInternal) => toInternal(external, prevInternal));
|
|
937
910
|
}, [external]);
|
|
@@ -1027,7 +1000,7 @@ var SizeControl = createControl(
|
|
|
1027
1000
|
popupState.open(anchorRef?.current);
|
|
1028
1001
|
}
|
|
1029
1002
|
};
|
|
1030
|
-
const maybeClosePopup =
|
|
1003
|
+
const maybeClosePopup = React20.useCallback(() => {
|
|
1031
1004
|
if (popupState && popupState.isOpen) {
|
|
1032
1005
|
popupState.close();
|
|
1033
1006
|
}
|
|
@@ -1035,7 +1008,7 @@ var SizeControl = createControl(
|
|
|
1035
1008
|
useEffect3(() => {
|
|
1036
1009
|
maybeClosePopup();
|
|
1037
1010
|
}, [activeBreakpoint]);
|
|
1038
|
-
return /* @__PURE__ */
|
|
1011
|
+
return /* @__PURE__ */ React20.createElement(React20.Fragment, null, /* @__PURE__ */ React20.createElement(
|
|
1039
1012
|
SizeInput,
|
|
1040
1013
|
{
|
|
1041
1014
|
disabled,
|
|
@@ -1053,7 +1026,7 @@ var SizeControl = createControl(
|
|
|
1053
1026
|
id,
|
|
1054
1027
|
ariaLabel
|
|
1055
1028
|
}
|
|
1056
|
-
), anchorRef?.current && popupState.isOpen && /* @__PURE__ */
|
|
1029
|
+
), anchorRef?.current && popupState.isOpen && /* @__PURE__ */ React20.createElement(
|
|
1057
1030
|
TextFieldPopover,
|
|
1058
1031
|
{
|
|
1059
1032
|
popupState,
|
|
@@ -1112,19 +1085,19 @@ function extractValueFromState(state, allowEmpty = false) {
|
|
|
1112
1085
|
}
|
|
1113
1086
|
|
|
1114
1087
|
// src/controls/stroke-control.tsx
|
|
1115
|
-
import * as
|
|
1088
|
+
import * as React23 from "react";
|
|
1116
1089
|
import { forwardRef as forwardRef3, useRef as useRef3 } from "react";
|
|
1117
1090
|
import { strokePropTypeUtil } from "@elementor/editor-props";
|
|
1118
1091
|
import { Grid as Grid2 } from "@elementor/ui";
|
|
1119
1092
|
import { __ as __4 } from "@wordpress/i18n";
|
|
1120
1093
|
|
|
1121
1094
|
// src/components/section-content.tsx
|
|
1122
|
-
import * as
|
|
1095
|
+
import * as React21 from "react";
|
|
1123
1096
|
import { Stack as Stack4 } from "@elementor/ui";
|
|
1124
|
-
var SectionContent = ({ gap = 0.5, sx, children }) => /* @__PURE__ */
|
|
1097
|
+
var SectionContent = ({ gap = 0.5, sx, children }) => /* @__PURE__ */ React21.createElement(Stack4, { gap, sx: { ...sx } }, children);
|
|
1125
1098
|
|
|
1126
1099
|
// src/controls/color-control.tsx
|
|
1127
|
-
import * as
|
|
1100
|
+
import * as React22 from "react";
|
|
1128
1101
|
import { colorPropTypeUtil } from "@elementor/editor-props";
|
|
1129
1102
|
import { UnstableColorField } from "@elementor/ui";
|
|
1130
1103
|
var ColorControl = createControl(
|
|
@@ -1134,7 +1107,7 @@ var ColorControl = createControl(
|
|
|
1134
1107
|
const handleChange = (selectedColor) => {
|
|
1135
1108
|
setValue(selectedColor || null);
|
|
1136
1109
|
};
|
|
1137
|
-
return /* @__PURE__ */
|
|
1110
|
+
return /* @__PURE__ */ React22.createElement(ControlActions, null, /* @__PURE__ */ React22.createElement(
|
|
1138
1111
|
UnstableColorField,
|
|
1139
1112
|
{
|
|
1140
1113
|
id,
|
|
@@ -1177,26 +1150,26 @@ var units = ["px", "em", "rem"];
|
|
|
1177
1150
|
var StrokeControl = createControl(() => {
|
|
1178
1151
|
const propContext = useBoundProp(strokePropTypeUtil);
|
|
1179
1152
|
const rowRef = useRef3(null);
|
|
1180
|
-
return /* @__PURE__ */
|
|
1153
|
+
return /* @__PURE__ */ React23.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React23.createElement(SectionContent, null, /* @__PURE__ */ React23.createElement(Control, { bind: "width", label: __4("Stroke width", "elementor"), ref: rowRef }, /* @__PURE__ */ React23.createElement(SizeControl, { units, anchorRef: rowRef })), /* @__PURE__ */ React23.createElement(Control, { bind: "color", label: __4("Stroke color", "elementor") }, /* @__PURE__ */ React23.createElement(ColorControl, null))));
|
|
1181
1154
|
});
|
|
1182
|
-
var Control = forwardRef3(({ bind, label, children }, ref) => /* @__PURE__ */
|
|
1155
|
+
var Control = forwardRef3(({ bind, label, children }, ref) => /* @__PURE__ */ React23.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React23.createElement(Grid2, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref }, /* @__PURE__ */ React23.createElement(Grid2, { item: true, xs: 6 }, /* @__PURE__ */ React23.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React23.createElement(Grid2, { item: true, xs: 6 }, children))));
|
|
1183
1156
|
|
|
1184
1157
|
// src/controls/box-shadow-repeater-control.tsx
|
|
1185
|
-
import * as
|
|
1158
|
+
import * as React39 from "react";
|
|
1186
1159
|
import { useRef as useRef4 } from "react";
|
|
1187
1160
|
import { boxShadowPropTypeUtil, shadowPropTypeUtil } from "@elementor/editor-props";
|
|
1188
|
-
import { FormLabel as FormLabel2, Grid as Grid4, styled as
|
|
1161
|
+
import { FormLabel as FormLabel2, Grid as Grid4, styled as styled3, UnstableColorIndicator } from "@elementor/ui";
|
|
1189
1162
|
import { __ as __11 } from "@wordpress/i18n";
|
|
1190
1163
|
|
|
1191
1164
|
// src/components/control-repeater/actions/tooltip-add-item-action.tsx
|
|
1192
|
-
import * as
|
|
1165
|
+
import * as React25 from "react";
|
|
1193
1166
|
import { PlusIcon } from "@elementor/icons";
|
|
1194
1167
|
import { Box as Box2, IconButton, Infotip } from "@elementor/ui";
|
|
1195
1168
|
import { __ as __5, sprintf } from "@wordpress/i18n";
|
|
1196
1169
|
|
|
1197
1170
|
// src/components/control-repeater/context/repeater-context.tsx
|
|
1198
|
-
import * as
|
|
1199
|
-
import { createContext as
|
|
1171
|
+
import * as React24 from "react";
|
|
1172
|
+
import { createContext as createContext7, useMemo as useMemo3, useState as useState4 } from "react";
|
|
1200
1173
|
import { usePopupState as usePopupState3 } from "@elementor/ui";
|
|
1201
1174
|
|
|
1202
1175
|
// src/services/event-bus.ts
|
|
@@ -1234,18 +1207,18 @@ var EventBus = class {
|
|
|
1234
1207
|
var eventBus = new EventBus();
|
|
1235
1208
|
|
|
1236
1209
|
// src/components/control-repeater/context/item-context.tsx
|
|
1237
|
-
import { createContext as
|
|
1238
|
-
var ItemContext =
|
|
1210
|
+
import { createContext as createContext6 } from "react";
|
|
1211
|
+
var ItemContext = createContext6({
|
|
1239
1212
|
index: -1,
|
|
1240
1213
|
value: {}
|
|
1241
1214
|
});
|
|
1242
1215
|
|
|
1243
1216
|
// src/components/control-repeater/context/repeater-context.tsx
|
|
1244
|
-
var RepeaterContext =
|
|
1217
|
+
var RepeaterContext = createContext7(null);
|
|
1245
1218
|
var EMPTY_OPEN_ITEM = -1;
|
|
1246
1219
|
var useRepeaterContext = () => {
|
|
1247
|
-
const context =
|
|
1248
|
-
const itemContext =
|
|
1220
|
+
const context = React24.useContext(RepeaterContext);
|
|
1221
|
+
const itemContext = React24.useContext(ItemContext);
|
|
1249
1222
|
if (!context) {
|
|
1250
1223
|
throw new Error("useRepeaterContext must be used within a RepeaterContextProvider");
|
|
1251
1224
|
}
|
|
@@ -1264,10 +1237,10 @@ var RepeaterContextProvider = ({
|
|
|
1264
1237
|
setExternal: setRepeaterValues,
|
|
1265
1238
|
persistWhen: () => true
|
|
1266
1239
|
});
|
|
1267
|
-
const [uniqueKeys, setUniqueKeys] =
|
|
1240
|
+
const [uniqueKeys, setUniqueKeys] = useState4(() => {
|
|
1268
1241
|
return items2?.map(() => generateUniqueKey()) ?? [];
|
|
1269
1242
|
});
|
|
1270
|
-
|
|
1243
|
+
React24.useEffect(() => {
|
|
1271
1244
|
const nextLength = items2?.length ?? 0;
|
|
1272
1245
|
setUniqueKeys((prev) => {
|
|
1273
1246
|
const prevLength = prev.length;
|
|
@@ -1290,8 +1263,8 @@ var RepeaterContextProvider = ({
|
|
|
1290
1263
|
const handleSetItems = (newItemsWithKeys) => {
|
|
1291
1264
|
setItems(newItemsWithKeys.map(({ item }) => item));
|
|
1292
1265
|
};
|
|
1293
|
-
const [openItemIndex, setOpenItemIndex] =
|
|
1294
|
-
const [rowRef, setRowRef] =
|
|
1266
|
+
const [openItemIndex, setOpenItemIndex] = useState4(EMPTY_OPEN_ITEM);
|
|
1267
|
+
const [rowRef, setRowRef] = useState4(null);
|
|
1295
1268
|
const isOpen = openItemIndex !== EMPTY_OPEN_ITEM;
|
|
1296
1269
|
const popoverState = usePopupState3({ variant: "popover" });
|
|
1297
1270
|
const addItem = (ev, config) => {
|
|
@@ -1320,7 +1293,7 @@ var RepeaterContextProvider = ({
|
|
|
1320
1293
|
const newItems = [...items2.slice(0, index), updatedItem, ...items2.slice(index + 1)];
|
|
1321
1294
|
setItems(newItems);
|
|
1322
1295
|
};
|
|
1323
|
-
return /* @__PURE__ */
|
|
1296
|
+
return /* @__PURE__ */ React24.createElement(
|
|
1324
1297
|
RepeaterContext.Provider,
|
|
1325
1298
|
{
|
|
1326
1299
|
value: {
|
|
@@ -1357,7 +1330,7 @@ var TooltipAddItemAction = ({
|
|
|
1357
1330
|
}) => {
|
|
1358
1331
|
const { addItem } = useRepeaterContext();
|
|
1359
1332
|
const onClick = (ev) => addItem(ev, { index: newItemIndex });
|
|
1360
|
-
return /* @__PURE__ */
|
|
1333
|
+
return /* @__PURE__ */ React25.createElement(ConditionalToolTip, { content: tooltipContent, enable: enableTooltip }, /* @__PURE__ */ React25.createElement(Box2, { component: "span", sx: { cursor: disabled ? "not-allowed" : "pointer" } }, /* @__PURE__ */ React25.createElement(
|
|
1361
1334
|
IconButton,
|
|
1362
1335
|
{
|
|
1363
1336
|
size: SIZE2,
|
|
@@ -1365,35 +1338,35 @@ var TooltipAddItemAction = ({
|
|
|
1365
1338
|
onClick,
|
|
1366
1339
|
"aria-label": sprintf(__5("Add %s item", "elementor"), ariaLabel?.toLowerCase())
|
|
1367
1340
|
},
|
|
1368
|
-
/* @__PURE__ */
|
|
1341
|
+
/* @__PURE__ */ React25.createElement(PlusIcon, { fontSize: SIZE2 })
|
|
1369
1342
|
)));
|
|
1370
1343
|
};
|
|
1371
1344
|
var ConditionalToolTip = ({
|
|
1372
1345
|
children,
|
|
1373
1346
|
enable,
|
|
1374
1347
|
content
|
|
1375
|
-
}) => enable && content ? /* @__PURE__ */
|
|
1348
|
+
}) => enable && content ? /* @__PURE__ */ React25.createElement(Infotip, { placement: "right", color: "secondary", content }, children) : children;
|
|
1376
1349
|
|
|
1377
1350
|
// src/components/control-repeater/items/items-container.tsx
|
|
1378
|
-
import * as
|
|
1351
|
+
import * as React27 from "react";
|
|
1379
1352
|
|
|
1380
1353
|
// src/components/repeater/sortable.tsx
|
|
1381
|
-
import * as
|
|
1354
|
+
import * as React26 from "react";
|
|
1382
1355
|
import { GripVerticalIcon } from "@elementor/icons";
|
|
1383
1356
|
import {
|
|
1384
1357
|
Divider,
|
|
1385
1358
|
List,
|
|
1386
1359
|
ListItem,
|
|
1387
|
-
styled as
|
|
1360
|
+
styled as styled2,
|
|
1388
1361
|
UnstableSortableItem,
|
|
1389
1362
|
UnstableSortableProvider
|
|
1390
1363
|
} from "@elementor/ui";
|
|
1391
1364
|
import { __ as __6 } from "@wordpress/i18n";
|
|
1392
1365
|
var SortableProvider = (props) => {
|
|
1393
|
-
return /* @__PURE__ */
|
|
1366
|
+
return /* @__PURE__ */ React26.createElement(List, { sx: { p: 0, my: -0.5, mx: 0 } }, /* @__PURE__ */ React26.createElement(UnstableSortableProvider, { restrictAxis: true, disableDragOverlay: false, variant: "static", ...props }));
|
|
1394
1367
|
};
|
|
1395
1368
|
var SortableItem = ({ id, children, disabled }) => {
|
|
1396
|
-
return /* @__PURE__ */
|
|
1369
|
+
return /* @__PURE__ */ React26.createElement(
|
|
1397
1370
|
UnstableSortableItem,
|
|
1398
1371
|
{
|
|
1399
1372
|
id,
|
|
@@ -1406,12 +1379,12 @@ var SortableItem = ({ id, children, disabled }) => {
|
|
|
1406
1379
|
showDropIndication,
|
|
1407
1380
|
dropIndicationStyle
|
|
1408
1381
|
}) => {
|
|
1409
|
-
return /* @__PURE__ */
|
|
1382
|
+
return /* @__PURE__ */ React26.createElement(StyledListItem, { ...itemProps, style: itemStyle, tabIndex: -1 }, !disabled && /* @__PURE__ */ React26.createElement(SortableTrigger, { ...triggerProps, style: triggerStyle }), children, showDropIndication && /* @__PURE__ */ React26.createElement(StyledDivider, { style: dropIndicationStyle }));
|
|
1410
1383
|
}
|
|
1411
1384
|
}
|
|
1412
1385
|
);
|
|
1413
1386
|
};
|
|
1414
|
-
var StyledListItem =
|
|
1387
|
+
var StyledListItem = styled2(ListItem)`
|
|
1415
1388
|
position: relative;
|
|
1416
1389
|
margin-inline: 0px;
|
|
1417
1390
|
padding-inline: 0px;
|
|
@@ -1441,7 +1414,7 @@ var StyledListItem = styled3(ListItem)`
|
|
|
1441
1414
|
}
|
|
1442
1415
|
}
|
|
1443
1416
|
`;
|
|
1444
|
-
var SortableTrigger = (props) => /* @__PURE__ */
|
|
1417
|
+
var SortableTrigger = (props) => /* @__PURE__ */ React26.createElement(
|
|
1445
1418
|
"div",
|
|
1446
1419
|
{
|
|
1447
1420
|
...props,
|
|
@@ -1450,9 +1423,9 @@ var SortableTrigger = (props) => /* @__PURE__ */ React27.createElement(
|
|
|
1450
1423
|
tabIndex: 0,
|
|
1451
1424
|
"aria-label": __6("Drag item", "elementor")
|
|
1452
1425
|
},
|
|
1453
|
-
/* @__PURE__ */
|
|
1426
|
+
/* @__PURE__ */ React26.createElement(GripVerticalIcon, { fontSize: "tiny" })
|
|
1454
1427
|
);
|
|
1455
|
-
var StyledDivider =
|
|
1428
|
+
var StyledDivider = styled2(Divider)`
|
|
1456
1429
|
height: 0px;
|
|
1457
1430
|
border: none;
|
|
1458
1431
|
overflow: visible;
|
|
@@ -1487,22 +1460,22 @@ var ItemsContainer = ({
|
|
|
1487
1460
|
})
|
|
1488
1461
|
);
|
|
1489
1462
|
};
|
|
1490
|
-
return /* @__PURE__ */
|
|
1463
|
+
return /* @__PURE__ */ React27.createElement(React27.Fragment, null, /* @__PURE__ */ React27.createElement(SortableProvider, { value: keys, onChange: onChangeOrder }, keys.map((key, index) => {
|
|
1491
1464
|
const value = items2[index].item;
|
|
1492
|
-
return /* @__PURE__ */
|
|
1465
|
+
return /* @__PURE__ */ React27.createElement(SortableItem, { id: key, key: `sortable-${key}`, disabled: !isSortable }, /* @__PURE__ */ React27.createElement(ItemContext.Provider, { value: { index, value } }, children));
|
|
1493
1466
|
})));
|
|
1494
1467
|
};
|
|
1495
1468
|
|
|
1496
1469
|
// src/components/control-repeater/items/item.tsx
|
|
1497
|
-
import * as
|
|
1470
|
+
import * as React29 from "react";
|
|
1498
1471
|
import { bindTrigger as bindTrigger2 } from "@elementor/ui";
|
|
1499
1472
|
import { __ as __7 } from "@wordpress/i18n";
|
|
1500
1473
|
|
|
1501
1474
|
// src/hooks/use-repeatable-control-context.ts
|
|
1502
|
-
import { createContext as
|
|
1503
|
-
var RepeatableControlContext =
|
|
1475
|
+
import { createContext as createContext8, useContext as useContext7 } from "react";
|
|
1476
|
+
var RepeatableControlContext = createContext8(void 0);
|
|
1504
1477
|
var useRepeatableControlContext = () => {
|
|
1505
|
-
const context =
|
|
1478
|
+
const context = useContext7(RepeatableControlContext);
|
|
1506
1479
|
if (!context) {
|
|
1507
1480
|
throw new Error("useRepeatableControlContext must be used within RepeatableControl");
|
|
1508
1481
|
}
|
|
@@ -1510,11 +1483,11 @@ var useRepeatableControlContext = () => {
|
|
|
1510
1483
|
};
|
|
1511
1484
|
|
|
1512
1485
|
// src/components/repeater/repeater-tag.tsx
|
|
1513
|
-
import * as
|
|
1486
|
+
import * as React28 from "react";
|
|
1514
1487
|
import { forwardRef as forwardRef4 } from "react";
|
|
1515
1488
|
import { UnstableTag } from "@elementor/ui";
|
|
1516
1489
|
var RepeaterTag = forwardRef4((props, ref) => {
|
|
1517
|
-
return /* @__PURE__ */
|
|
1490
|
+
return /* @__PURE__ */ React28.createElement(
|
|
1518
1491
|
UnstableTag,
|
|
1519
1492
|
{
|
|
1520
1493
|
ref,
|
|
@@ -1544,7 +1517,7 @@ var Item = ({ Label: Label3, Icon, actions }) => {
|
|
|
1544
1517
|
value,
|
|
1545
1518
|
isItemDisabled: isItemDisabled2
|
|
1546
1519
|
} = useRepeaterContext();
|
|
1547
|
-
const repeatableContext =
|
|
1520
|
+
const repeatableContext = React29.useContext(RepeatableControlContext);
|
|
1548
1521
|
const disableOpen = !!repeatableContext?.props?.readOnly;
|
|
1549
1522
|
const triggerProps = bindTrigger2(popoverState);
|
|
1550
1523
|
const onClick = (ev) => {
|
|
@@ -1561,15 +1534,15 @@ var Item = ({ Label: Label3, Icon, actions }) => {
|
|
|
1561
1534
|
setRowRef(ref);
|
|
1562
1535
|
popoverState.setAnchorEl(ref);
|
|
1563
1536
|
};
|
|
1564
|
-
return /* @__PURE__ */
|
|
1537
|
+
return /* @__PURE__ */ React29.createElement(
|
|
1565
1538
|
RepeaterTag,
|
|
1566
1539
|
{
|
|
1567
1540
|
ref: setRef,
|
|
1568
|
-
label: /* @__PURE__ */
|
|
1541
|
+
label: /* @__PURE__ */ React29.createElement(RepeaterItemLabelSlot, { value }, /* @__PURE__ */ React29.createElement(Label3, { value })),
|
|
1569
1542
|
"aria-label": __7("Open item", "elementor"),
|
|
1570
1543
|
...triggerProps,
|
|
1571
1544
|
onClick,
|
|
1572
|
-
startIcon: /* @__PURE__ */
|
|
1545
|
+
startIcon: /* @__PURE__ */ React29.createElement(RepeaterItemIconSlot, { value }, /* @__PURE__ */ React29.createElement(Icon, { value })),
|
|
1573
1546
|
sx: {
|
|
1574
1547
|
minHeight: (theme) => theme.spacing(3.5),
|
|
1575
1548
|
...isItemDisabled2(index) && {
|
|
@@ -1578,20 +1551,20 @@ var Item = ({ Label: Label3, Icon, actions }) => {
|
|
|
1578
1551
|
}
|
|
1579
1552
|
}
|
|
1580
1553
|
},
|
|
1581
|
-
actions: /* @__PURE__ */
|
|
1554
|
+
actions: /* @__PURE__ */ React29.createElement(React29.Fragment, null, /* @__PURE__ */ React29.createElement(RepeaterItemActionsSlot, { index: index ?? -1 }), actions)
|
|
1582
1555
|
}
|
|
1583
1556
|
);
|
|
1584
1557
|
};
|
|
1585
1558
|
|
|
1586
1559
|
// src/components/control-repeater/control-repeater.tsx
|
|
1587
|
-
import * as
|
|
1560
|
+
import * as React30 from "react";
|
|
1588
1561
|
var ControlRepeater = ({
|
|
1589
1562
|
children,
|
|
1590
1563
|
initial,
|
|
1591
1564
|
propTypeUtil,
|
|
1592
1565
|
isItemDisabled: isItemDisabled2
|
|
1593
1566
|
}) => {
|
|
1594
|
-
return /* @__PURE__ */
|
|
1567
|
+
return /* @__PURE__ */ React30.createElement(SectionContent, null, /* @__PURE__ */ React30.createElement(
|
|
1595
1568
|
RepeaterContextProvider,
|
|
1596
1569
|
{
|
|
1597
1570
|
initial,
|
|
@@ -1603,7 +1576,7 @@ var ControlRepeater = ({
|
|
|
1603
1576
|
};
|
|
1604
1577
|
|
|
1605
1578
|
// src/components/control-repeater/actions/disable-item-action.tsx
|
|
1606
|
-
import * as
|
|
1579
|
+
import * as React31 from "react";
|
|
1607
1580
|
import { EyeIcon, EyeOffIcon } from "@elementor/icons";
|
|
1608
1581
|
import { IconButton as IconButton2, Tooltip } from "@elementor/ui";
|
|
1609
1582
|
import { __ as __8 } from "@wordpress/i18n";
|
|
@@ -1623,11 +1596,11 @@ var DisableItemAction = () => {
|
|
|
1623
1596
|
}
|
|
1624
1597
|
updateItem(self, index);
|
|
1625
1598
|
};
|
|
1626
|
-
return /* @__PURE__ */
|
|
1599
|
+
return /* @__PURE__ */ React31.createElement(Tooltip, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React31.createElement(IconButton2, { size: SIZE3, onClick, "aria-label": toggleLabel }, propDisabled ? /* @__PURE__ */ React31.createElement(EyeOffIcon, { fontSize: SIZE3 }) : /* @__PURE__ */ React31.createElement(EyeIcon, { fontSize: SIZE3 })));
|
|
1627
1600
|
};
|
|
1628
1601
|
|
|
1629
1602
|
// src/components/control-repeater/actions/duplicate-item-action.tsx
|
|
1630
|
-
import * as
|
|
1603
|
+
import * as React32 from "react";
|
|
1631
1604
|
import { CopyIcon } from "@elementor/icons";
|
|
1632
1605
|
import { IconButton as IconButton3, Tooltip as Tooltip2 } from "@elementor/ui";
|
|
1633
1606
|
import { __ as __9 } from "@wordpress/i18n";
|
|
@@ -1643,7 +1616,7 @@ var DuplicateItemAction = () => {
|
|
|
1643
1616
|
const newItem = structuredClone(item);
|
|
1644
1617
|
addItem(ev, { item: newItem, index: index + 1 });
|
|
1645
1618
|
};
|
|
1646
|
-
return /* @__PURE__ */
|
|
1619
|
+
return /* @__PURE__ */ React32.createElement(Tooltip2, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React32.createElement(
|
|
1647
1620
|
IconButton3,
|
|
1648
1621
|
{
|
|
1649
1622
|
size: SIZE4,
|
|
@@ -1651,12 +1624,12 @@ var DuplicateItemAction = () => {
|
|
|
1651
1624
|
"aria-label": duplicateLabel,
|
|
1652
1625
|
disabled: isItemDisabled2(index)
|
|
1653
1626
|
},
|
|
1654
|
-
/* @__PURE__ */
|
|
1627
|
+
/* @__PURE__ */ React32.createElement(CopyIcon, { fontSize: SIZE4 })
|
|
1655
1628
|
));
|
|
1656
1629
|
};
|
|
1657
1630
|
|
|
1658
1631
|
// src/components/control-repeater/actions/remove-item-action.tsx
|
|
1659
|
-
import * as
|
|
1632
|
+
import * as React33 from "react";
|
|
1660
1633
|
import { XIcon } from "@elementor/icons";
|
|
1661
1634
|
import { IconButton as IconButton4, Tooltip as Tooltip3 } from "@elementor/ui";
|
|
1662
1635
|
import { __ as __10 } from "@wordpress/i18n";
|
|
@@ -1668,18 +1641,18 @@ var RemoveItemAction = () => {
|
|
|
1668
1641
|
}
|
|
1669
1642
|
const removeLabel = __10("Remove", "elementor");
|
|
1670
1643
|
const onClick = () => removeItem(index);
|
|
1671
|
-
return /* @__PURE__ */
|
|
1644
|
+
return /* @__PURE__ */ React33.createElement(Tooltip3, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React33.createElement(IconButton4, { size: SIZE5, onClick, "aria-label": removeLabel }, /* @__PURE__ */ React33.createElement(XIcon, { fontSize: SIZE5 })));
|
|
1672
1645
|
};
|
|
1673
1646
|
|
|
1674
1647
|
// src/components/control-repeater/items/edit-item-popover.tsx
|
|
1675
|
-
import * as
|
|
1648
|
+
import * as React35 from "react";
|
|
1676
1649
|
import { bindPopover as bindPopover2, Box as Box3 } from "@elementor/ui";
|
|
1677
1650
|
|
|
1678
1651
|
// src/components/repeater/repeater-popover.tsx
|
|
1679
|
-
import * as
|
|
1652
|
+
import * as React34 from "react";
|
|
1680
1653
|
import { Popover as Popover2 } from "@elementor/ui";
|
|
1681
1654
|
var RepeaterPopover = ({ children, width, ...props }) => {
|
|
1682
|
-
return /* @__PURE__ */
|
|
1655
|
+
return /* @__PURE__ */ React34.createElement(
|
|
1683
1656
|
Popover2,
|
|
1684
1657
|
{
|
|
1685
1658
|
disablePortal: true,
|
|
@@ -1707,24 +1680,24 @@ var EditItemPopover = ({ children }) => {
|
|
|
1707
1680
|
popoverState.setAnchorEl(null);
|
|
1708
1681
|
setOpenItemIndex(EMPTY_OPEN_ITEM);
|
|
1709
1682
|
};
|
|
1710
|
-
return /* @__PURE__ */
|
|
1683
|
+
return /* @__PURE__ */ React35.createElement(RepeaterPopover, { width: rowRef.offsetWidth, ...bindPopover2(popoverState), onClose }, /* @__PURE__ */ React35.createElement(PropKeyProvider, { bind: String(openItemIndex) }, /* @__PURE__ */ React35.createElement(Box3, null, children)));
|
|
1711
1684
|
};
|
|
1712
1685
|
|
|
1713
1686
|
// src/components/popover-content.tsx
|
|
1714
|
-
import * as
|
|
1687
|
+
import * as React36 from "react";
|
|
1715
1688
|
import { Stack as Stack5 } from "@elementor/ui";
|
|
1716
|
-
var PopoverContent = ({ gap = 1.5, children, ...props }) => /* @__PURE__ */
|
|
1689
|
+
var PopoverContent = ({ gap = 1.5, children, ...props }) => /* @__PURE__ */ React36.createElement(Stack5, { ...props, gap }, children);
|
|
1717
1690
|
|
|
1718
1691
|
// src/components/popover-grid-container.tsx
|
|
1719
1692
|
import { forwardRef as forwardRef5 } from "react";
|
|
1720
|
-
import * as
|
|
1693
|
+
import * as React37 from "react";
|
|
1721
1694
|
import { Grid as Grid3 } from "@elementor/ui";
|
|
1722
1695
|
var PopoverGridContainer = forwardRef5(
|
|
1723
|
-
({ gap = 1.5, alignItems = "center", flexWrap = "nowrap", children }, ref) => /* @__PURE__ */
|
|
1696
|
+
({ gap = 1.5, alignItems = "center", flexWrap = "nowrap", children }, ref) => /* @__PURE__ */ React37.createElement(Grid3, { container: true, gap, alignItems, flexWrap, ref }, children)
|
|
1724
1697
|
);
|
|
1725
1698
|
|
|
1726
1699
|
// src/components/repeater/repeater-header.tsx
|
|
1727
|
-
import * as
|
|
1700
|
+
import * as React38 from "react";
|
|
1728
1701
|
import { forwardRef as forwardRef6 } from "react";
|
|
1729
1702
|
import { Box as Box4, Stack as Stack6, Typography as Typography2 } from "@elementor/ui";
|
|
1730
1703
|
var RepeaterHeader = forwardRef6(
|
|
@@ -1733,7 +1706,7 @@ var RepeaterHeader = forwardRef6(
|
|
|
1733
1706
|
children,
|
|
1734
1707
|
adornment: Adornment = ControlAdornments
|
|
1735
1708
|
}, ref) => {
|
|
1736
|
-
return /* @__PURE__ */
|
|
1709
|
+
return /* @__PURE__ */ React38.createElement(
|
|
1737
1710
|
Stack6,
|
|
1738
1711
|
{
|
|
1739
1712
|
direction: "row",
|
|
@@ -1742,7 +1715,7 @@ var RepeaterHeader = forwardRef6(
|
|
|
1742
1715
|
sx: { marginInlineEnd: -0.75, py: 0.25 },
|
|
1743
1716
|
ref
|
|
1744
1717
|
},
|
|
1745
|
-
/* @__PURE__ */
|
|
1718
|
+
/* @__PURE__ */ React38.createElement(Box4, { display: "flex", alignItems: "center", gap: 1, sx: { flexGrow: 1 } }, /* @__PURE__ */ React38.createElement(Typography2, { component: "label", variant: "caption", color: "text.secondary", sx: { lineHeight: 1 } }, label), /* @__PURE__ */ React38.createElement(Adornment, null)),
|
|
1746
1719
|
children
|
|
1747
1720
|
);
|
|
1748
1721
|
}
|
|
@@ -1751,26 +1724,26 @@ var RepeaterHeader = forwardRef6(
|
|
|
1751
1724
|
// src/controls/box-shadow-repeater-control.tsx
|
|
1752
1725
|
var BoxShadowRepeaterControl = createControl(() => {
|
|
1753
1726
|
const { propType, value, setValue, disabled } = useBoundProp(boxShadowPropTypeUtil);
|
|
1754
|
-
return /* @__PURE__ */
|
|
1727
|
+
return /* @__PURE__ */ React39.createElement(PropProvider, { propType, value, setValue, isDisabled: () => disabled }, /* @__PURE__ */ React39.createElement(ControlRepeater, { initial: initialShadow, propTypeUtil: boxShadowPropTypeUtil }, /* @__PURE__ */ React39.createElement(RepeaterHeader, { label: __11("Box shadow", "elementor") }, /* @__PURE__ */ React39.createElement(TooltipAddItemAction, { newItemIndex: 0, disabled, ariaLabel: "Box shadow" })), /* @__PURE__ */ React39.createElement(ItemsContainer, null, /* @__PURE__ */ React39.createElement(
|
|
1755
1728
|
Item,
|
|
1756
1729
|
{
|
|
1757
1730
|
Icon: ItemIcon,
|
|
1758
1731
|
Label: ItemLabel,
|
|
1759
|
-
actions: /* @__PURE__ */
|
|
1732
|
+
actions: /* @__PURE__ */ React39.createElement(React39.Fragment, null, /* @__PURE__ */ React39.createElement(DuplicateItemAction, null), /* @__PURE__ */ React39.createElement(DisableItemAction, null), /* @__PURE__ */ React39.createElement(RemoveItemAction, null))
|
|
1760
1733
|
}
|
|
1761
|
-
)), /* @__PURE__ */
|
|
1734
|
+
)), /* @__PURE__ */ React39.createElement(EditItemPopover, null, /* @__PURE__ */ React39.createElement(Content, null))));
|
|
1762
1735
|
});
|
|
1763
|
-
var StyledUnstableColorIndicator =
|
|
1736
|
+
var StyledUnstableColorIndicator = styled3(UnstableColorIndicator)(({ theme }) => ({
|
|
1764
1737
|
height: "1rem",
|
|
1765
1738
|
width: "1rem",
|
|
1766
1739
|
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
1767
1740
|
}));
|
|
1768
|
-
var ItemIcon = ({ value }) => /* @__PURE__ */
|
|
1741
|
+
var ItemIcon = ({ value }) => /* @__PURE__ */ React39.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: value.value.color?.value });
|
|
1769
1742
|
var Content = () => {
|
|
1770
1743
|
const context = useBoundProp(shadowPropTypeUtil);
|
|
1771
1744
|
const rowRef = [useRef4(null), useRef4(null)];
|
|
1772
1745
|
const { rowRef: anchorEl } = useRepeaterContext();
|
|
1773
|
-
return /* @__PURE__ */
|
|
1746
|
+
return /* @__PURE__ */ React39.createElement(PropProvider, { ...context }, /* @__PURE__ */ React39.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React39.createElement(PopoverGridContainer, null, /* @__PURE__ */ React39.createElement(Control2, { bind: "color", label: __11("Color", "elementor") }, /* @__PURE__ */ React39.createElement(ColorControl, { anchorEl })), /* @__PURE__ */ React39.createElement(Control2, { bind: "position", label: __11("Position", "elementor"), sx: { overflow: "hidden" } }, /* @__PURE__ */ React39.createElement(
|
|
1774
1747
|
SelectControl,
|
|
1775
1748
|
{
|
|
1776
1749
|
options: [
|
|
@@ -1778,14 +1751,14 @@ var Content = () => {
|
|
|
1778
1751
|
{ label: __11("Outset", "elementor"), value: null }
|
|
1779
1752
|
]
|
|
1780
1753
|
}
|
|
1781
|
-
))), /* @__PURE__ */
|
|
1754
|
+
))), /* @__PURE__ */ React39.createElement(PopoverGridContainer, { ref: rowRef[0] }, /* @__PURE__ */ React39.createElement(Control2, { bind: "hOffset", label: __11("Horizontal", "elementor") }, /* @__PURE__ */ React39.createElement(SizeControl, { anchorRef: rowRef[0] })), /* @__PURE__ */ React39.createElement(Control2, { bind: "vOffset", label: __11("Vertical", "elementor") }, /* @__PURE__ */ React39.createElement(SizeControl, { anchorRef: rowRef[0] }))), /* @__PURE__ */ React39.createElement(PopoverGridContainer, { ref: rowRef[1] }, /* @__PURE__ */ React39.createElement(Control2, { bind: "blur", label: __11("Blur", "elementor") }, /* @__PURE__ */ React39.createElement(SizeControl, { anchorRef: rowRef[1] })), /* @__PURE__ */ React39.createElement(Control2, { bind: "spread", label: __11("Spread", "elementor") }, /* @__PURE__ */ React39.createElement(SizeControl, { anchorRef: rowRef[1] })))));
|
|
1782
1755
|
};
|
|
1783
1756
|
var Control2 = ({
|
|
1784
1757
|
label,
|
|
1785
1758
|
bind,
|
|
1786
1759
|
children,
|
|
1787
1760
|
sx
|
|
1788
|
-
}) => /* @__PURE__ */
|
|
1761
|
+
}) => /* @__PURE__ */ React39.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React39.createElement(Grid4, { item: true, xs: 6, sx }, /* @__PURE__ */ React39.createElement(Grid4, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React39.createElement(Grid4, { item: true, xs: 12 }, /* @__PURE__ */ React39.createElement(FormLabel2, { size: "tiny" }, label)), /* @__PURE__ */ React39.createElement(Grid4, { item: true, xs: 12 }, children))));
|
|
1789
1762
|
var ItemLabel = ({ value }) => {
|
|
1790
1763
|
const { position, hOffset, vOffset, blur, spread } = value.value;
|
|
1791
1764
|
const { size: blurSize = "", unit: blurUnit = "" } = blur?.value || {};
|
|
@@ -1804,7 +1777,7 @@ var ItemLabel = ({ value }) => {
|
|
|
1804
1777
|
}
|
|
1805
1778
|
return !size ? CUSTOM_SIZE_LABEL : size;
|
|
1806
1779
|
}).join(" ");
|
|
1807
|
-
return /* @__PURE__ */
|
|
1780
|
+
return /* @__PURE__ */ React39.createElement("span", { style: { textTransform: "capitalize" } }, positionLabel, ": ", sizes);
|
|
1808
1781
|
};
|
|
1809
1782
|
var initialShadow = {
|
|
1810
1783
|
$$type: "shadow",
|
|
@@ -1834,7 +1807,7 @@ var initialShadow = {
|
|
|
1834
1807
|
};
|
|
1835
1808
|
|
|
1836
1809
|
// src/controls/filter-control/filter-repeater-control.tsx
|
|
1837
|
-
import * as
|
|
1810
|
+
import * as React48 from "react";
|
|
1838
1811
|
import {
|
|
1839
1812
|
backdropFilterPropTypeUtil,
|
|
1840
1813
|
filterPropTypeUtil
|
|
@@ -1842,8 +1815,8 @@ import {
|
|
|
1842
1815
|
import { __ as __16 } from "@wordpress/i18n";
|
|
1843
1816
|
|
|
1844
1817
|
// src/controls/filter-control/context/filter-config-context.tsx
|
|
1845
|
-
import * as
|
|
1846
|
-
import { createContext as
|
|
1818
|
+
import * as React40 from "react";
|
|
1819
|
+
import { createContext as createContext9, useContext as useContext9, useMemo as useMemo4 } from "react";
|
|
1847
1820
|
import { cssFilterFunctionPropUtil } from "@elementor/editor-props";
|
|
1848
1821
|
|
|
1849
1822
|
// src/controls/filter-control/utils.ts
|
|
@@ -1942,7 +1915,7 @@ function extractPropType(propType, filterFunctionGroup) {
|
|
|
1942
1915
|
}
|
|
1943
1916
|
|
|
1944
1917
|
// src/controls/filter-control/context/filter-config-context.tsx
|
|
1945
|
-
var FilterConfigContext =
|
|
1918
|
+
var FilterConfigContext = createContext9(null);
|
|
1946
1919
|
function FilterConfigProvider({ children }) {
|
|
1947
1920
|
const propContext = useBoundProp(cssFilterFunctionPropUtil);
|
|
1948
1921
|
const contextValue = useMemo4(() => {
|
|
@@ -1958,10 +1931,10 @@ function FilterConfigProvider({ children }) {
|
|
|
1958
1931
|
getInitialValue: () => config.blur.defaultValue
|
|
1959
1932
|
};
|
|
1960
1933
|
}, [propContext.propType]);
|
|
1961
|
-
return /* @__PURE__ */
|
|
1934
|
+
return /* @__PURE__ */ React40.createElement(FilterConfigContext.Provider, { value: contextValue }, children);
|
|
1962
1935
|
}
|
|
1963
1936
|
function useFilterConfig() {
|
|
1964
|
-
const context =
|
|
1937
|
+
const context = useContext9(FilterConfigContext);
|
|
1965
1938
|
if (!context) {
|
|
1966
1939
|
throw new Error("useFilterConfig must be used within FilterConfigProvider");
|
|
1967
1940
|
}
|
|
@@ -1969,7 +1942,7 @@ function useFilterConfig() {
|
|
|
1969
1942
|
}
|
|
1970
1943
|
|
|
1971
1944
|
// src/controls/filter-control/filter-content.tsx
|
|
1972
|
-
import * as
|
|
1945
|
+
import * as React43 from "react";
|
|
1973
1946
|
import {
|
|
1974
1947
|
cssFilterFunctionPropUtil as cssFilterFunctionPropUtil2
|
|
1975
1948
|
} from "@elementor/editor-props";
|
|
@@ -1977,7 +1950,7 @@ import { Grid as Grid7 } from "@elementor/ui";
|
|
|
1977
1950
|
import { __ as __15 } from "@wordpress/i18n";
|
|
1978
1951
|
|
|
1979
1952
|
// src/controls/filter-control/drop-shadow/drop-shadow-item-content.tsx
|
|
1980
|
-
import * as
|
|
1953
|
+
import * as React41 from "react";
|
|
1981
1954
|
import { useRef as useRef5 } from "react";
|
|
1982
1955
|
import { dropShadowFilterPropTypeUtil } from "@elementor/editor-props";
|
|
1983
1956
|
import { Grid as Grid5 } from "@elementor/ui";
|
|
@@ -2007,7 +1980,7 @@ var items = [
|
|
|
2007
1980
|
var DropShadowItemContent = ({ anchorEl }) => {
|
|
2008
1981
|
const context = useBoundProp(dropShadowFilterPropTypeUtil);
|
|
2009
1982
|
const rowRefs = [useRef5(null), useRef5(null)];
|
|
2010
|
-
return /* @__PURE__ */
|
|
1983
|
+
return /* @__PURE__ */ React41.createElement(PropProvider, { ...context }, items.map((item) => /* @__PURE__ */ React41.createElement(PopoverGridContainer, { key: item.bind, ref: rowRefs[item.rowIndex] ?? null }, /* @__PURE__ */ React41.createElement(PropKeyProvider, { bind: item.bind }, /* @__PURE__ */ React41.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(ControlFormLabel, null, item.label)), /* @__PURE__ */ React41.createElement(Grid5, { item: true, xs: 6 }, item.bind === "color" ? /* @__PURE__ */ React41.createElement(ColorControl, { anchorEl }) : /* @__PURE__ */ React41.createElement(
|
|
2011
1984
|
SizeControl,
|
|
2012
1985
|
{
|
|
2013
1986
|
anchorRef: rowRefs[item.rowIndex],
|
|
@@ -2019,7 +1992,7 @@ var DropShadowItemContent = ({ anchorEl }) => {
|
|
|
2019
1992
|
|
|
2020
1993
|
// src/controls/filter-control/single-size/single-size-item-content.tsx
|
|
2021
1994
|
import { useRef as useRef6 } from "react";
|
|
2022
|
-
import * as
|
|
1995
|
+
import * as React42 from "react";
|
|
2023
1996
|
import {
|
|
2024
1997
|
blurFilterPropTypeUtil,
|
|
2025
1998
|
colorToneFilterPropTypeUtil,
|
|
@@ -2038,7 +2011,7 @@ var SingleSizeItemContent = ({ filterFunc }) => {
|
|
|
2038
2011
|
const { getFilterFunctionConfig } = useFilterConfig();
|
|
2039
2012
|
const { valueName, filterFunctionGroup } = getFilterFunctionConfig(filterFunc);
|
|
2040
2013
|
const context = useBoundProp(propTypeMap[filterFunctionGroup]);
|
|
2041
|
-
return /* @__PURE__ */
|
|
2014
|
+
return /* @__PURE__ */ React42.createElement(PropProvider, { ...context }, /* @__PURE__ */ React42.createElement(PropKeyProvider, { bind: filterFunctionGroup }, /* @__PURE__ */ React42.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React42.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React42.createElement(Grid6, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(ControlFormLabel, null, valueName)), /* @__PURE__ */ React42.createElement(Grid6, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(SizeControl, { anchorRef: rowRef, enablePropTypeUnits: true }))))));
|
|
2042
2015
|
};
|
|
2043
2016
|
|
|
2044
2017
|
// src/controls/filter-control/filter-content.tsx
|
|
@@ -2056,7 +2029,7 @@ var FilterContent = () => {
|
|
|
2056
2029
|
}
|
|
2057
2030
|
propContext.setValue(newValue);
|
|
2058
2031
|
};
|
|
2059
|
-
return /* @__PURE__ */
|
|
2032
|
+
return /* @__PURE__ */ React43.createElement(PropProvider, { ...propContext, setValue: handleValueChange }, /* @__PURE__ */ React43.createElement(PropKeyProvider, { bind: "css-filter-func" }, /* @__PURE__ */ React43.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React43.createElement(PopoverGridContainer, null, /* @__PURE__ */ React43.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(ControlFormLabel, null, __15("Filter", "elementor"))), /* @__PURE__ */ React43.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(PropKeyProvider, { bind: "func" }, /* @__PURE__ */ React43.createElement(SelectControl, { options: filterOptions })))), /* @__PURE__ */ React43.createElement(PropKeyProvider, { bind: "args" }, /* @__PURE__ */ React43.createElement(FilterValueContent, null)))));
|
|
2060
2033
|
};
|
|
2061
2034
|
var FilterValueContent = () => {
|
|
2062
2035
|
const { openItemIndex, items: items2 } = useRepeaterContext();
|
|
@@ -2064,19 +2037,19 @@ var FilterValueContent = () => {
|
|
|
2064
2037
|
const filterFunc = currentItem.item.value.func.value;
|
|
2065
2038
|
const isDropShadow = filterFunc === "drop-shadow";
|
|
2066
2039
|
if (isDropShadow) {
|
|
2067
|
-
return /* @__PURE__ */
|
|
2040
|
+
return /* @__PURE__ */ React43.createElement(DropShadowItemContent, null);
|
|
2068
2041
|
}
|
|
2069
|
-
return /* @__PURE__ */
|
|
2042
|
+
return /* @__PURE__ */ React43.createElement(SingleSizeItemContent, { filterFunc });
|
|
2070
2043
|
};
|
|
2071
2044
|
|
|
2072
2045
|
// src/controls/filter-control/filter-icon.tsx
|
|
2073
|
-
import * as
|
|
2074
|
-
import { styled as
|
|
2046
|
+
import * as React44 from "react";
|
|
2047
|
+
import { styled as styled4, UnstableColorIndicator as UnstableColorIndicator2 } from "@elementor/ui";
|
|
2075
2048
|
var FilterIcon = ({ value }) => {
|
|
2076
2049
|
if (value.value.func.value !== "drop-shadow") {
|
|
2077
2050
|
return null;
|
|
2078
2051
|
}
|
|
2079
|
-
return /* @__PURE__ */
|
|
2052
|
+
return /* @__PURE__ */ React44.createElement(
|
|
2080
2053
|
StyledUnstableColorIndicator2,
|
|
2081
2054
|
{
|
|
2082
2055
|
size: "inherit",
|
|
@@ -2085,15 +2058,15 @@ var FilterIcon = ({ value }) => {
|
|
|
2085
2058
|
}
|
|
2086
2059
|
);
|
|
2087
2060
|
};
|
|
2088
|
-
var StyledUnstableColorIndicator2 =
|
|
2061
|
+
var StyledUnstableColorIndicator2 = styled4(UnstableColorIndicator2)(({ theme }) => ({
|
|
2089
2062
|
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
2090
2063
|
}));
|
|
2091
2064
|
|
|
2092
2065
|
// src/controls/filter-control/filter-label.tsx
|
|
2093
|
-
import * as
|
|
2066
|
+
import * as React47 from "react";
|
|
2094
2067
|
|
|
2095
2068
|
// src/controls/filter-control/drop-shadow/drop-shadow-item-label.tsx
|
|
2096
|
-
import * as
|
|
2069
|
+
import * as React45 from "react";
|
|
2097
2070
|
import { Box as Box5 } from "@elementor/ui";
|
|
2098
2071
|
var DropShadowItemLabel = ({ value }) => {
|
|
2099
2072
|
const values = value.value.args.value;
|
|
@@ -2101,11 +2074,11 @@ var DropShadowItemLabel = ({ value }) => {
|
|
|
2101
2074
|
const labels = keys.map(
|
|
2102
2075
|
(key) => values[key]?.value?.unit !== "custom" ? `${values[key]?.value?.size ?? 0}${values[key]?.value?.unit ?? "px"}` : values[key]?.value?.size || CUSTOM_SIZE_LABEL
|
|
2103
2076
|
);
|
|
2104
|
-
return /* @__PURE__ */
|
|
2077
|
+
return /* @__PURE__ */ React45.createElement(Box5, { component: "span" }, /* @__PURE__ */ React45.createElement(Box5, { component: "span", style: { textTransform: "capitalize" } }, "Drop shadow:"), ` ${labels.join(" ")}`);
|
|
2105
2078
|
};
|
|
2106
2079
|
|
|
2107
2080
|
// src/controls/filter-control/single-size/single-size-item-label.tsx
|
|
2108
|
-
import * as
|
|
2081
|
+
import * as React46 from "react";
|
|
2109
2082
|
import { Box as Box6 } from "@elementor/ui";
|
|
2110
2083
|
var SingleSizeItemLabel = ({ value }) => {
|
|
2111
2084
|
const { func, args } = value.value;
|
|
@@ -2113,16 +2086,16 @@ var SingleSizeItemLabel = ({ value }) => {
|
|
|
2113
2086
|
const { defaultValue } = getFilterFunctionConfig(func.value ?? "");
|
|
2114
2087
|
const defaultUnit = defaultValue.value.args.value?.size?.value?.unit ?? lengthUnits[0];
|
|
2115
2088
|
const { unit, size } = args.value.size?.value ?? { unit: defaultUnit, size: 0 };
|
|
2116
|
-
const label = /* @__PURE__ */
|
|
2117
|
-
return /* @__PURE__ */
|
|
2089
|
+
const label = /* @__PURE__ */ React46.createElement(Box6, { component: "span", style: { textTransform: "capitalize" } }, func.value ?? "", ":");
|
|
2090
|
+
return /* @__PURE__ */ React46.createElement(Box6, { component: "span" }, label, " " + (unit !== "custom" ? `${size ?? 0}${unit ?? defaultUnit}` : size || CUSTOM_SIZE_LABEL));
|
|
2118
2091
|
};
|
|
2119
2092
|
|
|
2120
2093
|
// src/controls/filter-control/filter-label.tsx
|
|
2121
2094
|
var FilterLabel = ({ value }) => {
|
|
2122
2095
|
if (value.value.func.value === "drop-shadow") {
|
|
2123
|
-
return /* @__PURE__ */
|
|
2096
|
+
return /* @__PURE__ */ React47.createElement(DropShadowItemLabel, { value });
|
|
2124
2097
|
}
|
|
2125
|
-
return /* @__PURE__ */
|
|
2098
|
+
return /* @__PURE__ */ React47.createElement(SingleSizeItemLabel, { value });
|
|
2126
2099
|
};
|
|
2127
2100
|
|
|
2128
2101
|
// src/controls/filter-control/filter-repeater-control.tsx
|
|
@@ -2139,7 +2112,7 @@ var FILTER_CONFIG = {
|
|
|
2139
2112
|
var FilterRepeaterControl = createControl(({ filterPropName = "filter" }) => {
|
|
2140
2113
|
const { propTypeUtil, label } = ensureFilterConfig(filterPropName);
|
|
2141
2114
|
const { propType, value: filterValues, setValue } = useBoundProp(propTypeUtil);
|
|
2142
|
-
return /* @__PURE__ */
|
|
2115
|
+
return /* @__PURE__ */ React48.createElement(FilterConfigProvider, null, /* @__PURE__ */ React48.createElement(PropProvider, { propType, value: filterValues, setValue }, /* @__PURE__ */ React48.createElement(
|
|
2143
2116
|
Repeater,
|
|
2144
2117
|
{
|
|
2145
2118
|
propTypeUtil,
|
|
@@ -2150,20 +2123,20 @@ var FilterRepeaterControl = createControl(({ filterPropName = "filter" }) => {
|
|
|
2150
2123
|
});
|
|
2151
2124
|
var Repeater = ({ propTypeUtil, label, filterPropName }) => {
|
|
2152
2125
|
const { getInitialValue: getInitialValue2 } = useFilterConfig();
|
|
2153
|
-
return /* @__PURE__ */
|
|
2126
|
+
return /* @__PURE__ */ React48.createElement(ControlRepeater, { initial: getInitialValue2(), propTypeUtil }, /* @__PURE__ */ React48.createElement(RepeaterHeader, { label }, /* @__PURE__ */ React48.createElement(
|
|
2154
2127
|
TooltipAddItemAction,
|
|
2155
2128
|
{
|
|
2156
2129
|
newItemIndex: 0,
|
|
2157
2130
|
ariaLabel: filterPropName === "backdrop-filter" ? "backdrop filter" : "filter"
|
|
2158
2131
|
}
|
|
2159
|
-
)), /* @__PURE__ */
|
|
2132
|
+
)), /* @__PURE__ */ React48.createElement(ItemsContainer, null, /* @__PURE__ */ React48.createElement(
|
|
2160
2133
|
Item,
|
|
2161
2134
|
{
|
|
2162
2135
|
Label: FilterLabel,
|
|
2163
2136
|
Icon: FilterIcon,
|
|
2164
|
-
actions: /* @__PURE__ */
|
|
2137
|
+
actions: /* @__PURE__ */ React48.createElement(React48.Fragment, null, /* @__PURE__ */ React48.createElement(DuplicateItemAction, null), /* @__PURE__ */ React48.createElement(DisableItemAction, null), /* @__PURE__ */ React48.createElement(RemoveItemAction, null))
|
|
2165
2138
|
}
|
|
2166
|
-
)), /* @__PURE__ */
|
|
2139
|
+
)), /* @__PURE__ */ React48.createElement(EditItemPopover, null, /* @__PURE__ */ React48.createElement(FilterContent, null)));
|
|
2167
2140
|
};
|
|
2168
2141
|
function ensureFilterConfig(name) {
|
|
2169
2142
|
if (name && name in FILTER_CONFIG) {
|
|
@@ -2173,8 +2146,8 @@ function ensureFilterConfig(name) {
|
|
|
2173
2146
|
}
|
|
2174
2147
|
|
|
2175
2148
|
// src/controls/select-control-wrapper.tsx
|
|
2176
|
-
import * as
|
|
2177
|
-
import { useEffect as useEffect5, useState as
|
|
2149
|
+
import * as React49 from "react";
|
|
2150
|
+
import { useEffect as useEffect5, useState as useState5 } from "react";
|
|
2178
2151
|
var getOffCanvasElements = () => {
|
|
2179
2152
|
const extendedWindow = window;
|
|
2180
2153
|
const documentId = extendedWindow.elementor.config.document.id;
|
|
@@ -2192,7 +2165,7 @@ var collectionMethods = {
|
|
|
2192
2165
|
"off-canvas": getOffCanvasElements
|
|
2193
2166
|
};
|
|
2194
2167
|
var useDynamicOptions = (collectionId, initialOptions) => {
|
|
2195
|
-
const [options, setOptions] =
|
|
2168
|
+
const [options, setOptions] = useState5(initialOptions ?? []);
|
|
2196
2169
|
useEffect5(() => {
|
|
2197
2170
|
if (!collectionId || !collectionMethods[collectionId]) {
|
|
2198
2171
|
setOptions(initialOptions ?? []);
|
|
@@ -2205,23 +2178,23 @@ var useDynamicOptions = (collectionId, initialOptions) => {
|
|
|
2205
2178
|
var SelectControlWrapper = createControl(
|
|
2206
2179
|
({ collectionId, options, ...props }) => {
|
|
2207
2180
|
const actualOptions = useDynamicOptions(collectionId, options);
|
|
2208
|
-
return /* @__PURE__ */
|
|
2181
|
+
return /* @__PURE__ */ React49.createElement(SelectControl, { options: actualOptions, ...props });
|
|
2209
2182
|
}
|
|
2210
2183
|
);
|
|
2211
2184
|
|
|
2212
2185
|
// src/controls/toggle-control.tsx
|
|
2213
|
-
import * as
|
|
2186
|
+
import * as React53 from "react";
|
|
2214
2187
|
import { stringPropTypeUtil as stringPropTypeUtil4 } from "@elementor/editor-props";
|
|
2215
2188
|
|
|
2216
2189
|
// src/components/control-toggle-button-group.tsx
|
|
2217
|
-
import * as
|
|
2218
|
-
import { useEffect as useEffect6, useMemo as useMemo5, useRef as useRef7, useState as
|
|
2190
|
+
import * as React51 from "react";
|
|
2191
|
+
import { useEffect as useEffect6, useMemo as useMemo5, useRef as useRef7, useState as useState6 } from "react";
|
|
2219
2192
|
import { ChevronDownIcon } from "@elementor/icons";
|
|
2220
2193
|
import {
|
|
2221
2194
|
ListItemText,
|
|
2222
2195
|
Menu as Menu2,
|
|
2223
2196
|
MenuItem,
|
|
2224
|
-
styled as
|
|
2197
|
+
styled as styled5,
|
|
2225
2198
|
ToggleButton,
|
|
2226
2199
|
ToggleButtonGroup,
|
|
2227
2200
|
Typography as Typography3,
|
|
@@ -2229,18 +2202,18 @@ import {
|
|
|
2229
2202
|
} from "@elementor/ui";
|
|
2230
2203
|
|
|
2231
2204
|
// src/components/conditional-tooltip.tsx
|
|
2232
|
-
import * as
|
|
2205
|
+
import * as React50 from "react";
|
|
2233
2206
|
import { Tooltip as Tooltip4 } from "@elementor/ui";
|
|
2234
2207
|
var ConditionalTooltip = ({
|
|
2235
2208
|
showTooltip,
|
|
2236
2209
|
children,
|
|
2237
2210
|
label
|
|
2238
2211
|
}) => {
|
|
2239
|
-
return showTooltip && label ? /* @__PURE__ */
|
|
2212
|
+
return showTooltip && label ? /* @__PURE__ */ React50.createElement(Tooltip4, { title: label, disableFocusListener: true, placement: "top" }, children) : children;
|
|
2240
2213
|
};
|
|
2241
2214
|
|
|
2242
2215
|
// src/components/control-toggle-button-group.tsx
|
|
2243
|
-
var StyledToggleButtonGroup =
|
|
2216
|
+
var StyledToggleButtonGroup = styled5(ToggleButtonGroup)`
|
|
2244
2217
|
${({ justify }) => `justify-content: ${justify};`}
|
|
2245
2218
|
button:not( :last-of-type ) {
|
|
2246
2219
|
border-start-end-radius: 0;
|
|
@@ -2255,7 +2228,7 @@ var StyledToggleButtonGroup = styled6(ToggleButtonGroup)`
|
|
|
2255
2228
|
border-end-end-radius: 8px;
|
|
2256
2229
|
}
|
|
2257
2230
|
`;
|
|
2258
|
-
var StyledToggleButton =
|
|
2231
|
+
var StyledToggleButton = styled5(ToggleButton, {
|
|
2259
2232
|
shouldForwardProp: (prop) => prop !== "isPlaceholder"
|
|
2260
2233
|
})`
|
|
2261
2234
|
${({ theme, isPlaceholder }) => isPlaceholder && `
|
|
@@ -2267,7 +2240,7 @@ var StyledToggleButton = styled6(ToggleButton, {
|
|
|
2267
2240
|
}
|
|
2268
2241
|
`}
|
|
2269
2242
|
`;
|
|
2270
|
-
var ToggleButtonGroupUi =
|
|
2243
|
+
var ToggleButtonGroupUi = React51.forwardRef(
|
|
2271
2244
|
({
|
|
2272
2245
|
justify = "end",
|
|
2273
2246
|
size = "tiny",
|
|
@@ -2312,7 +2285,7 @@ var ToggleButtonGroupUi = React52.forwardRef(
|
|
|
2312
2285
|
return [];
|
|
2313
2286
|
};
|
|
2314
2287
|
const placeholderArray = getPlaceholderArray(placeholder);
|
|
2315
|
-
return /* @__PURE__ */
|
|
2288
|
+
return /* @__PURE__ */ React51.createElement(
|
|
2316
2289
|
StyledToggleButtonGroup,
|
|
2317
2290
|
{
|
|
2318
2291
|
ref,
|
|
@@ -2330,14 +2303,14 @@ var ToggleButtonGroupUi = React52.forwardRef(
|
|
|
2330
2303
|
},
|
|
2331
2304
|
fixedItems.map(({ label, value: buttonValue, renderContent: Content3, showTooltip }) => {
|
|
2332
2305
|
const isPlaceholder = placeholderArray.length > 0 && placeholderArray.includes(buttonValue) && (shouldShowExclusivePlaceholder || shouldShowNonExclusivePlaceholder);
|
|
2333
|
-
return /* @__PURE__ */
|
|
2306
|
+
return /* @__PURE__ */ React51.createElement(
|
|
2334
2307
|
ConditionalTooltip,
|
|
2335
2308
|
{
|
|
2336
2309
|
key: buttonValue,
|
|
2337
2310
|
label,
|
|
2338
2311
|
showTooltip: showTooltip || false
|
|
2339
2312
|
},
|
|
2340
|
-
/* @__PURE__ */
|
|
2313
|
+
/* @__PURE__ */ React51.createElement(
|
|
2341
2314
|
StyledToggleButton,
|
|
2342
2315
|
{
|
|
2343
2316
|
value: buttonValue,
|
|
@@ -2346,11 +2319,11 @@ var ToggleButtonGroupUi = React52.forwardRef(
|
|
|
2346
2319
|
fullWidth,
|
|
2347
2320
|
isPlaceholder
|
|
2348
2321
|
},
|
|
2349
|
-
/* @__PURE__ */
|
|
2322
|
+
/* @__PURE__ */ React51.createElement(Content3, { size })
|
|
2350
2323
|
)
|
|
2351
2324
|
);
|
|
2352
2325
|
}),
|
|
2353
|
-
menuItems.length && exclusive && /* @__PURE__ */
|
|
2326
|
+
menuItems.length && exclusive && /* @__PURE__ */ React51.createElement(
|
|
2354
2327
|
SplitButtonGroup,
|
|
2355
2328
|
{
|
|
2356
2329
|
size,
|
|
@@ -2364,7 +2337,7 @@ var ToggleButtonGroupUi = React52.forwardRef(
|
|
|
2364
2337
|
}
|
|
2365
2338
|
);
|
|
2366
2339
|
var ControlToggleButtonGroup = (props) => {
|
|
2367
|
-
return /* @__PURE__ */
|
|
2340
|
+
return /* @__PURE__ */ React51.createElement(ControlActions, null, /* @__PURE__ */ React51.createElement(ToggleButtonGroupUi, { ...props }));
|
|
2368
2341
|
};
|
|
2369
2342
|
var SplitButtonGroup = ({
|
|
2370
2343
|
size = "tiny",
|
|
@@ -2374,7 +2347,7 @@ var SplitButtonGroup = ({
|
|
|
2374
2347
|
value
|
|
2375
2348
|
}) => {
|
|
2376
2349
|
const previewButton = usePreviewButton(items2, value);
|
|
2377
|
-
const [isMenuOpen, setIsMenuOpen] =
|
|
2350
|
+
const [isMenuOpen, setIsMenuOpen] = useState6(false);
|
|
2378
2351
|
const menuButtonRef = useRef7(null);
|
|
2379
2352
|
const onMenuToggle = (ev) => {
|
|
2380
2353
|
setIsMenuOpen((prev) => !prev);
|
|
@@ -2388,7 +2361,7 @@ var SplitButtonGroup = ({
|
|
|
2388
2361
|
const shouldRemove = newValue === value;
|
|
2389
2362
|
onChange(shouldRemove ? null : newValue);
|
|
2390
2363
|
};
|
|
2391
|
-
return /* @__PURE__ */
|
|
2364
|
+
return /* @__PURE__ */ React51.createElement(React51.Fragment, null, /* @__PURE__ */ React51.createElement(
|
|
2392
2365
|
ToggleButton,
|
|
2393
2366
|
{
|
|
2394
2367
|
value: previewButton.value,
|
|
@@ -2401,7 +2374,7 @@ var SplitButtonGroup = ({
|
|
|
2401
2374
|
}
|
|
2402
2375
|
},
|
|
2403
2376
|
previewButton.renderContent({ size })
|
|
2404
|
-
), /* @__PURE__ */
|
|
2377
|
+
), /* @__PURE__ */ React51.createElement(
|
|
2405
2378
|
ToggleButton,
|
|
2406
2379
|
{
|
|
2407
2380
|
size,
|
|
@@ -2412,8 +2385,8 @@ var SplitButtonGroup = ({
|
|
|
2412
2385
|
ref: menuButtonRef,
|
|
2413
2386
|
value: "__chevron-icon-button__"
|
|
2414
2387
|
},
|
|
2415
|
-
/* @__PURE__ */
|
|
2416
|
-
), /* @__PURE__ */
|
|
2388
|
+
/* @__PURE__ */ React51.createElement(ChevronDownIcon, { fontSize: size })
|
|
2389
|
+
), /* @__PURE__ */ React51.createElement(
|
|
2417
2390
|
Menu2,
|
|
2418
2391
|
{
|
|
2419
2392
|
open: isMenuOpen,
|
|
@@ -2431,19 +2404,19 @@ var SplitButtonGroup = ({
|
|
|
2431
2404
|
mt: 0.5
|
|
2432
2405
|
}
|
|
2433
2406
|
},
|
|
2434
|
-
items2.map(({ label, value: buttonValue }) => /* @__PURE__ */
|
|
2407
|
+
items2.map(({ label, value: buttonValue }) => /* @__PURE__ */ React51.createElement(
|
|
2435
2408
|
MenuItem,
|
|
2436
2409
|
{
|
|
2437
2410
|
key: buttonValue,
|
|
2438
2411
|
selected: buttonValue === value,
|
|
2439
2412
|
onClick: () => onMenuItemClick(buttonValue)
|
|
2440
2413
|
},
|
|
2441
|
-
/* @__PURE__ */
|
|
2414
|
+
/* @__PURE__ */ React51.createElement(ListItemText, null, /* @__PURE__ */ React51.createElement(Typography3, { sx: { fontSize: "14px" } }, label))
|
|
2442
2415
|
))
|
|
2443
2416
|
));
|
|
2444
2417
|
};
|
|
2445
2418
|
var usePreviewButton = (items2, value) => {
|
|
2446
|
-
const [previewButton, setPreviewButton] =
|
|
2419
|
+
const [previewButton, setPreviewButton] = useState6(
|
|
2447
2420
|
items2.find((item) => item.value === value) ?? items2[0]
|
|
2448
2421
|
);
|
|
2449
2422
|
useEffect6(() => {
|
|
@@ -2456,7 +2429,7 @@ var usePreviewButton = (items2, value) => {
|
|
|
2456
2429
|
};
|
|
2457
2430
|
|
|
2458
2431
|
// src/utils/convert-toggle-options-to-atomic.tsx
|
|
2459
|
-
import * as
|
|
2432
|
+
import * as React52 from "react";
|
|
2460
2433
|
import * as Icons from "@elementor/icons";
|
|
2461
2434
|
var convertToggleOptionsToAtomic = (options) => {
|
|
2462
2435
|
return options.map((option) => {
|
|
@@ -2467,7 +2440,7 @@ var convertToggleOptionsToAtomic = (options) => {
|
|
|
2467
2440
|
label: option.label,
|
|
2468
2441
|
renderContent: ({ size }) => {
|
|
2469
2442
|
if (IconComponent) {
|
|
2470
|
-
return /* @__PURE__ */
|
|
2443
|
+
return /* @__PURE__ */ React52.createElement(IconComponent, { fontSize: size });
|
|
2471
2444
|
}
|
|
2472
2445
|
return option.label;
|
|
2473
2446
|
},
|
|
@@ -2503,7 +2476,7 @@ var ToggleControl = createControl(
|
|
|
2503
2476
|
size,
|
|
2504
2477
|
placeholder
|
|
2505
2478
|
};
|
|
2506
|
-
return exclusive ? /* @__PURE__ */
|
|
2479
|
+
return exclusive ? /* @__PURE__ */ React53.createElement(
|
|
2507
2480
|
ControlToggleButtonGroup,
|
|
2508
2481
|
{
|
|
2509
2482
|
...toggleButtonGroupProps,
|
|
@@ -2512,7 +2485,7 @@ var ToggleControl = createControl(
|
|
|
2512
2485
|
disabled,
|
|
2513
2486
|
exclusive: true
|
|
2514
2487
|
}
|
|
2515
|
-
) : /* @__PURE__ */
|
|
2488
|
+
) : /* @__PURE__ */ React53.createElement(
|
|
2516
2489
|
ControlToggleButtonGroup,
|
|
2517
2490
|
{
|
|
2518
2491
|
...toggleButtonGroupProps,
|
|
@@ -2526,7 +2499,7 @@ var ToggleControl = createControl(
|
|
|
2526
2499
|
);
|
|
2527
2500
|
|
|
2528
2501
|
// src/controls/number-control.tsx
|
|
2529
|
-
import * as
|
|
2502
|
+
import * as React54 from "react";
|
|
2530
2503
|
import { numberPropTypeUtil } from "@elementor/editor-props";
|
|
2531
2504
|
import { InputAdornment as InputAdornment3 } from "@elementor/ui";
|
|
2532
2505
|
var isEmptyOrNaN = (value) => value === null || value === void 0 || value === "" || Number.isNaN(Number(value));
|
|
@@ -2557,7 +2530,7 @@ var NumberControl = createControl(
|
|
|
2557
2530
|
}
|
|
2558
2531
|
setValue(updatedValue, void 0, { validation: () => isInputValid });
|
|
2559
2532
|
};
|
|
2560
|
-
return /* @__PURE__ */
|
|
2533
|
+
return /* @__PURE__ */ React54.createElement(ControlActions, null, /* @__PURE__ */ React54.createElement(
|
|
2561
2534
|
NumberInput,
|
|
2562
2535
|
{
|
|
2563
2536
|
size: "tiny",
|
|
@@ -2570,7 +2543,7 @@ var NumberControl = createControl(
|
|
|
2570
2543
|
placeholder: labelPlaceholder ?? (isEmptyOrNaN(placeholder) ? "" : String(placeholder)),
|
|
2571
2544
|
inputProps: { step, min },
|
|
2572
2545
|
InputProps: {
|
|
2573
|
-
startAdornment: startIcon ? /* @__PURE__ */
|
|
2546
|
+
startAdornment: startIcon ? /* @__PURE__ */ React54.createElement(InputAdornment3, { position: "start", disabled }, startIcon) : void 0
|
|
2574
2547
|
}
|
|
2575
2548
|
}
|
|
2576
2549
|
));
|
|
@@ -2578,7 +2551,7 @@ var NumberControl = createControl(
|
|
|
2578
2551
|
);
|
|
2579
2552
|
|
|
2580
2553
|
// src/controls/equal-unequal-sizes-control.tsx
|
|
2581
|
-
import * as
|
|
2554
|
+
import * as React55 from "react";
|
|
2582
2555
|
import { useId as useId2, useRef as useRef8 } from "react";
|
|
2583
2556
|
import { bindPopover as bindPopover3, bindToggle, Box as Box7, Grid as Grid8, Popover as Popover3, Stack as Stack7, Tooltip as Tooltip5, usePopupState as usePopupState4 } from "@elementor/ui";
|
|
2584
2557
|
import { __ as __17 } from "@wordpress/i18n";
|
|
@@ -2629,14 +2602,14 @@ function EqualUnequalSizesControl({
|
|
|
2629
2602
|
}
|
|
2630
2603
|
setMasterValue(Object.values(newValue)?.pop() ?? null);
|
|
2631
2604
|
};
|
|
2632
|
-
return /* @__PURE__ */
|
|
2605
|
+
return /* @__PURE__ */ React55.createElement(React55.Fragment, null, /* @__PURE__ */ React55.createElement(Grid8, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRefs[0] }, /* @__PURE__ */ React55.createElement(Grid8, { item: true, xs: 6 }, !isShowingGeneralIndicator ? /* @__PURE__ */ React55.createElement(ControlFormLabel, null, label) : /* @__PURE__ */ React55.createElement(ControlLabel, null, label)), /* @__PURE__ */ React55.createElement(Grid8, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(Stack7, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React55.createElement(Box7, { flexGrow: 1 }, /* @__PURE__ */ React55.createElement(
|
|
2633
2606
|
SizeControl,
|
|
2634
2607
|
{
|
|
2635
2608
|
placeholder: isMixed ? __17("Mixed", "elementor") : void 0,
|
|
2636
2609
|
enablePropTypeUnits: !isMixed || !isMixedPlaceholder,
|
|
2637
2610
|
anchorRef: rowRefs[0]
|
|
2638
2611
|
}
|
|
2639
|
-
)), /* @__PURE__ */
|
|
2612
|
+
)), /* @__PURE__ */ React55.createElement(Tooltip5, { title: tooltipLabel, placement: "top" }, /* @__PURE__ */ React55.createElement(
|
|
2640
2613
|
StyledToggleButton,
|
|
2641
2614
|
{
|
|
2642
2615
|
size: "tiny",
|
|
@@ -2648,7 +2621,7 @@ function EqualUnequalSizesControl({
|
|
|
2648
2621
|
"aria-label": tooltipLabel
|
|
2649
2622
|
},
|
|
2650
2623
|
icon
|
|
2651
|
-
))))), /* @__PURE__ */
|
|
2624
|
+
))))), /* @__PURE__ */ React55.createElement(
|
|
2652
2625
|
Popover3,
|
|
2653
2626
|
{
|
|
2654
2627
|
disablePortal: true,
|
|
@@ -2666,7 +2639,7 @@ function EqualUnequalSizesControl({
|
|
|
2666
2639
|
paper: { sx: { mt: 0.5, width: rowRefs[0].current?.getBoundingClientRect().width } }
|
|
2667
2640
|
}
|
|
2668
2641
|
},
|
|
2669
|
-
/* @__PURE__ */
|
|
2642
|
+
/* @__PURE__ */ React55.createElement(
|
|
2670
2643
|
PropProvider,
|
|
2671
2644
|
{
|
|
2672
2645
|
propType: multiSizePropType,
|
|
@@ -2675,18 +2648,18 @@ function EqualUnequalSizesControl({
|
|
|
2675
2648
|
setValue: applyMultiSizeValue,
|
|
2676
2649
|
isDisabled: () => multiSizeDisabled
|
|
2677
2650
|
},
|
|
2678
|
-
/* @__PURE__ */
|
|
2651
|
+
/* @__PURE__ */ React55.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React55.createElement(PopoverGridContainer, { ref: rowRefs[1] }, /* @__PURE__ */ React55.createElement(MultiSizeValueControl, { item: items2[0], rowRef: rowRefs[1] }), /* @__PURE__ */ React55.createElement(MultiSizeValueControl, { item: items2[1], rowRef: rowRefs[1] })), /* @__PURE__ */ React55.createElement(PopoverGridContainer, { ref: rowRefs[2] }, /* @__PURE__ */ React55.createElement(MultiSizeValueControl, { item: items2[2], rowRef: rowRefs[2] }), /* @__PURE__ */ React55.createElement(MultiSizeValueControl, { item: items2[3], rowRef: rowRefs[2] })))
|
|
2679
2652
|
)
|
|
2680
2653
|
));
|
|
2681
2654
|
}
|
|
2682
2655
|
var MultiSizeValueControl = ({ item, rowRef }) => {
|
|
2683
2656
|
const { bind, label, icon, ariaLabel } = item;
|
|
2684
|
-
return /* @__PURE__ */
|
|
2657
|
+
return /* @__PURE__ */ React55.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React55.createElement(Grid8, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(Grid8, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React55.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React55.createElement(ControlLabel, null, label)), /* @__PURE__ */ React55.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React55.createElement(SizeControl, { startIcon: icon, ariaLabel, anchorRef: rowRef })))));
|
|
2685
2658
|
};
|
|
2686
2659
|
|
|
2687
2660
|
// src/controls/linked-dimensions-control.tsx
|
|
2688
|
-
import * as
|
|
2689
|
-
import { useLayoutEffect, useRef as useRef9, useState as
|
|
2661
|
+
import * as React56 from "react";
|
|
2662
|
+
import { useLayoutEffect, useRef as useRef9, useState as useState7 } from "react";
|
|
2690
2663
|
import { dimensionsPropTypeUtil, sizePropTypeUtil as sizePropTypeUtil3 } from "@elementor/editor-props";
|
|
2691
2664
|
import { useActiveBreakpoint as useActiveBreakpoint2 } from "@elementor/editor-responsive";
|
|
2692
2665
|
import { DetachIcon, LinkIcon, SideBottomIcon, SideLeftIcon, SideRightIcon, SideTopIcon } from "@elementor/icons";
|
|
@@ -2712,7 +2685,7 @@ var LinkedDimensionsControl = ({ label, isSiteRtl = false, extendedOptions, min
|
|
|
2712
2685
|
}
|
|
2713
2686
|
return true;
|
|
2714
2687
|
};
|
|
2715
|
-
const [isLinked, setIsLinked] =
|
|
2688
|
+
const [isLinked, setIsLinked] = useState7(() => inferIsLinked());
|
|
2716
2689
|
const activeBreakpoint = useActiveBreakpoint2();
|
|
2717
2690
|
useLayoutEffect(() => {
|
|
2718
2691
|
setIsLinked(inferIsLinked);
|
|
@@ -2755,7 +2728,7 @@ var LinkedDimensionsControl = ({ label, isSiteRtl = false, extendedOptions, min
|
|
|
2755
2728
|
isDisabled: () => dimensionsDisabled
|
|
2756
2729
|
};
|
|
2757
2730
|
const hasPlaceholders = !masterValue && (dimensionsPlaceholder || masterPlaceholder);
|
|
2758
|
-
return /* @__PURE__ */
|
|
2731
|
+
return /* @__PURE__ */ React56.createElement(PropProvider, { ...propProviderProps }, /* @__PURE__ */ React56.createElement(Stack8, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React56.createElement(ControlFormLabel, null, label), /* @__PURE__ */ React56.createElement(Tooltip6, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React56.createElement(
|
|
2759
2732
|
StyledToggleButton,
|
|
2760
2733
|
{
|
|
2761
2734
|
"aria-label": isLinked ? unlinkedLabel : linkedLabel,
|
|
@@ -2767,8 +2740,8 @@ var LinkedDimensionsControl = ({ label, isSiteRtl = false, extendedOptions, min
|
|
|
2767
2740
|
disabled,
|
|
2768
2741
|
isPlaceholder: hasPlaceholders
|
|
2769
2742
|
},
|
|
2770
|
-
/* @__PURE__ */
|
|
2771
|
-
))), getCssDimensionProps(label, isSiteRtl).map((row, index) => /* @__PURE__ */
|
|
2743
|
+
/* @__PURE__ */ React56.createElement(LinkedIcon, { fontSize: "tiny" })
|
|
2744
|
+
))), getCssDimensionProps(label, isSiteRtl).map((row, index) => /* @__PURE__ */ React56.createElement(Stack8, { direction: "row", gap: 2, flexWrap: "nowrap", key: index, ref: gridRowRefs[index] }, row.map(({ icon, ...props }) => /* @__PURE__ */ React56.createElement(Grid9, { container: true, gap: 0.75, alignItems: "center", key: props.bind }, /* @__PURE__ */ React56.createElement(Grid9, { item: true, xs: 12 }, /* @__PURE__ */ React56.createElement(Label, { ...props })), /* @__PURE__ */ React56.createElement(Grid9, { item: true, xs: 12 }, /* @__PURE__ */ React56.createElement(
|
|
2772
2745
|
Control3,
|
|
2773
2746
|
{
|
|
2774
2747
|
bind: props.bind,
|
|
@@ -2791,7 +2764,7 @@ var Control3 = ({
|
|
|
2791
2764
|
min
|
|
2792
2765
|
}) => {
|
|
2793
2766
|
if (isLinked) {
|
|
2794
|
-
return /* @__PURE__ */
|
|
2767
|
+
return /* @__PURE__ */ React56.createElement(
|
|
2795
2768
|
SizeControl,
|
|
2796
2769
|
{
|
|
2797
2770
|
ariaLabel,
|
|
@@ -2802,7 +2775,7 @@ var Control3 = ({
|
|
|
2802
2775
|
}
|
|
2803
2776
|
);
|
|
2804
2777
|
}
|
|
2805
|
-
return /* @__PURE__ */
|
|
2778
|
+
return /* @__PURE__ */ React56.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React56.createElement(
|
|
2806
2779
|
SizeControl,
|
|
2807
2780
|
{
|
|
2808
2781
|
ariaLabel,
|
|
@@ -2814,7 +2787,7 @@ var Control3 = ({
|
|
|
2814
2787
|
));
|
|
2815
2788
|
};
|
|
2816
2789
|
var Label = ({ label, bind }) => {
|
|
2817
|
-
return /* @__PURE__ */
|
|
2790
|
+
return /* @__PURE__ */ React56.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React56.createElement(ControlLabel, null, label));
|
|
2818
2791
|
};
|
|
2819
2792
|
function getCssDimensionProps(label, isSiteRtl) {
|
|
2820
2793
|
return [
|
|
@@ -2824,7 +2797,7 @@ function getCssDimensionProps(label, isSiteRtl) {
|
|
|
2824
2797
|
label: __18("Top", "elementor"),
|
|
2825
2798
|
/* translators: %s is the name of the main group (margin or padding) */
|
|
2826
2799
|
ariaLabel: sprintf2(__18("%s top", "elementor"), label),
|
|
2827
|
-
icon: /* @__PURE__ */
|
|
2800
|
+
icon: /* @__PURE__ */ React56.createElement(SideTopIcon, { fontSize: "tiny" })
|
|
2828
2801
|
},
|
|
2829
2802
|
{
|
|
2830
2803
|
bind: "inline-end",
|
|
@@ -2836,7 +2809,7 @@ function getCssDimensionProps(label, isSiteRtl) {
|
|
|
2836
2809
|
/* translators: %s is the name of the main group (margin or padding) */
|
|
2837
2810
|
sprintf2(__18("%s right", "elementor"), label)
|
|
2838
2811
|
),
|
|
2839
|
-
icon: isSiteRtl ? /* @__PURE__ */
|
|
2812
|
+
icon: isSiteRtl ? /* @__PURE__ */ React56.createElement(SideLeftIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React56.createElement(SideRightIcon, { fontSize: "tiny" })
|
|
2840
2813
|
}
|
|
2841
2814
|
],
|
|
2842
2815
|
[
|
|
@@ -2845,7 +2818,7 @@ function getCssDimensionProps(label, isSiteRtl) {
|
|
|
2845
2818
|
label: __18("Bottom", "elementor"),
|
|
2846
2819
|
/* translators: %s is the name of the main group (margin or padding) */
|
|
2847
2820
|
ariaLabel: sprintf2(__18("%s bottom", "elementor"), label),
|
|
2848
|
-
icon: /* @__PURE__ */
|
|
2821
|
+
icon: /* @__PURE__ */ React56.createElement(SideBottomIcon, { fontSize: "tiny" })
|
|
2849
2822
|
},
|
|
2850
2823
|
{
|
|
2851
2824
|
bind: "inline-start",
|
|
@@ -2857,22 +2830,22 @@ function getCssDimensionProps(label, isSiteRtl) {
|
|
|
2857
2830
|
/* translators: %s is the name of the main group (margin or padding) */
|
|
2858
2831
|
sprintf2(__18("%s left", "elementor"), label)
|
|
2859
2832
|
),
|
|
2860
|
-
icon: isSiteRtl ? /* @__PURE__ */
|
|
2833
|
+
icon: isSiteRtl ? /* @__PURE__ */ React56.createElement(SideRightIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React56.createElement(SideLeftIcon, { fontSize: "tiny" })
|
|
2861
2834
|
}
|
|
2862
2835
|
]
|
|
2863
2836
|
];
|
|
2864
2837
|
}
|
|
2865
2838
|
|
|
2866
2839
|
// src/controls/font-family-control/font-family-control.tsx
|
|
2867
|
-
import * as
|
|
2840
|
+
import * as React58 from "react";
|
|
2868
2841
|
import { stringPropTypeUtil as stringPropTypeUtil5 } from "@elementor/editor-props";
|
|
2869
2842
|
import { ChevronDownIcon as ChevronDownIcon2, TextIcon } from "@elementor/icons";
|
|
2870
2843
|
import { bindPopover as bindPopover4, bindTrigger as bindTrigger3, Popover as Popover4, UnstableTag as UnstableTag2, usePopupState as usePopupState5 } from "@elementor/ui";
|
|
2871
2844
|
import { __ as __20 } from "@wordpress/i18n";
|
|
2872
2845
|
|
|
2873
2846
|
// src/components/item-selector.tsx
|
|
2874
|
-
import * as
|
|
2875
|
-
import { useCallback as useCallback2, useEffect as useEffect7, useState as
|
|
2847
|
+
import * as React57 from "react";
|
|
2848
|
+
import { useCallback as useCallback2, useEffect as useEffect7, useState as useState8 } from "react";
|
|
2876
2849
|
import { PopoverBody, PopoverHeader as PopoverHeader2, PopoverMenuList, SearchField } from "@elementor/editor-ui";
|
|
2877
2850
|
import { Box as Box8, Divider as Divider2, Link, Stack as Stack9, Typography as Typography4 } from "@elementor/ui";
|
|
2878
2851
|
import { debounce } from "@elementor/utils";
|
|
@@ -2911,7 +2884,7 @@ var ItemSelector = ({
|
|
|
2911
2884
|
footer,
|
|
2912
2885
|
categoryItemContentTemplate
|
|
2913
2886
|
}) => {
|
|
2914
|
-
const [searchValue, setSearchValue] =
|
|
2887
|
+
const [searchValue, setSearchValue] = useState8("");
|
|
2915
2888
|
const filteredItemsList = useFilteredItemsList(itemsList, searchValue, disabledItems);
|
|
2916
2889
|
const IconComponent = icon;
|
|
2917
2890
|
const handleSearch = (value) => {
|
|
@@ -2921,7 +2894,7 @@ var ItemSelector = ({
|
|
|
2921
2894
|
setSearchValue("");
|
|
2922
2895
|
onClose();
|
|
2923
2896
|
};
|
|
2924
|
-
return /* @__PURE__ */
|
|
2897
|
+
return /* @__PURE__ */ React57.createElement(PopoverBody, { width: sectionWidth, id }, /* @__PURE__ */ React57.createElement(PopoverHeader2, { title, onClose: handleClose, icon: /* @__PURE__ */ React57.createElement(IconComponent, { fontSize: "tiny" }) }), /* @__PURE__ */ React57.createElement(
|
|
2925
2898
|
SearchField,
|
|
2926
2899
|
{
|
|
2927
2900
|
value: searchValue,
|
|
@@ -2929,7 +2902,7 @@ var ItemSelector = ({
|
|
|
2929
2902
|
placeholder: __19("Search", "elementor"),
|
|
2930
2903
|
id: id + "-search"
|
|
2931
2904
|
}
|
|
2932
|
-
), /* @__PURE__ */
|
|
2905
|
+
), /* @__PURE__ */ React57.createElement(Divider2, null), /* @__PURE__ */ React57.createElement(Box8, { sx: { flex: 1, overflow: "auto", minHeight: 0 } }, filteredItemsList.length > 0 ? /* @__PURE__ */ React57.createElement(
|
|
2933
2906
|
ItemList,
|
|
2934
2907
|
{
|
|
2935
2908
|
itemListItems: filteredItemsList,
|
|
@@ -2940,7 +2913,7 @@ var ItemSelector = ({
|
|
|
2940
2913
|
onDebounce,
|
|
2941
2914
|
categoryItemContentTemplate
|
|
2942
2915
|
}
|
|
2943
|
-
) : /* @__PURE__ */
|
|
2916
|
+
) : /* @__PURE__ */ React57.createElement(
|
|
2944
2917
|
Stack9,
|
|
2945
2918
|
{
|
|
2946
2919
|
alignItems: "center",
|
|
@@ -2950,16 +2923,16 @@ var ItemSelector = ({
|
|
|
2950
2923
|
gap: 1.5,
|
|
2951
2924
|
overflow: "hidden"
|
|
2952
2925
|
},
|
|
2953
|
-
/* @__PURE__ */
|
|
2954
|
-
/* @__PURE__ */
|
|
2926
|
+
/* @__PURE__ */ React57.createElement(IconComponent, { fontSize: "large" }),
|
|
2927
|
+
/* @__PURE__ */ React57.createElement(Box8, { sx: { maxWidth: 160, overflow: "hidden" } }, /* @__PURE__ */ React57.createElement(Typography4, { align: "center", variant: "subtitle2", color: "text.secondary" }, __19("Sorry, nothing matched", "elementor")), /* @__PURE__ */ React57.createElement(
|
|
2955
2928
|
Typography4,
|
|
2956
2929
|
{
|
|
2957
2930
|
variant: "subtitle2",
|
|
2958
2931
|
color: "text.secondary",
|
|
2959
2932
|
sx: { display: "flex", width: "100%", justifyContent: "center" }
|
|
2960
2933
|
},
|
|
2961
|
-
/* @__PURE__ */
|
|
2962
|
-
/* @__PURE__ */
|
|
2934
|
+
/* @__PURE__ */ React57.createElement("span", null, "\u201C"),
|
|
2935
|
+
/* @__PURE__ */ React57.createElement(
|
|
2963
2936
|
Box8,
|
|
2964
2937
|
{
|
|
2965
2938
|
component: "span",
|
|
@@ -2967,9 +2940,9 @@ var ItemSelector = ({
|
|
|
2967
2940
|
},
|
|
2968
2941
|
searchValue
|
|
2969
2942
|
),
|
|
2970
|
-
/* @__PURE__ */
|
|
2943
|
+
/* @__PURE__ */ React57.createElement("span", null, "\u201D.")
|
|
2971
2944
|
)),
|
|
2972
|
-
/* @__PURE__ */
|
|
2945
|
+
/* @__PURE__ */ React57.createElement(
|
|
2973
2946
|
Typography4,
|
|
2974
2947
|
{
|
|
2975
2948
|
align: "center",
|
|
@@ -2978,7 +2951,7 @@ var ItemSelector = ({
|
|
|
2978
2951
|
sx: { display: "flex", flexDirection: "column" }
|
|
2979
2952
|
},
|
|
2980
2953
|
__19("Try something else.", "elementor"),
|
|
2981
|
-
/* @__PURE__ */
|
|
2954
|
+
/* @__PURE__ */ React57.createElement(
|
|
2982
2955
|
Link,
|
|
2983
2956
|
{
|
|
2984
2957
|
color: "secondary",
|
|
@@ -3010,7 +2983,7 @@ var ItemList = ({
|
|
|
3010
2983
|
});
|
|
3011
2984
|
}, 100);
|
|
3012
2985
|
const memoizedItemStyle = useCallback2((item) => itemStyle(item), [itemStyle]);
|
|
3013
|
-
return /* @__PURE__ */
|
|
2986
|
+
return /* @__PURE__ */ React57.createElement(
|
|
3014
2987
|
PopoverMenuList,
|
|
3015
2988
|
{
|
|
3016
2989
|
items: itemListItems,
|
|
@@ -3025,7 +2998,7 @@ var ItemList = ({
|
|
|
3025
2998
|
);
|
|
3026
2999
|
};
|
|
3027
3000
|
var useDebounce = (fn, delay) => {
|
|
3028
|
-
const [debouncedFn] =
|
|
3001
|
+
const [debouncedFn] = useState8(() => debounce(fn, delay));
|
|
3029
3002
|
useEffect7(() => () => debouncedFn.cancel(), [debouncedFn]);
|
|
3030
3003
|
return debouncedFn;
|
|
3031
3004
|
};
|
|
@@ -3047,19 +3020,19 @@ var FontFamilyControl = createControl(
|
|
|
3047
3020
|
} = useBoundProp(stringPropTypeUtil5);
|
|
3048
3021
|
const popoverState = usePopupState5({ variant: "popover" });
|
|
3049
3022
|
const isShowingPlaceholder = !fontFamily && placeholder;
|
|
3050
|
-
const mapFontSubs =
|
|
3023
|
+
const mapFontSubs = React58.useMemo(() => {
|
|
3051
3024
|
return fontFamilies.map(({ label, fonts }) => ({
|
|
3052
3025
|
label,
|
|
3053
3026
|
items: fonts
|
|
3054
3027
|
}));
|
|
3055
3028
|
}, [fontFamilies]);
|
|
3056
|
-
return /* @__PURE__ */
|
|
3029
|
+
return /* @__PURE__ */ React58.createElement(React58.Fragment, null, /* @__PURE__ */ React58.createElement(ControlActions, null, /* @__PURE__ */ React58.createElement(
|
|
3057
3030
|
UnstableTag2,
|
|
3058
3031
|
{
|
|
3059
3032
|
id: "font-family-control",
|
|
3060
3033
|
variant: "outlined",
|
|
3061
3034
|
label: fontFamily || placeholder,
|
|
3062
|
-
endIcon: /* @__PURE__ */
|
|
3035
|
+
endIcon: /* @__PURE__ */ React58.createElement(ChevronDownIcon2, { fontSize: "tiny" }),
|
|
3063
3036
|
...bindTrigger3(popoverState),
|
|
3064
3037
|
fullWidth: true,
|
|
3065
3038
|
disabled,
|
|
@@ -3071,7 +3044,7 @@ var FontFamilyControl = createControl(
|
|
|
3071
3044
|
textTransform: "capitalize"
|
|
3072
3045
|
} : void 0
|
|
3073
3046
|
}
|
|
3074
|
-
)), /* @__PURE__ */
|
|
3047
|
+
)), /* @__PURE__ */ React58.createElement(
|
|
3075
3048
|
Popover4,
|
|
3076
3049
|
{
|
|
3077
3050
|
disablePortal: true,
|
|
@@ -3081,7 +3054,7 @@ var FontFamilyControl = createControl(
|
|
|
3081
3054
|
sx: { my: 1.5 },
|
|
3082
3055
|
...bindPopover4(popoverState)
|
|
3083
3056
|
},
|
|
3084
|
-
/* @__PURE__ */
|
|
3057
|
+
/* @__PURE__ */ React58.createElement(
|
|
3085
3058
|
ItemSelector,
|
|
3086
3059
|
{
|
|
3087
3060
|
id: "font-family-selector",
|
|
@@ -3101,14 +3074,14 @@ var FontFamilyControl = createControl(
|
|
|
3101
3074
|
);
|
|
3102
3075
|
|
|
3103
3076
|
// src/controls/url-control.tsx
|
|
3104
|
-
import * as
|
|
3077
|
+
import * as React59 from "react";
|
|
3105
3078
|
import { urlPropTypeUtil } from "@elementor/editor-props";
|
|
3106
3079
|
import { TextField as TextField5 } from "@elementor/ui";
|
|
3107
3080
|
var UrlControl = createControl(
|
|
3108
3081
|
({ placeholder, ariaLabel }) => {
|
|
3109
3082
|
const { value, setValue, disabled } = useBoundProp(urlPropTypeUtil);
|
|
3110
3083
|
const handleChange = (event) => setValue(event.target.value);
|
|
3111
|
-
return /* @__PURE__ */
|
|
3084
|
+
return /* @__PURE__ */ React59.createElement(ControlActions, null, /* @__PURE__ */ React59.createElement(
|
|
3112
3085
|
TextField5,
|
|
3113
3086
|
{
|
|
3114
3087
|
size: "tiny",
|
|
@@ -3126,8 +3099,8 @@ var UrlControl = createControl(
|
|
|
3126
3099
|
);
|
|
3127
3100
|
|
|
3128
3101
|
// src/controls/link-control.tsx
|
|
3129
|
-
import * as
|
|
3130
|
-
import { useEffect as useEffect8, useMemo as useMemo8, useState as
|
|
3102
|
+
import * as React64 from "react";
|
|
3103
|
+
import { useEffect as useEffect8, useMemo as useMemo8, useState as useState10 } from "react";
|
|
3131
3104
|
import { getLinkInLinkRestriction } from "@elementor/editor-elements";
|
|
3132
3105
|
import { linkPropTypeUtil } from "@elementor/editor-props";
|
|
3133
3106
|
import { MinusIcon, PlusIcon as PlusIcon2 } from "@elementor/icons";
|
|
@@ -3137,7 +3110,7 @@ import { debounce as debounce3 } from "@elementor/utils";
|
|
|
3137
3110
|
import { __ as __23 } from "@wordpress/i18n";
|
|
3138
3111
|
|
|
3139
3112
|
// src/components/restricted-link-infotip.tsx
|
|
3140
|
-
import * as
|
|
3113
|
+
import * as React60 from "react";
|
|
3141
3114
|
import { selectElement } from "@elementor/editor-elements";
|
|
3142
3115
|
import { InfoCircleFilledIcon } from "@elementor/icons";
|
|
3143
3116
|
import { Alert, AlertAction, AlertTitle, Box as Box9, Infotip as Infotip2, Link as Link2 } from "@elementor/ui";
|
|
@@ -3167,12 +3140,12 @@ var RestrictedLinkInfotip = ({
|
|
|
3167
3140
|
selectElement(elementId);
|
|
3168
3141
|
}
|
|
3169
3142
|
};
|
|
3170
|
-
const content = /* @__PURE__ */
|
|
3143
|
+
const content = /* @__PURE__ */ React60.createElement(
|
|
3171
3144
|
Alert,
|
|
3172
3145
|
{
|
|
3173
3146
|
color: "secondary",
|
|
3174
|
-
icon: /* @__PURE__ */
|
|
3175
|
-
action: /* @__PURE__ */
|
|
3147
|
+
icon: /* @__PURE__ */ React60.createElement(InfoCircleFilledIcon, null),
|
|
3148
|
+
action: /* @__PURE__ */ React60.createElement(
|
|
3176
3149
|
AlertAction,
|
|
3177
3150
|
{
|
|
3178
3151
|
sx: { width: "fit-content" },
|
|
@@ -3183,10 +3156,10 @@ var RestrictedLinkInfotip = ({
|
|
|
3183
3156
|
__21("Take me there", "elementor")
|
|
3184
3157
|
)
|
|
3185
3158
|
},
|
|
3186
|
-
/* @__PURE__ */
|
|
3187
|
-
/* @__PURE__ */
|
|
3159
|
+
/* @__PURE__ */ React60.createElement(AlertTitle, null, __21("Nested links", "elementor")),
|
|
3160
|
+
/* @__PURE__ */ React60.createElement(Box9, { component: "span" }, INFOTIP_CONTENT[reason ?? "descendant"], " ", /* @__PURE__ */ React60.createElement(Link2, { href: learnMoreButton.href, target: "_blank", color: "info.main" }, learnMoreButton.label))
|
|
3188
3161
|
);
|
|
3189
|
-
return shouldRestrict && isVisible ? /* @__PURE__ */
|
|
3162
|
+
return shouldRestrict && isVisible ? /* @__PURE__ */ React60.createElement(
|
|
3190
3163
|
Infotip2,
|
|
3191
3164
|
{
|
|
3192
3165
|
placement: "right",
|
|
@@ -3194,13 +3167,13 @@ var RestrictedLinkInfotip = ({
|
|
|
3194
3167
|
color: "secondary",
|
|
3195
3168
|
slotProps: { popper: { sx: { width: 300 } } }
|
|
3196
3169
|
},
|
|
3197
|
-
/* @__PURE__ */
|
|
3198
|
-
) : /* @__PURE__ */
|
|
3170
|
+
/* @__PURE__ */ React60.createElement(Box9, null, children)
|
|
3171
|
+
) : /* @__PURE__ */ React60.createElement(React60.Fragment, null, children);
|
|
3199
3172
|
};
|
|
3200
3173
|
|
|
3201
3174
|
// src/controls/query-control.tsx
|
|
3202
|
-
import * as
|
|
3203
|
-
import { useMemo as useMemo7, useState as
|
|
3175
|
+
import * as React62 from "react";
|
|
3176
|
+
import { useMemo as useMemo7, useState as useState9 } from "react";
|
|
3204
3177
|
import { numberPropTypeUtil as numberPropTypeUtil2, stringPropTypeUtil as stringPropTypeUtil6, urlPropTypeUtil as urlPropTypeUtil2 } from "@elementor/editor-props";
|
|
3205
3178
|
import { httpService as httpService2 } from "@elementor/http-client";
|
|
3206
3179
|
import { SearchIcon } from "@elementor/icons";
|
|
@@ -3208,7 +3181,7 @@ import { debounce as debounce2 } from "@elementor/utils";
|
|
|
3208
3181
|
import { __ as __22 } from "@wordpress/i18n";
|
|
3209
3182
|
|
|
3210
3183
|
// src/components/autocomplete.tsx
|
|
3211
|
-
import * as
|
|
3184
|
+
import * as React61 from "react";
|
|
3212
3185
|
import { forwardRef as forwardRef8 } from "react";
|
|
3213
3186
|
import { XIcon as XIcon2 } from "@elementor/icons";
|
|
3214
3187
|
import {
|
|
@@ -3240,7 +3213,7 @@ var Autocomplete = forwardRef8((props, ref) => {
|
|
|
3240
3213
|
const valueLength = value?.toString()?.length ?? 0;
|
|
3241
3214
|
const meetsMinLength = valueLength >= minInputLength;
|
|
3242
3215
|
const shouldOpen = meetsMinLength && (allowCustomValues ? optionKeys.length > 0 : true);
|
|
3243
|
-
return /* @__PURE__ */
|
|
3216
|
+
return /* @__PURE__ */ React61.createElement(
|
|
3244
3217
|
AutocompleteBase,
|
|
3245
3218
|
{
|
|
3246
3219
|
...restProps,
|
|
@@ -3261,8 +3234,8 @@ var Autocomplete = forwardRef8((props, ref) => {
|
|
|
3261
3234
|
groupBy: isCategorizedOptionPool(options) ? (optionId) => findMatchingOption(options, optionId)?.groupLabel || optionId : void 0,
|
|
3262
3235
|
isOptionEqualToValue,
|
|
3263
3236
|
filterOptions: () => optionKeys,
|
|
3264
|
-
renderOption: (optionProps, optionId) => /* @__PURE__ */
|
|
3265
|
-
renderInput: (params) => /* @__PURE__ */
|
|
3237
|
+
renderOption: (optionProps, optionId) => /* @__PURE__ */ React61.createElement(Box10, { component: "li", ...optionProps, key: optionProps.id }, findMatchingOption(options, optionId)?.label ?? optionId),
|
|
3238
|
+
renderInput: (params) => /* @__PURE__ */ React61.createElement(
|
|
3266
3239
|
TextInput,
|
|
3267
3240
|
{
|
|
3268
3241
|
params,
|
|
@@ -3289,7 +3262,7 @@ var TextInput = ({
|
|
|
3289
3262
|
const onChange = (event) => {
|
|
3290
3263
|
handleChange(event.target.value);
|
|
3291
3264
|
};
|
|
3292
|
-
return /* @__PURE__ */
|
|
3265
|
+
return /* @__PURE__ */ React61.createElement(
|
|
3293
3266
|
TextField6,
|
|
3294
3267
|
{
|
|
3295
3268
|
...params,
|
|
@@ -3303,8 +3276,8 @@ var TextInput = ({
|
|
|
3303
3276
|
},
|
|
3304
3277
|
InputProps: {
|
|
3305
3278
|
...params.InputProps,
|
|
3306
|
-
startAdornment: startAdornment ? /* @__PURE__ */
|
|
3307
|
-
endAdornment: /* @__PURE__ */
|
|
3279
|
+
startAdornment: startAdornment ? /* @__PURE__ */ React61.createElement(InputAdornment4, { position: "start" }, startAdornment) : params.InputProps.startAdornment,
|
|
3280
|
+
endAdornment: /* @__PURE__ */ React61.createElement(ClearButton, { params, allowClear, handleChange })
|
|
3308
3281
|
}
|
|
3309
3282
|
}
|
|
3310
3283
|
);
|
|
@@ -3313,7 +3286,7 @@ var ClearButton = ({
|
|
|
3313
3286
|
allowClear,
|
|
3314
3287
|
handleChange,
|
|
3315
3288
|
params
|
|
3316
|
-
}) => /* @__PURE__ */
|
|
3289
|
+
}) => /* @__PURE__ */ React61.createElement(InputAdornment4, { position: "end" }, allowClear && /* @__PURE__ */ React61.createElement(IconButton5, { size: params.size, onClick: () => handleChange(null), sx: { cursor: "pointer" } }, /* @__PURE__ */ React61.createElement(XIcon2, { fontSize: params.size })));
|
|
3317
3290
|
function findMatchingOption(options, optionId = null) {
|
|
3318
3291
|
const formattedOption = (optionId || "").toString();
|
|
3319
3292
|
return options.find(({ id }) => formattedOption === id.toString());
|
|
@@ -3350,7 +3323,7 @@ var QueryControl = createControl((props) => {
|
|
|
3350
3323
|
ariaLabel
|
|
3351
3324
|
} = props || {};
|
|
3352
3325
|
const normalizedPlaceholder = placeholder || __22("Search", "elementor");
|
|
3353
|
-
const [options, setOptions] =
|
|
3326
|
+
const [options, setOptions] = useState9(
|
|
3354
3327
|
generateFirstLoadedOption(value?.value)
|
|
3355
3328
|
);
|
|
3356
3329
|
const onOptionChange = (newValue) => {
|
|
@@ -3397,13 +3370,13 @@ var QueryControl = createControl((props) => {
|
|
|
3397
3370
|
),
|
|
3398
3371
|
[url]
|
|
3399
3372
|
);
|
|
3400
|
-
return /* @__PURE__ */
|
|
3373
|
+
return /* @__PURE__ */ React62.createElement(ControlActions, null, /* @__PURE__ */ React62.createElement(
|
|
3401
3374
|
Autocomplete,
|
|
3402
3375
|
{
|
|
3403
3376
|
options,
|
|
3404
3377
|
allowCustomValues,
|
|
3405
3378
|
placeholder: normalizedPlaceholder,
|
|
3406
|
-
startAdornment: /* @__PURE__ */
|
|
3379
|
+
startAdornment: /* @__PURE__ */ React62.createElement(SearchIcon, { fontSize: "tiny" }),
|
|
3407
3380
|
value: value?.value?.id?.value || value?.value,
|
|
3408
3381
|
onOptionChange,
|
|
3409
3382
|
onTextChange,
|
|
@@ -3445,7 +3418,7 @@ function generateFirstLoadedOption(unionValue) {
|
|
|
3445
3418
|
}
|
|
3446
3419
|
|
|
3447
3420
|
// src/controls/switch-control.tsx
|
|
3448
|
-
import * as
|
|
3421
|
+
import * as React63 from "react";
|
|
3449
3422
|
import { booleanPropTypeUtil } from "@elementor/editor-props";
|
|
3450
3423
|
import { Box as Box11, Switch } from "@elementor/ui";
|
|
3451
3424
|
var SwitchControl = createControl(() => {
|
|
@@ -3453,7 +3426,7 @@ var SwitchControl = createControl(() => {
|
|
|
3453
3426
|
const handleChange = (event) => {
|
|
3454
3427
|
setValue(event.target.checked);
|
|
3455
3428
|
};
|
|
3456
|
-
return /* @__PURE__ */
|
|
3429
|
+
return /* @__PURE__ */ React63.createElement(Box11, { sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React63.createElement(
|
|
3457
3430
|
Switch,
|
|
3458
3431
|
{
|
|
3459
3432
|
checked: !!value,
|
|
@@ -3472,7 +3445,7 @@ var SIZE6 = "tiny";
|
|
|
3472
3445
|
var LinkControl = createControl((props) => {
|
|
3473
3446
|
const { value, path, setValue, ...propContext } = useBoundProp(linkPropTypeUtil);
|
|
3474
3447
|
const [linkSessionValue, setLinkSessionValue] = useSessionStorage(path.join("/"));
|
|
3475
|
-
const [isActive, setIsActive] =
|
|
3448
|
+
const [isActive, setIsActive] = useState10(!!value);
|
|
3476
3449
|
const {
|
|
3477
3450
|
allowCustomValues = true,
|
|
3478
3451
|
queryOptions,
|
|
@@ -3482,7 +3455,7 @@ var LinkControl = createControl((props) => {
|
|
|
3482
3455
|
label = __23("Link", "elementor"),
|
|
3483
3456
|
ariaLabel
|
|
3484
3457
|
} = props || {};
|
|
3485
|
-
const [linkInLinkRestriction, setLinkInLinkRestriction] =
|
|
3458
|
+
const [linkInLinkRestriction, setLinkInLinkRestriction] = useState10(
|
|
3486
3459
|
getLinkInLinkRestriction(elementId, value)
|
|
3487
3460
|
);
|
|
3488
3461
|
const shouldDisableAddingLink = !isActive && linkInLinkRestriction.shouldRestrict;
|
|
@@ -3535,7 +3508,7 @@ var LinkControl = createControl((props) => {
|
|
|
3535
3508
|
} : null;
|
|
3536
3509
|
setLinkSessionValue({ ...linkSessionValue, value: valueToSave });
|
|
3537
3510
|
};
|
|
3538
|
-
return /* @__PURE__ */
|
|
3511
|
+
return /* @__PURE__ */ React64.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React64.createElement(Stack10, { gap: 1.5 }, /* @__PURE__ */ React64.createElement(
|
|
3539
3512
|
Stack10,
|
|
3540
3513
|
{
|
|
3541
3514
|
direction: "row",
|
|
@@ -3545,8 +3518,8 @@ var LinkControl = createControl((props) => {
|
|
|
3545
3518
|
marginInlineEnd: -0.75
|
|
3546
3519
|
}
|
|
3547
3520
|
},
|
|
3548
|
-
/* @__PURE__ */
|
|
3549
|
-
/* @__PURE__ */
|
|
3521
|
+
/* @__PURE__ */ React64.createElement(ControlLabel, null, label),
|
|
3522
|
+
/* @__PURE__ */ React64.createElement(RestrictedLinkInfotip, { isVisible: !isActive, linkInLinkRestriction }, /* @__PURE__ */ React64.createElement(
|
|
3550
3523
|
ToggleIconControl,
|
|
3551
3524
|
{
|
|
3552
3525
|
disabled: shouldDisableAddingLink,
|
|
@@ -3555,7 +3528,7 @@ var LinkControl = createControl((props) => {
|
|
|
3555
3528
|
label: __23("Toggle link", "elementor")
|
|
3556
3529
|
}
|
|
3557
3530
|
))
|
|
3558
|
-
), /* @__PURE__ */
|
|
3531
|
+
), /* @__PURE__ */ React64.createElement(Collapse, { in: isActive, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React64.createElement(Stack10, { gap: 1.5 }, /* @__PURE__ */ React64.createElement(PropKeyProvider, { bind: "destination" }, /* @__PURE__ */ React64.createElement(
|
|
3559
3532
|
QueryControl,
|
|
3560
3533
|
{
|
|
3561
3534
|
queryOptions,
|
|
@@ -3565,32 +3538,32 @@ var LinkControl = createControl((props) => {
|
|
|
3565
3538
|
onSetValue: onSaveValueToSession,
|
|
3566
3539
|
ariaLabel: ariaLabel || label
|
|
3567
3540
|
}
|
|
3568
|
-
)), /* @__PURE__ */
|
|
3541
|
+
)), /* @__PURE__ */ React64.createElement(PropKeyProvider, { bind: "isTargetBlank" }, /* @__PURE__ */ React64.createElement(Grid10, { container: true, alignItems: "center", flexWrap: "nowrap", justifyContent: "space-between" }, /* @__PURE__ */ React64.createElement(Grid10, { item: true }, /* @__PURE__ */ React64.createElement(ControlFormLabel, null, __23("Open in a new tab", "elementor"))), /* @__PURE__ */ React64.createElement(Grid10, { item: true, sx: { marginInlineEnd: -1 } }, /* @__PURE__ */ React64.createElement(SwitchControl, null))))))));
|
|
3569
3542
|
});
|
|
3570
3543
|
var ToggleIconControl = ({ disabled, active, onIconClick, label }) => {
|
|
3571
|
-
return /* @__PURE__ */
|
|
3544
|
+
return /* @__PURE__ */ React64.createElement(IconButton6, { size: SIZE6, onClick: onIconClick, "aria-label": label, disabled }, active ? /* @__PURE__ */ React64.createElement(MinusIcon, { fontSize: SIZE6 }) : /* @__PURE__ */ React64.createElement(PlusIcon2, { fontSize: SIZE6 }));
|
|
3572
3545
|
};
|
|
3573
3546
|
|
|
3574
3547
|
// src/controls/html-tag-control.tsx
|
|
3575
|
-
import * as
|
|
3548
|
+
import * as React66 from "react";
|
|
3576
3549
|
import { getElementLabel } from "@elementor/editor-elements";
|
|
3577
3550
|
import { stringPropTypeUtil as stringPropTypeUtil7 } from "@elementor/editor-props";
|
|
3578
3551
|
import { MenuListItem as MenuListItem3 } from "@elementor/editor-ui";
|
|
3579
|
-
import { Select as Select2, styled as
|
|
3552
|
+
import { Select as Select2, styled as styled6, Typography as Typography5 } from "@elementor/ui";
|
|
3580
3553
|
import { __ as __24 } from "@wordpress/i18n";
|
|
3581
3554
|
|
|
3582
3555
|
// src/components/conditional-control-infotip.tsx
|
|
3583
|
-
import * as
|
|
3556
|
+
import * as React65 from "react";
|
|
3584
3557
|
import { InfoAlert } from "@elementor/editor-ui";
|
|
3585
3558
|
import { AlertTitle as AlertTitle2, Box as Box12, Infotip as Infotip3, useTheme as useTheme2 } from "@elementor/ui";
|
|
3586
3559
|
import { DirectionProvider } from "@elementor/ui";
|
|
3587
3560
|
var DEFAULT_COLOR = "secondary";
|
|
3588
|
-
var ConditionalControlInfotip =
|
|
3561
|
+
var ConditionalControlInfotip = React65.forwardRef(
|
|
3589
3562
|
({ children, title, description, alertProps, infotipProps, ...props }, ref) => {
|
|
3590
3563
|
const theme = useTheme2();
|
|
3591
3564
|
const isUiRtl = "rtl" === theme.direction;
|
|
3592
3565
|
const isEnabled = props.isEnabled && (title || description);
|
|
3593
|
-
return /* @__PURE__ */
|
|
3566
|
+
return /* @__PURE__ */ React65.createElement(Box12, { ref }, isEnabled ? /* @__PURE__ */ React65.createElement(DirectionProvider, { rtl: isUiRtl }, /* @__PURE__ */ React65.createElement(
|
|
3594
3567
|
Infotip3,
|
|
3595
3568
|
{
|
|
3596
3569
|
placement: "right",
|
|
@@ -3608,14 +3581,14 @@ var ConditionalControlInfotip = React66.forwardRef(
|
|
|
3608
3581
|
}
|
|
3609
3582
|
},
|
|
3610
3583
|
...infotipProps,
|
|
3611
|
-
content: /* @__PURE__ */
|
|
3584
|
+
content: /* @__PURE__ */ React65.createElement(
|
|
3612
3585
|
InfoAlert,
|
|
3613
3586
|
{
|
|
3614
3587
|
color: DEFAULT_COLOR,
|
|
3615
3588
|
sx: { width: 300, px: 1.5, py: 2 },
|
|
3616
3589
|
...alertProps
|
|
3617
3590
|
},
|
|
3618
|
-
/* @__PURE__ */
|
|
3591
|
+
/* @__PURE__ */ React65.createElement(Box12, { sx: { flexDirection: "column", display: "flex", gap: 0.5 } }, /* @__PURE__ */ React65.createElement(AlertTitle2, null, title), /* @__PURE__ */ React65.createElement(Box12, null, description))
|
|
3619
3592
|
)
|
|
3620
3593
|
},
|
|
3621
3594
|
children
|
|
@@ -3624,7 +3597,7 @@ var ConditionalControlInfotip = React66.forwardRef(
|
|
|
3624
3597
|
);
|
|
3625
3598
|
|
|
3626
3599
|
// src/controls/html-tag-control.tsx
|
|
3627
|
-
var StyledSelect =
|
|
3600
|
+
var StyledSelect = styled6(Select2)(() => ({ ".MuiSelect-select.Mui-disabled": { cursor: "not-allowed" } }));
|
|
3628
3601
|
var HtmlTagControl = createControl(({ options, onChange, fallbackLabels = {} }) => {
|
|
3629
3602
|
const { value, setValue, disabled, placeholder } = useBoundProp(stringPropTypeUtil7);
|
|
3630
3603
|
const handleChange = (event) => {
|
|
@@ -3651,10 +3624,10 @@ var HtmlTagControl = createControl(({ options, onChange, fallbackLabels = {} })
|
|
|
3651
3624
|
}
|
|
3652
3625
|
const placeholderOption = findOptionByValue(placeholder);
|
|
3653
3626
|
const displayText = placeholderOption?.label || placeholder;
|
|
3654
|
-
return /* @__PURE__ */
|
|
3627
|
+
return /* @__PURE__ */ React66.createElement(Typography5, { component: "span", variant: "caption", color: "text.tertiary" }, displayText);
|
|
3655
3628
|
};
|
|
3656
3629
|
const findOptionByValue = (searchValue) => options.find((opt) => opt.value === searchValue);
|
|
3657
|
-
return /* @__PURE__ */
|
|
3630
|
+
return /* @__PURE__ */ React66.createElement(ControlActions, null, /* @__PURE__ */ React66.createElement(ConditionalControlInfotip, { ...infoTipProps }, /* @__PURE__ */ React66.createElement(
|
|
3658
3631
|
StyledSelect,
|
|
3659
3632
|
{
|
|
3660
3633
|
sx: { overflow: "hidden", cursor: disabled ? "not-allowed" : void 0 },
|
|
@@ -3666,13 +3639,13 @@ var HtmlTagControl = createControl(({ options, onChange, fallbackLabels = {} })
|
|
|
3666
3639
|
disabled,
|
|
3667
3640
|
fullWidth: true
|
|
3668
3641
|
},
|
|
3669
|
-
options.map(({ label, ...props }) => /* @__PURE__ */
|
|
3642
|
+
options.map(({ label, ...props }) => /* @__PURE__ */ React66.createElement(MenuListItem3, { key: props.value, ...props, value: props.value ?? "" }, label))
|
|
3670
3643
|
)));
|
|
3671
3644
|
});
|
|
3672
3645
|
|
|
3673
3646
|
// src/controls/gap-control.tsx
|
|
3674
|
-
import * as
|
|
3675
|
-
import { useLayoutEffect as useLayoutEffect2, useRef as useRef10, useState as
|
|
3647
|
+
import * as React67 from "react";
|
|
3648
|
+
import { useLayoutEffect as useLayoutEffect2, useRef as useRef10, useState as useState11 } from "react";
|
|
3676
3649
|
import { layoutDirectionPropTypeUtil, sizePropTypeUtil as sizePropTypeUtil4 } from "@elementor/editor-props";
|
|
3677
3650
|
import { useActiveBreakpoint as useActiveBreakpoint3 } from "@elementor/editor-responsive";
|
|
3678
3651
|
import { DetachIcon as DetachIcon2, LinkIcon as LinkIcon2 } from "@elementor/icons";
|
|
@@ -3698,7 +3671,7 @@ var GapControl = ({ label }) => {
|
|
|
3698
3671
|
}
|
|
3699
3672
|
return true;
|
|
3700
3673
|
};
|
|
3701
|
-
const [isLinked, setIsLinked] =
|
|
3674
|
+
const [isLinked, setIsLinked] = useState11(() => inferIsLinked());
|
|
3702
3675
|
const activeBreakpoint = useActiveBreakpoint3();
|
|
3703
3676
|
useLayoutEffect2(() => {
|
|
3704
3677
|
setIsLinked(inferIsLinked());
|
|
@@ -3734,7 +3707,7 @@ var GapControl = ({ label }) => {
|
|
|
3734
3707
|
placeholder: directionPlaceholder
|
|
3735
3708
|
};
|
|
3736
3709
|
const hasPlaceholders = !masterValue && (directionPlaceholder || masterPlaceholder);
|
|
3737
|
-
return /* @__PURE__ */
|
|
3710
|
+
return /* @__PURE__ */ React67.createElement(PropProvider, { ...propProviderProps }, /* @__PURE__ */ React67.createElement(Stack11, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React67.createElement(ControlLabel, null, label), /* @__PURE__ */ React67.createElement(Tooltip7, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React67.createElement(
|
|
3738
3711
|
StyledToggleButton,
|
|
3739
3712
|
{
|
|
3740
3713
|
"aria-label": isLinked ? unlinkedLabel : linkedLabel,
|
|
@@ -3746,8 +3719,8 @@ var GapControl = ({ label }) => {
|
|
|
3746
3719
|
disabled,
|
|
3747
3720
|
isPlaceholder: hasPlaceholders
|
|
3748
3721
|
},
|
|
3749
|
-
/* @__PURE__ */
|
|
3750
|
-
))), /* @__PURE__ */
|
|
3722
|
+
/* @__PURE__ */ React67.createElement(LinkedIcon, { fontSize: "tiny" })
|
|
3723
|
+
))), /* @__PURE__ */ React67.createElement(Stack11, { direction: "row", gap: 2, flexWrap: "nowrap", ref: stackRef }, /* @__PURE__ */ React67.createElement(Grid11, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React67.createElement(Grid11, { item: true, xs: 12 }, /* @__PURE__ */ React67.createElement(ControlFormLabel, null, __25("Column", "elementor"))), /* @__PURE__ */ React67.createElement(Grid11, { item: true, xs: 12 }, /* @__PURE__ */ React67.createElement(
|
|
3751
3724
|
Control4,
|
|
3752
3725
|
{
|
|
3753
3726
|
bind: "column",
|
|
@@ -3755,7 +3728,7 @@ var GapControl = ({ label }) => {
|
|
|
3755
3728
|
isLinked,
|
|
3756
3729
|
anchorRef: stackRef
|
|
3757
3730
|
}
|
|
3758
|
-
))), /* @__PURE__ */
|
|
3731
|
+
))), /* @__PURE__ */ React67.createElement(Grid11, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React67.createElement(Grid11, { item: true, xs: 12 }, /* @__PURE__ */ React67.createElement(ControlFormLabel, null, __25("Row", "elementor"))), /* @__PURE__ */ React67.createElement(Grid11, { item: true, xs: 12 }, /* @__PURE__ */ React67.createElement(
|
|
3759
3732
|
Control4,
|
|
3760
3733
|
{
|
|
3761
3734
|
bind: "row",
|
|
@@ -3772,14 +3745,14 @@ var Control4 = ({
|
|
|
3772
3745
|
anchorRef
|
|
3773
3746
|
}) => {
|
|
3774
3747
|
if (isLinked) {
|
|
3775
|
-
return /* @__PURE__ */
|
|
3748
|
+
return /* @__PURE__ */ React67.createElement(SizeControl, { anchorRef, ariaLabel });
|
|
3776
3749
|
}
|
|
3777
|
-
return /* @__PURE__ */
|
|
3750
|
+
return /* @__PURE__ */ React67.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React67.createElement(SizeControl, { anchorRef, ariaLabel }));
|
|
3778
3751
|
};
|
|
3779
3752
|
|
|
3780
3753
|
// src/controls/aspect-ratio-control.tsx
|
|
3781
|
-
import * as
|
|
3782
|
-
import { useEffect as useEffect9, useState as
|
|
3754
|
+
import * as React68 from "react";
|
|
3755
|
+
import { useEffect as useEffect9, useState as useState12 } from "react";
|
|
3783
3756
|
import { stringPropTypeUtil as stringPropTypeUtil8 } from "@elementor/editor-props";
|
|
3784
3757
|
import { MenuListItem as MenuListItem4 } from "@elementor/editor-ui";
|
|
3785
3758
|
import { ArrowsMoveHorizontalIcon, ArrowsMoveVerticalIcon } from "@elementor/icons";
|
|
@@ -3800,10 +3773,10 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
3800
3773
|
const { value: aspectRatioValue, setValue: setAspectRatioValue, disabled } = useBoundProp(stringPropTypeUtil8);
|
|
3801
3774
|
const isCustomSelected = aspectRatioValue && !RATIO_OPTIONS.some((option) => option.value === aspectRatioValue);
|
|
3802
3775
|
const [initialWidth, initialHeight] = isCustomSelected ? aspectRatioValue.split("/") : ["", ""];
|
|
3803
|
-
const [isCustom, setIsCustom] =
|
|
3804
|
-
const [customWidth, setCustomWidth] =
|
|
3805
|
-
const [customHeight, setCustomHeight] =
|
|
3806
|
-
const [selectedValue, setSelectedValue] =
|
|
3776
|
+
const [isCustom, setIsCustom] = useState12(isCustomSelected);
|
|
3777
|
+
const [customWidth, setCustomWidth] = useState12(initialWidth);
|
|
3778
|
+
const [customHeight, setCustomHeight] = useState12(initialHeight);
|
|
3779
|
+
const [selectedValue, setSelectedValue] = useState12(
|
|
3807
3780
|
isCustomSelected ? CUSTOM_RATIO : aspectRatioValue || ""
|
|
3808
3781
|
);
|
|
3809
3782
|
useEffect9(() => {
|
|
@@ -3845,7 +3818,7 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
3845
3818
|
setAspectRatioValue(`${customWidth}/${newHeight}`);
|
|
3846
3819
|
}
|
|
3847
3820
|
};
|
|
3848
|
-
return /* @__PURE__ */
|
|
3821
|
+
return /* @__PURE__ */ React68.createElement(ControlActions, null, /* @__PURE__ */ React68.createElement(Stack12, { direction: "column", gap: 2 }, /* @__PURE__ */ React68.createElement(Grid12, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React68.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React68.createElement(ControlLabel, null, label)), /* @__PURE__ */ React68.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React68.createElement(
|
|
3849
3822
|
Select3,
|
|
3850
3823
|
{
|
|
3851
3824
|
size: "tiny",
|
|
@@ -3857,9 +3830,9 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
3857
3830
|
fullWidth: true
|
|
3858
3831
|
},
|
|
3859
3832
|
[...RATIO_OPTIONS, { label: __26("Custom", "elementor"), value: CUSTOM_RATIO }].map(
|
|
3860
|
-
({ label: optionLabel, ...props }) => /* @__PURE__ */
|
|
3833
|
+
({ label: optionLabel, ...props }) => /* @__PURE__ */ React68.createElement(MenuListItem4, { key: props.value, ...props, value: props.value ?? "" }, optionLabel)
|
|
3861
3834
|
)
|
|
3862
|
-
))), isCustom && /* @__PURE__ */
|
|
3835
|
+
))), isCustom && /* @__PURE__ */ React68.createElement(Grid12, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React68.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React68.createElement(
|
|
3863
3836
|
TextField7,
|
|
3864
3837
|
{
|
|
3865
3838
|
size: "tiny",
|
|
@@ -3869,10 +3842,10 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
3869
3842
|
value: customWidth,
|
|
3870
3843
|
onChange: handleCustomWidthChange,
|
|
3871
3844
|
InputProps: {
|
|
3872
|
-
startAdornment: /* @__PURE__ */
|
|
3845
|
+
startAdornment: /* @__PURE__ */ React68.createElement(ArrowsMoveHorizontalIcon, { fontSize: "tiny" })
|
|
3873
3846
|
}
|
|
3874
3847
|
}
|
|
3875
|
-
)), /* @__PURE__ */
|
|
3848
|
+
)), /* @__PURE__ */ React68.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React68.createElement(
|
|
3876
3849
|
TextField7,
|
|
3877
3850
|
{
|
|
3878
3851
|
size: "tiny",
|
|
@@ -3882,25 +3855,25 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
3882
3855
|
value: customHeight,
|
|
3883
3856
|
onChange: handleCustomHeightChange,
|
|
3884
3857
|
InputProps: {
|
|
3885
|
-
startAdornment: /* @__PURE__ */
|
|
3858
|
+
startAdornment: /* @__PURE__ */ React68.createElement(ArrowsMoveVerticalIcon, { fontSize: "tiny" })
|
|
3886
3859
|
}
|
|
3887
3860
|
}
|
|
3888
3861
|
)))));
|
|
3889
3862
|
});
|
|
3890
3863
|
|
|
3891
3864
|
// src/controls/svg-media-control.tsx
|
|
3892
|
-
import * as
|
|
3893
|
-
import { useState as
|
|
3865
|
+
import * as React70 from "react";
|
|
3866
|
+
import { useState as useState14 } from "react";
|
|
3894
3867
|
import { useCurrentUserCapabilities } from "@elementor/editor-current-user";
|
|
3895
3868
|
import { imageSrcPropTypeUtil as imageSrcPropTypeUtil2 } from "@elementor/editor-props";
|
|
3896
3869
|
import { UploadIcon as UploadIcon2 } from "@elementor/icons";
|
|
3897
|
-
import { Button as Button4, Card as Card2, CardMedia as CardMedia2, CardOverlay as CardOverlay2, CircularProgress as CircularProgress3, Stack as Stack13, styled as
|
|
3870
|
+
import { Button as Button4, Card as Card2, CardMedia as CardMedia2, CardOverlay as CardOverlay2, CircularProgress as CircularProgress3, Stack as Stack13, styled as styled7, ThemeProvider } from "@elementor/ui";
|
|
3898
3871
|
import { useWpMediaAttachment as useWpMediaAttachment2, useWpMediaFrame as useWpMediaFrame2 } from "@elementor/wp-media";
|
|
3899
3872
|
import { __ as __28 } from "@wordpress/i18n";
|
|
3900
3873
|
|
|
3901
3874
|
// src/components/enable-unfiltered-modal.tsx
|
|
3902
|
-
import * as
|
|
3903
|
-
import { useState as
|
|
3875
|
+
import * as React69 from "react";
|
|
3876
|
+
import { useState as useState13 } from "react";
|
|
3904
3877
|
import {
|
|
3905
3878
|
Button as Button3,
|
|
3906
3879
|
CircularProgress as CircularProgress2,
|
|
@@ -3926,7 +3899,7 @@ var ADMIN_FAILED_CONTENT_TEXT_PT2 = __27(
|
|
|
3926
3899
|
var WAIT_FOR_CLOSE_TIMEOUT_MS = 300;
|
|
3927
3900
|
var EnableUnfilteredModal = (props) => {
|
|
3928
3901
|
const { mutateAsync, isPending } = useUpdateUnfilteredFilesUpload();
|
|
3929
|
-
const [isError, setIsError] =
|
|
3902
|
+
const [isError, setIsError] = useState13(false);
|
|
3930
3903
|
const onClose = (enabled) => {
|
|
3931
3904
|
props.onClose(enabled);
|
|
3932
3905
|
setTimeout(() => setIsError(false), WAIT_FOR_CLOSE_TIMEOUT_MS);
|
|
@@ -3944,9 +3917,9 @@ var EnableUnfilteredModal = (props) => {
|
|
|
3944
3917
|
}
|
|
3945
3918
|
};
|
|
3946
3919
|
const dialogProps = { ...props, isPending, handleEnable, isError, onClose };
|
|
3947
|
-
return /* @__PURE__ */
|
|
3920
|
+
return /* @__PURE__ */ React69.createElement(AdminDialog, { ...dialogProps });
|
|
3948
3921
|
};
|
|
3949
|
-
var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @__PURE__ */
|
|
3922
|
+
var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @__PURE__ */ React69.createElement(Dialog, { open, maxWidth: "sm", onClose: () => onClose(false) }, /* @__PURE__ */ React69.createElement(DialogHeader, { logo: false }, /* @__PURE__ */ React69.createElement(DialogTitle, null, ADMIN_TITLE_TEXT)), /* @__PURE__ */ React69.createElement(Divider3, null), /* @__PURE__ */ React69.createElement(DialogContent, null, /* @__PURE__ */ React69.createElement(DialogContentText, null, isError ? /* @__PURE__ */ React69.createElement(React69.Fragment, null, ADMIN_FAILED_CONTENT_TEXT_PT1, " ", /* @__PURE__ */ React69.createElement("br", null), " ", ADMIN_FAILED_CONTENT_TEXT_PT2) : ADMIN_CONTENT_TEXT)), /* @__PURE__ */ React69.createElement(DialogActions, null, /* @__PURE__ */ React69.createElement(Button3, { size: "medium", color: "secondary", onClick: () => onClose(false) }, __27("Cancel", "elementor")), /* @__PURE__ */ React69.createElement(
|
|
3950
3923
|
Button3,
|
|
3951
3924
|
{
|
|
3952
3925
|
size: "medium",
|
|
@@ -3955,7 +3928,7 @@ var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @_
|
|
|
3955
3928
|
color: "primary",
|
|
3956
3929
|
disabled: isPending
|
|
3957
3930
|
},
|
|
3958
|
-
isPending ? /* @__PURE__ */
|
|
3931
|
+
isPending ? /* @__PURE__ */ React69.createElement(CircularProgress2, { size: 24 }) : __27("Enable", "elementor")
|
|
3959
3932
|
)));
|
|
3960
3933
|
|
|
3961
3934
|
// src/controls/svg-media-control.tsx
|
|
@@ -3963,7 +3936,7 @@ var TILE_SIZE = 8;
|
|
|
3963
3936
|
var TILE_WHITE = "transparent";
|
|
3964
3937
|
var TILE_BLACK = "#c1c1c1";
|
|
3965
3938
|
var TILES_GRADIENT_FORMULA = `linear-gradient(45deg, ${TILE_BLACK} 25%, ${TILE_WHITE} 0, ${TILE_WHITE} 75%, ${TILE_BLACK} 0, ${TILE_BLACK})`;
|
|
3966
|
-
var StyledCard =
|
|
3939
|
+
var StyledCard = styled7(Card2)`
|
|
3967
3940
|
background-color: white;
|
|
3968
3941
|
background-image: ${TILES_GRADIENT_FORMULA}, ${TILES_GRADIENT_FORMULA};
|
|
3969
3942
|
background-size: ${TILE_SIZE}px ${TILE_SIZE}px;
|
|
@@ -3972,7 +3945,7 @@ var StyledCard = styled8(Card2)`
|
|
|
3972
3945
|
${TILE_SIZE / 2}px ${TILE_SIZE / 2}px;
|
|
3973
3946
|
border: none;
|
|
3974
3947
|
`;
|
|
3975
|
-
var StyledCardMediaContainer =
|
|
3948
|
+
var StyledCardMediaContainer = styled7(Stack13)`
|
|
3976
3949
|
position: relative;
|
|
3977
3950
|
height: 140px;
|
|
3978
3951
|
object-fit: contain;
|
|
@@ -3989,7 +3962,7 @@ var SvgMediaControl = createControl(() => {
|
|
|
3989
3962
|
const { data: attachment, isFetching } = useWpMediaAttachment2(id?.value || null);
|
|
3990
3963
|
const src = attachment?.url ?? url?.value ?? null;
|
|
3991
3964
|
const { data: allowSvgUpload } = useUnfilteredFilesUpload();
|
|
3992
|
-
const [unfilteredModalOpenState, setUnfilteredModalOpenState] =
|
|
3965
|
+
const [unfilteredModalOpenState, setUnfilteredModalOpenState] = useState14(false);
|
|
3993
3966
|
const { isAdmin } = useCurrentUserCapabilities();
|
|
3994
3967
|
const { open } = useWpMediaFrame2({
|
|
3995
3968
|
mediaTypes: ["svg"],
|
|
@@ -4020,10 +3993,10 @@ var SvgMediaControl = createControl(() => {
|
|
|
4020
3993
|
};
|
|
4021
3994
|
const infotipProps = {
|
|
4022
3995
|
title: __28("Sorry, you can't upload that file yet.", "elementor"),
|
|
4023
|
-
description: /* @__PURE__ */
|
|
3996
|
+
description: /* @__PURE__ */ React70.createElement(React70.Fragment, null, __28("To upload them anyway, ask the site administrator to enable unfiltered", "elementor"), /* @__PURE__ */ React70.createElement("br", null), __28("file uploads.", "elementor")),
|
|
4024
3997
|
isEnabled: !isAdmin
|
|
4025
3998
|
};
|
|
4026
|
-
return /* @__PURE__ */
|
|
3999
|
+
return /* @__PURE__ */ React70.createElement(Stack13, { gap: 1, "aria-label": "SVG Control" }, /* @__PURE__ */ React70.createElement(EnableUnfilteredModal, { open: unfilteredModalOpenState, onClose: onCloseUnfilteredModal }), /* @__PURE__ */ React70.createElement(ControlActions, null, /* @__PURE__ */ React70.createElement(StyledCard, { variant: "outlined" }, /* @__PURE__ */ React70.createElement(StyledCardMediaContainer, null, isFetching ? /* @__PURE__ */ React70.createElement(CircularProgress3, { role: "progressbar" }) : /* @__PURE__ */ React70.createElement(
|
|
4027
4000
|
CardMedia2,
|
|
4028
4001
|
{
|
|
4029
4002
|
component: "img",
|
|
@@ -4031,7 +4004,7 @@ var SvgMediaControl = createControl(() => {
|
|
|
4031
4004
|
alt: __28("Preview SVG", "elementor"),
|
|
4032
4005
|
sx: { maxHeight: "140px", width: "50px" }
|
|
4033
4006
|
}
|
|
4034
|
-
)), /* @__PURE__ */
|
|
4007
|
+
)), /* @__PURE__ */ React70.createElement(
|
|
4035
4008
|
CardOverlay2,
|
|
4036
4009
|
{
|
|
4037
4010
|
sx: {
|
|
@@ -4040,7 +4013,7 @@ var SvgMediaControl = createControl(() => {
|
|
|
4040
4013
|
}
|
|
4041
4014
|
}
|
|
4042
4015
|
},
|
|
4043
|
-
/* @__PURE__ */
|
|
4016
|
+
/* @__PURE__ */ React70.createElement(Stack13, { gap: 1 }, /* @__PURE__ */ React70.createElement(
|
|
4044
4017
|
Button4,
|
|
4045
4018
|
{
|
|
4046
4019
|
size: "tiny",
|
|
@@ -4050,13 +4023,13 @@ var SvgMediaControl = createControl(() => {
|
|
|
4050
4023
|
"aria-label": "Select SVG"
|
|
4051
4024
|
},
|
|
4052
4025
|
__28("Select SVG", "elementor")
|
|
4053
|
-
), /* @__PURE__ */
|
|
4026
|
+
), /* @__PURE__ */ React70.createElement(ConditionalControlInfotip, { ...infotipProps }, /* @__PURE__ */ React70.createElement("span", null, /* @__PURE__ */ React70.createElement(ThemeProvider, { colorScheme: isAdmin ? "light" : "dark" }, /* @__PURE__ */ React70.createElement(
|
|
4054
4027
|
Button4,
|
|
4055
4028
|
{
|
|
4056
4029
|
size: "tiny",
|
|
4057
4030
|
variant: "text",
|
|
4058
4031
|
color: "inherit",
|
|
4059
|
-
startIcon: /* @__PURE__ */
|
|
4032
|
+
startIcon: /* @__PURE__ */ React70.createElement(UploadIcon2, null),
|
|
4060
4033
|
disabled: !isAdmin,
|
|
4061
4034
|
onClick: () => isAdmin && handleClick(MODE_UPLOAD),
|
|
4062
4035
|
"aria-label": "Upload SVG"
|
|
@@ -4067,20 +4040,20 @@ var SvgMediaControl = createControl(() => {
|
|
|
4067
4040
|
});
|
|
4068
4041
|
|
|
4069
4042
|
// src/controls/background-control/background-control.tsx
|
|
4070
|
-
import * as
|
|
4043
|
+
import * as React77 from "react";
|
|
4071
4044
|
import { backgroundPropTypeUtil } from "@elementor/editor-props";
|
|
4072
4045
|
import { Grid as Grid17 } from "@elementor/ui";
|
|
4073
4046
|
import { __ as __34 } from "@wordpress/i18n";
|
|
4074
4047
|
|
|
4075
4048
|
// src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
|
|
4076
|
-
import * as
|
|
4049
|
+
import * as React76 from "react";
|
|
4077
4050
|
import {
|
|
4078
4051
|
backgroundColorOverlayPropTypeUtil as backgroundColorOverlayPropTypeUtil2,
|
|
4079
4052
|
backgroundImageOverlayPropTypeUtil as backgroundImageOverlayPropTypeUtil2,
|
|
4080
4053
|
backgroundOverlayPropTypeUtil,
|
|
4081
4054
|
colorPropTypeUtil as colorPropTypeUtil3
|
|
4082
4055
|
} from "@elementor/editor-props";
|
|
4083
|
-
import { Box as Box13, CardMedia as CardMedia3, styled as
|
|
4056
|
+
import { Box as Box13, CardMedia as CardMedia3, styled as styled8, Tab, TabPanel, Tabs, UnstableColorIndicator as UnstableColorIndicator3 } from "@elementor/ui";
|
|
4084
4057
|
import { useWpMediaAttachment as useWpMediaAttachment3 } from "@elementor/wp-media";
|
|
4085
4058
|
import { __ as __33 } from "@wordpress/i18n";
|
|
4086
4059
|
|
|
@@ -4089,7 +4062,7 @@ import { parseEnv } from "@elementor/env";
|
|
|
4089
4062
|
var { env } = parseEnv("@elementor/editor-controls");
|
|
4090
4063
|
|
|
4091
4064
|
// src/controls/background-control/background-gradient-color-control.tsx
|
|
4092
|
-
import * as
|
|
4065
|
+
import * as React71 from "react";
|
|
4093
4066
|
import {
|
|
4094
4067
|
backgroundGradientOverlayPropTypeUtil,
|
|
4095
4068
|
colorPropTypeUtil as colorPropTypeUtil2,
|
|
@@ -4136,7 +4109,7 @@ var BackgroundGradientColorControl = createControl(() => {
|
|
|
4136
4109
|
positions: positions?.value.split(" ")
|
|
4137
4110
|
};
|
|
4138
4111
|
};
|
|
4139
|
-
return /* @__PURE__ */
|
|
4112
|
+
return /* @__PURE__ */ React71.createElement(
|
|
4140
4113
|
UnstableGradientBox,
|
|
4141
4114
|
{
|
|
4142
4115
|
sx: { width: "auto", padding: 1.5 },
|
|
@@ -4161,7 +4134,7 @@ var initialBackgroundGradientOverlay = backgroundGradientOverlayPropTypeUtil.cre
|
|
|
4161
4134
|
});
|
|
4162
4135
|
|
|
4163
4136
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-attachment.tsx
|
|
4164
|
-
import * as
|
|
4137
|
+
import * as React72 from "react";
|
|
4165
4138
|
import { PinIcon, PinnedOffIcon } from "@elementor/icons";
|
|
4166
4139
|
import { Grid as Grid13 } from "@elementor/ui";
|
|
4167
4140
|
import { __ as __29 } from "@wordpress/i18n";
|
|
@@ -4169,22 +4142,22 @@ var attachmentControlOptions = [
|
|
|
4169
4142
|
{
|
|
4170
4143
|
value: "fixed",
|
|
4171
4144
|
label: __29("Fixed", "elementor"),
|
|
4172
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4145
|
+
renderContent: ({ size }) => /* @__PURE__ */ React72.createElement(PinIcon, { fontSize: size }),
|
|
4173
4146
|
showTooltip: true
|
|
4174
4147
|
},
|
|
4175
4148
|
{
|
|
4176
4149
|
value: "scroll",
|
|
4177
4150
|
label: __29("Scroll", "elementor"),
|
|
4178
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4151
|
+
renderContent: ({ size }) => /* @__PURE__ */ React72.createElement(PinnedOffIcon, { fontSize: size }),
|
|
4179
4152
|
showTooltip: true
|
|
4180
4153
|
}
|
|
4181
4154
|
];
|
|
4182
4155
|
var BackgroundImageOverlayAttachment = () => {
|
|
4183
|
-
return /* @__PURE__ */
|
|
4156
|
+
return /* @__PURE__ */ React72.createElement(PopoverGridContainer, null, /* @__PURE__ */ React72.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React72.createElement(ControlFormLabel, null, __29("Attachment", "elementor"))), /* @__PURE__ */ React72.createElement(Grid13, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React72.createElement(ToggleControl, { options: attachmentControlOptions })));
|
|
4184
4157
|
};
|
|
4185
4158
|
|
|
4186
4159
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx
|
|
4187
|
-
import * as
|
|
4160
|
+
import * as React73 from "react";
|
|
4188
4161
|
import { useRef as useRef11 } from "react";
|
|
4189
4162
|
import { backgroundImagePositionOffsetPropTypeUtil, stringPropTypeUtil as stringPropTypeUtil10 } from "@elementor/editor-props";
|
|
4190
4163
|
import { MenuListItem as MenuListItem5 } from "@elementor/editor-ui";
|
|
@@ -4216,7 +4189,7 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
4216
4189
|
stringPropContext.setValue(value);
|
|
4217
4190
|
}
|
|
4218
4191
|
};
|
|
4219
|
-
return /* @__PURE__ */
|
|
4192
|
+
return /* @__PURE__ */ React73.createElement(Grid14, { container: true, spacing: 1.5 }, /* @__PURE__ */ React73.createElement(Grid14, { item: true, xs: 12 }, /* @__PURE__ */ React73.createElement(PopoverGridContainer, null, /* @__PURE__ */ React73.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React73.createElement(ControlFormLabel, null, __30("Position", "elementor"))), /* @__PURE__ */ React73.createElement(Grid14, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React73.createElement(ControlActions, null, /* @__PURE__ */ React73.createElement(
|
|
4220
4193
|
Select4,
|
|
4221
4194
|
{
|
|
4222
4195
|
fullWidth: true,
|
|
@@ -4225,18 +4198,18 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
4225
4198
|
disabled: stringPropContext.disabled,
|
|
4226
4199
|
value: (backgroundImageOffsetContext.value ? "custom" : stringPropContext.value) ?? ""
|
|
4227
4200
|
},
|
|
4228
|
-
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */
|
|
4229
|
-
))))), isCustom ? /* @__PURE__ */
|
|
4201
|
+
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */ React73.createElement(MenuListItem5, { key: value, value: value ?? "" }, label))
|
|
4202
|
+
))))), isCustom ? /* @__PURE__ */ React73.createElement(PropProvider, { ...backgroundImageOffsetContext }, /* @__PURE__ */ React73.createElement(Grid14, { item: true, xs: 12 }, /* @__PURE__ */ React73.createElement(Grid14, { container: true, spacing: 1.5, ref: rowRef }, /* @__PURE__ */ React73.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React73.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React73.createElement(
|
|
4230
4203
|
SizeControl,
|
|
4231
4204
|
{
|
|
4232
|
-
startIcon: /* @__PURE__ */
|
|
4205
|
+
startIcon: /* @__PURE__ */ React73.createElement(LetterXIcon, { fontSize: "tiny" }),
|
|
4233
4206
|
anchorRef: rowRef,
|
|
4234
4207
|
min: -Number.MAX_SAFE_INTEGER
|
|
4235
4208
|
}
|
|
4236
|
-
))), /* @__PURE__ */
|
|
4209
|
+
))), /* @__PURE__ */ React73.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React73.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React73.createElement(
|
|
4237
4210
|
SizeControl,
|
|
4238
4211
|
{
|
|
4239
|
-
startIcon: /* @__PURE__ */
|
|
4212
|
+
startIcon: /* @__PURE__ */ React73.createElement(LetterYIcon, { fontSize: "tiny" }),
|
|
4240
4213
|
anchorRef: rowRef,
|
|
4241
4214
|
min: -Number.MAX_SAFE_INTEGER
|
|
4242
4215
|
}
|
|
@@ -4244,7 +4217,7 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
4244
4217
|
};
|
|
4245
4218
|
|
|
4246
4219
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-repeat.tsx
|
|
4247
|
-
import * as
|
|
4220
|
+
import * as React74 from "react";
|
|
4248
4221
|
import { DotsHorizontalIcon, DotsVerticalIcon, GridDotsIcon, XIcon as XIcon3 } from "@elementor/icons";
|
|
4249
4222
|
import { Grid as Grid15 } from "@elementor/ui";
|
|
4250
4223
|
import { __ as __31 } from "@wordpress/i18n";
|
|
@@ -4252,34 +4225,34 @@ var repeatControlOptions = [
|
|
|
4252
4225
|
{
|
|
4253
4226
|
value: "repeat",
|
|
4254
4227
|
label: __31("Repeat", "elementor"),
|
|
4255
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4228
|
+
renderContent: ({ size }) => /* @__PURE__ */ React74.createElement(GridDotsIcon, { fontSize: size }),
|
|
4256
4229
|
showTooltip: true
|
|
4257
4230
|
},
|
|
4258
4231
|
{
|
|
4259
4232
|
value: "repeat-x",
|
|
4260
4233
|
label: __31("Repeat-x", "elementor"),
|
|
4261
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4234
|
+
renderContent: ({ size }) => /* @__PURE__ */ React74.createElement(DotsHorizontalIcon, { fontSize: size }),
|
|
4262
4235
|
showTooltip: true
|
|
4263
4236
|
},
|
|
4264
4237
|
{
|
|
4265
4238
|
value: "repeat-y",
|
|
4266
4239
|
label: __31("Repeat-y", "elementor"),
|
|
4267
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4240
|
+
renderContent: ({ size }) => /* @__PURE__ */ React74.createElement(DotsVerticalIcon, { fontSize: size }),
|
|
4268
4241
|
showTooltip: true
|
|
4269
4242
|
},
|
|
4270
4243
|
{
|
|
4271
4244
|
value: "no-repeat",
|
|
4272
4245
|
label: __31("No-repeat", "elementor"),
|
|
4273
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4246
|
+
renderContent: ({ size }) => /* @__PURE__ */ React74.createElement(XIcon3, { fontSize: size }),
|
|
4274
4247
|
showTooltip: true
|
|
4275
4248
|
}
|
|
4276
4249
|
];
|
|
4277
4250
|
var BackgroundImageOverlayRepeat = () => {
|
|
4278
|
-
return /* @__PURE__ */
|
|
4251
|
+
return /* @__PURE__ */ React74.createElement(PopoverGridContainer, null, /* @__PURE__ */ React74.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React74.createElement(ControlFormLabel, null, __31("Repeat", "elementor"))), /* @__PURE__ */ React74.createElement(Grid15, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React74.createElement(ToggleControl, { options: repeatControlOptions })));
|
|
4279
4252
|
};
|
|
4280
4253
|
|
|
4281
4254
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx
|
|
4282
|
-
import * as
|
|
4255
|
+
import * as React75 from "react";
|
|
4283
4256
|
import { useRef as useRef12 } from "react";
|
|
4284
4257
|
import { backgroundImageSizeScalePropTypeUtil, stringPropTypeUtil as stringPropTypeUtil11 } from "@elementor/editor-props";
|
|
4285
4258
|
import {
|
|
@@ -4296,25 +4269,25 @@ var sizeControlOptions = [
|
|
|
4296
4269
|
{
|
|
4297
4270
|
value: "auto",
|
|
4298
4271
|
label: __32("Auto", "elementor"),
|
|
4299
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4272
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(LetterAIcon, { fontSize: size }),
|
|
4300
4273
|
showTooltip: true
|
|
4301
4274
|
},
|
|
4302
4275
|
{
|
|
4303
4276
|
value: "cover",
|
|
4304
4277
|
label: __32("Cover", "elementor"),
|
|
4305
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4278
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(ArrowsMaximizeIcon, { fontSize: size }),
|
|
4306
4279
|
showTooltip: true
|
|
4307
4280
|
},
|
|
4308
4281
|
{
|
|
4309
4282
|
value: "contain",
|
|
4310
4283
|
label: __32("Contain", "elementor"),
|
|
4311
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4284
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(ArrowBarBothIcon, { fontSize: size }),
|
|
4312
4285
|
showTooltip: true
|
|
4313
4286
|
},
|
|
4314
4287
|
{
|
|
4315
4288
|
value: "custom",
|
|
4316
4289
|
label: __32("Custom", "elementor"),
|
|
4317
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4290
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(PencilIcon, { fontSize: size }),
|
|
4318
4291
|
showTooltip: true
|
|
4319
4292
|
}
|
|
4320
4293
|
];
|
|
@@ -4330,7 +4303,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
4330
4303
|
stringPropContext.setValue(size);
|
|
4331
4304
|
}
|
|
4332
4305
|
};
|
|
4333
|
-
return /* @__PURE__ */
|
|
4306
|
+
return /* @__PURE__ */ React75.createElement(Grid16, { container: true, spacing: 1.5 }, /* @__PURE__ */ React75.createElement(Grid16, { item: true, xs: 12 }, /* @__PURE__ */ React75.createElement(PopoverGridContainer, null, /* @__PURE__ */ React75.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React75.createElement(ControlFormLabel, null, __32("Size", "elementor"))), /* @__PURE__ */ React75.createElement(Grid16, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React75.createElement(
|
|
4334
4307
|
ControlToggleButtonGroup,
|
|
4335
4308
|
{
|
|
4336
4309
|
exclusive: true,
|
|
@@ -4339,17 +4312,17 @@ var BackgroundImageOverlaySize = () => {
|
|
|
4339
4312
|
disabled: stringPropContext.disabled,
|
|
4340
4313
|
value: backgroundImageScaleContext.value ? "custom" : stringPropContext.value
|
|
4341
4314
|
}
|
|
4342
|
-
)))), isCustom ? /* @__PURE__ */
|
|
4315
|
+
)))), isCustom ? /* @__PURE__ */ React75.createElement(PropProvider, { ...backgroundImageScaleContext }, /* @__PURE__ */ React75.createElement(Grid16, { item: true, xs: 12, ref: rowRef }, /* @__PURE__ */ React75.createElement(PopoverGridContainer, null, /* @__PURE__ */ React75.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React75.createElement(PropKeyProvider, { bind: "width" }, /* @__PURE__ */ React75.createElement(
|
|
4343
4316
|
SizeControl,
|
|
4344
4317
|
{
|
|
4345
|
-
startIcon: /* @__PURE__ */
|
|
4318
|
+
startIcon: /* @__PURE__ */ React75.createElement(ArrowsMoveHorizontalIcon2, { fontSize: "tiny" }),
|
|
4346
4319
|
extendedOptions: ["auto"],
|
|
4347
4320
|
anchorRef: rowRef
|
|
4348
4321
|
}
|
|
4349
|
-
))), /* @__PURE__ */
|
|
4322
|
+
))), /* @__PURE__ */ React75.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React75.createElement(PropKeyProvider, { bind: "height" }, /* @__PURE__ */ React75.createElement(
|
|
4350
4323
|
SizeControl,
|
|
4351
4324
|
{
|
|
4352
|
-
startIcon: /* @__PURE__ */
|
|
4325
|
+
startIcon: /* @__PURE__ */ React75.createElement(ArrowsMoveVerticalIcon2, { fontSize: "tiny" }),
|
|
4353
4326
|
extendedOptions: ["auto"],
|
|
4354
4327
|
anchorRef: rowRef
|
|
4355
4328
|
}
|
|
@@ -4457,22 +4430,22 @@ var backgroundResolutionOptions = [
|
|
|
4457
4430
|
];
|
|
4458
4431
|
var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
4459
4432
|
const { propType, value: overlayValues, setValue } = useBoundProp(backgroundOverlayPropTypeUtil);
|
|
4460
|
-
return /* @__PURE__ */
|
|
4433
|
+
return /* @__PURE__ */ React76.createElement(PropProvider, { propType, value: overlayValues, setValue }, /* @__PURE__ */ React76.createElement(
|
|
4461
4434
|
ControlRepeater,
|
|
4462
4435
|
{
|
|
4463
4436
|
initial: getInitialBackgroundOverlay(),
|
|
4464
4437
|
propTypeUtil: backgroundOverlayPropTypeUtil
|
|
4465
4438
|
},
|
|
4466
|
-
/* @__PURE__ */
|
|
4467
|
-
/* @__PURE__ */
|
|
4439
|
+
/* @__PURE__ */ React76.createElement(RepeaterHeader, { label: __33("Overlay", "elementor") }, /* @__PURE__ */ React76.createElement(TooltipAddItemAction, { newItemIndex: 0 })),
|
|
4440
|
+
/* @__PURE__ */ React76.createElement(ItemsContainer, null, /* @__PURE__ */ React76.createElement(
|
|
4468
4441
|
Item,
|
|
4469
4442
|
{
|
|
4470
4443
|
Icon: ItemIcon2,
|
|
4471
4444
|
Label: ItemLabel2,
|
|
4472
|
-
actions: /* @__PURE__ */
|
|
4445
|
+
actions: /* @__PURE__ */ React76.createElement(React76.Fragment, null, /* @__PURE__ */ React76.createElement(DuplicateItemAction, null), /* @__PURE__ */ React76.createElement(DisableItemAction, null), /* @__PURE__ */ React76.createElement(RemoveItemAction, null))
|
|
4473
4446
|
}
|
|
4474
4447
|
)),
|
|
4475
|
-
/* @__PURE__ */
|
|
4448
|
+
/* @__PURE__ */ React76.createElement(EditItemPopover, null, /* @__PURE__ */ React76.createElement(ItemContent, null))
|
|
4476
4449
|
));
|
|
4477
4450
|
});
|
|
4478
4451
|
var ItemContent = () => {
|
|
@@ -4482,7 +4455,7 @@ var ItemContent = () => {
|
|
|
4482
4455
|
gradient: initialBackgroundGradientOverlay.value
|
|
4483
4456
|
});
|
|
4484
4457
|
const { rowRef } = useRepeaterContext();
|
|
4485
|
-
return /* @__PURE__ */
|
|
4458
|
+
return /* @__PURE__ */ React76.createElement(Box13, { sx: { width: "100%" } }, /* @__PURE__ */ React76.createElement(Box13, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React76.createElement(
|
|
4486
4459
|
Tabs,
|
|
4487
4460
|
{
|
|
4488
4461
|
size: "small",
|
|
@@ -4490,19 +4463,19 @@ var ItemContent = () => {
|
|
|
4490
4463
|
...getTabsProps(),
|
|
4491
4464
|
"aria-label": __33("Background Overlay", "elementor")
|
|
4492
4465
|
},
|
|
4493
|
-
/* @__PURE__ */
|
|
4494
|
-
/* @__PURE__ */
|
|
4495
|
-
/* @__PURE__ */
|
|
4496
|
-
)), /* @__PURE__ */
|
|
4466
|
+
/* @__PURE__ */ React76.createElement(Tab, { label: __33("Image", "elementor"), ...getTabProps("image") }),
|
|
4467
|
+
/* @__PURE__ */ React76.createElement(Tab, { label: __33("Gradient", "elementor"), ...getTabProps("gradient") }),
|
|
4468
|
+
/* @__PURE__ */ React76.createElement(Tab, { label: __33("Color", "elementor"), ...getTabProps("color") })
|
|
4469
|
+
)), /* @__PURE__ */ React76.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("image") }, /* @__PURE__ */ React76.createElement(PopoverContent, null, /* @__PURE__ */ React76.createElement(ImageOverlayContent, null))), /* @__PURE__ */ React76.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("gradient") }, /* @__PURE__ */ React76.createElement(BackgroundGradientColorControl, null)), /* @__PURE__ */ React76.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("color") }, /* @__PURE__ */ React76.createElement(PopoverContent, null, /* @__PURE__ */ React76.createElement(ColorOverlayContent, { anchorEl: rowRef }))));
|
|
4497
4470
|
};
|
|
4498
4471
|
var ItemIcon2 = ({ value }) => {
|
|
4499
4472
|
switch (value.$$type) {
|
|
4500
4473
|
case "background-image-overlay":
|
|
4501
|
-
return /* @__PURE__ */
|
|
4474
|
+
return /* @__PURE__ */ React76.createElement(ItemIconImage, { value });
|
|
4502
4475
|
case "background-color-overlay":
|
|
4503
|
-
return /* @__PURE__ */
|
|
4476
|
+
return /* @__PURE__ */ React76.createElement(ItemIconColor, { value });
|
|
4504
4477
|
case "background-gradient-overlay":
|
|
4505
|
-
return /* @__PURE__ */
|
|
4478
|
+
return /* @__PURE__ */ React76.createElement(ItemIconGradient, { value });
|
|
4506
4479
|
default:
|
|
4507
4480
|
return null;
|
|
4508
4481
|
}
|
|
@@ -4515,11 +4488,11 @@ var extractColorFrom = (prop) => {
|
|
|
4515
4488
|
};
|
|
4516
4489
|
var ItemIconColor = ({ value: prop }) => {
|
|
4517
4490
|
const color = extractColorFrom(prop);
|
|
4518
|
-
return /* @__PURE__ */
|
|
4491
|
+
return /* @__PURE__ */ React76.createElement(StyledUnstableColorIndicator3, { size: "inherit", component: "span", value: color });
|
|
4519
4492
|
};
|
|
4520
4493
|
var ItemIconImage = ({ value }) => {
|
|
4521
4494
|
const { imageUrl } = useImage(value);
|
|
4522
|
-
return /* @__PURE__ */
|
|
4495
|
+
return /* @__PURE__ */ React76.createElement(
|
|
4523
4496
|
CardMedia3,
|
|
4524
4497
|
{
|
|
4525
4498
|
image: imageUrl,
|
|
@@ -4534,43 +4507,43 @@ var ItemIconImage = ({ value }) => {
|
|
|
4534
4507
|
};
|
|
4535
4508
|
var ItemIconGradient = ({ value }) => {
|
|
4536
4509
|
const gradient = getGradientValue(value);
|
|
4537
|
-
return /* @__PURE__ */
|
|
4510
|
+
return /* @__PURE__ */ React76.createElement(StyledUnstableColorIndicator3, { size: "inherit", component: "span", value: gradient });
|
|
4538
4511
|
};
|
|
4539
4512
|
var ItemLabel2 = ({ value }) => {
|
|
4540
4513
|
switch (value.$$type) {
|
|
4541
4514
|
case "background-image-overlay":
|
|
4542
|
-
return /* @__PURE__ */
|
|
4515
|
+
return /* @__PURE__ */ React76.createElement(ItemLabelImage, { value });
|
|
4543
4516
|
case "background-color-overlay":
|
|
4544
|
-
return /* @__PURE__ */
|
|
4517
|
+
return /* @__PURE__ */ React76.createElement(ItemLabelColor, { value });
|
|
4545
4518
|
case "background-gradient-overlay":
|
|
4546
|
-
return /* @__PURE__ */
|
|
4519
|
+
return /* @__PURE__ */ React76.createElement(ItemLabelGradient, { value });
|
|
4547
4520
|
default:
|
|
4548
4521
|
return null;
|
|
4549
4522
|
}
|
|
4550
4523
|
};
|
|
4551
4524
|
var ItemLabelColor = ({ value: prop }) => {
|
|
4552
4525
|
const color = extractColorFrom(prop);
|
|
4553
|
-
return /* @__PURE__ */
|
|
4526
|
+
return /* @__PURE__ */ React76.createElement("span", null, color);
|
|
4554
4527
|
};
|
|
4555
4528
|
var ItemLabelImage = ({ value }) => {
|
|
4556
4529
|
const { imageTitle } = useImage(value);
|
|
4557
|
-
return /* @__PURE__ */
|
|
4530
|
+
return /* @__PURE__ */ React76.createElement("span", null, imageTitle);
|
|
4558
4531
|
};
|
|
4559
4532
|
var ItemLabelGradient = ({ value }) => {
|
|
4560
4533
|
if (value.value.type.value === "linear") {
|
|
4561
|
-
return /* @__PURE__ */
|
|
4534
|
+
return /* @__PURE__ */ React76.createElement("span", null, __33("Linear Gradient", "elementor"));
|
|
4562
4535
|
}
|
|
4563
|
-
return /* @__PURE__ */
|
|
4536
|
+
return /* @__PURE__ */ React76.createElement("span", null, __33("Radial Gradient", "elementor"));
|
|
4564
4537
|
};
|
|
4565
4538
|
var ColorOverlayContent = ({ anchorEl }) => {
|
|
4566
4539
|
const propContext = useBoundProp(backgroundColorOverlayPropTypeUtil2);
|
|
4567
|
-
return /* @__PURE__ */
|
|
4540
|
+
return /* @__PURE__ */ React76.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React76.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React76.createElement(ColorControl, { anchorEl })));
|
|
4568
4541
|
};
|
|
4569
4542
|
var ImageOverlayContent = () => {
|
|
4570
4543
|
const propContext = useBoundProp(backgroundImageOverlayPropTypeUtil2);
|
|
4571
|
-
return /* @__PURE__ */
|
|
4544
|
+
return /* @__PURE__ */ React76.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React76.createElement(PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React76.createElement(ImageControl, { sizes: backgroundResolutionOptions })), /* @__PURE__ */ React76.createElement(PropKeyProvider, { bind: "position" }, /* @__PURE__ */ React76.createElement(BackgroundImageOverlayPosition, null)), /* @__PURE__ */ React76.createElement(PropKeyProvider, { bind: "repeat" }, /* @__PURE__ */ React76.createElement(BackgroundImageOverlayRepeat, null)), /* @__PURE__ */ React76.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React76.createElement(BackgroundImageOverlaySize, null)), /* @__PURE__ */ React76.createElement(PropKeyProvider, { bind: "attachment" }, /* @__PURE__ */ React76.createElement(BackgroundImageOverlayAttachment, null)));
|
|
4572
4545
|
};
|
|
4573
|
-
var StyledUnstableColorIndicator3 =
|
|
4546
|
+
var StyledUnstableColorIndicator3 = styled8(UnstableColorIndicator3)(({ theme }) => ({
|
|
4574
4547
|
height: "1rem",
|
|
4575
4548
|
width: "1rem",
|
|
4576
4549
|
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
@@ -4616,17 +4589,17 @@ var colorLabel = __34("Color", "elementor");
|
|
|
4616
4589
|
var clipLabel = __34("Clipping", "elementor");
|
|
4617
4590
|
var BackgroundControl = createControl(() => {
|
|
4618
4591
|
const propContext = useBoundProp(backgroundPropTypeUtil);
|
|
4619
|
-
return /* @__PURE__ */
|
|
4592
|
+
return /* @__PURE__ */ React77.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React77.createElement(PropKeyProvider, { bind: "background-overlay" }, /* @__PURE__ */ React77.createElement(BackgroundOverlayRepeaterControl, null)), /* @__PURE__ */ React77.createElement(BackgroundColorField, null), /* @__PURE__ */ React77.createElement(BackgroundClipField, null));
|
|
4620
4593
|
});
|
|
4621
4594
|
var BackgroundColorField = () => {
|
|
4622
|
-
return /* @__PURE__ */
|
|
4595
|
+
return /* @__PURE__ */ React77.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React77.createElement(Grid17, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React77.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React77.createElement(ControlLabel, null, colorLabel)), /* @__PURE__ */ React77.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React77.createElement(ColorControl, null))));
|
|
4623
4596
|
};
|
|
4624
4597
|
var BackgroundClipField = () => {
|
|
4625
|
-
return /* @__PURE__ */
|
|
4598
|
+
return /* @__PURE__ */ React77.createElement(PropKeyProvider, { bind: "clip" }, /* @__PURE__ */ React77.createElement(Grid17, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React77.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React77.createElement(ControlLabel, null, clipLabel)), /* @__PURE__ */ React77.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React77.createElement(SelectControl, { options: clipOptions }))));
|
|
4626
4599
|
};
|
|
4627
4600
|
|
|
4628
4601
|
// src/controls/repeatable-control.tsx
|
|
4629
|
-
import * as
|
|
4602
|
+
import * as React78 from "react";
|
|
4630
4603
|
import { useMemo as useMemo9 } from "react";
|
|
4631
4604
|
import { createArrayPropUtils } from "@elementor/editor-props";
|
|
4632
4605
|
import { Box as Box14 } from "@elementor/ui";
|
|
@@ -4660,14 +4633,14 @@ var RepeatableControl = createControl(
|
|
|
4660
4633
|
[childControlConfig, placeholder, patternLabel]
|
|
4661
4634
|
);
|
|
4662
4635
|
const { propType, value, setValue } = useBoundProp(childArrayPropTypeUtil2);
|
|
4663
|
-
return /* @__PURE__ */
|
|
4636
|
+
return /* @__PURE__ */ React78.createElement(PropProvider, { propType, value, setValue }, /* @__PURE__ */ React78.createElement(RepeatableControlContext.Provider, { value: contextValue }, /* @__PURE__ */ React78.createElement(
|
|
4664
4637
|
ControlRepeater,
|
|
4665
4638
|
{
|
|
4666
4639
|
initial: childPropTypeUtil.create(initialValues || null),
|
|
4667
4640
|
propTypeUtil: childArrayPropTypeUtil2,
|
|
4668
4641
|
isItemDisabled: isItemDisabled2
|
|
4669
4642
|
},
|
|
4670
|
-
/* @__PURE__ */
|
|
4643
|
+
/* @__PURE__ */ React78.createElement(RepeaterHeader, { label: repeaterLabel }, /* @__PURE__ */ React78.createElement(
|
|
4671
4644
|
TooltipAddItemAction,
|
|
4672
4645
|
{
|
|
4673
4646
|
...addItemTooltipProps,
|
|
@@ -4675,22 +4648,22 @@ var RepeatableControl = createControl(
|
|
|
4675
4648
|
ariaLabel: repeaterLabel
|
|
4676
4649
|
}
|
|
4677
4650
|
)),
|
|
4678
|
-
/* @__PURE__ */
|
|
4651
|
+
/* @__PURE__ */ React78.createElement(ItemsContainer, { isSortable: false }, /* @__PURE__ */ React78.createElement(
|
|
4679
4652
|
Item,
|
|
4680
4653
|
{
|
|
4681
4654
|
Icon: ItemIcon3,
|
|
4682
4655
|
Label: ItemLabel3,
|
|
4683
|
-
actions: /* @__PURE__ */
|
|
4656
|
+
actions: /* @__PURE__ */ React78.createElement(React78.Fragment, null, showDuplicate && /* @__PURE__ */ React78.createElement(DuplicateItemAction, null), showToggle && /* @__PURE__ */ React78.createElement(DisableItemAction, null), /* @__PURE__ */ React78.createElement(RemoveItemAction, null))
|
|
4684
4657
|
}
|
|
4685
4658
|
)),
|
|
4686
|
-
/* @__PURE__ */
|
|
4659
|
+
/* @__PURE__ */ React78.createElement(EditItemPopover, null, /* @__PURE__ */ React78.createElement(Content2, null))
|
|
4687
4660
|
)));
|
|
4688
4661
|
}
|
|
4689
4662
|
);
|
|
4690
|
-
var ItemIcon3 = () => /* @__PURE__ */
|
|
4663
|
+
var ItemIcon3 = () => /* @__PURE__ */ React78.createElement(React78.Fragment, null);
|
|
4691
4664
|
var Content2 = () => {
|
|
4692
4665
|
const { component: ChildControl, props = {} } = useRepeatableControlContext();
|
|
4693
|
-
return /* @__PURE__ */
|
|
4666
|
+
return /* @__PURE__ */ React78.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React78.createElement(PopoverGridContainer, null, /* @__PURE__ */ React78.createElement(ChildControl, { ...props })));
|
|
4694
4667
|
};
|
|
4695
4668
|
var interpolate = (template, data) => {
|
|
4696
4669
|
if (!data) {
|
|
@@ -4773,7 +4746,7 @@ var ItemLabel3 = ({ value }) => {
|
|
|
4773
4746
|
const label = showPlaceholder ? placeholder : interpolate(patternLabel, value);
|
|
4774
4747
|
const isReadOnly = !!childProps?.readOnly;
|
|
4775
4748
|
const color = getTextColor(isReadOnly, showPlaceholder);
|
|
4776
|
-
return /* @__PURE__ */
|
|
4749
|
+
return /* @__PURE__ */ React78.createElement(Box14, { component: "span", color }, label);
|
|
4777
4750
|
};
|
|
4778
4751
|
var getAllProperties = (pattern) => {
|
|
4779
4752
|
const properties = pattern.match(PLACEHOLDER_REGEX)?.map((match) => match.slice(2, -1)) || [];
|
|
@@ -4781,8 +4754,8 @@ var getAllProperties = (pattern) => {
|
|
|
4781
4754
|
};
|
|
4782
4755
|
|
|
4783
4756
|
// src/controls/key-value-control.tsx
|
|
4784
|
-
import * as
|
|
4785
|
-
import { useMemo as useMemo10, useState as
|
|
4757
|
+
import * as React79 from "react";
|
|
4758
|
+
import { useMemo as useMemo10, useState as useState15 } from "react";
|
|
4786
4759
|
import {
|
|
4787
4760
|
isTransformable,
|
|
4788
4761
|
keyValuePropTypeUtil,
|
|
@@ -4813,9 +4786,9 @@ var getInitialFieldValue = (fieldValue) => {
|
|
|
4813
4786
|
};
|
|
4814
4787
|
var KeyValueControl = createControl((props = {}) => {
|
|
4815
4788
|
const { value, setValue, ...propContext } = useBoundProp(keyValuePropTypeUtil);
|
|
4816
|
-
const [keyError, setKeyError] =
|
|
4817
|
-
const [valueError, setValueError] =
|
|
4818
|
-
const [sessionState, setSessionState] =
|
|
4789
|
+
const [keyError, setKeyError] = useState15("");
|
|
4790
|
+
const [valueError, setValueError] = useState15("");
|
|
4791
|
+
const [sessionState, setSessionState] = useState15({
|
|
4819
4792
|
key: getInitialFieldValue(value?.key),
|
|
4820
4793
|
value: getInitialFieldValue(value?.value)
|
|
4821
4794
|
});
|
|
@@ -4878,14 +4851,14 @@ var KeyValueControl = createControl((props = {}) => {
|
|
|
4878
4851
|
});
|
|
4879
4852
|
}
|
|
4880
4853
|
};
|
|
4881
|
-
return /* @__PURE__ */
|
|
4854
|
+
return /* @__PURE__ */ React79.createElement(PropProvider, { ...propContext, value, setValue: handleChange }, /* @__PURE__ */ React79.createElement(Grid18, { container: true, gap: 1.5 }, /* @__PURE__ */ React79.createElement(Grid18, { item: true, xs: 12, display: "flex", flexDirection: "column" }, /* @__PURE__ */ React79.createElement(FormLabel3, { size: "tiny", sx: { pb: 1 } }, keyLabel), /* @__PURE__ */ React79.createElement(PropKeyProvider, { bind: "key" }, /* @__PURE__ */ React79.createElement(
|
|
4882
4855
|
TextControl,
|
|
4883
4856
|
{
|
|
4884
4857
|
inputValue: props.escapeHtml ? escapeHtmlAttr(sessionState.key) : sessionState.key,
|
|
4885
4858
|
error: !!keyError,
|
|
4886
4859
|
helperText: keyHelper
|
|
4887
4860
|
}
|
|
4888
|
-
)), !!keyError && /* @__PURE__ */
|
|
4861
|
+
)), !!keyError && /* @__PURE__ */ React79.createElement(FormHelperText, { error: true }, keyError)), /* @__PURE__ */ React79.createElement(Grid18, { item: true, xs: 12, display: "flex", flexDirection: "column" }, /* @__PURE__ */ React79.createElement(FormLabel3, { size: "tiny", sx: { pb: 1 } }, valueLabel), /* @__PURE__ */ React79.createElement(PropKeyProvider, { bind: "value" }, /* @__PURE__ */ React79.createElement(
|
|
4889
4862
|
TextControl,
|
|
4890
4863
|
{
|
|
4891
4864
|
inputValue: props.escapeHtml ? escapeHtmlAttr(sessionState.value) : sessionState.value,
|
|
@@ -4893,11 +4866,11 @@ var KeyValueControl = createControl((props = {}) => {
|
|
|
4893
4866
|
inputDisabled: !!keyError,
|
|
4894
4867
|
helperText: valueHelper
|
|
4895
4868
|
}
|
|
4896
|
-
)), !!valueError && /* @__PURE__ */
|
|
4869
|
+
)), !!valueError && /* @__PURE__ */ React79.createElement(FormHelperText, { error: true }, valueError))));
|
|
4897
4870
|
});
|
|
4898
4871
|
|
|
4899
4872
|
// src/controls/position-control.tsx
|
|
4900
|
-
import * as
|
|
4873
|
+
import * as React80 from "react";
|
|
4901
4874
|
import { positionPropTypeUtil, stringPropTypeUtil as stringPropTypeUtil13 } from "@elementor/editor-props";
|
|
4902
4875
|
import { MenuListItem as MenuListItem6 } from "@elementor/editor-ui";
|
|
4903
4876
|
import { LetterXIcon as LetterXIcon2, LetterYIcon as LetterYIcon2 } from "@elementor/icons";
|
|
@@ -4927,7 +4900,7 @@ var PositionControl = () => {
|
|
|
4927
4900
|
stringPropContext.setValue(value);
|
|
4928
4901
|
}
|
|
4929
4902
|
};
|
|
4930
|
-
return /* @__PURE__ */
|
|
4903
|
+
return /* @__PURE__ */ React80.createElement(Grid19, { container: true, spacing: 1.5 }, /* @__PURE__ */ React80.createElement(Grid19, { item: true, xs: 12 }, /* @__PURE__ */ React80.createElement(Grid19, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React80.createElement(Grid19, { item: true, xs: 6 }, /* @__PURE__ */ React80.createElement(ControlFormLabel, null, __36("Object position", "elementor"))), /* @__PURE__ */ React80.createElement(Grid19, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React80.createElement(
|
|
4931
4904
|
Select5,
|
|
4932
4905
|
{
|
|
4933
4906
|
size: "tiny",
|
|
@@ -4936,24 +4909,24 @@ var PositionControl = () => {
|
|
|
4936
4909
|
onChange: handlePositionChange,
|
|
4937
4910
|
fullWidth: true
|
|
4938
4911
|
},
|
|
4939
|
-
positionOptions.map(({ label, value }) => /* @__PURE__ */
|
|
4940
|
-
)))), isCustom && /* @__PURE__ */
|
|
4912
|
+
positionOptions.map(({ label, value }) => /* @__PURE__ */ React80.createElement(MenuListItem6, { key: value, value: value ?? "" }, label))
|
|
4913
|
+
)))), isCustom && /* @__PURE__ */ React80.createElement(PropProvider, { ...positionContext }, /* @__PURE__ */ React80.createElement(Grid19, { item: true, xs: 12 }, /* @__PURE__ */ React80.createElement(Grid19, { container: true, spacing: 1.5 }, /* @__PURE__ */ React80.createElement(Grid19, { item: true, xs: 6 }, /* @__PURE__ */ React80.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React80.createElement(
|
|
4941
4914
|
SizeControl,
|
|
4942
4915
|
{
|
|
4943
|
-
startIcon: /* @__PURE__ */
|
|
4916
|
+
startIcon: /* @__PURE__ */ React80.createElement(LetterXIcon2, { fontSize: "tiny" }),
|
|
4944
4917
|
min: -Number.MAX_SAFE_INTEGER
|
|
4945
4918
|
}
|
|
4946
|
-
))), /* @__PURE__ */
|
|
4919
|
+
))), /* @__PURE__ */ React80.createElement(Grid19, { item: true, xs: 6 }, /* @__PURE__ */ React80.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React80.createElement(
|
|
4947
4920
|
SizeControl,
|
|
4948
4921
|
{
|
|
4949
|
-
startIcon: /* @__PURE__ */
|
|
4922
|
+
startIcon: /* @__PURE__ */ React80.createElement(LetterYIcon2, { fontSize: "tiny" }),
|
|
4950
4923
|
min: -Number.MAX_SAFE_INTEGER
|
|
4951
4924
|
}
|
|
4952
4925
|
)))))));
|
|
4953
4926
|
};
|
|
4954
4927
|
|
|
4955
4928
|
// src/controls/transform-control/transform-repeater-control.tsx
|
|
4956
|
-
import * as
|
|
4929
|
+
import * as React93 from "react";
|
|
4957
4930
|
import { useRef as useRef21 } from "react";
|
|
4958
4931
|
import { transformFunctionsPropTypeUtil, transformPropTypeUtil } from "@elementor/editor-props";
|
|
4959
4932
|
import { AdjustmentsIcon as AdjustmentsIcon2, InfoCircleFilledIcon as InfoCircleFilledIcon2 } from "@elementor/icons";
|
|
@@ -5027,12 +5000,12 @@ var initialSkewValue = skewTransformPropTypeUtil.create({
|
|
|
5027
5000
|
});
|
|
5028
5001
|
|
|
5029
5002
|
// src/controls/transform-control/transform-content.tsx
|
|
5030
|
-
import * as
|
|
5003
|
+
import * as React87 from "react";
|
|
5031
5004
|
import { Box as Box15, Tab as Tab2, TabPanel as TabPanel2, Tabs as Tabs2 } from "@elementor/ui";
|
|
5032
5005
|
import { __ as __41 } from "@wordpress/i18n";
|
|
5033
5006
|
|
|
5034
5007
|
// src/controls/transform-control/functions/move.tsx
|
|
5035
|
-
import * as
|
|
5008
|
+
import * as React82 from "react";
|
|
5036
5009
|
import { useRef as useRef14 } from "react";
|
|
5037
5010
|
import { moveTransformPropTypeUtil } from "@elementor/editor-props";
|
|
5038
5011
|
import { ArrowDownLeftIcon, ArrowDownSmallIcon, ArrowRightIcon } from "@elementor/icons";
|
|
@@ -5040,11 +5013,11 @@ import { Grid as Grid21 } from "@elementor/ui";
|
|
|
5040
5013
|
import { __ as __37 } from "@wordpress/i18n";
|
|
5041
5014
|
|
|
5042
5015
|
// src/controls/transform-control/functions/axis-row.tsx
|
|
5043
|
-
import * as
|
|
5016
|
+
import * as React81 from "react";
|
|
5044
5017
|
import { Grid as Grid20 } from "@elementor/ui";
|
|
5045
5018
|
var AxisRow = ({ label, bind, startIcon, anchorRef, units: units2, variant = "angle" }) => {
|
|
5046
5019
|
const safeId = label.replace(/\s+/g, "-").toLowerCase();
|
|
5047
|
-
return /* @__PURE__ */
|
|
5020
|
+
return /* @__PURE__ */ React81.createElement(Grid20, { item: true, xs: 12 }, /* @__PURE__ */ React81.createElement(PopoverGridContainer, { ref: anchorRef }, /* @__PURE__ */ React81.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React81.createElement(ControlLabel, { htmlFor: safeId }, label)), /* @__PURE__ */ React81.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React81.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React81.createElement(
|
|
5048
5021
|
SizeControl,
|
|
5049
5022
|
{
|
|
5050
5023
|
anchorRef,
|
|
@@ -5062,26 +5035,26 @@ var moveAxisControls = [
|
|
|
5062
5035
|
{
|
|
5063
5036
|
label: __37("Move X", "elementor"),
|
|
5064
5037
|
bind: "x",
|
|
5065
|
-
startIcon: /* @__PURE__ */
|
|
5038
|
+
startIcon: /* @__PURE__ */ React82.createElement(ArrowRightIcon, { fontSize: "tiny" }),
|
|
5066
5039
|
units: ["px", "%", "em", "rem", "vw"]
|
|
5067
5040
|
},
|
|
5068
5041
|
{
|
|
5069
5042
|
label: __37("Move Y", "elementor"),
|
|
5070
5043
|
bind: "y",
|
|
5071
|
-
startIcon: /* @__PURE__ */
|
|
5044
|
+
startIcon: /* @__PURE__ */ React82.createElement(ArrowDownSmallIcon, { fontSize: "tiny" }),
|
|
5072
5045
|
units: ["px", "%", "em", "rem", "vh"]
|
|
5073
5046
|
},
|
|
5074
5047
|
{
|
|
5075
5048
|
label: __37("Move Z", "elementor"),
|
|
5076
5049
|
bind: "z",
|
|
5077
|
-
startIcon: /* @__PURE__ */
|
|
5050
|
+
startIcon: /* @__PURE__ */ React82.createElement(ArrowDownLeftIcon, { fontSize: "tiny" }),
|
|
5078
5051
|
units: ["px", "%", "em", "rem", "vw", "vh"]
|
|
5079
5052
|
}
|
|
5080
5053
|
];
|
|
5081
5054
|
var Move = () => {
|
|
5082
5055
|
const context = useBoundProp(moveTransformPropTypeUtil);
|
|
5083
5056
|
const rowRefs = [useRef14(null), useRef14(null), useRef14(null)];
|
|
5084
|
-
return /* @__PURE__ */
|
|
5057
|
+
return /* @__PURE__ */ React82.createElement(Grid21, { container: true, spacing: 1.5 }, /* @__PURE__ */ React82.createElement(PropProvider, { ...context }, /* @__PURE__ */ React82.createElement(PropKeyProvider, { bind: TransformFunctionKeys.move }, moveAxisControls.map((control, index) => /* @__PURE__ */ React82.createElement(
|
|
5085
5058
|
AxisRow,
|
|
5086
5059
|
{
|
|
5087
5060
|
key: control.bind,
|
|
@@ -5094,7 +5067,7 @@ var Move = () => {
|
|
|
5094
5067
|
};
|
|
5095
5068
|
|
|
5096
5069
|
// src/controls/transform-control/functions/rotate.tsx
|
|
5097
|
-
import * as
|
|
5070
|
+
import * as React83 from "react";
|
|
5098
5071
|
import { useRef as useRef15 } from "react";
|
|
5099
5072
|
import { rotateTransformPropTypeUtil as rotateTransformPropTypeUtil2 } from "@elementor/editor-props";
|
|
5100
5073
|
import { Arrow360Icon, RotateClockwiseIcon } from "@elementor/icons";
|
|
@@ -5104,24 +5077,24 @@ var rotateAxisControls = [
|
|
|
5104
5077
|
{
|
|
5105
5078
|
label: __38("Rotate X", "elementor"),
|
|
5106
5079
|
bind: "x",
|
|
5107
|
-
startIcon: /* @__PURE__ */
|
|
5080
|
+
startIcon: /* @__PURE__ */ React83.createElement(Arrow360Icon, { fontSize: "tiny" })
|
|
5108
5081
|
},
|
|
5109
5082
|
{
|
|
5110
5083
|
label: __38("Rotate Y", "elementor"),
|
|
5111
5084
|
bind: "y",
|
|
5112
|
-
startIcon: /* @__PURE__ */
|
|
5085
|
+
startIcon: /* @__PURE__ */ React83.createElement(Arrow360Icon, { fontSize: "tiny", style: { transform: "scaleX(-1) rotate(-90deg)" } })
|
|
5113
5086
|
},
|
|
5114
5087
|
{
|
|
5115
5088
|
label: __38("Rotate Z", "elementor"),
|
|
5116
5089
|
bind: "z",
|
|
5117
|
-
startIcon: /* @__PURE__ */
|
|
5090
|
+
startIcon: /* @__PURE__ */ React83.createElement(RotateClockwiseIcon, { fontSize: "tiny" })
|
|
5118
5091
|
}
|
|
5119
5092
|
];
|
|
5120
5093
|
var rotateUnits = ["deg", "rad", "grad", "turn"];
|
|
5121
5094
|
var Rotate = () => {
|
|
5122
5095
|
const context = useBoundProp(rotateTransformPropTypeUtil2);
|
|
5123
5096
|
const rowRefs = [useRef15(null), useRef15(null), useRef15(null)];
|
|
5124
|
-
return /* @__PURE__ */
|
|
5097
|
+
return /* @__PURE__ */ React83.createElement(Grid22, { container: true, spacing: 1.5 }, /* @__PURE__ */ React83.createElement(PropProvider, { ...context }, /* @__PURE__ */ React83.createElement(PropKeyProvider, { bind: TransformFunctionKeys.rotate }, rotateAxisControls.map((control, index) => /* @__PURE__ */ React83.createElement(
|
|
5125
5098
|
AxisRow,
|
|
5126
5099
|
{
|
|
5127
5100
|
key: control.bind,
|
|
@@ -5133,7 +5106,7 @@ var Rotate = () => {
|
|
|
5133
5106
|
};
|
|
5134
5107
|
|
|
5135
5108
|
// src/controls/transform-control/functions/scale.tsx
|
|
5136
|
-
import * as
|
|
5109
|
+
import * as React85 from "react";
|
|
5137
5110
|
import { useRef as useRef16 } from "react";
|
|
5138
5111
|
import { scaleTransformPropTypeUtil as scaleTransformPropTypeUtil2 } from "@elementor/editor-props";
|
|
5139
5112
|
import { ArrowDownLeftIcon as ArrowDownLeftIcon2, ArrowDownSmallIcon as ArrowDownSmallIcon2, ArrowRightIcon as ArrowRightIcon2 } from "@elementor/icons";
|
|
@@ -5141,10 +5114,10 @@ import { Grid as Grid24 } from "@elementor/ui";
|
|
|
5141
5114
|
import { __ as __39 } from "@wordpress/i18n";
|
|
5142
5115
|
|
|
5143
5116
|
// src/controls/transform-control/functions/scale-axis-row.tsx
|
|
5144
|
-
import * as
|
|
5117
|
+
import * as React84 from "react";
|
|
5145
5118
|
import { Grid as Grid23 } from "@elementor/ui";
|
|
5146
5119
|
var ScaleAxisRow = ({ label, bind, startIcon, anchorRef }) => {
|
|
5147
|
-
return /* @__PURE__ */
|
|
5120
|
+
return /* @__PURE__ */ React84.createElement(Grid23, { item: true, xs: 12 }, /* @__PURE__ */ React84.createElement(PopoverGridContainer, { ref: anchorRef }, /* @__PURE__ */ React84.createElement(Grid23, { item: true, xs: 6 }, /* @__PURE__ */ React84.createElement(ControlLabel, null, label)), /* @__PURE__ */ React84.createElement(Grid23, { item: true, xs: 6 }, /* @__PURE__ */ React84.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React84.createElement(NumberControl, { step: 0.1, placeholder: "1", startIcon })))));
|
|
5148
5121
|
};
|
|
5149
5122
|
|
|
5150
5123
|
// src/controls/transform-control/functions/scale.tsx
|
|
@@ -5152,27 +5125,27 @@ var scaleAxisControls = [
|
|
|
5152
5125
|
{
|
|
5153
5126
|
label: __39("Scale X", "elementor"),
|
|
5154
5127
|
bind: "x",
|
|
5155
|
-
startIcon: /* @__PURE__ */
|
|
5128
|
+
startIcon: /* @__PURE__ */ React85.createElement(ArrowRightIcon2, { fontSize: "tiny" })
|
|
5156
5129
|
},
|
|
5157
5130
|
{
|
|
5158
5131
|
label: __39("Scale Y", "elementor"),
|
|
5159
5132
|
bind: "y",
|
|
5160
|
-
startIcon: /* @__PURE__ */
|
|
5133
|
+
startIcon: /* @__PURE__ */ React85.createElement(ArrowDownSmallIcon2, { fontSize: "tiny" })
|
|
5161
5134
|
},
|
|
5162
5135
|
{
|
|
5163
5136
|
label: __39("Scale Z", "elementor"),
|
|
5164
5137
|
bind: "z",
|
|
5165
|
-
startIcon: /* @__PURE__ */
|
|
5138
|
+
startIcon: /* @__PURE__ */ React85.createElement(ArrowDownLeftIcon2, { fontSize: "tiny" })
|
|
5166
5139
|
}
|
|
5167
5140
|
];
|
|
5168
5141
|
var Scale = () => {
|
|
5169
5142
|
const context = useBoundProp(scaleTransformPropTypeUtil2);
|
|
5170
5143
|
const rowRefs = [useRef16(null), useRef16(null), useRef16(null)];
|
|
5171
|
-
return /* @__PURE__ */
|
|
5144
|
+
return /* @__PURE__ */ React85.createElement(Grid24, { container: true, spacing: 1.5 }, /* @__PURE__ */ React85.createElement(PropProvider, { ...context }, /* @__PURE__ */ React85.createElement(PropKeyProvider, { bind: TransformFunctionKeys.scale }, scaleAxisControls.map((control, index) => /* @__PURE__ */ React85.createElement(ScaleAxisRow, { key: control.bind, ...control, anchorRef: rowRefs[index] })))));
|
|
5172
5145
|
};
|
|
5173
5146
|
|
|
5174
5147
|
// src/controls/transform-control/functions/skew.tsx
|
|
5175
|
-
import * as
|
|
5148
|
+
import * as React86 from "react";
|
|
5176
5149
|
import { useRef as useRef17 } from "react";
|
|
5177
5150
|
import { skewTransformPropTypeUtil as skewTransformPropTypeUtil2 } from "@elementor/editor-props";
|
|
5178
5151
|
import { ArrowLeftIcon, ArrowRightIcon as ArrowRightIcon3 } from "@elementor/icons";
|
|
@@ -5182,19 +5155,19 @@ var skewAxisControls = [
|
|
|
5182
5155
|
{
|
|
5183
5156
|
label: __40("Skew X", "elementor"),
|
|
5184
5157
|
bind: "x",
|
|
5185
|
-
startIcon: /* @__PURE__ */
|
|
5158
|
+
startIcon: /* @__PURE__ */ React86.createElement(ArrowRightIcon3, { fontSize: "tiny" })
|
|
5186
5159
|
},
|
|
5187
5160
|
{
|
|
5188
5161
|
label: __40("Skew Y", "elementor"),
|
|
5189
5162
|
bind: "y",
|
|
5190
|
-
startIcon: /* @__PURE__ */
|
|
5163
|
+
startIcon: /* @__PURE__ */ React86.createElement(ArrowLeftIcon, { fontSize: "tiny", style: { transform: "scaleX(-1) rotate(-90deg)" } })
|
|
5191
5164
|
}
|
|
5192
5165
|
];
|
|
5193
5166
|
var skewUnits = ["deg", "rad", "grad", "turn"];
|
|
5194
5167
|
var Skew = () => {
|
|
5195
5168
|
const context = useBoundProp(skewTransformPropTypeUtil2);
|
|
5196
5169
|
const rowRefs = [useRef17(null), useRef17(null), useRef17(null)];
|
|
5197
|
-
return /* @__PURE__ */
|
|
5170
|
+
return /* @__PURE__ */ React86.createElement(Grid25, { container: true, spacing: 1.5 }, /* @__PURE__ */ React86.createElement(PropProvider, { ...context }, /* @__PURE__ */ React86.createElement(PropKeyProvider, { bind: TransformFunctionKeys.skew }, skewAxisControls.map((control, index) => /* @__PURE__ */ React86.createElement(
|
|
5198
5171
|
AxisRow,
|
|
5199
5172
|
{
|
|
5200
5173
|
key: control.bind,
|
|
@@ -5299,7 +5272,7 @@ var TransformContent = () => {
|
|
|
5299
5272
|
rotate: initialRotateValue.value,
|
|
5300
5273
|
skew: initialSkewValue.value
|
|
5301
5274
|
});
|
|
5302
|
-
return /* @__PURE__ */
|
|
5275
|
+
return /* @__PURE__ */ React87.createElement(PopoverContent, null, /* @__PURE__ */ React87.createElement(Box15, { sx: { width: "100%" } }, /* @__PURE__ */ React87.createElement(Box15, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React87.createElement(
|
|
5303
5276
|
Tabs2,
|
|
5304
5277
|
{
|
|
5305
5278
|
size: "small",
|
|
@@ -5312,33 +5285,33 @@ var TransformContent = () => {
|
|
|
5312
5285
|
...getTabsProps(),
|
|
5313
5286
|
"aria-label": __41("Transform", "elementor")
|
|
5314
5287
|
},
|
|
5315
|
-
/* @__PURE__ */
|
|
5316
|
-
/* @__PURE__ */
|
|
5317
|
-
/* @__PURE__ */
|
|
5318
|
-
/* @__PURE__ */
|
|
5319
|
-
)), /* @__PURE__ */
|
|
5288
|
+
/* @__PURE__ */ React87.createElement(Tab2, { label: __41("Move", "elementor"), ...getTabProps(TransformFunctionKeys.move) }),
|
|
5289
|
+
/* @__PURE__ */ React87.createElement(Tab2, { label: __41("Scale", "elementor"), ...getTabProps(TransformFunctionKeys.scale) }),
|
|
5290
|
+
/* @__PURE__ */ React87.createElement(Tab2, { label: __41("Rotate", "elementor"), ...getTabProps(TransformFunctionKeys.rotate) }),
|
|
5291
|
+
/* @__PURE__ */ React87.createElement(Tab2, { label: __41("Skew", "elementor"), ...getTabProps(TransformFunctionKeys.skew) })
|
|
5292
|
+
)), /* @__PURE__ */ React87.createElement(TabPanel2, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.move) }, /* @__PURE__ */ React87.createElement(Move, null)), /* @__PURE__ */ React87.createElement(TabPanel2, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.scale) }, /* @__PURE__ */ React87.createElement(Scale, null)), /* @__PURE__ */ React87.createElement(TabPanel2, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.rotate) }, /* @__PURE__ */ React87.createElement(Rotate, null)), /* @__PURE__ */ React87.createElement(TabPanel2, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.skew) }, /* @__PURE__ */ React87.createElement(Skew, null))));
|
|
5320
5293
|
};
|
|
5321
5294
|
|
|
5322
5295
|
// src/controls/transform-control/transform-icon.tsx
|
|
5323
|
-
import * as
|
|
5296
|
+
import * as React88 from "react";
|
|
5324
5297
|
import { ArrowAutofitHeightIcon, ArrowsMaximizeIcon as ArrowsMaximizeIcon2, RotateClockwise2Icon, SkewXIcon } from "@elementor/icons";
|
|
5325
5298
|
var TransformIcon = ({ value }) => {
|
|
5326
5299
|
switch (value.$$type) {
|
|
5327
5300
|
case TransformFunctionKeys.move:
|
|
5328
|
-
return /* @__PURE__ */
|
|
5301
|
+
return /* @__PURE__ */ React88.createElement(ArrowsMaximizeIcon2, { fontSize: "tiny" });
|
|
5329
5302
|
case TransformFunctionKeys.scale:
|
|
5330
|
-
return /* @__PURE__ */
|
|
5303
|
+
return /* @__PURE__ */ React88.createElement(ArrowAutofitHeightIcon, { fontSize: "tiny" });
|
|
5331
5304
|
case TransformFunctionKeys.rotate:
|
|
5332
|
-
return /* @__PURE__ */
|
|
5305
|
+
return /* @__PURE__ */ React88.createElement(RotateClockwise2Icon, { fontSize: "tiny" });
|
|
5333
5306
|
case TransformFunctionKeys.skew:
|
|
5334
|
-
return /* @__PURE__ */
|
|
5307
|
+
return /* @__PURE__ */ React88.createElement(SkewXIcon, { fontSize: "tiny" });
|
|
5335
5308
|
default:
|
|
5336
5309
|
return null;
|
|
5337
5310
|
}
|
|
5338
5311
|
};
|
|
5339
5312
|
|
|
5340
5313
|
// src/controls/transform-control/transform-label.tsx
|
|
5341
|
-
import * as
|
|
5314
|
+
import * as React89 from "react";
|
|
5342
5315
|
import { Box as Box16 } from "@elementor/ui";
|
|
5343
5316
|
import { __ as __42 } from "@wordpress/i18n";
|
|
5344
5317
|
var orderedAxis = ["x", "y", "z"];
|
|
@@ -5358,30 +5331,30 @@ var TransformLabel = (props) => {
|
|
|
5358
5331
|
const { $$type, value } = props.value;
|
|
5359
5332
|
switch ($$type) {
|
|
5360
5333
|
case TransformFunctionKeys.move:
|
|
5361
|
-
return /* @__PURE__ */
|
|
5334
|
+
return /* @__PURE__ */ React89.createElement(Label2, { label: __42("Move", "elementor"), value: formatLabel(value, "move") });
|
|
5362
5335
|
case TransformFunctionKeys.scale:
|
|
5363
|
-
return /* @__PURE__ */
|
|
5336
|
+
return /* @__PURE__ */ React89.createElement(Label2, { label: __42("Scale", "elementor"), value: formatLabel(value, "scale") });
|
|
5364
5337
|
case TransformFunctionKeys.rotate:
|
|
5365
|
-
return /* @__PURE__ */
|
|
5338
|
+
return /* @__PURE__ */ React89.createElement(Label2, { label: __42("Rotate", "elementor"), value: formatLabel(value, "rotate") });
|
|
5366
5339
|
case TransformFunctionKeys.skew:
|
|
5367
|
-
return /* @__PURE__ */
|
|
5340
|
+
return /* @__PURE__ */ React89.createElement(Label2, { label: __42("Skew", "elementor"), value: formatLabel(value, "skew") });
|
|
5368
5341
|
default:
|
|
5369
5342
|
return "";
|
|
5370
5343
|
}
|
|
5371
5344
|
};
|
|
5372
5345
|
var Label2 = ({ label, value }) => {
|
|
5373
|
-
return /* @__PURE__ */
|
|
5346
|
+
return /* @__PURE__ */ React89.createElement(Box16, { component: "span" }, label, ": ", value);
|
|
5374
5347
|
};
|
|
5375
5348
|
|
|
5376
5349
|
// src/controls/transform-control/transform-settings-control.tsx
|
|
5377
|
-
import * as
|
|
5350
|
+
import * as React92 from "react";
|
|
5378
5351
|
import { PopoverHeader as PopoverHeader3 } from "@elementor/editor-ui";
|
|
5379
5352
|
import { AdjustmentsIcon } from "@elementor/icons";
|
|
5380
5353
|
import { bindPopover as bindPopover5, Box as Box17, Divider as Divider4, Popover as Popover5 } from "@elementor/ui";
|
|
5381
5354
|
import { __ as __45 } from "@wordpress/i18n";
|
|
5382
5355
|
|
|
5383
5356
|
// src/controls/transform-control/transform-base-controls/children-perspective-control.tsx
|
|
5384
|
-
import * as
|
|
5357
|
+
import * as React90 from "react";
|
|
5385
5358
|
import { perspectiveOriginPropTypeUtil } from "@elementor/editor-props";
|
|
5386
5359
|
import { Grid as Grid26, Stack as Stack14 } from "@elementor/ui";
|
|
5387
5360
|
import { __ as __43 } from "@wordpress/i18n";
|
|
@@ -5404,21 +5377,21 @@ var CHILDREN_PERSPECTIVE_FIELDS = [
|
|
|
5404
5377
|
}
|
|
5405
5378
|
];
|
|
5406
5379
|
var ChildrenPerspectiveControl = () => {
|
|
5407
|
-
return /* @__PURE__ */
|
|
5380
|
+
return /* @__PURE__ */ React90.createElement(Stack14, { direction: "column", spacing: 1.5 }, /* @__PURE__ */ React90.createElement(ControlFormLabel, null, __43("Children perspective", "elementor")), /* @__PURE__ */ React90.createElement(PerspectiveControl, null), /* @__PURE__ */ React90.createElement(PerspectiveOriginControl, null));
|
|
5408
5381
|
};
|
|
5409
|
-
var PerspectiveControl = () => /* @__PURE__ */
|
|
5410
|
-
var PerspectiveOriginControl = () => /* @__PURE__ */
|
|
5382
|
+
var PerspectiveControl = () => /* @__PURE__ */ React90.createElement(PropKeyProvider, { bind: "perspective" }, /* @__PURE__ */ React90.createElement(ControlFields, { control: PERSPECTIVE_CONTROL_FIELD, key: PERSPECTIVE_CONTROL_FIELD.bind }));
|
|
5383
|
+
var PerspectiveOriginControl = () => /* @__PURE__ */ React90.createElement(PropKeyProvider, { bind: "perspective-origin" }, /* @__PURE__ */ React90.createElement(PerspectiveOriginControlProvider, null));
|
|
5411
5384
|
var PerspectiveOriginControlProvider = () => {
|
|
5412
5385
|
const context = useBoundProp(perspectiveOriginPropTypeUtil);
|
|
5413
|
-
return /* @__PURE__ */
|
|
5386
|
+
return /* @__PURE__ */ React90.createElement(PropProvider, { ...context }, CHILDREN_PERSPECTIVE_FIELDS.map((control) => /* @__PURE__ */ React90.createElement(PropKeyProvider, { bind: control.bind, key: control.bind }, /* @__PURE__ */ React90.createElement(ControlFields, { control }))));
|
|
5414
5387
|
};
|
|
5415
5388
|
var ControlFields = ({ control }) => {
|
|
5416
|
-
const rowRef =
|
|
5417
|
-
return /* @__PURE__ */
|
|
5389
|
+
const rowRef = React90.useRef(null);
|
|
5390
|
+
return /* @__PURE__ */ React90.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React90.createElement(Grid26, { item: true, xs: 6 }, /* @__PURE__ */ React90.createElement(ControlFormLabel, null, control.label)), /* @__PURE__ */ React90.createElement(Grid26, { item: true, xs: 6 }, /* @__PURE__ */ React90.createElement(SizeControl, { variant: "length", units: control.units, anchorRef: rowRef, disableCustom: true })));
|
|
5418
5391
|
};
|
|
5419
5392
|
|
|
5420
5393
|
// src/controls/transform-control/transform-base-controls/transform-origin-control.tsx
|
|
5421
|
-
import * as
|
|
5394
|
+
import * as React91 from "react";
|
|
5422
5395
|
import { transformOriginPropTypeUtil } from "@elementor/editor-props";
|
|
5423
5396
|
import { Grid as Grid27, Stack as Stack15 } from "@elementor/ui";
|
|
5424
5397
|
import { __ as __44 } from "@wordpress/i18n";
|
|
@@ -5442,12 +5415,12 @@ var TRANSFORM_ORIGIN_FIELDS = [
|
|
|
5442
5415
|
}
|
|
5443
5416
|
];
|
|
5444
5417
|
var TransformOriginControl = () => {
|
|
5445
|
-
return /* @__PURE__ */
|
|
5418
|
+
return /* @__PURE__ */ React91.createElement(Stack15, { direction: "column", spacing: 1.5 }, /* @__PURE__ */ React91.createElement(ControlFormLabel, null, __44("Transform", "elementor")), TRANSFORM_ORIGIN_FIELDS.map((control) => /* @__PURE__ */ React91.createElement(ControlFields2, { control, key: control.bind })));
|
|
5446
5419
|
};
|
|
5447
5420
|
var ControlFields2 = ({ control }) => {
|
|
5448
5421
|
const context = useBoundProp(transformOriginPropTypeUtil);
|
|
5449
|
-
const rowRef =
|
|
5450
|
-
return /* @__PURE__ */
|
|
5422
|
+
const rowRef = React91.useRef(null);
|
|
5423
|
+
return /* @__PURE__ */ React91.createElement(PropProvider, { ...context }, /* @__PURE__ */ React91.createElement(PropKeyProvider, { bind: control.bind }, /* @__PURE__ */ React91.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React91.createElement(Grid27, { item: true, xs: 6 }, /* @__PURE__ */ React91.createElement(ControlFormLabel, null, control.label)), /* @__PURE__ */ React91.createElement(Grid27, { item: true, xs: 6 }, /* @__PURE__ */ React91.createElement(SizeControl, { variant: "length", units: control.units, anchorRef: rowRef, disableCustom: true })))));
|
|
5451
5424
|
};
|
|
5452
5425
|
|
|
5453
5426
|
// src/controls/transform-control/transform-settings-control.tsx
|
|
@@ -5461,7 +5434,7 @@ var TransformSettingsControl = ({
|
|
|
5461
5434
|
...popupState,
|
|
5462
5435
|
anchorEl: anchorRef.current ?? void 0
|
|
5463
5436
|
});
|
|
5464
|
-
return /* @__PURE__ */
|
|
5437
|
+
return /* @__PURE__ */ React92.createElement(
|
|
5465
5438
|
Popover5,
|
|
5466
5439
|
{
|
|
5467
5440
|
disablePortal: true,
|
|
@@ -5476,16 +5449,16 @@ var TransformSettingsControl = ({
|
|
|
5476
5449
|
},
|
|
5477
5450
|
...popupProps
|
|
5478
5451
|
},
|
|
5479
|
-
/* @__PURE__ */
|
|
5452
|
+
/* @__PURE__ */ React92.createElement(
|
|
5480
5453
|
PopoverHeader3,
|
|
5481
5454
|
{
|
|
5482
5455
|
title: __45("Transform settings", "elementor"),
|
|
5483
5456
|
onClose: popupState.close,
|
|
5484
|
-
icon: /* @__PURE__ */
|
|
5457
|
+
icon: /* @__PURE__ */ React92.createElement(AdjustmentsIcon, { fontSize: SIZE7 })
|
|
5485
5458
|
}
|
|
5486
5459
|
),
|
|
5487
|
-
/* @__PURE__ */
|
|
5488
|
-
/* @__PURE__ */
|
|
5460
|
+
/* @__PURE__ */ React92.createElement(Divider4, null),
|
|
5461
|
+
/* @__PURE__ */ React92.createElement(PopoverContent, { sx: { px: 2, py: 1.5 } }, /* @__PURE__ */ React92.createElement(PropKeyProvider, { bind: "transform-origin" }, /* @__PURE__ */ React92.createElement(TransformOriginControl, null)), showChildrenPerspective && /* @__PURE__ */ React92.createElement(React92.Fragment, null, /* @__PURE__ */ React92.createElement(Box17, { sx: { my: 0.5 } }, /* @__PURE__ */ React92.createElement(Divider4, null)), /* @__PURE__ */ React92.createElement(ChildrenPerspectiveControl, null)))
|
|
5489
5462
|
);
|
|
5490
5463
|
};
|
|
5491
5464
|
|
|
@@ -5496,24 +5469,24 @@ var TransformRepeaterControl = createControl(() => {
|
|
|
5496
5469
|
const headerRef = useRef21(null);
|
|
5497
5470
|
const popupState = usePopupState6({ variant: "popover" });
|
|
5498
5471
|
const showChildrenPerspective = useElementCanHaveChildren();
|
|
5499
|
-
return /* @__PURE__ */
|
|
5472
|
+
return /* @__PURE__ */ React93.createElement(PropProvider, { ...context }, /* @__PURE__ */ React93.createElement(
|
|
5500
5473
|
TransformSettingsControl,
|
|
5501
5474
|
{
|
|
5502
5475
|
popupState,
|
|
5503
5476
|
anchorRef: headerRef,
|
|
5504
5477
|
showChildrenPerspective
|
|
5505
5478
|
}
|
|
5506
|
-
), /* @__PURE__ */
|
|
5479
|
+
), /* @__PURE__ */ React93.createElement(PropKeyProvider, { bind: "transform-functions" }, /* @__PURE__ */ React93.createElement(Repeater2, { headerRef, propType: context.propType, popupState })));
|
|
5507
5480
|
});
|
|
5508
|
-
var ToolTip = /* @__PURE__ */
|
|
5481
|
+
var ToolTip = /* @__PURE__ */ React93.createElement(
|
|
5509
5482
|
Box18,
|
|
5510
5483
|
{
|
|
5511
5484
|
component: "span",
|
|
5512
5485
|
"aria-label": void 0,
|
|
5513
5486
|
sx: { display: "flex", gap: 0.5, p: 2, width: 320, borderRadius: 1 }
|
|
5514
5487
|
},
|
|
5515
|
-
/* @__PURE__ */
|
|
5516
|
-
/* @__PURE__ */
|
|
5488
|
+
/* @__PURE__ */ React93.createElement(InfoCircleFilledIcon2, { sx: { color: "secondary.main" } }),
|
|
5489
|
+
/* @__PURE__ */ React93.createElement(Typography6, { variant: "body2", color: "text.secondary", fontSize: "14px" }, __46("You can use each kind of transform only once per element.", "elementor"))
|
|
5517
5490
|
);
|
|
5518
5491
|
var Repeater2 = ({
|
|
5519
5492
|
headerRef,
|
|
@@ -5527,21 +5500,21 @@ var Repeater2 = ({
|
|
|
5527
5500
|
return availableValues.find((value) => !transformValues?.some((item) => item.$$type === value.$$type));
|
|
5528
5501
|
};
|
|
5529
5502
|
const shouldDisableAddItem = !getInitialValue2();
|
|
5530
|
-
return /* @__PURE__ */
|
|
5503
|
+
return /* @__PURE__ */ React93.createElement(PropProvider, { ...transformFunctionsContext }, /* @__PURE__ */ React93.createElement(
|
|
5531
5504
|
ControlRepeater,
|
|
5532
5505
|
{
|
|
5533
5506
|
initial: getInitialValue2() ?? initialTransformValue,
|
|
5534
5507
|
propTypeUtil: transformFunctionsPropTypeUtil
|
|
5535
5508
|
},
|
|
5536
|
-
/* @__PURE__ */
|
|
5509
|
+
/* @__PURE__ */ React93.createElement(
|
|
5537
5510
|
RepeaterHeader,
|
|
5538
5511
|
{
|
|
5539
5512
|
label: __46("Transform", "elementor"),
|
|
5540
|
-
adornment: () => /* @__PURE__ */
|
|
5513
|
+
adornment: () => /* @__PURE__ */ React93.createElement(ControlAdornments, { customContext: { path: ["transform"], propType } }),
|
|
5541
5514
|
ref: headerRef
|
|
5542
5515
|
},
|
|
5543
|
-
/* @__PURE__ */
|
|
5544
|
-
/* @__PURE__ */
|
|
5516
|
+
/* @__PURE__ */ React93.createElement(TransformBasePopoverTrigger, { popupState, repeaterBindKey: bind }),
|
|
5517
|
+
/* @__PURE__ */ React93.createElement(
|
|
5545
5518
|
TooltipAddItemAction,
|
|
5546
5519
|
{
|
|
5547
5520
|
disabled: shouldDisableAddItem,
|
|
@@ -5551,15 +5524,15 @@ var Repeater2 = ({
|
|
|
5551
5524
|
}
|
|
5552
5525
|
)
|
|
5553
5526
|
),
|
|
5554
|
-
/* @__PURE__ */
|
|
5527
|
+
/* @__PURE__ */ React93.createElement(ItemsContainer, null, /* @__PURE__ */ React93.createElement(
|
|
5555
5528
|
Item,
|
|
5556
5529
|
{
|
|
5557
5530
|
Icon: TransformIcon,
|
|
5558
5531
|
Label: TransformLabel,
|
|
5559
|
-
actions: /* @__PURE__ */
|
|
5532
|
+
actions: /* @__PURE__ */ React93.createElement(React93.Fragment, null, /* @__PURE__ */ React93.createElement(DisableItemAction, null), /* @__PURE__ */ React93.createElement(RemoveItemAction, null))
|
|
5560
5533
|
}
|
|
5561
5534
|
)),
|
|
5562
|
-
/* @__PURE__ */
|
|
5535
|
+
/* @__PURE__ */ React93.createElement(EditItemPopover, null, /* @__PURE__ */ React93.createElement(TransformContent, null))
|
|
5563
5536
|
));
|
|
5564
5537
|
};
|
|
5565
5538
|
var TransformBasePopoverTrigger = ({
|
|
@@ -5568,12 +5541,12 @@ var TransformBasePopoverTrigger = ({
|
|
|
5568
5541
|
}) => {
|
|
5569
5542
|
const { bind } = useBoundProp();
|
|
5570
5543
|
const titleLabel = __46("Transform settings", "elementor");
|
|
5571
|
-
return bind !== repeaterBindKey ? null : /* @__PURE__ */
|
|
5544
|
+
return bind !== repeaterBindKey ? null : /* @__PURE__ */ React93.createElement(Tooltip8, { title: titleLabel, placement: "top" }, /* @__PURE__ */ React93.createElement(IconButton7, { size: SIZE8, "aria-label": titleLabel, ...bindTrigger4(popupState) }, /* @__PURE__ */ React93.createElement(AdjustmentsIcon2, { fontSize: SIZE8 })));
|
|
5572
5545
|
};
|
|
5573
5546
|
|
|
5574
5547
|
// src/controls/transition-control/transition-repeater-control.tsx
|
|
5575
|
-
import * as
|
|
5576
|
-
import { useEffect as useEffect10, useMemo as useMemo14, useState as
|
|
5548
|
+
import * as React96 from "react";
|
|
5549
|
+
import { useEffect as useEffect10, useMemo as useMemo14, useState as useState16 } from "react";
|
|
5577
5550
|
import {
|
|
5578
5551
|
createArrayPropUtils as createArrayPropUtils2,
|
|
5579
5552
|
selectionSizePropTypeUtil as selectionSizePropTypeUtil2
|
|
@@ -5583,7 +5556,7 @@ import { Alert as Alert3, AlertTitle as AlertTitle3, Box as Box20, Typography as
|
|
|
5583
5556
|
import { __ as __49 } from "@wordpress/i18n";
|
|
5584
5557
|
|
|
5585
5558
|
// src/controls/selection-size-control.tsx
|
|
5586
|
-
import * as
|
|
5559
|
+
import * as React94 from "react";
|
|
5587
5560
|
import { useMemo as useMemo12, useRef as useRef22 } from "react";
|
|
5588
5561
|
import { selectionSizePropTypeUtil } from "@elementor/editor-props";
|
|
5589
5562
|
import { Grid as Grid28 } from "@elementor/ui";
|
|
@@ -5603,7 +5576,7 @@ var SelectionSizeControl = createControl(
|
|
|
5603
5576
|
}
|
|
5604
5577
|
}, [value, sizeConfigMap]);
|
|
5605
5578
|
const SelectionComponent = selectionConfig.component;
|
|
5606
|
-
return /* @__PURE__ */
|
|
5579
|
+
return /* @__PURE__ */ React94.createElement(PropProvider, { value, setValue, propType }, /* @__PURE__ */ React94.createElement(Grid28, { container: true, spacing: 1.5, ref: rowRef }, /* @__PURE__ */ React94.createElement(Grid28, { item: true, xs: 6, sx: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ React94.createElement(ControlFormLabel, null, selectionLabel)), /* @__PURE__ */ React94.createElement(Grid28, { item: true, xs: 6 }, /* @__PURE__ */ React94.createElement(PropKeyProvider, { bind: "selection" }, /* @__PURE__ */ React94.createElement(SelectionComponent, { ...selectionConfig.props }))), currentSizeConfig && /* @__PURE__ */ React94.createElement(React94.Fragment, null, /* @__PURE__ */ React94.createElement(Grid28, { item: true, xs: 6, sx: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ React94.createElement(ControlFormLabel, { htmlFor: sizeFieldId }, sizeLabel)), /* @__PURE__ */ React94.createElement(Grid28, { item: true, xs: 6 }, /* @__PURE__ */ React94.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React94.createElement(
|
|
5607
5580
|
SizeControl,
|
|
5608
5581
|
{
|
|
5609
5582
|
anchorRef: rowRef,
|
|
@@ -5805,7 +5778,7 @@ function subscribeToTransitionEvent() {
|
|
|
5805
5778
|
}
|
|
5806
5779
|
|
|
5807
5780
|
// src/controls/transition-control/transition-selector.tsx
|
|
5808
|
-
import * as
|
|
5781
|
+
import * as React95 from "react";
|
|
5809
5782
|
import { useMemo as useMemo13, useRef as useRef23 } from "react";
|
|
5810
5783
|
import { keyValuePropTypeUtil as keyValuePropTypeUtil2 } from "@elementor/editor-props";
|
|
5811
5784
|
import { PromotionChip } from "@elementor/editor-ui";
|
|
@@ -5898,16 +5871,16 @@ var TransitionSelector = ({
|
|
|
5898
5871
|
left: rect.right + 36
|
|
5899
5872
|
};
|
|
5900
5873
|
};
|
|
5901
|
-
return /* @__PURE__ */
|
|
5874
|
+
return /* @__PURE__ */ React95.createElement(Box19, { ref: defaultRef }, /* @__PURE__ */ React95.createElement(ControlActions, null, /* @__PURE__ */ React95.createElement(
|
|
5902
5875
|
UnstableTag3,
|
|
5903
5876
|
{
|
|
5904
5877
|
variant: "outlined",
|
|
5905
5878
|
label: transitionLabel,
|
|
5906
|
-
endIcon: /* @__PURE__ */
|
|
5879
|
+
endIcon: /* @__PURE__ */ React95.createElement(ChevronDownIcon3, { fontSize: "tiny" }),
|
|
5907
5880
|
...bindTrigger5(popoverState),
|
|
5908
5881
|
fullWidth: true
|
|
5909
5882
|
}
|
|
5910
|
-
)), /* @__PURE__ */
|
|
5883
|
+
)), /* @__PURE__ */ React95.createElement(
|
|
5911
5884
|
Popover6,
|
|
5912
5885
|
{
|
|
5913
5886
|
disablePortal: true,
|
|
@@ -5918,7 +5891,7 @@ var TransitionSelector = ({
|
|
|
5918
5891
|
anchorOrigin: { vertical: "top", horizontal: "right" },
|
|
5919
5892
|
transformOrigin: { vertical: "top", horizontal: "left" }
|
|
5920
5893
|
},
|
|
5921
|
-
/* @__PURE__ */
|
|
5894
|
+
/* @__PURE__ */ React95.createElement(
|
|
5922
5895
|
ItemSelector,
|
|
5923
5896
|
{
|
|
5924
5897
|
itemsList: getItemList(),
|
|
@@ -5929,7 +5902,7 @@ var TransitionSelector = ({
|
|
|
5929
5902
|
title: __48("Transition Property", "elementor"),
|
|
5930
5903
|
icon: VariationsIcon,
|
|
5931
5904
|
disabledItems: includeCurrentValueInOptions(value, disabledItems),
|
|
5932
|
-
categoryItemContentTemplate: (item) => /* @__PURE__ */
|
|
5905
|
+
categoryItemContentTemplate: (item) => /* @__PURE__ */ React95.createElement(
|
|
5933
5906
|
Box19,
|
|
5934
5907
|
{
|
|
5935
5908
|
sx: {
|
|
@@ -5939,10 +5912,10 @@ var TransitionSelector = ({
|
|
|
5939
5912
|
width: "100%"
|
|
5940
5913
|
}
|
|
5941
5914
|
},
|
|
5942
|
-
/* @__PURE__ */
|
|
5943
|
-
showPromotion && disabledCategories.has(item.value) && /* @__PURE__ */
|
|
5915
|
+
/* @__PURE__ */ React95.createElement("span", null, item.value),
|
|
5916
|
+
showPromotion && disabledCategories.has(item.value) && /* @__PURE__ */ React95.createElement(PromotionChip, null)
|
|
5944
5917
|
),
|
|
5945
|
-
footer: showPromotion ? /* @__PURE__ */
|
|
5918
|
+
footer: showPromotion ? /* @__PURE__ */ React95.createElement(
|
|
5946
5919
|
Alert2,
|
|
5947
5920
|
{
|
|
5948
5921
|
variant: "standard",
|
|
@@ -5954,7 +5927,7 @@ var TransitionSelector = ({
|
|
|
5954
5927
|
sx: { m: 1.5, mt: 0 }
|
|
5955
5928
|
},
|
|
5956
5929
|
__48("Upgrade to customize transition properties and control effects.", "elementor"),
|
|
5957
|
-
/* @__PURE__ */
|
|
5930
|
+
/* @__PURE__ */ React95.createElement(
|
|
5958
5931
|
Box19,
|
|
5959
5932
|
{
|
|
5960
5933
|
component: "a",
|
|
@@ -5968,7 +5941,7 @@ var TransitionSelector = ({
|
|
|
5968
5941
|
color: "promotion.main"
|
|
5969
5942
|
}
|
|
5970
5943
|
},
|
|
5971
|
-
/* @__PURE__ */
|
|
5944
|
+
/* @__PURE__ */ React95.createElement(CrownFilledIcon, { fontSize: "tiny" }),
|
|
5972
5945
|
__48("Upgrade now", "elementor")
|
|
5973
5946
|
)
|
|
5974
5947
|
) : null
|
|
@@ -6077,7 +6050,7 @@ var getInitialValue = (values = []) => {
|
|
|
6077
6050
|
}
|
|
6078
6051
|
return initialTransitionValue;
|
|
6079
6052
|
};
|
|
6080
|
-
var disableAddItemTooltipContent = /* @__PURE__ */
|
|
6053
|
+
var disableAddItemTooltipContent = /* @__PURE__ */ React96.createElement(
|
|
6081
6054
|
Alert3,
|
|
6082
6055
|
{
|
|
6083
6056
|
sx: {
|
|
@@ -6085,10 +6058,10 @@ var disableAddItemTooltipContent = /* @__PURE__ */ React97.createElement(
|
|
|
6085
6058
|
gap: 0.5
|
|
6086
6059
|
},
|
|
6087
6060
|
color: "secondary",
|
|
6088
|
-
icon: /* @__PURE__ */
|
|
6061
|
+
icon: /* @__PURE__ */ React96.createElement(InfoCircleFilledIcon3, null)
|
|
6089
6062
|
},
|
|
6090
|
-
/* @__PURE__ */
|
|
6091
|
-
/* @__PURE__ */
|
|
6063
|
+
/* @__PURE__ */ React96.createElement(AlertTitle3, null, __49("Transitions", "elementor")),
|
|
6064
|
+
/* @__PURE__ */ React96.createElement(Box20, { component: "span" }, /* @__PURE__ */ React96.createElement(Typography7, { variant: "body2" }, __49("Switch to 'Normal' state to add a transition.", "elementor")))
|
|
6092
6065
|
);
|
|
6093
6066
|
var TransitionRepeaterControl = createControl(
|
|
6094
6067
|
({
|
|
@@ -6096,7 +6069,7 @@ var TransitionRepeaterControl = createControl(
|
|
|
6096
6069
|
currentStyleState
|
|
6097
6070
|
}) => {
|
|
6098
6071
|
const currentStyleIsNormal = currentStyleState === null;
|
|
6099
|
-
const [recentlyUsedList, setRecentlyUsedList] =
|
|
6072
|
+
const [recentlyUsedList, setRecentlyUsedList] = useState16([]);
|
|
6100
6073
|
const { value, setValue } = useBoundProp(childArrayPropTypeUtil);
|
|
6101
6074
|
const { allDisabled: disabledItems, proDisabled: proDisabledItems } = useMemo14(
|
|
6102
6075
|
() => getDisabledItemLabels(value),
|
|
@@ -6126,7 +6099,7 @@ var TransitionRepeaterControl = createControl(
|
|
|
6126
6099
|
}, [recentlyUsedListGetter]);
|
|
6127
6100
|
const allPropertiesUsed = useMemo14(() => areAllPropertiesUsed(value), [value]);
|
|
6128
6101
|
const isAddItemDisabled = !currentStyleIsNormal || allPropertiesUsed;
|
|
6129
|
-
return /* @__PURE__ */
|
|
6102
|
+
return /* @__PURE__ */ React96.createElement(
|
|
6130
6103
|
RepeatableControl,
|
|
6131
6104
|
{
|
|
6132
6105
|
label: __49("Transitions", "elementor"),
|
|
@@ -6153,7 +6126,7 @@ var TransitionRepeaterControl = createControl(
|
|
|
6153
6126
|
);
|
|
6154
6127
|
|
|
6155
6128
|
// src/controls/date-time-control.tsx
|
|
6156
|
-
import * as
|
|
6129
|
+
import * as React97 from "react";
|
|
6157
6130
|
import * as dayjs from "dayjs";
|
|
6158
6131
|
import { isTransformable as isTransformable2, stringPropTypeUtil as stringPropTypeUtil14 } from "@elementor/editor-props";
|
|
6159
6132
|
import { DateTimePropTypeUtil } from "@elementor/editor-props";
|
|
@@ -6201,7 +6174,7 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
6201
6174
|
const base = dayjs.default();
|
|
6202
6175
|
return base.hour(h).minute(m).second(0).millisecond(0);
|
|
6203
6176
|
};
|
|
6204
|
-
return /* @__PURE__ */
|
|
6177
|
+
return /* @__PURE__ */ React97.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React97.createElement(ControlActions, null, /* @__PURE__ */ React97.createElement(LocalizationProvider, null, /* @__PURE__ */ React97.createElement(Box21, { display: "flex", gap: 1, alignItems: "center" }, /* @__PURE__ */ React97.createElement(PropKeyProvider, { bind: "date" }, /* @__PURE__ */ React97.createElement(
|
|
6205
6178
|
DatePicker,
|
|
6206
6179
|
{
|
|
6207
6180
|
value: parseDateValue(stringPropTypeUtil14.extract(value?.date)),
|
|
@@ -6213,7 +6186,7 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
6213
6186
|
openPickerIcon: { fontSize: "tiny" }
|
|
6214
6187
|
}
|
|
6215
6188
|
}
|
|
6216
|
-
)), /* @__PURE__ */
|
|
6189
|
+
)), /* @__PURE__ */ React97.createElement(PropKeyProvider, { bind: "time" }, /* @__PURE__ */ React97.createElement(
|
|
6217
6190
|
TimePicker,
|
|
6218
6191
|
{
|
|
6219
6192
|
value: parseTimeValue(stringPropTypeUtil14.extract(value?.time)),
|
|
@@ -6229,17 +6202,17 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
6229
6202
|
});
|
|
6230
6203
|
|
|
6231
6204
|
// src/controls/inline-editing-control.tsx
|
|
6232
|
-
import * as
|
|
6205
|
+
import * as React101 from "react";
|
|
6233
6206
|
import { htmlPropTypeUtil } from "@elementor/editor-props";
|
|
6234
6207
|
import { Box as Box24 } from "@elementor/ui";
|
|
6235
6208
|
|
|
6236
6209
|
// src/components/inline-editor.tsx
|
|
6237
|
-
import * as
|
|
6210
|
+
import * as React100 from "react";
|
|
6238
6211
|
import {
|
|
6239
6212
|
forwardRef as forwardRef10,
|
|
6240
6213
|
useEffect as useEffect13,
|
|
6241
6214
|
useRef as useRef26,
|
|
6242
|
-
useState as
|
|
6215
|
+
useState as useState18
|
|
6243
6216
|
} from "react";
|
|
6244
6217
|
import { bindPopover as bindPopover8, Box as Box23, ClickAwayListener, Popover as Popover8, usePopupState as usePopupState9 } from "@elementor/ui";
|
|
6245
6218
|
import Bold from "@tiptap/extension-bold";
|
|
@@ -6267,8 +6240,8 @@ function isEmpty(value = "") {
|
|
|
6267
6240
|
}
|
|
6268
6241
|
|
|
6269
6242
|
// src/components/inline-editor-toolbar.tsx
|
|
6270
|
-
import * as
|
|
6271
|
-
import { useMemo as useMemo15, useRef as useRef25, useState as
|
|
6243
|
+
import * as React99 from "react";
|
|
6244
|
+
import { useMemo as useMemo15, useRef as useRef25, useState as useState17 } from "react";
|
|
6272
6245
|
import { getElementSetting } from "@elementor/editor-elements";
|
|
6273
6246
|
import {
|
|
6274
6247
|
BoldIcon,
|
|
@@ -6293,7 +6266,7 @@ import { useEditorState } from "@tiptap/react";
|
|
|
6293
6266
|
import { __ as __51 } from "@wordpress/i18n";
|
|
6294
6267
|
|
|
6295
6268
|
// src/components/url-popover.tsx
|
|
6296
|
-
import * as
|
|
6269
|
+
import * as React98 from "react";
|
|
6297
6270
|
import { useEffect as useEffect11, useRef as useRef24 } from "react";
|
|
6298
6271
|
import { ExternalLinkIcon } from "@elementor/icons";
|
|
6299
6272
|
import { bindPopover as bindPopover7, Popover as Popover7, Stack as Stack16, TextField as TextField8, ToggleButton as ToggleButton2, Tooltip as Tooltip9 } from "@elementor/ui";
|
|
@@ -6317,7 +6290,7 @@ var UrlPopover = ({
|
|
|
6317
6290
|
restoreValue();
|
|
6318
6291
|
popupState.close();
|
|
6319
6292
|
};
|
|
6320
|
-
return /* @__PURE__ */
|
|
6293
|
+
return /* @__PURE__ */ React98.createElement(
|
|
6321
6294
|
Popover7,
|
|
6322
6295
|
{
|
|
6323
6296
|
slotProps: {
|
|
@@ -6328,7 +6301,7 @@ var UrlPopover = ({
|
|
|
6328
6301
|
transformOrigin: { vertical: "top", horizontal: "left" },
|
|
6329
6302
|
onClose: handleClose
|
|
6330
6303
|
},
|
|
6331
|
-
/* @__PURE__ */
|
|
6304
|
+
/* @__PURE__ */ React98.createElement(Stack16, { direction: "row", alignItems: "center", gap: 1, sx: { p: 1.5 } }, /* @__PURE__ */ React98.createElement(
|
|
6332
6305
|
TextField8,
|
|
6333
6306
|
{
|
|
6334
6307
|
value,
|
|
@@ -6341,7 +6314,7 @@ var UrlPopover = ({
|
|
|
6341
6314
|
InputProps: { sx: { borderRadius: "8px" } },
|
|
6342
6315
|
onKeyUp: (event) => event.key === "Enter" && handleClose()
|
|
6343
6316
|
}
|
|
6344
|
-
), /* @__PURE__ */
|
|
6317
|
+
), /* @__PURE__ */ React98.createElement(Tooltip9, { title: __50("Open in a new tab", "elementor") }, /* @__PURE__ */ React98.createElement(
|
|
6345
6318
|
ToggleButton2,
|
|
6346
6319
|
{
|
|
6347
6320
|
size: "tiny",
|
|
@@ -6351,7 +6324,7 @@ var UrlPopover = ({
|
|
|
6351
6324
|
"aria-label": __50("Open in a new tab", "elementor"),
|
|
6352
6325
|
sx: { borderRadius: "8px" }
|
|
6353
6326
|
},
|
|
6354
|
-
/* @__PURE__ */
|
|
6327
|
+
/* @__PURE__ */ React98.createElement(ExternalLinkIcon, { fontSize: "tiny" })
|
|
6355
6328
|
)))
|
|
6356
6329
|
);
|
|
6357
6330
|
};
|
|
@@ -6361,7 +6334,7 @@ var checkIfElementHasLink = (elementId) => !!getElementSetting(elementId, "link"
|
|
|
6361
6334
|
var toolbarButtons = {
|
|
6362
6335
|
clear: {
|
|
6363
6336
|
label: __51("Clear", "elementor"),
|
|
6364
|
-
icon: /* @__PURE__ */
|
|
6337
|
+
icon: /* @__PURE__ */ React99.createElement(MinusIcon2, { fontSize: "tiny" }),
|
|
6365
6338
|
action: "clear",
|
|
6366
6339
|
method: (editor) => {
|
|
6367
6340
|
editor.chain().focus().clearNodes().unsetAllMarks().run();
|
|
@@ -6369,7 +6342,7 @@ var toolbarButtons = {
|
|
|
6369
6342
|
},
|
|
6370
6343
|
bold: {
|
|
6371
6344
|
label: __51("Bold", "elementor"),
|
|
6372
|
-
icon: /* @__PURE__ */
|
|
6345
|
+
icon: /* @__PURE__ */ React99.createElement(BoldIcon, { fontSize: "tiny" }),
|
|
6373
6346
|
action: "bold",
|
|
6374
6347
|
method: (editor) => {
|
|
6375
6348
|
editor.chain().focus().toggleBold().run();
|
|
@@ -6377,7 +6350,7 @@ var toolbarButtons = {
|
|
|
6377
6350
|
},
|
|
6378
6351
|
italic: {
|
|
6379
6352
|
label: __51("Italic", "elementor"),
|
|
6380
|
-
icon: /* @__PURE__ */
|
|
6353
|
+
icon: /* @__PURE__ */ React99.createElement(ItalicIcon, { fontSize: "tiny" }),
|
|
6381
6354
|
action: "italic",
|
|
6382
6355
|
method: (editor) => {
|
|
6383
6356
|
editor.chain().focus().toggleItalic().run();
|
|
@@ -6385,7 +6358,7 @@ var toolbarButtons = {
|
|
|
6385
6358
|
},
|
|
6386
6359
|
underline: {
|
|
6387
6360
|
label: __51("Underline", "elementor"),
|
|
6388
|
-
icon: /* @__PURE__ */
|
|
6361
|
+
icon: /* @__PURE__ */ React99.createElement(UnderlineIcon, { fontSize: "tiny" }),
|
|
6389
6362
|
action: "underline",
|
|
6390
6363
|
method: (editor) => {
|
|
6391
6364
|
editor.chain().focus().toggleUnderline().run();
|
|
@@ -6393,7 +6366,7 @@ var toolbarButtons = {
|
|
|
6393
6366
|
},
|
|
6394
6367
|
strike: {
|
|
6395
6368
|
label: __51("Strikethrough", "elementor"),
|
|
6396
|
-
icon: /* @__PURE__ */
|
|
6369
|
+
icon: /* @__PURE__ */ React99.createElement(StrikethroughIcon, { fontSize: "tiny" }),
|
|
6397
6370
|
action: "strike",
|
|
6398
6371
|
method: (editor) => {
|
|
6399
6372
|
editor.chain().focus().toggleStrike().run();
|
|
@@ -6401,7 +6374,7 @@ var toolbarButtons = {
|
|
|
6401
6374
|
},
|
|
6402
6375
|
superscript: {
|
|
6403
6376
|
label: __51("Superscript", "elementor"),
|
|
6404
|
-
icon: /* @__PURE__ */
|
|
6377
|
+
icon: /* @__PURE__ */ React99.createElement(SuperscriptIcon, { fontSize: "tiny" }),
|
|
6405
6378
|
action: "superscript",
|
|
6406
6379
|
method: (editor) => {
|
|
6407
6380
|
editor.chain().focus().toggleSuperscript().run();
|
|
@@ -6409,7 +6382,7 @@ var toolbarButtons = {
|
|
|
6409
6382
|
},
|
|
6410
6383
|
subscript: {
|
|
6411
6384
|
label: __51("Subscript", "elementor"),
|
|
6412
|
-
icon: /* @__PURE__ */
|
|
6385
|
+
icon: /* @__PURE__ */ React99.createElement(SubscriptIcon, { fontSize: "tiny" }),
|
|
6413
6386
|
action: "subscript",
|
|
6414
6387
|
method: (editor) => {
|
|
6415
6388
|
editor.chain().focus().toggleSubscript().run();
|
|
@@ -6417,7 +6390,7 @@ var toolbarButtons = {
|
|
|
6417
6390
|
},
|
|
6418
6391
|
link: {
|
|
6419
6392
|
label: __51("Link", "elementor"),
|
|
6420
|
-
icon: /* @__PURE__ */
|
|
6393
|
+
icon: /* @__PURE__ */ React99.createElement(LinkIcon3, { fontSize: "tiny" }),
|
|
6421
6394
|
action: "link",
|
|
6422
6395
|
method: null
|
|
6423
6396
|
}
|
|
@@ -6425,8 +6398,8 @@ var toolbarButtons = {
|
|
|
6425
6398
|
var { clear: clearButton, ...formatButtons } = toolbarButtons;
|
|
6426
6399
|
var possibleFormats = Object.keys(formatButtons);
|
|
6427
6400
|
var InlineEditorToolbar = ({ editor, elementId }) => {
|
|
6428
|
-
const [urlValue, setUrlValue] =
|
|
6429
|
-
const [openInNewTab, setOpenInNewTab] =
|
|
6401
|
+
const [urlValue, setUrlValue] = useState17("");
|
|
6402
|
+
const [openInNewTab, setOpenInNewTab] = useState17(false);
|
|
6430
6403
|
const toolbarRef = useRef25(null);
|
|
6431
6404
|
const linkPopupState = usePopupState8({ variant: "popover" });
|
|
6432
6405
|
const hasLinkOnElement = elementId ? checkIfElementHasLink(elementId) : false;
|
|
@@ -6471,10 +6444,10 @@ var InlineEditorToolbar = ({ editor, elementId }) => {
|
|
|
6471
6444
|
}
|
|
6472
6445
|
linkPopupState.close();
|
|
6473
6446
|
};
|
|
6474
|
-
|
|
6447
|
+
React99.useEffect(() => {
|
|
6475
6448
|
editor?.commands?.focus();
|
|
6476
6449
|
}, [editor]);
|
|
6477
|
-
return /* @__PURE__ */
|
|
6450
|
+
return /* @__PURE__ */ React99.createElement(
|
|
6478
6451
|
Box22,
|
|
6479
6452
|
{
|
|
6480
6453
|
ref: toolbarRef,
|
|
@@ -6490,8 +6463,8 @@ var InlineEditorToolbar = ({ editor, elementId }) => {
|
|
|
6490
6463
|
pointerEvents: linkPopupState.isOpen ? "none" : "all"
|
|
6491
6464
|
}
|
|
6492
6465
|
},
|
|
6493
|
-
/* @__PURE__ */
|
|
6494
|
-
/* @__PURE__ */
|
|
6466
|
+
/* @__PURE__ */ React99.createElement(Tooltip10, { title: clearButton.label, placement: "top", sx: { borderRadius: "8px" } }, /* @__PURE__ */ React99.createElement(IconButton8, { "aria-label": clearButton.label, onClick: () => clearButton.method(editor), size: "tiny" }, clearButton.icon)),
|
|
6467
|
+
/* @__PURE__ */ React99.createElement(
|
|
6495
6468
|
ToggleButtonGroup2,
|
|
6496
6469
|
{
|
|
6497
6470
|
value: editorState,
|
|
@@ -6513,7 +6486,7 @@ var InlineEditorToolbar = ({ editor, elementId }) => {
|
|
|
6513
6486
|
}
|
|
6514
6487
|
}
|
|
6515
6488
|
},
|
|
6516
|
-
formatButtonsList.map((button) => /* @__PURE__ */
|
|
6489
|
+
formatButtonsList.map((button) => /* @__PURE__ */ React99.createElement(Tooltip10, { title: button.label, key: button.action, placement: "top" }, /* @__PURE__ */ React99.createElement(
|
|
6517
6490
|
ToggleButton3,
|
|
6518
6491
|
{
|
|
6519
6492
|
value: button.action,
|
|
@@ -6531,7 +6504,7 @@ var InlineEditorToolbar = ({ editor, elementId }) => {
|
|
|
6531
6504
|
button.icon
|
|
6532
6505
|
)))
|
|
6533
6506
|
),
|
|
6534
|
-
/* @__PURE__ */
|
|
6507
|
+
/* @__PURE__ */ React99.createElement(
|
|
6535
6508
|
UrlPopover,
|
|
6536
6509
|
{
|
|
6537
6510
|
popupState: linkPopupState,
|
|
@@ -6573,8 +6546,8 @@ var calcSelectionCenter = (view, container) => {
|
|
|
6573
6546
|
return { left, top };
|
|
6574
6547
|
};
|
|
6575
6548
|
var Wrapper = ({ children, containerRef, editor, sx, onBlur }) => {
|
|
6576
|
-
const wrappedChildren = /* @__PURE__ */
|
|
6577
|
-
return onBlur ? /* @__PURE__ */
|
|
6549
|
+
const wrappedChildren = /* @__PURE__ */ React100.createElement(Box23, { ref: containerRef, ...sx }, children);
|
|
6550
|
+
return onBlur ? /* @__PURE__ */ React100.createElement(
|
|
6578
6551
|
ClickAwayListener,
|
|
6579
6552
|
{
|
|
6580
6553
|
onClickAway: (event) => {
|
|
@@ -6585,7 +6558,7 @@ var Wrapper = ({ children, containerRef, editor, sx, onBlur }) => {
|
|
|
6585
6558
|
}
|
|
6586
6559
|
},
|
|
6587
6560
|
wrappedChildren
|
|
6588
|
-
) : /* @__PURE__ */
|
|
6561
|
+
) : /* @__PURE__ */ React100.createElement(React100.Fragment, null, wrappedChildren);
|
|
6589
6562
|
};
|
|
6590
6563
|
var InlineEditor = forwardRef10(
|
|
6591
6564
|
({
|
|
@@ -6603,9 +6576,9 @@ var InlineEditor = forwardRef10(
|
|
|
6603
6576
|
}, ref) => {
|
|
6604
6577
|
const containerRef = useRef26(null);
|
|
6605
6578
|
const popupState = usePopupState9({ variant: "popover", disableAutoFocus: true });
|
|
6606
|
-
const [hasSelectedContent, setHasSelectedContent] =
|
|
6579
|
+
const [hasSelectedContent, setHasSelectedContent] = useState18(false);
|
|
6607
6580
|
const documentContentSettings = !!expectedTag ? "block+" : "inline*";
|
|
6608
|
-
const [selectionRect, setSelectionRect] =
|
|
6581
|
+
const [selectionRect, setSelectionRect] = useState18(null);
|
|
6609
6582
|
const onSelectionEnd = (view) => {
|
|
6610
6583
|
const hasSelection = !view.state.selection.empty;
|
|
6611
6584
|
setHasSelectedContent(hasSelection);
|
|
@@ -6713,7 +6686,7 @@ var InlineEditor = forwardRef10(
|
|
|
6713
6686
|
top: container.top + selectionRect.top + initial.top
|
|
6714
6687
|
};
|
|
6715
6688
|
};
|
|
6716
|
-
return /* @__PURE__ */
|
|
6689
|
+
return /* @__PURE__ */ React100.createElement(React100.Fragment, null, /* @__PURE__ */ React100.createElement(Wrapper, { containerRef, editor, sx, onBlur }, /* @__PURE__ */ React100.createElement(EditorContent, { ref, editor })), showToolbar && containerRef.current && /* @__PURE__ */ React100.createElement(
|
|
6717
6690
|
Popover8,
|
|
6718
6691
|
{
|
|
6719
6692
|
slotProps: {
|
|
@@ -6730,7 +6703,7 @@ var InlineEditor = forwardRef10(
|
|
|
6730
6703
|
anchorOrigin: { vertical: "top", horizontal: "center" },
|
|
6731
6704
|
transformOrigin: { vertical: "bottom", horizontal: "center" }
|
|
6732
6705
|
},
|
|
6733
|
-
/* @__PURE__ */
|
|
6706
|
+
/* @__PURE__ */ React100.createElement(InlineEditorToolbar, { editor, elementId })
|
|
6734
6707
|
));
|
|
6735
6708
|
}
|
|
6736
6709
|
);
|
|
@@ -6744,7 +6717,7 @@ var InlineEditingControl = createControl(
|
|
|
6744
6717
|
}) => {
|
|
6745
6718
|
const { value, setValue } = useBoundProp(htmlPropTypeUtil);
|
|
6746
6719
|
const handleChange = (newValue) => setValue(newValue);
|
|
6747
|
-
return /* @__PURE__ */
|
|
6720
|
+
return /* @__PURE__ */ React101.createElement(ControlActions, null, /* @__PURE__ */ React101.createElement(
|
|
6748
6721
|
Box24,
|
|
6749
6722
|
{
|
|
6750
6723
|
sx: {
|
|
@@ -6782,24 +6755,24 @@ var InlineEditingControl = createControl(
|
|
|
6782
6755
|
...attributes,
|
|
6783
6756
|
...props
|
|
6784
6757
|
},
|
|
6785
|
-
/* @__PURE__ */
|
|
6758
|
+
/* @__PURE__ */ React101.createElement(InlineEditor, { value: value || "", setValue: handleChange })
|
|
6786
6759
|
));
|
|
6787
6760
|
}
|
|
6788
6761
|
);
|
|
6789
6762
|
|
|
6790
6763
|
// src/components/icon-buttons/clear-icon-button.tsx
|
|
6791
|
-
import * as
|
|
6764
|
+
import * as React102 from "react";
|
|
6792
6765
|
import { BrushBigIcon } from "@elementor/icons";
|
|
6793
|
-
import { IconButton as IconButton9, styled as
|
|
6794
|
-
var CustomIconButton =
|
|
6766
|
+
import { IconButton as IconButton9, styled as styled9, Tooltip as Tooltip11 } from "@elementor/ui";
|
|
6767
|
+
var CustomIconButton = styled9(IconButton9)(({ theme }) => ({
|
|
6795
6768
|
width: theme.spacing(2.5),
|
|
6796
6769
|
height: theme.spacing(2.5)
|
|
6797
6770
|
}));
|
|
6798
|
-
var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */
|
|
6771
|
+
var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */ React102.createElement(Tooltip11, { title: tooltipText, placement: "top", disableInteractive: true }, /* @__PURE__ */ React102.createElement(CustomIconButton, { "aria-label": tooltipText, size, onClick, disabled }, /* @__PURE__ */ React102.createElement(BrushBigIcon, { fontSize: size })));
|
|
6799
6772
|
|
|
6800
6773
|
// src/components/repeater/repeater.tsx
|
|
6801
|
-
import * as
|
|
6802
|
-
import { useEffect as useEffect14, useState as
|
|
6774
|
+
import * as React103 from "react";
|
|
6775
|
+
import { useEffect as useEffect14, useState as useState19 } from "react";
|
|
6803
6776
|
import { CopyIcon as CopyIcon2, EyeIcon as EyeIcon2, EyeOffIcon as EyeOffIcon2, PlusIcon as PlusIcon3, XIcon as XIcon4 } from "@elementor/icons";
|
|
6804
6777
|
import {
|
|
6805
6778
|
bindPopover as bindPopover9,
|
|
@@ -6828,7 +6801,7 @@ var Repeater3 = ({
|
|
|
6828
6801
|
openItem: initialOpenItem = EMPTY_OPEN_ITEM2,
|
|
6829
6802
|
isSortable = true
|
|
6830
6803
|
}) => {
|
|
6831
|
-
const [openItem, setOpenItem] =
|
|
6804
|
+
const [openItem, setOpenItem] = useState19(initialOpenItem);
|
|
6832
6805
|
const uniqueKeys = items2.map(
|
|
6833
6806
|
(item, index) => isSortable && "getId" in itemSettings ? itemSettings.getId({ item, index }) : String(index)
|
|
6834
6807
|
);
|
|
@@ -6891,7 +6864,7 @@ var Repeater3 = ({
|
|
|
6891
6864
|
};
|
|
6892
6865
|
const isButtonDisabled = disabled || disableAddItemButton;
|
|
6893
6866
|
const shouldShowInfotip = isButtonDisabled && addButtonInfotipContent;
|
|
6894
|
-
const addButton = /* @__PURE__ */
|
|
6867
|
+
const addButton = /* @__PURE__ */ React103.createElement(
|
|
6895
6868
|
IconButton10,
|
|
6896
6869
|
{
|
|
6897
6870
|
size: SIZE9,
|
|
@@ -6902,9 +6875,9 @@ var Repeater3 = ({
|
|
|
6902
6875
|
onClick: addRepeaterItem,
|
|
6903
6876
|
"aria-label": __52("Add item", "elementor")
|
|
6904
6877
|
},
|
|
6905
|
-
/* @__PURE__ */
|
|
6878
|
+
/* @__PURE__ */ React103.createElement(PlusIcon3, { fontSize: SIZE9 })
|
|
6906
6879
|
);
|
|
6907
|
-
return /* @__PURE__ */
|
|
6880
|
+
return /* @__PURE__ */ React103.createElement(SectionContent, { gap: 2 }, /* @__PURE__ */ React103.createElement(RepeaterHeader, { label, adornment: ControlAdornments }, shouldShowInfotip ? /* @__PURE__ */ React103.createElement(
|
|
6908
6881
|
Infotip4,
|
|
6909
6882
|
{
|
|
6910
6883
|
placement: "right",
|
|
@@ -6912,20 +6885,20 @@ var Repeater3 = ({
|
|
|
6912
6885
|
color: "secondary",
|
|
6913
6886
|
slotProps: { popper: { sx: { width: 300 } } }
|
|
6914
6887
|
},
|
|
6915
|
-
/* @__PURE__ */
|
|
6916
|
-
) : addButton), 0 < uniqueKeys.length && /* @__PURE__ */
|
|
6888
|
+
/* @__PURE__ */ React103.createElement(Box25, { sx: { ...isButtonDisabled ? { cursor: "not-allowed" } : {} } }, addButton)
|
|
6889
|
+
) : addButton), 0 < uniqueKeys.length && /* @__PURE__ */ React103.createElement(SortableProvider, { value: uniqueKeys, onChange: onChangeOrder }, uniqueKeys.map((key) => {
|
|
6917
6890
|
const index = uniqueKeys.indexOf(key);
|
|
6918
6891
|
const value = items2[index];
|
|
6919
6892
|
if (!value) {
|
|
6920
6893
|
return null;
|
|
6921
6894
|
}
|
|
6922
|
-
return /* @__PURE__ */
|
|
6895
|
+
return /* @__PURE__ */ React103.createElement(SortableItem, { id: key, key: `sortable-${key}`, disabled: !isSortable }, /* @__PURE__ */ React103.createElement(
|
|
6923
6896
|
RepeaterItem,
|
|
6924
6897
|
{
|
|
6925
6898
|
disabled,
|
|
6926
6899
|
propDisabled: value?.disabled,
|
|
6927
|
-
label: /* @__PURE__ */
|
|
6928
|
-
startIcon: /* @__PURE__ */
|
|
6900
|
+
label: /* @__PURE__ */ React103.createElement(RepeaterItemLabelSlot, { value }, /* @__PURE__ */ React103.createElement(itemSettings.Label, { value, index })),
|
|
6901
|
+
startIcon: /* @__PURE__ */ React103.createElement(RepeaterItemIconSlot, { value }, /* @__PURE__ */ React103.createElement(itemSettings.Icon, { value })),
|
|
6929
6902
|
removeItem: () => removeRepeaterItem(index),
|
|
6930
6903
|
duplicateItem: () => duplicateRepeaterItem(index),
|
|
6931
6904
|
toggleDisableItem: () => toggleDisableRepeaterItem(index),
|
|
@@ -6937,7 +6910,7 @@ var Repeater3 = ({
|
|
|
6937
6910
|
actions: itemSettings.actions,
|
|
6938
6911
|
value
|
|
6939
6912
|
},
|
|
6940
|
-
(props) => /* @__PURE__ */
|
|
6913
|
+
(props) => /* @__PURE__ */ React103.createElement(
|
|
6941
6914
|
itemSettings.Content,
|
|
6942
6915
|
{
|
|
6943
6916
|
...props,
|
|
@@ -6970,7 +6943,7 @@ var RepeaterItem = ({
|
|
|
6970
6943
|
const duplicateLabel = __52("Duplicate", "elementor");
|
|
6971
6944
|
const toggleLabel = propDisabled ? __52("Show", "elementor") : __52("Hide", "elementor");
|
|
6972
6945
|
const removeLabel = __52("Remove", "elementor");
|
|
6973
|
-
return /* @__PURE__ */
|
|
6946
|
+
return /* @__PURE__ */ React103.createElement(React103.Fragment, null, /* @__PURE__ */ React103.createElement(
|
|
6974
6947
|
RepeaterTag,
|
|
6975
6948
|
{
|
|
6976
6949
|
disabled,
|
|
@@ -6979,12 +6952,12 @@ var RepeaterItem = ({
|
|
|
6979
6952
|
"aria-label": __52("Open item", "elementor"),
|
|
6980
6953
|
...bindTrigger6(popoverState),
|
|
6981
6954
|
startIcon,
|
|
6982
|
-
actions: /* @__PURE__ */
|
|
6955
|
+
actions: /* @__PURE__ */ React103.createElement(React103.Fragment, null, showDuplicate && /* @__PURE__ */ React103.createElement(Tooltip12, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React103.createElement(IconButton10, { size: SIZE9, onClick: duplicateItem, "aria-label": duplicateLabel }, /* @__PURE__ */ React103.createElement(CopyIcon2, { fontSize: SIZE9 }))), showToggle && /* @__PURE__ */ React103.createElement(Tooltip12, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React103.createElement(IconButton10, { size: SIZE9, onClick: toggleDisableItem, "aria-label": toggleLabel }, propDisabled ? /* @__PURE__ */ React103.createElement(EyeOffIcon2, { fontSize: SIZE9 }) : /* @__PURE__ */ React103.createElement(EyeIcon2, { fontSize: SIZE9 }))), actions?.(value), showRemove && /* @__PURE__ */ React103.createElement(Tooltip12, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React103.createElement(IconButton10, { size: SIZE9, onClick: removeItem, "aria-label": removeLabel }, /* @__PURE__ */ React103.createElement(XIcon4, { fontSize: SIZE9 }))))
|
|
6983
6956
|
}
|
|
6984
|
-
), /* @__PURE__ */
|
|
6957
|
+
), /* @__PURE__ */ React103.createElement(RepeaterPopover, { width: ref?.getBoundingClientRect().width, ...popoverProps, anchorEl: ref }, /* @__PURE__ */ React103.createElement(Box25, null, children({ anchorEl: ref }))));
|
|
6985
6958
|
};
|
|
6986
6959
|
var usePopover = (openOnMount, onOpen) => {
|
|
6987
|
-
const [ref, setRef] =
|
|
6960
|
+
const [ref, setRef] = useState19(null);
|
|
6988
6961
|
const popoverState = usePopupState10({ variant: "popover" });
|
|
6989
6962
|
const popoverProps = bindPopover9(popoverState);
|
|
6990
6963
|
useEffect14(() => {
|
|
@@ -7002,7 +6975,7 @@ var usePopover = (openOnMount, onOpen) => {
|
|
|
7002
6975
|
};
|
|
7003
6976
|
|
|
7004
6977
|
// src/components/size/unstable-size-field.tsx
|
|
7005
|
-
import * as
|
|
6978
|
+
import * as React106 from "react";
|
|
7006
6979
|
import { InputAdornment as InputAdornment5 } from "@elementor/ui";
|
|
7007
6980
|
|
|
7008
6981
|
// src/hooks/use-size-value.ts
|
|
@@ -7043,10 +7016,10 @@ var differsFromExternal = (newState, externalState) => {
|
|
|
7043
7016
|
};
|
|
7044
7017
|
|
|
7045
7018
|
// src/components/size/unit-select.tsx
|
|
7046
|
-
import * as
|
|
7019
|
+
import * as React104 from "react";
|
|
7047
7020
|
import { useId as useId3 } from "react";
|
|
7048
7021
|
import { MenuListItem as MenuListItem7 } from "@elementor/editor-ui";
|
|
7049
|
-
import { bindMenu as bindMenu2, bindTrigger as bindTrigger7, Button as Button5, Menu as Menu3, styled as
|
|
7022
|
+
import { bindMenu as bindMenu2, bindTrigger as bindTrigger7, Button as Button5, Menu as Menu3, styled as styled10, usePopupState as usePopupState11 } from "@elementor/ui";
|
|
7050
7023
|
var menuItemContentStyles = {
|
|
7051
7024
|
display: "flex",
|
|
7052
7025
|
flexDirection: "column",
|
|
@@ -7061,7 +7034,7 @@ var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
|
|
|
7061
7034
|
onClick(options[index]);
|
|
7062
7035
|
popupState.close();
|
|
7063
7036
|
};
|
|
7064
|
-
return /* @__PURE__ */
|
|
7037
|
+
return /* @__PURE__ */ React104.createElement(React104.Fragment, null, /* @__PURE__ */ React104.createElement(StyledButton2, { isPrimaryColor: showPrimaryColor, size: "small", ...bindTrigger7(popupState) }, value), /* @__PURE__ */ React104.createElement(Menu3, { MenuListProps: { dense: true }, ...bindMenu2(popupState) }, options.map((option, index) => /* @__PURE__ */ React104.createElement(
|
|
7065
7038
|
MenuListItem7,
|
|
7066
7039
|
{
|
|
7067
7040
|
key: option,
|
|
@@ -7080,7 +7053,7 @@ var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
|
|
|
7080
7053
|
option.toUpperCase()
|
|
7081
7054
|
))));
|
|
7082
7055
|
};
|
|
7083
|
-
var StyledButton2 =
|
|
7056
|
+
var StyledButton2 = styled10(Button5, {
|
|
7084
7057
|
shouldForwardProp: (prop) => prop !== "isPrimaryColor"
|
|
7085
7058
|
})(({ isPrimaryColor, theme }) => ({
|
|
7086
7059
|
color: isPrimaryColor ? theme.palette.text.primary : theme.palette.text.tertiary,
|
|
@@ -7090,11 +7063,11 @@ var StyledButton2 = styled11(Button5, {
|
|
|
7090
7063
|
}));
|
|
7091
7064
|
|
|
7092
7065
|
// src/components/size/unstable-size-input.tsx
|
|
7093
|
-
import * as
|
|
7066
|
+
import * as React105 from "react";
|
|
7094
7067
|
import { forwardRef as forwardRef11 } from "react";
|
|
7095
7068
|
var UnstableSizeInput = forwardRef11(
|
|
7096
7069
|
({ type, value, onChange, onKeyDown, onKeyUp, InputProps, onBlur, focused, disabled }, ref) => {
|
|
7097
|
-
return /* @__PURE__ */
|
|
7070
|
+
return /* @__PURE__ */ React105.createElement(
|
|
7098
7071
|
NumberInput,
|
|
7099
7072
|
{
|
|
7100
7073
|
ref,
|
|
@@ -7137,7 +7110,7 @@ var UnstableSizeField = ({
|
|
|
7137
7110
|
const shouldHighlightUnit = () => {
|
|
7138
7111
|
return hasValue(size);
|
|
7139
7112
|
};
|
|
7140
|
-
return /* @__PURE__ */
|
|
7113
|
+
return /* @__PURE__ */ React106.createElement(
|
|
7141
7114
|
UnstableSizeInput,
|
|
7142
7115
|
{
|
|
7143
7116
|
type: "number",
|
|
@@ -7145,7 +7118,7 @@ var UnstableSizeField = ({
|
|
|
7145
7118
|
onBlur,
|
|
7146
7119
|
onChange: (event) => setSize(event.target.value),
|
|
7147
7120
|
InputProps: {
|
|
7148
|
-
endAdornment: /* @__PURE__ */
|
|
7121
|
+
endAdornment: /* @__PURE__ */ React106.createElement(InputAdornment5, { position: "end" }, /* @__PURE__ */ React106.createElement(
|
|
7149
7122
|
UnitSelect,
|
|
7150
7123
|
{
|
|
7151
7124
|
options: units2,
|
|
@@ -7176,7 +7149,6 @@ export {
|
|
|
7176
7149
|
DateTimeControl,
|
|
7177
7150
|
EqualUnequalSizesControl,
|
|
7178
7151
|
FilterRepeaterControl,
|
|
7179
|
-
FloatingActionsBar,
|
|
7180
7152
|
FontFamilyControl,
|
|
7181
7153
|
GapControl,
|
|
7182
7154
|
HtmlTagControl,
|
|
@@ -7224,7 +7196,6 @@ export {
|
|
|
7224
7196
|
useControlActions,
|
|
7225
7197
|
useControlReplacement,
|
|
7226
7198
|
useElementCanHaveChildren,
|
|
7227
|
-
useFloatingActionsBar,
|
|
7228
7199
|
useSyncExternalState
|
|
7229
7200
|
};
|
|
7230
7201
|
//# sourceMappingURL=index.mjs.map
|