@elementor/editor-editing-panel 1.29.1 → 1.30.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 +27 -0
- package/dist/index.d.mts +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +101 -70
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +101 -71
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
- package/src/components/css-classes/css-class-item.tsx +1 -0
- package/src/components/editing-panel.tsx +5 -5
- package/src/components/style-sections/layout-section/align-self-child-field.tsx +44 -11
- package/src/components/style-sections/layout-section/layout-section.tsx +5 -4
- package/src/components/style-sections/layout-section/utils/rotated-icon.tsx +1 -2
- package/src/control-replacement.tsx +2 -2
- package/src/dynamics/components/dynamic-selection-control.tsx +8 -13
- package/src/dynamics/init.ts +2 -2
- package/src/index.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 1.30.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 10cbbe9: update `@elementor/ui` version
|
|
8
|
+
- 97e4d7d: create `editor-variables` package
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- 093b7ca: Add support for multiple control replacements
|
|
13
|
+
- 5f348b8: Allow self icons to be rotated by the ancestor value
|
|
14
|
+
- baa9d17: Show dynamic settings actions when popover is open
|
|
15
|
+
- Updated dependencies [093b7ca]
|
|
16
|
+
- Updated dependencies [10cbbe9]
|
|
17
|
+
- Updated dependencies [ce1852b]
|
|
18
|
+
- @elementor/editor-controls@0.27.0
|
|
19
|
+
- @elementor/editor-canvas@0.19.0
|
|
20
|
+
- @elementor/editor-panels@0.15.0
|
|
21
|
+
- @elementor/editor-ui@0.8.0
|
|
22
|
+
- @elementor/editor@0.19.0
|
|
23
|
+
|
|
24
|
+
## 1.29.2
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- 212075b: Fix class selector chip line height.
|
|
29
|
+
|
|
3
30
|
## 1.29.1
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -3,6 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { ElementType, ComponentType } from 'react';
|
|
4
4
|
import * as _elementor_editor_props from '@elementor/editor-props';
|
|
5
5
|
import * as _elementor_locations from '@elementor/locations';
|
|
6
|
+
import * as _elementor_menus from '@elementor/menus';
|
|
6
7
|
|
|
7
8
|
type PopoverActionProps = {
|
|
8
9
|
title: string;
|
|
@@ -12,8 +13,9 @@ type PopoverActionProps = {
|
|
|
12
13
|
closePopover: () => void;
|
|
13
14
|
}>;
|
|
14
15
|
};
|
|
16
|
+
declare function PopoverAction({ title, visible, icon: Icon, popoverContent: PopoverContent, }: PopoverActionProps): React.JSX.Element | null;
|
|
15
17
|
|
|
16
|
-
declare const
|
|
18
|
+
declare const registerControlReplacement: (replacement: {
|
|
17
19
|
component: React.ComponentType;
|
|
18
20
|
condition: ({ value }: {
|
|
19
21
|
value: _elementor_editor_props.PropValue;
|
|
@@ -31,6 +33,10 @@ declare const usePanelStatus: () => {
|
|
|
31
33
|
isBlocked: boolean;
|
|
32
34
|
};
|
|
33
35
|
|
|
36
|
+
declare const controlActionsMenu: _elementor_menus.Menu<{
|
|
37
|
+
PopoverAction: typeof PopoverAction;
|
|
38
|
+
}, "default">;
|
|
39
|
+
|
|
34
40
|
declare function init(): void;
|
|
35
41
|
|
|
36
|
-
export { type PopoverActionProps, init, injectIntoClassSelectorActions,
|
|
42
|
+
export { type PopoverActionProps, controlActionsMenu, init, injectIntoClassSelectorActions, registerControlReplacement, usePanelActions, usePanelStatus };
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { ElementType, ComponentType } from 'react';
|
|
4
4
|
import * as _elementor_editor_props from '@elementor/editor-props';
|
|
5
5
|
import * as _elementor_locations from '@elementor/locations';
|
|
6
|
+
import * as _elementor_menus from '@elementor/menus';
|
|
6
7
|
|
|
7
8
|
type PopoverActionProps = {
|
|
8
9
|
title: string;
|
|
@@ -12,8 +13,9 @@ type PopoverActionProps = {
|
|
|
12
13
|
closePopover: () => void;
|
|
13
14
|
}>;
|
|
14
15
|
};
|
|
16
|
+
declare function PopoverAction({ title, visible, icon: Icon, popoverContent: PopoverContent, }: PopoverActionProps): React.JSX.Element | null;
|
|
15
17
|
|
|
16
|
-
declare const
|
|
18
|
+
declare const registerControlReplacement: (replacement: {
|
|
17
19
|
component: React.ComponentType;
|
|
18
20
|
condition: ({ value }: {
|
|
19
21
|
value: _elementor_editor_props.PropValue;
|
|
@@ -31,6 +33,10 @@ declare const usePanelStatus: () => {
|
|
|
31
33
|
isBlocked: boolean;
|
|
32
34
|
};
|
|
33
35
|
|
|
36
|
+
declare const controlActionsMenu: _elementor_menus.Menu<{
|
|
37
|
+
PopoverAction: typeof PopoverAction;
|
|
38
|
+
}, "default">;
|
|
39
|
+
|
|
34
40
|
declare function init(): void;
|
|
35
41
|
|
|
36
|
-
export { type PopoverActionProps, init, injectIntoClassSelectorActions,
|
|
42
|
+
export { type PopoverActionProps, controlActionsMenu, init, injectIntoClassSelectorActions, registerControlReplacement, usePanelActions, usePanelStatus };
|
package/dist/index.js
CHANGED
|
@@ -30,9 +30,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
|
+
controlActionsMenu: () => controlActionsMenu,
|
|
33
34
|
init: () => init2,
|
|
34
35
|
injectIntoClassSelectorActions: () => injectIntoClassSelectorActions,
|
|
35
|
-
|
|
36
|
+
registerControlReplacement: () => registerControlReplacement,
|
|
36
37
|
useBoundProp: () => import_editor_controls50.useBoundProp,
|
|
37
38
|
usePanelActions: () => usePanelActions,
|
|
38
39
|
usePanelStatus: () => usePanelStatus
|
|
@@ -42,7 +43,7 @@ var import_editor_controls50 = require("@elementor/editor-controls");
|
|
|
42
43
|
|
|
43
44
|
// src/control-replacement.tsx
|
|
44
45
|
var import_editor_controls = require("@elementor/editor-controls");
|
|
45
|
-
var {
|
|
46
|
+
var { registerControlReplacement, getControlReplacements } = (0, import_editor_controls.createControlReplacementsRegistry)();
|
|
46
47
|
|
|
47
48
|
// src/components/css-classes/css-class-selector.tsx
|
|
48
49
|
var React7 = __toESM(require("react"));
|
|
@@ -138,7 +139,7 @@ var import_ui = require("@elementor/ui");
|
|
|
138
139
|
function MultiCombobox({
|
|
139
140
|
actions = [],
|
|
140
141
|
selected,
|
|
141
|
-
options:
|
|
142
|
+
options: options12,
|
|
142
143
|
onSelect,
|
|
143
144
|
placeholder,
|
|
144
145
|
...props
|
|
@@ -157,7 +158,7 @@ function MultiCombobox({
|
|
|
157
158
|
handleHomeEndKeys: true,
|
|
158
159
|
disabled: loading,
|
|
159
160
|
value: selected,
|
|
160
|
-
options:
|
|
161
|
+
options: options12,
|
|
161
162
|
renderInput: (params) => /* @__PURE__ */ React4.createElement(
|
|
162
163
|
import_ui.TextField,
|
|
163
164
|
{
|
|
@@ -175,7 +176,7 @@ function MultiCombobox({
|
|
|
175
176
|
const inputValue = selectedOrInputValue.find((option) => typeof option === "string");
|
|
176
177
|
const optionsAndActions = selectedOrInputValue.filter((option) => typeof option !== "string");
|
|
177
178
|
if (reason === "createOption") {
|
|
178
|
-
const [firstAction] = filterActions(actions, { options:
|
|
179
|
+
const [firstAction] = filterActions(actions, { options: options12, inputValue: inputValue ?? "" });
|
|
179
180
|
if (firstAction?.value) {
|
|
180
181
|
return run(firstAction.apply, firstAction.value);
|
|
181
182
|
}
|
|
@@ -184,7 +185,7 @@ function MultiCombobox({
|
|
|
184
185
|
if (reason === "selectOption" && action?.value) {
|
|
185
186
|
return run(action.apply, action.value);
|
|
186
187
|
}
|
|
187
|
-
const fixedValues =
|
|
188
|
+
const fixedValues = options12.filter((option) => !!option.fixed);
|
|
188
189
|
onSelect?.([.../* @__PURE__ */ new Set([...optionsAndActions, ...fixedValues])]);
|
|
189
190
|
},
|
|
190
191
|
getOptionLabel: (option) => typeof option === "string" ? option : option.label,
|
|
@@ -224,8 +225,8 @@ function useActionRunner() {
|
|
|
224
225
|
};
|
|
225
226
|
return { run, loading };
|
|
226
227
|
}
|
|
227
|
-
function filterActions(actions, { options:
|
|
228
|
-
return actions.filter((action) => action.condition(
|
|
228
|
+
function filterActions(actions, { options: options12, inputValue }) {
|
|
229
|
+
return actions.filter((action) => action.condition(options12, inputValue)).map((action, index) => ({
|
|
229
230
|
label: action.label(inputValue),
|
|
230
231
|
value: inputValue,
|
|
231
232
|
group: action.group,
|
|
@@ -515,6 +516,7 @@ function CssClassItem({
|
|
|
515
516
|
},
|
|
516
517
|
"aria-pressed": isActive,
|
|
517
518
|
sx: (theme) => ({
|
|
519
|
+
lineHeight: 1,
|
|
518
520
|
cursor: isActive && allowRename && !isShowingState ? "text" : "pointer",
|
|
519
521
|
borderRadius: `${theme.shape.borderRadius * 0.75}px`,
|
|
520
522
|
"&.Mui-focusVisible": {
|
|
@@ -574,12 +576,12 @@ var EMPTY_OPTION = {
|
|
|
574
576
|
};
|
|
575
577
|
var { Slot: ClassSelectorActionsSlot, inject: injectIntoClassSelectorActions } = (0, import_locations.createLocation)();
|
|
576
578
|
function CssClassSelector() {
|
|
577
|
-
const
|
|
579
|
+
const options12 = useOptions();
|
|
578
580
|
const { value: appliedIds, setValue: setAppliedIds, pushValue: pushAppliedId } = useAppliedClassesIds();
|
|
579
581
|
const { id: activeId, setId: setActiveId } = useStyle();
|
|
580
582
|
const actions = useCreateActions({ pushAppliedId, setActiveId });
|
|
581
583
|
const handleApply = useHandleApply(appliedIds, setAppliedIds);
|
|
582
|
-
const applied = useAppliedOptions(
|
|
584
|
+
const applied = useAppliedOptions(options12, appliedIds);
|
|
583
585
|
const active = applied.find((option) => option.value === activeId) ?? EMPTY_OPTION;
|
|
584
586
|
const showPlaceholder = applied.every(({ fixed }) => fixed);
|
|
585
587
|
return /* @__PURE__ */ React7.createElement(import_ui5.Stack, { p: 2 }, /* @__PURE__ */ React7.createElement(import_ui5.Stack, { direction: "row", gap: 1, alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React7.createElement(import_ui5.FormLabel, { htmlFor: ID, size: "small" }, (0, import_i18n3.__)("Classes", "elementor")), /* @__PURE__ */ React7.createElement(import_ui5.Stack, { direction: "row", gap: 1 }, /* @__PURE__ */ React7.createElement(ClassSelectorActionsSlot, null))), /* @__PURE__ */ React7.createElement(
|
|
@@ -588,7 +590,7 @@ function CssClassSelector() {
|
|
|
588
590
|
id: ID,
|
|
589
591
|
size: "tiny",
|
|
590
592
|
placeholder: showPlaceholder ? (0, import_i18n3.__)("Type class name", "elementor") : void 0,
|
|
591
|
-
options:
|
|
593
|
+
options: options12,
|
|
592
594
|
selected: applied,
|
|
593
595
|
onSelect: handleApply,
|
|
594
596
|
limitTags: TAGS_LIMIT,
|
|
@@ -680,8 +682,8 @@ function useCreateActions({
|
|
|
680
682
|
function hasReachedLimit(provider) {
|
|
681
683
|
return provider.actions.all().length >= provider.limit;
|
|
682
684
|
}
|
|
683
|
-
function useAppliedOptions(
|
|
684
|
-
const applied =
|
|
685
|
+
function useAppliedOptions(options12, appliedIds) {
|
|
686
|
+
const applied = options12.filter((option) => option.value && appliedIds.includes(option.value));
|
|
685
687
|
const hasElementsProviderStyleApplied = applied.some(
|
|
686
688
|
(option) => option.provider && (0, import_editor_styles_repository4.isElementsStylesProvider)(option.provider)
|
|
687
689
|
);
|
|
@@ -1850,41 +1852,78 @@ var import_editor_controls16 = require("@elementor/editor-controls");
|
|
|
1850
1852
|
var import_icons10 = require("@elementor/icons");
|
|
1851
1853
|
var import_ui24 = require("@elementor/ui");
|
|
1852
1854
|
var import_i18n13 = require("@wordpress/i18n");
|
|
1855
|
+
var ALIGN_SELF_CHILD_OFFSET_MAP = {
|
|
1856
|
+
row: 90,
|
|
1857
|
+
"row-reverse": 90,
|
|
1858
|
+
column: 0,
|
|
1859
|
+
"column-reverse": 0
|
|
1860
|
+
};
|
|
1853
1861
|
var StartIcon3 = (0, import_ui24.withDirection)(import_icons10.LayoutAlignLeftIcon);
|
|
1854
1862
|
var EndIcon3 = (0, import_ui24.withDirection)(import_icons10.LayoutAlignRightIcon);
|
|
1855
1863
|
var iconProps3 = {
|
|
1856
|
-
isClockwise: false
|
|
1857
|
-
offset: 90
|
|
1864
|
+
isClockwise: false
|
|
1858
1865
|
};
|
|
1859
|
-
var
|
|
1866
|
+
var getOptions = (parentStyleDirection) => [
|
|
1860
1867
|
{
|
|
1861
1868
|
value: "start",
|
|
1862
1869
|
label: (0, import_i18n13.__)("Start", "elementor"),
|
|
1863
|
-
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(
|
|
1870
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(
|
|
1871
|
+
RotatedIcon,
|
|
1872
|
+
{
|
|
1873
|
+
icon: StartIcon3,
|
|
1874
|
+
size,
|
|
1875
|
+
offset: ALIGN_SELF_CHILD_OFFSET_MAP[parentStyleDirection],
|
|
1876
|
+
...iconProps3
|
|
1877
|
+
}
|
|
1878
|
+
),
|
|
1864
1879
|
showTooltip: true
|
|
1865
1880
|
},
|
|
1866
1881
|
{
|
|
1867
1882
|
value: "center",
|
|
1868
1883
|
label: (0, import_i18n13.__)("Center", "elementor"),
|
|
1869
|
-
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(
|
|
1884
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(
|
|
1885
|
+
RotatedIcon,
|
|
1886
|
+
{
|
|
1887
|
+
icon: import_icons10.LayoutAlignCenterIcon,
|
|
1888
|
+
size,
|
|
1889
|
+
offset: ALIGN_SELF_CHILD_OFFSET_MAP[parentStyleDirection],
|
|
1890
|
+
...iconProps3
|
|
1891
|
+
}
|
|
1892
|
+
),
|
|
1870
1893
|
showTooltip: true
|
|
1871
1894
|
},
|
|
1872
1895
|
{
|
|
1873
1896
|
value: "end",
|
|
1874
1897
|
label: (0, import_i18n13.__)("End", "elementor"),
|
|
1875
|
-
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(
|
|
1898
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(
|
|
1899
|
+
RotatedIcon,
|
|
1900
|
+
{
|
|
1901
|
+
icon: EndIcon3,
|
|
1902
|
+
size,
|
|
1903
|
+
offset: ALIGN_SELF_CHILD_OFFSET_MAP[parentStyleDirection],
|
|
1904
|
+
...iconProps3
|
|
1905
|
+
}
|
|
1906
|
+
),
|
|
1876
1907
|
showTooltip: true
|
|
1877
1908
|
},
|
|
1878
1909
|
{
|
|
1879
1910
|
value: "stretch",
|
|
1880
1911
|
label: (0, import_i18n13.__)("Stretch", "elementor"),
|
|
1881
|
-
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(
|
|
1912
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(
|
|
1913
|
+
RotatedIcon,
|
|
1914
|
+
{
|
|
1915
|
+
icon: import_icons10.LayoutDistributeVerticalIcon,
|
|
1916
|
+
size,
|
|
1917
|
+
offset: ALIGN_SELF_CHILD_OFFSET_MAP[parentStyleDirection],
|
|
1918
|
+
...iconProps3
|
|
1919
|
+
}
|
|
1920
|
+
),
|
|
1882
1921
|
showTooltip: true
|
|
1883
1922
|
}
|
|
1884
1923
|
];
|
|
1885
|
-
var AlignSelfChild = () => {
|
|
1924
|
+
var AlignSelfChild = ({ parentStyleDirection }) => {
|
|
1886
1925
|
const { isSiteRtl } = useDirection();
|
|
1887
|
-
return /* @__PURE__ */ React34.createElement(import_ui24.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React34.createElement(import_ui24.ThemeProvider, null, /* @__PURE__ */ React34.createElement(StylesField, { bind: "align-self" }, /* @__PURE__ */ React34.createElement(import_ui24.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React34.createElement(import_ui24.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React34.createElement(ControlLabel, null, (0, import_i18n13.__)("Align self", "elementor"))), /* @__PURE__ */ React34.createElement(import_ui24.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React34.createElement(import_editor_controls16.ToggleControl, { options:
|
|
1926
|
+
return /* @__PURE__ */ React34.createElement(import_ui24.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React34.createElement(import_ui24.ThemeProvider, null, /* @__PURE__ */ React34.createElement(StylesField, { bind: "align-self" }, /* @__PURE__ */ React34.createElement(import_ui24.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React34.createElement(import_ui24.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React34.createElement(ControlLabel, null, (0, import_i18n13.__)("Align self", "elementor"))), /* @__PURE__ */ React34.createElement(import_ui24.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React34.createElement(import_editor_controls16.ToggleControl, { options: getOptions(parentStyleDirection) }))))));
|
|
1888
1927
|
};
|
|
1889
1928
|
|
|
1890
1929
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
@@ -1930,7 +1969,7 @@ var import_editor_controls18 = require("@elementor/editor-controls");
|
|
|
1930
1969
|
var import_icons11 = require("@elementor/icons");
|
|
1931
1970
|
var import_ui26 = require("@elementor/ui");
|
|
1932
1971
|
var import_i18n15 = require("@wordpress/i18n");
|
|
1933
|
-
var
|
|
1972
|
+
var options3 = [
|
|
1934
1973
|
{
|
|
1935
1974
|
value: "row",
|
|
1936
1975
|
label: (0, import_i18n15.__)("Row", "elementor"),
|
|
@@ -1964,7 +2003,7 @@ var options4 = [
|
|
|
1964
2003
|
];
|
|
1965
2004
|
var FlexDirectionField = () => {
|
|
1966
2005
|
const { isSiteRtl } = useDirection();
|
|
1967
|
-
return /* @__PURE__ */ React36.createElement(import_ui26.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React36.createElement(import_ui26.ThemeProvider, null, /* @__PURE__ */ React36.createElement(StylesField, { bind: "flex-direction" }, /* @__PURE__ */ React36.createElement(import_ui26.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React36.createElement(import_ui26.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React36.createElement(ControlLabel, null, (0, import_i18n15.__)("Direction", "elementor"))), /* @__PURE__ */ React36.createElement(import_ui26.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React36.createElement(import_editor_controls18.ToggleControl, { options:
|
|
2006
|
+
return /* @__PURE__ */ React36.createElement(import_ui26.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React36.createElement(import_ui26.ThemeProvider, null, /* @__PURE__ */ React36.createElement(StylesField, { bind: "flex-direction" }, /* @__PURE__ */ React36.createElement(import_ui26.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React36.createElement(import_ui26.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React36.createElement(ControlLabel, null, (0, import_i18n15.__)("Direction", "elementor"))), /* @__PURE__ */ React36.createElement(import_ui26.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React36.createElement(import_editor_controls18.ToggleControl, { options: options3 }))))));
|
|
1968
2007
|
};
|
|
1969
2008
|
|
|
1970
2009
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
@@ -2153,7 +2192,7 @@ var iconProps4 = {
|
|
|
2153
2192
|
isClockwise: true,
|
|
2154
2193
|
offset: -90
|
|
2155
2194
|
};
|
|
2156
|
-
var
|
|
2195
|
+
var options4 = [
|
|
2157
2196
|
{
|
|
2158
2197
|
value: "flex-start",
|
|
2159
2198
|
label: (0, import_i18n19.__)("Start", "elementor"),
|
|
@@ -2193,7 +2232,7 @@ var options5 = [
|
|
|
2193
2232
|
];
|
|
2194
2233
|
var JustifyContentField = () => {
|
|
2195
2234
|
const { isSiteRtl } = useDirection();
|
|
2196
|
-
return /* @__PURE__ */ React40.createElement(import_ui30.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React40.createElement(import_ui30.ThemeProvider, null, /* @__PURE__ */ React40.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React40.createElement(import_ui30.Stack, { gap: 0.75 }, /* @__PURE__ */ React40.createElement(ControlLabel, null, (0, import_i18n19.__)("Justify content", "elementor")), /* @__PURE__ */ React40.createElement(import_editor_controls22.ToggleControl, { options:
|
|
2235
|
+
return /* @__PURE__ */ React40.createElement(import_ui30.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React40.createElement(import_ui30.ThemeProvider, null, /* @__PURE__ */ React40.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React40.createElement(import_ui30.Stack, { gap: 0.75 }, /* @__PURE__ */ React40.createElement(ControlLabel, null, (0, import_i18n19.__)("Justify content", "elementor")), /* @__PURE__ */ React40.createElement(import_editor_controls22.ToggleControl, { options: options4, fullWidth: true })))));
|
|
2197
2236
|
};
|
|
2198
2237
|
|
|
2199
2238
|
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
@@ -2202,7 +2241,7 @@ var import_editor_controls23 = require("@elementor/editor-controls");
|
|
|
2202
2241
|
var import_icons15 = require("@elementor/icons");
|
|
2203
2242
|
var import_ui31 = require("@elementor/ui");
|
|
2204
2243
|
var import_i18n20 = require("@wordpress/i18n");
|
|
2205
|
-
var
|
|
2244
|
+
var options5 = [
|
|
2206
2245
|
{
|
|
2207
2246
|
value: "nowrap",
|
|
2208
2247
|
label: (0, import_i18n20.__)("No wrap", "elementor"),
|
|
@@ -2224,7 +2263,7 @@ var options6 = [
|
|
|
2224
2263
|
];
|
|
2225
2264
|
var WrapField = () => {
|
|
2226
2265
|
const { isSiteRtl } = useDirection();
|
|
2227
|
-
return /* @__PURE__ */ React41.createElement(import_ui31.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React41.createElement(import_ui31.ThemeProvider, null, /* @__PURE__ */ React41.createElement(StylesField, { bind: "flex-wrap" }, /* @__PURE__ */ React41.createElement(import_ui31.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(import_ui31.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(ControlLabel, null, (0, import_i18n20.__)("Wrap", "elementor"))), /* @__PURE__ */ React41.createElement(import_ui31.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React41.createElement(import_editor_controls23.ToggleControl, { options:
|
|
2266
|
+
return /* @__PURE__ */ React41.createElement(import_ui31.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React41.createElement(import_ui31.ThemeProvider, null, /* @__PURE__ */ React41.createElement(StylesField, { bind: "flex-wrap" }, /* @__PURE__ */ React41.createElement(import_ui31.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(import_ui31.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(ControlLabel, null, (0, import_i18n20.__)("Wrap", "elementor"))), /* @__PURE__ */ React41.createElement(import_ui31.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React41.createElement(import_editor_controls23.ToggleControl, { options: options5 }))))));
|
|
2228
2267
|
};
|
|
2229
2268
|
|
|
2230
2269
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
@@ -2235,13 +2274,14 @@ var LayoutSection = () => {
|
|
|
2235
2274
|
const { element } = useElement();
|
|
2236
2275
|
const parent = (0, import_editor_elements7.useParentElement)(element.id);
|
|
2237
2276
|
const parentStyle = useComputedStyle(parent?.id || null);
|
|
2238
|
-
|
|
2277
|
+
const parentStyleDirection = parentStyle?.flexDirection ?? "row";
|
|
2278
|
+
return /* @__PURE__ */ React42.createElement(SectionContent, null, /* @__PURE__ */ React42.createElement(DisplayField, null), isDisplayFlex && /* @__PURE__ */ React42.createElement(FlexFields, null), "flex" === parentStyle?.display && /* @__PURE__ */ React42.createElement(FlexChildFields, { parentStyleDirection }));
|
|
2239
2279
|
};
|
|
2240
2280
|
var FlexFields = () => {
|
|
2241
2281
|
const [flexWrap] = useStylesField("flex-wrap");
|
|
2242
2282
|
return /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(FlexDirectionField, null), /* @__PURE__ */ React42.createElement(JustifyContentField, null), /* @__PURE__ */ React42.createElement(AlignItemsField, null), /* @__PURE__ */ React42.createElement(PanelDivider, null), /* @__PURE__ */ React42.createElement(GapControlField, null), /* @__PURE__ */ React42.createElement(WrapField, null), ["wrap", "wrap-reverse"].includes(flexWrap?.value) && /* @__PURE__ */ React42.createElement(AlignContentField, null));
|
|
2243
2283
|
};
|
|
2244
|
-
var FlexChildFields = () => /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(PanelDivider, null), /* @__PURE__ */ React42.createElement(import_editor_controls24.ControlFormLabel, null, (0, import_i18n21.__)("Flex child", "elementor")), /* @__PURE__ */ React42.createElement(AlignSelfChild,
|
|
2284
|
+
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(PanelDivider, null), /* @__PURE__ */ React42.createElement(import_editor_controls24.ControlFormLabel, null, (0, import_i18n21.__)("Flex child", "elementor")), /* @__PURE__ */ React42.createElement(AlignSelfChild, { parentStyleDirection }), /* @__PURE__ */ React42.createElement(FlexOrderField, null), /* @__PURE__ */ React42.createElement(FlexSizeField, null));
|
|
2245
2285
|
var shouldDisplayFlexFields = (display, local) => {
|
|
2246
2286
|
const value = display?.value ?? local?.value;
|
|
2247
2287
|
if (!value) {
|
|
@@ -2353,7 +2393,7 @@ var import_editor_controls28 = require("@elementor/editor-controls");
|
|
|
2353
2393
|
var import_icons17 = require("@elementor/icons");
|
|
2354
2394
|
var import_ui35 = require("@elementor/ui");
|
|
2355
2395
|
var import_i18n25 = require("@wordpress/i18n");
|
|
2356
|
-
var
|
|
2396
|
+
var options6 = [
|
|
2357
2397
|
{
|
|
2358
2398
|
value: "visible",
|
|
2359
2399
|
label: (0, import_i18n25.__)("Visible", "elementor"),
|
|
@@ -2374,7 +2414,7 @@ var options7 = [
|
|
|
2374
2414
|
}
|
|
2375
2415
|
];
|
|
2376
2416
|
var OverflowField = () => {
|
|
2377
|
-
return /* @__PURE__ */ React47.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React47.createElement(import_ui35.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(import_ui35.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlLabel, null, (0, import_i18n25.__)("Overflow", "elementor"))), /* @__PURE__ */ React47.createElement(import_ui35.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React47.createElement(import_editor_controls28.ToggleControl, { options:
|
|
2417
|
+
return /* @__PURE__ */ React47.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React47.createElement(import_ui35.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(import_ui35.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlLabel, null, (0, import_i18n25.__)("Overflow", "elementor"))), /* @__PURE__ */ React47.createElement(import_ui35.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React47.createElement(import_editor_controls28.ToggleControl, { options: options6 }))));
|
|
2378
2418
|
};
|
|
2379
2419
|
|
|
2380
2420
|
// src/components/style-sections/size-section/size-section.tsx
|
|
@@ -2467,11 +2507,11 @@ var supportedCategories = {
|
|
|
2467
2507
|
};
|
|
2468
2508
|
var getFontFamilies = () => {
|
|
2469
2509
|
const { controls } = getElementorConfig();
|
|
2470
|
-
const
|
|
2471
|
-
if (!
|
|
2510
|
+
const options12 = controls?.font?.options;
|
|
2511
|
+
if (!options12) {
|
|
2472
2512
|
return null;
|
|
2473
2513
|
}
|
|
2474
|
-
return
|
|
2514
|
+
return options12;
|
|
2475
2515
|
};
|
|
2476
2516
|
var useFontFamilies = () => {
|
|
2477
2517
|
const fontFamilies = getFontFamilies();
|
|
@@ -2518,7 +2558,7 @@ var import_editor_controls33 = require("@elementor/editor-controls");
|
|
|
2518
2558
|
var import_icons18 = require("@elementor/icons");
|
|
2519
2559
|
var import_ui40 = require("@elementor/ui");
|
|
2520
2560
|
var import_i18n32 = require("@wordpress/i18n");
|
|
2521
|
-
var
|
|
2561
|
+
var options7 = [
|
|
2522
2562
|
{
|
|
2523
2563
|
value: "normal",
|
|
2524
2564
|
label: (0, import_i18n32.__)("Normal", "elementor"),
|
|
@@ -2532,7 +2572,7 @@ var options8 = [
|
|
|
2532
2572
|
showTooltip: true
|
|
2533
2573
|
}
|
|
2534
2574
|
];
|
|
2535
|
-
var FontStyleField = () => /* @__PURE__ */ React53.createElement(StylesField, { bind: "font-style" }, /* @__PURE__ */ React53.createElement(import_ui40.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React53.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React53.createElement(import_editor_controls33.ControlFormLabel, null, (0, import_i18n32.__)("Font style", "elementor"))), /* @__PURE__ */ React53.createElement(import_ui40.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React53.createElement(import_editor_controls33.ToggleControl, { options:
|
|
2575
|
+
var FontStyleField = () => /* @__PURE__ */ React53.createElement(StylesField, { bind: "font-style" }, /* @__PURE__ */ React53.createElement(import_ui40.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React53.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React53.createElement(import_editor_controls33.ControlFormLabel, null, (0, import_i18n32.__)("Font style", "elementor"))), /* @__PURE__ */ React53.createElement(import_ui40.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React53.createElement(import_editor_controls33.ToggleControl, { options: options7 }))));
|
|
2536
2576
|
|
|
2537
2577
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
2538
2578
|
var React54 = __toESM(require("react"));
|
|
@@ -2580,7 +2620,7 @@ var import_ui44 = require("@elementor/ui");
|
|
|
2580
2620
|
var import_i18n36 = require("@wordpress/i18n");
|
|
2581
2621
|
var AlignStartIcon = (0, import_ui44.withDirection)(import_icons19.AlignLeftIcon);
|
|
2582
2622
|
var AlignEndIcon = (0, import_ui44.withDirection)(import_icons19.AlignRightIcon);
|
|
2583
|
-
var
|
|
2623
|
+
var options8 = [
|
|
2584
2624
|
{
|
|
2585
2625
|
value: "start",
|
|
2586
2626
|
label: (0, import_i18n36.__)("Start", "elementor"),
|
|
@@ -2607,7 +2647,7 @@ var options9 = [
|
|
|
2607
2647
|
}
|
|
2608
2648
|
];
|
|
2609
2649
|
var TextAlignmentField = () => {
|
|
2610
|
-
return /* @__PURE__ */ React57.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React57.createElement(import_ui44.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React57.createElement(import_ui44.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React57.createElement(ControlLabel, null, (0, import_i18n36.__)("Text align", "elementor"))), /* @__PURE__ */ React57.createElement(import_ui44.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React57.createElement(import_editor_controls37.ToggleControl, { options:
|
|
2650
|
+
return /* @__PURE__ */ React57.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React57.createElement(import_ui44.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React57.createElement(import_ui44.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React57.createElement(ControlLabel, null, (0, import_i18n36.__)("Text align", "elementor"))), /* @__PURE__ */ React57.createElement(import_ui44.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React57.createElement(import_editor_controls37.ToggleControl, { options: options8 }))));
|
|
2611
2651
|
};
|
|
2612
2652
|
|
|
2613
2653
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
@@ -2625,7 +2665,7 @@ var import_editor_controls39 = require("@elementor/editor-controls");
|
|
|
2625
2665
|
var import_icons20 = require("@elementor/icons");
|
|
2626
2666
|
var import_ui46 = require("@elementor/ui");
|
|
2627
2667
|
var import_i18n38 = require("@wordpress/i18n");
|
|
2628
|
-
var
|
|
2668
|
+
var options9 = [
|
|
2629
2669
|
{
|
|
2630
2670
|
value: "none",
|
|
2631
2671
|
label: (0, import_i18n38.__)("None", "elementor"),
|
|
@@ -2652,7 +2692,7 @@ var options10 = [
|
|
|
2652
2692
|
showTooltip: true
|
|
2653
2693
|
}
|
|
2654
2694
|
];
|
|
2655
|
-
var TextDecorationField = () => /* @__PURE__ */ React59.createElement(StylesField, { bind: "text-decoration" }, /* @__PURE__ */ React59.createElement(import_ui46.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React59.createElement(import_ui46.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React59.createElement(ControlLabel, null, (0, import_i18n38.__)("Line decoration", "elementor"))), /* @__PURE__ */ React59.createElement(import_ui46.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React59.createElement(import_editor_controls39.ToggleControl, { options:
|
|
2695
|
+
var TextDecorationField = () => /* @__PURE__ */ React59.createElement(StylesField, { bind: "text-decoration" }, /* @__PURE__ */ React59.createElement(import_ui46.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React59.createElement(import_ui46.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React59.createElement(ControlLabel, null, (0, import_i18n38.__)("Line decoration", "elementor"))), /* @__PURE__ */ React59.createElement(import_ui46.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React59.createElement(import_editor_controls39.ToggleControl, { options: options9, exclusive: false }))));
|
|
2656
2696
|
|
|
2657
2697
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
2658
2698
|
var React60 = __toESM(require("react"));
|
|
@@ -2660,7 +2700,7 @@ var import_editor_controls40 = require("@elementor/editor-controls");
|
|
|
2660
2700
|
var import_icons21 = require("@elementor/icons");
|
|
2661
2701
|
var import_ui47 = require("@elementor/ui");
|
|
2662
2702
|
var import_i18n39 = require("@wordpress/i18n");
|
|
2663
|
-
var
|
|
2703
|
+
var options10 = [
|
|
2664
2704
|
{
|
|
2665
2705
|
value: "ltr",
|
|
2666
2706
|
label: (0, import_i18n39.__)("Left to right", "elementor"),
|
|
@@ -2675,7 +2715,7 @@ var options11 = [
|
|
|
2675
2715
|
}
|
|
2676
2716
|
];
|
|
2677
2717
|
var TextDirectionField = () => {
|
|
2678
|
-
return /* @__PURE__ */ React60.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React60.createElement(import_ui47.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React60.createElement(import_ui47.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(ControlLabel, null, (0, import_i18n39.__)("Direction", "elementor"))), /* @__PURE__ */ React60.createElement(import_ui47.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React60.createElement(import_editor_controls40.ToggleControl, { options:
|
|
2718
|
+
return /* @__PURE__ */ React60.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React60.createElement(import_ui47.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React60.createElement(import_ui47.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(ControlLabel, null, (0, import_i18n39.__)("Direction", "elementor"))), /* @__PURE__ */ React60.createElement(import_ui47.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React60.createElement(import_editor_controls40.ToggleControl, { options: options10 }))));
|
|
2679
2719
|
};
|
|
2680
2720
|
|
|
2681
2721
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
@@ -2725,7 +2765,7 @@ var import_editor_controls42 = require("@elementor/editor-controls");
|
|
|
2725
2765
|
var import_icons22 = require("@elementor/icons");
|
|
2726
2766
|
var import_ui48 = require("@elementor/ui");
|
|
2727
2767
|
var import_i18n41 = require("@wordpress/i18n");
|
|
2728
|
-
var
|
|
2768
|
+
var options11 = [
|
|
2729
2769
|
{
|
|
2730
2770
|
value: "none",
|
|
2731
2771
|
label: (0, import_i18n41.__)("None", "elementor"),
|
|
@@ -2751,7 +2791,7 @@ var options12 = [
|
|
|
2751
2791
|
showTooltip: true
|
|
2752
2792
|
}
|
|
2753
2793
|
];
|
|
2754
|
-
var TransformField = () => /* @__PURE__ */ React62.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React62.createElement(import_ui48.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React62.createElement(import_ui48.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React62.createElement(ControlLabel, null, (0, import_i18n41.__)("Text transform", "elementor"))), /* @__PURE__ */ React62.createElement(import_ui48.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React62.createElement(import_editor_controls42.ToggleControl, { options:
|
|
2794
|
+
var TransformField = () => /* @__PURE__ */ React62.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React62.createElement(import_ui48.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React62.createElement(import_ui48.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React62.createElement(ControlLabel, null, (0, import_i18n41.__)("Text transform", "elementor"))), /* @__PURE__ */ React62.createElement(import_ui48.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React62.createElement(import_editor_controls42.ToggleControl, { options: options11 }))));
|
|
2755
2795
|
|
|
2756
2796
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
2757
2797
|
var React63 = __toESM(require("react"));
|
|
@@ -2813,13 +2853,13 @@ var EditingPanelTabs = () => {
|
|
|
2813
2853
|
var { useMenuItems } = controlActionsMenu;
|
|
2814
2854
|
var EditingPanel = () => {
|
|
2815
2855
|
const { element, elementType } = (0, import_editor_elements8.useSelectedElement)();
|
|
2816
|
-
const
|
|
2856
|
+
const controlReplacements = getControlReplacements();
|
|
2817
2857
|
const menuItems = useMenuItems().default;
|
|
2818
2858
|
if (!element || !elementType) {
|
|
2819
2859
|
return null;
|
|
2820
2860
|
}
|
|
2821
2861
|
const panelTitle = (0, import_i18n45.__)("Edit %s", "elementor").replace("%s", elementType.title);
|
|
2822
|
-
return /* @__PURE__ */ React67.createElement(import_ui52.ErrorBoundary, { fallback: /* @__PURE__ */ React67.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React67.createElement(import_session4.SessionStorageProvider, { prefix: "elementor" }, /* @__PURE__ */ React67.createElement(import_editor_ui3.ThemeProvider, null, /* @__PURE__ */ React67.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React67.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React67.createElement(import_editor_panels.PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React67.createElement(import_icons23.AtomIcon, { fontSize: "small", sx: { color: "text.tertiary" } })), /* @__PURE__ */ React67.createElement(import_editor_panels.PanelBody, null, /* @__PURE__ */ React67.createElement(import_editor_controls44.ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React67.createElement(import_editor_controls44.
|
|
2862
|
+
return /* @__PURE__ */ React67.createElement(import_ui52.ErrorBoundary, { fallback: /* @__PURE__ */ React67.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React67.createElement(import_session4.SessionStorageProvider, { prefix: "elementor" }, /* @__PURE__ */ React67.createElement(import_editor_ui3.ThemeProvider, null, /* @__PURE__ */ React67.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React67.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React67.createElement(import_editor_panels.PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React67.createElement(import_icons23.AtomIcon, { fontSize: "small", sx: { color: "text.tertiary" } })), /* @__PURE__ */ React67.createElement(import_editor_panels.PanelBody, null, /* @__PURE__ */ React67.createElement(import_editor_controls44.ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React67.createElement(import_editor_controls44.ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React67.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React67.createElement(EditingPanelTabs, null)))))))));
|
|
2823
2863
|
};
|
|
2824
2864
|
|
|
2825
2865
|
// src/panel.ts
|
|
@@ -2872,7 +2912,6 @@ var import_editor_canvas2 = require("@elementor/editor-canvas");
|
|
|
2872
2912
|
|
|
2873
2913
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
2874
2914
|
var React71 = __toESM(require("react"));
|
|
2875
|
-
var import_react23 = require("react");
|
|
2876
2915
|
var import_editor_controls48 = require("@elementor/editor-controls");
|
|
2877
2916
|
var import_icons25 = require("@elementor/icons");
|
|
2878
2917
|
var import_ui55 = require("@elementor/ui");
|
|
@@ -3009,8 +3048,8 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
3009
3048
|
const { bind, value: dynamicValue, setValue } = (0, import_editor_controls47.useBoundProp)(dynamicPropTypeUtil);
|
|
3010
3049
|
const [, updatePropValueHistory] = usePersistDynamicValue(bind);
|
|
3011
3050
|
const isCurrentValueDynamic = !!dynamicValue;
|
|
3012
|
-
const
|
|
3013
|
-
const hasNoDynamicTags = !
|
|
3051
|
+
const options12 = useFilteredOptions(searchValue);
|
|
3052
|
+
const hasNoDynamicTags = !options12.length && !searchValue.trim();
|
|
3014
3053
|
const handleSearch = (event) => {
|
|
3015
3054
|
setSearchValue(event.target.value);
|
|
3016
3055
|
};
|
|
@@ -3033,7 +3072,7 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
3033
3072
|
startAdornment: /* @__PURE__ */ React70.createElement(import_ui54.InputAdornment, { position: "start" }, /* @__PURE__ */ React70.createElement(import_icons24.SearchIcon, { fontSize: SIZE3 }))
|
|
3034
3073
|
}
|
|
3035
3074
|
}
|
|
3036
|
-
)), /* @__PURE__ */ React70.createElement(import_ui54.Divider, null), /* @__PURE__ */ React70.createElement(import_ui54.Box, { sx: { overflowY: "auto", height: 260, width: 220 } },
|
|
3075
|
+
)), /* @__PURE__ */ React70.createElement(import_ui54.Divider, null), /* @__PURE__ */ React70.createElement(import_ui54.Box, { sx: { overflowY: "auto", height: 260, width: 220 } }, options12.length > 0 ? /* @__PURE__ */ React70.createElement(import_ui54.MenuList, { role: "listbox", tabIndex: 0 }, options12.map(([category, items3], index) => /* @__PURE__ */ React70.createElement(import_react22.Fragment, { key: index }, /* @__PURE__ */ React70.createElement(
|
|
3037
3076
|
import_ui54.MenuSubheader,
|
|
3038
3077
|
{
|
|
3039
3078
|
sx: { px: 1.5, typography: "caption", color: "text.tertiary" }
|
|
@@ -3086,7 +3125,7 @@ var NoDynamicTags = () => /* @__PURE__ */ React70.createElement(import_ui54.Box,
|
|
|
3086
3125
|
));
|
|
3087
3126
|
var useFilteredOptions = (searchValue) => {
|
|
3088
3127
|
const dynamicTags = usePropDynamicTags();
|
|
3089
|
-
const
|
|
3128
|
+
const options12 = dynamicTags.reduce((categories, { name, label, group }) => {
|
|
3090
3129
|
const isVisible = label.toLowerCase().includes(searchValue.trim().toLowerCase());
|
|
3091
3130
|
if (!isVisible) {
|
|
3092
3131
|
return categories;
|
|
@@ -3097,7 +3136,7 @@ var useFilteredOptions = (searchValue) => {
|
|
|
3097
3136
|
categories.get(group)?.push({ label, value: name });
|
|
3098
3137
|
return categories;
|
|
3099
3138
|
}, /* @__PURE__ */ new Map());
|
|
3100
|
-
return [...
|
|
3139
|
+
return [...options12];
|
|
3101
3140
|
};
|
|
3102
3141
|
|
|
3103
3142
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
@@ -3106,9 +3145,8 @@ var DynamicSelectionControl = () => {
|
|
|
3106
3145
|
const { setValue: setAnyValue } = (0, import_editor_controls48.useBoundProp)();
|
|
3107
3146
|
const { bind, value } = (0, import_editor_controls48.useBoundProp)(dynamicPropTypeUtil);
|
|
3108
3147
|
const [propValueFromHistory] = usePersistDynamicValue(bind);
|
|
3148
|
+
const selectionPopoverState = (0, import_ui55.usePopupState)({ variant: "popover" });
|
|
3109
3149
|
const { name: tagName = "" } = value;
|
|
3110
|
-
const selectionPopoverId = (0, import_react23.useId)();
|
|
3111
|
-
const selectionPopoverState = (0, import_ui55.usePopupState)({ variant: "popover", popupId: selectionPopoverId });
|
|
3112
3150
|
const dynamicTag = useDynamicTag(tagName);
|
|
3113
3151
|
const removeDynamicTag = () => {
|
|
3114
3152
|
setAnyValue(propValueFromHistory ?? null);
|
|
@@ -3146,28 +3184,20 @@ var DynamicSelectionControl = () => {
|
|
|
3146
3184
|
));
|
|
3147
3185
|
};
|
|
3148
3186
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
3149
|
-
const
|
|
3150
|
-
const settingsPopupState = (0, import_ui55.usePopupState)({ variant: "popover", popupId });
|
|
3187
|
+
const popupState = (0, import_ui55.usePopupState)({ variant: "popover" });
|
|
3151
3188
|
const hasDynamicSettings = !!dynamicTag.atomic_controls.length;
|
|
3152
3189
|
if (!hasDynamicSettings) {
|
|
3153
3190
|
return null;
|
|
3154
3191
|
}
|
|
3155
|
-
return /* @__PURE__ */ React71.createElement(React71.Fragment, null, /* @__PURE__ */ React71.createElement(
|
|
3156
|
-
import_ui55.IconButton,
|
|
3157
|
-
{
|
|
3158
|
-
size: SIZE4,
|
|
3159
|
-
...(0, import_ui55.bindTrigger)(settingsPopupState),
|
|
3160
|
-
"aria-label": (0, import_i18n47.__)("Settings", "elementor")
|
|
3161
|
-
},
|
|
3162
|
-
/* @__PURE__ */ React71.createElement(import_icons25.SettingsIcon, { fontSize: SIZE4 })
|
|
3163
|
-
), /* @__PURE__ */ React71.createElement(
|
|
3192
|
+
return /* @__PURE__ */ React71.createElement(React71.Fragment, null, /* @__PURE__ */ React71.createElement(import_ui55.IconButton, { size: SIZE4, ...(0, import_ui55.bindTrigger)(popupState), "aria-label": (0, import_i18n47.__)("Settings", "elementor") }, /* @__PURE__ */ React71.createElement(import_icons25.SettingsIcon, { fontSize: SIZE4 })), /* @__PURE__ */ React71.createElement(
|
|
3164
3193
|
import_ui55.Popover,
|
|
3165
3194
|
{
|
|
3195
|
+
disablePortal: true,
|
|
3166
3196
|
disableScrollLock: true,
|
|
3167
3197
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
3168
|
-
...(0, import_ui55.bindPopover)(
|
|
3198
|
+
...(0, import_ui55.bindPopover)(popupState)
|
|
3169
3199
|
},
|
|
3170
|
-
/* @__PURE__ */ React71.createElement(import_ui55.Paper, { component: import_ui55.Stack, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React71.createElement(import_ui55.Stack, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React71.createElement(import_icons25.DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React71.createElement(import_ui55.Typography, { variant: "subtitle2" }, dynamicTag.label), /* @__PURE__ */ React71.createElement(import_ui55.IconButton, { sx: { ml: "auto" }, size: SIZE4, onClick:
|
|
3200
|
+
/* @__PURE__ */ React71.createElement(import_ui55.Paper, { component: import_ui55.Stack, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React71.createElement(import_ui55.Stack, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React71.createElement(import_icons25.DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React71.createElement(import_ui55.Typography, { variant: "subtitle2" }, dynamicTag.label), /* @__PURE__ */ React71.createElement(import_ui55.IconButton, { sx: { ml: "auto" }, size: SIZE4, onClick: popupState.close }, /* @__PURE__ */ React71.createElement(import_icons25.XIcon, { fontSize: SIZE4 }))), /* @__PURE__ */ React71.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls }))
|
|
3171
3201
|
));
|
|
3172
3202
|
};
|
|
3173
3203
|
var DynamicSettings = ({ controls }) => {
|
|
@@ -3260,7 +3290,7 @@ var usePropDynamicAction = () => {
|
|
|
3260
3290
|
// src/dynamics/init.ts
|
|
3261
3291
|
var { registerPopoverAction } = controlActionsMenu;
|
|
3262
3292
|
var init = () => {
|
|
3263
|
-
|
|
3293
|
+
registerControlReplacement({
|
|
3264
3294
|
component: DynamicSelectionControl,
|
|
3265
3295
|
condition: ({ value }) => isDynamicPropValue(value)
|
|
3266
3296
|
});
|
|
@@ -3294,9 +3324,10 @@ var blockV1Panel = () => {
|
|
|
3294
3324
|
};
|
|
3295
3325
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3296
3326
|
0 && (module.exports = {
|
|
3327
|
+
controlActionsMenu,
|
|
3297
3328
|
init,
|
|
3298
3329
|
injectIntoClassSelectorActions,
|
|
3299
|
-
|
|
3330
|
+
registerControlReplacement,
|
|
3300
3331
|
useBoundProp,
|
|
3301
3332
|
usePanelActions,
|
|
3302
3333
|
usePanelStatus
|