@elementor/editor-editing-panel 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +48 -0
- package/dist/index.js +852 -615
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +790 -544
- package/dist/index.mjs.map +1 -1
- package/package.json +13 -11
- package/src/components/conditional-tooltip-wrapper.tsx +52 -0
- package/src/components/css-class-selector.tsx +59 -19
- package/src/components/multi-combobox/types.ts +1 -0
- package/src/components/style-sections/border-section/border-radius-field.tsx +4 -4
- package/src/components/style-sections/border-section/border-width-field.tsx +4 -4
- package/src/components/style-sections/layout-section/align-items-field.tsx +40 -60
- package/src/components/style-sections/layout-section/align-self-child-field.tsx +72 -0
- package/src/components/style-sections/layout-section/flex-direction-field.tsx +2 -2
- package/src/components/style-sections/layout-section/flex-order-field.tsx +14 -8
- package/src/components/style-sections/layout-section/flex-size-field.tsx +164 -0
- package/src/components/style-sections/layout-section/gap-control-field.tsx +18 -0
- package/src/components/style-sections/layout-section/justify-content-field.tsx +51 -78
- package/src/components/style-sections/layout-section/layout-section.tsx +9 -2
- package/src/components/style-sections/layout-section/utils/rotated-icon.tsx +52 -0
- package/src/components/style-sections/layout-section/wrap-field.tsx +1 -1
- package/src/components/style-sections/position-section/position-section.tsx +3 -3
- package/src/components/style-sections/typography-section/line-height-field.tsx +21 -0
- package/src/components/style-sections/typography-section/text-style-field.tsx +31 -8
- package/src/components/style-sections/typography-section/typography-section.tsx +3 -1
- package/src/components/style-tab.tsx +2 -11
- package/src/contexts/style-context.tsx +2 -2
- package/src/controls-registry/controls-registry.tsx +4 -0
- package/src/dynamics/components/dynamic-selection-control.tsx +8 -5
- package/src/dynamics/components/dynamic-selection.tsx +10 -8
- package/src/dynamics/dynamic-control.tsx +9 -11
- package/src/dynamics/utils.ts +20 -3
- package/src/hooks/use-style-prop-history.ts +1 -1
- package/src/hooks/use-styles-field.ts +2 -0
package/dist/index.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import { __registerPanel as registerPanel } from "@elementor/editor-panels";
|
|
|
11
11
|
import { __privateBlockDataCommand as blockDataCommand } from "@elementor/editor-v1-adapters";
|
|
12
12
|
|
|
13
13
|
// src/hooks/use-close-editor-panel.ts
|
|
14
|
-
import { useEffect as
|
|
14
|
+
import { useEffect as useEffect3 } from "react";
|
|
15
15
|
import { getSelectedElements as getSelectedElements2, isElementInContainer } from "@elementor/editor-elements";
|
|
16
16
|
import { __privateListenTo as listenTo, commandStartEvent } from "@elementor/editor-v1-adapters";
|
|
17
17
|
|
|
@@ -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 React60 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 __40 } 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 Divider8, Stack as
|
|
101
|
-
import { __ as
|
|
98
|
+
import * as React59 from "react";
|
|
99
|
+
import { Fragment as Fragment7 } from "react";
|
|
100
|
+
import { Divider as Divider8, Stack as Stack20, Tab, TabPanel, Tabs, useTabs } from "@elementor/ui";
|
|
101
|
+
import { __ as __39 } from "@wordpress/i18n";
|
|
102
102
|
|
|
103
103
|
// src/components/settings-tab.tsx
|
|
104
104
|
import * as React9 from "react";
|
|
@@ -111,17 +111,21 @@ import { createError } from "@elementor/utils";
|
|
|
111
111
|
// src/controls-registry/controls-registry.tsx
|
|
112
112
|
import {
|
|
113
113
|
ImageControl,
|
|
114
|
+
LinkControl,
|
|
114
115
|
SelectControl,
|
|
115
116
|
SizeControl,
|
|
116
117
|
TextAreaControl,
|
|
117
|
-
TextControl
|
|
118
|
+
TextControl,
|
|
119
|
+
UrlControl
|
|
118
120
|
} from "@elementor/editor-controls";
|
|
119
121
|
var controlTypes = {
|
|
120
122
|
image: { component: ImageControl, layout: "full" },
|
|
121
123
|
text: { component: TextControl, layout: "two-columns" },
|
|
122
124
|
textarea: { component: TextAreaControl, layout: "full" },
|
|
123
125
|
size: { component: SizeControl, layout: "two-columns" },
|
|
124
|
-
select: { component: SelectControl, layout: "two-columns" }
|
|
126
|
+
select: { component: SelectControl, layout: "two-columns" },
|
|
127
|
+
link: { component: LinkControl, layout: "full" },
|
|
128
|
+
url: { component: UrlControl, layout: "full" }
|
|
125
129
|
};
|
|
126
130
|
var getControlByType = (type) => controlTypes[type]?.component;
|
|
127
131
|
var getLayoutByType = (type) => controlTypes[type].layout;
|
|
@@ -254,13 +258,12 @@ var Control2 = ({ control }) => {
|
|
|
254
258
|
};
|
|
255
259
|
|
|
256
260
|
// src/components/style-tab.tsx
|
|
257
|
-
import * as
|
|
258
|
-
import { useState as
|
|
259
|
-
import { useElementSetting as useElementSetting3, useElementStyles
|
|
261
|
+
import * as React58 from "react";
|
|
262
|
+
import { useState as useState6 } from "react";
|
|
263
|
+
import { useElementSetting as useElementSetting3, useElementStyles } from "@elementor/editor-elements";
|
|
260
264
|
import { useActiveBreakpoint } from "@elementor/editor-responsive";
|
|
261
|
-
import { generateId } from "@elementor/editor-styles";
|
|
262
265
|
import { Divider as Divider7 } from "@elementor/ui";
|
|
263
|
-
import { __ as
|
|
266
|
+
import { __ as __38 } from "@wordpress/i18n";
|
|
264
267
|
|
|
265
268
|
// src/contexts/classes-prop-context.tsx
|
|
266
269
|
import * as React10 from "react";
|
|
@@ -293,17 +296,54 @@ function useStyle() {
|
|
|
293
296
|
}
|
|
294
297
|
|
|
295
298
|
// src/components/css-class-selector.tsx
|
|
296
|
-
import * as
|
|
297
|
-
import { updateSettings as updateSettings2, useElementSetting as useElementSetting2
|
|
299
|
+
import * as React14 from "react";
|
|
300
|
+
import { updateSettings as updateSettings2, useElementSetting as useElementSetting2 } from "@elementor/editor-elements";
|
|
298
301
|
import { classesPropTypeUtil } from "@elementor/editor-props";
|
|
302
|
+
import { ELEMENTS_STYLES_PROVIDER_KEY, useAllStylesByProvider } from "@elementor/editor-styles-repository";
|
|
299
303
|
import { Chip as Chip2, Stack as Stack3, Typography as Typography2 } from "@elementor/ui";
|
|
300
304
|
import { __ } from "@wordpress/i18n";
|
|
301
305
|
|
|
302
|
-
// src/components/
|
|
306
|
+
// src/components/conditional-tooltip-wrapper.tsx
|
|
307
|
+
import { useEffect, useRef, useState as useState2 } from "react";
|
|
303
308
|
import * as React12 from "react";
|
|
309
|
+
import { Box as Box3, Tooltip as Tooltip2 } from "@elementor/ui";
|
|
310
|
+
var ConditionalTooltipWrapper = ({ maxWidth, title }) => {
|
|
311
|
+
const elRef = useRef(null);
|
|
312
|
+
const [isOverflown, setIsOverflown] = useState2(false);
|
|
313
|
+
useEffect(() => {
|
|
314
|
+
const onResize = () => {
|
|
315
|
+
const element = elRef.current;
|
|
316
|
+
if (element) {
|
|
317
|
+
setIsOverflown(element.scrollWidth > element.clientWidth);
|
|
318
|
+
}
|
|
319
|
+
};
|
|
320
|
+
onResize();
|
|
321
|
+
window.addEventListener("resize", onResize);
|
|
322
|
+
return () => {
|
|
323
|
+
window.removeEventListener("resize", onResize);
|
|
324
|
+
};
|
|
325
|
+
}, []);
|
|
326
|
+
if (isOverflown) {
|
|
327
|
+
return /* @__PURE__ */ React12.createElement(Tooltip2, { title, placement: "top" }, /* @__PURE__ */ React12.createElement(Content, { maxWidth, ref: elRef, title }));
|
|
328
|
+
}
|
|
329
|
+
return /* @__PURE__ */ React12.createElement(Content, { maxWidth, ref: elRef, title });
|
|
330
|
+
};
|
|
331
|
+
var Content = React12.forwardRef(({ maxWidth, title, ...rest }, ref) => /* @__PURE__ */ React12.createElement(
|
|
332
|
+
Box3,
|
|
333
|
+
{
|
|
334
|
+
ref,
|
|
335
|
+
position: "relative",
|
|
336
|
+
sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", maxWidth },
|
|
337
|
+
...rest
|
|
338
|
+
},
|
|
339
|
+
title
|
|
340
|
+
));
|
|
341
|
+
|
|
342
|
+
// src/components/multi-combobox/multi-combobox.tsx
|
|
343
|
+
import * as React13 from "react";
|
|
304
344
|
import {
|
|
305
345
|
Autocomplete,
|
|
306
|
-
Box as
|
|
346
|
+
Box as Box4,
|
|
307
347
|
Chip,
|
|
308
348
|
styled as styled3,
|
|
309
349
|
TextField
|
|
@@ -359,7 +399,7 @@ var createActionOption = (groupLabel, action, inputValue) => ({
|
|
|
359
399
|
var MultiCombobox = ({
|
|
360
400
|
actions = {},
|
|
361
401
|
selected,
|
|
362
|
-
options:
|
|
402
|
+
options: options10,
|
|
363
403
|
optionsLabel,
|
|
364
404
|
onSelect,
|
|
365
405
|
onCreate,
|
|
@@ -372,7 +412,7 @@ var MultiCombobox = ({
|
|
|
372
412
|
optionsLabel,
|
|
373
413
|
onSelect
|
|
374
414
|
);
|
|
375
|
-
return /* @__PURE__ */
|
|
415
|
+
return /* @__PURE__ */ React13.createElement(
|
|
376
416
|
Autocomplete,
|
|
377
417
|
{
|
|
378
418
|
...props,
|
|
@@ -383,10 +423,10 @@ var MultiCombobox = ({
|
|
|
383
423
|
disableClearable: true,
|
|
384
424
|
handleHomeEndKeys: true,
|
|
385
425
|
value: selected,
|
|
386
|
-
options:
|
|
426
|
+
options: options10,
|
|
387
427
|
renderGroup,
|
|
388
|
-
renderInput: (params) => /* @__PURE__ */
|
|
389
|
-
getLimitTagsText: (more) => /* @__PURE__ */
|
|
428
|
+
renderInput: (params) => /* @__PURE__ */ React13.createElement(TextField, { ...params }),
|
|
429
|
+
getLimitTagsText: (more) => /* @__PURE__ */ React13.createElement(Chip, { size: "tiny", variant: "standard", label: `+${more}`, clickable: true }),
|
|
390
430
|
onChange: (_, selectedOrTypedValue, reason) => {
|
|
391
431
|
if (reason === "createOption") {
|
|
392
432
|
const typedValue = selectedOrTypedValue.find((option) => typeof option === "string");
|
|
@@ -397,7 +437,7 @@ var MultiCombobox = ({
|
|
|
397
437
|
return actionProps.onChange(action);
|
|
398
438
|
}
|
|
399
439
|
const selectedValues = selectedOrTypedValue.filter((v) => typeof v !== "string");
|
|
400
|
-
const fixedValues =
|
|
440
|
+
const fixedValues = options10.filter((option) => option.fixed);
|
|
401
441
|
optionProps.onChange([.../* @__PURE__ */ new Set([...fixedValues, ...selectedValues])]);
|
|
402
442
|
},
|
|
403
443
|
getOptionLabel: (option) => {
|
|
@@ -418,13 +458,13 @@ var MultiCombobox = ({
|
|
|
418
458
|
}
|
|
419
459
|
);
|
|
420
460
|
};
|
|
421
|
-
var renderGroup = (params) => /* @__PURE__ */
|
|
461
|
+
var renderGroup = (params) => /* @__PURE__ */ React13.createElement(Group, { key: params.key }, /* @__PURE__ */ React13.createElement(GroupHeader, null, params.group), /* @__PURE__ */ React13.createElement(GroupItems, null, params.children));
|
|
422
462
|
var Group = styled3("li")`
|
|
423
463
|
&:not( :last-of-type ) {
|
|
424
464
|
border-bottom: 1px solid ${({ theme }) => theme.palette.divider};
|
|
425
465
|
}
|
|
426
466
|
`;
|
|
427
|
-
var GroupHeader = styled3(
|
|
467
|
+
var GroupHeader = styled3(Box4)(({ theme }) => ({
|
|
428
468
|
position: "sticky",
|
|
429
469
|
top: "-8px",
|
|
430
470
|
padding: theme.spacing(1, 2),
|
|
@@ -437,20 +477,27 @@ var GroupItems = styled3("ul")`
|
|
|
437
477
|
// src/components/css-class-selector.tsx
|
|
438
478
|
var ID = "elementor-css-class-selector";
|
|
439
479
|
var TAGS_LIMIT = 8;
|
|
480
|
+
var EMPTY_OPTION = {
|
|
481
|
+
label: __("local", "elementor"),
|
|
482
|
+
value: "",
|
|
483
|
+
fixed: true,
|
|
484
|
+
color: "primary",
|
|
485
|
+
provider: ELEMENTS_STYLES_PROVIDER_KEY
|
|
486
|
+
};
|
|
440
487
|
function CssClassSelector() {
|
|
441
|
-
const
|
|
488
|
+
const options10 = useOptions();
|
|
489
|
+
const [appliedIds, setAppliedIds] = useAppliedClassesIds();
|
|
442
490
|
const { id: activeId, setId: setActiveId } = useStyle();
|
|
443
|
-
const
|
|
444
|
-
const handleApply = useHandleApply();
|
|
491
|
+
const handleApply = useHandleApply(appliedIds, setAppliedIds);
|
|
445
492
|
const handleActivate = ({ value }) => setActiveId(value);
|
|
446
|
-
const
|
|
447
|
-
const
|
|
448
|
-
return /* @__PURE__ */
|
|
493
|
+
const applied = useAppliedOptions(options10, appliedIds);
|
|
494
|
+
const active = applied.find((option) => option.value === activeId) ?? EMPTY_OPTION;
|
|
495
|
+
return /* @__PURE__ */ React14.createElement(Stack3, { gap: 1, p: 2 }, /* @__PURE__ */ React14.createElement(Typography2, { component: "label", variant: "caption", htmlFor: ID }, __("CSS Classes", "elementor")), /* @__PURE__ */ React14.createElement(
|
|
449
496
|
MultiCombobox,
|
|
450
497
|
{
|
|
451
498
|
id: ID,
|
|
452
499
|
size: "tiny",
|
|
453
|
-
options:
|
|
500
|
+
options: options10,
|
|
454
501
|
selected: applied,
|
|
455
502
|
onSelect: handleApply,
|
|
456
503
|
limitTags: TAGS_LIMIT,
|
|
@@ -458,17 +505,18 @@ function CssClassSelector() {
|
|
|
458
505
|
renderTags: (values, getTagProps) => values.map((value, index) => {
|
|
459
506
|
const chipProps = getTagProps({ index });
|
|
460
507
|
const isActive = value.value === active?.value;
|
|
461
|
-
return /* @__PURE__ */
|
|
508
|
+
return /* @__PURE__ */ React14.createElement(
|
|
462
509
|
Chip2,
|
|
463
510
|
{
|
|
464
511
|
...chipProps,
|
|
465
512
|
key: chipProps.key,
|
|
466
513
|
size: "small",
|
|
467
|
-
label: value.label,
|
|
514
|
+
label: /* @__PURE__ */ React14.createElement(ConditionalTooltipWrapper, { maxWidth: "10ch", title: value.label }),
|
|
468
515
|
variant: isActive ? "filled" : "standard",
|
|
469
516
|
color: isActive && value.color ? value.color : "default",
|
|
470
517
|
onClick: () => handleActivate(value),
|
|
471
|
-
onDelete: null
|
|
518
|
+
onDelete: null,
|
|
519
|
+
"aria-pressed": isActive
|
|
472
520
|
}
|
|
473
521
|
);
|
|
474
522
|
})
|
|
@@ -477,13 +525,31 @@ function CssClassSelector() {
|
|
|
477
525
|
}
|
|
478
526
|
function useOptions() {
|
|
479
527
|
const { element } = useElement();
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
528
|
+
return useAllStylesByProvider({ elementId: element.id }).flatMap(([providerKey, styleDefs]) => {
|
|
529
|
+
const isElements = providerKey === ELEMENTS_STYLES_PROVIDER_KEY;
|
|
530
|
+
if (isElements && styleDefs.length === 0) {
|
|
531
|
+
return [EMPTY_OPTION];
|
|
532
|
+
}
|
|
533
|
+
return styleDefs.map((styleDef) => {
|
|
534
|
+
return {
|
|
535
|
+
label: styleDef.label,
|
|
536
|
+
value: styleDef.id,
|
|
537
|
+
fixed: isElements,
|
|
538
|
+
color: isElements ? "primary" : "global",
|
|
539
|
+
provider: providerKey
|
|
540
|
+
};
|
|
541
|
+
});
|
|
542
|
+
});
|
|
543
|
+
}
|
|
544
|
+
function useAppliedOptions(options10, appliedIds) {
|
|
545
|
+
const applied = appliedIds.map((id) => options10.find((option) => option.value === id)).filter((option) => !!option);
|
|
546
|
+
const hasElementsProviderStyleApplied = applied.some(
|
|
547
|
+
(option) => option.provider === ELEMENTS_STYLES_PROVIDER_KEY
|
|
548
|
+
);
|
|
549
|
+
if (!hasElementsProviderStyleApplied) {
|
|
550
|
+
applied.unshift(EMPTY_OPTION);
|
|
551
|
+
}
|
|
552
|
+
return applied;
|
|
487
553
|
}
|
|
488
554
|
function useAppliedClassesIds() {
|
|
489
555
|
const { element } = useElement();
|
|
@@ -499,11 +565,10 @@ function useAppliedClassesIds() {
|
|
|
499
565
|
};
|
|
500
566
|
return [value, setValue];
|
|
501
567
|
}
|
|
502
|
-
function useHandleApply() {
|
|
568
|
+
function useHandleApply(appliedIds, setAppliedIds) {
|
|
503
569
|
const { id: activeId, setId: setActiveId } = useStyle();
|
|
504
|
-
const [appliedIds, setAppliedIds] = useAppliedClassesIds();
|
|
505
570
|
return (selectedOptions) => {
|
|
506
|
-
const selectedValues = selectedOptions.map(({ value }) => value);
|
|
571
|
+
const selectedValues = selectedOptions.map(({ value }) => value).filter((value) => value !== EMPTY_OPTION.value);
|
|
507
572
|
const isSameClassesAlreadyApplied = selectedValues.length === appliedIds.length && selectedValues.every((value) => appliedIds.includes(value));
|
|
508
573
|
if (isSameClassesAlreadyApplied) {
|
|
509
574
|
return;
|
|
@@ -522,23 +587,24 @@ function useHandleApply() {
|
|
|
522
587
|
}
|
|
523
588
|
|
|
524
589
|
// src/components/style-sections/background-section/background-section.tsx
|
|
525
|
-
import * as
|
|
590
|
+
import * as React17 from "react";
|
|
526
591
|
import { BackgroundOverlayRepeaterControl } from "@elementor/editor-controls";
|
|
527
592
|
import { Stack as Stack4 } from "@elementor/ui";
|
|
528
593
|
|
|
529
594
|
// src/controls-registry/styles-field.tsx
|
|
530
|
-
import * as
|
|
595
|
+
import * as React15 from "react";
|
|
531
596
|
import { BoundPropProvider as BoundPropProvider2 } from "@elementor/editor-controls";
|
|
532
597
|
|
|
533
598
|
// src/hooks/use-styles-field.ts
|
|
534
|
-
import { useEffect, useRef } from "react";
|
|
599
|
+
import { useEffect as useEffect2, useRef as useRef2 } from "react";
|
|
535
600
|
import { updateStyle, useElementStyleProp } from "@elementor/editor-elements";
|
|
601
|
+
import { __ as __2 } from "@wordpress/i18n";
|
|
536
602
|
var useStylesField = (propName) => {
|
|
537
603
|
const { element } = useElement();
|
|
538
604
|
const { id, meta } = useStyle();
|
|
539
605
|
const classesProp = useClassesProp();
|
|
540
|
-
const previousValue =
|
|
541
|
-
const onChangeCallbacks =
|
|
606
|
+
const previousValue = useRef2(null);
|
|
607
|
+
const onChangeCallbacks = useRef2(/* @__PURE__ */ new Set());
|
|
542
608
|
const value = useElementStyleProp({
|
|
543
609
|
elementID: element.id,
|
|
544
610
|
styleDefID: id,
|
|
@@ -551,13 +617,14 @@ var useStylesField = (propName) => {
|
|
|
551
617
|
styleDefID: id,
|
|
552
618
|
props: { [propName]: newValue },
|
|
553
619
|
meta,
|
|
554
|
-
bind: classesProp
|
|
620
|
+
bind: classesProp,
|
|
621
|
+
label: __2("local", "elementor")
|
|
555
622
|
});
|
|
556
623
|
};
|
|
557
624
|
const registerChangeListener = (callback) => {
|
|
558
625
|
onChangeCallbacks.current.add(callback);
|
|
559
626
|
};
|
|
560
|
-
|
|
627
|
+
useEffect2(() => {
|
|
561
628
|
onChangeCallbacks.current.forEach((cb) => {
|
|
562
629
|
cb(value, previousValue.current);
|
|
563
630
|
});
|
|
@@ -569,39 +636,39 @@ var useStylesField = (propName) => {
|
|
|
569
636
|
// src/controls-registry/styles-field.tsx
|
|
570
637
|
var StylesField = ({ bind, children }) => {
|
|
571
638
|
const [value, setValue] = useStylesField(bind);
|
|
572
|
-
return /* @__PURE__ */
|
|
639
|
+
return /* @__PURE__ */ React15.createElement(BoundPropProvider2, { setValue, value, bind }, children);
|
|
573
640
|
};
|
|
574
641
|
|
|
575
642
|
// src/components/style-sections/background-section/background-color-field.tsx
|
|
576
|
-
import * as
|
|
643
|
+
import * as React16 from "react";
|
|
577
644
|
import { ColorControl, ControlLabel as ControlLabel2 } from "@elementor/editor-controls";
|
|
578
645
|
import { Grid } from "@elementor/ui";
|
|
579
|
-
import { __ as
|
|
646
|
+
import { __ as __3 } from "@wordpress/i18n";
|
|
580
647
|
var BackgroundColorField = () => {
|
|
581
|
-
return /* @__PURE__ */
|
|
648
|
+
return /* @__PURE__ */ React16.createElement(StylesField, { bind: "background-color" }, /* @__PURE__ */ React16.createElement(Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React16.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React16.createElement(ControlLabel2, null, __3("Color", "elementor"))), /* @__PURE__ */ React16.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React16.createElement(ColorControl, null))));
|
|
582
649
|
};
|
|
583
650
|
|
|
584
651
|
// src/components/style-sections/background-section/background-section.tsx
|
|
585
652
|
var BackgroundSection = () => {
|
|
586
|
-
return /* @__PURE__ */
|
|
653
|
+
return /* @__PURE__ */ React17.createElement(Stack4, { gap: 1.5 }, /* @__PURE__ */ React17.createElement(StylesField, { bind: "background-image" }, /* @__PURE__ */ React17.createElement(BackgroundOverlayRepeaterControl, null)), /* @__PURE__ */ React17.createElement(BackgroundColorField, null));
|
|
587
654
|
};
|
|
588
655
|
|
|
589
656
|
// src/components/style-sections/border-section/border-section.tsx
|
|
590
|
-
import * as
|
|
657
|
+
import * as React24 from "react";
|
|
591
658
|
import { Divider as Divider2, Stack as Stack6 } from "@elementor/ui";
|
|
592
659
|
|
|
593
660
|
// src/components/style-sections/border-section/border-field.tsx
|
|
594
|
-
import * as
|
|
595
|
-
import { __ as
|
|
661
|
+
import * as React22 from "react";
|
|
662
|
+
import { __ as __7 } from "@wordpress/i18n";
|
|
596
663
|
|
|
597
664
|
// src/components/add-or-remove-content.tsx
|
|
598
|
-
import * as
|
|
665
|
+
import * as React18 from "react";
|
|
599
666
|
import { ControlLabel as ControlLabel3 } from "@elementor/editor-controls";
|
|
600
667
|
import { MinusIcon, PlusIcon } from "@elementor/icons";
|
|
601
668
|
import { Collapse as Collapse2, IconButton as IconButton2, Stack as Stack5 } from "@elementor/ui";
|
|
602
669
|
var SIZE2 = "tiny";
|
|
603
670
|
var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
|
|
604
|
-
return /* @__PURE__ */
|
|
671
|
+
return /* @__PURE__ */ React18.createElement(Stack5, { gap: 1.5 }, /* @__PURE__ */ React18.createElement(
|
|
605
672
|
Stack5,
|
|
606
673
|
{
|
|
607
674
|
direction: "row",
|
|
@@ -610,75 +677,76 @@ var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
|
|
|
610
677
|
alignItems: "center"
|
|
611
678
|
}
|
|
612
679
|
},
|
|
613
|
-
/* @__PURE__ */
|
|
614
|
-
isAdded ? /* @__PURE__ */
|
|
615
|
-
), /* @__PURE__ */
|
|
680
|
+
/* @__PURE__ */ React18.createElement(ControlLabel3, null, label),
|
|
681
|
+
isAdded ? /* @__PURE__ */ React18.createElement(IconButton2, { size: SIZE2, onClick: onRemove }, /* @__PURE__ */ React18.createElement(MinusIcon, { fontSize: SIZE2 })) : /* @__PURE__ */ React18.createElement(IconButton2, { size: SIZE2, onClick: onAdd }, /* @__PURE__ */ React18.createElement(PlusIcon, { fontSize: SIZE2 }))
|
|
682
|
+
), /* @__PURE__ */ React18.createElement(Collapse2, { in: isAdded, unmountOnExit: true }, /* @__PURE__ */ React18.createElement(Stack5, { gap: 1.5 }, children)));
|
|
616
683
|
};
|
|
617
684
|
|
|
618
685
|
// src/components/style-sections/border-section/border-color-field.tsx
|
|
619
|
-
import * as
|
|
686
|
+
import * as React19 from "react";
|
|
620
687
|
import { ColorControl as ColorControl2, ControlLabel as ControlLabel4 } from "@elementor/editor-controls";
|
|
621
688
|
import { Grid as Grid2 } from "@elementor/ui";
|
|
622
|
-
import { __ as
|
|
689
|
+
import { __ as __4 } from "@wordpress/i18n";
|
|
623
690
|
var BorderColorField = () => {
|
|
624
|
-
return /* @__PURE__ */
|
|
691
|
+
return /* @__PURE__ */ React19.createElement(StylesField, { bind: "border-color" }, /* @__PURE__ */ React19.createElement(Grid2, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React19.createElement(Grid2, { item: true, xs: 6 }, /* @__PURE__ */ React19.createElement(ControlLabel4, null, __4("Border Color", "elementor"))), /* @__PURE__ */ React19.createElement(Grid2, { item: true, xs: 6 }, /* @__PURE__ */ React19.createElement(ColorControl2, null))));
|
|
625
692
|
};
|
|
626
693
|
|
|
627
694
|
// src/components/style-sections/border-section/border-style-field.tsx
|
|
628
|
-
import * as
|
|
695
|
+
import * as React20 from "react";
|
|
629
696
|
import { ControlLabel as ControlLabel5, SelectControl as SelectControl2 } from "@elementor/editor-controls";
|
|
630
697
|
import { Grid as Grid3 } from "@elementor/ui";
|
|
631
|
-
import { __ as
|
|
698
|
+
import { __ as __5 } from "@wordpress/i18n";
|
|
632
699
|
var borderStyles = [
|
|
633
|
-
{ value: "none", label:
|
|
634
|
-
{ value: "solid", label:
|
|
635
|
-
{ value: "dashed", label:
|
|
636
|
-
{ value: "dotted", label:
|
|
637
|
-
{ value: "double", label:
|
|
638
|
-
{ value: "groove", label:
|
|
639
|
-
{ value: "ridge", label:
|
|
640
|
-
{ value: "inset", label:
|
|
641
|
-
{ value: "outset", label:
|
|
700
|
+
{ value: "none", label: __5("None", "elementor") },
|
|
701
|
+
{ value: "solid", label: __5("Solid", "elementor") },
|
|
702
|
+
{ value: "dashed", label: __5("Dashed", "elementor") },
|
|
703
|
+
{ value: "dotted", label: __5("Dotted", "elementor") },
|
|
704
|
+
{ value: "double", label: __5("Double", "elementor") },
|
|
705
|
+
{ value: "groove", label: __5("Groove", "elementor") },
|
|
706
|
+
{ value: "ridge", label: __5("Ridge", "elementor") },
|
|
707
|
+
{ value: "inset", label: __5("Inset", "elementor") },
|
|
708
|
+
{ value: "outset", label: __5("Outset", "elementor") }
|
|
642
709
|
];
|
|
643
710
|
var BorderStyleField = () => {
|
|
644
|
-
return /* @__PURE__ */
|
|
711
|
+
return /* @__PURE__ */ React20.createElement(StylesField, { bind: "border-style" }, /* @__PURE__ */ React20.createElement(Grid3, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React20.createElement(Grid3, { item: true, xs: 6 }, /* @__PURE__ */ React20.createElement(ControlLabel5, null, __5("Border Type", "elementor"))), /* @__PURE__ */ React20.createElement(Grid3, { item: true, xs: 6 }, /* @__PURE__ */ React20.createElement(SelectControl2, { options: borderStyles }))));
|
|
645
712
|
};
|
|
646
713
|
|
|
647
714
|
// src/components/style-sections/border-section/border-width-field.tsx
|
|
648
|
-
import * as
|
|
715
|
+
import * as React21 from "react";
|
|
649
716
|
import { EqualUnequalSizesControl } from "@elementor/editor-controls";
|
|
717
|
+
import { borderWidthPropTypeUtil } from "@elementor/editor-props";
|
|
650
718
|
import { SideAllIcon, SideBottomIcon, SideLeftIcon, SideRightIcon, SideTopIcon } from "@elementor/icons";
|
|
651
|
-
import { __ as
|
|
719
|
+
import { __ as __6 } from "@wordpress/i18n";
|
|
652
720
|
var edges = [
|
|
653
721
|
{
|
|
654
|
-
label:
|
|
655
|
-
icon: /* @__PURE__ */
|
|
722
|
+
label: __6("Top", "elementor"),
|
|
723
|
+
icon: /* @__PURE__ */ React21.createElement(SideTopIcon, { fontSize: "tiny" }),
|
|
656
724
|
bind: "top"
|
|
657
725
|
},
|
|
658
726
|
{
|
|
659
|
-
label:
|
|
660
|
-
icon: /* @__PURE__ */
|
|
727
|
+
label: __6("Right", "elementor"),
|
|
728
|
+
icon: /* @__PURE__ */ React21.createElement(SideRightIcon, { fontSize: "tiny" }),
|
|
661
729
|
bind: "right"
|
|
662
730
|
},
|
|
663
731
|
{
|
|
664
|
-
label:
|
|
665
|
-
icon: /* @__PURE__ */
|
|
732
|
+
label: __6("Bottom", "elementor"),
|
|
733
|
+
icon: /* @__PURE__ */ React21.createElement(SideBottomIcon, { fontSize: "tiny" }),
|
|
666
734
|
bind: "bottom"
|
|
667
735
|
},
|
|
668
736
|
{
|
|
669
|
-
label:
|
|
670
|
-
icon: /* @__PURE__ */
|
|
737
|
+
label: __6("Left", "elementor"),
|
|
738
|
+
icon: /* @__PURE__ */ React21.createElement(SideLeftIcon, { fontSize: "tiny" }),
|
|
671
739
|
bind: "left"
|
|
672
740
|
}
|
|
673
741
|
];
|
|
674
742
|
var BorderWidthField = () => {
|
|
675
|
-
return /* @__PURE__ */
|
|
743
|
+
return /* @__PURE__ */ React21.createElement(StylesField, { bind: "border-width" }, /* @__PURE__ */ React21.createElement(
|
|
676
744
|
EqualUnequalSizesControl,
|
|
677
745
|
{
|
|
678
|
-
label: __5("Border Width", "elementor"),
|
|
679
|
-
icon: /* @__PURE__ */ React20.createElement(SideAllIcon, { fontSize: "tiny" }),
|
|
680
746
|
items: edges,
|
|
681
|
-
|
|
747
|
+
label: __6("Border Width", "elementor"),
|
|
748
|
+
icon: /* @__PURE__ */ React21.createElement(SideAllIcon, { fontSize: "tiny" }),
|
|
749
|
+
multiSizePropTypeUtil: borderWidthPropTypeUtil
|
|
682
750
|
}
|
|
683
751
|
));
|
|
684
752
|
};
|
|
@@ -706,23 +774,24 @@ var BorderField = () => {
|
|
|
706
774
|
setBorderStyle(null);
|
|
707
775
|
};
|
|
708
776
|
const hasBorder = Boolean(borderWidth || borderColor || borderStyle);
|
|
709
|
-
return /* @__PURE__ */
|
|
777
|
+
return /* @__PURE__ */ React22.createElement(
|
|
710
778
|
AddOrRemoveContent,
|
|
711
779
|
{
|
|
712
|
-
label:
|
|
780
|
+
label: __7("Border", "elementor"),
|
|
713
781
|
isAdded: hasBorder,
|
|
714
782
|
onAdd: addBorder,
|
|
715
783
|
onRemove: removeBorder
|
|
716
784
|
},
|
|
717
|
-
/* @__PURE__ */
|
|
718
|
-
/* @__PURE__ */
|
|
719
|
-
/* @__PURE__ */
|
|
785
|
+
/* @__PURE__ */ React22.createElement(BorderWidthField, null),
|
|
786
|
+
/* @__PURE__ */ React22.createElement(BorderColorField, null),
|
|
787
|
+
/* @__PURE__ */ React22.createElement(BorderStyleField, null)
|
|
720
788
|
);
|
|
721
789
|
};
|
|
722
790
|
|
|
723
791
|
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
724
|
-
import * as
|
|
792
|
+
import * as React23 from "react";
|
|
725
793
|
import { EqualUnequalSizesControl as EqualUnequalSizesControl2 } from "@elementor/editor-controls";
|
|
794
|
+
import { borderRadiusPropTypeUtil } from "@elementor/editor-props";
|
|
726
795
|
import {
|
|
727
796
|
BorderCornersIcon,
|
|
728
797
|
RadiusBottomLeftIcon,
|
|
@@ -730,60 +799,60 @@ import {
|
|
|
730
799
|
RadiusTopLeftIcon,
|
|
731
800
|
RadiusTopRightIcon
|
|
732
801
|
} from "@elementor/icons";
|
|
733
|
-
import { __ as
|
|
802
|
+
import { __ as __8 } from "@wordpress/i18n";
|
|
734
803
|
var corners = [
|
|
735
804
|
{
|
|
736
|
-
label:
|
|
737
|
-
icon: /* @__PURE__ */
|
|
805
|
+
label: __8("Top Left", "elementor"),
|
|
806
|
+
icon: /* @__PURE__ */ React23.createElement(RadiusTopLeftIcon, { fontSize: "tiny" }),
|
|
738
807
|
bind: "top-left"
|
|
739
808
|
},
|
|
740
809
|
{
|
|
741
|
-
label:
|
|
742
|
-
icon: /* @__PURE__ */
|
|
810
|
+
label: __8("Top Right", "elementor"),
|
|
811
|
+
icon: /* @__PURE__ */ React23.createElement(RadiusTopRightIcon, { fontSize: "tiny" }),
|
|
743
812
|
bind: "top-right"
|
|
744
813
|
},
|
|
745
814
|
{
|
|
746
|
-
label:
|
|
747
|
-
icon: /* @__PURE__ */
|
|
815
|
+
label: __8("Bottom Right", "elementor"),
|
|
816
|
+
icon: /* @__PURE__ */ React23.createElement(RadiusBottomRightIcon, { fontSize: "tiny" }),
|
|
748
817
|
bind: "bottom-right"
|
|
749
818
|
},
|
|
750
819
|
{
|
|
751
|
-
label:
|
|
752
|
-
icon: /* @__PURE__ */
|
|
820
|
+
label: __8("Bottom Left", "elementor"),
|
|
821
|
+
icon: /* @__PURE__ */ React23.createElement(RadiusBottomLeftIcon, { fontSize: "tiny" }),
|
|
753
822
|
bind: "bottom-left"
|
|
754
823
|
}
|
|
755
824
|
];
|
|
756
825
|
var BorderRadiusField = () => {
|
|
757
|
-
return /* @__PURE__ */
|
|
826
|
+
return /* @__PURE__ */ React23.createElement(StylesField, { bind: "border-radius" }, /* @__PURE__ */ React23.createElement(
|
|
758
827
|
EqualUnequalSizesControl2,
|
|
759
828
|
{
|
|
760
|
-
label: __7("Border Radius", "elementor"),
|
|
761
|
-
icon: /* @__PURE__ */ React22.createElement(BorderCornersIcon, { fontSize: "tiny" }),
|
|
762
829
|
items: corners,
|
|
763
|
-
|
|
830
|
+
label: __8("Border Radius", "elementor"),
|
|
831
|
+
icon: /* @__PURE__ */ React23.createElement(BorderCornersIcon, { fontSize: "tiny" }),
|
|
832
|
+
multiSizePropTypeUtil: borderRadiusPropTypeUtil
|
|
764
833
|
}
|
|
765
834
|
));
|
|
766
835
|
};
|
|
767
836
|
|
|
768
837
|
// src/components/style-sections/border-section/border-section.tsx
|
|
769
|
-
var BorderSection = () => /* @__PURE__ */
|
|
838
|
+
var BorderSection = () => /* @__PURE__ */ React24.createElement(Stack6, { gap: 1.5 }, /* @__PURE__ */ React24.createElement(BorderRadiusField, null), /* @__PURE__ */ React24.createElement(Divider2, null), /* @__PURE__ */ React24.createElement(BorderField, null));
|
|
770
839
|
|
|
771
840
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
772
|
-
import * as
|
|
841
|
+
import * as React25 from "react";
|
|
773
842
|
import { BoxShadowRepeaterControl } from "@elementor/editor-controls";
|
|
774
843
|
import { Stack as Stack7 } from "@elementor/ui";
|
|
775
844
|
var EffectsSection = () => {
|
|
776
|
-
return /* @__PURE__ */
|
|
845
|
+
return /* @__PURE__ */ React25.createElement(Stack7, { gap: 1.5 }, /* @__PURE__ */ React25.createElement(StylesField, { bind: "box-shadow" }, /* @__PURE__ */ React25.createElement(BoxShadowRepeaterControl, null)));
|
|
777
846
|
};
|
|
778
847
|
|
|
779
848
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
780
|
-
import * as
|
|
781
|
-
import { ControlLabel as
|
|
782
|
-
import { Divider as Divider3, Stack as
|
|
783
|
-
import { __ as
|
|
849
|
+
import * as React36 from "react";
|
|
850
|
+
import { ControlLabel as ControlLabel14 } from "@elementor/editor-controls";
|
|
851
|
+
import { Divider as Divider3, Stack as Stack13 } from "@elementor/ui";
|
|
852
|
+
import { __ as __18 } from "@wordpress/i18n";
|
|
784
853
|
|
|
785
854
|
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
786
|
-
import * as
|
|
855
|
+
import * as React27 from "react";
|
|
787
856
|
import { ControlLabel as ControlLabel6, ToggleControl } from "@elementor/editor-controls";
|
|
788
857
|
import {
|
|
789
858
|
LayoutAlignCenterIcon as CenterIcon,
|
|
@@ -791,8 +860,8 @@ import {
|
|
|
791
860
|
LayoutAlignRightIcon,
|
|
792
861
|
LayoutDistributeVerticalIcon as JustifyIcon
|
|
793
862
|
} from "@elementor/icons";
|
|
794
|
-
import { DirectionProvider, Grid as Grid4, ThemeProvider,
|
|
795
|
-
import { __ as
|
|
863
|
+
import { DirectionProvider, Grid as Grid4, ThemeProvider, withDirection } from "@elementor/ui";
|
|
864
|
+
import { __ as __9 } from "@wordpress/i18n";
|
|
796
865
|
|
|
797
866
|
// src/hooks/use-direction.ts
|
|
798
867
|
import { useTheme } from "@elementor/ui";
|
|
@@ -802,170 +871,241 @@ function useDirection() {
|
|
|
802
871
|
return { isSiteRtl, isUiRtl };
|
|
803
872
|
}
|
|
804
873
|
|
|
874
|
+
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
875
|
+
import * as React26 from "react";
|
|
876
|
+
import { useRef as useRef3 } from "react";
|
|
877
|
+
import { useTheme as useTheme2 } from "@elementor/ui";
|
|
878
|
+
var CLOCKWISE_ANGLES = {
|
|
879
|
+
row: 0,
|
|
880
|
+
column: 90,
|
|
881
|
+
"row-reverse": 180,
|
|
882
|
+
"column-reverse": 270
|
|
883
|
+
};
|
|
884
|
+
var COUNTER_CLOCKWISE_ANGLES = {
|
|
885
|
+
row: 0,
|
|
886
|
+
column: -90,
|
|
887
|
+
"row-reverse": -180,
|
|
888
|
+
"column-reverse": -270
|
|
889
|
+
};
|
|
890
|
+
var RotatedIcon = ({ icon: Icon, size, isClockwise = true, offset = 0 }) => {
|
|
891
|
+
const rotate = useRef3(useGetTargetAngle(isClockwise, offset));
|
|
892
|
+
rotate.current = useGetTargetAngle(isClockwise, offset, rotate);
|
|
893
|
+
return /* @__PURE__ */ React26.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
894
|
+
};
|
|
895
|
+
var useGetTargetAngle = (isClockwise, offset, existingRef) => {
|
|
896
|
+
const [direction] = useStylesField("flex-direction");
|
|
897
|
+
const isRtl = "rtl" === useTheme2().direction;
|
|
898
|
+
const rotationMultiplier = isRtl ? -1 : 1;
|
|
899
|
+
const angleMap = isClockwise ? CLOCKWISE_ANGLES : COUNTER_CLOCKWISE_ANGLES;
|
|
900
|
+
const currentAngle = existingRef ? existingRef.current * rotationMultiplier : angleMap[direction?.value || "row"] + offset;
|
|
901
|
+
const targetAngle = angleMap[direction?.value || "row"] + offset;
|
|
902
|
+
const diffToTargetAngle = (targetAngle - currentAngle + 360) % 360;
|
|
903
|
+
const formattedDiff = (diffToTargetAngle + 180) % 360 - 180;
|
|
904
|
+
return (currentAngle + formattedDiff) * rotationMultiplier;
|
|
905
|
+
};
|
|
906
|
+
|
|
805
907
|
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
908
|
+
var StartIcon = withDirection(LayoutAlignLeftIcon);
|
|
909
|
+
var EndIcon = withDirection(LayoutAlignRightIcon);
|
|
910
|
+
var iconProps = {
|
|
911
|
+
isClockwise: false,
|
|
912
|
+
offset: 90
|
|
913
|
+
};
|
|
914
|
+
var options = [
|
|
915
|
+
{
|
|
916
|
+
value: "start",
|
|
917
|
+
label: __9("Start", "elementor"),
|
|
918
|
+
renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(RotatedIcon, { icon: StartIcon, size, ...iconProps }),
|
|
919
|
+
showTooltip: true
|
|
920
|
+
},
|
|
921
|
+
{
|
|
922
|
+
value: "center",
|
|
923
|
+
label: __9("Center", "elementor"),
|
|
924
|
+
renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(RotatedIcon, { icon: CenterIcon, size, ...iconProps }),
|
|
925
|
+
showTooltip: true
|
|
926
|
+
},
|
|
927
|
+
{
|
|
928
|
+
value: "end",
|
|
929
|
+
label: __9("End", "elementor"),
|
|
930
|
+
renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(RotatedIcon, { icon: EndIcon, size, ...iconProps }),
|
|
931
|
+
showTooltip: true
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
value: "stretch",
|
|
935
|
+
label: __9("Stretch", "elementor"),
|
|
936
|
+
renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(RotatedIcon, { icon: JustifyIcon, size, ...iconProps }),
|
|
937
|
+
showTooltip: true
|
|
938
|
+
}
|
|
939
|
+
];
|
|
806
940
|
var AlignItemsField = () => {
|
|
807
|
-
const
|
|
808
|
-
return /* @__PURE__ */
|
|
941
|
+
const { isSiteRtl } = useDirection();
|
|
942
|
+
return /* @__PURE__ */ React27.createElement(DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React27.createElement(ThemeProvider, null, /* @__PURE__ */ React27.createElement(StylesField, { bind: "align-items" }, /* @__PURE__ */ React27.createElement(Grid4, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React27.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React27.createElement(ControlLabel6, null, __9("Align items", "elementor"))), /* @__PURE__ */ React27.createElement(Grid4, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React27.createElement(ToggleControl, { options }))))));
|
|
809
943
|
};
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
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
|
|
836
|
-
}
|
|
837
|
-
];
|
|
944
|
+
|
|
945
|
+
// src/components/style-sections/layout-section/align-self-child-field.tsx
|
|
946
|
+
import * as React28 from "react";
|
|
947
|
+
import { ControlLabel as ControlLabel7, ToggleControl as ToggleControl2 } from "@elementor/editor-controls";
|
|
948
|
+
import {
|
|
949
|
+
LayoutAlignCenterIcon as CenterIcon2,
|
|
950
|
+
LayoutAlignLeftIcon as LayoutAlignLeftIcon2,
|
|
951
|
+
LayoutAlignRightIcon as LayoutAlignRightIcon2,
|
|
952
|
+
LayoutDistributeVerticalIcon as JustifyIcon2
|
|
953
|
+
} from "@elementor/icons";
|
|
954
|
+
import { DirectionProvider as DirectionProvider2, Grid as Grid5, ThemeProvider as ThemeProvider2, withDirection as withDirection2 } from "@elementor/ui";
|
|
955
|
+
import { __ as __10 } from "@wordpress/i18n";
|
|
956
|
+
var StartIcon2 = withDirection2(LayoutAlignLeftIcon2);
|
|
957
|
+
var EndIcon2 = withDirection2(LayoutAlignRightIcon2);
|
|
958
|
+
var iconProps2 = {
|
|
959
|
+
isClockwise: false,
|
|
960
|
+
offset: 90
|
|
838
961
|
};
|
|
839
|
-
var
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
{
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
962
|
+
var options2 = [
|
|
963
|
+
{
|
|
964
|
+
value: "start",
|
|
965
|
+
label: __10("Start", "elementor"),
|
|
966
|
+
renderContent: ({ size }) => /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: StartIcon2, size, ...iconProps2 }),
|
|
967
|
+
showTooltip: true
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
value: "center",
|
|
971
|
+
label: __10("Center", "elementor"),
|
|
972
|
+
renderContent: ({ size }) => /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: CenterIcon2, size, ...iconProps2 }),
|
|
973
|
+
showTooltip: true
|
|
974
|
+
},
|
|
975
|
+
{
|
|
976
|
+
value: "end",
|
|
977
|
+
label: __10("End", "elementor"),
|
|
978
|
+
renderContent: ({ size }) => /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: EndIcon2, size, ...iconProps2 }),
|
|
979
|
+
showTooltip: true
|
|
980
|
+
},
|
|
981
|
+
{
|
|
982
|
+
value: "stretch",
|
|
983
|
+
label: __10("Stretch", "elementor"),
|
|
984
|
+
renderContent: ({ size }) => /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: JustifyIcon2, size, ...iconProps2 }),
|
|
985
|
+
showTooltip: true
|
|
986
|
+
}
|
|
987
|
+
];
|
|
988
|
+
var AlignSelfChild = () => {
|
|
989
|
+
const { isSiteRtl } = useDirection();
|
|
990
|
+
return /* @__PURE__ */ React28.createElement(DirectionProvider2, { rtl: isSiteRtl }, /* @__PURE__ */ React28.createElement(ThemeProvider2, null, /* @__PURE__ */ React28.createElement(StylesField, { bind: "align-self" }, /* @__PURE__ */ React28.createElement(Grid5, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React28.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React28.createElement(ControlLabel7, null, __10("Align self", "elementor"))), /* @__PURE__ */ React28.createElement(Grid5, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React28.createElement(ToggleControl2, { options: options2 }))))));
|
|
854
991
|
};
|
|
855
992
|
|
|
856
993
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
857
|
-
import * as
|
|
858
|
-
import { ControlLabel as
|
|
994
|
+
import * as React29 from "react";
|
|
995
|
+
import { ControlLabel as ControlLabel8, ToggleControl as ToggleControl3 } from "@elementor/editor-controls";
|
|
859
996
|
import { Stack as Stack8 } from "@elementor/ui";
|
|
860
|
-
import { __ as
|
|
997
|
+
import { __ as __11 } from "@wordpress/i18n";
|
|
861
998
|
var DisplayField = () => {
|
|
862
|
-
const
|
|
999
|
+
const options10 = [
|
|
863
1000
|
{
|
|
864
1001
|
value: "block",
|
|
865
|
-
renderContent: () =>
|
|
866
|
-
label:
|
|
1002
|
+
renderContent: () => __11("Block", "elementor"),
|
|
1003
|
+
label: __11("Block", "elementor")
|
|
867
1004
|
},
|
|
868
1005
|
{
|
|
869
1006
|
value: "flex",
|
|
870
|
-
renderContent: () =>
|
|
871
|
-
label:
|
|
1007
|
+
renderContent: () => __11("Flex", "elementor"),
|
|
1008
|
+
label: __11("Flex", "elementor")
|
|
872
1009
|
}
|
|
873
1010
|
];
|
|
874
|
-
return /* @__PURE__ */
|
|
1011
|
+
return /* @__PURE__ */ React29.createElement(StylesField, { bind: "display" }, /* @__PURE__ */ React29.createElement(Stack8, { gap: 1 }, /* @__PURE__ */ React29.createElement(ControlLabel8, null, __11("Display", "elementor")), /* @__PURE__ */ React29.createElement(ToggleControl3, { options: options10, fullWidth: true })));
|
|
875
1012
|
};
|
|
876
1013
|
|
|
877
1014
|
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
878
|
-
import * as
|
|
879
|
-
import { ControlLabel as
|
|
1015
|
+
import * as React30 from "react";
|
|
1016
|
+
import { ControlLabel as ControlLabel9, ToggleControl as ToggleControl4 } from "@elementor/editor-controls";
|
|
880
1017
|
import { ArrowDownSmallIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpSmallIcon } from "@elementor/icons";
|
|
881
|
-
import { DirectionProvider as
|
|
882
|
-
import { __ as
|
|
883
|
-
var
|
|
1018
|
+
import { DirectionProvider as DirectionProvider3, Grid as Grid6, ThemeProvider as ThemeProvider3, withDirection as withDirection3 } from "@elementor/ui";
|
|
1019
|
+
import { __ as __12 } from "@wordpress/i18n";
|
|
1020
|
+
var options3 = [
|
|
884
1021
|
{
|
|
885
1022
|
value: "row",
|
|
886
|
-
label:
|
|
1023
|
+
label: __12("Row", "elementor"),
|
|
887
1024
|
renderContent: ({ size }) => {
|
|
888
|
-
const
|
|
889
|
-
return /* @__PURE__ */
|
|
1025
|
+
const StartIcon4 = withDirection3(ArrowRightIcon);
|
|
1026
|
+
return /* @__PURE__ */ React30.createElement(StartIcon4, { fontSize: size });
|
|
890
1027
|
},
|
|
891
1028
|
showTooltip: true
|
|
892
1029
|
},
|
|
893
1030
|
{
|
|
894
1031
|
value: "column",
|
|
895
|
-
label:
|
|
896
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1032
|
+
label: __12("Column", "elementor"),
|
|
1033
|
+
renderContent: ({ size }) => /* @__PURE__ */ React30.createElement(ArrowDownSmallIcon, { fontSize: size }),
|
|
897
1034
|
showTooltip: true
|
|
898
1035
|
},
|
|
899
1036
|
{
|
|
900
1037
|
value: "row-reverse",
|
|
901
|
-
label:
|
|
1038
|
+
label: __12("Reversed row", "elementor"),
|
|
902
1039
|
renderContent: ({ size }) => {
|
|
903
|
-
const
|
|
904
|
-
return /* @__PURE__ */
|
|
1040
|
+
const EndIcon4 = withDirection3(ArrowLeftIcon);
|
|
1041
|
+
return /* @__PURE__ */ React30.createElement(EndIcon4, { fontSize: size });
|
|
905
1042
|
},
|
|
906
1043
|
showTooltip: true
|
|
907
1044
|
},
|
|
908
1045
|
{
|
|
909
1046
|
value: "column-reverse",
|
|
910
|
-
label:
|
|
911
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1047
|
+
label: __12("Reversed column", "elementor"),
|
|
1048
|
+
renderContent: ({ size }) => /* @__PURE__ */ React30.createElement(ArrowUpSmallIcon, { fontSize: size }),
|
|
912
1049
|
showTooltip: true
|
|
913
1050
|
}
|
|
914
1051
|
];
|
|
915
1052
|
var FlexDirectionField = () => {
|
|
916
1053
|
const { isSiteRtl } = useDirection();
|
|
917
|
-
return /* @__PURE__ */
|
|
1054
|
+
return /* @__PURE__ */ React30.createElement(DirectionProvider3, { rtl: isSiteRtl }, /* @__PURE__ */ React30.createElement(ThemeProvider3, null, /* @__PURE__ */ React30.createElement(StylesField, { bind: "flex-direction" }, /* @__PURE__ */ React30.createElement(Grid6, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React30.createElement(Grid6, { item: true, xs: 6 }, /* @__PURE__ */ React30.createElement(ControlLabel9, null, __12("Direction", "elementor"))), /* @__PURE__ */ React30.createElement(Grid6, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React30.createElement(ToggleControl4, { options: options3 }))))));
|
|
918
1055
|
};
|
|
919
1056
|
|
|
920
1057
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
921
|
-
import * as
|
|
922
|
-
import { useState as
|
|
1058
|
+
import * as React31 from "react";
|
|
1059
|
+
import { useState as useState3 } from "react";
|
|
923
1060
|
import {
|
|
924
|
-
ControlLabel as
|
|
1061
|
+
ControlLabel as ControlLabel10,
|
|
925
1062
|
ControlToggleButtonGroup,
|
|
926
1063
|
NumberControl
|
|
927
1064
|
} from "@elementor/editor-controls";
|
|
928
1065
|
import { ArrowDownSmallIcon as ArrowDownSmallIcon2, ArrowUpSmallIcon as ArrowUpSmallIcon2, PencilIcon } from "@elementor/icons";
|
|
929
|
-
import { DirectionProvider as
|
|
930
|
-
import { __ as
|
|
1066
|
+
import { DirectionProvider as DirectionProvider4, Grid as Grid7, Stack as Stack9, ThemeProvider as ThemeProvider4 } from "@elementor/ui";
|
|
1067
|
+
import { __ as __13 } from "@wordpress/i18n";
|
|
931
1068
|
var FIRST_DEFAULT_VALUE = -99999;
|
|
932
1069
|
var LAST_DEFAULT_VALUE = 99999;
|
|
933
1070
|
var FIRST = "first";
|
|
934
1071
|
var LAST = "last";
|
|
935
1072
|
var CUSTOM = "custom";
|
|
1073
|
+
var orderValueMap = {
|
|
1074
|
+
[FIRST]: FIRST_DEFAULT_VALUE,
|
|
1075
|
+
[LAST]: LAST_DEFAULT_VALUE
|
|
1076
|
+
};
|
|
936
1077
|
var items = [
|
|
937
1078
|
{
|
|
938
1079
|
value: FIRST,
|
|
939
|
-
label:
|
|
940
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1080
|
+
label: __13("First", "elementor"),
|
|
1081
|
+
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(ArrowUpSmallIcon2, { fontSize: size }),
|
|
941
1082
|
showTooltip: true
|
|
942
1083
|
},
|
|
943
1084
|
{
|
|
944
1085
|
value: LAST,
|
|
945
|
-
label:
|
|
946
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1086
|
+
label: __13("Last", "elementor"),
|
|
1087
|
+
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(ArrowDownSmallIcon2, { fontSize: size }),
|
|
947
1088
|
showTooltip: true
|
|
948
1089
|
},
|
|
949
1090
|
{
|
|
950
1091
|
value: CUSTOM,
|
|
951
|
-
label:
|
|
952
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1092
|
+
label: __13("Custom", "elementor"),
|
|
1093
|
+
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(PencilIcon, { fontSize: size }),
|
|
953
1094
|
showTooltip: true
|
|
954
1095
|
}
|
|
955
1096
|
];
|
|
956
1097
|
var FlexOrderField = () => {
|
|
957
1098
|
const { isSiteRtl } = useDirection(), [order, setOrder] = useStylesField("order");
|
|
958
|
-
const [groupControlValue, setGroupControlValue] =
|
|
1099
|
+
const [groupControlValue, setGroupControlValue] = useState3(getGroupControlValue(order?.value || null));
|
|
959
1100
|
const handleToggleButtonChange = (group) => {
|
|
960
1101
|
setGroupControlValue(group);
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
};
|
|
966
|
-
setOrder(group ? orderValueMap[group] : null);
|
|
1102
|
+
if (!group || group === CUSTOM) {
|
|
1103
|
+
setOrder(null);
|
|
1104
|
+
return;
|
|
1105
|
+
}
|
|
1106
|
+
setOrder({ $$type: "number", value: orderValueMap[group] });
|
|
967
1107
|
};
|
|
968
|
-
return /* @__PURE__ */
|
|
1108
|
+
return /* @__PURE__ */ React31.createElement(DirectionProvider4, { rtl: isSiteRtl }, /* @__PURE__ */ React31.createElement(ThemeProvider4, null, /* @__PURE__ */ React31.createElement(Stack9, { gap: 2 }, /* @__PURE__ */ React31.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(ControlLabel10, null, __13("Order", "elementor"))), /* @__PURE__ */ React31.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React31.createElement(
|
|
969
1109
|
ControlToggleButtonGroup,
|
|
970
1110
|
{
|
|
971
1111
|
items,
|
|
@@ -973,7 +1113,7 @@ var FlexOrderField = () => {
|
|
|
973
1113
|
onChange: handleToggleButtonChange,
|
|
974
1114
|
exclusive: true
|
|
975
1115
|
}
|
|
976
|
-
))), CUSTOM === groupControlValue && /* @__PURE__ */
|
|
1116
|
+
))), CUSTOM === groupControlValue && /* @__PURE__ */ React31.createElement(StylesField, { bind: "order" }, /* @__PURE__ */ React31.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(ControlLabel10, null, __13("Custom order", "elementor"))), /* @__PURE__ */ React31.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React31.createElement(
|
|
977
1117
|
NumberControl,
|
|
978
1118
|
{
|
|
979
1119
|
min: FIRST_DEFAULT_VALUE + 1,
|
|
@@ -992,136 +1132,209 @@ var getGroupControlValue = (order) => {
|
|
|
992
1132
|
return 0 === order || order ? CUSTOM : null;
|
|
993
1133
|
};
|
|
994
1134
|
|
|
1135
|
+
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
1136
|
+
import * as React32 from "react";
|
|
1137
|
+
import {
|
|
1138
|
+
ControlLabel as ControlLabel11,
|
|
1139
|
+
ControlToggleButtonGroup as ControlToggleButtonGroup2,
|
|
1140
|
+
NumberControl as NumberControl2,
|
|
1141
|
+
SizeControl as SizeControl2
|
|
1142
|
+
} from "@elementor/editor-controls";
|
|
1143
|
+
import { ExpandIcon, PencilIcon as PencilIcon2, ShrinkIcon } from "@elementor/icons";
|
|
1144
|
+
import { DirectionProvider as DirectionProvider5, Grid as Grid8, Stack as Stack10, ThemeProvider as ThemeProvider5 } from "@elementor/ui";
|
|
1145
|
+
import { __ as __14 } from "@wordpress/i18n";
|
|
1146
|
+
var DEFAULT = 1;
|
|
1147
|
+
var items2 = [
|
|
1148
|
+
{
|
|
1149
|
+
value: "flex-grow",
|
|
1150
|
+
label: __14("Grow", "elementor"),
|
|
1151
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(ExpandIcon, { fontSize: size }),
|
|
1152
|
+
showTooltip: true
|
|
1153
|
+
},
|
|
1154
|
+
{
|
|
1155
|
+
value: "flex-shrink",
|
|
1156
|
+
label: __14("Shrink", "elementor"),
|
|
1157
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(ShrinkIcon, { fontSize: size }),
|
|
1158
|
+
showTooltip: true
|
|
1159
|
+
},
|
|
1160
|
+
{
|
|
1161
|
+
value: "custom",
|
|
1162
|
+
label: __14("Custom", "elementor"),
|
|
1163
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(PencilIcon2, { fontSize: size }),
|
|
1164
|
+
showTooltip: true
|
|
1165
|
+
}
|
|
1166
|
+
];
|
|
1167
|
+
var FlexSizeField = () => {
|
|
1168
|
+
const { isSiteRtl } = useDirection(), [growField, setGrowField] = useStylesField("flex-grow"), [shrinkField, setShrinkField] = useStylesField("flex-shrink"), [basisField, setBasisField] = useStylesField("flex-basis");
|
|
1169
|
+
const grow = growField?.value || null, shrink = shrinkField?.value || null, basis = basisField?.value || null;
|
|
1170
|
+
const currentGroup = React32.useMemo(() => getActiveGroup({ grow, shrink, basis }), [grow, shrink, basis]), [activeGroup, setActiveGroup] = React32.useState(currentGroup);
|
|
1171
|
+
const onChangeGroup = (group = null) => {
|
|
1172
|
+
setActiveGroup(group);
|
|
1173
|
+
setBasisField(null);
|
|
1174
|
+
if (!group || group === "custom") {
|
|
1175
|
+
setGrowField(null);
|
|
1176
|
+
setShrinkField(null);
|
|
1177
|
+
return;
|
|
1178
|
+
}
|
|
1179
|
+
if (group === "flex-grow") {
|
|
1180
|
+
setGrowField({ $$type: "number", value: DEFAULT });
|
|
1181
|
+
setShrinkField(null);
|
|
1182
|
+
return;
|
|
1183
|
+
}
|
|
1184
|
+
setGrowField(null);
|
|
1185
|
+
setShrinkField({ $$type: "number", value: DEFAULT });
|
|
1186
|
+
};
|
|
1187
|
+
return /* @__PURE__ */ React32.createElement(DirectionProvider5, { rtl: isSiteRtl }, /* @__PURE__ */ React32.createElement(ThemeProvider5, null, /* @__PURE__ */ React32.createElement(Stack10, { gap: 2 }, /* @__PURE__ */ React32.createElement(Grid8, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(Grid8, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(ControlLabel11, null, __14("Size", "elementor"))), /* @__PURE__ */ React32.createElement(Grid8, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React32.createElement(
|
|
1188
|
+
ControlToggleButtonGroup2,
|
|
1189
|
+
{
|
|
1190
|
+
value: activeGroup,
|
|
1191
|
+
onChange: onChangeGroup,
|
|
1192
|
+
items: items2,
|
|
1193
|
+
exclusive: true
|
|
1194
|
+
}
|
|
1195
|
+
))), "custom" === activeGroup && /* @__PURE__ */ React32.createElement(FlexCustomField, null))));
|
|
1196
|
+
};
|
|
1197
|
+
var FlexCustomField = () => /* @__PURE__ */ React32.createElement(React32.Fragment, null, /* @__PURE__ */ React32.createElement(StylesField, { bind: "flex-grow" }, /* @__PURE__ */ React32.createElement(Grid8, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(Grid8, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(ControlLabel11, null, __14("Grow", "elementor"))), /* @__PURE__ */ React32.createElement(Grid8, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React32.createElement(NumberControl2, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React32.createElement(StylesField, { bind: "flex-shrink" }, /* @__PURE__ */ React32.createElement(Grid8, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(Grid8, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(ControlLabel11, null, __14("Shrink", "elementor"))), /* @__PURE__ */ React32.createElement(Grid8, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React32.createElement(NumberControl2, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React32.createElement(StylesField, { bind: "flex-basis" }, /* @__PURE__ */ React32.createElement(Grid8, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(Grid8, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(ControlLabel11, null, __14("Basis", "elementor"))), /* @__PURE__ */ React32.createElement(Grid8, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React32.createElement(SizeControl2, null)))));
|
|
1198
|
+
var getActiveGroup = ({
|
|
1199
|
+
grow,
|
|
1200
|
+
shrink,
|
|
1201
|
+
basis
|
|
1202
|
+
}) => {
|
|
1203
|
+
if (null === grow && null === shrink && !basis) {
|
|
1204
|
+
return null;
|
|
1205
|
+
}
|
|
1206
|
+
if (shrink && grow || basis) {
|
|
1207
|
+
return "custom";
|
|
1208
|
+
}
|
|
1209
|
+
if (grow === DEFAULT) {
|
|
1210
|
+
return "flex-grow";
|
|
1211
|
+
}
|
|
1212
|
+
if (shrink === DEFAULT) {
|
|
1213
|
+
return "flex-shrink";
|
|
1214
|
+
}
|
|
1215
|
+
return "custom";
|
|
1216
|
+
};
|
|
1217
|
+
|
|
1218
|
+
// src/components/style-sections/layout-section/gap-control-field.tsx
|
|
1219
|
+
import * as React33 from "react";
|
|
1220
|
+
import { GapControl } from "@elementor/editor-controls";
|
|
1221
|
+
import { Stack as Stack11 } from "@elementor/ui";
|
|
1222
|
+
import { __ as __15 } from "@wordpress/i18n";
|
|
1223
|
+
var GapControlField = () => {
|
|
1224
|
+
return /* @__PURE__ */ React33.createElement(Stack11, { gap: 1 }, /* @__PURE__ */ React33.createElement(StylesField, { bind: "gap" }, /* @__PURE__ */ React33.createElement(GapControl, { label: __15("Gaps", "elementor") })));
|
|
1225
|
+
};
|
|
1226
|
+
|
|
995
1227
|
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
996
|
-
import * as
|
|
997
|
-
import { ControlLabel as
|
|
1228
|
+
import * as React34 from "react";
|
|
1229
|
+
import { ControlLabel as ControlLabel12, ToggleControl as ToggleControl5 } from "@elementor/editor-controls";
|
|
998
1230
|
import {
|
|
999
1231
|
JustifyBottomIcon,
|
|
1000
|
-
JustifyCenterIcon as
|
|
1232
|
+
JustifyCenterIcon as CenterIcon3,
|
|
1001
1233
|
JustifyDistributeVerticalIcon as EvenlyIcon,
|
|
1002
1234
|
JustifySpaceAroundVerticalIcon as AroundIcon,
|
|
1003
1235
|
JustifySpaceBetweenVerticalIcon as BetweenIcon,
|
|
1004
1236
|
JustifyTopIcon
|
|
1005
1237
|
} from "@elementor/icons";
|
|
1006
|
-
import {
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
import { __ as __12 } from "@wordpress/i18n";
|
|
1014
|
-
var JustifyContentField = () => {
|
|
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 [
|
|
1021
|
-
{
|
|
1022
|
-
value: "start",
|
|
1023
|
-
label: __12("Start", "elementor"),
|
|
1024
|
-
renderContent: ({ size }) => /* @__PURE__ */ React29.createElement(RotatedIcon2, { icon: StartIcon, size }),
|
|
1025
|
-
showTooltip: true
|
|
1026
|
-
},
|
|
1027
|
-
{
|
|
1028
|
-
value: "center",
|
|
1029
|
-
label: __12("Center", "elementor"),
|
|
1030
|
-
renderContent: ({ size }) => /* @__PURE__ */ React29.createElement(RotatedIcon2, { icon: CenterIcon2, size }),
|
|
1031
|
-
showTooltip: true
|
|
1032
|
-
},
|
|
1033
|
-
{
|
|
1034
|
-
value: "end",
|
|
1035
|
-
label: __12("End", "elementor"),
|
|
1036
|
-
renderContent: ({ size }) => /* @__PURE__ */ React29.createElement(RotatedIcon2, { icon: EndIcon, size }),
|
|
1037
|
-
showTooltip: true
|
|
1038
|
-
},
|
|
1039
|
-
{
|
|
1040
|
-
value: "space-between",
|
|
1041
|
-
label: __12("Space between", "elementor"),
|
|
1042
|
-
renderContent: ({ size }) => /* @__PURE__ */ React29.createElement(RotatedIcon2, { icon: BetweenIcon, size }),
|
|
1043
|
-
showTooltip: true
|
|
1044
|
-
},
|
|
1045
|
-
{
|
|
1046
|
-
value: "space-around",
|
|
1047
|
-
label: __12("Space around", "elementor"),
|
|
1048
|
-
renderContent: ({ size }) => /* @__PURE__ */ React29.createElement(RotatedIcon2, { icon: AroundIcon, size }),
|
|
1049
|
-
showTooltip: true
|
|
1050
|
-
},
|
|
1051
|
-
{
|
|
1052
|
-
value: "space-evenly",
|
|
1053
|
-
label: __12("Space evenly", "elementor"),
|
|
1054
|
-
renderContent: ({ size }) => /* @__PURE__ */ React29.createElement(RotatedIcon2, { icon: EvenlyIcon, size }),
|
|
1055
|
-
showTooltip: true
|
|
1056
|
-
}
|
|
1057
|
-
];
|
|
1238
|
+
import { DirectionProvider as DirectionProvider6, Stack as Stack12, ThemeProvider as ThemeProvider6, withDirection as withDirection4 } from "@elementor/ui";
|
|
1239
|
+
import { __ as __16 } from "@wordpress/i18n";
|
|
1240
|
+
var StartIcon3 = withDirection4(JustifyTopIcon);
|
|
1241
|
+
var EndIcon3 = withDirection4(JustifyBottomIcon);
|
|
1242
|
+
var iconProps3 = {
|
|
1243
|
+
isClockwise: true,
|
|
1244
|
+
offset: -90
|
|
1058
1245
|
};
|
|
1059
|
-
var
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
{
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1246
|
+
var options4 = [
|
|
1247
|
+
{
|
|
1248
|
+
value: "start",
|
|
1249
|
+
label: __16("Start", "elementor"),
|
|
1250
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: StartIcon3, size, ...iconProps3 }),
|
|
1251
|
+
showTooltip: true
|
|
1252
|
+
},
|
|
1253
|
+
{
|
|
1254
|
+
value: "center",
|
|
1255
|
+
label: __16("Center", "elementor"),
|
|
1256
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: CenterIcon3, size, ...iconProps3 }),
|
|
1257
|
+
showTooltip: true
|
|
1258
|
+
},
|
|
1259
|
+
{
|
|
1260
|
+
value: "end",
|
|
1261
|
+
label: __16("End", "elementor"),
|
|
1262
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: EndIcon3, size, ...iconProps3 }),
|
|
1263
|
+
showTooltip: true
|
|
1264
|
+
},
|
|
1265
|
+
{
|
|
1266
|
+
value: "space-between",
|
|
1267
|
+
label: __16("Space between", "elementor"),
|
|
1268
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: BetweenIcon, size, ...iconProps3 }),
|
|
1269
|
+
showTooltip: true
|
|
1270
|
+
},
|
|
1271
|
+
{
|
|
1272
|
+
value: "space-around",
|
|
1273
|
+
label: __16("Space around", "elementor"),
|
|
1274
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: AroundIcon, size, ...iconProps3 }),
|
|
1275
|
+
showTooltip: true
|
|
1276
|
+
},
|
|
1277
|
+
{
|
|
1278
|
+
value: "space-evenly",
|
|
1279
|
+
label: __16("Space evenly", "elementor"),
|
|
1280
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: EvenlyIcon, size, ...iconProps3 }),
|
|
1281
|
+
showTooltip: true
|
|
1282
|
+
}
|
|
1283
|
+
];
|
|
1284
|
+
var JustifyContentField = () => {
|
|
1285
|
+
const { isSiteRtl } = useDirection();
|
|
1286
|
+
return /* @__PURE__ */ React34.createElement(DirectionProvider6, { rtl: isSiteRtl }, /* @__PURE__ */ React34.createElement(ThemeProvider6, null, /* @__PURE__ */ React34.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React34.createElement(Stack12, { gap: 1 }, /* @__PURE__ */ React34.createElement(ControlLabel12, null, __16("Justify content", "elementor")), /* @__PURE__ */ React34.createElement(ToggleControl5, { options: options4, fullWidth: true })))));
|
|
1074
1287
|
};
|
|
1075
1288
|
|
|
1076
1289
|
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
1077
|
-
import * as
|
|
1078
|
-
import { ControlLabel as
|
|
1290
|
+
import * as React35 from "react";
|
|
1291
|
+
import { ControlLabel as ControlLabel13, ToggleControl as ToggleControl6 } from "@elementor/editor-controls";
|
|
1079
1292
|
import { ArrowBackIcon, ArrowForwardIcon, ArrowRightIcon as ArrowRightIcon2 } from "@elementor/icons";
|
|
1080
|
-
import { DirectionProvider as
|
|
1081
|
-
import { __ as
|
|
1082
|
-
var
|
|
1293
|
+
import { DirectionProvider as DirectionProvider7, Grid as Grid9, ThemeProvider as ThemeProvider7 } from "@elementor/ui";
|
|
1294
|
+
import { __ as __17 } from "@wordpress/i18n";
|
|
1295
|
+
var options5 = [
|
|
1083
1296
|
{
|
|
1084
1297
|
value: "nowrap",
|
|
1085
|
-
label:
|
|
1086
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1298
|
+
label: __17("No wrap", "elementor"),
|
|
1299
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(ArrowRightIcon2, { fontSize: size }),
|
|
1087
1300
|
showTooltip: true
|
|
1088
1301
|
},
|
|
1089
1302
|
{
|
|
1090
1303
|
value: "wrap",
|
|
1091
|
-
label:
|
|
1092
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1304
|
+
label: __17("Wrap", "elementor"),
|
|
1305
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(ArrowBackIcon, { fontSize: size }),
|
|
1093
1306
|
showTooltip: true
|
|
1094
1307
|
},
|
|
1095
1308
|
{
|
|
1096
1309
|
value: "wrap-reverse",
|
|
1097
|
-
label:
|
|
1098
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1310
|
+
label: __17("Reversed wrap", "elementor"),
|
|
1311
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(ArrowForwardIcon, { fontSize: size }),
|
|
1099
1312
|
showTooltip: true
|
|
1100
1313
|
}
|
|
1101
1314
|
];
|
|
1102
1315
|
var WrapField = () => {
|
|
1103
1316
|
const { isSiteRtl } = useDirection();
|
|
1104
|
-
return /* @__PURE__ */
|
|
1317
|
+
return /* @__PURE__ */ React35.createElement(DirectionProvider7, { rtl: isSiteRtl }, /* @__PURE__ */ React35.createElement(ThemeProvider7, null, /* @__PURE__ */ React35.createElement(StylesField, { bind: "flex-wrap" }, /* @__PURE__ */ React35.createElement(Grid9, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React35.createElement(Grid9, { item: true, xs: 6 }, /* @__PURE__ */ React35.createElement(ControlLabel13, null, __17("Wrap", "elementor"))), /* @__PURE__ */ React35.createElement(Grid9, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React35.createElement(ToggleControl6, { options: options5 }))))));
|
|
1105
1318
|
};
|
|
1106
1319
|
|
|
1107
1320
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
1108
1321
|
var LayoutSection = () => {
|
|
1109
1322
|
const [display] = useStylesField("display");
|
|
1110
|
-
return /* @__PURE__ */
|
|
1323
|
+
return /* @__PURE__ */ React36.createElement(Stack13, { gap: 2 }, /* @__PURE__ */ React36.createElement(DisplayField, null), "flex" === display?.value && /* @__PURE__ */ React36.createElement(FlexFields, null));
|
|
1111
1324
|
};
|
|
1112
|
-
var FlexFields = () => /* @__PURE__ */
|
|
1325
|
+
var FlexFields = () => /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(FlexDirectionField, null), /* @__PURE__ */ React36.createElement(JustifyContentField, null), /* @__PURE__ */ React36.createElement(AlignItemsField, null), /* @__PURE__ */ React36.createElement(Divider3, null), /* @__PURE__ */ React36.createElement(GapControlField, null), /* @__PURE__ */ React36.createElement(WrapField, null), /* @__PURE__ */ React36.createElement(Divider3, null), /* @__PURE__ */ React36.createElement(ControlLabel14, null, __18("Flex child", "elementor")), /* @__PURE__ */ React36.createElement(AlignSelfChild, null), /* @__PURE__ */ React36.createElement(FlexOrderField, null), /* @__PURE__ */ React36.createElement(FlexSizeField, null));
|
|
1113
1326
|
|
|
1114
1327
|
// src/components/style-sections/position-section/position-section.tsx
|
|
1115
|
-
import * as
|
|
1328
|
+
import * as React40 from "react";
|
|
1116
1329
|
import { useCallback as useCallback3 } from "react";
|
|
1117
|
-
import { Stack as
|
|
1330
|
+
import { Stack as Stack15 } from "@elementor/ui";
|
|
1118
1331
|
|
|
1119
1332
|
// src/hooks/use-style-prop-history.ts
|
|
1120
|
-
import { useCallback as useCallback2, useMemo as
|
|
1333
|
+
import { useCallback as useCallback2, useMemo as useMemo3 } from "react";
|
|
1121
1334
|
import { getElementStyles, getVariantByMeta, updateStyle as updateStyle2 } from "@elementor/editor-elements";
|
|
1122
1335
|
|
|
1123
1336
|
// src/hooks/use-prop-value-history.ts
|
|
1124
|
-
import { useCallback, useMemo } from "react";
|
|
1337
|
+
import { useCallback, useMemo as useMemo2 } from "react";
|
|
1125
1338
|
import { getSessionStorageItem, setSessionStorageItem } from "@elementor/utils";
|
|
1126
1339
|
var PROPS_VALUES_HISTORY_PREFIX = "elementor/editor-editing-panel/prop-value-history";
|
|
1127
1340
|
var usePropValueHistory = () => {
|
|
@@ -1155,7 +1368,7 @@ var usePropValueHistory = () => {
|
|
|
1155
1368
|
},
|
|
1156
1369
|
[getElementPropsHistory, elementKey]
|
|
1157
1370
|
);
|
|
1158
|
-
return
|
|
1371
|
+
return useMemo2(() => ({ getPropValue, setPropValue, removeProp }), [getPropValue, removeProp, setPropValue]);
|
|
1159
1372
|
};
|
|
1160
1373
|
|
|
1161
1374
|
// src/hooks/use-style-prop-history.ts
|
|
@@ -1163,7 +1376,7 @@ var useStylePropsHistory = (props) => {
|
|
|
1163
1376
|
const { element } = useElement();
|
|
1164
1377
|
const { id: styleDefID, meta } = useStyle();
|
|
1165
1378
|
const { getPropValue, setPropValue, removeProp } = usePropValueHistory();
|
|
1166
|
-
const styleDef = getElementStyles(element.id)?.[styleDefID];
|
|
1379
|
+
const styleDef = styleDefID ? getElementStyles(element.id)?.[styleDefID] : null;
|
|
1167
1380
|
const styleVariant = styleDef ? getVariantByMeta(styleDef, meta) : null;
|
|
1168
1381
|
const styleVariantPath = `${styleDefID}-${styleVariant?.meta.breakpoint}-${styleVariant?.meta.state}`;
|
|
1169
1382
|
const saveStylePropsHistory = useCallback2(() => {
|
|
@@ -1211,53 +1424,53 @@ var useStylePropsHistory = (props) => {
|
|
|
1211
1424
|
bind: "classes"
|
|
1212
1425
|
});
|
|
1213
1426
|
}, [element.id, meta, props, styleDefID]);
|
|
1214
|
-
return
|
|
1427
|
+
return useMemo3(
|
|
1215
1428
|
() => ({ saveStylePropsHistory, updateStylePropsFromHistory, clearCurrentStyleProps }),
|
|
1216
1429
|
[saveStylePropsHistory, updateStylePropsFromHistory, clearCurrentStyleProps]
|
|
1217
1430
|
);
|
|
1218
1431
|
};
|
|
1219
1432
|
|
|
1220
1433
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
1221
|
-
import * as
|
|
1222
|
-
import { ControlLabel as
|
|
1434
|
+
import * as React37 from "react";
|
|
1435
|
+
import { ControlLabel as ControlLabel15, SizeControl as SizeControl3 } from "@elementor/editor-controls";
|
|
1223
1436
|
import { SideBottomIcon as SideBottomIcon2, SideLeftIcon as SideLeftIcon2, SideRightIcon as SideRightIcon2, SideTopIcon as SideTopIcon2 } from "@elementor/icons";
|
|
1224
|
-
import { Grid as
|
|
1225
|
-
import { __ as
|
|
1437
|
+
import { Grid as Grid10, Stack as Stack14 } from "@elementor/ui";
|
|
1438
|
+
import { __ as __19 } from "@wordpress/i18n";
|
|
1226
1439
|
var sideIcons = {
|
|
1227
|
-
left: /* @__PURE__ */
|
|
1228
|
-
right: /* @__PURE__ */
|
|
1229
|
-
top: /* @__PURE__ */
|
|
1230
|
-
bottom: /* @__PURE__ */
|
|
1440
|
+
left: /* @__PURE__ */ React37.createElement(SideLeftIcon2, { fontSize: "tiny" }),
|
|
1441
|
+
right: /* @__PURE__ */ React37.createElement(SideRightIcon2, { fontSize: "tiny" }),
|
|
1442
|
+
top: /* @__PURE__ */ React37.createElement(SideTopIcon2, { fontSize: "tiny" }),
|
|
1443
|
+
bottom: /* @__PURE__ */ React37.createElement(SideBottomIcon2, { fontSize: "tiny" })
|
|
1231
1444
|
};
|
|
1232
1445
|
var DimensionsField = () => {
|
|
1233
|
-
return /* @__PURE__ */
|
|
1446
|
+
return /* @__PURE__ */ React37.createElement(React37.Fragment, null, /* @__PURE__ */ React37.createElement(Stack14, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(DimensionField, { side: "top", label: __19("Top", "elementor") }), /* @__PURE__ */ React37.createElement(DimensionField, { side: "right", label: __19("Right", "elementor") })), /* @__PURE__ */ React37.createElement(Stack14, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(DimensionField, { side: "bottom", label: __19("Bottom", "elementor") }), /* @__PURE__ */ React37.createElement(DimensionField, { side: "left", label: __19("Left", "elementor") })));
|
|
1234
1447
|
};
|
|
1235
1448
|
var DimensionField = ({ side, label }) => {
|
|
1236
|
-
return /* @__PURE__ */
|
|
1449
|
+
return /* @__PURE__ */ React37.createElement(Grid10, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React37.createElement(Grid10, { item: true, xs: 12 }, /* @__PURE__ */ React37.createElement(ControlLabel15, null, label)), /* @__PURE__ */ React37.createElement(Grid10, { item: true, xs: 12 }, /* @__PURE__ */ React37.createElement(StylesField, { bind: side }, /* @__PURE__ */ React37.createElement(SizeControl3, { startIcon: sideIcons[side] }))));
|
|
1237
1450
|
};
|
|
1238
1451
|
|
|
1239
1452
|
// src/components/style-sections/position-section/position-field.tsx
|
|
1240
|
-
import * as
|
|
1241
|
-
import { ControlLabel as
|
|
1242
|
-
import { Grid as
|
|
1243
|
-
import { __ as
|
|
1453
|
+
import * as React38 from "react";
|
|
1454
|
+
import { ControlLabel as ControlLabel16, SelectControl as SelectControl3 } from "@elementor/editor-controls";
|
|
1455
|
+
import { Grid as Grid11 } from "@elementor/ui";
|
|
1456
|
+
import { __ as __20 } from "@wordpress/i18n";
|
|
1244
1457
|
var positionOptions = [
|
|
1245
|
-
{ label:
|
|
1246
|
-
{ label:
|
|
1247
|
-
{ label:
|
|
1248
|
-
{ label:
|
|
1458
|
+
{ label: __20("Static", "elementor"), value: "static" },
|
|
1459
|
+
{ label: __20("Relative", "elementor"), value: "relative" },
|
|
1460
|
+
{ label: __20("Absolute", "elementor"), value: "absolute" },
|
|
1461
|
+
{ label: __20("Fixed", "elementor"), value: "fixed" }
|
|
1249
1462
|
];
|
|
1250
1463
|
var PositionField = () => {
|
|
1251
|
-
return /* @__PURE__ */
|
|
1464
|
+
return /* @__PURE__ */ React38.createElement(StylesField, { bind: "position" }, /* @__PURE__ */ React38.createElement(Grid11, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React38.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(ControlLabel16, null, __20("Position", "elementor"))), /* @__PURE__ */ React38.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(SelectControl3, { options: positionOptions }))));
|
|
1252
1465
|
};
|
|
1253
1466
|
|
|
1254
1467
|
// src/components/style-sections/position-section/z-index-field.tsx
|
|
1255
|
-
import * as
|
|
1256
|
-
import { ControlLabel as
|
|
1257
|
-
import { Grid as
|
|
1258
|
-
import { __ as
|
|
1468
|
+
import * as React39 from "react";
|
|
1469
|
+
import { ControlLabel as ControlLabel17, NumberControl as NumberControl3 } from "@elementor/editor-controls";
|
|
1470
|
+
import { Grid as Grid12 } from "@elementor/ui";
|
|
1471
|
+
import { __ as __21 } from "@wordpress/i18n";
|
|
1259
1472
|
var ZIndexField = () => {
|
|
1260
|
-
return /* @__PURE__ */
|
|
1473
|
+
return /* @__PURE__ */ React39.createElement(StylesField, { bind: "z-index" }, /* @__PURE__ */ React39.createElement(Grid12, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React39.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React39.createElement(ControlLabel17, null, __21("Z-Index", "elementor"))), /* @__PURE__ */ React39.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React39.createElement(NumberControl3, null))));
|
|
1261
1474
|
};
|
|
1262
1475
|
|
|
1263
1476
|
// src/components/style-sections/position-section/position-section.tsx
|
|
@@ -1265,8 +1478,8 @@ var dimensionsPropKeys = ["top", "bottom", "left", "right"];
|
|
|
1265
1478
|
var PositionSection = () => {
|
|
1266
1479
|
const [positionValue] = useStylesField("position");
|
|
1267
1480
|
usePositionChangeHandler();
|
|
1268
|
-
const isNotStatic = positionValue && positionValue !== "static";
|
|
1269
|
-
return /* @__PURE__ */
|
|
1481
|
+
const isNotStatic = positionValue && positionValue?.value !== "static";
|
|
1482
|
+
return /* @__PURE__ */ React40.createElement(Stack15, { gap: 1.5 }, /* @__PURE__ */ React40.createElement(PositionField, null), isNotStatic ? /* @__PURE__ */ React40.createElement(React40.Fragment, null, /* @__PURE__ */ React40.createElement(DimensionsField, null), /* @__PURE__ */ React40.createElement(ZIndexField, null)) : null);
|
|
1270
1483
|
};
|
|
1271
1484
|
var usePositionChangeHandler = () => {
|
|
1272
1485
|
const dimensionsHistory = useStylePropsHistory(dimensionsPropKeys);
|
|
@@ -1291,73 +1504,73 @@ var usePositionChangeHandler = () => {
|
|
|
1291
1504
|
};
|
|
1292
1505
|
|
|
1293
1506
|
// src/components/style-sections/size-section/size-section.tsx
|
|
1294
|
-
import * as
|
|
1295
|
-
import { ControlLabel as
|
|
1296
|
-
import { Divider as Divider4, Grid as
|
|
1297
|
-
import { __ as
|
|
1507
|
+
import * as React42 from "react";
|
|
1508
|
+
import { ControlLabel as ControlLabel19, SizeControl as SizeControl4 } from "@elementor/editor-controls";
|
|
1509
|
+
import { Divider as Divider4, Grid as Grid14, Stack as Stack16 } from "@elementor/ui";
|
|
1510
|
+
import { __ as __23 } from "@wordpress/i18n";
|
|
1298
1511
|
|
|
1299
1512
|
// src/components/style-sections/size-section/overflow-field.tsx
|
|
1300
|
-
import * as
|
|
1301
|
-
import { ControlLabel as
|
|
1513
|
+
import * as React41 from "react";
|
|
1514
|
+
import { ControlLabel as ControlLabel18, ToggleControl as ToggleControl7 } from "@elementor/editor-controls";
|
|
1302
1515
|
import { ExpandBottomIcon, EyeIcon, EyeOffIcon } from "@elementor/icons";
|
|
1303
|
-
import { Grid as
|
|
1304
|
-
import { __ as
|
|
1305
|
-
var
|
|
1516
|
+
import { Grid as Grid13 } from "@elementor/ui";
|
|
1517
|
+
import { __ as __22 } from "@wordpress/i18n";
|
|
1518
|
+
var options6 = [
|
|
1306
1519
|
{
|
|
1307
1520
|
value: "visible",
|
|
1308
|
-
label:
|
|
1309
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1521
|
+
label: __22("Visible", "elementor"),
|
|
1522
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(EyeIcon, { fontSize: size }),
|
|
1310
1523
|
showTooltip: true
|
|
1311
1524
|
},
|
|
1312
1525
|
{
|
|
1313
1526
|
value: "hidden",
|
|
1314
|
-
label:
|
|
1315
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1527
|
+
label: __22("Hidden", "elementor"),
|
|
1528
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(EyeOffIcon, { fontSize: size }),
|
|
1316
1529
|
showTooltip: true
|
|
1317
1530
|
},
|
|
1318
1531
|
{
|
|
1319
1532
|
value: "auto",
|
|
1320
|
-
label:
|
|
1321
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1533
|
+
label: __22("Auto", "elementor"),
|
|
1534
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(ExpandBottomIcon, { fontSize: size }),
|
|
1322
1535
|
showTooltip: true
|
|
1323
1536
|
}
|
|
1324
1537
|
];
|
|
1325
1538
|
var OverflowField = () => {
|
|
1326
|
-
return /* @__PURE__ */
|
|
1539
|
+
return /* @__PURE__ */ React41.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React41.createElement(Grid13, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(ControlLabel18, null, __22("Overflow", "elementor"))), /* @__PURE__ */ React41.createElement(Grid13, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React41.createElement(ToggleControl7, { options: options6 }))));
|
|
1327
1540
|
};
|
|
1328
1541
|
|
|
1329
1542
|
// src/components/style-sections/size-section/size-section.tsx
|
|
1330
1543
|
var SizeSection = () => {
|
|
1331
|
-
return /* @__PURE__ */
|
|
1544
|
+
return /* @__PURE__ */ React42.createElement(Stack16, { gap: 1.5 }, /* @__PURE__ */ React42.createElement(Grid14, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React42.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(SizeField, { bind: "width", label: __23("Width", "elementor") })), /* @__PURE__ */ React42.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(SizeField, { bind: "height", label: __23("Height", "elementor") }))), /* @__PURE__ */ React42.createElement(Grid14, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React42.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(SizeField, { bind: "min-width", label: __23("Min. Width", "elementor") })), /* @__PURE__ */ React42.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(SizeField, { bind: "min-height", label: __23("Min. Height", "elementor") }))), /* @__PURE__ */ React42.createElement(Grid14, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React42.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(SizeField, { bind: "max-width", label: __23("Max. Width", "elementor") })), /* @__PURE__ */ React42.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(SizeField, { bind: "max-height", label: __23("Max. Height", "elementor") }))), /* @__PURE__ */ React42.createElement(Divider4, null), /* @__PURE__ */ React42.createElement(Stack16, null, /* @__PURE__ */ React42.createElement(OverflowField, null)));
|
|
1332
1545
|
};
|
|
1333
1546
|
var SizeField = ({ label, bind }) => {
|
|
1334
|
-
return /* @__PURE__ */
|
|
1547
|
+
return /* @__PURE__ */ React42.createElement(StylesField, { bind }, /* @__PURE__ */ React42.createElement(Grid14, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React42.createElement(Grid14, { item: true, xs: 12 }, /* @__PURE__ */ React42.createElement(ControlLabel19, null, label)), /* @__PURE__ */ React42.createElement(Grid14, { item: true, xs: 12 }, /* @__PURE__ */ React42.createElement(SizeControl4, null))));
|
|
1335
1548
|
};
|
|
1336
1549
|
|
|
1337
1550
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
1338
|
-
import * as
|
|
1551
|
+
import * as React43 from "react";
|
|
1339
1552
|
import { LinkedDimensionsControl } from "@elementor/editor-controls";
|
|
1340
|
-
import { Divider as Divider5, Stack as
|
|
1341
|
-
import { __ as
|
|
1553
|
+
import { Divider as Divider5, Stack as Stack17 } from "@elementor/ui";
|
|
1554
|
+
import { __ as __24 } from "@wordpress/i18n";
|
|
1342
1555
|
var SpacingSection = () => {
|
|
1343
|
-
return /* @__PURE__ */
|
|
1556
|
+
return /* @__PURE__ */ React43.createElement(Stack17, { gap: 1.5 }, /* @__PURE__ */ React43.createElement(StylesField, { bind: "padding" }, /* @__PURE__ */ React43.createElement(LinkedDimensionsControl, { label: __24("Padding", "elementor") })), /* @__PURE__ */ React43.createElement(Divider5, null), /* @__PURE__ */ React43.createElement(StylesField, { bind: "margin" }, /* @__PURE__ */ React43.createElement(LinkedDimensionsControl, { label: __24("Margin", "elementor") })));
|
|
1344
1557
|
};
|
|
1345
1558
|
|
|
1346
1559
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
1347
|
-
import * as
|
|
1348
|
-
import { Divider as Divider6, Stack as
|
|
1560
|
+
import * as React57 from "react";
|
|
1561
|
+
import { Divider as Divider6, Stack as Stack19 } from "@elementor/ui";
|
|
1349
1562
|
|
|
1350
1563
|
// src/components/collapsible-content.tsx
|
|
1351
|
-
import * as
|
|
1352
|
-
import { useState as
|
|
1353
|
-
import { Button, Collapse as Collapse3, Stack as
|
|
1354
|
-
import { __ as
|
|
1564
|
+
import * as React44 from "react";
|
|
1565
|
+
import { useState as useState5 } from "react";
|
|
1566
|
+
import { Button, Collapse as Collapse3, Stack as Stack18 } from "@elementor/ui";
|
|
1567
|
+
import { __ as __25 } from "@wordpress/i18n";
|
|
1355
1568
|
var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
1356
|
-
const [open, setOpen] =
|
|
1569
|
+
const [open, setOpen] = useState5(defaultOpen);
|
|
1357
1570
|
const handleToggle = () => {
|
|
1358
1571
|
setOpen((prevOpen) => !prevOpen);
|
|
1359
1572
|
};
|
|
1360
|
-
return /* @__PURE__ */
|
|
1573
|
+
return /* @__PURE__ */ React44.createElement(Stack18, { sx: { py: 0.5 } }, /* @__PURE__ */ React44.createElement(
|
|
1361
1574
|
Button,
|
|
1362
1575
|
{
|
|
1363
1576
|
fullWidth: true,
|
|
@@ -1365,17 +1578,17 @@ var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
|
1365
1578
|
color: "secondary",
|
|
1366
1579
|
variant: "outlined",
|
|
1367
1580
|
onClick: handleToggle,
|
|
1368
|
-
endIcon: /* @__PURE__ */
|
|
1581
|
+
endIcon: /* @__PURE__ */ React44.createElement(CollapseIcon, { open })
|
|
1369
1582
|
},
|
|
1370
|
-
open ?
|
|
1371
|
-
), /* @__PURE__ */
|
|
1583
|
+
open ? __25("Show less", "elementor") : __25("Show more", "elementor")
|
|
1584
|
+
), /* @__PURE__ */ React44.createElement(Collapse3, { in: open, timeout: "auto", unmountOnExit: true }, children));
|
|
1372
1585
|
};
|
|
1373
1586
|
|
|
1374
1587
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
1375
|
-
import * as
|
|
1376
|
-
import { ControlLabel as
|
|
1377
|
-
import { Grid as
|
|
1378
|
-
import { __ as
|
|
1588
|
+
import * as React45 from "react";
|
|
1589
|
+
import { ControlLabel as ControlLabel20, FontFamilyControl } from "@elementor/editor-controls";
|
|
1590
|
+
import { Grid as Grid15 } from "@elementor/ui";
|
|
1591
|
+
import { __ as __26 } from "@wordpress/i18n";
|
|
1379
1592
|
|
|
1380
1593
|
// src/sync/get-elementor-config.ts
|
|
1381
1594
|
var getElementorConfig = () => {
|
|
@@ -1389,118 +1602,127 @@ var FontFamilyField = () => {
|
|
|
1389
1602
|
if (!fontFamilies) {
|
|
1390
1603
|
return null;
|
|
1391
1604
|
}
|
|
1392
|
-
return /* @__PURE__ */
|
|
1605
|
+
return /* @__PURE__ */ React45.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React45.createElement(Grid15, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React45.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(ControlLabel20, null, __26("Font Family", "elementor"))), /* @__PURE__ */ React45.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(FontFamilyControl, { fontFamilies }))));
|
|
1393
1606
|
};
|
|
1394
1607
|
var getFontFamilies = () => {
|
|
1395
1608
|
const { controls } = getElementorConfig();
|
|
1396
|
-
const
|
|
1397
|
-
if (!
|
|
1609
|
+
const options10 = controls?.font?.options;
|
|
1610
|
+
if (!options10) {
|
|
1398
1611
|
return null;
|
|
1399
1612
|
}
|
|
1400
|
-
return
|
|
1613
|
+
return options10;
|
|
1401
1614
|
};
|
|
1402
1615
|
|
|
1403
1616
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
1404
|
-
import * as
|
|
1405
|
-
import { ControlLabel as
|
|
1406
|
-
import { Grid as
|
|
1407
|
-
import { __ as
|
|
1617
|
+
import * as React46 from "react";
|
|
1618
|
+
import { ControlLabel as ControlLabel21, SizeControl as SizeControl5 } from "@elementor/editor-controls";
|
|
1619
|
+
import { Grid as Grid16 } from "@elementor/ui";
|
|
1620
|
+
import { __ as __27 } from "@wordpress/i18n";
|
|
1408
1621
|
var FontSizeField = () => {
|
|
1409
|
-
return /* @__PURE__ */
|
|
1622
|
+
return /* @__PURE__ */ React46.createElement(StylesField, { bind: "font-size" }, /* @__PURE__ */ React46.createElement(Grid16, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(ControlLabel21, null, __27("Font Size", "elementor"))), /* @__PURE__ */ React46.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(SizeControl5, null))));
|
|
1410
1623
|
};
|
|
1411
1624
|
|
|
1412
1625
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
1413
|
-
import * as
|
|
1414
|
-
import { ControlLabel as
|
|
1415
|
-
import { Grid as
|
|
1416
|
-
import { __ as
|
|
1626
|
+
import * as React47 from "react";
|
|
1627
|
+
import { ControlLabel as ControlLabel22, SelectControl as SelectControl4 } from "@elementor/editor-controls";
|
|
1628
|
+
import { Grid as Grid17 } from "@elementor/ui";
|
|
1629
|
+
import { __ as __28 } from "@wordpress/i18n";
|
|
1417
1630
|
var fontWeightOptions = [
|
|
1418
|
-
{ label:
|
|
1419
|
-
{ label:
|
|
1420
|
-
{ label:
|
|
1421
|
-
{ label:
|
|
1422
|
-
{ label:
|
|
1631
|
+
{ label: __28("Light - 400", "elementor"), value: "400" },
|
|
1632
|
+
{ label: __28("Regular - 500", "elementor"), value: "500" },
|
|
1633
|
+
{ label: __28("Semi Bold - 600", "elementor"), value: "600" },
|
|
1634
|
+
{ label: __28("Bold - 700", "elementor"), value: "700" },
|
|
1635
|
+
{ label: __28("Black - 900", "elementor"), value: "900" }
|
|
1423
1636
|
];
|
|
1424
1637
|
var FontWeightField = () => {
|
|
1425
|
-
return /* @__PURE__ */
|
|
1638
|
+
return /* @__PURE__ */ React47.createElement(StylesField, { bind: "font-weight" }, /* @__PURE__ */ React47.createElement(Grid17, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlLabel22, null, __28("Font Weight", "elementor"))), /* @__PURE__ */ React47.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(SelectControl4, { options: fontWeightOptions }))));
|
|
1426
1639
|
};
|
|
1427
1640
|
|
|
1428
1641
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
1429
|
-
import * as
|
|
1430
|
-
import { ControlLabel as
|
|
1431
|
-
import { Grid as
|
|
1432
|
-
import { __ as
|
|
1642
|
+
import * as React48 from "react";
|
|
1643
|
+
import { ControlLabel as ControlLabel23, SizeControl as SizeControl6 } from "@elementor/editor-controls";
|
|
1644
|
+
import { Grid as Grid18 } from "@elementor/ui";
|
|
1645
|
+
import { __ as __29 } from "@wordpress/i18n";
|
|
1433
1646
|
var LetterSpacingField = () => {
|
|
1434
|
-
return /* @__PURE__ */
|
|
1647
|
+
return /* @__PURE__ */ React48.createElement(StylesField, { bind: "letter-spacing" }, /* @__PURE__ */ React48.createElement(Grid18, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React48.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(ControlLabel23, null, __29("Letter Spacing", "elementor"))), /* @__PURE__ */ React48.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(SizeControl6, null))));
|
|
1648
|
+
};
|
|
1649
|
+
|
|
1650
|
+
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
1651
|
+
import * as React49 from "react";
|
|
1652
|
+
import { ControlLabel as ControlLabel24, SizeControl as SizeControl7 } from "@elementor/editor-controls";
|
|
1653
|
+
import { Grid as Grid19 } from "@elementor/ui";
|
|
1654
|
+
import { __ as __30 } from "@wordpress/i18n";
|
|
1655
|
+
var LineHeightField = () => {
|
|
1656
|
+
return /* @__PURE__ */ React49.createElement(StylesField, { bind: "line-height" }, /* @__PURE__ */ React49.createElement(Grid19, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(Grid19, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(ControlLabel24, null, __30("Line Height", "elementor"))), /* @__PURE__ */ React49.createElement(Grid19, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(SizeControl7, null))));
|
|
1435
1657
|
};
|
|
1436
1658
|
|
|
1437
1659
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
1438
|
-
import * as
|
|
1439
|
-
import { ControlLabel as
|
|
1660
|
+
import * as React50 from "react";
|
|
1661
|
+
import { ControlLabel as ControlLabel25, ToggleControl as ToggleControl8 } from "@elementor/editor-controls";
|
|
1440
1662
|
import { AlignCenterIcon, AlignJustifiedIcon, AlignLeftIcon, AlignRightIcon } from "@elementor/icons";
|
|
1441
|
-
import { Grid as
|
|
1442
|
-
import { __ as
|
|
1443
|
-
var
|
|
1663
|
+
import { Grid as Grid20 } from "@elementor/ui";
|
|
1664
|
+
import { __ as __31 } from "@wordpress/i18n";
|
|
1665
|
+
var options7 = [
|
|
1444
1666
|
{
|
|
1445
1667
|
value: "left",
|
|
1446
|
-
label:
|
|
1447
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1668
|
+
label: __31("Left", "elementor"),
|
|
1669
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(AlignLeftIcon, { fontSize: size })
|
|
1448
1670
|
},
|
|
1449
1671
|
{
|
|
1450
1672
|
value: "center",
|
|
1451
|
-
label:
|
|
1452
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1673
|
+
label: __31("Center", "elementor"),
|
|
1674
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(AlignCenterIcon, { fontSize: size })
|
|
1453
1675
|
},
|
|
1454
1676
|
{
|
|
1455
1677
|
value: "right",
|
|
1456
|
-
label:
|
|
1457
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1678
|
+
label: __31("Right", "elementor"),
|
|
1679
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(AlignRightIcon, { fontSize: size })
|
|
1458
1680
|
},
|
|
1459
1681
|
{
|
|
1460
1682
|
value: "justify",
|
|
1461
|
-
label:
|
|
1462
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1683
|
+
label: __31("Justify", "elementor"),
|
|
1684
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(AlignJustifiedIcon, { fontSize: size })
|
|
1463
1685
|
}
|
|
1464
1686
|
];
|
|
1465
1687
|
var TextAlignmentField = () => {
|
|
1466
|
-
return /* @__PURE__ */
|
|
1688
|
+
return /* @__PURE__ */ React50.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React50.createElement(Grid20, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React50.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(ControlLabel25, null, __31("Alignment", "elementor"))), /* @__PURE__ */ React50.createElement(Grid20, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React50.createElement(ToggleControl8, { options: options7 }))));
|
|
1467
1689
|
};
|
|
1468
1690
|
|
|
1469
1691
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
1470
|
-
import * as
|
|
1471
|
-
import { ColorControl as ColorControl3, ControlLabel as
|
|
1472
|
-
import { Grid as
|
|
1473
|
-
import { __ as
|
|
1692
|
+
import * as React51 from "react";
|
|
1693
|
+
import { ColorControl as ColorControl3, ControlLabel as ControlLabel26 } from "@elementor/editor-controls";
|
|
1694
|
+
import { Grid as Grid21 } from "@elementor/ui";
|
|
1695
|
+
import { __ as __32 } from "@wordpress/i18n";
|
|
1474
1696
|
var TextColorField = () => {
|
|
1475
|
-
return /* @__PURE__ */
|
|
1697
|
+
return /* @__PURE__ */ React51.createElement(StylesField, { bind: "color" }, /* @__PURE__ */ React51.createElement(Grid21, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React51.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(ControlLabel26, null, __32("Text Color", "elementor"))), /* @__PURE__ */ React51.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(ColorControl3, null))));
|
|
1476
1698
|
};
|
|
1477
1699
|
|
|
1478
1700
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
1479
|
-
import * as
|
|
1480
|
-
import { ControlLabel as
|
|
1701
|
+
import * as React52 from "react";
|
|
1702
|
+
import { ControlLabel as ControlLabel27, ToggleControl as ToggleControl9 } from "@elementor/editor-controls";
|
|
1481
1703
|
import { TextDirectionLtrIcon, TextDirectionRtlIcon } from "@elementor/icons";
|
|
1482
|
-
import { Grid as
|
|
1483
|
-
import { __ as
|
|
1484
|
-
var
|
|
1704
|
+
import { Grid as Grid22 } from "@elementor/ui";
|
|
1705
|
+
import { __ as __33 } from "@wordpress/i18n";
|
|
1706
|
+
var options8 = [
|
|
1485
1707
|
{
|
|
1486
1708
|
value: "ltr",
|
|
1487
|
-
label:
|
|
1488
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1709
|
+
label: __33("Left to Right", "elementor"),
|
|
1710
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(TextDirectionLtrIcon, { fontSize: size })
|
|
1489
1711
|
},
|
|
1490
1712
|
{
|
|
1491
1713
|
value: "rtl",
|
|
1492
|
-
label:
|
|
1493
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1714
|
+
label: __33("Right to Left", "elementor"),
|
|
1715
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(TextDirectionRtlIcon, { fontSize: size })
|
|
1494
1716
|
}
|
|
1495
1717
|
];
|
|
1496
1718
|
var TextDirectionField = () => {
|
|
1497
|
-
return /* @__PURE__ */
|
|
1719
|
+
return /* @__PURE__ */ React52.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React52.createElement(Grid22, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React52.createElement(Grid22, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(ControlLabel27, null, __33("Direction", "elementor"))), /* @__PURE__ */ React52.createElement(Grid22, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React52.createElement(ToggleControl9, { options: options8 }))));
|
|
1498
1720
|
};
|
|
1499
1721
|
|
|
1500
1722
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
1501
|
-
import * as
|
|
1723
|
+
import * as React53 from "react";
|
|
1502
1724
|
import { StrokeControl } from "@elementor/editor-controls";
|
|
1503
|
-
import { __ as
|
|
1725
|
+
import { __ as __34 } from "@wordpress/i18n";
|
|
1504
1726
|
var initTextStroke = {
|
|
1505
1727
|
$$type: "stroke",
|
|
1506
1728
|
value: {
|
|
@@ -1526,56 +1748,74 @@ var TextStrokeField = () => {
|
|
|
1526
1748
|
setTextStroke(null);
|
|
1527
1749
|
};
|
|
1528
1750
|
const hasTextStroke = Boolean(textStroke);
|
|
1529
|
-
return /* @__PURE__ */
|
|
1751
|
+
return /* @__PURE__ */ React53.createElement(
|
|
1530
1752
|
AddOrRemoveContent,
|
|
1531
1753
|
{
|
|
1532
|
-
label:
|
|
1754
|
+
label: __34("Text Stroke", "elementor"),
|
|
1533
1755
|
isAdded: hasTextStroke,
|
|
1534
1756
|
onAdd: addTextStroke,
|
|
1535
1757
|
onRemove: removeTextStroke
|
|
1536
1758
|
},
|
|
1537
|
-
/* @__PURE__ */
|
|
1759
|
+
/* @__PURE__ */ React53.createElement(StylesField, { bind: "-webkit-text-stroke" }, /* @__PURE__ */ React53.createElement(StrokeControl, null))
|
|
1538
1760
|
);
|
|
1539
1761
|
};
|
|
1540
1762
|
|
|
1541
1763
|
// src/components/style-sections/typography-section/text-style-field.tsx
|
|
1542
|
-
import * as
|
|
1543
|
-
import { ControlLabel as
|
|
1764
|
+
import * as React54 from "react";
|
|
1765
|
+
import { ControlLabel as ControlLabel28 } from "@elementor/editor-controls";
|
|
1544
1766
|
import { ItalicIcon, StrikethroughIcon, UnderlineIcon } from "@elementor/icons";
|
|
1545
|
-
import { Grid as
|
|
1546
|
-
import { __ as
|
|
1767
|
+
import { Grid as Grid23, ToggleButton as ToggleButtonBase, ToggleButtonGroup } from "@elementor/ui";
|
|
1768
|
+
import { __ as __35 } from "@wordpress/i18n";
|
|
1547
1769
|
var buttonSize = "tiny";
|
|
1548
1770
|
var TextStyleField = () => {
|
|
1549
1771
|
const [fontStyle, setFontStyle] = useStylesField("font-style");
|
|
1550
1772
|
const [textDecoration, setTextDecoration] = useStylesField("text-decoration");
|
|
1551
|
-
const formats = [fontStyle, ...(textDecoration || "").split(" ")];
|
|
1552
|
-
|
|
1773
|
+
const formats = [fontStyle?.value, ...(textDecoration?.value || "").split(" ")];
|
|
1774
|
+
const handleSetFontStyle = (newValue) => {
|
|
1775
|
+
if (newValue === null) {
|
|
1776
|
+
return setFontStyle(null);
|
|
1777
|
+
}
|
|
1778
|
+
setFontStyle({
|
|
1779
|
+
$$type: "string",
|
|
1780
|
+
value: newValue
|
|
1781
|
+
});
|
|
1782
|
+
};
|
|
1783
|
+
const handleSetTextDecoration = (newValue) => {
|
|
1784
|
+
if (newValue === null) {
|
|
1785
|
+
return setTextDecoration(null);
|
|
1786
|
+
}
|
|
1787
|
+
setTextDecoration({
|
|
1788
|
+
$$type: "string",
|
|
1789
|
+
value: newValue
|
|
1790
|
+
});
|
|
1791
|
+
};
|
|
1792
|
+
return /* @__PURE__ */ React54.createElement(Grid23, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React54.createElement(Grid23, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(ControlLabel28, null, __35("Style", "elementor"))), /* @__PURE__ */ React54.createElement(Grid23, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React54.createElement(ToggleButtonGroup, { value: formats }, /* @__PURE__ */ React54.createElement(
|
|
1553
1793
|
ToggleButton,
|
|
1554
1794
|
{
|
|
1555
1795
|
value: "italic",
|
|
1556
|
-
onChange: (v) =>
|
|
1796
|
+
onChange: (v) => handleSetFontStyle(fontStyle?.value === v ? null : v),
|
|
1557
1797
|
"aria-label": "italic",
|
|
1558
1798
|
sx: { marginLeft: "auto" }
|
|
1559
1799
|
},
|
|
1560
|
-
/* @__PURE__ */
|
|
1561
|
-
), /* @__PURE__ */
|
|
1800
|
+
/* @__PURE__ */ React54.createElement(ItalicIcon, { fontSize: buttonSize })
|
|
1801
|
+
), /* @__PURE__ */ React54.createElement(
|
|
1562
1802
|
ShorthandControl,
|
|
1563
1803
|
{
|
|
1564
1804
|
value: "line-through",
|
|
1565
|
-
currentValues: textDecoration || "",
|
|
1566
|
-
updateValues:
|
|
1805
|
+
currentValues: textDecoration?.value || "",
|
|
1806
|
+
updateValues: handleSetTextDecoration,
|
|
1567
1807
|
"aria-label": "line-through"
|
|
1568
1808
|
},
|
|
1569
|
-
/* @__PURE__ */
|
|
1570
|
-
), /* @__PURE__ */
|
|
1809
|
+
/* @__PURE__ */ React54.createElement(StrikethroughIcon, { fontSize: buttonSize })
|
|
1810
|
+
), /* @__PURE__ */ React54.createElement(
|
|
1571
1811
|
ShorthandControl,
|
|
1572
1812
|
{
|
|
1573
1813
|
value: "underline",
|
|
1574
|
-
currentValues: textDecoration || "",
|
|
1575
|
-
updateValues:
|
|
1814
|
+
currentValues: textDecoration?.value || "",
|
|
1815
|
+
updateValues: handleSetTextDecoration,
|
|
1576
1816
|
"aria-label": "underline"
|
|
1577
1817
|
},
|
|
1578
|
-
/* @__PURE__ */
|
|
1818
|
+
/* @__PURE__ */ React54.createElement(UnderlineIcon, { fontSize: buttonSize })
|
|
1579
1819
|
))));
|
|
1580
1820
|
};
|
|
1581
1821
|
var ShorthandControl = ({
|
|
@@ -1594,52 +1834,52 @@ var ShorthandControl = ({
|
|
|
1594
1834
|
updateValues([...valuesArr, newValue].join(" "));
|
|
1595
1835
|
}
|
|
1596
1836
|
};
|
|
1597
|
-
return /* @__PURE__ */
|
|
1837
|
+
return /* @__PURE__ */ React54.createElement(ToggleButton, { value, onChange: toggleValue, selected, "aria-label": ariaLabel }, children);
|
|
1598
1838
|
};
|
|
1599
1839
|
var ToggleButton = ({ onChange, ...props }) => {
|
|
1600
1840
|
const handleChange = (_e, newValue) => {
|
|
1601
1841
|
onChange(newValue);
|
|
1602
1842
|
};
|
|
1603
|
-
return /* @__PURE__ */
|
|
1843
|
+
return /* @__PURE__ */ React54.createElement(ToggleButtonBase, { ...props, onChange: handleChange, size: buttonSize });
|
|
1604
1844
|
};
|
|
1605
1845
|
|
|
1606
1846
|
// src/components/style-sections/typography-section/transform-field.tsx
|
|
1607
|
-
import * as
|
|
1608
|
-
import { ControlLabel as
|
|
1847
|
+
import * as React55 from "react";
|
|
1848
|
+
import { ControlLabel as ControlLabel29, ToggleControl as ToggleControl10 } from "@elementor/editor-controls";
|
|
1609
1849
|
import { LetterCaseIcon, LetterCaseLowerIcon, LetterCaseUpperIcon } from "@elementor/icons";
|
|
1610
|
-
import { Grid as
|
|
1611
|
-
import { __ as
|
|
1612
|
-
var
|
|
1850
|
+
import { Grid as Grid24 } from "@elementor/ui";
|
|
1851
|
+
import { __ as __36 } from "@wordpress/i18n";
|
|
1852
|
+
var options9 = [
|
|
1613
1853
|
{
|
|
1614
1854
|
value: "capitalize",
|
|
1615
|
-
label:
|
|
1616
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1855
|
+
label: __36("Capitalize", "elementor"),
|
|
1856
|
+
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(LetterCaseIcon, { fontSize: size })
|
|
1617
1857
|
},
|
|
1618
1858
|
{
|
|
1619
1859
|
value: "uppercase",
|
|
1620
|
-
label:
|
|
1621
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1860
|
+
label: __36("Uppercase", "elementor"),
|
|
1861
|
+
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(LetterCaseUpperIcon, { fontSize: size })
|
|
1622
1862
|
},
|
|
1623
1863
|
{
|
|
1624
1864
|
value: "lowercase",
|
|
1625
|
-
label:
|
|
1626
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1865
|
+
label: __36("Lowercase", "elementor"),
|
|
1866
|
+
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(LetterCaseLowerIcon, { fontSize: size })
|
|
1627
1867
|
}
|
|
1628
1868
|
];
|
|
1629
|
-
var TransformField = () => /* @__PURE__ */
|
|
1869
|
+
var TransformField = () => /* @__PURE__ */ React55.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React55.createElement(Grid24, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React55.createElement(Grid24, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(ControlLabel29, null, __36("Transform", "elementor"))), /* @__PURE__ */ React55.createElement(Grid24, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React55.createElement(ToggleControl10, { options: options9 }))));
|
|
1630
1870
|
|
|
1631
1871
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
1632
|
-
import * as
|
|
1633
|
-
import { ControlLabel as
|
|
1634
|
-
import { Grid as
|
|
1635
|
-
import { __ as
|
|
1872
|
+
import * as React56 from "react";
|
|
1873
|
+
import { ControlLabel as ControlLabel30, SizeControl as SizeControl8 } from "@elementor/editor-controls";
|
|
1874
|
+
import { Grid as Grid25 } from "@elementor/ui";
|
|
1875
|
+
import { __ as __37 } from "@wordpress/i18n";
|
|
1636
1876
|
var WordSpacingField = () => {
|
|
1637
|
-
return /* @__PURE__ */
|
|
1877
|
+
return /* @__PURE__ */ React56.createElement(StylesField, { bind: "word-spacing" }, /* @__PURE__ */ React56.createElement(Grid25, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React56.createElement(Grid25, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(ControlLabel30, null, __37("Word Spacing", "elementor"))), /* @__PURE__ */ React56.createElement(Grid25, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(SizeControl8, null))));
|
|
1638
1878
|
};
|
|
1639
1879
|
|
|
1640
1880
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
1641
1881
|
var TypographySection = () => {
|
|
1642
|
-
return /* @__PURE__ */
|
|
1882
|
+
return /* @__PURE__ */ React57.createElement(Stack19, { gap: 1.5 }, /* @__PURE__ */ React57.createElement(FontFamilyField, null), /* @__PURE__ */ React57.createElement(FontWeightField, null), /* @__PURE__ */ React57.createElement(FontSizeField, null), /* @__PURE__ */ React57.createElement(Divider6, null), /* @__PURE__ */ React57.createElement(TextAlignmentField, null), /* @__PURE__ */ React57.createElement(TextColorField, null), /* @__PURE__ */ React57.createElement(CollapsibleContent, null, /* @__PURE__ */ React57.createElement(Stack19, { gap: 1.5, sx: { pt: 1.5 } }, /* @__PURE__ */ React57.createElement(LineHeightField, null), /* @__PURE__ */ React57.createElement(LetterSpacingField, null), /* @__PURE__ */ React57.createElement(WordSpacingField, null), /* @__PURE__ */ React57.createElement(Divider6, null), /* @__PURE__ */ React57.createElement(TextStyleField, null), /* @__PURE__ */ React57.createElement(TransformField, null), /* @__PURE__ */ React57.createElement(TextDirectionField, null), /* @__PURE__ */ React57.createElement(TextStrokeField, null))));
|
|
1643
1883
|
};
|
|
1644
1884
|
|
|
1645
1885
|
// src/components/style-tab.tsx
|
|
@@ -1648,25 +1888,19 @@ var StyleTab = () => {
|
|
|
1648
1888
|
const currentClassesProp = useCurrentClassesProp();
|
|
1649
1889
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp);
|
|
1650
1890
|
const breakpoint = useActiveBreakpoint();
|
|
1651
|
-
return /* @__PURE__ */
|
|
1891
|
+
return /* @__PURE__ */ React58.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React58.createElement(StyleProvider, { meta: { breakpoint, state: null }, id: activeStyleDefId, setId: setActiveStyleDefId }, /* @__PURE__ */ React58.createElement(CssClassSelector, null), /* @__PURE__ */ React58.createElement(Divider7, null), /* @__PURE__ */ React58.createElement(SectionsList, null, /* @__PURE__ */ React58.createElement(Section, { title: __38("Layout", "elementor") }, /* @__PURE__ */ React58.createElement(LayoutSection, null)), /* @__PURE__ */ React58.createElement(Section, { title: __38("Spacing", "elementor") }, /* @__PURE__ */ React58.createElement(SpacingSection, null)), /* @__PURE__ */ React58.createElement(Section, { title: __38("Size", "elementor") }, /* @__PURE__ */ React58.createElement(SizeSection, null)), /* @__PURE__ */ React58.createElement(Section, { title: __38("Position", "elementor") }, /* @__PURE__ */ React58.createElement(PositionSection, null)), /* @__PURE__ */ React58.createElement(Section, { title: __38("Typography", "elementor") }, /* @__PURE__ */ React58.createElement(TypographySection, null)), /* @__PURE__ */ React58.createElement(Section, { title: __38("Background", "elementor") }, /* @__PURE__ */ React58.createElement(BackgroundSection, null)), /* @__PURE__ */ React58.createElement(Section, { title: __38("Border", "elementor") }, /* @__PURE__ */ React58.createElement(BorderSection, null)), /* @__PURE__ */ React58.createElement(Section, { title: __38("Effects", "elementor") }, /* @__PURE__ */ React58.createElement(EffectsSection, null)))));
|
|
1652
1892
|
};
|
|
1653
1893
|
function useActiveStyleDefId(currentClassesProp) {
|
|
1654
|
-
const [activeStyledDefId, setActiveStyledDefId] =
|
|
1894
|
+
const [activeStyledDefId, setActiveStyledDefId] = useState6(null);
|
|
1655
1895
|
const fallback = useFirstElementStyleDef(currentClassesProp);
|
|
1656
|
-
|
|
1657
|
-
return [activeStyledDefId || fallback?.id || newId, setActiveStyledDefId];
|
|
1896
|
+
return [activeStyledDefId || fallback?.id || null, setActiveStyledDefId];
|
|
1658
1897
|
}
|
|
1659
1898
|
function useFirstElementStyleDef(currentClassesProp) {
|
|
1660
1899
|
const { element } = useElement();
|
|
1661
1900
|
const classesIds = useElementSetting3(element.id, currentClassesProp)?.value || [];
|
|
1662
|
-
const stylesDefs =
|
|
1901
|
+
const stylesDefs = useElementStyles(element.id);
|
|
1663
1902
|
return Object.values(stylesDefs).find((styleDef) => classesIds.includes(styleDef.id));
|
|
1664
1903
|
}
|
|
1665
|
-
function useGeneratedId() {
|
|
1666
|
-
const { element } = useElement();
|
|
1667
|
-
const stylesDefs = useElementStyles2(element.id);
|
|
1668
|
-
return generateId(`e-${element.id}-`, Object.keys(stylesDefs));
|
|
1669
|
-
}
|
|
1670
1904
|
function useCurrentClassesProp() {
|
|
1671
1905
|
const { elementType } = useElement();
|
|
1672
1906
|
const prop = Object.entries(elementType.propsSchema).find(
|
|
@@ -1685,7 +1919,7 @@ var EditingPanelTabs = () => {
|
|
|
1685
1919
|
return (
|
|
1686
1920
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
1687
1921
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
1688
|
-
/* @__PURE__ */
|
|
1922
|
+
/* @__PURE__ */ React59.createElement(Fragment7, { key: element.id }, /* @__PURE__ */ React59.createElement(Stack20, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React59.createElement(Tabs, { variant: "fullWidth", indicatorColor: "secondary", textColor: "inherit", ...getTabsProps() }, /* @__PURE__ */ React59.createElement(Tab, { label: __39("General", "elementor"), ...getTabProps("settings") }), /* @__PURE__ */ React59.createElement(Tab, { label: __39("Style", "elementor"), ...getTabProps("style") })), /* @__PURE__ */ React59.createElement(Divider8, null), /* @__PURE__ */ React59.createElement(TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React59.createElement(SettingsTab, null)), /* @__PURE__ */ React59.createElement(TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React59.createElement(StyleTab, null))))
|
|
1689
1923
|
);
|
|
1690
1924
|
};
|
|
1691
1925
|
|
|
@@ -1698,8 +1932,8 @@ var EditingPanel = () => {
|
|
|
1698
1932
|
if (!element || !elementType) {
|
|
1699
1933
|
return null;
|
|
1700
1934
|
}
|
|
1701
|
-
const panelTitle =
|
|
1702
|
-
return /* @__PURE__ */
|
|
1935
|
+
const panelTitle = __40("Edit %s", "elementor").replace("%s", elementType.title);
|
|
1936
|
+
return /* @__PURE__ */ React60.createElement(ErrorBoundary, { fallback: /* @__PURE__ */ React60.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React60.createElement(Panel, null, /* @__PURE__ */ React60.createElement(PanelHeader, null, /* @__PURE__ */ React60.createElement(PanelHeaderTitle, null, panelTitle)), /* @__PURE__ */ React60.createElement(PanelBody, null, /* @__PURE__ */ React60.createElement(ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React60.createElement(ControlReplacementProvider, { ...controlReplacement }, /* @__PURE__ */ React60.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React60.createElement(EditingPanelTabs, null)))))));
|
|
1703
1937
|
};
|
|
1704
1938
|
|
|
1705
1939
|
// src/panel.ts
|
|
@@ -1722,7 +1956,7 @@ var isAtomicWidgetSelected = () => {
|
|
|
1722
1956
|
// src/hooks/use-close-editor-panel.ts
|
|
1723
1957
|
var useCloseEditorPanel = () => {
|
|
1724
1958
|
const { close } = usePanelActions();
|
|
1725
|
-
return
|
|
1959
|
+
return useEffect3(() => {
|
|
1726
1960
|
return listenTo(commandStartEvent("document/elements/delete"), (e) => {
|
|
1727
1961
|
const selectedElement = getSelectedElements2()[0];
|
|
1728
1962
|
const { container: deletedContainer } = e?.args;
|
|
@@ -1735,11 +1969,11 @@ var useCloseEditorPanel = () => {
|
|
|
1735
1969
|
};
|
|
1736
1970
|
|
|
1737
1971
|
// src/hooks/use-open-editor-panel.ts
|
|
1738
|
-
import { useEffect as
|
|
1972
|
+
import { useEffect as useEffect4 } from "react";
|
|
1739
1973
|
import { __privateListenTo as listenTo2, commandStartEvent as commandStartEvent2 } from "@elementor/editor-v1-adapters";
|
|
1740
1974
|
var useOpenEditorPanel = () => {
|
|
1741
1975
|
const { open } = usePanelActions();
|
|
1742
|
-
|
|
1976
|
+
useEffect4(() => {
|
|
1743
1977
|
return listenTo2(commandStartEvent2("panel/editor/open"), () => {
|
|
1744
1978
|
if (isAtomicWidgetSelected()) {
|
|
1745
1979
|
open();
|
|
@@ -1756,19 +1990,19 @@ var EditingPanelHooks = () => {
|
|
|
1756
1990
|
};
|
|
1757
1991
|
|
|
1758
1992
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
1759
|
-
import * as
|
|
1993
|
+
import * as React63 from "react";
|
|
1760
1994
|
import { useId as useId3 } from "react";
|
|
1761
|
-
import { ControlLabel as
|
|
1995
|
+
import { ControlLabel as ControlLabel31, useBoundProp as useBoundProp3 } from "@elementor/editor-controls";
|
|
1762
1996
|
import { DatabaseIcon, SettingsIcon, XIcon as XIcon2 } from "@elementor/icons";
|
|
1763
1997
|
import {
|
|
1764
1998
|
bindPopover as bindPopover2,
|
|
1765
1999
|
bindTrigger,
|
|
1766
|
-
Box as
|
|
2000
|
+
Box as Box6,
|
|
1767
2001
|
Divider as Divider10,
|
|
1768
2002
|
IconButton as IconButton3,
|
|
1769
2003
|
Paper,
|
|
1770
2004
|
Popover as Popover2,
|
|
1771
|
-
Stack as
|
|
2005
|
+
Stack as Stack22,
|
|
1772
2006
|
Tab as Tab2,
|
|
1773
2007
|
TabPanel as TabPanel2,
|
|
1774
2008
|
Tabs as Tabs2,
|
|
@@ -1777,17 +2011,18 @@ import {
|
|
|
1777
2011
|
usePopupState as usePopupState2,
|
|
1778
2012
|
useTabs as useTabs2
|
|
1779
2013
|
} from "@elementor/ui";
|
|
1780
|
-
import { __ as
|
|
2014
|
+
import { __ as __42 } from "@wordpress/i18n";
|
|
1781
2015
|
|
|
1782
2016
|
// src/dynamics/dynamic-control.tsx
|
|
1783
|
-
import * as
|
|
2017
|
+
import * as React61 from "react";
|
|
1784
2018
|
import { BoundPropProvider as BoundPropProvider3, useBoundProp } from "@elementor/editor-controls";
|
|
2019
|
+
import { isTransformable as isTransformable2 } from "@elementor/editor-props";
|
|
1785
2020
|
|
|
1786
2021
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
1787
|
-
import { useMemo as
|
|
2022
|
+
import { useMemo as useMemo5 } from "react";
|
|
1788
2023
|
|
|
1789
2024
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
1790
|
-
import { useMemo as
|
|
2025
|
+
import { useMemo as useMemo4 } from "react";
|
|
1791
2026
|
|
|
1792
2027
|
// src/dynamics/sync/get-elementor-config.ts
|
|
1793
2028
|
var getElementorConfig2 = () => {
|
|
@@ -1808,7 +2043,11 @@ var getAtomicDynamicTags = () => {
|
|
|
1808
2043
|
};
|
|
1809
2044
|
|
|
1810
2045
|
// src/dynamics/utils.ts
|
|
1811
|
-
import {
|
|
2046
|
+
import {
|
|
2047
|
+
createPropUtils,
|
|
2048
|
+
isTransformable
|
|
2049
|
+
} from "@elementor/editor-props";
|
|
2050
|
+
import { z } from "@elementor/schema";
|
|
1812
2051
|
var DYNAMIC_PROP_TYPE_KEY = "dynamic";
|
|
1813
2052
|
var isDynamicPropType = (prop) => prop.key === DYNAMIC_PROP_TYPE_KEY;
|
|
1814
2053
|
var getDynamicPropType = (propType) => {
|
|
@@ -1821,6 +2060,13 @@ var isDynamicPropValue = (prop) => {
|
|
|
1821
2060
|
var supportsDynamic = (propType) => {
|
|
1822
2061
|
return !!getDynamicPropType(propType);
|
|
1823
2062
|
};
|
|
2063
|
+
var dynamicPropTypeUtil = createPropUtils(
|
|
2064
|
+
DYNAMIC_PROP_TYPE_KEY,
|
|
2065
|
+
z.strictObject({
|
|
2066
|
+
name: z.string(),
|
|
2067
|
+
settings: z.record(z.any()).optional()
|
|
2068
|
+
})
|
|
2069
|
+
);
|
|
1824
2070
|
|
|
1825
2071
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
1826
2072
|
var usePropDynamicTags = (propName) => {
|
|
@@ -1831,7 +2077,7 @@ var usePropDynamicTags = (propName) => {
|
|
|
1831
2077
|
const propDynamicType = getDynamicPropType(propType);
|
|
1832
2078
|
categories = propDynamicType?.settings.categories || [];
|
|
1833
2079
|
}
|
|
1834
|
-
return
|
|
2080
|
+
return useMemo4(() => getDynamicTagsByCategories(categories), [categories.join()]);
|
|
1835
2081
|
};
|
|
1836
2082
|
var getDynamicTagsByCategories = (categories) => {
|
|
1837
2083
|
const dynamicTags = getAtomicDynamicTags();
|
|
@@ -1847,13 +2093,13 @@ var getDynamicTagsByCategories = (categories) => {
|
|
|
1847
2093
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
1848
2094
|
var useDynamicTag = (propName, tagName) => {
|
|
1849
2095
|
const dynamicTags = usePropDynamicTags(propName);
|
|
1850
|
-
return
|
|
2096
|
+
return useMemo5(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
|
|
1851
2097
|
};
|
|
1852
2098
|
|
|
1853
2099
|
// src/dynamics/dynamic-control.tsx
|
|
1854
2100
|
var DynamicControl = ({ bind, children }) => {
|
|
1855
|
-
const { value, setValue, bind: propName } = useBoundProp();
|
|
1856
|
-
const { name = "", settings } = value
|
|
2101
|
+
const { value, setValue, bind: propName } = useBoundProp(dynamicPropTypeUtil);
|
|
2102
|
+
const { name = "", settings } = value ?? {};
|
|
1857
2103
|
const dynamicTag = useDynamicTag(propName, name);
|
|
1858
2104
|
if (!dynamicTag) {
|
|
1859
2105
|
throw new Error(`Dynamic tag ${name} not found`);
|
|
@@ -1862,70 +2108,69 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
1862
2108
|
const dynamicValue = settings?.[bind] ?? defaultValue;
|
|
1863
2109
|
const setDynamicValue = (newValue) => {
|
|
1864
2110
|
setValue({
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
[bind]: newValue
|
|
1871
|
-
}
|
|
2111
|
+
name,
|
|
2112
|
+
settings: {
|
|
2113
|
+
...settings,
|
|
2114
|
+
// The value inside the dynamic is not a transformable value, so we need to store the whole object.
|
|
2115
|
+
[bind]: isTransformable2(newValue) ? newValue.value : newValue
|
|
1872
2116
|
}
|
|
1873
2117
|
});
|
|
1874
2118
|
};
|
|
1875
|
-
return /* @__PURE__ */
|
|
2119
|
+
return /* @__PURE__ */ React61.createElement(BoundPropProvider3, { setValue: setDynamicValue, value: dynamicValue, bind }, children);
|
|
1876
2120
|
};
|
|
1877
2121
|
|
|
1878
2122
|
// src/dynamics/components/dynamic-selection.tsx
|
|
1879
|
-
import * as
|
|
1880
|
-
import { Fragment as
|
|
2123
|
+
import * as React62 from "react";
|
|
2124
|
+
import { Fragment as Fragment8, useState as useState7 } from "react";
|
|
1881
2125
|
import { useBoundProp as useBoundProp2 } from "@elementor/editor-controls";
|
|
1882
2126
|
import { PhotoIcon, SearchIcon } from "@elementor/icons";
|
|
1883
2127
|
import {
|
|
1884
|
-
Box as
|
|
2128
|
+
Box as Box5,
|
|
1885
2129
|
Divider as Divider9,
|
|
1886
2130
|
InputAdornment,
|
|
1887
2131
|
Link,
|
|
1888
2132
|
ListSubheader,
|
|
1889
2133
|
MenuItem,
|
|
1890
2134
|
MenuList,
|
|
1891
|
-
Stack as
|
|
2135
|
+
Stack as Stack21,
|
|
1892
2136
|
TextField as TextField2,
|
|
1893
2137
|
Typography as Typography3
|
|
1894
2138
|
} from "@elementor/ui";
|
|
1895
|
-
import { __ as
|
|
2139
|
+
import { __ as __41 } from "@wordpress/i18n";
|
|
1896
2140
|
var SIZE3 = "tiny";
|
|
1897
2141
|
var DynamicSelection = ({ onSelect }) => {
|
|
1898
|
-
const [searchValue, setSearchValue] =
|
|
2142
|
+
const [searchValue, setSearchValue] = useState7("");
|
|
1899
2143
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
1900
|
-
const {
|
|
2144
|
+
const { value: anyValue } = useBoundProp2();
|
|
2145
|
+
const { bind, value: dynamicvalue, setValue } = useBoundProp2(dynamicPropTypeUtil);
|
|
1901
2146
|
const { setPropValue: updatePropValueHistory } = usePropValueHistory();
|
|
1902
|
-
const isCurrentValueDynamic =
|
|
1903
|
-
const
|
|
2147
|
+
const isCurrentValueDynamic = !!dynamicvalue;
|
|
2148
|
+
const options10 = useFilteredOptions(bind, searchValue);
|
|
1904
2149
|
const handleSearch = (event) => {
|
|
1905
2150
|
setSearchValue(event.target.value);
|
|
1906
2151
|
};
|
|
1907
2152
|
const handleSetDynamicTag = (value) => {
|
|
1908
2153
|
if (!isCurrentValueDynamic) {
|
|
1909
|
-
updatePropValueHistory(bind,
|
|
2154
|
+
updatePropValueHistory(bind, anyValue);
|
|
1910
2155
|
}
|
|
1911
|
-
setValue({
|
|
2156
|
+
setValue({ name: value, settings: {} });
|
|
1912
2157
|
onSelect?.();
|
|
1913
2158
|
};
|
|
1914
|
-
return /* @__PURE__ */
|
|
2159
|
+
return /* @__PURE__ */ React62.createElement(Stack21, null, /* @__PURE__ */ React62.createElement(Box5, { px: 1.5, pb: 1 }, /* @__PURE__ */ React62.createElement(
|
|
1915
2160
|
TextField2,
|
|
1916
2161
|
{
|
|
1917
2162
|
fullWidth: true,
|
|
1918
2163
|
size: SIZE3,
|
|
1919
2164
|
value: searchValue,
|
|
1920
2165
|
onChange: handleSearch,
|
|
1921
|
-
placeholder:
|
|
2166
|
+
placeholder: __41("Search dynamic tag", "elementor"),
|
|
1922
2167
|
InputProps: {
|
|
1923
|
-
startAdornment: /* @__PURE__ */
|
|
2168
|
+
startAdornment: /* @__PURE__ */ React62.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React62.createElement(SearchIcon, { fontSize: SIZE3 }))
|
|
1924
2169
|
}
|
|
1925
2170
|
}
|
|
1926
|
-
)), /* @__PURE__ */
|
|
1927
|
-
const isSelected = isCurrentValueDynamic && value ===
|
|
1928
|
-
return /* @__PURE__ */
|
|
2171
|
+
)), /* @__PURE__ */ React62.createElement(Divider9, null), /* @__PURE__ */ React62.createElement(Box5, { sx: { overflowY: "auto", height: 260, width: 220 } }, options10.length > 0 ? /* @__PURE__ */ React62.createElement(MenuList, { role: "listbox", tabIndex: 0 }, options10.map(([category, items3], index) => /* @__PURE__ */ React62.createElement(Fragment8, { key: index }, /* @__PURE__ */ React62.createElement(ListSubheader, { sx: { typography: "caption", color: "text.tertiary" } }, dynamicGroups?.[category]?.title || category), items3.map(({ value, label: tagLabel }) => {
|
|
2172
|
+
const isSelected = isCurrentValueDynamic && value === dynamicvalue?.name;
|
|
2173
|
+
return /* @__PURE__ */ React62.createElement(
|
|
1929
2174
|
MenuItem,
|
|
1930
2175
|
{
|
|
1931
2176
|
key: value,
|
|
@@ -1936,7 +2181,7 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
1936
2181
|
},
|
|
1937
2182
|
tagLabel
|
|
1938
2183
|
);
|
|
1939
|
-
})))) : /* @__PURE__ */
|
|
2184
|
+
})))) : /* @__PURE__ */ React62.createElement(Stack21, { alignItems: "center", p: 2.5, gap: 1.5 }, /* @__PURE__ */ React62.createElement(PhotoIcon, { fontSize: "large" }), /* @__PURE__ */ React62.createElement(Typography3, { align: "center", variant: "caption", color: "text.secondary" }, __41("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React62.createElement("br", null), "\u201C", searchValue, "\u201D."), /* @__PURE__ */ React62.createElement(Typography3, { align: "center", variant: "caption", color: "text.secondary" }, /* @__PURE__ */ React62.createElement(
|
|
1940
2185
|
Link,
|
|
1941
2186
|
{
|
|
1942
2187
|
color: "secondary",
|
|
@@ -1944,12 +2189,12 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
1944
2189
|
component: "button",
|
|
1945
2190
|
onClick: () => setSearchValue("")
|
|
1946
2191
|
},
|
|
1947
|
-
|
|
1948
|
-
), "\xA0",
|
|
2192
|
+
__41("Clear the filters", "elementor")
|
|
2193
|
+
), "\xA0", __41("and try again.", "elementor")))));
|
|
1949
2194
|
};
|
|
1950
2195
|
var useFilteredOptions = (bind, searchValue) => {
|
|
1951
2196
|
const dynamicTags = usePropDynamicTags(bind);
|
|
1952
|
-
const
|
|
2197
|
+
const options10 = dynamicTags.reduce((categories, { name, label, group }) => {
|
|
1953
2198
|
const isVisible = label.toLowerCase().includes(searchValue.trim().toLowerCase());
|
|
1954
2199
|
if (!isVisible) {
|
|
1955
2200
|
return categories;
|
|
@@ -1960,44 +2205,45 @@ var useFilteredOptions = (bind, searchValue) => {
|
|
|
1960
2205
|
categories.get(group)?.push({ label, value: name });
|
|
1961
2206
|
return categories;
|
|
1962
2207
|
}, /* @__PURE__ */ new Map());
|
|
1963
|
-
return [...
|
|
2208
|
+
return [...options10];
|
|
1964
2209
|
};
|
|
1965
2210
|
|
|
1966
2211
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
1967
2212
|
var SIZE4 = "tiny";
|
|
1968
2213
|
var DynamicSelectionControl = () => {
|
|
1969
|
-
const {
|
|
2214
|
+
const { setValue: setAnyValue } = useBoundProp3();
|
|
2215
|
+
const { bind, value } = useBoundProp3(dynamicPropTypeUtil);
|
|
1970
2216
|
const { getPropValue: getPropValueFromHistory } = usePropValueHistory();
|
|
1971
|
-
const { name: tagName = "" } = value
|
|
2217
|
+
const { name: tagName = "" } = value;
|
|
1972
2218
|
const selectionPopoverId = useId3();
|
|
1973
2219
|
const selectionPopoverState = usePopupState2({ variant: "popover", popupId: selectionPopoverId });
|
|
1974
2220
|
const dynamicTag = useDynamicTag(bind, tagName);
|
|
1975
2221
|
const removeDynamicTag = () => {
|
|
1976
2222
|
const propValue = getPropValueFromHistory(bind);
|
|
1977
|
-
|
|
2223
|
+
setAnyValue(propValue ?? null);
|
|
1978
2224
|
};
|
|
1979
2225
|
if (!dynamicTag) {
|
|
1980
2226
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
1981
2227
|
}
|
|
1982
|
-
return /* @__PURE__ */
|
|
2228
|
+
return /* @__PURE__ */ React63.createElement(Box6, null, /* @__PURE__ */ React63.createElement(
|
|
1983
2229
|
Tag,
|
|
1984
2230
|
{
|
|
1985
2231
|
fullWidth: true,
|
|
1986
2232
|
showActionsOnHover: true,
|
|
1987
2233
|
label: dynamicTag.label,
|
|
1988
|
-
startIcon: /* @__PURE__ */
|
|
2234
|
+
startIcon: /* @__PURE__ */ React63.createElement(DatabaseIcon, { fontSize: SIZE4 }),
|
|
1989
2235
|
...bindTrigger(selectionPopoverState),
|
|
1990
|
-
actions: /* @__PURE__ */
|
|
2236
|
+
actions: /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React63.createElement(
|
|
1991
2237
|
IconButton3,
|
|
1992
2238
|
{
|
|
1993
2239
|
size: SIZE4,
|
|
1994
2240
|
onClick: removeDynamicTag,
|
|
1995
|
-
"aria-label":
|
|
2241
|
+
"aria-label": __42("Remove dynamic value", "elementor")
|
|
1996
2242
|
},
|
|
1997
|
-
/* @__PURE__ */
|
|
2243
|
+
/* @__PURE__ */ React63.createElement(XIcon2, { fontSize: SIZE4 })
|
|
1998
2244
|
))
|
|
1999
2245
|
}
|
|
2000
|
-
), /* @__PURE__ */
|
|
2246
|
+
), /* @__PURE__ */ React63.createElement(
|
|
2001
2247
|
Popover2,
|
|
2002
2248
|
{
|
|
2003
2249
|
disablePortal: true,
|
|
@@ -2005,7 +2251,7 @@ var DynamicSelectionControl = () => {
|
|
|
2005
2251
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
2006
2252
|
...bindPopover2(selectionPopoverState)
|
|
2007
2253
|
},
|
|
2008
|
-
/* @__PURE__ */
|
|
2254
|
+
/* @__PURE__ */ React63.createElement(Stack22, null, /* @__PURE__ */ React63.createElement(Stack22, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React63.createElement(DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React63.createElement(Typography4, { variant: "subtitle2" }, __42("Dynamic Tags", "elementor")), /* @__PURE__ */ React63.createElement(IconButton3, { size: SIZE4, sx: { ml: "auto" }, onClick: selectionPopoverState.close }, /* @__PURE__ */ React63.createElement(XIcon2, { fontSize: SIZE4 }))), /* @__PURE__ */ React63.createElement(DynamicSelection, { onSelect: selectionPopoverState.close }))
|
|
2009
2255
|
));
|
|
2010
2256
|
};
|
|
2011
2257
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
@@ -2015,22 +2261,22 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
2015
2261
|
if (!hasDynamicSettings) {
|
|
2016
2262
|
return null;
|
|
2017
2263
|
}
|
|
2018
|
-
return /* @__PURE__ */
|
|
2264
|
+
return /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(
|
|
2019
2265
|
IconButton3,
|
|
2020
2266
|
{
|
|
2021
2267
|
size: SIZE4,
|
|
2022
2268
|
...bindTrigger(settingsPopupState),
|
|
2023
|
-
"aria-label":
|
|
2269
|
+
"aria-label": __42("Settings", "elementor")
|
|
2024
2270
|
},
|
|
2025
|
-
/* @__PURE__ */
|
|
2026
|
-
), /* @__PURE__ */
|
|
2271
|
+
/* @__PURE__ */ React63.createElement(SettingsIcon, { fontSize: SIZE4 })
|
|
2272
|
+
), /* @__PURE__ */ React63.createElement(
|
|
2027
2273
|
Popover2,
|
|
2028
2274
|
{
|
|
2029
2275
|
disableScrollLock: true,
|
|
2030
2276
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
2031
2277
|
...bindPopover2(settingsPopupState)
|
|
2032
2278
|
},
|
|
2033
|
-
/* @__PURE__ */
|
|
2279
|
+
/* @__PURE__ */ React63.createElement(Paper, { component: Stack22, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React63.createElement(Stack22, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React63.createElement(DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React63.createElement(Typography4, { variant: "subtitle2" }, dynamicTag.label), /* @__PURE__ */ React63.createElement(IconButton3, { sx: { ml: "auto" }, size: SIZE4, onClick: settingsPopupState.close }, /* @__PURE__ */ React63.createElement(XIcon2, { fontSize: SIZE4 }))), /* @__PURE__ */ React63.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls }))
|
|
2034
2280
|
));
|
|
2035
2281
|
};
|
|
2036
2282
|
var DynamicSettings = ({ controls }) => {
|
|
@@ -2039,10 +2285,10 @@ var DynamicSettings = ({ controls }) => {
|
|
|
2039
2285
|
if (!tabs.length) {
|
|
2040
2286
|
return null;
|
|
2041
2287
|
}
|
|
2042
|
-
return /* @__PURE__ */
|
|
2043
|
-
return /* @__PURE__ */
|
|
2288
|
+
return /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(Tabs2, { indicatorColor: "secondary", textColor: "secondary", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React63.createElement(Tab2, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React63.createElement(Divider10, null), tabs.map(({ value }, index) => {
|
|
2289
|
+
return /* @__PURE__ */ React63.createElement(TabPanel2, { key: index, sx: { flexGrow: 1 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React63.createElement(Stack22, { gap: 1, px: 2 }, value.items.map((item) => {
|
|
2044
2290
|
if (item.type === "control") {
|
|
2045
|
-
return /* @__PURE__ */
|
|
2291
|
+
return /* @__PURE__ */ React63.createElement(Control3, { key: item.value.bind, control: item.value });
|
|
2046
2292
|
}
|
|
2047
2293
|
return null;
|
|
2048
2294
|
})));
|
|
@@ -2052,14 +2298,14 @@ var Control3 = ({ control }) => {
|
|
|
2052
2298
|
if (!getControlByType(control.type)) {
|
|
2053
2299
|
return null;
|
|
2054
2300
|
}
|
|
2055
|
-
return /* @__PURE__ */
|
|
2301
|
+
return /* @__PURE__ */ React63.createElement(DynamicControl, { bind: control.bind }, control.label ? /* @__PURE__ */ React63.createElement(ControlLabel31, null, control.label) : null, /* @__PURE__ */ React63.createElement(Control, { type: control.type, props: control.props }));
|
|
2056
2302
|
};
|
|
2057
2303
|
|
|
2058
2304
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
2059
|
-
import * as
|
|
2305
|
+
import * as React64 from "react";
|
|
2060
2306
|
import { useBoundProp as useBoundProp4 } from "@elementor/editor-controls";
|
|
2061
2307
|
import { DatabaseIcon as DatabaseIcon2 } from "@elementor/icons";
|
|
2062
|
-
import { __ as
|
|
2308
|
+
import { __ as __43 } from "@wordpress/i18n";
|
|
2063
2309
|
var usePropDynamicAction = () => {
|
|
2064
2310
|
const { bind } = useBoundProp4();
|
|
2065
2311
|
const { elementType } = useElement();
|
|
@@ -2068,8 +2314,8 @@ var usePropDynamicAction = () => {
|
|
|
2068
2314
|
return {
|
|
2069
2315
|
visible,
|
|
2070
2316
|
icon: DatabaseIcon2,
|
|
2071
|
-
title:
|
|
2072
|
-
popoverContent: ({ closePopover }) => /* @__PURE__ */
|
|
2317
|
+
title: __43("Dynamic Tags", "elementor"),
|
|
2318
|
+
popoverContent: ({ closePopover }) => /* @__PURE__ */ React64.createElement(DynamicSelection, { onSelect: closePopover })
|
|
2073
2319
|
};
|
|
2074
2320
|
};
|
|
2075
2321
|
|