@elementor/editor-editing-panel 1.1.0 → 1.2.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 +24 -0
- package/dist/index.js +630 -377
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +605 -337
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -10
- package/src/components/css-class-selector.tsx +131 -0
- package/src/components/multi-combobox/multi-combobox.tsx +34 -32
- package/src/components/multi-combobox/types.ts +2 -0
- package/src/components/multi-combobox/use-combobox-actions.ts +4 -4
- package/src/components/style-sections/layout-section/align-items-field.tsx +92 -0
- package/src/components/style-sections/layout-section/flex-direction-field.tsx +64 -0
- package/src/components/style-sections/layout-section/flex-order-field.tsx +114 -0
- package/src/components/style-sections/layout-section/justify-content-field.tsx +58 -31
- package/src/components/style-sections/layout-section/layout-section.tsx +21 -2
- package/src/components/style-sections/layout-section/wrap-field.tsx +52 -0
- package/src/components/style-sections/typography-section/text-stroke-field.tsx +41 -6
- package/src/components/style-tab.tsx +2 -2
- package/src/components/css-class-selector-section.tsx +0 -76
- package/src/components/style-sections/layout-section/utils/rotate-flex-icon.ts +0 -12
package/dist/index.mjs
CHANGED
|
@@ -19,12 +19,12 @@ import { __privateListenTo as listenTo, commandStartEvent } from "@elementor/edi
|
|
|
19
19
|
import { __createPanel as createPanel } from "@elementor/editor-panels";
|
|
20
20
|
|
|
21
21
|
// src/components/editing-panel.tsx
|
|
22
|
-
import * as
|
|
22
|
+
import * as React54 from "react";
|
|
23
23
|
import { ControlActionsProvider, ControlReplacementProvider } from "@elementor/editor-controls";
|
|
24
24
|
import { useSelectedElement } from "@elementor/editor-elements";
|
|
25
25
|
import { Panel, PanelBody, PanelHeader, PanelHeaderTitle } from "@elementor/editor-panels";
|
|
26
26
|
import { ErrorBoundary } from "@elementor/ui";
|
|
27
|
-
import { __ as
|
|
27
|
+
import { __ as __35 } from "@wordpress/i18n";
|
|
28
28
|
|
|
29
29
|
// src/contexts/element-context.tsx
|
|
30
30
|
import * as React from "react";
|
|
@@ -95,10 +95,10 @@ function EditorPanelErrorFallback() {
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
// src/components/editing-panel-tabs.tsx
|
|
98
|
-
import * as
|
|
99
|
-
import { Fragment as
|
|
100
|
-
import { Divider as
|
|
101
|
-
import { __ as
|
|
98
|
+
import * as React53 from "react";
|
|
99
|
+
import { Fragment as Fragment6 } from "react";
|
|
100
|
+
import { Divider as Divider8, Stack as Stack18, Tab, TabPanel, Tabs, useTabs } from "@elementor/ui";
|
|
101
|
+
import { __ as __34 } from "@wordpress/i18n";
|
|
102
102
|
|
|
103
103
|
// src/components/settings-tab.tsx
|
|
104
104
|
import * as React9 from "react";
|
|
@@ -254,13 +254,13 @@ var Control2 = ({ control }) => {
|
|
|
254
254
|
};
|
|
255
255
|
|
|
256
256
|
// src/components/style-tab.tsx
|
|
257
|
-
import * as
|
|
257
|
+
import * as React52 from "react";
|
|
258
258
|
import { useState as useState4 } from "react";
|
|
259
259
|
import { useElementSetting as useElementSetting3, useElementStyles as useElementStyles2 } from "@elementor/editor-elements";
|
|
260
260
|
import { useActiveBreakpoint } from "@elementor/editor-responsive";
|
|
261
261
|
import { generateId } from "@elementor/editor-styles";
|
|
262
|
-
import { Divider as
|
|
263
|
-
import { __ as
|
|
262
|
+
import { Divider as Divider7 } from "@elementor/ui";
|
|
263
|
+
import { __ as __33 } from "@wordpress/i18n";
|
|
264
264
|
|
|
265
265
|
// src/contexts/classes-prop-context.tsx
|
|
266
266
|
import * as React10 from "react";
|
|
@@ -292,9 +292,10 @@ function useStyle() {
|
|
|
292
292
|
return context;
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
-
// src/components/css-class-selector
|
|
295
|
+
// src/components/css-class-selector.tsx
|
|
296
296
|
import * as React13 from "react";
|
|
297
|
-
import { useElementSetting as useElementSetting2, useElementStyles } from "@elementor/editor-elements";
|
|
297
|
+
import { updateSettings as updateSettings2, useElementSetting as useElementSetting2, useElementStyles } from "@elementor/editor-elements";
|
|
298
|
+
import { classesPropTypeUtil } from "@elementor/editor-props";
|
|
298
299
|
import { Chip as Chip2, Stack as Stack3, Typography as Typography2 } from "@elementor/ui";
|
|
299
300
|
import { __ } from "@wordpress/i18n";
|
|
300
301
|
|
|
@@ -310,9 +311,9 @@ import {
|
|
|
310
311
|
|
|
311
312
|
// src/components/multi-combobox/use-combobox-actions.ts
|
|
312
313
|
import { createFilterOptions } from "@elementor/ui";
|
|
313
|
-
var useComboboxActions = (applied, actions, optionsLabel,
|
|
314
|
+
var useComboboxActions = (applied, actions, optionsLabel, onSelect) => ({
|
|
314
315
|
action: {
|
|
315
|
-
is: (opt) =>
|
|
316
|
+
is: (opt) => typeof opt !== "string" && "action" in opt,
|
|
316
317
|
getLabel: (option) => option.action.getLabel(option.label),
|
|
317
318
|
groupBy: (option) => option.action.groupLabel,
|
|
318
319
|
onChange: ({ action, label }) => action?.apply(label),
|
|
@@ -332,10 +333,10 @@ var useComboboxActions = (applied, actions, optionsLabel, onApply) => ({
|
|
|
332
333
|
}
|
|
333
334
|
},
|
|
334
335
|
option: {
|
|
335
|
-
is: (opt) => !("action" in opt),
|
|
336
|
+
is: (opt) => typeof opt !== "string" && !("action" in opt),
|
|
336
337
|
getLabel: (option) => option.label,
|
|
337
338
|
groupBy: () => optionsLabel ?? "",
|
|
338
|
-
onChange: (optionValues) =>
|
|
339
|
+
onChange: (optionValues) => onSelect?.(optionValues),
|
|
339
340
|
getFilteredOptions: (optionList, params) => {
|
|
340
341
|
const appliedValues = applied.map((option) => option.value);
|
|
341
342
|
const optionsWithoutApplied = optionList.filter((option) => !appliedValues.includes(option.value));
|
|
@@ -358,24 +359,19 @@ var createActionOption = (groupLabel, action, inputValue) => ({
|
|
|
358
359
|
var MultiCombobox = ({
|
|
359
360
|
actions = {},
|
|
360
361
|
selected,
|
|
361
|
-
options:
|
|
362
|
+
options: options7,
|
|
362
363
|
optionsLabel,
|
|
363
|
-
|
|
364
|
+
onSelect,
|
|
364
365
|
onCreate,
|
|
365
366
|
...props
|
|
366
367
|
}) => {
|
|
367
|
-
const { action: actionProps, option: optionProps } = useComboboxActions(
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
};
|
|
375
|
-
const handleCreateOption = (values) => {
|
|
376
|
-
const value = values.find((option) => typeof option === "string");
|
|
377
|
-
onCreate?.(value);
|
|
378
|
-
};
|
|
368
|
+
const { action: actionProps, option: optionProps } = useComboboxActions(
|
|
369
|
+
selected,
|
|
370
|
+
actions,
|
|
371
|
+
// TODO: make the group mechanism more generic, allow passing list of groups.
|
|
372
|
+
optionsLabel,
|
|
373
|
+
onSelect
|
|
374
|
+
);
|
|
379
375
|
return /* @__PURE__ */ React12.createElement(
|
|
380
376
|
Autocomplete,
|
|
381
377
|
{
|
|
@@ -387,29 +383,36 @@ var MultiCombobox = ({
|
|
|
387
383
|
disableClearable: true,
|
|
388
384
|
handleHomeEndKeys: true,
|
|
389
385
|
value: selected,
|
|
390
|
-
options:
|
|
386
|
+
options: options7,
|
|
391
387
|
renderGroup,
|
|
392
388
|
renderInput: (params) => /* @__PURE__ */ React12.createElement(TextField, { ...params }),
|
|
393
389
|
getLimitTagsText: (more) => /* @__PURE__ */ React12.createElement(Chip, { size: "tiny", variant: "standard", label: `+${more}`, clickable: true }),
|
|
394
|
-
onChange: (_,
|
|
395
|
-
if (reason === "selectOption") {
|
|
396
|
-
return handleSelectOption(values);
|
|
397
|
-
}
|
|
390
|
+
onChange: (_, selectedOrTypedValue, reason) => {
|
|
398
391
|
if (reason === "createOption") {
|
|
399
|
-
|
|
392
|
+
const typedValue = selectedOrTypedValue.find((option) => typeof option === "string");
|
|
393
|
+
return typedValue && onCreate?.(typedValue);
|
|
394
|
+
}
|
|
395
|
+
const action = selectedOrTypedValue.find((value) => actionProps.is(value));
|
|
396
|
+
if (reason === "selectOption" && action) {
|
|
397
|
+
return actionProps.onChange(action);
|
|
400
398
|
}
|
|
401
|
-
|
|
399
|
+
const selectedValues = selectedOrTypedValue.filter((v) => typeof v !== "string");
|
|
400
|
+
const fixedValues = options7.filter((option) => option.fixed);
|
|
401
|
+
optionProps.onChange([.../* @__PURE__ */ new Set([...fixedValues, ...selectedValues])]);
|
|
402
402
|
},
|
|
403
403
|
getOptionLabel: (option) => {
|
|
404
404
|
if (optionProps.is(option)) {
|
|
405
405
|
return optionProps.getLabel(option);
|
|
406
406
|
}
|
|
407
|
-
|
|
407
|
+
if (actionProps.is(option)) {
|
|
408
|
+
return actionProps.getLabel(option);
|
|
409
|
+
}
|
|
410
|
+
return "";
|
|
408
411
|
},
|
|
409
412
|
filterOptions: (optionList, params) => {
|
|
410
|
-
const
|
|
413
|
+
const filteredOptions = optionProps.getFilteredOptions(optionList, params);
|
|
411
414
|
const actionOptions = actionProps.getFilteredActions(optionList, params);
|
|
412
|
-
return [...actionOptions, ...
|
|
415
|
+
return [...actionOptions, ...filteredOptions];
|
|
413
416
|
},
|
|
414
417
|
groupBy: (option) => (optionProps.is(option) ? optionProps.groupBy() : actionProps.groupBy(option)) ?? ""
|
|
415
418
|
}
|
|
@@ -431,36 +434,40 @@ var GroupItems = styled3("ul")`
|
|
|
431
434
|
padding: 0;
|
|
432
435
|
`;
|
|
433
436
|
|
|
434
|
-
// src/components/css-class-selector
|
|
437
|
+
// src/components/css-class-selector.tsx
|
|
435
438
|
var ID = "elementor-css-class-selector";
|
|
436
439
|
var TAGS_LIMIT = 8;
|
|
437
|
-
function
|
|
438
|
-
const
|
|
440
|
+
function CssClassSelector() {
|
|
441
|
+
const options7 = useOptions();
|
|
439
442
|
const { id: activeId, setId: setActiveId } = useStyle();
|
|
440
|
-
const appliedIds = useAppliedClassesIds();
|
|
441
|
-
const
|
|
442
|
-
const
|
|
443
|
+
const [appliedIds] = useAppliedClassesIds();
|
|
444
|
+
const handleApply = useHandleApply();
|
|
445
|
+
const handleActivate = ({ value }) => setActiveId(value);
|
|
446
|
+
const active = options7.find((option) => option.value === activeId) || null;
|
|
447
|
+
const applied = appliedIds.map((id) => options7.find((option) => option.value === id)).filter((option) => !!option);
|
|
443
448
|
return /* @__PURE__ */ React13.createElement(Stack3, { gap: 1, p: 2 }, /* @__PURE__ */ React13.createElement(Typography2, { component: "label", variant: "caption", htmlFor: ID }, __("CSS Classes", "elementor")), /* @__PURE__ */ React13.createElement(
|
|
444
449
|
MultiCombobox,
|
|
445
450
|
{
|
|
446
451
|
id: ID,
|
|
447
452
|
size: "tiny",
|
|
448
|
-
options:
|
|
453
|
+
options: options7,
|
|
449
454
|
selected: applied,
|
|
455
|
+
onSelect: handleApply,
|
|
450
456
|
limitTags: TAGS_LIMIT,
|
|
451
457
|
optionsLabel: __("Global CSS Classes", "elementor"),
|
|
452
|
-
renderTags: (
|
|
458
|
+
renderTags: (values, getTagProps) => values.map((value, index) => {
|
|
453
459
|
const chipProps = getTagProps({ index });
|
|
460
|
+
const isActive = value.value === active?.value;
|
|
454
461
|
return /* @__PURE__ */ React13.createElement(
|
|
455
462
|
Chip2,
|
|
456
463
|
{
|
|
457
464
|
...chipProps,
|
|
458
465
|
key: chipProps.key,
|
|
459
466
|
size: "small",
|
|
460
|
-
label:
|
|
461
|
-
variant:
|
|
462
|
-
color:
|
|
463
|
-
onClick: () =>
|
|
467
|
+
label: value.label,
|
|
468
|
+
variant: isActive ? "filled" : "standard",
|
|
469
|
+
color: isActive && value.color ? value.color : "default",
|
|
470
|
+
onClick: () => handleActivate(value),
|
|
464
471
|
onDelete: null
|
|
465
472
|
}
|
|
466
473
|
);
|
|
@@ -468,20 +475,51 @@ function CssClassSelectorSection() {
|
|
|
468
475
|
}
|
|
469
476
|
));
|
|
470
477
|
}
|
|
471
|
-
function useAppliedClassesIds() {
|
|
472
|
-
const { element } = useElement();
|
|
473
|
-
const currentClassesProp = useClassesProp();
|
|
474
|
-
return useElementSetting2(element.id, currentClassesProp)?.value || [];
|
|
475
|
-
}
|
|
476
478
|
function useOptions() {
|
|
477
479
|
const { element } = useElement();
|
|
478
480
|
const styleDefs = useElementStyles(element.id);
|
|
479
481
|
return Object.values(styleDefs).map((styleDef) => ({
|
|
480
482
|
label: styleDef.label,
|
|
481
483
|
value: styleDef.id,
|
|
484
|
+
fixed: true,
|
|
482
485
|
color: "primary"
|
|
483
486
|
}));
|
|
484
487
|
}
|
|
488
|
+
function useAppliedClassesIds() {
|
|
489
|
+
const { element } = useElement();
|
|
490
|
+
const currentClassesProp = useClassesProp();
|
|
491
|
+
const value = useElementSetting2(element.id, currentClassesProp)?.value || [];
|
|
492
|
+
const setValue = (ids) => {
|
|
493
|
+
updateSettings2({
|
|
494
|
+
id: element.id,
|
|
495
|
+
props: {
|
|
496
|
+
[currentClassesProp]: classesPropTypeUtil.create(ids)
|
|
497
|
+
}
|
|
498
|
+
});
|
|
499
|
+
};
|
|
500
|
+
return [value, setValue];
|
|
501
|
+
}
|
|
502
|
+
function useHandleApply() {
|
|
503
|
+
const { id: activeId, setId: setActiveId } = useStyle();
|
|
504
|
+
const [appliedIds, setAppliedIds] = useAppliedClassesIds();
|
|
505
|
+
return (selectedOptions) => {
|
|
506
|
+
const selectedValues = selectedOptions.map(({ value }) => value);
|
|
507
|
+
const isSameClassesAlreadyApplied = selectedValues.length === appliedIds.length && selectedValues.every((value) => appliedIds.includes(value));
|
|
508
|
+
if (isSameClassesAlreadyApplied) {
|
|
509
|
+
return;
|
|
510
|
+
}
|
|
511
|
+
setAppliedIds(selectedValues);
|
|
512
|
+
const addedValue = selectedValues.find((id) => !appliedIds.includes(id));
|
|
513
|
+
if (addedValue) {
|
|
514
|
+
setActiveId(addedValue);
|
|
515
|
+
return;
|
|
516
|
+
}
|
|
517
|
+
const removedValue = appliedIds.find((id) => !selectedValues.includes(id));
|
|
518
|
+
if (removedValue && removedValue === activeId) {
|
|
519
|
+
setActiveId(selectedValues[0] ?? null);
|
|
520
|
+
}
|
|
521
|
+
};
|
|
522
|
+
}
|
|
485
523
|
|
|
486
524
|
// src/components/style-sections/background-section/background-section.tsx
|
|
487
525
|
import * as React16 from "react";
|
|
@@ -739,123 +777,344 @@ var EffectsSection = () => {
|
|
|
739
777
|
};
|
|
740
778
|
|
|
741
779
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
742
|
-
import * as
|
|
743
|
-
import {
|
|
780
|
+
import * as React31 from "react";
|
|
781
|
+
import { ControlLabel as ControlLabel12 } from "@elementor/editor-controls";
|
|
782
|
+
import { Divider as Divider3, Stack as Stack11 } from "@elementor/ui";
|
|
783
|
+
import { __ as __14 } from "@wordpress/i18n";
|
|
744
784
|
|
|
745
|
-
// src/components/style-sections/layout-section/
|
|
785
|
+
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
746
786
|
import * as React25 from "react";
|
|
747
787
|
import { ControlLabel as ControlLabel6, ToggleControl } from "@elementor/editor-controls";
|
|
748
|
-
import {
|
|
788
|
+
import {
|
|
789
|
+
LayoutAlignCenterIcon as CenterIcon,
|
|
790
|
+
LayoutAlignLeftIcon,
|
|
791
|
+
LayoutAlignRightIcon,
|
|
792
|
+
LayoutDistributeVerticalIcon as JustifyIcon
|
|
793
|
+
} from "@elementor/icons";
|
|
794
|
+
import { DirectionProvider, Grid as Grid4, ThemeProvider, useTheme as useTheme2, withDirection } from "@elementor/ui";
|
|
749
795
|
import { __ as __8 } from "@wordpress/i18n";
|
|
750
|
-
|
|
751
|
-
|
|
796
|
+
|
|
797
|
+
// src/hooks/use-direction.ts
|
|
798
|
+
import { useTheme } from "@elementor/ui";
|
|
799
|
+
function useDirection() {
|
|
800
|
+
const theme = useTheme(), extendedWindow = window;
|
|
801
|
+
const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!extendedWindow.elementorFrontend?.config?.is_rtl;
|
|
802
|
+
return { isSiteRtl, isUiRtl };
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
806
|
+
var AlignItemsField = () => {
|
|
807
|
+
const options7 = useOptions2(), { isSiteRtl } = useDirection();
|
|
808
|
+
return /* @__PURE__ */ React25.createElement(DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React25.createElement(ThemeProvider, null, /* @__PURE__ */ React25.createElement(StylesField, { bind: "align-items" }, /* @__PURE__ */ React25.createElement(Grid4, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React25.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React25.createElement(ControlLabel6, null, __8("Align Items", "elementor"))), /* @__PURE__ */ React25.createElement(Grid4, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React25.createElement(ToggleControl, { options: options7 }))))));
|
|
809
|
+
};
|
|
810
|
+
var useOptions2 = () => {
|
|
811
|
+
const StartIcon = withDirection(LayoutAlignLeftIcon), EndIcon = withDirection(LayoutAlignRightIcon);
|
|
812
|
+
return [
|
|
752
813
|
{
|
|
753
|
-
value: "
|
|
754
|
-
|
|
755
|
-
|
|
814
|
+
value: "start",
|
|
815
|
+
label: __8("Start", "elementor"),
|
|
816
|
+
renderContent: ({ size }) => /* @__PURE__ */ React25.createElement(RotatedIcon, { icon: StartIcon, size }),
|
|
817
|
+
showTooltip: true
|
|
756
818
|
},
|
|
757
819
|
{
|
|
758
|
-
value: "
|
|
759
|
-
|
|
760
|
-
|
|
820
|
+
value: "center",
|
|
821
|
+
label: __8("Center", "elementor"),
|
|
822
|
+
renderContent: ({ size }) => /* @__PURE__ */ React25.createElement(RotatedIcon, { icon: CenterIcon, size }),
|
|
823
|
+
showTooltip: true
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
value: "end",
|
|
827
|
+
label: __8("End", "elementor"),
|
|
828
|
+
renderContent: ({ size }) => /* @__PURE__ */ React25.createElement(RotatedIcon, { icon: EndIcon, size }),
|
|
829
|
+
showTooltip: true
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
value: "justify",
|
|
833
|
+
label: __8("Justify", "elementor"),
|
|
834
|
+
renderContent: ({ size }) => /* @__PURE__ */ React25.createElement(RotatedIcon, { icon: JustifyIcon, size }),
|
|
835
|
+
showTooltip: true
|
|
761
836
|
}
|
|
762
837
|
];
|
|
763
|
-
|
|
838
|
+
};
|
|
839
|
+
var RotatedIcon = ({ icon: Icon, size }) => {
|
|
840
|
+
const [direction] = useStylesField("flex-direction"), isRtl = "rtl" === useTheme2().direction, rotationMultiplier = isRtl ? -1 : 1;
|
|
841
|
+
const rotationAngelMap = {
|
|
842
|
+
row: 90,
|
|
843
|
+
column: 0,
|
|
844
|
+
"row-reverse": -90,
|
|
845
|
+
"column-reverse": -180
|
|
846
|
+
};
|
|
847
|
+
return /* @__PURE__ */ React25.createElement(
|
|
848
|
+
Icon,
|
|
849
|
+
{
|
|
850
|
+
fontSize: size,
|
|
851
|
+
sx: { transition: ".3s", rotate: `${rotationAngelMap[direction || "row"] * rotationMultiplier}deg` }
|
|
852
|
+
}
|
|
853
|
+
);
|
|
764
854
|
};
|
|
765
855
|
|
|
766
|
-
// src/components/style-sections/layout-section/
|
|
856
|
+
// src/components/style-sections/layout-section/display-field.tsx
|
|
767
857
|
import * as React26 from "react";
|
|
768
858
|
import { ControlLabel as ControlLabel7, ToggleControl as ToggleControl2 } from "@elementor/editor-controls";
|
|
769
|
-
import {
|
|
770
|
-
JustifyBottomIcon,
|
|
771
|
-
JustifyCenterIcon,
|
|
772
|
-
JustifyDistributeVerticalIcon,
|
|
773
|
-
JustifySpaceAroundVerticalIcon,
|
|
774
|
-
JustifySpaceBetweenVerticalIcon,
|
|
775
|
-
JustifyTopIcon
|
|
776
|
-
} from "@elementor/icons";
|
|
777
|
-
import { Stack as Stack9 } from "@elementor/ui";
|
|
859
|
+
import { Stack as Stack8 } from "@elementor/ui";
|
|
778
860
|
import { __ as __9 } from "@wordpress/i18n";
|
|
861
|
+
var DisplayField = () => {
|
|
862
|
+
const options7 = [
|
|
863
|
+
{
|
|
864
|
+
value: "block",
|
|
865
|
+
renderContent: () => __9("Block", "elementor"),
|
|
866
|
+
label: __9("Block", "elementor")
|
|
867
|
+
},
|
|
868
|
+
{
|
|
869
|
+
value: "flex",
|
|
870
|
+
renderContent: () => __9("Flex", "elementor"),
|
|
871
|
+
label: __9("Flex", "elementor")
|
|
872
|
+
}
|
|
873
|
+
];
|
|
874
|
+
return /* @__PURE__ */ React26.createElement(StylesField, { bind: "display" }, /* @__PURE__ */ React26.createElement(Stack8, { gap: 1 }, /* @__PURE__ */ React26.createElement(ControlLabel7, null, __9("Display", "elementor")), /* @__PURE__ */ React26.createElement(ToggleControl2, { options: options7, fullWidth: true })));
|
|
875
|
+
};
|
|
779
876
|
|
|
780
|
-
// src/
|
|
781
|
-
import
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
877
|
+
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
878
|
+
import * as React27 from "react";
|
|
879
|
+
import { ControlLabel as ControlLabel8, ToggleControl as ToggleControl3 } from "@elementor/editor-controls";
|
|
880
|
+
import { ArrowDownSmallIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpSmallIcon } from "@elementor/icons";
|
|
881
|
+
import { DirectionProvider as DirectionProvider2, Grid as Grid5, ThemeProvider as ThemeProvider2, withDirection as withDirection2 } from "@elementor/ui";
|
|
882
|
+
import { __ as __10 } from "@wordpress/i18n";
|
|
883
|
+
var options = [
|
|
884
|
+
{
|
|
885
|
+
value: "row",
|
|
886
|
+
label: __10("Row", "elementor"),
|
|
887
|
+
renderContent: ({ size }) => {
|
|
888
|
+
const StartIcon = withDirection2(ArrowRightIcon);
|
|
889
|
+
return /* @__PURE__ */ React27.createElement(StartIcon, { fontSize: size });
|
|
890
|
+
},
|
|
891
|
+
showTooltip: true
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
value: "column",
|
|
895
|
+
label: __10("Column", "elementor"),
|
|
896
|
+
renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(ArrowDownSmallIcon, { fontSize: size }),
|
|
897
|
+
showTooltip: true
|
|
898
|
+
},
|
|
899
|
+
{
|
|
900
|
+
value: "row-reverse",
|
|
901
|
+
label: __10("Row reverse", "elementor"),
|
|
902
|
+
renderContent: ({ size }) => {
|
|
903
|
+
const EndIcon = withDirection2(ArrowLeftIcon);
|
|
904
|
+
return /* @__PURE__ */ React27.createElement(EndIcon, { fontSize: size });
|
|
905
|
+
},
|
|
906
|
+
showTooltip: true
|
|
907
|
+
},
|
|
908
|
+
{
|
|
909
|
+
value: "column-reverse",
|
|
910
|
+
label: __10("Column reverse", "elementor"),
|
|
911
|
+
renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(ArrowUpSmallIcon, { fontSize: size }),
|
|
912
|
+
showTooltip: true
|
|
913
|
+
}
|
|
914
|
+
];
|
|
915
|
+
var FlexDirectionField = () => {
|
|
916
|
+
const { isSiteRtl } = useDirection();
|
|
917
|
+
return /* @__PURE__ */ React27.createElement(DirectionProvider2, { rtl: isSiteRtl }, /* @__PURE__ */ React27.createElement(ThemeProvider2, null, /* @__PURE__ */ React27.createElement(StylesField, { bind: "flex-direction" }, /* @__PURE__ */ React27.createElement(Grid5, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React27.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React27.createElement(ControlLabel8, null, __10("Direction", "elementor"))), /* @__PURE__ */ React27.createElement(Grid5, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React27.createElement(ToggleControl3, { options }))))));
|
|
918
|
+
};
|
|
787
919
|
|
|
788
|
-
// src/components/style-sections/layout-section/
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
920
|
+
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
921
|
+
import * as React28 from "react";
|
|
922
|
+
import { useState as useState2 } from "react";
|
|
923
|
+
import {
|
|
924
|
+
ControlLabel as ControlLabel9,
|
|
925
|
+
ControlToggleButtonGroup,
|
|
926
|
+
NumberControl
|
|
927
|
+
} from "@elementor/editor-controls";
|
|
928
|
+
import { ArrowDownSmallIcon as ArrowDownSmallIcon2, ArrowUpSmallIcon as ArrowUpSmallIcon2, PencilIcon } from "@elementor/icons";
|
|
929
|
+
import { DirectionProvider as DirectionProvider3, Grid as Grid6, Stack as Stack9, ThemeProvider as ThemeProvider3 } from "@elementor/ui";
|
|
930
|
+
import { __ as __11 } from "@wordpress/i18n";
|
|
931
|
+
var FIRST_DEFAULT_VALUE = -99999;
|
|
932
|
+
var LAST_DEFAULT_VALUE = 99999;
|
|
933
|
+
var FIRST = "first";
|
|
934
|
+
var LAST = "last";
|
|
935
|
+
var CUSTOM = "custom";
|
|
936
|
+
var items = [
|
|
937
|
+
{
|
|
938
|
+
value: FIRST,
|
|
939
|
+
label: __11("First", "elementor"),
|
|
940
|
+
renderContent: ({ size }) => /* @__PURE__ */ React28.createElement(ArrowUpSmallIcon2, { fontSize: size }),
|
|
941
|
+
showTooltip: true
|
|
942
|
+
},
|
|
943
|
+
{
|
|
944
|
+
value: LAST,
|
|
945
|
+
label: __11("Last", "elementor"),
|
|
946
|
+
renderContent: ({ size }) => /* @__PURE__ */ React28.createElement(ArrowDownSmallIcon2, { fontSize: size }),
|
|
947
|
+
showTooltip: true
|
|
948
|
+
},
|
|
949
|
+
{
|
|
950
|
+
value: CUSTOM,
|
|
951
|
+
label: __11("Custom", "elementor"),
|
|
952
|
+
renderContent: ({ size }) => /* @__PURE__ */ React28.createElement(PencilIcon, { fontSize: size }),
|
|
953
|
+
showTooltip: true
|
|
954
|
+
}
|
|
955
|
+
];
|
|
956
|
+
var FlexOrderField = () => {
|
|
957
|
+
const { isSiteRtl } = useDirection(), [order, setOrder] = useStylesField("order");
|
|
958
|
+
const [groupControlValue, setGroupControlValue] = useState2(getGroupControlValue(order));
|
|
959
|
+
const handleToggleButtonChange = (group) => {
|
|
960
|
+
setGroupControlValue(group);
|
|
961
|
+
const orderValueMap = {
|
|
962
|
+
[FIRST]: FIRST_DEFAULT_VALUE,
|
|
963
|
+
[LAST]: LAST_DEFAULT_VALUE,
|
|
964
|
+
[CUSTOM]: null
|
|
965
|
+
};
|
|
966
|
+
setOrder(group ? orderValueMap[group] : null);
|
|
795
967
|
};
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
968
|
+
return /* @__PURE__ */ React28.createElement(DirectionProvider3, { rtl: isSiteRtl }, /* @__PURE__ */ React28.createElement(ThemeProvider3, null, /* @__PURE__ */ React28.createElement(Stack9, { gap: 2 }, /* @__PURE__ */ React28.createElement(Grid6, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React28.createElement(Grid6, { item: true, xs: 6 }, /* @__PURE__ */ React28.createElement(ControlLabel9, null, __11("Order", "elementor"))), /* @__PURE__ */ React28.createElement(Grid6, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React28.createElement(
|
|
969
|
+
ControlToggleButtonGroup,
|
|
970
|
+
{
|
|
971
|
+
items,
|
|
972
|
+
value: groupControlValue,
|
|
973
|
+
onChange: handleToggleButtonChange,
|
|
974
|
+
exclusive: true
|
|
975
|
+
}
|
|
976
|
+
))), CUSTOM === groupControlValue && /* @__PURE__ */ React28.createElement(StylesField, { bind: "order" }, /* @__PURE__ */ React28.createElement(Grid6, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React28.createElement(Grid6, { item: true, xs: 6 }, /* @__PURE__ */ React28.createElement(ControlLabel9, null, __11("Custom order", "elementor"))), /* @__PURE__ */ React28.createElement(Grid6, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React28.createElement(
|
|
977
|
+
NumberControl,
|
|
978
|
+
{
|
|
979
|
+
min: FIRST_DEFAULT_VALUE + 1,
|
|
980
|
+
max: LAST_DEFAULT_VALUE - 1,
|
|
981
|
+
shouldForceInt: true
|
|
982
|
+
}
|
|
983
|
+
)))))));
|
|
984
|
+
};
|
|
985
|
+
var getGroupControlValue = (order) => {
|
|
986
|
+
if (LAST_DEFAULT_VALUE === order) {
|
|
987
|
+
return LAST;
|
|
988
|
+
}
|
|
989
|
+
if (FIRST_DEFAULT_VALUE === order) {
|
|
990
|
+
return FIRST;
|
|
991
|
+
}
|
|
992
|
+
return 0 === order || order ? CUSTOM : null;
|
|
993
|
+
};
|
|
799
994
|
|
|
800
995
|
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
996
|
+
import * as React29 from "react";
|
|
997
|
+
import { ControlLabel as ControlLabel10, ToggleControl as ToggleControl4 } from "@elementor/editor-controls";
|
|
998
|
+
import {
|
|
999
|
+
JustifyBottomIcon,
|
|
1000
|
+
JustifyCenterIcon as CenterIcon2,
|
|
1001
|
+
JustifyDistributeVerticalIcon as EvenlyIcon,
|
|
1002
|
+
JustifySpaceAroundVerticalIcon as AroundIcon,
|
|
1003
|
+
JustifySpaceBetweenVerticalIcon as BetweenIcon,
|
|
1004
|
+
JustifyTopIcon
|
|
1005
|
+
} from "@elementor/icons";
|
|
1006
|
+
import {
|
|
1007
|
+
DirectionProvider as DirectionProvider4,
|
|
1008
|
+
Stack as Stack10,
|
|
1009
|
+
ThemeProvider as ThemeProvider4,
|
|
1010
|
+
useTheme as useTheme3,
|
|
1011
|
+
withDirection as withDirection3
|
|
1012
|
+
} from "@elementor/ui";
|
|
1013
|
+
import { __ as __12 } from "@wordpress/i18n";
|
|
801
1014
|
var JustifyContentField = () => {
|
|
802
|
-
const
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
1015
|
+
const options7 = useOptions3(), { isSiteRtl } = useDirection();
|
|
1016
|
+
return /* @__PURE__ */ React29.createElement(DirectionProvider4, { rtl: isSiteRtl }, /* @__PURE__ */ React29.createElement(ThemeProvider4, null, /* @__PURE__ */ React29.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React29.createElement(Stack10, { gap: 1 }, /* @__PURE__ */ React29.createElement(ControlLabel10, null, __12("Justify Content", "elementor")), /* @__PURE__ */ React29.createElement(ToggleControl4, { options: options7, fullWidth: true })))));
|
|
1017
|
+
};
|
|
1018
|
+
var useOptions3 = () => {
|
|
1019
|
+
const StartIcon = withDirection3(JustifyTopIcon), EndIcon = withDirection3(JustifyBottomIcon);
|
|
1020
|
+
return [
|
|
806
1021
|
{
|
|
807
1022
|
value: "start",
|
|
808
|
-
label:
|
|
809
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1023
|
+
label: __12("Start", "elementor"),
|
|
1024
|
+
renderContent: ({ size }) => /* @__PURE__ */ React29.createElement(RotatedIcon2, { icon: StartIcon, size }),
|
|
810
1025
|
showTooltip: true
|
|
811
1026
|
},
|
|
812
1027
|
{
|
|
813
1028
|
value: "center",
|
|
814
|
-
label:
|
|
815
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1029
|
+
label: __12("Center", "elementor"),
|
|
1030
|
+
renderContent: ({ size }) => /* @__PURE__ */ React29.createElement(RotatedIcon2, { icon: CenterIcon2, size }),
|
|
816
1031
|
showTooltip: true
|
|
817
1032
|
},
|
|
818
1033
|
{
|
|
819
1034
|
value: "end",
|
|
820
|
-
label:
|
|
821
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1035
|
+
label: __12("End", "elementor"),
|
|
1036
|
+
renderContent: ({ size }) => /* @__PURE__ */ React29.createElement(RotatedIcon2, { icon: EndIcon, size }),
|
|
822
1037
|
showTooltip: true
|
|
823
1038
|
},
|
|
824
1039
|
{
|
|
825
1040
|
value: "space-between",
|
|
826
|
-
label:
|
|
827
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1041
|
+
label: __12("Space between", "elementor"),
|
|
1042
|
+
renderContent: ({ size }) => /* @__PURE__ */ React29.createElement(RotatedIcon2, { icon: BetweenIcon, size }),
|
|
828
1043
|
showTooltip: true
|
|
829
1044
|
},
|
|
830
1045
|
{
|
|
831
1046
|
value: "space-around",
|
|
832
|
-
label:
|
|
833
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1047
|
+
label: __12("Space around", "elementor"),
|
|
1048
|
+
renderContent: ({ size }) => /* @__PURE__ */ React29.createElement(RotatedIcon2, { icon: AroundIcon, size }),
|
|
834
1049
|
showTooltip: true
|
|
835
1050
|
},
|
|
836
1051
|
{
|
|
837
1052
|
value: "space-evenly",
|
|
838
|
-
label:
|
|
839
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1053
|
+
label: __12("Space evenly", "elementor"),
|
|
1054
|
+
renderContent: ({ size }) => /* @__PURE__ */ React29.createElement(RotatedIcon2, { icon: EvenlyIcon, size }),
|
|
840
1055
|
showTooltip: true
|
|
841
1056
|
}
|
|
842
1057
|
];
|
|
843
|
-
|
|
844
|
-
|
|
1058
|
+
};
|
|
1059
|
+
var RotatedIcon2 = ({ icon: Icon, size }) => {
|
|
1060
|
+
const [direction] = useStylesField("flex-direction"), isRtl = "rtl" === useTheme3().direction, rotationMultiplier = isRtl ? -1 : 1;
|
|
1061
|
+
const rotationAngelMap = {
|
|
1062
|
+
row: -90,
|
|
1063
|
+
column: 0,
|
|
1064
|
+
"row-reverse": 90,
|
|
1065
|
+
"column-reverse": 180
|
|
1066
|
+
};
|
|
1067
|
+
return /* @__PURE__ */ React29.createElement(
|
|
1068
|
+
Icon,
|
|
1069
|
+
{
|
|
1070
|
+
fontSize: size,
|
|
1071
|
+
sx: { transition: ".3s", rotate: `${rotationAngelMap[direction || "row"] * rotationMultiplier}deg` }
|
|
1072
|
+
}
|
|
1073
|
+
);
|
|
1074
|
+
};
|
|
1075
|
+
|
|
1076
|
+
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
1077
|
+
import * as React30 from "react";
|
|
1078
|
+
import { ControlLabel as ControlLabel11, ToggleControl as ToggleControl5 } from "@elementor/editor-controls";
|
|
1079
|
+
import { ArrowBackIcon, ArrowForwardIcon, ArrowRightIcon as ArrowRightIcon2 } from "@elementor/icons";
|
|
1080
|
+
import { DirectionProvider as DirectionProvider5, Grid as Grid7, ThemeProvider as ThemeProvider5 } from "@elementor/ui";
|
|
1081
|
+
import { __ as __13 } from "@wordpress/i18n";
|
|
1082
|
+
var options2 = [
|
|
1083
|
+
{
|
|
1084
|
+
value: "nowrap",
|
|
1085
|
+
label: __13("No wrap", "elementor"),
|
|
1086
|
+
renderContent: ({ size }) => /* @__PURE__ */ React30.createElement(ArrowRightIcon2, { fontSize: size }),
|
|
1087
|
+
showTooltip: true
|
|
1088
|
+
},
|
|
1089
|
+
{
|
|
1090
|
+
value: "wrap",
|
|
1091
|
+
label: __13("Wrap", "elementor"),
|
|
1092
|
+
renderContent: ({ size }) => /* @__PURE__ */ React30.createElement(ArrowBackIcon, { fontSize: size }),
|
|
1093
|
+
showTooltip: true
|
|
1094
|
+
},
|
|
1095
|
+
{
|
|
1096
|
+
value: "wrap-reverse",
|
|
1097
|
+
label: __13("Wrap reverse", "elementor"),
|
|
1098
|
+
renderContent: ({ size }) => /* @__PURE__ */ React30.createElement(ArrowForwardIcon, { fontSize: size }),
|
|
1099
|
+
showTooltip: true
|
|
845
1100
|
}
|
|
846
|
-
|
|
1101
|
+
];
|
|
1102
|
+
var WrapField = () => {
|
|
1103
|
+
const { isSiteRtl } = useDirection();
|
|
1104
|
+
return /* @__PURE__ */ React30.createElement(DirectionProvider5, { rtl: isSiteRtl }, /* @__PURE__ */ React30.createElement(ThemeProvider5, null, /* @__PURE__ */ React30.createElement(StylesField, { bind: "flex-wrap" }, /* @__PURE__ */ React30.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React30.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React30.createElement(ControlLabel11, null, __13("Wrap", "elementor"))), /* @__PURE__ */ React30.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React30.createElement(ToggleControl5, { options: options2 }))))));
|
|
847
1105
|
};
|
|
848
1106
|
|
|
849
1107
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
850
1108
|
var LayoutSection = () => {
|
|
851
1109
|
const [display] = useStylesField("display");
|
|
852
|
-
return /* @__PURE__ */
|
|
1110
|
+
return /* @__PURE__ */ React31.createElement(Stack11, { gap: 2 }, /* @__PURE__ */ React31.createElement(DisplayField, null), "flex" === display && /* @__PURE__ */ React31.createElement(FlexFields, null));
|
|
853
1111
|
};
|
|
1112
|
+
var FlexFields = () => /* @__PURE__ */ React31.createElement(React31.Fragment, null, /* @__PURE__ */ React31.createElement(FlexDirectionField, null), /* @__PURE__ */ React31.createElement(JustifyContentField, null), /* @__PURE__ */ React31.createElement(AlignItemsField, null), /* @__PURE__ */ React31.createElement(Divider3, null), /* @__PURE__ */ React31.createElement(WrapField, null), /* @__PURE__ */ React31.createElement(Divider3, null), /* @__PURE__ */ React31.createElement(ControlLabel12, null, __14("Flex child", "elementor")), /* @__PURE__ */ React31.createElement(FlexOrderField, null));
|
|
854
1113
|
|
|
855
1114
|
// src/components/style-sections/position-section/position-section.tsx
|
|
856
|
-
import * as
|
|
1115
|
+
import * as React35 from "react";
|
|
857
1116
|
import { useCallback as useCallback3 } from "react";
|
|
858
|
-
import { Stack as
|
|
1117
|
+
import { Stack as Stack13 } from "@elementor/ui";
|
|
859
1118
|
|
|
860
1119
|
// src/hooks/use-style-prop-history.ts
|
|
861
1120
|
import { useCallback as useCallback2, useMemo as useMemo2 } from "react";
|
|
@@ -959,46 +1218,46 @@ var useStylePropsHistory = (props) => {
|
|
|
959
1218
|
};
|
|
960
1219
|
|
|
961
1220
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
962
|
-
import * as
|
|
963
|
-
import { ControlLabel as
|
|
1221
|
+
import * as React32 from "react";
|
|
1222
|
+
import { ControlLabel as ControlLabel13, SizeControl as SizeControl2 } from "@elementor/editor-controls";
|
|
964
1223
|
import { SideBottomIcon as SideBottomIcon2, SideLeftIcon as SideLeftIcon2, SideRightIcon as SideRightIcon2, SideTopIcon as SideTopIcon2 } from "@elementor/icons";
|
|
965
|
-
import { Grid as
|
|
966
|
-
import { __ as
|
|
1224
|
+
import { Grid as Grid8, Stack as Stack12 } from "@elementor/ui";
|
|
1225
|
+
import { __ as __15 } from "@wordpress/i18n";
|
|
967
1226
|
var sideIcons = {
|
|
968
|
-
left: /* @__PURE__ */
|
|
969
|
-
right: /* @__PURE__ */
|
|
970
|
-
top: /* @__PURE__ */
|
|
971
|
-
bottom: /* @__PURE__ */
|
|
1227
|
+
left: /* @__PURE__ */ React32.createElement(SideLeftIcon2, { fontSize: "tiny" }),
|
|
1228
|
+
right: /* @__PURE__ */ React32.createElement(SideRightIcon2, { fontSize: "tiny" }),
|
|
1229
|
+
top: /* @__PURE__ */ React32.createElement(SideTopIcon2, { fontSize: "tiny" }),
|
|
1230
|
+
bottom: /* @__PURE__ */ React32.createElement(SideBottomIcon2, { fontSize: "tiny" })
|
|
972
1231
|
};
|
|
973
1232
|
var DimensionsField = () => {
|
|
974
|
-
return /* @__PURE__ */
|
|
1233
|
+
return /* @__PURE__ */ React32.createElement(React32.Fragment, null, /* @__PURE__ */ React32.createElement(Stack12, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(DimensionField, { side: "top", label: __15("Top", "elementor") }), /* @__PURE__ */ React32.createElement(DimensionField, { side: "right", label: __15("Right", "elementor") })), /* @__PURE__ */ React32.createElement(Stack12, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(DimensionField, { side: "bottom", label: __15("Bottom", "elementor") }), /* @__PURE__ */ React32.createElement(DimensionField, { side: "left", label: __15("Left", "elementor") })));
|
|
975
1234
|
};
|
|
976
1235
|
var DimensionField = ({ side, label }) => {
|
|
977
|
-
return /* @__PURE__ */
|
|
1236
|
+
return /* @__PURE__ */ React32.createElement(Grid8, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React32.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React32.createElement(ControlLabel13, null, label)), /* @__PURE__ */ React32.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React32.createElement(StylesField, { bind: side }, /* @__PURE__ */ React32.createElement(SizeControl2, { startIcon: sideIcons[side] }))));
|
|
978
1237
|
};
|
|
979
1238
|
|
|
980
1239
|
// src/components/style-sections/position-section/position-field.tsx
|
|
981
|
-
import * as
|
|
982
|
-
import { ControlLabel as
|
|
983
|
-
import { Grid as
|
|
984
|
-
import { __ as
|
|
1240
|
+
import * as React33 from "react";
|
|
1241
|
+
import { ControlLabel as ControlLabel14, SelectControl as SelectControl3 } from "@elementor/editor-controls";
|
|
1242
|
+
import { Grid as Grid9 } from "@elementor/ui";
|
|
1243
|
+
import { __ as __16 } from "@wordpress/i18n";
|
|
985
1244
|
var positionOptions = [
|
|
986
|
-
{ label:
|
|
987
|
-
{ label:
|
|
988
|
-
{ label:
|
|
989
|
-
{ label:
|
|
1245
|
+
{ label: __16("Static", "elementor"), value: "static" },
|
|
1246
|
+
{ label: __16("Relative", "elementor"), value: "relative" },
|
|
1247
|
+
{ label: __16("Absolute", "elementor"), value: "absolute" },
|
|
1248
|
+
{ label: __16("Fixed", "elementor"), value: "fixed" }
|
|
990
1249
|
];
|
|
991
1250
|
var PositionField = () => {
|
|
992
|
-
return /* @__PURE__ */
|
|
1251
|
+
return /* @__PURE__ */ React33.createElement(StylesField, { bind: "position" }, /* @__PURE__ */ React33.createElement(Grid9, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React33.createElement(Grid9, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(ControlLabel14, null, __16("Position", "elementor"))), /* @__PURE__ */ React33.createElement(Grid9, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(SelectControl3, { options: positionOptions }))));
|
|
993
1252
|
};
|
|
994
1253
|
|
|
995
1254
|
// src/components/style-sections/position-section/z-index-field.tsx
|
|
996
|
-
import * as
|
|
997
|
-
import { ControlLabel as
|
|
998
|
-
import { Grid as
|
|
999
|
-
import { __ as
|
|
1255
|
+
import * as React34 from "react";
|
|
1256
|
+
import { ControlLabel as ControlLabel15, NumberControl as NumberControl2 } from "@elementor/editor-controls";
|
|
1257
|
+
import { Grid as Grid10 } from "@elementor/ui";
|
|
1258
|
+
import { __ as __17 } from "@wordpress/i18n";
|
|
1000
1259
|
var ZIndexField = () => {
|
|
1001
|
-
return /* @__PURE__ */
|
|
1260
|
+
return /* @__PURE__ */ React34.createElement(StylesField, { bind: "z-index" }, /* @__PURE__ */ React34.createElement(Grid10, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React34.createElement(Grid10, { item: true, xs: 6 }, /* @__PURE__ */ React34.createElement(ControlLabel15, null, __17("Z-Index", "elementor"))), /* @__PURE__ */ React34.createElement(Grid10, { item: true, xs: 6 }, /* @__PURE__ */ React34.createElement(NumberControl2, null))));
|
|
1002
1261
|
};
|
|
1003
1262
|
|
|
1004
1263
|
// src/components/style-sections/position-section/position-section.tsx
|
|
@@ -1007,7 +1266,7 @@ var PositionSection = () => {
|
|
|
1007
1266
|
const [positionValue] = useStylesField("position");
|
|
1008
1267
|
usePositionChangeHandler();
|
|
1009
1268
|
const isNotStatic = positionValue && positionValue !== "static";
|
|
1010
|
-
return /* @__PURE__ */
|
|
1269
|
+
return /* @__PURE__ */ React35.createElement(Stack13, { gap: 1.5 }, /* @__PURE__ */ React35.createElement(PositionField, null), isNotStatic ? /* @__PURE__ */ React35.createElement(React35.Fragment, null, /* @__PURE__ */ React35.createElement(DimensionsField, null), /* @__PURE__ */ React35.createElement(ZIndexField, null)) : null);
|
|
1011
1270
|
};
|
|
1012
1271
|
var usePositionChangeHandler = () => {
|
|
1013
1272
|
const dimensionsHistory = useStylePropsHistory(dimensionsPropKeys);
|
|
@@ -1032,73 +1291,73 @@ var usePositionChangeHandler = () => {
|
|
|
1032
1291
|
};
|
|
1033
1292
|
|
|
1034
1293
|
// src/components/style-sections/size-section/size-section.tsx
|
|
1035
|
-
import * as
|
|
1036
|
-
import { ControlLabel as
|
|
1037
|
-
import { Divider as
|
|
1038
|
-
import { __ as
|
|
1294
|
+
import * as React37 from "react";
|
|
1295
|
+
import { ControlLabel as ControlLabel17, SizeControl as SizeControl3 } from "@elementor/editor-controls";
|
|
1296
|
+
import { Divider as Divider4, Grid as Grid12, Stack as Stack14 } from "@elementor/ui";
|
|
1297
|
+
import { __ as __19 } from "@wordpress/i18n";
|
|
1039
1298
|
|
|
1040
1299
|
// src/components/style-sections/size-section/overflow-field.tsx
|
|
1041
|
-
import * as
|
|
1042
|
-
import { ControlLabel as
|
|
1300
|
+
import * as React36 from "react";
|
|
1301
|
+
import { ControlLabel as ControlLabel16, ToggleControl as ToggleControl6 } from "@elementor/editor-controls";
|
|
1043
1302
|
import { ExpandBottomIcon, EyeIcon, EyeOffIcon } from "@elementor/icons";
|
|
1044
|
-
import { Grid as
|
|
1045
|
-
import { __ as
|
|
1046
|
-
var
|
|
1303
|
+
import { Grid as Grid11 } from "@elementor/ui";
|
|
1304
|
+
import { __ as __18 } from "@wordpress/i18n";
|
|
1305
|
+
var options3 = [
|
|
1047
1306
|
{
|
|
1048
1307
|
value: "visible",
|
|
1049
|
-
label:
|
|
1050
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1308
|
+
label: __18("Visible", "elementor"),
|
|
1309
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(EyeIcon, { fontSize: size }),
|
|
1051
1310
|
showTooltip: true
|
|
1052
1311
|
},
|
|
1053
1312
|
{
|
|
1054
1313
|
value: "hidden",
|
|
1055
|
-
label:
|
|
1056
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1314
|
+
label: __18("Hidden", "elementor"),
|
|
1315
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(EyeOffIcon, { fontSize: size }),
|
|
1057
1316
|
showTooltip: true
|
|
1058
1317
|
},
|
|
1059
1318
|
{
|
|
1060
1319
|
value: "auto",
|
|
1061
|
-
label:
|
|
1062
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1320
|
+
label: __18("Auto", "elementor"),
|
|
1321
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(ExpandBottomIcon, { fontSize: size }),
|
|
1063
1322
|
showTooltip: true
|
|
1064
1323
|
}
|
|
1065
1324
|
];
|
|
1066
1325
|
var OverflowField = () => {
|
|
1067
|
-
return /* @__PURE__ */
|
|
1326
|
+
return /* @__PURE__ */ React36.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React36.createElement(Grid11, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React36.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React36.createElement(ControlLabel16, null, __18("Overflow", "elementor"))), /* @__PURE__ */ React36.createElement(Grid11, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React36.createElement(ToggleControl6, { options: options3 }))));
|
|
1068
1327
|
};
|
|
1069
1328
|
|
|
1070
1329
|
// src/components/style-sections/size-section/size-section.tsx
|
|
1071
1330
|
var SizeSection = () => {
|
|
1072
|
-
return /* @__PURE__ */
|
|
1331
|
+
return /* @__PURE__ */ React37.createElement(Stack14, { gap: 1.5 }, /* @__PURE__ */ React37.createElement(Grid12, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(SizeField, { bind: "width", label: __19("Width", "elementor") })), /* @__PURE__ */ React37.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(SizeField, { bind: "height", label: __19("Height", "elementor") }))), /* @__PURE__ */ React37.createElement(Grid12, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(SizeField, { bind: "min-width", label: __19("Min. Width", "elementor") })), /* @__PURE__ */ React37.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(SizeField, { bind: "min-height", label: __19("Min. Height", "elementor") }))), /* @__PURE__ */ React37.createElement(Grid12, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(SizeField, { bind: "max-width", label: __19("Max. Width", "elementor") })), /* @__PURE__ */ React37.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(SizeField, { bind: "max-height", label: __19("Max. Height", "elementor") }))), /* @__PURE__ */ React37.createElement(Divider4, null), /* @__PURE__ */ React37.createElement(Stack14, null, /* @__PURE__ */ React37.createElement(OverflowField, null)));
|
|
1073
1332
|
};
|
|
1074
1333
|
var SizeField = ({ label, bind }) => {
|
|
1075
|
-
return /* @__PURE__ */
|
|
1334
|
+
return /* @__PURE__ */ React37.createElement(StylesField, { bind }, /* @__PURE__ */ React37.createElement(Grid12, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React37.createElement(Grid12, { item: true, xs: 12 }, /* @__PURE__ */ React37.createElement(ControlLabel17, null, label)), /* @__PURE__ */ React37.createElement(Grid12, { item: true, xs: 12 }, /* @__PURE__ */ React37.createElement(SizeControl3, null))));
|
|
1076
1335
|
};
|
|
1077
1336
|
|
|
1078
1337
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
1079
|
-
import * as
|
|
1338
|
+
import * as React38 from "react";
|
|
1080
1339
|
import { LinkedDimensionsControl } from "@elementor/editor-controls";
|
|
1081
|
-
import { Divider as
|
|
1082
|
-
import { __ as
|
|
1340
|
+
import { Divider as Divider5, Stack as Stack15 } from "@elementor/ui";
|
|
1341
|
+
import { __ as __20 } from "@wordpress/i18n";
|
|
1083
1342
|
var SpacingSection = () => {
|
|
1084
|
-
return /* @__PURE__ */
|
|
1343
|
+
return /* @__PURE__ */ React38.createElement(Stack15, { gap: 1.5 }, /* @__PURE__ */ React38.createElement(StylesField, { bind: "padding" }, /* @__PURE__ */ React38.createElement(LinkedDimensionsControl, { label: __20("Padding", "elementor") })), /* @__PURE__ */ React38.createElement(Divider5, null), /* @__PURE__ */ React38.createElement(StylesField, { bind: "margin" }, /* @__PURE__ */ React38.createElement(LinkedDimensionsControl, { label: __20("Margin", "elementor") })));
|
|
1085
1344
|
};
|
|
1086
1345
|
|
|
1087
1346
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
1088
|
-
import * as
|
|
1089
|
-
import { Divider as
|
|
1347
|
+
import * as React51 from "react";
|
|
1348
|
+
import { Divider as Divider6, Stack as Stack17 } from "@elementor/ui";
|
|
1090
1349
|
|
|
1091
1350
|
// src/components/collapsible-content.tsx
|
|
1092
|
-
import * as
|
|
1093
|
-
import { useState as
|
|
1094
|
-
import { Button, Collapse as Collapse3, Stack as
|
|
1095
|
-
import { __ as
|
|
1351
|
+
import * as React39 from "react";
|
|
1352
|
+
import { useState as useState3 } from "react";
|
|
1353
|
+
import { Button, Collapse as Collapse3, Stack as Stack16 } from "@elementor/ui";
|
|
1354
|
+
import { __ as __21 } from "@wordpress/i18n";
|
|
1096
1355
|
var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
1097
|
-
const [open, setOpen] =
|
|
1356
|
+
const [open, setOpen] = useState3(defaultOpen);
|
|
1098
1357
|
const handleToggle = () => {
|
|
1099
1358
|
setOpen((prevOpen) => !prevOpen);
|
|
1100
1359
|
};
|
|
1101
|
-
return /* @__PURE__ */
|
|
1360
|
+
return /* @__PURE__ */ React39.createElement(Stack16, { sx: { py: 0.5 } }, /* @__PURE__ */ React39.createElement(
|
|
1102
1361
|
Button,
|
|
1103
1362
|
{
|
|
1104
1363
|
fullWidth: true,
|
|
@@ -1106,17 +1365,17 @@ var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
|
1106
1365
|
color: "secondary",
|
|
1107
1366
|
variant: "outlined",
|
|
1108
1367
|
onClick: handleToggle,
|
|
1109
|
-
endIcon: /* @__PURE__ */
|
|
1368
|
+
endIcon: /* @__PURE__ */ React39.createElement(CollapseIcon, { open })
|
|
1110
1369
|
},
|
|
1111
|
-
open ?
|
|
1112
|
-
), /* @__PURE__ */
|
|
1370
|
+
open ? __21("Show less", "elementor") : __21("Show more", "elementor")
|
|
1371
|
+
), /* @__PURE__ */ React39.createElement(Collapse3, { in: open, timeout: "auto", unmountOnExit: true }, children));
|
|
1113
1372
|
};
|
|
1114
1373
|
|
|
1115
1374
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
1116
|
-
import * as
|
|
1117
|
-
import { ControlLabel as
|
|
1118
|
-
import { Grid as
|
|
1119
|
-
import { __ as
|
|
1375
|
+
import * as React40 from "react";
|
|
1376
|
+
import { ControlLabel as ControlLabel18, FontFamilyControl } from "@elementor/editor-controls";
|
|
1377
|
+
import { Grid as Grid13 } from "@elementor/ui";
|
|
1378
|
+
import { __ as __22 } from "@wordpress/i18n";
|
|
1120
1379
|
|
|
1121
1380
|
// src/sync/get-elementor-config.ts
|
|
1122
1381
|
var getElementorConfig = () => {
|
|
@@ -1130,158 +1389,167 @@ var FontFamilyField = () => {
|
|
|
1130
1389
|
if (!fontFamilies) {
|
|
1131
1390
|
return null;
|
|
1132
1391
|
}
|
|
1133
|
-
return /* @__PURE__ */
|
|
1392
|
+
return /* @__PURE__ */ React40.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React40.createElement(Grid13, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React40.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(ControlLabel18, null, __22("Font Family", "elementor"))), /* @__PURE__ */ React40.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(FontFamilyControl, { fontFamilies }))));
|
|
1134
1393
|
};
|
|
1135
1394
|
var getFontFamilies = () => {
|
|
1136
1395
|
const { controls } = getElementorConfig();
|
|
1137
|
-
const
|
|
1138
|
-
if (!
|
|
1396
|
+
const options7 = controls?.font?.options;
|
|
1397
|
+
if (!options7) {
|
|
1139
1398
|
return null;
|
|
1140
1399
|
}
|
|
1141
|
-
return
|
|
1400
|
+
return options7;
|
|
1142
1401
|
};
|
|
1143
1402
|
|
|
1144
1403
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
1145
|
-
import * as
|
|
1146
|
-
import { ControlLabel as
|
|
1147
|
-
import { Grid as
|
|
1148
|
-
import { __ as
|
|
1404
|
+
import * as React41 from "react";
|
|
1405
|
+
import { ControlLabel as ControlLabel19, SizeControl as SizeControl4 } from "@elementor/editor-controls";
|
|
1406
|
+
import { Grid as Grid14 } from "@elementor/ui";
|
|
1407
|
+
import { __ as __23 } from "@wordpress/i18n";
|
|
1149
1408
|
var FontSizeField = () => {
|
|
1150
|
-
return /* @__PURE__ */
|
|
1409
|
+
return /* @__PURE__ */ React41.createElement(StylesField, { bind: "font-size" }, /* @__PURE__ */ React41.createElement(Grid14, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(ControlLabel19, null, __23("Font Size", "elementor"))), /* @__PURE__ */ React41.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(SizeControl4, null))));
|
|
1151
1410
|
};
|
|
1152
1411
|
|
|
1153
1412
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
1154
|
-
import * as
|
|
1155
|
-
import { ControlLabel as
|
|
1156
|
-
import { Grid as
|
|
1157
|
-
import { __ as
|
|
1413
|
+
import * as React42 from "react";
|
|
1414
|
+
import { ControlLabel as ControlLabel20, SelectControl as SelectControl4 } from "@elementor/editor-controls";
|
|
1415
|
+
import { Grid as Grid15 } from "@elementor/ui";
|
|
1416
|
+
import { __ as __24 } from "@wordpress/i18n";
|
|
1158
1417
|
var fontWeightOptions = [
|
|
1159
|
-
{ label:
|
|
1160
|
-
{ label:
|
|
1161
|
-
{ label:
|
|
1162
|
-
{ label:
|
|
1163
|
-
{ label:
|
|
1418
|
+
{ label: __24("Light - 400", "elementor"), value: "400" },
|
|
1419
|
+
{ label: __24("Regular - 500", "elementor"), value: "500" },
|
|
1420
|
+
{ label: __24("Semi Bold - 600", "elementor"), value: "600" },
|
|
1421
|
+
{ label: __24("Bold - 700", "elementor"), value: "700" },
|
|
1422
|
+
{ label: __24("Black - 900", "elementor"), value: "900" }
|
|
1164
1423
|
];
|
|
1165
1424
|
var FontWeightField = () => {
|
|
1166
|
-
return /* @__PURE__ */
|
|
1425
|
+
return /* @__PURE__ */ React42.createElement(StylesField, { bind: "font-weight" }, /* @__PURE__ */ React42.createElement(Grid15, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React42.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(ControlLabel20, null, __24("Font Weight", "elementor"))), /* @__PURE__ */ React42.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(SelectControl4, { options: fontWeightOptions }))));
|
|
1167
1426
|
};
|
|
1168
1427
|
|
|
1169
1428
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
1170
|
-
import * as
|
|
1171
|
-
import { ControlLabel as
|
|
1172
|
-
import { Grid as
|
|
1173
|
-
import { __ as
|
|
1429
|
+
import * as React43 from "react";
|
|
1430
|
+
import { ControlLabel as ControlLabel21, SizeControl as SizeControl5 } from "@elementor/editor-controls";
|
|
1431
|
+
import { Grid as Grid16 } from "@elementor/ui";
|
|
1432
|
+
import { __ as __25 } from "@wordpress/i18n";
|
|
1174
1433
|
var LetterSpacingField = () => {
|
|
1175
|
-
return /* @__PURE__ */
|
|
1434
|
+
return /* @__PURE__ */ React43.createElement(StylesField, { bind: "letter-spacing" }, /* @__PURE__ */ React43.createElement(Grid16, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React43.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(ControlLabel21, null, __25("Letter Spacing", "elementor"))), /* @__PURE__ */ React43.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(SizeControl5, null))));
|
|
1176
1435
|
};
|
|
1177
1436
|
|
|
1178
1437
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
1179
|
-
import * as
|
|
1180
|
-
import { ControlLabel as
|
|
1438
|
+
import * as React44 from "react";
|
|
1439
|
+
import { ControlLabel as ControlLabel22, ToggleControl as ToggleControl7 } from "@elementor/editor-controls";
|
|
1181
1440
|
import { AlignCenterIcon, AlignJustifiedIcon, AlignLeftIcon, AlignRightIcon } from "@elementor/icons";
|
|
1182
|
-
import { Grid as
|
|
1183
|
-
import { __ as
|
|
1184
|
-
var
|
|
1441
|
+
import { Grid as Grid17 } from "@elementor/ui";
|
|
1442
|
+
import { __ as __26 } from "@wordpress/i18n";
|
|
1443
|
+
var options4 = [
|
|
1185
1444
|
{
|
|
1186
1445
|
value: "left",
|
|
1187
|
-
label:
|
|
1188
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1446
|
+
label: __26("Left", "elementor"),
|
|
1447
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(AlignLeftIcon, { fontSize: size })
|
|
1189
1448
|
},
|
|
1190
1449
|
{
|
|
1191
1450
|
value: "center",
|
|
1192
|
-
label:
|
|
1193
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1451
|
+
label: __26("Center", "elementor"),
|
|
1452
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(AlignCenterIcon, { fontSize: size })
|
|
1194
1453
|
},
|
|
1195
1454
|
{
|
|
1196
1455
|
value: "right",
|
|
1197
|
-
label:
|
|
1198
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1456
|
+
label: __26("Right", "elementor"),
|
|
1457
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(AlignRightIcon, { fontSize: size })
|
|
1199
1458
|
},
|
|
1200
1459
|
{
|
|
1201
1460
|
value: "justify",
|
|
1202
|
-
label:
|
|
1203
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1461
|
+
label: __26("Justify", "elementor"),
|
|
1462
|
+
renderContent: ({ size }) => /* @__PURE__ */ React44.createElement(AlignJustifiedIcon, { fontSize: size })
|
|
1204
1463
|
}
|
|
1205
1464
|
];
|
|
1206
1465
|
var TextAlignmentField = () => {
|
|
1207
|
-
return /* @__PURE__ */
|
|
1466
|
+
return /* @__PURE__ */ React44.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React44.createElement(Grid17, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React44.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(ControlLabel22, null, __26("Alignment", "elementor"))), /* @__PURE__ */ React44.createElement(Grid17, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React44.createElement(ToggleControl7, { options: options4 }))));
|
|
1208
1467
|
};
|
|
1209
1468
|
|
|
1210
1469
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
1211
|
-
import * as
|
|
1212
|
-
import { ColorControl as ColorControl3, ControlLabel as
|
|
1213
|
-
import { Grid as
|
|
1214
|
-
import { __ as
|
|
1470
|
+
import * as React45 from "react";
|
|
1471
|
+
import { ColorControl as ColorControl3, ControlLabel as ControlLabel23 } from "@elementor/editor-controls";
|
|
1472
|
+
import { Grid as Grid18 } from "@elementor/ui";
|
|
1473
|
+
import { __ as __27 } from "@wordpress/i18n";
|
|
1215
1474
|
var TextColorField = () => {
|
|
1216
|
-
return /* @__PURE__ */
|
|
1475
|
+
return /* @__PURE__ */ React45.createElement(StylesField, { bind: "color" }, /* @__PURE__ */ React45.createElement(Grid18, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React45.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(ControlLabel23, null, __27("Text Color", "elementor"))), /* @__PURE__ */ React45.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(ColorControl3, null))));
|
|
1217
1476
|
};
|
|
1218
1477
|
|
|
1219
1478
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
1220
|
-
import * as
|
|
1221
|
-
import { ControlLabel as
|
|
1479
|
+
import * as React46 from "react";
|
|
1480
|
+
import { ControlLabel as ControlLabel24, ToggleControl as ToggleControl8 } from "@elementor/editor-controls";
|
|
1222
1481
|
import { TextDirectionLtrIcon, TextDirectionRtlIcon } from "@elementor/icons";
|
|
1223
|
-
import { Grid as
|
|
1224
|
-
import { __ as
|
|
1225
|
-
var
|
|
1482
|
+
import { Grid as Grid19 } from "@elementor/ui";
|
|
1483
|
+
import { __ as __28 } from "@wordpress/i18n";
|
|
1484
|
+
var options5 = [
|
|
1226
1485
|
{
|
|
1227
1486
|
value: "ltr",
|
|
1228
|
-
label:
|
|
1229
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1487
|
+
label: __28("Left to Right", "elementor"),
|
|
1488
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(TextDirectionLtrIcon, { fontSize: size })
|
|
1230
1489
|
},
|
|
1231
1490
|
{
|
|
1232
1491
|
value: "rtl",
|
|
1233
|
-
label:
|
|
1234
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1492
|
+
label: __28("Right to Left", "elementor"),
|
|
1493
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(TextDirectionRtlIcon, { fontSize: size })
|
|
1235
1494
|
}
|
|
1236
1495
|
];
|
|
1237
1496
|
var TextDirectionField = () => {
|
|
1238
|
-
return /* @__PURE__ */
|
|
1497
|
+
return /* @__PURE__ */ React46.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React46.createElement(Grid19, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(Grid19, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(ControlLabel24, null, __28("Direction", "elementor"))), /* @__PURE__ */ React46.createElement(Grid19, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React46.createElement(ToggleControl8, { options: options5 }))));
|
|
1239
1498
|
};
|
|
1240
1499
|
|
|
1241
1500
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
1242
|
-
import * as
|
|
1243
|
-
import {
|
|
1244
|
-
import { __ as
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
import { __ as __24 } from "@wordpress/i18n";
|
|
1252
|
-
var CollapsibleField = ({ label, children, defaultOpen = false }) => {
|
|
1253
|
-
const [open, setOpen] = useState3(defaultOpen);
|
|
1254
|
-
const handleToggle = () => {
|
|
1255
|
-
setOpen((prevOpen) => !prevOpen);
|
|
1256
|
-
};
|
|
1257
|
-
return /* @__PURE__ */ React43.createElement(Stack16, { gap: 1.5 }, /* @__PURE__ */ React43.createElement(Stack16, { direction: "row", justifyContent: "space-between", alignItems: "center", sx: { py: 0.5 } }, label, /* @__PURE__ */ React43.createElement(
|
|
1258
|
-
IconButton3,
|
|
1259
|
-
{
|
|
1260
|
-
onClick: handleToggle,
|
|
1261
|
-
size: "tiny",
|
|
1262
|
-
"aria-label": open ? __24("Close", "elementor") : __24("Expand", "elementor")
|
|
1501
|
+
import * as React47 from "react";
|
|
1502
|
+
import { StrokeControl } from "@elementor/editor-controls";
|
|
1503
|
+
import { __ as __29 } from "@wordpress/i18n";
|
|
1504
|
+
var initTextStroke = {
|
|
1505
|
+
$$type: "stroke",
|
|
1506
|
+
value: {
|
|
1507
|
+
color: {
|
|
1508
|
+
$$type: "color",
|
|
1509
|
+
value: "#000000"
|
|
1263
1510
|
},
|
|
1264
|
-
|
|
1265
|
-
|
|
1511
|
+
width: {
|
|
1512
|
+
$$type: "size",
|
|
1513
|
+
value: {
|
|
1514
|
+
unit: "px",
|
|
1515
|
+
size: 1
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1266
1519
|
};
|
|
1267
|
-
|
|
1268
|
-
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
1269
1520
|
var TextStrokeField = () => {
|
|
1270
|
-
|
|
1521
|
+
const [textStroke, setTextStroke] = useStylesField("-webkit-text-stroke");
|
|
1522
|
+
const addTextStroke = () => {
|
|
1523
|
+
setTextStroke(initTextStroke);
|
|
1524
|
+
};
|
|
1525
|
+
const removeTextStroke = () => {
|
|
1526
|
+
setTextStroke(null);
|
|
1527
|
+
};
|
|
1528
|
+
const hasTextStroke = Boolean(textStroke);
|
|
1529
|
+
return /* @__PURE__ */ React47.createElement(
|
|
1530
|
+
AddOrRemoveContent,
|
|
1531
|
+
{
|
|
1532
|
+
label: __29("Text Stroke", "elementor"),
|
|
1533
|
+
isAdded: hasTextStroke,
|
|
1534
|
+
onAdd: addTextStroke,
|
|
1535
|
+
onRemove: removeTextStroke
|
|
1536
|
+
},
|
|
1537
|
+
/* @__PURE__ */ React47.createElement(StylesField, { bind: "-webkit-text-stroke" }, /* @__PURE__ */ React47.createElement(StrokeControl, null))
|
|
1538
|
+
);
|
|
1271
1539
|
};
|
|
1272
1540
|
|
|
1273
1541
|
// src/components/style-sections/typography-section/text-style-field.tsx
|
|
1274
|
-
import * as
|
|
1275
|
-
import { ControlLabel as
|
|
1542
|
+
import * as React48 from "react";
|
|
1543
|
+
import { ControlLabel as ControlLabel25 } from "@elementor/editor-controls";
|
|
1276
1544
|
import { ItalicIcon, StrikethroughIcon, UnderlineIcon } from "@elementor/icons";
|
|
1277
|
-
import { Grid as
|
|
1278
|
-
import { __ as
|
|
1545
|
+
import { Grid as Grid20, ToggleButton as ToggleButtonBase, ToggleButtonGroup } from "@elementor/ui";
|
|
1546
|
+
import { __ as __30 } from "@wordpress/i18n";
|
|
1279
1547
|
var buttonSize = "tiny";
|
|
1280
1548
|
var TextStyleField = () => {
|
|
1281
1549
|
const [fontStyle, setFontStyle] = useStylesField("font-style");
|
|
1282
1550
|
const [textDecoration, setTextDecoration] = useStylesField("text-decoration");
|
|
1283
1551
|
const formats = [fontStyle, ...(textDecoration || "").split(" ")];
|
|
1284
|
-
return /* @__PURE__ */
|
|
1552
|
+
return /* @__PURE__ */ React48.createElement(Grid20, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React48.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(ControlLabel25, null, __30("Style", "elementor"))), /* @__PURE__ */ React48.createElement(Grid20, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React48.createElement(ToggleButtonGroup, { value: formats }, /* @__PURE__ */ React48.createElement(
|
|
1285
1553
|
ToggleButton,
|
|
1286
1554
|
{
|
|
1287
1555
|
value: "italic",
|
|
@@ -1289,8 +1557,8 @@ var TextStyleField = () => {
|
|
|
1289
1557
|
"aria-label": "italic",
|
|
1290
1558
|
sx: { marginLeft: "auto" }
|
|
1291
1559
|
},
|
|
1292
|
-
/* @__PURE__ */
|
|
1293
|
-
), /* @__PURE__ */
|
|
1560
|
+
/* @__PURE__ */ React48.createElement(ItalicIcon, { fontSize: buttonSize })
|
|
1561
|
+
), /* @__PURE__ */ React48.createElement(
|
|
1294
1562
|
ShorthandControl,
|
|
1295
1563
|
{
|
|
1296
1564
|
value: "line-through",
|
|
@@ -1298,8 +1566,8 @@ var TextStyleField = () => {
|
|
|
1298
1566
|
updateValues: setTextDecoration,
|
|
1299
1567
|
"aria-label": "line-through"
|
|
1300
1568
|
},
|
|
1301
|
-
/* @__PURE__ */
|
|
1302
|
-
), /* @__PURE__ */
|
|
1569
|
+
/* @__PURE__ */ React48.createElement(StrikethroughIcon, { fontSize: buttonSize })
|
|
1570
|
+
), /* @__PURE__ */ React48.createElement(
|
|
1303
1571
|
ShorthandControl,
|
|
1304
1572
|
{
|
|
1305
1573
|
value: "underline",
|
|
@@ -1307,7 +1575,7 @@ var TextStyleField = () => {
|
|
|
1307
1575
|
updateValues: setTextDecoration,
|
|
1308
1576
|
"aria-label": "underline"
|
|
1309
1577
|
},
|
|
1310
|
-
/* @__PURE__ */
|
|
1578
|
+
/* @__PURE__ */ React48.createElement(UnderlineIcon, { fontSize: buttonSize })
|
|
1311
1579
|
))));
|
|
1312
1580
|
};
|
|
1313
1581
|
var ShorthandControl = ({
|
|
@@ -1326,52 +1594,52 @@ var ShorthandControl = ({
|
|
|
1326
1594
|
updateValues([...valuesArr, newValue].join(" "));
|
|
1327
1595
|
}
|
|
1328
1596
|
};
|
|
1329
|
-
return /* @__PURE__ */
|
|
1597
|
+
return /* @__PURE__ */ React48.createElement(ToggleButton, { value, onChange: toggleValue, selected, "aria-label": ariaLabel }, children);
|
|
1330
1598
|
};
|
|
1331
1599
|
var ToggleButton = ({ onChange, ...props }) => {
|
|
1332
1600
|
const handleChange = (_e, newValue) => {
|
|
1333
1601
|
onChange(newValue);
|
|
1334
1602
|
};
|
|
1335
|
-
return /* @__PURE__ */
|
|
1603
|
+
return /* @__PURE__ */ React48.createElement(ToggleButtonBase, { ...props, onChange: handleChange, size: buttonSize });
|
|
1336
1604
|
};
|
|
1337
1605
|
|
|
1338
1606
|
// src/components/style-sections/typography-section/transform-field.tsx
|
|
1339
|
-
import * as
|
|
1340
|
-
import { ControlLabel as
|
|
1607
|
+
import * as React49 from "react";
|
|
1608
|
+
import { ControlLabel as ControlLabel26, ToggleControl as ToggleControl9 } from "@elementor/editor-controls";
|
|
1341
1609
|
import { LetterCaseIcon, LetterCaseLowerIcon, LetterCaseUpperIcon } from "@elementor/icons";
|
|
1342
|
-
import { Grid as
|
|
1343
|
-
import { __ as
|
|
1344
|
-
var
|
|
1610
|
+
import { Grid as Grid21 } from "@elementor/ui";
|
|
1611
|
+
import { __ as __31 } from "@wordpress/i18n";
|
|
1612
|
+
var options6 = [
|
|
1345
1613
|
{
|
|
1346
1614
|
value: "capitalize",
|
|
1347
|
-
label:
|
|
1348
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1615
|
+
label: __31("Capitalize", "elementor"),
|
|
1616
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(LetterCaseIcon, { fontSize: size })
|
|
1349
1617
|
},
|
|
1350
1618
|
{
|
|
1351
1619
|
value: "uppercase",
|
|
1352
|
-
label:
|
|
1353
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1620
|
+
label: __31("Uppercase", "elementor"),
|
|
1621
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(LetterCaseUpperIcon, { fontSize: size })
|
|
1354
1622
|
},
|
|
1355
1623
|
{
|
|
1356
1624
|
value: "lowercase",
|
|
1357
|
-
label:
|
|
1358
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1625
|
+
label: __31("Lowercase", "elementor"),
|
|
1626
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(LetterCaseLowerIcon, { fontSize: size })
|
|
1359
1627
|
}
|
|
1360
1628
|
];
|
|
1361
|
-
var TransformField = () => /* @__PURE__ */
|
|
1629
|
+
var TransformField = () => /* @__PURE__ */ React49.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React49.createElement(Grid21, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(ControlLabel26, null, __31("Transform", "elementor"))), /* @__PURE__ */ React49.createElement(Grid21, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React49.createElement(ToggleControl9, { options: options6 }))));
|
|
1362
1630
|
|
|
1363
1631
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
1364
|
-
import * as
|
|
1365
|
-
import { ControlLabel as
|
|
1366
|
-
import { Grid as
|
|
1367
|
-
import { __ as
|
|
1632
|
+
import * as React50 from "react";
|
|
1633
|
+
import { ControlLabel as ControlLabel27, SizeControl as SizeControl6 } from "@elementor/editor-controls";
|
|
1634
|
+
import { Grid as Grid22 } from "@elementor/ui";
|
|
1635
|
+
import { __ as __32 } from "@wordpress/i18n";
|
|
1368
1636
|
var WordSpacingField = () => {
|
|
1369
|
-
return /* @__PURE__ */
|
|
1637
|
+
return /* @__PURE__ */ React50.createElement(StylesField, { bind: "word-spacing" }, /* @__PURE__ */ React50.createElement(Grid22, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React50.createElement(Grid22, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(ControlLabel27, null, __32("Word Spacing", "elementor"))), /* @__PURE__ */ React50.createElement(Grid22, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(SizeControl6, null))));
|
|
1370
1638
|
};
|
|
1371
1639
|
|
|
1372
1640
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
1373
1641
|
var TypographySection = () => {
|
|
1374
|
-
return /* @__PURE__ */
|
|
1642
|
+
return /* @__PURE__ */ React51.createElement(Stack17, { gap: 1.5 }, /* @__PURE__ */ React51.createElement(FontFamilyField, null), /* @__PURE__ */ React51.createElement(FontWeightField, null), /* @__PURE__ */ React51.createElement(FontSizeField, null), /* @__PURE__ */ React51.createElement(Divider6, null), /* @__PURE__ */ React51.createElement(TextColorField, null), /* @__PURE__ */ React51.createElement(CollapsibleContent, null, /* @__PURE__ */ React51.createElement(Stack17, { gap: 1.5, sx: { pt: 1.5 } }, /* @__PURE__ */ React51.createElement(LetterSpacingField, null), /* @__PURE__ */ React51.createElement(WordSpacingField, null), /* @__PURE__ */ React51.createElement(Divider6, null), /* @__PURE__ */ React51.createElement(TextAlignmentField, null), /* @__PURE__ */ React51.createElement(TextStyleField, null), /* @__PURE__ */ React51.createElement(TransformField, null), /* @__PURE__ */ React51.createElement(TextDirectionField, null), /* @__PURE__ */ React51.createElement(TextStrokeField, null))));
|
|
1375
1643
|
};
|
|
1376
1644
|
|
|
1377
1645
|
// src/components/style-tab.tsx
|
|
@@ -1380,7 +1648,7 @@ var StyleTab = () => {
|
|
|
1380
1648
|
const currentClassesProp = useCurrentClassesProp();
|
|
1381
1649
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp);
|
|
1382
1650
|
const breakpoint = useActiveBreakpoint();
|
|
1383
|
-
return /* @__PURE__ */
|
|
1651
|
+
return /* @__PURE__ */ React52.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React52.createElement(StyleProvider, { meta: { breakpoint, state: null }, id: activeStyleDefId, setId: setActiveStyleDefId }, /* @__PURE__ */ React52.createElement(CssClassSelector, null), /* @__PURE__ */ React52.createElement(Divider7, null), /* @__PURE__ */ React52.createElement(SectionsList, null, /* @__PURE__ */ React52.createElement(Section, { title: __33("Layout", "elementor") }, /* @__PURE__ */ React52.createElement(LayoutSection, null)), /* @__PURE__ */ React52.createElement(Section, { title: __33("Spacing", "elementor") }, /* @__PURE__ */ React52.createElement(SpacingSection, null)), /* @__PURE__ */ React52.createElement(Section, { title: __33("Size", "elementor") }, /* @__PURE__ */ React52.createElement(SizeSection, null)), /* @__PURE__ */ React52.createElement(Section, { title: __33("Position", "elementor") }, /* @__PURE__ */ React52.createElement(PositionSection, null)), /* @__PURE__ */ React52.createElement(Section, { title: __33("Typography", "elementor") }, /* @__PURE__ */ React52.createElement(TypographySection, null)), /* @__PURE__ */ React52.createElement(Section, { title: __33("Background", "elementor") }, /* @__PURE__ */ React52.createElement(BackgroundSection, null)), /* @__PURE__ */ React52.createElement(Section, { title: __33("Border", "elementor") }, /* @__PURE__ */ React52.createElement(BorderSection, null)), /* @__PURE__ */ React52.createElement(Section, { title: __33("Effects", "elementor") }, /* @__PURE__ */ React52.createElement(EffectsSection, null)))));
|
|
1384
1652
|
};
|
|
1385
1653
|
function useActiveStyleDefId(currentClassesProp) {
|
|
1386
1654
|
const [activeStyledDefId, setActiveStyledDefId] = useState4(null);
|
|
@@ -1417,7 +1685,7 @@ var EditingPanelTabs = () => {
|
|
|
1417
1685
|
return (
|
|
1418
1686
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
1419
1687
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
1420
|
-
/* @__PURE__ */
|
|
1688
|
+
/* @__PURE__ */ React53.createElement(Fragment6, { key: element.id }, /* @__PURE__ */ React53.createElement(Stack18, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React53.createElement(Tabs, { variant: "fullWidth", indicatorColor: "secondary", textColor: "inherit", ...getTabsProps() }, /* @__PURE__ */ React53.createElement(Tab, { label: __34("General", "elementor"), ...getTabProps("settings") }), /* @__PURE__ */ React53.createElement(Tab, { label: __34("Style", "elementor"), ...getTabProps("style") })), /* @__PURE__ */ React53.createElement(Divider8, null), /* @__PURE__ */ React53.createElement(TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React53.createElement(SettingsTab, null)), /* @__PURE__ */ React53.createElement(TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React53.createElement(StyleTab, null))))
|
|
1421
1689
|
);
|
|
1422
1690
|
};
|
|
1423
1691
|
|
|
@@ -1430,8 +1698,8 @@ var EditingPanel = () => {
|
|
|
1430
1698
|
if (!element || !elementType) {
|
|
1431
1699
|
return null;
|
|
1432
1700
|
}
|
|
1433
|
-
const panelTitle =
|
|
1434
|
-
return /* @__PURE__ */
|
|
1701
|
+
const panelTitle = __35("Edit %s", "elementor").replace("%s", elementType.title);
|
|
1702
|
+
return /* @__PURE__ */ React54.createElement(ErrorBoundary, { fallback: /* @__PURE__ */ React54.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React54.createElement(Panel, null, /* @__PURE__ */ React54.createElement(PanelHeader, null, /* @__PURE__ */ React54.createElement(PanelHeaderTitle, null, panelTitle)), /* @__PURE__ */ React54.createElement(PanelBody, null, /* @__PURE__ */ React54.createElement(ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React54.createElement(ControlReplacementProvider, { ...controlReplacement }, /* @__PURE__ */ React54.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React54.createElement(EditingPanelTabs, null)))))));
|
|
1435
1703
|
};
|
|
1436
1704
|
|
|
1437
1705
|
// src/panel.ts
|
|
@@ -1488,16 +1756,16 @@ var EditingPanelHooks = () => {
|
|
|
1488
1756
|
};
|
|
1489
1757
|
|
|
1490
1758
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
1491
|
-
import * as
|
|
1759
|
+
import * as React57 from "react";
|
|
1492
1760
|
import { useId as useId3 } from "react";
|
|
1493
|
-
import { ControlLabel as
|
|
1761
|
+
import { ControlLabel as ControlLabel28, useBoundProp as useBoundProp3 } from "@elementor/editor-controls";
|
|
1494
1762
|
import { DatabaseIcon, SettingsIcon, XIcon as XIcon2 } from "@elementor/icons";
|
|
1495
1763
|
import {
|
|
1496
1764
|
bindPopover as bindPopover2,
|
|
1497
1765
|
bindTrigger,
|
|
1498
1766
|
Box as Box5,
|
|
1499
|
-
Divider as
|
|
1500
|
-
IconButton as
|
|
1767
|
+
Divider as Divider10,
|
|
1768
|
+
IconButton as IconButton3,
|
|
1501
1769
|
Paper,
|
|
1502
1770
|
Popover as Popover2,
|
|
1503
1771
|
Stack as Stack20,
|
|
@@ -1509,10 +1777,10 @@ import {
|
|
|
1509
1777
|
usePopupState as usePopupState2,
|
|
1510
1778
|
useTabs as useTabs2
|
|
1511
1779
|
} from "@elementor/ui";
|
|
1512
|
-
import { __ as
|
|
1780
|
+
import { __ as __37 } from "@wordpress/i18n";
|
|
1513
1781
|
|
|
1514
1782
|
// src/dynamics/dynamic-control.tsx
|
|
1515
|
-
import * as
|
|
1783
|
+
import * as React55 from "react";
|
|
1516
1784
|
import { BoundPropProvider as BoundPropProvider3, useBoundProp } from "@elementor/editor-controls";
|
|
1517
1785
|
|
|
1518
1786
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
@@ -1604,17 +1872,17 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
1604
1872
|
}
|
|
1605
1873
|
});
|
|
1606
1874
|
};
|
|
1607
|
-
return /* @__PURE__ */
|
|
1875
|
+
return /* @__PURE__ */ React55.createElement(BoundPropProvider3, { setValue: setDynamicValue, value: dynamicValue, bind }, children);
|
|
1608
1876
|
};
|
|
1609
1877
|
|
|
1610
1878
|
// src/dynamics/components/dynamic-selection.tsx
|
|
1611
|
-
import * as
|
|
1612
|
-
import { Fragment as
|
|
1879
|
+
import * as React56 from "react";
|
|
1880
|
+
import { Fragment as Fragment7, useState as useState5 } from "react";
|
|
1613
1881
|
import { useBoundProp as useBoundProp2 } from "@elementor/editor-controls";
|
|
1614
1882
|
import { PhotoIcon, SearchIcon } from "@elementor/icons";
|
|
1615
1883
|
import {
|
|
1616
1884
|
Box as Box4,
|
|
1617
|
-
Divider as
|
|
1885
|
+
Divider as Divider9,
|
|
1618
1886
|
InputAdornment,
|
|
1619
1887
|
Link,
|
|
1620
1888
|
ListSubheader,
|
|
@@ -1624,7 +1892,7 @@ import {
|
|
|
1624
1892
|
TextField as TextField2,
|
|
1625
1893
|
Typography as Typography3
|
|
1626
1894
|
} from "@elementor/ui";
|
|
1627
|
-
import { __ as
|
|
1895
|
+
import { __ as __36 } from "@wordpress/i18n";
|
|
1628
1896
|
var SIZE3 = "tiny";
|
|
1629
1897
|
var DynamicSelection = ({ onSelect }) => {
|
|
1630
1898
|
const [searchValue, setSearchValue] = useState5("");
|
|
@@ -1632,7 +1900,7 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
1632
1900
|
const { bind, value: currentValue, setValue } = useBoundProp2();
|
|
1633
1901
|
const { setPropValue: updatePropValueHistory } = usePropValueHistory();
|
|
1634
1902
|
const isCurrentValueDynamic = isDynamicPropValue(currentValue);
|
|
1635
|
-
const
|
|
1903
|
+
const options7 = useFilteredOptions(bind, searchValue);
|
|
1636
1904
|
const handleSearch = (event) => {
|
|
1637
1905
|
setSearchValue(event.target.value);
|
|
1638
1906
|
};
|
|
@@ -1643,21 +1911,21 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
1643
1911
|
setValue({ $$type: "dynamic", value: { name: value, settings: {} } });
|
|
1644
1912
|
onSelect?.();
|
|
1645
1913
|
};
|
|
1646
|
-
return /* @__PURE__ */
|
|
1914
|
+
return /* @__PURE__ */ React56.createElement(Stack19, null, /* @__PURE__ */ React56.createElement(Box4, { px: 1.5, pb: 1 }, /* @__PURE__ */ React56.createElement(
|
|
1647
1915
|
TextField2,
|
|
1648
1916
|
{
|
|
1649
1917
|
fullWidth: true,
|
|
1650
1918
|
size: SIZE3,
|
|
1651
1919
|
value: searchValue,
|
|
1652
1920
|
onChange: handleSearch,
|
|
1653
|
-
placeholder:
|
|
1921
|
+
placeholder: __36("Search dynamic tag", "elementor"),
|
|
1654
1922
|
InputProps: {
|
|
1655
|
-
startAdornment: /* @__PURE__ */
|
|
1923
|
+
startAdornment: /* @__PURE__ */ React56.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React56.createElement(SearchIcon, { fontSize: SIZE3 }))
|
|
1656
1924
|
}
|
|
1657
1925
|
}
|
|
1658
|
-
)), /* @__PURE__ */
|
|
1926
|
+
)), /* @__PURE__ */ React56.createElement(Divider9, null), /* @__PURE__ */ React56.createElement(Box4, { sx: { overflowY: "auto", height: 260, width: 220 } }, options7.length > 0 ? /* @__PURE__ */ React56.createElement(MenuList, { role: "listbox", tabIndex: 0 }, options7.map(([category, items2], index) => /* @__PURE__ */ React56.createElement(Fragment7, { key: index }, /* @__PURE__ */ React56.createElement(ListSubheader, { sx: { typography: "caption", color: "text.tertiary" } }, dynamicGroups?.[category]?.title || category), items2.map(({ value, label: tagLabel }) => {
|
|
1659
1927
|
const isSelected = isCurrentValueDynamic && value === currentValue?.value?.name;
|
|
1660
|
-
return /* @__PURE__ */
|
|
1928
|
+
return /* @__PURE__ */ React56.createElement(
|
|
1661
1929
|
MenuItem,
|
|
1662
1930
|
{
|
|
1663
1931
|
key: value,
|
|
@@ -1668,7 +1936,7 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
1668
1936
|
},
|
|
1669
1937
|
tagLabel
|
|
1670
1938
|
);
|
|
1671
|
-
})))) : /* @__PURE__ */
|
|
1939
|
+
})))) : /* @__PURE__ */ React56.createElement(Stack19, { alignItems: "center", p: 2.5, gap: 1.5 }, /* @__PURE__ */ React56.createElement(PhotoIcon, { fontSize: "large" }), /* @__PURE__ */ React56.createElement(Typography3, { align: "center", variant: "caption", color: "text.secondary" }, __36("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React56.createElement("br", null), "\u201C", searchValue, "\u201D."), /* @__PURE__ */ React56.createElement(Typography3, { align: "center", variant: "caption", color: "text.secondary" }, /* @__PURE__ */ React56.createElement(
|
|
1672
1940
|
Link,
|
|
1673
1941
|
{
|
|
1674
1942
|
color: "secondary",
|
|
@@ -1676,12 +1944,12 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
1676
1944
|
component: "button",
|
|
1677
1945
|
onClick: () => setSearchValue("")
|
|
1678
1946
|
},
|
|
1679
|
-
|
|
1680
|
-
), "\xA0",
|
|
1947
|
+
__36("Clear the filters", "elementor")
|
|
1948
|
+
), "\xA0", __36("and try again.", "elementor")))));
|
|
1681
1949
|
};
|
|
1682
1950
|
var useFilteredOptions = (bind, searchValue) => {
|
|
1683
1951
|
const dynamicTags = usePropDynamicTags(bind);
|
|
1684
|
-
const
|
|
1952
|
+
const options7 = dynamicTags.reduce((categories, { name, label, group }) => {
|
|
1685
1953
|
const isVisible = label.toLowerCase().includes(searchValue.trim().toLowerCase());
|
|
1686
1954
|
if (!isVisible) {
|
|
1687
1955
|
return categories;
|
|
@@ -1692,7 +1960,7 @@ var useFilteredOptions = (bind, searchValue) => {
|
|
|
1692
1960
|
categories.get(group)?.push({ label, value: name });
|
|
1693
1961
|
return categories;
|
|
1694
1962
|
}, /* @__PURE__ */ new Map());
|
|
1695
|
-
return [...
|
|
1963
|
+
return [...options7];
|
|
1696
1964
|
};
|
|
1697
1965
|
|
|
1698
1966
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
@@ -1711,25 +1979,25 @@ var DynamicSelectionControl = () => {
|
|
|
1711
1979
|
if (!dynamicTag) {
|
|
1712
1980
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
1713
1981
|
}
|
|
1714
|
-
return /* @__PURE__ */
|
|
1982
|
+
return /* @__PURE__ */ React57.createElement(Box5, null, /* @__PURE__ */ React57.createElement(
|
|
1715
1983
|
Tag,
|
|
1716
1984
|
{
|
|
1717
1985
|
fullWidth: true,
|
|
1718
1986
|
showActionsOnHover: true,
|
|
1719
1987
|
label: dynamicTag.label,
|
|
1720
|
-
startIcon: /* @__PURE__ */
|
|
1988
|
+
startIcon: /* @__PURE__ */ React57.createElement(DatabaseIcon, { fontSize: SIZE4 }),
|
|
1721
1989
|
...bindTrigger(selectionPopoverState),
|
|
1722
|
-
actions: /* @__PURE__ */
|
|
1723
|
-
|
|
1990
|
+
actions: /* @__PURE__ */ React57.createElement(React57.Fragment, null, /* @__PURE__ */ React57.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React57.createElement(
|
|
1991
|
+
IconButton3,
|
|
1724
1992
|
{
|
|
1725
1993
|
size: SIZE4,
|
|
1726
1994
|
onClick: removeDynamicTag,
|
|
1727
|
-
"aria-label":
|
|
1995
|
+
"aria-label": __37("Remove dynamic value", "elementor")
|
|
1728
1996
|
},
|
|
1729
|
-
/* @__PURE__ */
|
|
1997
|
+
/* @__PURE__ */ React57.createElement(XIcon2, { fontSize: SIZE4 })
|
|
1730
1998
|
))
|
|
1731
1999
|
}
|
|
1732
|
-
), /* @__PURE__ */
|
|
2000
|
+
), /* @__PURE__ */ React57.createElement(
|
|
1733
2001
|
Popover2,
|
|
1734
2002
|
{
|
|
1735
2003
|
disablePortal: true,
|
|
@@ -1737,7 +2005,7 @@ var DynamicSelectionControl = () => {
|
|
|
1737
2005
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
1738
2006
|
...bindPopover2(selectionPopoverState)
|
|
1739
2007
|
},
|
|
1740
|
-
/* @__PURE__ */
|
|
2008
|
+
/* @__PURE__ */ React57.createElement(Stack20, null, /* @__PURE__ */ React57.createElement(Stack20, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React57.createElement(DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React57.createElement(Typography4, { variant: "subtitle2" }, __37("Dynamic Tags", "elementor")), /* @__PURE__ */ React57.createElement(IconButton3, { size: SIZE4, sx: { ml: "auto" }, onClick: selectionPopoverState.close }, /* @__PURE__ */ React57.createElement(XIcon2, { fontSize: SIZE4 }))), /* @__PURE__ */ React57.createElement(DynamicSelection, { onSelect: selectionPopoverState.close }))
|
|
1741
2009
|
));
|
|
1742
2010
|
};
|
|
1743
2011
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
@@ -1747,22 +2015,22 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
1747
2015
|
if (!hasDynamicSettings) {
|
|
1748
2016
|
return null;
|
|
1749
2017
|
}
|
|
1750
|
-
return /* @__PURE__ */
|
|
1751
|
-
|
|
2018
|
+
return /* @__PURE__ */ React57.createElement(React57.Fragment, null, /* @__PURE__ */ React57.createElement(
|
|
2019
|
+
IconButton3,
|
|
1752
2020
|
{
|
|
1753
2021
|
size: SIZE4,
|
|
1754
2022
|
...bindTrigger(settingsPopupState),
|
|
1755
|
-
"aria-label":
|
|
2023
|
+
"aria-label": __37("Settings", "elementor")
|
|
1756
2024
|
},
|
|
1757
|
-
/* @__PURE__ */
|
|
1758
|
-
), /* @__PURE__ */
|
|
2025
|
+
/* @__PURE__ */ React57.createElement(SettingsIcon, { fontSize: SIZE4 })
|
|
2026
|
+
), /* @__PURE__ */ React57.createElement(
|
|
1759
2027
|
Popover2,
|
|
1760
2028
|
{
|
|
1761
2029
|
disableScrollLock: true,
|
|
1762
2030
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
1763
2031
|
...bindPopover2(settingsPopupState)
|
|
1764
2032
|
},
|
|
1765
|
-
/* @__PURE__ */
|
|
2033
|
+
/* @__PURE__ */ React57.createElement(Paper, { component: Stack20, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React57.createElement(Stack20, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React57.createElement(DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React57.createElement(Typography4, { variant: "subtitle2" }, dynamicTag.label), /* @__PURE__ */ React57.createElement(IconButton3, { sx: { ml: "auto" }, size: SIZE4, onClick: settingsPopupState.close }, /* @__PURE__ */ React57.createElement(XIcon2, { fontSize: SIZE4 }))), /* @__PURE__ */ React57.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls }))
|
|
1766
2034
|
));
|
|
1767
2035
|
};
|
|
1768
2036
|
var DynamicSettings = ({ controls }) => {
|
|
@@ -1771,10 +2039,10 @@ var DynamicSettings = ({ controls }) => {
|
|
|
1771
2039
|
if (!tabs.length) {
|
|
1772
2040
|
return null;
|
|
1773
2041
|
}
|
|
1774
|
-
return /* @__PURE__ */
|
|
1775
|
-
return /* @__PURE__ */
|
|
2042
|
+
return /* @__PURE__ */ React57.createElement(React57.Fragment, null, /* @__PURE__ */ React57.createElement(Tabs2, { indicatorColor: "secondary", textColor: "secondary", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React57.createElement(Tab2, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React57.createElement(Divider10, null), tabs.map(({ value }, index) => {
|
|
2043
|
+
return /* @__PURE__ */ React57.createElement(TabPanel2, { key: index, sx: { flexGrow: 1 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React57.createElement(Stack20, { gap: 1, px: 2 }, value.items.map((item) => {
|
|
1776
2044
|
if (item.type === "control") {
|
|
1777
|
-
return /* @__PURE__ */
|
|
2045
|
+
return /* @__PURE__ */ React57.createElement(Control3, { key: item.value.bind, control: item.value });
|
|
1778
2046
|
}
|
|
1779
2047
|
return null;
|
|
1780
2048
|
})));
|
|
@@ -1784,14 +2052,14 @@ var Control3 = ({ control }) => {
|
|
|
1784
2052
|
if (!getControlByType(control.type)) {
|
|
1785
2053
|
return null;
|
|
1786
2054
|
}
|
|
1787
|
-
return /* @__PURE__ */
|
|
2055
|
+
return /* @__PURE__ */ React57.createElement(DynamicControl, { bind: control.bind }, control.label ? /* @__PURE__ */ React57.createElement(ControlLabel28, null, control.label) : null, /* @__PURE__ */ React57.createElement(Control, { type: control.type, props: control.props }));
|
|
1788
2056
|
};
|
|
1789
2057
|
|
|
1790
2058
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
1791
|
-
import * as
|
|
2059
|
+
import * as React58 from "react";
|
|
1792
2060
|
import { useBoundProp as useBoundProp4 } from "@elementor/editor-controls";
|
|
1793
2061
|
import { DatabaseIcon as DatabaseIcon2 } from "@elementor/icons";
|
|
1794
|
-
import { __ as
|
|
2062
|
+
import { __ as __38 } from "@wordpress/i18n";
|
|
1795
2063
|
var usePropDynamicAction = () => {
|
|
1796
2064
|
const { bind } = useBoundProp4();
|
|
1797
2065
|
const { elementType } = useElement();
|
|
@@ -1800,8 +2068,8 @@ var usePropDynamicAction = () => {
|
|
|
1800
2068
|
return {
|
|
1801
2069
|
visible,
|
|
1802
2070
|
icon: DatabaseIcon2,
|
|
1803
|
-
title:
|
|
1804
|
-
popoverContent: ({ closePopover }) => /* @__PURE__ */
|
|
2071
|
+
title: __38("Dynamic Tags", "elementor"),
|
|
2072
|
+
popoverContent: ({ closePopover }) => /* @__PURE__ */ React58.createElement(DynamicSelection, { onSelect: closePopover })
|
|
1805
2073
|
};
|
|
1806
2074
|
};
|
|
1807
2075
|
|