@elementor/editor-editing-panel 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/index.js +568 -502
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +448 -382
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -5
- package/src/components/conditional-tooltip-wrapper.tsx +52 -0
- package/src/components/css-class-selector.tsx +59 -19
- package/src/components/multi-combobox/types.ts +1 -0
- package/src/components/style-sections/layout-section/gap-control-field.tsx +18 -0
- package/src/components/style-sections/layout-section/layout-section.tsx +2 -0
- package/src/components/style-tab.tsx +2 -11
- package/src/contexts/style-context.tsx +2 -2
- package/src/hooks/use-style-prop-history.ts +1 -1
- package/src/hooks/use-styles-field.ts +2 -0
package/dist/index.js
CHANGED
|
@@ -28,13 +28,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
30
|
// src/index.ts
|
|
31
|
-
var
|
|
32
|
-
__export(
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
33
|
replaceControl: () => replaceControl,
|
|
34
|
-
useBoundProp: () =>
|
|
34
|
+
useBoundProp: () => import_editor_controls47.useBoundProp
|
|
35
35
|
});
|
|
36
|
-
module.exports = __toCommonJS(
|
|
37
|
-
var
|
|
36
|
+
module.exports = __toCommonJS(index_exports);
|
|
37
|
+
var import_editor_controls47 = require("@elementor/editor-controls");
|
|
38
38
|
|
|
39
39
|
// src/control-replacement.tsx
|
|
40
40
|
var import_editor_controls = require("@elementor/editor-controls");
|
|
@@ -46,7 +46,7 @@ var import_editor_panels3 = require("@elementor/editor-panels");
|
|
|
46
46
|
var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
|
|
47
47
|
|
|
48
48
|
// src/hooks/use-close-editor-panel.ts
|
|
49
|
-
var
|
|
49
|
+
var import_react16 = require("react");
|
|
50
50
|
var import_editor_elements8 = require("@elementor/editor-elements");
|
|
51
51
|
var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
|
|
52
52
|
|
|
@@ -54,12 +54,12 @@ var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
|
|
|
54
54
|
var import_editor_panels2 = require("@elementor/editor-panels");
|
|
55
55
|
|
|
56
56
|
// src/components/editing-panel.tsx
|
|
57
|
-
var
|
|
58
|
-
var
|
|
57
|
+
var React60 = __toESM(require("react"));
|
|
58
|
+
var import_editor_controls42 = require("@elementor/editor-controls");
|
|
59
59
|
var import_editor_elements6 = require("@elementor/editor-elements");
|
|
60
60
|
var import_editor_panels = require("@elementor/editor-panels");
|
|
61
|
-
var
|
|
62
|
-
var
|
|
61
|
+
var import_ui52 = require("@elementor/ui");
|
|
62
|
+
var import_i18n40 = require("@wordpress/i18n");
|
|
63
63
|
|
|
64
64
|
// src/contexts/element-context.tsx
|
|
65
65
|
var React = __toESM(require("react"));
|
|
@@ -130,10 +130,10 @@ function EditorPanelErrorFallback() {
|
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
// src/components/editing-panel-tabs.tsx
|
|
133
|
-
var
|
|
134
|
-
var
|
|
135
|
-
var
|
|
136
|
-
var
|
|
133
|
+
var React59 = __toESM(require("react"));
|
|
134
|
+
var import_react15 = require("react");
|
|
135
|
+
var import_ui51 = require("@elementor/ui");
|
|
136
|
+
var import_i18n39 = require("@wordpress/i18n");
|
|
137
137
|
|
|
138
138
|
// src/components/settings-tab.tsx
|
|
139
139
|
var React9 = __toESM(require("react"));
|
|
@@ -285,13 +285,12 @@ var Control2 = ({ control }) => {
|
|
|
285
285
|
};
|
|
286
286
|
|
|
287
287
|
// src/components/style-tab.tsx
|
|
288
|
-
var
|
|
289
|
-
var
|
|
288
|
+
var React58 = __toESM(require("react"));
|
|
289
|
+
var import_react14 = require("react");
|
|
290
290
|
var import_editor_elements5 = require("@elementor/editor-elements");
|
|
291
291
|
var import_editor_responsive = require("@elementor/editor-responsive");
|
|
292
|
-
var
|
|
293
|
-
var
|
|
294
|
-
var import_i18n36 = require("@wordpress/i18n");
|
|
292
|
+
var import_ui50 = require("@elementor/ui");
|
|
293
|
+
var import_i18n38 = require("@wordpress/i18n");
|
|
295
294
|
|
|
296
295
|
// src/contexts/classes-prop-context.tsx
|
|
297
296
|
var React10 = __toESM(require("react"));
|
|
@@ -324,18 +323,55 @@ function useStyle() {
|
|
|
324
323
|
}
|
|
325
324
|
|
|
326
325
|
// src/components/css-class-selector.tsx
|
|
327
|
-
var
|
|
326
|
+
var React14 = __toESM(require("react"));
|
|
328
327
|
var import_editor_elements2 = require("@elementor/editor-elements");
|
|
329
328
|
var import_editor_props = require("@elementor/editor-props");
|
|
330
|
-
var
|
|
329
|
+
var import_editor_styles_repository = require("@elementor/editor-styles-repository");
|
|
330
|
+
var import_ui10 = require("@elementor/ui");
|
|
331
331
|
var import_i18n = require("@wordpress/i18n");
|
|
332
332
|
|
|
333
|
-
// src/components/
|
|
333
|
+
// src/components/conditional-tooltip-wrapper.tsx
|
|
334
|
+
var import_react6 = require("react");
|
|
334
335
|
var React12 = __toESM(require("react"));
|
|
335
|
-
var
|
|
336
|
+
var import_ui7 = require("@elementor/ui");
|
|
337
|
+
var ConditionalTooltipWrapper = ({ maxWidth, title }) => {
|
|
338
|
+
const elRef = (0, import_react6.useRef)(null);
|
|
339
|
+
const [isOverflown, setIsOverflown] = (0, import_react6.useState)(false);
|
|
340
|
+
(0, import_react6.useEffect)(() => {
|
|
341
|
+
const onResize = () => {
|
|
342
|
+
const element = elRef.current;
|
|
343
|
+
if (element) {
|
|
344
|
+
setIsOverflown(element.scrollWidth > element.clientWidth);
|
|
345
|
+
}
|
|
346
|
+
};
|
|
347
|
+
onResize();
|
|
348
|
+
window.addEventListener("resize", onResize);
|
|
349
|
+
return () => {
|
|
350
|
+
window.removeEventListener("resize", onResize);
|
|
351
|
+
};
|
|
352
|
+
}, []);
|
|
353
|
+
if (isOverflown) {
|
|
354
|
+
return /* @__PURE__ */ React12.createElement(import_ui7.Tooltip, { title, placement: "top" }, /* @__PURE__ */ React12.createElement(Content, { maxWidth, ref: elRef, title }));
|
|
355
|
+
}
|
|
356
|
+
return /* @__PURE__ */ React12.createElement(Content, { maxWidth, ref: elRef, title });
|
|
357
|
+
};
|
|
358
|
+
var Content = React12.forwardRef(({ maxWidth, title, ...rest }, ref) => /* @__PURE__ */ React12.createElement(
|
|
359
|
+
import_ui7.Box,
|
|
360
|
+
{
|
|
361
|
+
ref,
|
|
362
|
+
position: "relative",
|
|
363
|
+
sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", maxWidth },
|
|
364
|
+
...rest
|
|
365
|
+
},
|
|
366
|
+
title
|
|
367
|
+
));
|
|
368
|
+
|
|
369
|
+
// src/components/multi-combobox/multi-combobox.tsx
|
|
370
|
+
var React13 = __toESM(require("react"));
|
|
371
|
+
var import_ui9 = require("@elementor/ui");
|
|
336
372
|
|
|
337
373
|
// src/components/multi-combobox/use-combobox-actions.ts
|
|
338
|
-
var
|
|
374
|
+
var import_ui8 = require("@elementor/ui");
|
|
339
375
|
var useComboboxActions = (applied, actions, optionsLabel, onSelect) => ({
|
|
340
376
|
action: {
|
|
341
377
|
is: (opt) => typeof opt !== "string" && "action" in opt,
|
|
@@ -369,7 +405,7 @@ var useComboboxActions = (applied, actions, optionsLabel, onSelect) => ({
|
|
|
369
405
|
}
|
|
370
406
|
}
|
|
371
407
|
});
|
|
372
|
-
var filter = (0,
|
|
408
|
+
var filter = (0, import_ui8.createFilterOptions)();
|
|
373
409
|
var createActionOption = (groupLabel, action, inputValue) => ({
|
|
374
410
|
value: "",
|
|
375
411
|
label: inputValue,
|
|
@@ -397,8 +433,8 @@ var MultiCombobox = ({
|
|
|
397
433
|
optionsLabel,
|
|
398
434
|
onSelect
|
|
399
435
|
);
|
|
400
|
-
return /* @__PURE__ */
|
|
401
|
-
|
|
436
|
+
return /* @__PURE__ */ React13.createElement(
|
|
437
|
+
import_ui9.Autocomplete,
|
|
402
438
|
{
|
|
403
439
|
...props,
|
|
404
440
|
freeSolo: true,
|
|
@@ -410,8 +446,8 @@ var MultiCombobox = ({
|
|
|
410
446
|
value: selected,
|
|
411
447
|
options: options10,
|
|
412
448
|
renderGroup,
|
|
413
|
-
renderInput: (params) => /* @__PURE__ */
|
|
414
|
-
getLimitTagsText: (more) => /* @__PURE__ */
|
|
449
|
+
renderInput: (params) => /* @__PURE__ */ React13.createElement(import_ui9.TextField, { ...params }),
|
|
450
|
+
getLimitTagsText: (more) => /* @__PURE__ */ React13.createElement(import_ui9.Chip, { size: "tiny", variant: "standard", label: `+${more}`, clickable: true }),
|
|
415
451
|
onChange: (_, selectedOrTypedValue, reason) => {
|
|
416
452
|
if (reason === "createOption") {
|
|
417
453
|
const typedValue = selectedOrTypedValue.find((option) => typeof option === "string");
|
|
@@ -443,34 +479,41 @@ var MultiCombobox = ({
|
|
|
443
479
|
}
|
|
444
480
|
);
|
|
445
481
|
};
|
|
446
|
-
var renderGroup = (params) => /* @__PURE__ */
|
|
447
|
-
var Group = (0,
|
|
482
|
+
var renderGroup = (params) => /* @__PURE__ */ React13.createElement(Group, { key: params.key }, /* @__PURE__ */ React13.createElement(GroupHeader, null, params.group), /* @__PURE__ */ React13.createElement(GroupItems, null, params.children));
|
|
483
|
+
var Group = (0, import_ui9.styled)("li")`
|
|
448
484
|
&:not( :last-of-type ) {
|
|
449
485
|
border-bottom: 1px solid ${({ theme }) => theme.palette.divider};
|
|
450
486
|
}
|
|
451
487
|
`;
|
|
452
|
-
var GroupHeader = (0,
|
|
488
|
+
var GroupHeader = (0, import_ui9.styled)(import_ui9.Box)(({ theme }) => ({
|
|
453
489
|
position: "sticky",
|
|
454
490
|
top: "-8px",
|
|
455
491
|
padding: theme.spacing(1, 2),
|
|
456
492
|
color: theme.palette.text.tertiary
|
|
457
493
|
}));
|
|
458
|
-
var GroupItems = (0,
|
|
494
|
+
var GroupItems = (0, import_ui9.styled)("ul")`
|
|
459
495
|
padding: 0;
|
|
460
496
|
`;
|
|
461
497
|
|
|
462
498
|
// src/components/css-class-selector.tsx
|
|
463
499
|
var ID = "elementor-css-class-selector";
|
|
464
500
|
var TAGS_LIMIT = 8;
|
|
501
|
+
var EMPTY_OPTION = {
|
|
502
|
+
label: (0, import_i18n.__)("local", "elementor"),
|
|
503
|
+
value: "",
|
|
504
|
+
fixed: true,
|
|
505
|
+
color: "primary",
|
|
506
|
+
provider: import_editor_styles_repository.ELEMENTS_STYLES_PROVIDER_KEY
|
|
507
|
+
};
|
|
465
508
|
function CssClassSelector() {
|
|
466
509
|
const options10 = useOptions();
|
|
510
|
+
const [appliedIds, setAppliedIds] = useAppliedClassesIds();
|
|
467
511
|
const { id: activeId, setId: setActiveId } = useStyle();
|
|
468
|
-
const
|
|
469
|
-
const handleApply = useHandleApply();
|
|
512
|
+
const handleApply = useHandleApply(appliedIds, setAppliedIds);
|
|
470
513
|
const handleActivate = ({ value }) => setActiveId(value);
|
|
471
|
-
const
|
|
472
|
-
const
|
|
473
|
-
return /* @__PURE__ */
|
|
514
|
+
const applied = useAppliedOptions(options10, appliedIds);
|
|
515
|
+
const active = applied.find((option) => option.value === activeId) ?? EMPTY_OPTION;
|
|
516
|
+
return /* @__PURE__ */ React14.createElement(import_ui10.Stack, { gap: 1, p: 2 }, /* @__PURE__ */ React14.createElement(import_ui10.Typography, { component: "label", variant: "caption", htmlFor: ID }, (0, import_i18n.__)("CSS Classes", "elementor")), /* @__PURE__ */ React14.createElement(
|
|
474
517
|
MultiCombobox,
|
|
475
518
|
{
|
|
476
519
|
id: ID,
|
|
@@ -483,17 +526,18 @@ function CssClassSelector() {
|
|
|
483
526
|
renderTags: (values, getTagProps) => values.map((value, index) => {
|
|
484
527
|
const chipProps = getTagProps({ index });
|
|
485
528
|
const isActive = value.value === active?.value;
|
|
486
|
-
return /* @__PURE__ */
|
|
487
|
-
|
|
529
|
+
return /* @__PURE__ */ React14.createElement(
|
|
530
|
+
import_ui10.Chip,
|
|
488
531
|
{
|
|
489
532
|
...chipProps,
|
|
490
533
|
key: chipProps.key,
|
|
491
534
|
size: "small",
|
|
492
|
-
label: value.label,
|
|
535
|
+
label: /* @__PURE__ */ React14.createElement(ConditionalTooltipWrapper, { maxWidth: "10ch", title: value.label }),
|
|
493
536
|
variant: isActive ? "filled" : "standard",
|
|
494
537
|
color: isActive && value.color ? value.color : "default",
|
|
495
538
|
onClick: () => handleActivate(value),
|
|
496
|
-
onDelete: null
|
|
539
|
+
onDelete: null,
|
|
540
|
+
"aria-pressed": isActive
|
|
497
541
|
}
|
|
498
542
|
);
|
|
499
543
|
})
|
|
@@ -502,13 +546,31 @@ function CssClassSelector() {
|
|
|
502
546
|
}
|
|
503
547
|
function useOptions() {
|
|
504
548
|
const { element } = useElement();
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
549
|
+
return (0, import_editor_styles_repository.useAllStylesByProvider)({ elementId: element.id }).flatMap(([providerKey, styleDefs]) => {
|
|
550
|
+
const isElements = providerKey === import_editor_styles_repository.ELEMENTS_STYLES_PROVIDER_KEY;
|
|
551
|
+
if (isElements && styleDefs.length === 0) {
|
|
552
|
+
return [EMPTY_OPTION];
|
|
553
|
+
}
|
|
554
|
+
return styleDefs.map((styleDef) => {
|
|
555
|
+
return {
|
|
556
|
+
label: styleDef.label,
|
|
557
|
+
value: styleDef.id,
|
|
558
|
+
fixed: isElements,
|
|
559
|
+
color: isElements ? "primary" : "global",
|
|
560
|
+
provider: providerKey
|
|
561
|
+
};
|
|
562
|
+
});
|
|
563
|
+
});
|
|
564
|
+
}
|
|
565
|
+
function useAppliedOptions(options10, appliedIds) {
|
|
566
|
+
const applied = appliedIds.map((id) => options10.find((option) => option.value === id)).filter((option) => !!option);
|
|
567
|
+
const hasElementsProviderStyleApplied = applied.some(
|
|
568
|
+
(option) => option.provider === import_editor_styles_repository.ELEMENTS_STYLES_PROVIDER_KEY
|
|
569
|
+
);
|
|
570
|
+
if (!hasElementsProviderStyleApplied) {
|
|
571
|
+
applied.unshift(EMPTY_OPTION);
|
|
572
|
+
}
|
|
573
|
+
return applied;
|
|
512
574
|
}
|
|
513
575
|
function useAppliedClassesIds() {
|
|
514
576
|
const { element } = useElement();
|
|
@@ -524,11 +586,10 @@ function useAppliedClassesIds() {
|
|
|
524
586
|
};
|
|
525
587
|
return [value, setValue];
|
|
526
588
|
}
|
|
527
|
-
function useHandleApply() {
|
|
589
|
+
function useHandleApply(appliedIds, setAppliedIds) {
|
|
528
590
|
const { id: activeId, setId: setActiveId } = useStyle();
|
|
529
|
-
const [appliedIds, setAppliedIds] = useAppliedClassesIds();
|
|
530
591
|
return (selectedOptions) => {
|
|
531
|
-
const selectedValues = selectedOptions.map(({ value }) => value);
|
|
592
|
+
const selectedValues = selectedOptions.map(({ value }) => value).filter((value) => value !== EMPTY_OPTION.value);
|
|
532
593
|
const isSameClassesAlreadyApplied = selectedValues.length === appliedIds.length && selectedValues.every((value) => appliedIds.includes(value));
|
|
533
594
|
if (isSameClassesAlreadyApplied) {
|
|
534
595
|
return;
|
|
@@ -547,23 +608,24 @@ function useHandleApply() {
|
|
|
547
608
|
}
|
|
548
609
|
|
|
549
610
|
// src/components/style-sections/background-section/background-section.tsx
|
|
550
|
-
var
|
|
611
|
+
var React17 = __toESM(require("react"));
|
|
551
612
|
var import_editor_controls7 = require("@elementor/editor-controls");
|
|
552
|
-
var
|
|
613
|
+
var import_ui12 = require("@elementor/ui");
|
|
553
614
|
|
|
554
615
|
// src/controls-registry/styles-field.tsx
|
|
555
|
-
var
|
|
616
|
+
var React15 = __toESM(require("react"));
|
|
556
617
|
var import_editor_controls5 = require("@elementor/editor-controls");
|
|
557
618
|
|
|
558
619
|
// src/hooks/use-styles-field.ts
|
|
559
|
-
var
|
|
620
|
+
var import_react7 = require("react");
|
|
560
621
|
var import_editor_elements3 = require("@elementor/editor-elements");
|
|
622
|
+
var import_i18n2 = require("@wordpress/i18n");
|
|
561
623
|
var useStylesField = (propName) => {
|
|
562
624
|
const { element } = useElement();
|
|
563
625
|
const { id, meta } = useStyle();
|
|
564
626
|
const classesProp = useClassesProp();
|
|
565
|
-
const previousValue = (0,
|
|
566
|
-
const onChangeCallbacks = (0,
|
|
627
|
+
const previousValue = (0, import_react7.useRef)(null);
|
|
628
|
+
const onChangeCallbacks = (0, import_react7.useRef)(/* @__PURE__ */ new Set());
|
|
567
629
|
const value = (0, import_editor_elements3.useElementStyleProp)({
|
|
568
630
|
elementID: element.id,
|
|
569
631
|
styleDefID: id,
|
|
@@ -576,13 +638,14 @@ var useStylesField = (propName) => {
|
|
|
576
638
|
styleDefID: id,
|
|
577
639
|
props: { [propName]: newValue },
|
|
578
640
|
meta,
|
|
579
|
-
bind: classesProp
|
|
641
|
+
bind: classesProp,
|
|
642
|
+
label: (0, import_i18n2.__)("local", "elementor")
|
|
580
643
|
});
|
|
581
644
|
};
|
|
582
645
|
const registerChangeListener = (callback) => {
|
|
583
646
|
onChangeCallbacks.current.add(callback);
|
|
584
647
|
};
|
|
585
|
-
(0,
|
|
648
|
+
(0, import_react7.useEffect)(() => {
|
|
586
649
|
onChangeCallbacks.current.forEach((cb) => {
|
|
587
650
|
cb(value, previousValue.current);
|
|
588
651
|
});
|
|
@@ -594,40 +657,40 @@ var useStylesField = (propName) => {
|
|
|
594
657
|
// src/controls-registry/styles-field.tsx
|
|
595
658
|
var StylesField = ({ bind, children }) => {
|
|
596
659
|
const [value, setValue] = useStylesField(bind);
|
|
597
|
-
return /* @__PURE__ */
|
|
660
|
+
return /* @__PURE__ */ React15.createElement(import_editor_controls5.BoundPropProvider, { setValue, value, bind }, children);
|
|
598
661
|
};
|
|
599
662
|
|
|
600
663
|
// src/components/style-sections/background-section/background-color-field.tsx
|
|
601
|
-
var
|
|
664
|
+
var React16 = __toESM(require("react"));
|
|
602
665
|
var import_editor_controls6 = require("@elementor/editor-controls");
|
|
603
|
-
var
|
|
604
|
-
var
|
|
666
|
+
var import_ui11 = require("@elementor/ui");
|
|
667
|
+
var import_i18n3 = require("@wordpress/i18n");
|
|
605
668
|
var BackgroundColorField = () => {
|
|
606
|
-
return /* @__PURE__ */
|
|
669
|
+
return /* @__PURE__ */ React16.createElement(StylesField, { bind: "background-color" }, /* @__PURE__ */ React16.createElement(import_ui11.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React16.createElement(import_ui11.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React16.createElement(import_editor_controls6.ControlLabel, null, (0, import_i18n3.__)("Color", "elementor"))), /* @__PURE__ */ React16.createElement(import_ui11.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React16.createElement(import_editor_controls6.ColorControl, null))));
|
|
607
670
|
};
|
|
608
671
|
|
|
609
672
|
// src/components/style-sections/background-section/background-section.tsx
|
|
610
673
|
var BackgroundSection = () => {
|
|
611
|
-
return /* @__PURE__ */
|
|
674
|
+
return /* @__PURE__ */ React17.createElement(import_ui12.Stack, { gap: 1.5 }, /* @__PURE__ */ React17.createElement(StylesField, { bind: "background-image" }, /* @__PURE__ */ React17.createElement(import_editor_controls7.BackgroundOverlayRepeaterControl, null)), /* @__PURE__ */ React17.createElement(BackgroundColorField, null));
|
|
612
675
|
};
|
|
613
676
|
|
|
614
677
|
// src/components/style-sections/border-section/border-section.tsx
|
|
615
|
-
var
|
|
616
|
-
var
|
|
678
|
+
var React24 = __toESM(require("react"));
|
|
679
|
+
var import_ui16 = require("@elementor/ui");
|
|
617
680
|
|
|
618
681
|
// src/components/style-sections/border-section/border-field.tsx
|
|
619
|
-
var
|
|
620
|
-
var
|
|
682
|
+
var React22 = __toESM(require("react"));
|
|
683
|
+
var import_i18n7 = require("@wordpress/i18n");
|
|
621
684
|
|
|
622
685
|
// src/components/add-or-remove-content.tsx
|
|
623
|
-
var
|
|
686
|
+
var React18 = __toESM(require("react"));
|
|
624
687
|
var import_editor_controls8 = require("@elementor/editor-controls");
|
|
625
688
|
var import_icons3 = require("@elementor/icons");
|
|
626
|
-
var
|
|
689
|
+
var import_ui13 = require("@elementor/ui");
|
|
627
690
|
var SIZE2 = "tiny";
|
|
628
691
|
var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
|
|
629
|
-
return /* @__PURE__ */
|
|
630
|
-
|
|
692
|
+
return /* @__PURE__ */ React18.createElement(import_ui13.Stack, { gap: 1.5 }, /* @__PURE__ */ React18.createElement(
|
|
693
|
+
import_ui13.Stack,
|
|
631
694
|
{
|
|
632
695
|
direction: "row",
|
|
633
696
|
sx: {
|
|
@@ -635,75 +698,75 @@ var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
|
|
|
635
698
|
alignItems: "center"
|
|
636
699
|
}
|
|
637
700
|
},
|
|
638
|
-
/* @__PURE__ */
|
|
639
|
-
isAdded ? /* @__PURE__ */
|
|
640
|
-
), /* @__PURE__ */
|
|
701
|
+
/* @__PURE__ */ React18.createElement(import_editor_controls8.ControlLabel, null, label),
|
|
702
|
+
isAdded ? /* @__PURE__ */ React18.createElement(import_ui13.IconButton, { size: SIZE2, onClick: onRemove }, /* @__PURE__ */ React18.createElement(import_icons3.MinusIcon, { fontSize: SIZE2 })) : /* @__PURE__ */ React18.createElement(import_ui13.IconButton, { size: SIZE2, onClick: onAdd }, /* @__PURE__ */ React18.createElement(import_icons3.PlusIcon, { fontSize: SIZE2 }))
|
|
703
|
+
), /* @__PURE__ */ React18.createElement(import_ui13.Collapse, { in: isAdded, unmountOnExit: true }, /* @__PURE__ */ React18.createElement(import_ui13.Stack, { gap: 1.5 }, children)));
|
|
641
704
|
};
|
|
642
705
|
|
|
643
706
|
// src/components/style-sections/border-section/border-color-field.tsx
|
|
644
|
-
var
|
|
707
|
+
var React19 = __toESM(require("react"));
|
|
645
708
|
var import_editor_controls9 = require("@elementor/editor-controls");
|
|
646
|
-
var
|
|
647
|
-
var
|
|
709
|
+
var import_ui14 = require("@elementor/ui");
|
|
710
|
+
var import_i18n4 = require("@wordpress/i18n");
|
|
648
711
|
var BorderColorField = () => {
|
|
649
|
-
return /* @__PURE__ */
|
|
712
|
+
return /* @__PURE__ */ React19.createElement(StylesField, { bind: "border-color" }, /* @__PURE__ */ React19.createElement(import_ui14.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React19.createElement(import_ui14.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React19.createElement(import_editor_controls9.ControlLabel, null, (0, import_i18n4.__)("Border Color", "elementor"))), /* @__PURE__ */ React19.createElement(import_ui14.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React19.createElement(import_editor_controls9.ColorControl, null))));
|
|
650
713
|
};
|
|
651
714
|
|
|
652
715
|
// src/components/style-sections/border-section/border-style-field.tsx
|
|
653
|
-
var
|
|
716
|
+
var React20 = __toESM(require("react"));
|
|
654
717
|
var import_editor_controls10 = require("@elementor/editor-controls");
|
|
655
|
-
var
|
|
656
|
-
var
|
|
718
|
+
var import_ui15 = require("@elementor/ui");
|
|
719
|
+
var import_i18n5 = require("@wordpress/i18n");
|
|
657
720
|
var borderStyles = [
|
|
658
|
-
{ value: "none", label: (0,
|
|
659
|
-
{ value: "solid", label: (0,
|
|
660
|
-
{ value: "dashed", label: (0,
|
|
661
|
-
{ value: "dotted", label: (0,
|
|
662
|
-
{ value: "double", label: (0,
|
|
663
|
-
{ value: "groove", label: (0,
|
|
664
|
-
{ value: "ridge", label: (0,
|
|
665
|
-
{ value: "inset", label: (0,
|
|
666
|
-
{ value: "outset", label: (0,
|
|
721
|
+
{ value: "none", label: (0, import_i18n5.__)("None", "elementor") },
|
|
722
|
+
{ value: "solid", label: (0, import_i18n5.__)("Solid", "elementor") },
|
|
723
|
+
{ value: "dashed", label: (0, import_i18n5.__)("Dashed", "elementor") },
|
|
724
|
+
{ value: "dotted", label: (0, import_i18n5.__)("Dotted", "elementor") },
|
|
725
|
+
{ value: "double", label: (0, import_i18n5.__)("Double", "elementor") },
|
|
726
|
+
{ value: "groove", label: (0, import_i18n5.__)("Groove", "elementor") },
|
|
727
|
+
{ value: "ridge", label: (0, import_i18n5.__)("Ridge", "elementor") },
|
|
728
|
+
{ value: "inset", label: (0, import_i18n5.__)("Inset", "elementor") },
|
|
729
|
+
{ value: "outset", label: (0, import_i18n5.__)("Outset", "elementor") }
|
|
667
730
|
];
|
|
668
731
|
var BorderStyleField = () => {
|
|
669
|
-
return /* @__PURE__ */
|
|
732
|
+
return /* @__PURE__ */ React20.createElement(StylesField, { bind: "border-style" }, /* @__PURE__ */ React20.createElement(import_ui15.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React20.createElement(import_ui15.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React20.createElement(import_editor_controls10.ControlLabel, null, (0, import_i18n5.__)("Border Type", "elementor"))), /* @__PURE__ */ React20.createElement(import_ui15.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React20.createElement(import_editor_controls10.SelectControl, { options: borderStyles }))));
|
|
670
733
|
};
|
|
671
734
|
|
|
672
735
|
// src/components/style-sections/border-section/border-width-field.tsx
|
|
673
|
-
var
|
|
736
|
+
var React21 = __toESM(require("react"));
|
|
674
737
|
var import_editor_controls11 = require("@elementor/editor-controls");
|
|
675
738
|
var import_editor_props2 = require("@elementor/editor-props");
|
|
676
739
|
var import_icons4 = require("@elementor/icons");
|
|
677
|
-
var
|
|
740
|
+
var import_i18n6 = require("@wordpress/i18n");
|
|
678
741
|
var edges = [
|
|
679
742
|
{
|
|
680
|
-
label: (0,
|
|
681
|
-
icon: /* @__PURE__ */
|
|
743
|
+
label: (0, import_i18n6.__)("Top", "elementor"),
|
|
744
|
+
icon: /* @__PURE__ */ React21.createElement(import_icons4.SideTopIcon, { fontSize: "tiny" }),
|
|
682
745
|
bind: "top"
|
|
683
746
|
},
|
|
684
747
|
{
|
|
685
|
-
label: (0,
|
|
686
|
-
icon: /* @__PURE__ */
|
|
748
|
+
label: (0, import_i18n6.__)("Right", "elementor"),
|
|
749
|
+
icon: /* @__PURE__ */ React21.createElement(import_icons4.SideRightIcon, { fontSize: "tiny" }),
|
|
687
750
|
bind: "right"
|
|
688
751
|
},
|
|
689
752
|
{
|
|
690
|
-
label: (0,
|
|
691
|
-
icon: /* @__PURE__ */
|
|
753
|
+
label: (0, import_i18n6.__)("Bottom", "elementor"),
|
|
754
|
+
icon: /* @__PURE__ */ React21.createElement(import_icons4.SideBottomIcon, { fontSize: "tiny" }),
|
|
692
755
|
bind: "bottom"
|
|
693
756
|
},
|
|
694
757
|
{
|
|
695
|
-
label: (0,
|
|
696
|
-
icon: /* @__PURE__ */
|
|
758
|
+
label: (0, import_i18n6.__)("Left", "elementor"),
|
|
759
|
+
icon: /* @__PURE__ */ React21.createElement(import_icons4.SideLeftIcon, { fontSize: "tiny" }),
|
|
697
760
|
bind: "left"
|
|
698
761
|
}
|
|
699
762
|
];
|
|
700
763
|
var BorderWidthField = () => {
|
|
701
|
-
return /* @__PURE__ */
|
|
764
|
+
return /* @__PURE__ */ React21.createElement(StylesField, { bind: "border-width" }, /* @__PURE__ */ React21.createElement(
|
|
702
765
|
import_editor_controls11.EqualUnequalSizesControl,
|
|
703
766
|
{
|
|
704
767
|
items: edges,
|
|
705
|
-
label: (0,
|
|
706
|
-
icon: /* @__PURE__ */
|
|
768
|
+
label: (0, import_i18n6.__)("Border Width", "elementor"),
|
|
769
|
+
icon: /* @__PURE__ */ React21.createElement(import_icons4.SideAllIcon, { fontSize: "tiny" }),
|
|
707
770
|
multiSizePropTypeUtil: import_editor_props2.borderWidthPropTypeUtil
|
|
708
771
|
}
|
|
709
772
|
));
|
|
@@ -732,96 +795,96 @@ var BorderField = () => {
|
|
|
732
795
|
setBorderStyle(null);
|
|
733
796
|
};
|
|
734
797
|
const hasBorder = Boolean(borderWidth || borderColor || borderStyle);
|
|
735
|
-
return /* @__PURE__ */
|
|
798
|
+
return /* @__PURE__ */ React22.createElement(
|
|
736
799
|
AddOrRemoveContent,
|
|
737
800
|
{
|
|
738
|
-
label: (0,
|
|
801
|
+
label: (0, import_i18n7.__)("Border", "elementor"),
|
|
739
802
|
isAdded: hasBorder,
|
|
740
803
|
onAdd: addBorder,
|
|
741
804
|
onRemove: removeBorder
|
|
742
805
|
},
|
|
743
|
-
/* @__PURE__ */
|
|
744
|
-
/* @__PURE__ */
|
|
745
|
-
/* @__PURE__ */
|
|
806
|
+
/* @__PURE__ */ React22.createElement(BorderWidthField, null),
|
|
807
|
+
/* @__PURE__ */ React22.createElement(BorderColorField, null),
|
|
808
|
+
/* @__PURE__ */ React22.createElement(BorderStyleField, null)
|
|
746
809
|
);
|
|
747
810
|
};
|
|
748
811
|
|
|
749
812
|
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
750
|
-
var
|
|
813
|
+
var React23 = __toESM(require("react"));
|
|
751
814
|
var import_editor_controls12 = require("@elementor/editor-controls");
|
|
752
815
|
var import_editor_props3 = require("@elementor/editor-props");
|
|
753
816
|
var import_icons5 = require("@elementor/icons");
|
|
754
|
-
var
|
|
817
|
+
var import_i18n8 = require("@wordpress/i18n");
|
|
755
818
|
var corners = [
|
|
756
819
|
{
|
|
757
|
-
label: (0,
|
|
758
|
-
icon: /* @__PURE__ */
|
|
820
|
+
label: (0, import_i18n8.__)("Top Left", "elementor"),
|
|
821
|
+
icon: /* @__PURE__ */ React23.createElement(import_icons5.RadiusTopLeftIcon, { fontSize: "tiny" }),
|
|
759
822
|
bind: "top-left"
|
|
760
823
|
},
|
|
761
824
|
{
|
|
762
|
-
label: (0,
|
|
763
|
-
icon: /* @__PURE__ */
|
|
825
|
+
label: (0, import_i18n8.__)("Top Right", "elementor"),
|
|
826
|
+
icon: /* @__PURE__ */ React23.createElement(import_icons5.RadiusTopRightIcon, { fontSize: "tiny" }),
|
|
764
827
|
bind: "top-right"
|
|
765
828
|
},
|
|
766
829
|
{
|
|
767
|
-
label: (0,
|
|
768
|
-
icon: /* @__PURE__ */
|
|
830
|
+
label: (0, import_i18n8.__)("Bottom Right", "elementor"),
|
|
831
|
+
icon: /* @__PURE__ */ React23.createElement(import_icons5.RadiusBottomRightIcon, { fontSize: "tiny" }),
|
|
769
832
|
bind: "bottom-right"
|
|
770
833
|
},
|
|
771
834
|
{
|
|
772
|
-
label: (0,
|
|
773
|
-
icon: /* @__PURE__ */
|
|
835
|
+
label: (0, import_i18n8.__)("Bottom Left", "elementor"),
|
|
836
|
+
icon: /* @__PURE__ */ React23.createElement(import_icons5.RadiusBottomLeftIcon, { fontSize: "tiny" }),
|
|
774
837
|
bind: "bottom-left"
|
|
775
838
|
}
|
|
776
839
|
];
|
|
777
840
|
var BorderRadiusField = () => {
|
|
778
|
-
return /* @__PURE__ */
|
|
841
|
+
return /* @__PURE__ */ React23.createElement(StylesField, { bind: "border-radius" }, /* @__PURE__ */ React23.createElement(
|
|
779
842
|
import_editor_controls12.EqualUnequalSizesControl,
|
|
780
843
|
{
|
|
781
844
|
items: corners,
|
|
782
|
-
label: (0,
|
|
783
|
-
icon: /* @__PURE__ */
|
|
845
|
+
label: (0, import_i18n8.__)("Border Radius", "elementor"),
|
|
846
|
+
icon: /* @__PURE__ */ React23.createElement(import_icons5.BorderCornersIcon, { fontSize: "tiny" }),
|
|
784
847
|
multiSizePropTypeUtil: import_editor_props3.borderRadiusPropTypeUtil
|
|
785
848
|
}
|
|
786
849
|
));
|
|
787
850
|
};
|
|
788
851
|
|
|
789
852
|
// src/components/style-sections/border-section/border-section.tsx
|
|
790
|
-
var BorderSection = () => /* @__PURE__ */
|
|
853
|
+
var BorderSection = () => /* @__PURE__ */ React24.createElement(import_ui16.Stack, { gap: 1.5 }, /* @__PURE__ */ React24.createElement(BorderRadiusField, null), /* @__PURE__ */ React24.createElement(import_ui16.Divider, null), /* @__PURE__ */ React24.createElement(BorderField, null));
|
|
791
854
|
|
|
792
855
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
793
|
-
var
|
|
856
|
+
var React25 = __toESM(require("react"));
|
|
794
857
|
var import_editor_controls13 = require("@elementor/editor-controls");
|
|
795
|
-
var
|
|
858
|
+
var import_ui17 = require("@elementor/ui");
|
|
796
859
|
var EffectsSection = () => {
|
|
797
|
-
return /* @__PURE__ */
|
|
860
|
+
return /* @__PURE__ */ React25.createElement(import_ui17.Stack, { gap: 1.5 }, /* @__PURE__ */ React25.createElement(StylesField, { bind: "box-shadow" }, /* @__PURE__ */ React25.createElement(import_editor_controls13.BoxShadowRepeaterControl, null)));
|
|
798
861
|
};
|
|
799
862
|
|
|
800
863
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
801
|
-
var
|
|
802
|
-
var
|
|
803
|
-
var
|
|
804
|
-
var
|
|
864
|
+
var React36 = __toESM(require("react"));
|
|
865
|
+
var import_editor_controls23 = require("@elementor/editor-controls");
|
|
866
|
+
var import_ui29 = require("@elementor/ui");
|
|
867
|
+
var import_i18n18 = require("@wordpress/i18n");
|
|
805
868
|
|
|
806
869
|
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
807
|
-
var
|
|
870
|
+
var React27 = __toESM(require("react"));
|
|
808
871
|
var import_editor_controls14 = require("@elementor/editor-controls");
|
|
809
872
|
var import_icons6 = require("@elementor/icons");
|
|
810
|
-
var
|
|
811
|
-
var
|
|
873
|
+
var import_ui20 = require("@elementor/ui");
|
|
874
|
+
var import_i18n9 = require("@wordpress/i18n");
|
|
812
875
|
|
|
813
876
|
// src/hooks/use-direction.ts
|
|
814
|
-
var
|
|
877
|
+
var import_ui18 = require("@elementor/ui");
|
|
815
878
|
function useDirection() {
|
|
816
|
-
const theme = (0,
|
|
879
|
+
const theme = (0, import_ui18.useTheme)(), extendedWindow = window;
|
|
817
880
|
const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!extendedWindow.elementorFrontend?.config?.is_rtl;
|
|
818
881
|
return { isSiteRtl, isUiRtl };
|
|
819
882
|
}
|
|
820
883
|
|
|
821
884
|
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
822
|
-
var
|
|
823
|
-
var
|
|
824
|
-
var
|
|
885
|
+
var React26 = __toESM(require("react"));
|
|
886
|
+
var import_react8 = require("react");
|
|
887
|
+
var import_ui19 = require("@elementor/ui");
|
|
825
888
|
var CLOCKWISE_ANGLES = {
|
|
826
889
|
row: 0,
|
|
827
890
|
column: 90,
|
|
@@ -835,13 +898,13 @@ var COUNTER_CLOCKWISE_ANGLES = {
|
|
|
835
898
|
"column-reverse": -270
|
|
836
899
|
};
|
|
837
900
|
var RotatedIcon = ({ icon: Icon, size, isClockwise = true, offset = 0 }) => {
|
|
838
|
-
const rotate = (0,
|
|
901
|
+
const rotate = (0, import_react8.useRef)(useGetTargetAngle(isClockwise, offset));
|
|
839
902
|
rotate.current = useGetTargetAngle(isClockwise, offset, rotate);
|
|
840
|
-
return /* @__PURE__ */
|
|
903
|
+
return /* @__PURE__ */ React26.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
841
904
|
};
|
|
842
905
|
var useGetTargetAngle = (isClockwise, offset, existingRef) => {
|
|
843
906
|
const [direction] = useStylesField("flex-direction");
|
|
844
|
-
const isRtl = "rtl" === (0,
|
|
907
|
+
const isRtl = "rtl" === (0, import_ui19.useTheme)().direction;
|
|
845
908
|
const rotationMultiplier = isRtl ? -1 : 1;
|
|
846
909
|
const angleMap = isClockwise ? CLOCKWISE_ANGLES : COUNTER_CLOCKWISE_ANGLES;
|
|
847
910
|
const currentAngle = existingRef ? existingRef.current * rotationMultiplier : angleMap[direction?.value || "row"] + offset;
|
|
@@ -852,8 +915,8 @@ var useGetTargetAngle = (isClockwise, offset, existingRef) => {
|
|
|
852
915
|
};
|
|
853
916
|
|
|
854
917
|
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
855
|
-
var StartIcon = (0,
|
|
856
|
-
var EndIcon = (0,
|
|
918
|
+
var StartIcon = (0, import_ui20.withDirection)(import_icons6.LayoutAlignLeftIcon);
|
|
919
|
+
var EndIcon = (0, import_ui20.withDirection)(import_icons6.LayoutAlignRightIcon);
|
|
857
920
|
var iconProps = {
|
|
858
921
|
isClockwise: false,
|
|
859
922
|
offset: 90
|
|
@@ -861,42 +924,42 @@ var iconProps = {
|
|
|
861
924
|
var options = [
|
|
862
925
|
{
|
|
863
926
|
value: "start",
|
|
864
|
-
label: (0,
|
|
865
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
927
|
+
label: (0, import_i18n9.__)("Start", "elementor"),
|
|
928
|
+
renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(RotatedIcon, { icon: StartIcon, size, ...iconProps }),
|
|
866
929
|
showTooltip: true
|
|
867
930
|
},
|
|
868
931
|
{
|
|
869
932
|
value: "center",
|
|
870
|
-
label: (0,
|
|
871
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
933
|
+
label: (0, import_i18n9.__)("Center", "elementor"),
|
|
934
|
+
renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(RotatedIcon, { icon: import_icons6.LayoutAlignCenterIcon, size, ...iconProps }),
|
|
872
935
|
showTooltip: true
|
|
873
936
|
},
|
|
874
937
|
{
|
|
875
938
|
value: "end",
|
|
876
|
-
label: (0,
|
|
877
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
939
|
+
label: (0, import_i18n9.__)("End", "elementor"),
|
|
940
|
+
renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(RotatedIcon, { icon: EndIcon, size, ...iconProps }),
|
|
878
941
|
showTooltip: true
|
|
879
942
|
},
|
|
880
943
|
{
|
|
881
944
|
value: "stretch",
|
|
882
|
-
label: (0,
|
|
883
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
945
|
+
label: (0, import_i18n9.__)("Stretch", "elementor"),
|
|
946
|
+
renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(RotatedIcon, { icon: import_icons6.LayoutDistributeVerticalIcon, size, ...iconProps }),
|
|
884
947
|
showTooltip: true
|
|
885
948
|
}
|
|
886
949
|
];
|
|
887
950
|
var AlignItemsField = () => {
|
|
888
951
|
const { isSiteRtl } = useDirection();
|
|
889
|
-
return /* @__PURE__ */
|
|
952
|
+
return /* @__PURE__ */ React27.createElement(import_ui20.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React27.createElement(import_ui20.ThemeProvider, null, /* @__PURE__ */ React27.createElement(StylesField, { bind: "align-items" }, /* @__PURE__ */ React27.createElement(import_ui20.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React27.createElement(import_ui20.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React27.createElement(import_editor_controls14.ControlLabel, null, (0, import_i18n9.__)("Align items", "elementor"))), /* @__PURE__ */ React27.createElement(import_ui20.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React27.createElement(import_editor_controls14.ToggleControl, { options }))))));
|
|
890
953
|
};
|
|
891
954
|
|
|
892
955
|
// src/components/style-sections/layout-section/align-self-child-field.tsx
|
|
893
|
-
var
|
|
956
|
+
var React28 = __toESM(require("react"));
|
|
894
957
|
var import_editor_controls15 = require("@elementor/editor-controls");
|
|
895
958
|
var import_icons7 = require("@elementor/icons");
|
|
896
|
-
var
|
|
897
|
-
var
|
|
898
|
-
var StartIcon2 = (0,
|
|
899
|
-
var EndIcon2 = (0,
|
|
959
|
+
var import_ui21 = require("@elementor/ui");
|
|
960
|
+
var import_i18n10 = require("@wordpress/i18n");
|
|
961
|
+
var StartIcon2 = (0, import_ui21.withDirection)(import_icons7.LayoutAlignLeftIcon);
|
|
962
|
+
var EndIcon2 = (0, import_ui21.withDirection)(import_icons7.LayoutAlignRightIcon);
|
|
900
963
|
var iconProps2 = {
|
|
901
964
|
isClockwise: false,
|
|
902
965
|
offset: 90
|
|
@@ -904,105 +967,105 @@ var iconProps2 = {
|
|
|
904
967
|
var options2 = [
|
|
905
968
|
{
|
|
906
969
|
value: "start",
|
|
907
|
-
label: (0,
|
|
908
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
970
|
+
label: (0, import_i18n10.__)("Start", "elementor"),
|
|
971
|
+
renderContent: ({ size }) => /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: StartIcon2, size, ...iconProps2 }),
|
|
909
972
|
showTooltip: true
|
|
910
973
|
},
|
|
911
974
|
{
|
|
912
975
|
value: "center",
|
|
913
|
-
label: (0,
|
|
914
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
976
|
+
label: (0, import_i18n10.__)("Center", "elementor"),
|
|
977
|
+
renderContent: ({ size }) => /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: import_icons7.LayoutAlignCenterIcon, size, ...iconProps2 }),
|
|
915
978
|
showTooltip: true
|
|
916
979
|
},
|
|
917
980
|
{
|
|
918
981
|
value: "end",
|
|
919
|
-
label: (0,
|
|
920
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
982
|
+
label: (0, import_i18n10.__)("End", "elementor"),
|
|
983
|
+
renderContent: ({ size }) => /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: EndIcon2, size, ...iconProps2 }),
|
|
921
984
|
showTooltip: true
|
|
922
985
|
},
|
|
923
986
|
{
|
|
924
987
|
value: "stretch",
|
|
925
|
-
label: (0,
|
|
926
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
988
|
+
label: (0, import_i18n10.__)("Stretch", "elementor"),
|
|
989
|
+
renderContent: ({ size }) => /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: import_icons7.LayoutDistributeVerticalIcon, size, ...iconProps2 }),
|
|
927
990
|
showTooltip: true
|
|
928
991
|
}
|
|
929
992
|
];
|
|
930
993
|
var AlignSelfChild = () => {
|
|
931
994
|
const { isSiteRtl } = useDirection();
|
|
932
|
-
return /* @__PURE__ */
|
|
995
|
+
return /* @__PURE__ */ React28.createElement(import_ui21.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React28.createElement(import_ui21.ThemeProvider, null, /* @__PURE__ */ React28.createElement(StylesField, { bind: "align-self" }, /* @__PURE__ */ React28.createElement(import_ui21.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React28.createElement(import_ui21.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React28.createElement(import_editor_controls15.ControlLabel, null, (0, import_i18n10.__)("Align self", "elementor"))), /* @__PURE__ */ React28.createElement(import_ui21.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React28.createElement(import_editor_controls15.ToggleControl, { options: options2 }))))));
|
|
933
996
|
};
|
|
934
997
|
|
|
935
998
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
936
|
-
var
|
|
999
|
+
var React29 = __toESM(require("react"));
|
|
937
1000
|
var import_editor_controls16 = require("@elementor/editor-controls");
|
|
938
|
-
var
|
|
939
|
-
var
|
|
1001
|
+
var import_ui22 = require("@elementor/ui");
|
|
1002
|
+
var import_i18n11 = require("@wordpress/i18n");
|
|
940
1003
|
var DisplayField = () => {
|
|
941
1004
|
const options10 = [
|
|
942
1005
|
{
|
|
943
1006
|
value: "block",
|
|
944
|
-
renderContent: () => (0,
|
|
945
|
-
label: (0,
|
|
1007
|
+
renderContent: () => (0, import_i18n11.__)("Block", "elementor"),
|
|
1008
|
+
label: (0, import_i18n11.__)("Block", "elementor")
|
|
946
1009
|
},
|
|
947
1010
|
{
|
|
948
1011
|
value: "flex",
|
|
949
|
-
renderContent: () => (0,
|
|
950
|
-
label: (0,
|
|
1012
|
+
renderContent: () => (0, import_i18n11.__)("Flex", "elementor"),
|
|
1013
|
+
label: (0, import_i18n11.__)("Flex", "elementor")
|
|
951
1014
|
}
|
|
952
1015
|
];
|
|
953
|
-
return /* @__PURE__ */
|
|
1016
|
+
return /* @__PURE__ */ React29.createElement(StylesField, { bind: "display" }, /* @__PURE__ */ React29.createElement(import_ui22.Stack, { gap: 1 }, /* @__PURE__ */ React29.createElement(import_editor_controls16.ControlLabel, null, (0, import_i18n11.__)("Display", "elementor")), /* @__PURE__ */ React29.createElement(import_editor_controls16.ToggleControl, { options: options10, fullWidth: true })));
|
|
954
1017
|
};
|
|
955
1018
|
|
|
956
1019
|
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
957
|
-
var
|
|
1020
|
+
var React30 = __toESM(require("react"));
|
|
958
1021
|
var import_editor_controls17 = require("@elementor/editor-controls");
|
|
959
1022
|
var import_icons8 = require("@elementor/icons");
|
|
960
|
-
var
|
|
961
|
-
var
|
|
1023
|
+
var import_ui23 = require("@elementor/ui");
|
|
1024
|
+
var import_i18n12 = require("@wordpress/i18n");
|
|
962
1025
|
var options3 = [
|
|
963
1026
|
{
|
|
964
1027
|
value: "row",
|
|
965
|
-
label: (0,
|
|
1028
|
+
label: (0, import_i18n12.__)("Row", "elementor"),
|
|
966
1029
|
renderContent: ({ size }) => {
|
|
967
|
-
const StartIcon4 = (0,
|
|
968
|
-
return /* @__PURE__ */
|
|
1030
|
+
const StartIcon4 = (0, import_ui23.withDirection)(import_icons8.ArrowRightIcon);
|
|
1031
|
+
return /* @__PURE__ */ React30.createElement(StartIcon4, { fontSize: size });
|
|
969
1032
|
},
|
|
970
1033
|
showTooltip: true
|
|
971
1034
|
},
|
|
972
1035
|
{
|
|
973
1036
|
value: "column",
|
|
974
|
-
label: (0,
|
|
975
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1037
|
+
label: (0, import_i18n12.__)("Column", "elementor"),
|
|
1038
|
+
renderContent: ({ size }) => /* @__PURE__ */ React30.createElement(import_icons8.ArrowDownSmallIcon, { fontSize: size }),
|
|
976
1039
|
showTooltip: true
|
|
977
1040
|
},
|
|
978
1041
|
{
|
|
979
1042
|
value: "row-reverse",
|
|
980
|
-
label: (0,
|
|
1043
|
+
label: (0, import_i18n12.__)("Reversed row", "elementor"),
|
|
981
1044
|
renderContent: ({ size }) => {
|
|
982
|
-
const EndIcon4 = (0,
|
|
983
|
-
return /* @__PURE__ */
|
|
1045
|
+
const EndIcon4 = (0, import_ui23.withDirection)(import_icons8.ArrowLeftIcon);
|
|
1046
|
+
return /* @__PURE__ */ React30.createElement(EndIcon4, { fontSize: size });
|
|
984
1047
|
},
|
|
985
1048
|
showTooltip: true
|
|
986
1049
|
},
|
|
987
1050
|
{
|
|
988
1051
|
value: "column-reverse",
|
|
989
|
-
label: (0,
|
|
990
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1052
|
+
label: (0, import_i18n12.__)("Reversed column", "elementor"),
|
|
1053
|
+
renderContent: ({ size }) => /* @__PURE__ */ React30.createElement(import_icons8.ArrowUpSmallIcon, { fontSize: size }),
|
|
991
1054
|
showTooltip: true
|
|
992
1055
|
}
|
|
993
1056
|
];
|
|
994
1057
|
var FlexDirectionField = () => {
|
|
995
1058
|
const { isSiteRtl } = useDirection();
|
|
996
|
-
return /* @__PURE__ */
|
|
1059
|
+
return /* @__PURE__ */ React30.createElement(import_ui23.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React30.createElement(import_ui23.ThemeProvider, null, /* @__PURE__ */ React30.createElement(StylesField, { bind: "flex-direction" }, /* @__PURE__ */ React30.createElement(import_ui23.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React30.createElement(import_ui23.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React30.createElement(import_editor_controls17.ControlLabel, null, (0, import_i18n12.__)("Direction", "elementor"))), /* @__PURE__ */ React30.createElement(import_ui23.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React30.createElement(import_editor_controls17.ToggleControl, { options: options3 }))))));
|
|
997
1060
|
};
|
|
998
1061
|
|
|
999
1062
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
1000
|
-
var
|
|
1001
|
-
var
|
|
1063
|
+
var React31 = __toESM(require("react"));
|
|
1064
|
+
var import_react9 = require("react");
|
|
1002
1065
|
var import_editor_controls18 = require("@elementor/editor-controls");
|
|
1003
1066
|
var import_icons9 = require("@elementor/icons");
|
|
1004
|
-
var
|
|
1005
|
-
var
|
|
1067
|
+
var import_ui24 = require("@elementor/ui");
|
|
1068
|
+
var import_i18n13 = require("@wordpress/i18n");
|
|
1006
1069
|
var FIRST_DEFAULT_VALUE = -99999;
|
|
1007
1070
|
var LAST_DEFAULT_VALUE = 99999;
|
|
1008
1071
|
var FIRST = "first";
|
|
@@ -1015,26 +1078,26 @@ var orderValueMap = {
|
|
|
1015
1078
|
var items = [
|
|
1016
1079
|
{
|
|
1017
1080
|
value: FIRST,
|
|
1018
|
-
label: (0,
|
|
1019
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1081
|
+
label: (0, import_i18n13.__)("First", "elementor"),
|
|
1082
|
+
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(import_icons9.ArrowUpSmallIcon, { fontSize: size }),
|
|
1020
1083
|
showTooltip: true
|
|
1021
1084
|
},
|
|
1022
1085
|
{
|
|
1023
1086
|
value: LAST,
|
|
1024
|
-
label: (0,
|
|
1025
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1087
|
+
label: (0, import_i18n13.__)("Last", "elementor"),
|
|
1088
|
+
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(import_icons9.ArrowDownSmallIcon, { fontSize: size }),
|
|
1026
1089
|
showTooltip: true
|
|
1027
1090
|
},
|
|
1028
1091
|
{
|
|
1029
1092
|
value: CUSTOM,
|
|
1030
|
-
label: (0,
|
|
1031
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1093
|
+
label: (0, import_i18n13.__)("Custom", "elementor"),
|
|
1094
|
+
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(import_icons9.PencilIcon, { fontSize: size }),
|
|
1032
1095
|
showTooltip: true
|
|
1033
1096
|
}
|
|
1034
1097
|
];
|
|
1035
1098
|
var FlexOrderField = () => {
|
|
1036
1099
|
const { isSiteRtl } = useDirection(), [order, setOrder] = useStylesField("order");
|
|
1037
|
-
const [groupControlValue, setGroupControlValue] = (0,
|
|
1100
|
+
const [groupControlValue, setGroupControlValue] = (0, import_react9.useState)(getGroupControlValue(order?.value || null));
|
|
1038
1101
|
const handleToggleButtonChange = (group) => {
|
|
1039
1102
|
setGroupControlValue(group);
|
|
1040
1103
|
if (!group || group === CUSTOM) {
|
|
@@ -1043,7 +1106,7 @@ var FlexOrderField = () => {
|
|
|
1043
1106
|
}
|
|
1044
1107
|
setOrder({ $$type: "number", value: orderValueMap[group] });
|
|
1045
1108
|
};
|
|
1046
|
-
return /* @__PURE__ */
|
|
1109
|
+
return /* @__PURE__ */ React31.createElement(import_ui24.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React31.createElement(import_ui24.ThemeProvider, null, /* @__PURE__ */ React31.createElement(import_ui24.Stack, { gap: 2 }, /* @__PURE__ */ React31.createElement(import_ui24.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(import_ui24.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(import_editor_controls18.ControlLabel, null, (0, import_i18n13.__)("Order", "elementor"))), /* @__PURE__ */ React31.createElement(import_ui24.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React31.createElement(
|
|
1047
1110
|
import_editor_controls18.ControlToggleButtonGroup,
|
|
1048
1111
|
{
|
|
1049
1112
|
items,
|
|
@@ -1051,7 +1114,7 @@ var FlexOrderField = () => {
|
|
|
1051
1114
|
onChange: handleToggleButtonChange,
|
|
1052
1115
|
exclusive: true
|
|
1053
1116
|
}
|
|
1054
|
-
))), CUSTOM === groupControlValue && /* @__PURE__ */
|
|
1117
|
+
))), CUSTOM === groupControlValue && /* @__PURE__ */ React31.createElement(StylesField, { bind: "order" }, /* @__PURE__ */ React31.createElement(import_ui24.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(import_ui24.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(import_editor_controls18.ControlLabel, null, (0, import_i18n13.__)("Custom order", "elementor"))), /* @__PURE__ */ React31.createElement(import_ui24.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React31.createElement(
|
|
1055
1118
|
import_editor_controls18.NumberControl,
|
|
1056
1119
|
{
|
|
1057
1120
|
min: FIRST_DEFAULT_VALUE + 1,
|
|
@@ -1071,36 +1134,36 @@ var getGroupControlValue = (order) => {
|
|
|
1071
1134
|
};
|
|
1072
1135
|
|
|
1073
1136
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
1074
|
-
var
|
|
1137
|
+
var React32 = __toESM(require("react"));
|
|
1075
1138
|
var import_editor_controls19 = require("@elementor/editor-controls");
|
|
1076
1139
|
var import_icons10 = require("@elementor/icons");
|
|
1077
|
-
var
|
|
1078
|
-
var
|
|
1140
|
+
var import_ui25 = require("@elementor/ui");
|
|
1141
|
+
var import_i18n14 = require("@wordpress/i18n");
|
|
1079
1142
|
var DEFAULT = 1;
|
|
1080
1143
|
var items2 = [
|
|
1081
1144
|
{
|
|
1082
1145
|
value: "flex-grow",
|
|
1083
|
-
label: (0,
|
|
1084
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1146
|
+
label: (0, import_i18n14.__)("Grow", "elementor"),
|
|
1147
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(import_icons10.ExpandIcon, { fontSize: size }),
|
|
1085
1148
|
showTooltip: true
|
|
1086
1149
|
},
|
|
1087
1150
|
{
|
|
1088
1151
|
value: "flex-shrink",
|
|
1089
|
-
label: (0,
|
|
1090
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1152
|
+
label: (0, import_i18n14.__)("Shrink", "elementor"),
|
|
1153
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(import_icons10.ShrinkIcon, { fontSize: size }),
|
|
1091
1154
|
showTooltip: true
|
|
1092
1155
|
},
|
|
1093
1156
|
{
|
|
1094
1157
|
value: "custom",
|
|
1095
|
-
label: (0,
|
|
1096
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1158
|
+
label: (0, import_i18n14.__)("Custom", "elementor"),
|
|
1159
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(import_icons10.PencilIcon, { fontSize: size }),
|
|
1097
1160
|
showTooltip: true
|
|
1098
1161
|
}
|
|
1099
1162
|
];
|
|
1100
1163
|
var FlexSizeField = () => {
|
|
1101
1164
|
const { isSiteRtl } = useDirection(), [growField, setGrowField] = useStylesField("flex-grow"), [shrinkField, setShrinkField] = useStylesField("flex-shrink"), [basisField, setBasisField] = useStylesField("flex-basis");
|
|
1102
1165
|
const grow = growField?.value || null, shrink = shrinkField?.value || null, basis = basisField?.value || null;
|
|
1103
|
-
const currentGroup =
|
|
1166
|
+
const currentGroup = React32.useMemo(() => getActiveGroup({ grow, shrink, basis }), [grow, shrink, basis]), [activeGroup, setActiveGroup] = React32.useState(currentGroup);
|
|
1104
1167
|
const onChangeGroup = (group = null) => {
|
|
1105
1168
|
setActiveGroup(group);
|
|
1106
1169
|
setBasisField(null);
|
|
@@ -1117,7 +1180,7 @@ var FlexSizeField = () => {
|
|
|
1117
1180
|
setGrowField(null);
|
|
1118
1181
|
setShrinkField({ $$type: "number", value: DEFAULT });
|
|
1119
1182
|
};
|
|
1120
|
-
return /* @__PURE__ */
|
|
1183
|
+
return /* @__PURE__ */ React32.createElement(import_ui25.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React32.createElement(import_ui25.ThemeProvider, null, /* @__PURE__ */ React32.createElement(import_ui25.Stack, { gap: 2 }, /* @__PURE__ */ React32.createElement(import_ui25.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(import_ui25.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(import_editor_controls19.ControlLabel, null, (0, import_i18n14.__)("Size", "elementor"))), /* @__PURE__ */ React32.createElement(import_ui25.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React32.createElement(
|
|
1121
1184
|
import_editor_controls19.ControlToggleButtonGroup,
|
|
1122
1185
|
{
|
|
1123
1186
|
value: activeGroup,
|
|
@@ -1125,9 +1188,9 @@ var FlexSizeField = () => {
|
|
|
1125
1188
|
items: items2,
|
|
1126
1189
|
exclusive: true
|
|
1127
1190
|
}
|
|
1128
|
-
))), "custom" === activeGroup && /* @__PURE__ */
|
|
1191
|
+
))), "custom" === activeGroup && /* @__PURE__ */ React32.createElement(FlexCustomField, null))));
|
|
1129
1192
|
};
|
|
1130
|
-
var FlexCustomField = () => /* @__PURE__ */
|
|
1193
|
+
var FlexCustomField = () => /* @__PURE__ */ React32.createElement(React32.Fragment, null, /* @__PURE__ */ React32.createElement(StylesField, { bind: "flex-grow" }, /* @__PURE__ */ React32.createElement(import_ui25.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(import_ui25.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(import_editor_controls19.ControlLabel, null, (0, import_i18n14.__)("Grow", "elementor"))), /* @__PURE__ */ React32.createElement(import_ui25.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React32.createElement(import_editor_controls19.NumberControl, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React32.createElement(StylesField, { bind: "flex-shrink" }, /* @__PURE__ */ React32.createElement(import_ui25.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(import_ui25.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(import_editor_controls19.ControlLabel, null, (0, import_i18n14.__)("Shrink", "elementor"))), /* @__PURE__ */ React32.createElement(import_ui25.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React32.createElement(import_editor_controls19.NumberControl, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React32.createElement(StylesField, { bind: "flex-basis" }, /* @__PURE__ */ React32.createElement(import_ui25.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(import_ui25.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(import_editor_controls19.ControlLabel, null, (0, import_i18n14.__)("Basis", "elementor"))), /* @__PURE__ */ React32.createElement(import_ui25.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React32.createElement(import_editor_controls19.SizeControl, null)))));
|
|
1131
1194
|
var getActiveGroup = ({
|
|
1132
1195
|
grow,
|
|
1133
1196
|
shrink,
|
|
@@ -1148,14 +1211,23 @@ var getActiveGroup = ({
|
|
|
1148
1211
|
return "custom";
|
|
1149
1212
|
};
|
|
1150
1213
|
|
|
1151
|
-
// src/components/style-sections/layout-section/
|
|
1152
|
-
var
|
|
1214
|
+
// src/components/style-sections/layout-section/gap-control-field.tsx
|
|
1215
|
+
var React33 = __toESM(require("react"));
|
|
1153
1216
|
var import_editor_controls20 = require("@elementor/editor-controls");
|
|
1217
|
+
var import_ui26 = require("@elementor/ui");
|
|
1218
|
+
var import_i18n15 = require("@wordpress/i18n");
|
|
1219
|
+
var GapControlField = () => {
|
|
1220
|
+
return /* @__PURE__ */ React33.createElement(import_ui26.Stack, { gap: 1 }, /* @__PURE__ */ React33.createElement(StylesField, { bind: "gap" }, /* @__PURE__ */ React33.createElement(import_editor_controls20.GapControl, { label: (0, import_i18n15.__)("Gaps", "elementor") })));
|
|
1221
|
+
};
|
|
1222
|
+
|
|
1223
|
+
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
1224
|
+
var React34 = __toESM(require("react"));
|
|
1225
|
+
var import_editor_controls21 = require("@elementor/editor-controls");
|
|
1154
1226
|
var import_icons11 = require("@elementor/icons");
|
|
1155
|
-
var
|
|
1156
|
-
var
|
|
1157
|
-
var StartIcon3 = (0,
|
|
1158
|
-
var EndIcon3 = (0,
|
|
1227
|
+
var import_ui27 = require("@elementor/ui");
|
|
1228
|
+
var import_i18n16 = require("@wordpress/i18n");
|
|
1229
|
+
var StartIcon3 = (0, import_ui27.withDirection)(import_icons11.JustifyTopIcon);
|
|
1230
|
+
var EndIcon3 = (0, import_ui27.withDirection)(import_icons11.JustifyBottomIcon);
|
|
1159
1231
|
var iconProps3 = {
|
|
1160
1232
|
isClockwise: true,
|
|
1161
1233
|
offset: -90
|
|
@@ -1163,111 +1235,111 @@ var iconProps3 = {
|
|
|
1163
1235
|
var options4 = [
|
|
1164
1236
|
{
|
|
1165
1237
|
value: "start",
|
|
1166
|
-
label: (0,
|
|
1167
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1238
|
+
label: (0, import_i18n16.__)("Start", "elementor"),
|
|
1239
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: StartIcon3, size, ...iconProps3 }),
|
|
1168
1240
|
showTooltip: true
|
|
1169
1241
|
},
|
|
1170
1242
|
{
|
|
1171
1243
|
value: "center",
|
|
1172
|
-
label: (0,
|
|
1173
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1244
|
+
label: (0, import_i18n16.__)("Center", "elementor"),
|
|
1245
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: import_icons11.JustifyCenterIcon, size, ...iconProps3 }),
|
|
1174
1246
|
showTooltip: true
|
|
1175
1247
|
},
|
|
1176
1248
|
{
|
|
1177
1249
|
value: "end",
|
|
1178
|
-
label: (0,
|
|
1179
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1250
|
+
label: (0, import_i18n16.__)("End", "elementor"),
|
|
1251
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: EndIcon3, size, ...iconProps3 }),
|
|
1180
1252
|
showTooltip: true
|
|
1181
1253
|
},
|
|
1182
1254
|
{
|
|
1183
1255
|
value: "space-between",
|
|
1184
|
-
label: (0,
|
|
1185
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1256
|
+
label: (0, import_i18n16.__)("Space between", "elementor"),
|
|
1257
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: import_icons11.JustifySpaceBetweenVerticalIcon, size, ...iconProps3 }),
|
|
1186
1258
|
showTooltip: true
|
|
1187
1259
|
},
|
|
1188
1260
|
{
|
|
1189
1261
|
value: "space-around",
|
|
1190
|
-
label: (0,
|
|
1191
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1262
|
+
label: (0, import_i18n16.__)("Space around", "elementor"),
|
|
1263
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: import_icons11.JustifySpaceAroundVerticalIcon, size, ...iconProps3 }),
|
|
1192
1264
|
showTooltip: true
|
|
1193
1265
|
},
|
|
1194
1266
|
{
|
|
1195
1267
|
value: "space-evenly",
|
|
1196
|
-
label: (0,
|
|
1197
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1268
|
+
label: (0, import_i18n16.__)("Space evenly", "elementor"),
|
|
1269
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: import_icons11.JustifyDistributeVerticalIcon, size, ...iconProps3 }),
|
|
1198
1270
|
showTooltip: true
|
|
1199
1271
|
}
|
|
1200
1272
|
];
|
|
1201
1273
|
var JustifyContentField = () => {
|
|
1202
1274
|
const { isSiteRtl } = useDirection();
|
|
1203
|
-
return /* @__PURE__ */
|
|
1275
|
+
return /* @__PURE__ */ React34.createElement(import_ui27.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React34.createElement(import_ui27.ThemeProvider, null, /* @__PURE__ */ React34.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React34.createElement(import_ui27.Stack, { gap: 1 }, /* @__PURE__ */ React34.createElement(import_editor_controls21.ControlLabel, null, (0, import_i18n16.__)("Justify content", "elementor")), /* @__PURE__ */ React34.createElement(import_editor_controls21.ToggleControl, { options: options4, fullWidth: true })))));
|
|
1204
1276
|
};
|
|
1205
1277
|
|
|
1206
1278
|
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
1207
|
-
var
|
|
1208
|
-
var
|
|
1279
|
+
var React35 = __toESM(require("react"));
|
|
1280
|
+
var import_editor_controls22 = require("@elementor/editor-controls");
|
|
1209
1281
|
var import_icons12 = require("@elementor/icons");
|
|
1210
|
-
var
|
|
1211
|
-
var
|
|
1282
|
+
var import_ui28 = require("@elementor/ui");
|
|
1283
|
+
var import_i18n17 = require("@wordpress/i18n");
|
|
1212
1284
|
var options5 = [
|
|
1213
1285
|
{
|
|
1214
1286
|
value: "nowrap",
|
|
1215
|
-
label: (0,
|
|
1216
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1287
|
+
label: (0, import_i18n17.__)("No wrap", "elementor"),
|
|
1288
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(import_icons12.ArrowRightIcon, { fontSize: size }),
|
|
1217
1289
|
showTooltip: true
|
|
1218
1290
|
},
|
|
1219
1291
|
{
|
|
1220
1292
|
value: "wrap",
|
|
1221
|
-
label: (0,
|
|
1222
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1293
|
+
label: (0, import_i18n17.__)("Wrap", "elementor"),
|
|
1294
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(import_icons12.ArrowBackIcon, { fontSize: size }),
|
|
1223
1295
|
showTooltip: true
|
|
1224
1296
|
},
|
|
1225
1297
|
{
|
|
1226
1298
|
value: "wrap-reverse",
|
|
1227
|
-
label: (0,
|
|
1228
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1299
|
+
label: (0, import_i18n17.__)("Reversed wrap", "elementor"),
|
|
1300
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(import_icons12.ArrowForwardIcon, { fontSize: size }),
|
|
1229
1301
|
showTooltip: true
|
|
1230
1302
|
}
|
|
1231
1303
|
];
|
|
1232
1304
|
var WrapField = () => {
|
|
1233
1305
|
const { isSiteRtl } = useDirection();
|
|
1234
|
-
return /* @__PURE__ */
|
|
1306
|
+
return /* @__PURE__ */ React35.createElement(import_ui28.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React35.createElement(import_ui28.ThemeProvider, null, /* @__PURE__ */ React35.createElement(StylesField, { bind: "flex-wrap" }, /* @__PURE__ */ React35.createElement(import_ui28.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React35.createElement(import_ui28.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React35.createElement(import_editor_controls22.ControlLabel, null, (0, import_i18n17.__)("Wrap", "elementor"))), /* @__PURE__ */ React35.createElement(import_ui28.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React35.createElement(import_editor_controls22.ToggleControl, { options: options5 }))))));
|
|
1235
1307
|
};
|
|
1236
1308
|
|
|
1237
1309
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
1238
1310
|
var LayoutSection = () => {
|
|
1239
1311
|
const [display] = useStylesField("display");
|
|
1240
|
-
return /* @__PURE__ */
|
|
1312
|
+
return /* @__PURE__ */ React36.createElement(import_ui29.Stack, { gap: 2 }, /* @__PURE__ */ React36.createElement(DisplayField, null), "flex" === display?.value && /* @__PURE__ */ React36.createElement(FlexFields, null));
|
|
1241
1313
|
};
|
|
1242
|
-
var FlexFields = () => /* @__PURE__ */
|
|
1314
|
+
var FlexFields = () => /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(FlexDirectionField, null), /* @__PURE__ */ React36.createElement(JustifyContentField, null), /* @__PURE__ */ React36.createElement(AlignItemsField, null), /* @__PURE__ */ React36.createElement(import_ui29.Divider, null), /* @__PURE__ */ React36.createElement(GapControlField, null), /* @__PURE__ */ React36.createElement(WrapField, null), /* @__PURE__ */ React36.createElement(import_ui29.Divider, null), /* @__PURE__ */ React36.createElement(import_editor_controls23.ControlLabel, null, (0, import_i18n18.__)("Flex child", "elementor")), /* @__PURE__ */ React36.createElement(AlignSelfChild, null), /* @__PURE__ */ React36.createElement(FlexOrderField, null), /* @__PURE__ */ React36.createElement(FlexSizeField, null));
|
|
1243
1315
|
|
|
1244
1316
|
// src/components/style-sections/position-section/position-section.tsx
|
|
1245
|
-
var
|
|
1246
|
-
var
|
|
1247
|
-
var
|
|
1317
|
+
var React40 = __toESM(require("react"));
|
|
1318
|
+
var import_react12 = require("react");
|
|
1319
|
+
var import_ui33 = require("@elementor/ui");
|
|
1248
1320
|
|
|
1249
1321
|
// src/hooks/use-style-prop-history.ts
|
|
1250
|
-
var
|
|
1322
|
+
var import_react11 = require("react");
|
|
1251
1323
|
var import_editor_elements4 = require("@elementor/editor-elements");
|
|
1252
1324
|
|
|
1253
1325
|
// src/hooks/use-prop-value-history.ts
|
|
1254
|
-
var
|
|
1326
|
+
var import_react10 = require("react");
|
|
1255
1327
|
var import_utils2 = require("@elementor/utils");
|
|
1256
1328
|
var PROPS_VALUES_HISTORY_PREFIX = "elementor/editor-editing-panel/prop-value-history";
|
|
1257
1329
|
var usePropValueHistory = () => {
|
|
1258
1330
|
const { element } = useElement();
|
|
1259
1331
|
const elementKey = `${PROPS_VALUES_HISTORY_PREFIX}/${element.id}`;
|
|
1260
|
-
const getElementPropsHistory = (0,
|
|
1332
|
+
const getElementPropsHistory = (0, import_react10.useCallback)(() => {
|
|
1261
1333
|
return (0, import_utils2.getSessionStorageItem)(elementKey);
|
|
1262
1334
|
}, [elementKey]);
|
|
1263
|
-
const getPropValue = (0,
|
|
1335
|
+
const getPropValue = (0, import_react10.useCallback)(
|
|
1264
1336
|
(propKey) => {
|
|
1265
1337
|
const elementPropValues = getElementPropsHistory();
|
|
1266
1338
|
return elementPropValues?.[propKey] ?? null;
|
|
1267
1339
|
},
|
|
1268
1340
|
[getElementPropsHistory]
|
|
1269
1341
|
);
|
|
1270
|
-
const setPropValue = (0,
|
|
1342
|
+
const setPropValue = (0, import_react10.useCallback)(
|
|
1271
1343
|
(propKey, propValue) => {
|
|
1272
1344
|
const elementPropValues = getElementPropsHistory();
|
|
1273
1345
|
const updatedElementPropValues = { ...elementPropValues, [propKey]: propValue };
|
|
@@ -1275,7 +1347,7 @@ var usePropValueHistory = () => {
|
|
|
1275
1347
|
},
|
|
1276
1348
|
[getElementPropsHistory, elementKey]
|
|
1277
1349
|
);
|
|
1278
|
-
const removeProp = (0,
|
|
1350
|
+
const removeProp = (0, import_react10.useCallback)(
|
|
1279
1351
|
(propKey) => {
|
|
1280
1352
|
const elementPropValues = getElementPropsHistory();
|
|
1281
1353
|
const updatedElementPropValues = Object.fromEntries(
|
|
@@ -1285,7 +1357,7 @@ var usePropValueHistory = () => {
|
|
|
1285
1357
|
},
|
|
1286
1358
|
[getElementPropsHistory, elementKey]
|
|
1287
1359
|
);
|
|
1288
|
-
return (0,
|
|
1360
|
+
return (0, import_react10.useMemo)(() => ({ getPropValue, setPropValue, removeProp }), [getPropValue, removeProp, setPropValue]);
|
|
1289
1361
|
};
|
|
1290
1362
|
|
|
1291
1363
|
// src/hooks/use-style-prop-history.ts
|
|
@@ -1293,10 +1365,10 @@ var useStylePropsHistory = (props) => {
|
|
|
1293
1365
|
const { element } = useElement();
|
|
1294
1366
|
const { id: styleDefID, meta } = useStyle();
|
|
1295
1367
|
const { getPropValue, setPropValue, removeProp } = usePropValueHistory();
|
|
1296
|
-
const styleDef = (0, import_editor_elements4.getElementStyles)(element.id)?.[styleDefID];
|
|
1368
|
+
const styleDef = styleDefID ? (0, import_editor_elements4.getElementStyles)(element.id)?.[styleDefID] : null;
|
|
1297
1369
|
const styleVariant = styleDef ? (0, import_editor_elements4.getVariantByMeta)(styleDef, meta) : null;
|
|
1298
1370
|
const styleVariantPath = `${styleDefID}-${styleVariant?.meta.breakpoint}-${styleVariant?.meta.state}`;
|
|
1299
|
-
const saveStylePropsHistory = (0,
|
|
1371
|
+
const saveStylePropsHistory = (0, import_react11.useCallback)(() => {
|
|
1300
1372
|
props.forEach((propKey) => {
|
|
1301
1373
|
const propValue = styleVariant?.props[propKey];
|
|
1302
1374
|
if (propValue) {
|
|
@@ -1305,7 +1377,7 @@ var useStylePropsHistory = (props) => {
|
|
|
1305
1377
|
}
|
|
1306
1378
|
});
|
|
1307
1379
|
}, [props, setPropValue, styleVariant?.props, styleVariantPath]);
|
|
1308
|
-
const updateStylePropsFromHistory = (0,
|
|
1380
|
+
const updateStylePropsFromHistory = (0, import_react11.useCallback)(() => {
|
|
1309
1381
|
const propValuesFromHistory = props.reduce((allProps, currentPropKey) => {
|
|
1310
1382
|
const propPath = `${styleVariantPath}-${currentPropKey}`;
|
|
1311
1383
|
const propHistory = getPropValue(propPath);
|
|
@@ -1325,7 +1397,7 @@ var useStylePropsHistory = (props) => {
|
|
|
1325
1397
|
});
|
|
1326
1398
|
}
|
|
1327
1399
|
}, [element.id, getPropValue, meta, props, removeProp, styleDefID, styleVariantPath]);
|
|
1328
|
-
const clearCurrentStyleProps = (0,
|
|
1400
|
+
const clearCurrentStyleProps = (0, import_react11.useCallback)(() => {
|
|
1329
1401
|
const resetValues = props.reduce(
|
|
1330
1402
|
(allProps, currentPropKey) => ({
|
|
1331
1403
|
...allProps,
|
|
@@ -1341,53 +1413,53 @@ var useStylePropsHistory = (props) => {
|
|
|
1341
1413
|
bind: "classes"
|
|
1342
1414
|
});
|
|
1343
1415
|
}, [element.id, meta, props, styleDefID]);
|
|
1344
|
-
return (0,
|
|
1416
|
+
return (0, import_react11.useMemo)(
|
|
1345
1417
|
() => ({ saveStylePropsHistory, updateStylePropsFromHistory, clearCurrentStyleProps }),
|
|
1346
1418
|
[saveStylePropsHistory, updateStylePropsFromHistory, clearCurrentStyleProps]
|
|
1347
1419
|
);
|
|
1348
1420
|
};
|
|
1349
1421
|
|
|
1350
1422
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
1351
|
-
var
|
|
1352
|
-
var
|
|
1423
|
+
var React37 = __toESM(require("react"));
|
|
1424
|
+
var import_editor_controls24 = require("@elementor/editor-controls");
|
|
1353
1425
|
var import_icons13 = require("@elementor/icons");
|
|
1354
|
-
var
|
|
1355
|
-
var
|
|
1426
|
+
var import_ui30 = require("@elementor/ui");
|
|
1427
|
+
var import_i18n19 = require("@wordpress/i18n");
|
|
1356
1428
|
var sideIcons = {
|
|
1357
|
-
left: /* @__PURE__ */
|
|
1358
|
-
right: /* @__PURE__ */
|
|
1359
|
-
top: /* @__PURE__ */
|
|
1360
|
-
bottom: /* @__PURE__ */
|
|
1429
|
+
left: /* @__PURE__ */ React37.createElement(import_icons13.SideLeftIcon, { fontSize: "tiny" }),
|
|
1430
|
+
right: /* @__PURE__ */ React37.createElement(import_icons13.SideRightIcon, { fontSize: "tiny" }),
|
|
1431
|
+
top: /* @__PURE__ */ React37.createElement(import_icons13.SideTopIcon, { fontSize: "tiny" }),
|
|
1432
|
+
bottom: /* @__PURE__ */ React37.createElement(import_icons13.SideBottomIcon, { fontSize: "tiny" })
|
|
1361
1433
|
};
|
|
1362
1434
|
var DimensionsField = () => {
|
|
1363
|
-
return /* @__PURE__ */
|
|
1435
|
+
return /* @__PURE__ */ React37.createElement(React37.Fragment, null, /* @__PURE__ */ React37.createElement(import_ui30.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(DimensionField, { side: "top", label: (0, import_i18n19.__)("Top", "elementor") }), /* @__PURE__ */ React37.createElement(DimensionField, { side: "right", label: (0, import_i18n19.__)("Right", "elementor") })), /* @__PURE__ */ React37.createElement(import_ui30.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(DimensionField, { side: "bottom", label: (0, import_i18n19.__)("Bottom", "elementor") }), /* @__PURE__ */ React37.createElement(DimensionField, { side: "left", label: (0, import_i18n19.__)("Left", "elementor") })));
|
|
1364
1436
|
};
|
|
1365
1437
|
var DimensionField = ({ side, label }) => {
|
|
1366
|
-
return /* @__PURE__ */
|
|
1438
|
+
return /* @__PURE__ */ React37.createElement(import_ui30.Grid, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React37.createElement(import_ui30.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React37.createElement(import_editor_controls24.ControlLabel, null, label)), /* @__PURE__ */ React37.createElement(import_ui30.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React37.createElement(StylesField, { bind: side }, /* @__PURE__ */ React37.createElement(import_editor_controls24.SizeControl, { startIcon: sideIcons[side] }))));
|
|
1367
1439
|
};
|
|
1368
1440
|
|
|
1369
1441
|
// src/components/style-sections/position-section/position-field.tsx
|
|
1370
|
-
var
|
|
1371
|
-
var
|
|
1372
|
-
var
|
|
1373
|
-
var
|
|
1442
|
+
var React38 = __toESM(require("react"));
|
|
1443
|
+
var import_editor_controls25 = require("@elementor/editor-controls");
|
|
1444
|
+
var import_ui31 = require("@elementor/ui");
|
|
1445
|
+
var import_i18n20 = require("@wordpress/i18n");
|
|
1374
1446
|
var positionOptions = [
|
|
1375
|
-
{ label: (0,
|
|
1376
|
-
{ label: (0,
|
|
1377
|
-
{ label: (0,
|
|
1378
|
-
{ label: (0,
|
|
1447
|
+
{ label: (0, import_i18n20.__)("Static", "elementor"), value: "static" },
|
|
1448
|
+
{ label: (0, import_i18n20.__)("Relative", "elementor"), value: "relative" },
|
|
1449
|
+
{ label: (0, import_i18n20.__)("Absolute", "elementor"), value: "absolute" },
|
|
1450
|
+
{ label: (0, import_i18n20.__)("Fixed", "elementor"), value: "fixed" }
|
|
1379
1451
|
];
|
|
1380
1452
|
var PositionField = () => {
|
|
1381
|
-
return /* @__PURE__ */
|
|
1453
|
+
return /* @__PURE__ */ React38.createElement(StylesField, { bind: "position" }, /* @__PURE__ */ React38.createElement(import_ui31.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React38.createElement(import_ui31.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(import_editor_controls25.ControlLabel, null, (0, import_i18n20.__)("Position", "elementor"))), /* @__PURE__ */ React38.createElement(import_ui31.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(import_editor_controls25.SelectControl, { options: positionOptions }))));
|
|
1382
1454
|
};
|
|
1383
1455
|
|
|
1384
1456
|
// src/components/style-sections/position-section/z-index-field.tsx
|
|
1385
|
-
var
|
|
1386
|
-
var
|
|
1387
|
-
var
|
|
1388
|
-
var
|
|
1457
|
+
var React39 = __toESM(require("react"));
|
|
1458
|
+
var import_editor_controls26 = require("@elementor/editor-controls");
|
|
1459
|
+
var import_ui32 = require("@elementor/ui");
|
|
1460
|
+
var import_i18n21 = require("@wordpress/i18n");
|
|
1389
1461
|
var ZIndexField = () => {
|
|
1390
|
-
return /* @__PURE__ */
|
|
1462
|
+
return /* @__PURE__ */ React39.createElement(StylesField, { bind: "z-index" }, /* @__PURE__ */ React39.createElement(import_ui32.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React39.createElement(import_ui32.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React39.createElement(import_editor_controls26.ControlLabel, null, (0, import_i18n21.__)("Z-Index", "elementor"))), /* @__PURE__ */ React39.createElement(import_ui32.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React39.createElement(import_editor_controls26.NumberControl, null))));
|
|
1391
1463
|
};
|
|
1392
1464
|
|
|
1393
1465
|
// src/components/style-sections/position-section/position-section.tsx
|
|
@@ -1396,11 +1468,11 @@ var PositionSection = () => {
|
|
|
1396
1468
|
const [positionValue] = useStylesField("position");
|
|
1397
1469
|
usePositionChangeHandler();
|
|
1398
1470
|
const isNotStatic = positionValue && positionValue?.value !== "static";
|
|
1399
|
-
return /* @__PURE__ */
|
|
1471
|
+
return /* @__PURE__ */ React40.createElement(import_ui33.Stack, { gap: 1.5 }, /* @__PURE__ */ React40.createElement(PositionField, null), isNotStatic ? /* @__PURE__ */ React40.createElement(React40.Fragment, null, /* @__PURE__ */ React40.createElement(DimensionsField, null), /* @__PURE__ */ React40.createElement(ZIndexField, null)) : null);
|
|
1400
1472
|
};
|
|
1401
1473
|
var usePositionChangeHandler = () => {
|
|
1402
1474
|
const dimensionsHistory = useStylePropsHistory(dimensionsPropKeys);
|
|
1403
|
-
const onPositionChange = (0,
|
|
1475
|
+
const onPositionChange = (0, import_react12.useCallback)(
|
|
1404
1476
|
(newPositionValue, previousPosition) => {
|
|
1405
1477
|
if (!dimensionsHistory) {
|
|
1406
1478
|
return;
|
|
@@ -1421,91 +1493,91 @@ var usePositionChangeHandler = () => {
|
|
|
1421
1493
|
};
|
|
1422
1494
|
|
|
1423
1495
|
// src/components/style-sections/size-section/size-section.tsx
|
|
1424
|
-
var
|
|
1425
|
-
var
|
|
1426
|
-
var
|
|
1427
|
-
var
|
|
1496
|
+
var React42 = __toESM(require("react"));
|
|
1497
|
+
var import_editor_controls28 = require("@elementor/editor-controls");
|
|
1498
|
+
var import_ui35 = require("@elementor/ui");
|
|
1499
|
+
var import_i18n23 = require("@wordpress/i18n");
|
|
1428
1500
|
|
|
1429
1501
|
// src/components/style-sections/size-section/overflow-field.tsx
|
|
1430
|
-
var
|
|
1431
|
-
var
|
|
1502
|
+
var React41 = __toESM(require("react"));
|
|
1503
|
+
var import_editor_controls27 = require("@elementor/editor-controls");
|
|
1432
1504
|
var import_icons14 = require("@elementor/icons");
|
|
1433
|
-
var
|
|
1434
|
-
var
|
|
1505
|
+
var import_ui34 = require("@elementor/ui");
|
|
1506
|
+
var import_i18n22 = require("@wordpress/i18n");
|
|
1435
1507
|
var options6 = [
|
|
1436
1508
|
{
|
|
1437
1509
|
value: "visible",
|
|
1438
|
-
label: (0,
|
|
1439
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1510
|
+
label: (0, import_i18n22.__)("Visible", "elementor"),
|
|
1511
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(import_icons14.EyeIcon, { fontSize: size }),
|
|
1440
1512
|
showTooltip: true
|
|
1441
1513
|
},
|
|
1442
1514
|
{
|
|
1443
1515
|
value: "hidden",
|
|
1444
|
-
label: (0,
|
|
1445
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1516
|
+
label: (0, import_i18n22.__)("Hidden", "elementor"),
|
|
1517
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(import_icons14.EyeOffIcon, { fontSize: size }),
|
|
1446
1518
|
showTooltip: true
|
|
1447
1519
|
},
|
|
1448
1520
|
{
|
|
1449
1521
|
value: "auto",
|
|
1450
|
-
label: (0,
|
|
1451
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1522
|
+
label: (0, import_i18n22.__)("Auto", "elementor"),
|
|
1523
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(import_icons14.ExpandBottomIcon, { fontSize: size }),
|
|
1452
1524
|
showTooltip: true
|
|
1453
1525
|
}
|
|
1454
1526
|
];
|
|
1455
1527
|
var OverflowField = () => {
|
|
1456
|
-
return /* @__PURE__ */
|
|
1528
|
+
return /* @__PURE__ */ React41.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React41.createElement(import_ui34.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(import_ui34.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(import_editor_controls27.ControlLabel, null, (0, import_i18n22.__)("Overflow", "elementor"))), /* @__PURE__ */ React41.createElement(import_ui34.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React41.createElement(import_editor_controls27.ToggleControl, { options: options6 }))));
|
|
1457
1529
|
};
|
|
1458
1530
|
|
|
1459
1531
|
// src/components/style-sections/size-section/size-section.tsx
|
|
1460
1532
|
var SizeSection = () => {
|
|
1461
|
-
return /* @__PURE__ */
|
|
1533
|
+
return /* @__PURE__ */ React42.createElement(import_ui35.Stack, { gap: 1.5 }, /* @__PURE__ */ React42.createElement(import_ui35.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React42.createElement(import_ui35.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(SizeField, { bind: "width", label: (0, import_i18n23.__)("Width", "elementor") })), /* @__PURE__ */ React42.createElement(import_ui35.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(SizeField, { bind: "height", label: (0, import_i18n23.__)("Height", "elementor") }))), /* @__PURE__ */ React42.createElement(import_ui35.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React42.createElement(import_ui35.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(SizeField, { bind: "min-width", label: (0, import_i18n23.__)("Min. Width", "elementor") })), /* @__PURE__ */ React42.createElement(import_ui35.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(SizeField, { bind: "min-height", label: (0, import_i18n23.__)("Min. Height", "elementor") }))), /* @__PURE__ */ React42.createElement(import_ui35.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React42.createElement(import_ui35.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(SizeField, { bind: "max-width", label: (0, import_i18n23.__)("Max. Width", "elementor") })), /* @__PURE__ */ React42.createElement(import_ui35.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(SizeField, { bind: "max-height", label: (0, import_i18n23.__)("Max. Height", "elementor") }))), /* @__PURE__ */ React42.createElement(import_ui35.Divider, null), /* @__PURE__ */ React42.createElement(import_ui35.Stack, null, /* @__PURE__ */ React42.createElement(OverflowField, null)));
|
|
1462
1534
|
};
|
|
1463
1535
|
var SizeField = ({ label, bind }) => {
|
|
1464
|
-
return /* @__PURE__ */
|
|
1536
|
+
return /* @__PURE__ */ React42.createElement(StylesField, { bind }, /* @__PURE__ */ React42.createElement(import_ui35.Grid, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React42.createElement(import_ui35.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React42.createElement(import_editor_controls28.ControlLabel, null, label)), /* @__PURE__ */ React42.createElement(import_ui35.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React42.createElement(import_editor_controls28.SizeControl, null))));
|
|
1465
1537
|
};
|
|
1466
1538
|
|
|
1467
1539
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
1468
|
-
var
|
|
1469
|
-
var
|
|
1470
|
-
var
|
|
1471
|
-
var
|
|
1540
|
+
var React43 = __toESM(require("react"));
|
|
1541
|
+
var import_editor_controls29 = require("@elementor/editor-controls");
|
|
1542
|
+
var import_ui36 = require("@elementor/ui");
|
|
1543
|
+
var import_i18n24 = require("@wordpress/i18n");
|
|
1472
1544
|
var SpacingSection = () => {
|
|
1473
|
-
return /* @__PURE__ */
|
|
1545
|
+
return /* @__PURE__ */ React43.createElement(import_ui36.Stack, { gap: 1.5 }, /* @__PURE__ */ React43.createElement(StylesField, { bind: "padding" }, /* @__PURE__ */ React43.createElement(import_editor_controls29.LinkedDimensionsControl, { label: (0, import_i18n24.__)("Padding", "elementor") })), /* @__PURE__ */ React43.createElement(import_ui36.Divider, null), /* @__PURE__ */ React43.createElement(StylesField, { bind: "margin" }, /* @__PURE__ */ React43.createElement(import_editor_controls29.LinkedDimensionsControl, { label: (0, import_i18n24.__)("Margin", "elementor") })));
|
|
1474
1546
|
};
|
|
1475
1547
|
|
|
1476
1548
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
1477
|
-
var
|
|
1478
|
-
var
|
|
1549
|
+
var React57 = __toESM(require("react"));
|
|
1550
|
+
var import_ui49 = require("@elementor/ui");
|
|
1479
1551
|
|
|
1480
1552
|
// src/components/collapsible-content.tsx
|
|
1481
|
-
var
|
|
1482
|
-
var
|
|
1483
|
-
var
|
|
1484
|
-
var
|
|
1553
|
+
var React44 = __toESM(require("react"));
|
|
1554
|
+
var import_react13 = require("react");
|
|
1555
|
+
var import_ui37 = require("@elementor/ui");
|
|
1556
|
+
var import_i18n25 = require("@wordpress/i18n");
|
|
1485
1557
|
var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
1486
|
-
const [open, setOpen] = (0,
|
|
1558
|
+
const [open, setOpen] = (0, import_react13.useState)(defaultOpen);
|
|
1487
1559
|
const handleToggle = () => {
|
|
1488
1560
|
setOpen((prevOpen) => !prevOpen);
|
|
1489
1561
|
};
|
|
1490
|
-
return /* @__PURE__ */
|
|
1491
|
-
|
|
1562
|
+
return /* @__PURE__ */ React44.createElement(import_ui37.Stack, { sx: { py: 0.5 } }, /* @__PURE__ */ React44.createElement(
|
|
1563
|
+
import_ui37.Button,
|
|
1492
1564
|
{
|
|
1493
1565
|
fullWidth: true,
|
|
1494
1566
|
size: "small",
|
|
1495
1567
|
color: "secondary",
|
|
1496
1568
|
variant: "outlined",
|
|
1497
1569
|
onClick: handleToggle,
|
|
1498
|
-
endIcon: /* @__PURE__ */
|
|
1570
|
+
endIcon: /* @__PURE__ */ React44.createElement(CollapseIcon, { open })
|
|
1499
1571
|
},
|
|
1500
|
-
open ? (0,
|
|
1501
|
-
), /* @__PURE__ */
|
|
1572
|
+
open ? (0, import_i18n25.__)("Show less", "elementor") : (0, import_i18n25.__)("Show more", "elementor")
|
|
1573
|
+
), /* @__PURE__ */ React44.createElement(import_ui37.Collapse, { in: open, timeout: "auto", unmountOnExit: true }, children));
|
|
1502
1574
|
};
|
|
1503
1575
|
|
|
1504
1576
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
1505
|
-
var
|
|
1506
|
-
var
|
|
1507
|
-
var
|
|
1508
|
-
var
|
|
1577
|
+
var React45 = __toESM(require("react"));
|
|
1578
|
+
var import_editor_controls30 = require("@elementor/editor-controls");
|
|
1579
|
+
var import_ui38 = require("@elementor/ui");
|
|
1580
|
+
var import_i18n26 = require("@wordpress/i18n");
|
|
1509
1581
|
|
|
1510
1582
|
// src/sync/get-elementor-config.ts
|
|
1511
1583
|
var getElementorConfig = () => {
|
|
@@ -1519,7 +1591,7 @@ var FontFamilyField = () => {
|
|
|
1519
1591
|
if (!fontFamilies) {
|
|
1520
1592
|
return null;
|
|
1521
1593
|
}
|
|
1522
|
-
return /* @__PURE__ */
|
|
1594
|
+
return /* @__PURE__ */ React45.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React45.createElement(import_ui38.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React45.createElement(import_ui38.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(import_editor_controls30.ControlLabel, null, (0, import_i18n26.__)("Font Family", "elementor"))), /* @__PURE__ */ React45.createElement(import_ui38.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(import_editor_controls30.FontFamilyControl, { fontFamilies }))));
|
|
1523
1595
|
};
|
|
1524
1596
|
var getFontFamilies = () => {
|
|
1525
1597
|
const { controls } = getElementorConfig();
|
|
@@ -1531,115 +1603,115 @@ var getFontFamilies = () => {
|
|
|
1531
1603
|
};
|
|
1532
1604
|
|
|
1533
1605
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
1534
|
-
var
|
|
1535
|
-
var
|
|
1536
|
-
var
|
|
1537
|
-
var
|
|
1606
|
+
var React46 = __toESM(require("react"));
|
|
1607
|
+
var import_editor_controls31 = require("@elementor/editor-controls");
|
|
1608
|
+
var import_ui39 = require("@elementor/ui");
|
|
1609
|
+
var import_i18n27 = require("@wordpress/i18n");
|
|
1538
1610
|
var FontSizeField = () => {
|
|
1539
|
-
return /* @__PURE__ */
|
|
1611
|
+
return /* @__PURE__ */ React46.createElement(StylesField, { bind: "font-size" }, /* @__PURE__ */ React46.createElement(import_ui39.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(import_editor_controls31.ControlLabel, null, (0, import_i18n27.__)("Font Size", "elementor"))), /* @__PURE__ */ React46.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(import_editor_controls31.SizeControl, null))));
|
|
1540
1612
|
};
|
|
1541
1613
|
|
|
1542
1614
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
1543
|
-
var
|
|
1544
|
-
var
|
|
1545
|
-
var
|
|
1546
|
-
var
|
|
1615
|
+
var React47 = __toESM(require("react"));
|
|
1616
|
+
var import_editor_controls32 = require("@elementor/editor-controls");
|
|
1617
|
+
var import_ui40 = require("@elementor/ui");
|
|
1618
|
+
var import_i18n28 = require("@wordpress/i18n");
|
|
1547
1619
|
var fontWeightOptions = [
|
|
1548
|
-
{ label: (0,
|
|
1549
|
-
{ label: (0,
|
|
1550
|
-
{ label: (0,
|
|
1551
|
-
{ label: (0,
|
|
1552
|
-
{ label: (0,
|
|
1620
|
+
{ label: (0, import_i18n28.__)("Light - 400", "elementor"), value: "400" },
|
|
1621
|
+
{ label: (0, import_i18n28.__)("Regular - 500", "elementor"), value: "500" },
|
|
1622
|
+
{ label: (0, import_i18n28.__)("Semi Bold - 600", "elementor"), value: "600" },
|
|
1623
|
+
{ label: (0, import_i18n28.__)("Bold - 700", "elementor"), value: "700" },
|
|
1624
|
+
{ label: (0, import_i18n28.__)("Black - 900", "elementor"), value: "900" }
|
|
1553
1625
|
];
|
|
1554
1626
|
var FontWeightField = () => {
|
|
1555
|
-
return /* @__PURE__ */
|
|
1627
|
+
return /* @__PURE__ */ React47.createElement(StylesField, { bind: "font-weight" }, /* @__PURE__ */ React47.createElement(import_ui40.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(import_editor_controls32.ControlLabel, null, (0, import_i18n28.__)("Font Weight", "elementor"))), /* @__PURE__ */ React47.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(import_editor_controls32.SelectControl, { options: fontWeightOptions }))));
|
|
1556
1628
|
};
|
|
1557
1629
|
|
|
1558
1630
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
1559
|
-
var
|
|
1560
|
-
var
|
|
1561
|
-
var
|
|
1562
|
-
var
|
|
1631
|
+
var React48 = __toESM(require("react"));
|
|
1632
|
+
var import_editor_controls33 = require("@elementor/editor-controls");
|
|
1633
|
+
var import_ui41 = require("@elementor/ui");
|
|
1634
|
+
var import_i18n29 = require("@wordpress/i18n");
|
|
1563
1635
|
var LetterSpacingField = () => {
|
|
1564
|
-
return /* @__PURE__ */
|
|
1636
|
+
return /* @__PURE__ */ React48.createElement(StylesField, { bind: "letter-spacing" }, /* @__PURE__ */ React48.createElement(import_ui41.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React48.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(import_editor_controls33.ControlLabel, null, (0, import_i18n29.__)("Letter Spacing", "elementor"))), /* @__PURE__ */ React48.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(import_editor_controls33.SizeControl, null))));
|
|
1565
1637
|
};
|
|
1566
1638
|
|
|
1567
1639
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
1568
|
-
var
|
|
1569
|
-
var
|
|
1570
|
-
var
|
|
1571
|
-
var
|
|
1640
|
+
var React49 = __toESM(require("react"));
|
|
1641
|
+
var import_editor_controls34 = require("@elementor/editor-controls");
|
|
1642
|
+
var import_ui42 = require("@elementor/ui");
|
|
1643
|
+
var import_i18n30 = require("@wordpress/i18n");
|
|
1572
1644
|
var LineHeightField = () => {
|
|
1573
|
-
return /* @__PURE__ */
|
|
1645
|
+
return /* @__PURE__ */ React49.createElement(StylesField, { bind: "line-height" }, /* @__PURE__ */ React49.createElement(import_ui42.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(import_ui42.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(import_editor_controls34.ControlLabel, null, (0, import_i18n30.__)("Line Height", "elementor"))), /* @__PURE__ */ React49.createElement(import_ui42.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(import_editor_controls34.SizeControl, null))));
|
|
1574
1646
|
};
|
|
1575
1647
|
|
|
1576
1648
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
1577
|
-
var
|
|
1578
|
-
var
|
|
1649
|
+
var React50 = __toESM(require("react"));
|
|
1650
|
+
var import_editor_controls35 = require("@elementor/editor-controls");
|
|
1579
1651
|
var import_icons15 = require("@elementor/icons");
|
|
1580
|
-
var
|
|
1581
|
-
var
|
|
1652
|
+
var import_ui43 = require("@elementor/ui");
|
|
1653
|
+
var import_i18n31 = require("@wordpress/i18n");
|
|
1582
1654
|
var options7 = [
|
|
1583
1655
|
{
|
|
1584
1656
|
value: "left",
|
|
1585
|
-
label: (0,
|
|
1586
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1657
|
+
label: (0, import_i18n31.__)("Left", "elementor"),
|
|
1658
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(import_icons15.AlignLeftIcon, { fontSize: size })
|
|
1587
1659
|
},
|
|
1588
1660
|
{
|
|
1589
1661
|
value: "center",
|
|
1590
|
-
label: (0,
|
|
1591
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1662
|
+
label: (0, import_i18n31.__)("Center", "elementor"),
|
|
1663
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(import_icons15.AlignCenterIcon, { fontSize: size })
|
|
1592
1664
|
},
|
|
1593
1665
|
{
|
|
1594
1666
|
value: "right",
|
|
1595
|
-
label: (0,
|
|
1596
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1667
|
+
label: (0, import_i18n31.__)("Right", "elementor"),
|
|
1668
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(import_icons15.AlignRightIcon, { fontSize: size })
|
|
1597
1669
|
},
|
|
1598
1670
|
{
|
|
1599
1671
|
value: "justify",
|
|
1600
|
-
label: (0,
|
|
1601
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1672
|
+
label: (0, import_i18n31.__)("Justify", "elementor"),
|
|
1673
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(import_icons15.AlignJustifiedIcon, { fontSize: size })
|
|
1602
1674
|
}
|
|
1603
1675
|
];
|
|
1604
1676
|
var TextAlignmentField = () => {
|
|
1605
|
-
return /* @__PURE__ */
|
|
1677
|
+
return /* @__PURE__ */ React50.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React50.createElement(import_ui43.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React50.createElement(import_ui43.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(import_editor_controls35.ControlLabel, null, (0, import_i18n31.__)("Alignment", "elementor"))), /* @__PURE__ */ React50.createElement(import_ui43.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React50.createElement(import_editor_controls35.ToggleControl, { options: options7 }))));
|
|
1606
1678
|
};
|
|
1607
1679
|
|
|
1608
1680
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
1609
|
-
var
|
|
1610
|
-
var
|
|
1611
|
-
var
|
|
1612
|
-
var
|
|
1681
|
+
var React51 = __toESM(require("react"));
|
|
1682
|
+
var import_editor_controls36 = require("@elementor/editor-controls");
|
|
1683
|
+
var import_ui44 = require("@elementor/ui");
|
|
1684
|
+
var import_i18n32 = require("@wordpress/i18n");
|
|
1613
1685
|
var TextColorField = () => {
|
|
1614
|
-
return /* @__PURE__ */
|
|
1686
|
+
return /* @__PURE__ */ React51.createElement(StylesField, { bind: "color" }, /* @__PURE__ */ React51.createElement(import_ui44.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React51.createElement(import_ui44.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(import_editor_controls36.ControlLabel, null, (0, import_i18n32.__)("Text Color", "elementor"))), /* @__PURE__ */ React51.createElement(import_ui44.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(import_editor_controls36.ColorControl, null))));
|
|
1615
1687
|
};
|
|
1616
1688
|
|
|
1617
1689
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
1618
|
-
var
|
|
1619
|
-
var
|
|
1690
|
+
var React52 = __toESM(require("react"));
|
|
1691
|
+
var import_editor_controls37 = require("@elementor/editor-controls");
|
|
1620
1692
|
var import_icons16 = require("@elementor/icons");
|
|
1621
|
-
var
|
|
1622
|
-
var
|
|
1693
|
+
var import_ui45 = require("@elementor/ui");
|
|
1694
|
+
var import_i18n33 = require("@wordpress/i18n");
|
|
1623
1695
|
var options8 = [
|
|
1624
1696
|
{
|
|
1625
1697
|
value: "ltr",
|
|
1626
|
-
label: (0,
|
|
1627
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1698
|
+
label: (0, import_i18n33.__)("Left to Right", "elementor"),
|
|
1699
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(import_icons16.TextDirectionLtrIcon, { fontSize: size })
|
|
1628
1700
|
},
|
|
1629
1701
|
{
|
|
1630
1702
|
value: "rtl",
|
|
1631
|
-
label: (0,
|
|
1632
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1703
|
+
label: (0, import_i18n33.__)("Right to Left", "elementor"),
|
|
1704
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(import_icons16.TextDirectionRtlIcon, { fontSize: size })
|
|
1633
1705
|
}
|
|
1634
1706
|
];
|
|
1635
1707
|
var TextDirectionField = () => {
|
|
1636
|
-
return /* @__PURE__ */
|
|
1708
|
+
return /* @__PURE__ */ React52.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React52.createElement(import_ui45.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React52.createElement(import_ui45.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(import_editor_controls37.ControlLabel, null, (0, import_i18n33.__)("Direction", "elementor"))), /* @__PURE__ */ React52.createElement(import_ui45.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React52.createElement(import_editor_controls37.ToggleControl, { options: options8 }))));
|
|
1637
1709
|
};
|
|
1638
1710
|
|
|
1639
1711
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
1640
|
-
var
|
|
1641
|
-
var
|
|
1642
|
-
var
|
|
1712
|
+
var React53 = __toESM(require("react"));
|
|
1713
|
+
var import_editor_controls38 = require("@elementor/editor-controls");
|
|
1714
|
+
var import_i18n34 = require("@wordpress/i18n");
|
|
1643
1715
|
var initTextStroke = {
|
|
1644
1716
|
$$type: "stroke",
|
|
1645
1717
|
value: {
|
|
@@ -1665,24 +1737,24 @@ var TextStrokeField = () => {
|
|
|
1665
1737
|
setTextStroke(null);
|
|
1666
1738
|
};
|
|
1667
1739
|
const hasTextStroke = Boolean(textStroke);
|
|
1668
|
-
return /* @__PURE__ */
|
|
1740
|
+
return /* @__PURE__ */ React53.createElement(
|
|
1669
1741
|
AddOrRemoveContent,
|
|
1670
1742
|
{
|
|
1671
|
-
label: (0,
|
|
1743
|
+
label: (0, import_i18n34.__)("Text Stroke", "elementor"),
|
|
1672
1744
|
isAdded: hasTextStroke,
|
|
1673
1745
|
onAdd: addTextStroke,
|
|
1674
1746
|
onRemove: removeTextStroke
|
|
1675
1747
|
},
|
|
1676
|
-
/* @__PURE__ */
|
|
1748
|
+
/* @__PURE__ */ React53.createElement(StylesField, { bind: "-webkit-text-stroke" }, /* @__PURE__ */ React53.createElement(import_editor_controls38.StrokeControl, null))
|
|
1677
1749
|
);
|
|
1678
1750
|
};
|
|
1679
1751
|
|
|
1680
1752
|
// src/components/style-sections/typography-section/text-style-field.tsx
|
|
1681
|
-
var
|
|
1682
|
-
var
|
|
1753
|
+
var React54 = __toESM(require("react"));
|
|
1754
|
+
var import_editor_controls39 = require("@elementor/editor-controls");
|
|
1683
1755
|
var import_icons17 = require("@elementor/icons");
|
|
1684
|
-
var
|
|
1685
|
-
var
|
|
1756
|
+
var import_ui46 = require("@elementor/ui");
|
|
1757
|
+
var import_i18n35 = require("@wordpress/i18n");
|
|
1686
1758
|
var buttonSize = "tiny";
|
|
1687
1759
|
var TextStyleField = () => {
|
|
1688
1760
|
const [fontStyle, setFontStyle] = useStylesField("font-style");
|
|
@@ -1706,7 +1778,7 @@ var TextStyleField = () => {
|
|
|
1706
1778
|
value: newValue
|
|
1707
1779
|
});
|
|
1708
1780
|
};
|
|
1709
|
-
return /* @__PURE__ */
|
|
1781
|
+
return /* @__PURE__ */ React54.createElement(import_ui46.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React54.createElement(import_ui46.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(import_editor_controls39.ControlLabel, null, (0, import_i18n35.__)("Style", "elementor"))), /* @__PURE__ */ React54.createElement(import_ui46.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React54.createElement(import_ui46.ToggleButtonGroup, { value: formats }, /* @__PURE__ */ React54.createElement(
|
|
1710
1782
|
ToggleButton,
|
|
1711
1783
|
{
|
|
1712
1784
|
value: "italic",
|
|
@@ -1714,8 +1786,8 @@ var TextStyleField = () => {
|
|
|
1714
1786
|
"aria-label": "italic",
|
|
1715
1787
|
sx: { marginLeft: "auto" }
|
|
1716
1788
|
},
|
|
1717
|
-
/* @__PURE__ */
|
|
1718
|
-
), /* @__PURE__ */
|
|
1789
|
+
/* @__PURE__ */ React54.createElement(import_icons17.ItalicIcon, { fontSize: buttonSize })
|
|
1790
|
+
), /* @__PURE__ */ React54.createElement(
|
|
1719
1791
|
ShorthandControl,
|
|
1720
1792
|
{
|
|
1721
1793
|
value: "line-through",
|
|
@@ -1723,8 +1795,8 @@ var TextStyleField = () => {
|
|
|
1723
1795
|
updateValues: handleSetTextDecoration,
|
|
1724
1796
|
"aria-label": "line-through"
|
|
1725
1797
|
},
|
|
1726
|
-
/* @__PURE__ */
|
|
1727
|
-
), /* @__PURE__ */
|
|
1798
|
+
/* @__PURE__ */ React54.createElement(import_icons17.StrikethroughIcon, { fontSize: buttonSize })
|
|
1799
|
+
), /* @__PURE__ */ React54.createElement(
|
|
1728
1800
|
ShorthandControl,
|
|
1729
1801
|
{
|
|
1730
1802
|
value: "underline",
|
|
@@ -1732,7 +1804,7 @@ var TextStyleField = () => {
|
|
|
1732
1804
|
updateValues: handleSetTextDecoration,
|
|
1733
1805
|
"aria-label": "underline"
|
|
1734
1806
|
},
|
|
1735
|
-
/* @__PURE__ */
|
|
1807
|
+
/* @__PURE__ */ React54.createElement(import_icons17.UnderlineIcon, { fontSize: buttonSize })
|
|
1736
1808
|
))));
|
|
1737
1809
|
};
|
|
1738
1810
|
var ShorthandControl = ({
|
|
@@ -1751,52 +1823,52 @@ var ShorthandControl = ({
|
|
|
1751
1823
|
updateValues([...valuesArr, newValue].join(" "));
|
|
1752
1824
|
}
|
|
1753
1825
|
};
|
|
1754
|
-
return /* @__PURE__ */
|
|
1826
|
+
return /* @__PURE__ */ React54.createElement(ToggleButton, { value, onChange: toggleValue, selected, "aria-label": ariaLabel }, children);
|
|
1755
1827
|
};
|
|
1756
1828
|
var ToggleButton = ({ onChange, ...props }) => {
|
|
1757
1829
|
const handleChange = (_e, newValue) => {
|
|
1758
1830
|
onChange(newValue);
|
|
1759
1831
|
};
|
|
1760
|
-
return /* @__PURE__ */
|
|
1832
|
+
return /* @__PURE__ */ React54.createElement(import_ui46.ToggleButton, { ...props, onChange: handleChange, size: buttonSize });
|
|
1761
1833
|
};
|
|
1762
1834
|
|
|
1763
1835
|
// src/components/style-sections/typography-section/transform-field.tsx
|
|
1764
|
-
var
|
|
1765
|
-
var
|
|
1836
|
+
var React55 = __toESM(require("react"));
|
|
1837
|
+
var import_editor_controls40 = require("@elementor/editor-controls");
|
|
1766
1838
|
var import_icons18 = require("@elementor/icons");
|
|
1767
|
-
var
|
|
1768
|
-
var
|
|
1839
|
+
var import_ui47 = require("@elementor/ui");
|
|
1840
|
+
var import_i18n36 = require("@wordpress/i18n");
|
|
1769
1841
|
var options9 = [
|
|
1770
1842
|
{
|
|
1771
1843
|
value: "capitalize",
|
|
1772
|
-
label: (0,
|
|
1773
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1844
|
+
label: (0, import_i18n36.__)("Capitalize", "elementor"),
|
|
1845
|
+
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(import_icons18.LetterCaseIcon, { fontSize: size })
|
|
1774
1846
|
},
|
|
1775
1847
|
{
|
|
1776
1848
|
value: "uppercase",
|
|
1777
|
-
label: (0,
|
|
1778
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1849
|
+
label: (0, import_i18n36.__)("Uppercase", "elementor"),
|
|
1850
|
+
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(import_icons18.LetterCaseUpperIcon, { fontSize: size })
|
|
1779
1851
|
},
|
|
1780
1852
|
{
|
|
1781
1853
|
value: "lowercase",
|
|
1782
|
-
label: (0,
|
|
1783
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1854
|
+
label: (0, import_i18n36.__)("Lowercase", "elementor"),
|
|
1855
|
+
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(import_icons18.LetterCaseLowerIcon, { fontSize: size })
|
|
1784
1856
|
}
|
|
1785
1857
|
];
|
|
1786
|
-
var TransformField = () => /* @__PURE__ */
|
|
1858
|
+
var TransformField = () => /* @__PURE__ */ React55.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React55.createElement(import_ui47.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React55.createElement(import_ui47.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(import_editor_controls40.ControlLabel, null, (0, import_i18n36.__)("Transform", "elementor"))), /* @__PURE__ */ React55.createElement(import_ui47.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React55.createElement(import_editor_controls40.ToggleControl, { options: options9 }))));
|
|
1787
1859
|
|
|
1788
1860
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
1789
|
-
var
|
|
1790
|
-
var
|
|
1791
|
-
var
|
|
1792
|
-
var
|
|
1861
|
+
var React56 = __toESM(require("react"));
|
|
1862
|
+
var import_editor_controls41 = require("@elementor/editor-controls");
|
|
1863
|
+
var import_ui48 = require("@elementor/ui");
|
|
1864
|
+
var import_i18n37 = require("@wordpress/i18n");
|
|
1793
1865
|
var WordSpacingField = () => {
|
|
1794
|
-
return /* @__PURE__ */
|
|
1866
|
+
return /* @__PURE__ */ React56.createElement(StylesField, { bind: "word-spacing" }, /* @__PURE__ */ React56.createElement(import_ui48.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React56.createElement(import_ui48.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(import_editor_controls41.ControlLabel, null, (0, import_i18n37.__)("Word Spacing", "elementor"))), /* @__PURE__ */ React56.createElement(import_ui48.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(import_editor_controls41.SizeControl, null))));
|
|
1795
1867
|
};
|
|
1796
1868
|
|
|
1797
1869
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
1798
1870
|
var TypographySection = () => {
|
|
1799
|
-
return /* @__PURE__ */
|
|
1871
|
+
return /* @__PURE__ */ React57.createElement(import_ui49.Stack, { gap: 1.5 }, /* @__PURE__ */ React57.createElement(FontFamilyField, null), /* @__PURE__ */ React57.createElement(FontWeightField, null), /* @__PURE__ */ React57.createElement(FontSizeField, null), /* @__PURE__ */ React57.createElement(import_ui49.Divider, null), /* @__PURE__ */ React57.createElement(TextAlignmentField, null), /* @__PURE__ */ React57.createElement(TextColorField, null), /* @__PURE__ */ React57.createElement(CollapsibleContent, null, /* @__PURE__ */ React57.createElement(import_ui49.Stack, { gap: 1.5, sx: { pt: 1.5 } }, /* @__PURE__ */ React57.createElement(LineHeightField, null), /* @__PURE__ */ React57.createElement(LetterSpacingField, null), /* @__PURE__ */ React57.createElement(WordSpacingField, null), /* @__PURE__ */ React57.createElement(import_ui49.Divider, null), /* @__PURE__ */ React57.createElement(TextStyleField, null), /* @__PURE__ */ React57.createElement(TransformField, null), /* @__PURE__ */ React57.createElement(TextDirectionField, null), /* @__PURE__ */ React57.createElement(TextStrokeField, null))));
|
|
1800
1872
|
};
|
|
1801
1873
|
|
|
1802
1874
|
// src/components/style-tab.tsx
|
|
@@ -1805,13 +1877,12 @@ var StyleTab = () => {
|
|
|
1805
1877
|
const currentClassesProp = useCurrentClassesProp();
|
|
1806
1878
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp);
|
|
1807
1879
|
const breakpoint = (0, import_editor_responsive.useActiveBreakpoint)();
|
|
1808
|
-
return /* @__PURE__ */
|
|
1880
|
+
return /* @__PURE__ */ React58.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React58.createElement(StyleProvider, { meta: { breakpoint, state: null }, id: activeStyleDefId, setId: setActiveStyleDefId }, /* @__PURE__ */ React58.createElement(CssClassSelector, null), /* @__PURE__ */ React58.createElement(import_ui50.Divider, null), /* @__PURE__ */ React58.createElement(SectionsList, null, /* @__PURE__ */ React58.createElement(Section, { title: (0, import_i18n38.__)("Layout", "elementor") }, /* @__PURE__ */ React58.createElement(LayoutSection, null)), /* @__PURE__ */ React58.createElement(Section, { title: (0, import_i18n38.__)("Spacing", "elementor") }, /* @__PURE__ */ React58.createElement(SpacingSection, null)), /* @__PURE__ */ React58.createElement(Section, { title: (0, import_i18n38.__)("Size", "elementor") }, /* @__PURE__ */ React58.createElement(SizeSection, null)), /* @__PURE__ */ React58.createElement(Section, { title: (0, import_i18n38.__)("Position", "elementor") }, /* @__PURE__ */ React58.createElement(PositionSection, null)), /* @__PURE__ */ React58.createElement(Section, { title: (0, import_i18n38.__)("Typography", "elementor") }, /* @__PURE__ */ React58.createElement(TypographySection, null)), /* @__PURE__ */ React58.createElement(Section, { title: (0, import_i18n38.__)("Background", "elementor") }, /* @__PURE__ */ React58.createElement(BackgroundSection, null)), /* @__PURE__ */ React58.createElement(Section, { title: (0, import_i18n38.__)("Border", "elementor") }, /* @__PURE__ */ React58.createElement(BorderSection, null)), /* @__PURE__ */ React58.createElement(Section, { title: (0, import_i18n38.__)("Effects", "elementor") }, /* @__PURE__ */ React58.createElement(EffectsSection, null)))));
|
|
1809
1881
|
};
|
|
1810
1882
|
function useActiveStyleDefId(currentClassesProp) {
|
|
1811
|
-
const [activeStyledDefId, setActiveStyledDefId] = (0,
|
|
1883
|
+
const [activeStyledDefId, setActiveStyledDefId] = (0, import_react14.useState)(null);
|
|
1812
1884
|
const fallback = useFirstElementStyleDef(currentClassesProp);
|
|
1813
|
-
|
|
1814
|
-
return [activeStyledDefId || fallback?.id || newId, setActiveStyledDefId];
|
|
1885
|
+
return [activeStyledDefId || fallback?.id || null, setActiveStyledDefId];
|
|
1815
1886
|
}
|
|
1816
1887
|
function useFirstElementStyleDef(currentClassesProp) {
|
|
1817
1888
|
const { element } = useElement();
|
|
@@ -1819,11 +1890,6 @@ function useFirstElementStyleDef(currentClassesProp) {
|
|
|
1819
1890
|
const stylesDefs = (0, import_editor_elements5.useElementStyles)(element.id);
|
|
1820
1891
|
return Object.values(stylesDefs).find((styleDef) => classesIds.includes(styleDef.id));
|
|
1821
1892
|
}
|
|
1822
|
-
function useGeneratedId() {
|
|
1823
|
-
const { element } = useElement();
|
|
1824
|
-
const stylesDefs = (0, import_editor_elements5.useElementStyles)(element.id);
|
|
1825
|
-
return (0, import_editor_styles.generateId)(`e-${element.id}-`, Object.keys(stylesDefs));
|
|
1826
|
-
}
|
|
1827
1893
|
function useCurrentClassesProp() {
|
|
1828
1894
|
const { elementType } = useElement();
|
|
1829
1895
|
const prop = Object.entries(elementType.propsSchema).find(
|
|
@@ -1838,11 +1904,11 @@ function useCurrentClassesProp() {
|
|
|
1838
1904
|
// src/components/editing-panel-tabs.tsx
|
|
1839
1905
|
var EditingPanelTabs = () => {
|
|
1840
1906
|
const { element } = useElement();
|
|
1841
|
-
const { getTabProps, getTabPanelProps, getTabsProps } = (0,
|
|
1907
|
+
const { getTabProps, getTabPanelProps, getTabsProps } = (0, import_ui51.useTabs)("settings");
|
|
1842
1908
|
return (
|
|
1843
1909
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
1844
1910
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
1845
|
-
/* @__PURE__ */
|
|
1911
|
+
/* @__PURE__ */ React59.createElement(import_react15.Fragment, { key: element.id }, /* @__PURE__ */ React59.createElement(import_ui51.Stack, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React59.createElement(import_ui51.Tabs, { variant: "fullWidth", indicatorColor: "secondary", textColor: "inherit", ...getTabsProps() }, /* @__PURE__ */ React59.createElement(import_ui51.Tab, { label: (0, import_i18n39.__)("General", "elementor"), ...getTabProps("settings") }), /* @__PURE__ */ React59.createElement(import_ui51.Tab, { label: (0, import_i18n39.__)("Style", "elementor"), ...getTabProps("style") })), /* @__PURE__ */ React59.createElement(import_ui51.Divider, null), /* @__PURE__ */ React59.createElement(import_ui51.TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React59.createElement(SettingsTab, null)), /* @__PURE__ */ React59.createElement(import_ui51.TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React59.createElement(StyleTab, null))))
|
|
1846
1912
|
);
|
|
1847
1913
|
};
|
|
1848
1914
|
|
|
@@ -1855,8 +1921,8 @@ var EditingPanel = () => {
|
|
|
1855
1921
|
if (!element || !elementType) {
|
|
1856
1922
|
return null;
|
|
1857
1923
|
}
|
|
1858
|
-
const panelTitle = (0,
|
|
1859
|
-
return /* @__PURE__ */
|
|
1924
|
+
const panelTitle = (0, import_i18n40.__)("Edit %s", "elementor").replace("%s", elementType.title);
|
|
1925
|
+
return /* @__PURE__ */ React60.createElement(import_ui52.ErrorBoundary, { fallback: /* @__PURE__ */ React60.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React60.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React60.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React60.createElement(import_editor_panels.PanelHeaderTitle, null, panelTitle)), /* @__PURE__ */ React60.createElement(import_editor_panels.PanelBody, null, /* @__PURE__ */ React60.createElement(import_editor_controls42.ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React60.createElement(import_editor_controls42.ControlReplacementProvider, { ...controlReplacement }, /* @__PURE__ */ React60.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React60.createElement(EditingPanelTabs, null)))))));
|
|
1860
1926
|
};
|
|
1861
1927
|
|
|
1862
1928
|
// src/panel.ts
|
|
@@ -1879,7 +1945,7 @@ var isAtomicWidgetSelected = () => {
|
|
|
1879
1945
|
// src/hooks/use-close-editor-panel.ts
|
|
1880
1946
|
var useCloseEditorPanel = () => {
|
|
1881
1947
|
const { close } = usePanelActions();
|
|
1882
|
-
return (0,
|
|
1948
|
+
return (0, import_react16.useEffect)(() => {
|
|
1883
1949
|
return (0, import_editor_v1_adapters.__privateListenTo)((0, import_editor_v1_adapters.commandStartEvent)("document/elements/delete"), (e) => {
|
|
1884
1950
|
const selectedElement = (0, import_editor_elements8.getSelectedElements)()[0];
|
|
1885
1951
|
const { container: deletedContainer } = e?.args;
|
|
@@ -1892,11 +1958,11 @@ var useCloseEditorPanel = () => {
|
|
|
1892
1958
|
};
|
|
1893
1959
|
|
|
1894
1960
|
// src/hooks/use-open-editor-panel.ts
|
|
1895
|
-
var
|
|
1961
|
+
var import_react17 = require("react");
|
|
1896
1962
|
var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
|
|
1897
1963
|
var useOpenEditorPanel = () => {
|
|
1898
1964
|
const { open } = usePanelActions();
|
|
1899
|
-
(0,
|
|
1965
|
+
(0, import_react17.useEffect)(() => {
|
|
1900
1966
|
return (0, import_editor_v1_adapters2.__privateListenTo)((0, import_editor_v1_adapters2.commandStartEvent)("panel/editor/open"), () => {
|
|
1901
1967
|
if (isAtomicWidgetSelected()) {
|
|
1902
1968
|
open();
|
|
@@ -1913,23 +1979,23 @@ var EditingPanelHooks = () => {
|
|
|
1913
1979
|
};
|
|
1914
1980
|
|
|
1915
1981
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
1916
|
-
var
|
|
1917
|
-
var
|
|
1918
|
-
var
|
|
1982
|
+
var React63 = __toESM(require("react"));
|
|
1983
|
+
var import_react21 = require("react");
|
|
1984
|
+
var import_editor_controls45 = require("@elementor/editor-controls");
|
|
1919
1985
|
var import_icons20 = require("@elementor/icons");
|
|
1920
|
-
var
|
|
1921
|
-
var
|
|
1986
|
+
var import_ui54 = require("@elementor/ui");
|
|
1987
|
+
var import_i18n42 = require("@wordpress/i18n");
|
|
1922
1988
|
|
|
1923
1989
|
// src/dynamics/dynamic-control.tsx
|
|
1924
|
-
var
|
|
1925
|
-
var
|
|
1990
|
+
var React61 = __toESM(require("react"));
|
|
1991
|
+
var import_editor_controls43 = require("@elementor/editor-controls");
|
|
1926
1992
|
var import_editor_props5 = require("@elementor/editor-props");
|
|
1927
1993
|
|
|
1928
1994
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
1929
|
-
var
|
|
1995
|
+
var import_react19 = require("react");
|
|
1930
1996
|
|
|
1931
1997
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
1932
|
-
var
|
|
1998
|
+
var import_react18 = require("react");
|
|
1933
1999
|
|
|
1934
2000
|
// src/dynamics/sync/get-elementor-config.ts
|
|
1935
2001
|
var getElementorConfig2 = () => {
|
|
@@ -1981,7 +2047,7 @@ var usePropDynamicTags = (propName) => {
|
|
|
1981
2047
|
const propDynamicType = getDynamicPropType(propType);
|
|
1982
2048
|
categories = propDynamicType?.settings.categories || [];
|
|
1983
2049
|
}
|
|
1984
|
-
return (0,
|
|
2050
|
+
return (0, import_react18.useMemo)(() => getDynamicTagsByCategories(categories), [categories.join()]);
|
|
1985
2051
|
};
|
|
1986
2052
|
var getDynamicTagsByCategories = (categories) => {
|
|
1987
2053
|
const dynamicTags = getAtomicDynamicTags();
|
|
@@ -1997,12 +2063,12 @@ var getDynamicTagsByCategories = (categories) => {
|
|
|
1997
2063
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
1998
2064
|
var useDynamicTag = (propName, tagName) => {
|
|
1999
2065
|
const dynamicTags = usePropDynamicTags(propName);
|
|
2000
|
-
return (0,
|
|
2066
|
+
return (0, import_react19.useMemo)(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
|
|
2001
2067
|
};
|
|
2002
2068
|
|
|
2003
2069
|
// src/dynamics/dynamic-control.tsx
|
|
2004
2070
|
var DynamicControl = ({ bind, children }) => {
|
|
2005
|
-
const { value, setValue, bind: propName } = (0,
|
|
2071
|
+
const { value, setValue, bind: propName } = (0, import_editor_controls43.useBoundProp)(dynamicPropTypeUtil);
|
|
2006
2072
|
const { name = "", settings } = value ?? {};
|
|
2007
2073
|
const dynamicTag = useDynamicTag(propName, name);
|
|
2008
2074
|
if (!dynamicTag) {
|
|
@@ -2020,22 +2086,22 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
2020
2086
|
}
|
|
2021
2087
|
});
|
|
2022
2088
|
};
|
|
2023
|
-
return /* @__PURE__ */
|
|
2089
|
+
return /* @__PURE__ */ React61.createElement(import_editor_controls43.BoundPropProvider, { setValue: setDynamicValue, value: dynamicValue, bind }, children);
|
|
2024
2090
|
};
|
|
2025
2091
|
|
|
2026
2092
|
// src/dynamics/components/dynamic-selection.tsx
|
|
2027
|
-
var
|
|
2028
|
-
var
|
|
2029
|
-
var
|
|
2093
|
+
var React62 = __toESM(require("react"));
|
|
2094
|
+
var import_react20 = require("react");
|
|
2095
|
+
var import_editor_controls44 = require("@elementor/editor-controls");
|
|
2030
2096
|
var import_icons19 = require("@elementor/icons");
|
|
2031
|
-
var
|
|
2032
|
-
var
|
|
2097
|
+
var import_ui53 = require("@elementor/ui");
|
|
2098
|
+
var import_i18n41 = require("@wordpress/i18n");
|
|
2033
2099
|
var SIZE3 = "tiny";
|
|
2034
2100
|
var DynamicSelection = ({ onSelect }) => {
|
|
2035
|
-
const [searchValue, setSearchValue] = (0,
|
|
2101
|
+
const [searchValue, setSearchValue] = (0, import_react20.useState)("");
|
|
2036
2102
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
2037
|
-
const { value: anyValue } = (0,
|
|
2038
|
-
const { bind, value: dynamicvalue, setValue } = (0,
|
|
2103
|
+
const { value: anyValue } = (0, import_editor_controls44.useBoundProp)();
|
|
2104
|
+
const { bind, value: dynamicvalue, setValue } = (0, import_editor_controls44.useBoundProp)(dynamicPropTypeUtil);
|
|
2039
2105
|
const { setPropValue: updatePropValueHistory } = usePropValueHistory();
|
|
2040
2106
|
const isCurrentValueDynamic = !!dynamicvalue;
|
|
2041
2107
|
const options10 = useFilteredOptions(bind, searchValue);
|
|
@@ -2049,22 +2115,22 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2049
2115
|
setValue({ name: value, settings: {} });
|
|
2050
2116
|
onSelect?.();
|
|
2051
2117
|
};
|
|
2052
|
-
return /* @__PURE__ */
|
|
2053
|
-
|
|
2118
|
+
return /* @__PURE__ */ React62.createElement(import_ui53.Stack, null, /* @__PURE__ */ React62.createElement(import_ui53.Box, { px: 1.5, pb: 1 }, /* @__PURE__ */ React62.createElement(
|
|
2119
|
+
import_ui53.TextField,
|
|
2054
2120
|
{
|
|
2055
2121
|
fullWidth: true,
|
|
2056
2122
|
size: SIZE3,
|
|
2057
2123
|
value: searchValue,
|
|
2058
2124
|
onChange: handleSearch,
|
|
2059
|
-
placeholder: (0,
|
|
2125
|
+
placeholder: (0, import_i18n41.__)("Search dynamic tag", "elementor"),
|
|
2060
2126
|
InputProps: {
|
|
2061
|
-
startAdornment: /* @__PURE__ */
|
|
2127
|
+
startAdornment: /* @__PURE__ */ React62.createElement(import_ui53.InputAdornment, { position: "start" }, /* @__PURE__ */ React62.createElement(import_icons19.SearchIcon, { fontSize: SIZE3 }))
|
|
2062
2128
|
}
|
|
2063
2129
|
}
|
|
2064
|
-
)), /* @__PURE__ */
|
|
2130
|
+
)), /* @__PURE__ */ React62.createElement(import_ui53.Divider, null), /* @__PURE__ */ React62.createElement(import_ui53.Box, { sx: { overflowY: "auto", height: 260, width: 220 } }, options10.length > 0 ? /* @__PURE__ */ React62.createElement(import_ui53.MenuList, { role: "listbox", tabIndex: 0 }, options10.map(([category, items3], index) => /* @__PURE__ */ React62.createElement(import_react20.Fragment, { key: index }, /* @__PURE__ */ React62.createElement(import_ui53.ListSubheader, { sx: { typography: "caption", color: "text.tertiary" } }, dynamicGroups?.[category]?.title || category), items3.map(({ value, label: tagLabel }) => {
|
|
2065
2131
|
const isSelected = isCurrentValueDynamic && value === dynamicvalue?.name;
|
|
2066
|
-
return /* @__PURE__ */
|
|
2067
|
-
|
|
2132
|
+
return /* @__PURE__ */ React62.createElement(
|
|
2133
|
+
import_ui53.MenuItem,
|
|
2068
2134
|
{
|
|
2069
2135
|
key: value,
|
|
2070
2136
|
selected: isSelected,
|
|
@@ -2074,16 +2140,16 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2074
2140
|
},
|
|
2075
2141
|
tagLabel
|
|
2076
2142
|
);
|
|
2077
|
-
})))) : /* @__PURE__ */
|
|
2078
|
-
|
|
2143
|
+
})))) : /* @__PURE__ */ React62.createElement(import_ui53.Stack, { alignItems: "center", p: 2.5, gap: 1.5 }, /* @__PURE__ */ React62.createElement(import_icons19.PhotoIcon, { fontSize: "large" }), /* @__PURE__ */ React62.createElement(import_ui53.Typography, { align: "center", variant: "caption", color: "text.secondary" }, (0, import_i18n41.__)("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React62.createElement("br", null), "\u201C", searchValue, "\u201D."), /* @__PURE__ */ React62.createElement(import_ui53.Typography, { align: "center", variant: "caption", color: "text.secondary" }, /* @__PURE__ */ React62.createElement(
|
|
2144
|
+
import_ui53.Link,
|
|
2079
2145
|
{
|
|
2080
2146
|
color: "secondary",
|
|
2081
2147
|
variant: "caption",
|
|
2082
2148
|
component: "button",
|
|
2083
2149
|
onClick: () => setSearchValue("")
|
|
2084
2150
|
},
|
|
2085
|
-
(0,
|
|
2086
|
-
), "\xA0", (0,
|
|
2151
|
+
(0, import_i18n41.__)("Clear the filters", "elementor")
|
|
2152
|
+
), "\xA0", (0, import_i18n41.__)("and try again.", "elementor")))));
|
|
2087
2153
|
};
|
|
2088
2154
|
var useFilteredOptions = (bind, searchValue) => {
|
|
2089
2155
|
const dynamicTags = usePropDynamicTags(bind);
|
|
@@ -2104,12 +2170,12 @@ var useFilteredOptions = (bind, searchValue) => {
|
|
|
2104
2170
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
2105
2171
|
var SIZE4 = "tiny";
|
|
2106
2172
|
var DynamicSelectionControl = () => {
|
|
2107
|
-
const { setValue: setAnyValue } = (0,
|
|
2108
|
-
const { bind, value } = (0,
|
|
2173
|
+
const { setValue: setAnyValue } = (0, import_editor_controls45.useBoundProp)();
|
|
2174
|
+
const { bind, value } = (0, import_editor_controls45.useBoundProp)(dynamicPropTypeUtil);
|
|
2109
2175
|
const { getPropValue: getPropValueFromHistory } = usePropValueHistory();
|
|
2110
2176
|
const { name: tagName = "" } = value;
|
|
2111
|
-
const selectionPopoverId = (0,
|
|
2112
|
-
const selectionPopoverState = (0,
|
|
2177
|
+
const selectionPopoverId = (0, import_react21.useId)();
|
|
2178
|
+
const selectionPopoverState = (0, import_ui54.usePopupState)({ variant: "popover", popupId: selectionPopoverId });
|
|
2113
2179
|
const dynamicTag = useDynamicTag(bind, tagName);
|
|
2114
2180
|
const removeDynamicTag = () => {
|
|
2115
2181
|
const propValue = getPropValueFromHistory(bind);
|
|
@@ -2118,70 +2184,70 @@ var DynamicSelectionControl = () => {
|
|
|
2118
2184
|
if (!dynamicTag) {
|
|
2119
2185
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
2120
2186
|
}
|
|
2121
|
-
return /* @__PURE__ */
|
|
2122
|
-
|
|
2187
|
+
return /* @__PURE__ */ React63.createElement(import_ui54.Box, null, /* @__PURE__ */ React63.createElement(
|
|
2188
|
+
import_ui54.UnstableTag,
|
|
2123
2189
|
{
|
|
2124
2190
|
fullWidth: true,
|
|
2125
2191
|
showActionsOnHover: true,
|
|
2126
2192
|
label: dynamicTag.label,
|
|
2127
|
-
startIcon: /* @__PURE__ */
|
|
2128
|
-
...(0,
|
|
2129
|
-
actions: /* @__PURE__ */
|
|
2130
|
-
|
|
2193
|
+
startIcon: /* @__PURE__ */ React63.createElement(import_icons20.DatabaseIcon, { fontSize: SIZE4 }),
|
|
2194
|
+
...(0, import_ui54.bindTrigger)(selectionPopoverState),
|
|
2195
|
+
actions: /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React63.createElement(
|
|
2196
|
+
import_ui54.IconButton,
|
|
2131
2197
|
{
|
|
2132
2198
|
size: SIZE4,
|
|
2133
2199
|
onClick: removeDynamicTag,
|
|
2134
|
-
"aria-label": (0,
|
|
2200
|
+
"aria-label": (0, import_i18n42.__)("Remove dynamic value", "elementor")
|
|
2135
2201
|
},
|
|
2136
|
-
/* @__PURE__ */
|
|
2202
|
+
/* @__PURE__ */ React63.createElement(import_icons20.XIcon, { fontSize: SIZE4 })
|
|
2137
2203
|
))
|
|
2138
2204
|
}
|
|
2139
|
-
), /* @__PURE__ */
|
|
2140
|
-
|
|
2205
|
+
), /* @__PURE__ */ React63.createElement(
|
|
2206
|
+
import_ui54.Popover,
|
|
2141
2207
|
{
|
|
2142
2208
|
disablePortal: true,
|
|
2143
2209
|
disableScrollLock: true,
|
|
2144
2210
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
2145
|
-
...(0,
|
|
2211
|
+
...(0, import_ui54.bindPopover)(selectionPopoverState)
|
|
2146
2212
|
},
|
|
2147
|
-
/* @__PURE__ */
|
|
2213
|
+
/* @__PURE__ */ React63.createElement(import_ui54.Stack, null, /* @__PURE__ */ React63.createElement(import_ui54.Stack, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React63.createElement(import_icons20.DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React63.createElement(import_ui54.Typography, { variant: "subtitle2" }, (0, import_i18n42.__)("Dynamic Tags", "elementor")), /* @__PURE__ */ React63.createElement(import_ui54.IconButton, { size: SIZE4, sx: { ml: "auto" }, onClick: selectionPopoverState.close }, /* @__PURE__ */ React63.createElement(import_icons20.XIcon, { fontSize: SIZE4 }))), /* @__PURE__ */ React63.createElement(DynamicSelection, { onSelect: selectionPopoverState.close }))
|
|
2148
2214
|
));
|
|
2149
2215
|
};
|
|
2150
2216
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
2151
|
-
const popupId = (0,
|
|
2152
|
-
const settingsPopupState = (0,
|
|
2217
|
+
const popupId = (0, import_react21.useId)();
|
|
2218
|
+
const settingsPopupState = (0, import_ui54.usePopupState)({ variant: "popover", popupId });
|
|
2153
2219
|
const hasDynamicSettings = !!dynamicTag.atomic_controls.length;
|
|
2154
2220
|
if (!hasDynamicSettings) {
|
|
2155
2221
|
return null;
|
|
2156
2222
|
}
|
|
2157
|
-
return /* @__PURE__ */
|
|
2158
|
-
|
|
2223
|
+
return /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(
|
|
2224
|
+
import_ui54.IconButton,
|
|
2159
2225
|
{
|
|
2160
2226
|
size: SIZE4,
|
|
2161
|
-
...(0,
|
|
2162
|
-
"aria-label": (0,
|
|
2227
|
+
...(0, import_ui54.bindTrigger)(settingsPopupState),
|
|
2228
|
+
"aria-label": (0, import_i18n42.__)("Settings", "elementor")
|
|
2163
2229
|
},
|
|
2164
|
-
/* @__PURE__ */
|
|
2165
|
-
), /* @__PURE__ */
|
|
2166
|
-
|
|
2230
|
+
/* @__PURE__ */ React63.createElement(import_icons20.SettingsIcon, { fontSize: SIZE4 })
|
|
2231
|
+
), /* @__PURE__ */ React63.createElement(
|
|
2232
|
+
import_ui54.Popover,
|
|
2167
2233
|
{
|
|
2168
2234
|
disableScrollLock: true,
|
|
2169
2235
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
2170
|
-
...(0,
|
|
2236
|
+
...(0, import_ui54.bindPopover)(settingsPopupState)
|
|
2171
2237
|
},
|
|
2172
|
-
/* @__PURE__ */
|
|
2238
|
+
/* @__PURE__ */ React63.createElement(import_ui54.Paper, { component: import_ui54.Stack, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React63.createElement(import_ui54.Stack, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React63.createElement(import_icons20.DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React63.createElement(import_ui54.Typography, { variant: "subtitle2" }, dynamicTag.label), /* @__PURE__ */ React63.createElement(import_ui54.IconButton, { sx: { ml: "auto" }, size: SIZE4, onClick: settingsPopupState.close }, /* @__PURE__ */ React63.createElement(import_icons20.XIcon, { fontSize: SIZE4 }))), /* @__PURE__ */ React63.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls }))
|
|
2173
2239
|
));
|
|
2174
2240
|
};
|
|
2175
2241
|
var DynamicSettings = ({ controls }) => {
|
|
2176
2242
|
const tabs = controls.filter(({ type }) => type === "section");
|
|
2177
|
-
const { getTabsProps, getTabProps, getTabPanelProps } = (0,
|
|
2243
|
+
const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui54.useTabs)(0);
|
|
2178
2244
|
if (!tabs.length) {
|
|
2179
2245
|
return null;
|
|
2180
2246
|
}
|
|
2181
|
-
return /* @__PURE__ */
|
|
2182
|
-
return /* @__PURE__ */
|
|
2247
|
+
return /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(import_ui54.Tabs, { indicatorColor: "secondary", textColor: "secondary", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React63.createElement(import_ui54.Tab, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React63.createElement(import_ui54.Divider, null), tabs.map(({ value }, index) => {
|
|
2248
|
+
return /* @__PURE__ */ React63.createElement(import_ui54.TabPanel, { key: index, sx: { flexGrow: 1 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React63.createElement(import_ui54.Stack, { gap: 1, px: 2 }, value.items.map((item) => {
|
|
2183
2249
|
if (item.type === "control") {
|
|
2184
|
-
return /* @__PURE__ */
|
|
2250
|
+
return /* @__PURE__ */ React63.createElement(Control3, { key: item.value.bind, control: item.value });
|
|
2185
2251
|
}
|
|
2186
2252
|
return null;
|
|
2187
2253
|
})));
|
|
@@ -2191,24 +2257,24 @@ var Control3 = ({ control }) => {
|
|
|
2191
2257
|
if (!getControlByType(control.type)) {
|
|
2192
2258
|
return null;
|
|
2193
2259
|
}
|
|
2194
|
-
return /* @__PURE__ */
|
|
2260
|
+
return /* @__PURE__ */ React63.createElement(DynamicControl, { bind: control.bind }, control.label ? /* @__PURE__ */ React63.createElement(import_editor_controls45.ControlLabel, null, control.label) : null, /* @__PURE__ */ React63.createElement(Control, { type: control.type, props: control.props }));
|
|
2195
2261
|
};
|
|
2196
2262
|
|
|
2197
2263
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
2198
|
-
var
|
|
2199
|
-
var
|
|
2264
|
+
var React64 = __toESM(require("react"));
|
|
2265
|
+
var import_editor_controls46 = require("@elementor/editor-controls");
|
|
2200
2266
|
var import_icons21 = require("@elementor/icons");
|
|
2201
|
-
var
|
|
2267
|
+
var import_i18n43 = require("@wordpress/i18n");
|
|
2202
2268
|
var usePropDynamicAction = () => {
|
|
2203
|
-
const { bind } = (0,
|
|
2269
|
+
const { bind } = (0, import_editor_controls46.useBoundProp)();
|
|
2204
2270
|
const { elementType } = useElement();
|
|
2205
2271
|
const propType = elementType.propsSchema[bind];
|
|
2206
2272
|
const visible = !!propType && supportsDynamic(propType);
|
|
2207
2273
|
return {
|
|
2208
2274
|
visible,
|
|
2209
2275
|
icon: import_icons21.DatabaseIcon,
|
|
2210
|
-
title: (0,
|
|
2211
|
-
popoverContent: ({ closePopover }) => /* @__PURE__ */
|
|
2276
|
+
title: (0, import_i18n43.__)("Dynamic Tags", "elementor"),
|
|
2277
|
+
popoverContent: ({ closePopover }) => /* @__PURE__ */ React64.createElement(DynamicSelection, { onSelect: closePopover })
|
|
2212
2278
|
};
|
|
2213
2279
|
};
|
|
2214
2280
|
|