@elementor/editor-editing-panel 1.23.0 → 1.27.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 +84 -0
- package/dist/index.js +603 -455
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +568 -425
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -9
- package/src/components/add-or-remove-content.tsx +1 -1
- package/src/components/{control-label-with-adornments.tsx → control-label.tsx} +3 -3
- package/src/components/css-classes/css-class-item.tsx +18 -7
- package/src/components/css-classes/css-class-menu.tsx +55 -9
- package/src/components/css-classes/css-class-selector.tsx +9 -8
- package/src/components/editing-panel-tabs.tsx +1 -1
- package/src/components/editing-panel.tsx +18 -15
- package/src/components/multi-combobox.tsx +12 -1
- package/src/components/settings-tab.tsx +2 -2
- package/src/components/style-indicator.tsx +23 -0
- package/src/components/style-sections/border-section/border-color-field.tsx +2 -1
- package/src/components/style-sections/border-section/border-radius-field.tsx +4 -5
- package/src/components/style-sections/border-section/border-style-field.tsx +2 -1
- package/src/components/style-sections/border-section/border-width-field.tsx +2 -3
- package/src/components/style-sections/layout-section/align-content-field.tsx +2 -1
- package/src/components/style-sections/layout-section/align-items-field.tsx +2 -1
- package/src/components/style-sections/layout-section/align-self-child-field.tsx +2 -1
- package/src/components/style-sections/layout-section/display-field.tsx +2 -1
- package/src/components/style-sections/layout-section/flex-direction-field.tsx +2 -1
- package/src/components/style-sections/layout-section/flex-order-field.tsx +20 -24
- package/src/components/style-sections/layout-section/flex-size-field.tsx +31 -19
- package/src/components/style-sections/layout-section/justify-content-field.tsx +5 -4
- package/src/components/style-sections/layout-section/layout-section.tsx +2 -2
- package/src/components/style-sections/layout-section/wrap-field.tsx +2 -1
- package/src/components/style-sections/position-section/dimensions-field.tsx +2 -1
- package/src/components/style-sections/position-section/position-field.tsx +2 -1
- package/src/components/style-sections/position-section/z-index-field.tsx +2 -1
- package/src/components/style-sections/size-section/overflow-field.tsx +2 -1
- package/src/components/style-sections/size-section/size-section.tsx +2 -1
- package/src/components/style-sections/typography-section/font-family-field.tsx +2 -1
- package/src/components/style-sections/typography-section/font-size-field.tsx +2 -1
- package/src/components/style-sections/typography-section/font-style-field.tsx +2 -2
- package/src/components/style-sections/typography-section/font-weight-field.tsx +2 -1
- package/src/components/style-sections/typography-section/letter-spacing-field.tsx +2 -1
- package/src/components/style-sections/typography-section/line-height-field.tsx +2 -1
- package/src/components/style-sections/typography-section/text-alignment-field.tsx +7 -7
- package/src/components/style-sections/typography-section/text-color-field.tsx +2 -1
- package/src/components/style-sections/typography-section/text-decoration-field.tsx +2 -1
- package/src/components/style-sections/typography-section/text-direction-field.tsx +2 -1
- package/src/components/style-sections/typography-section/text-stroke-field.tsx +9 -9
- package/src/components/style-sections/typography-section/transform-field.tsx +2 -1
- package/src/components/style-sections/typography-section/word-spacing-field.tsx +2 -1
- package/src/contexts/style-context.tsx +1 -1
- package/src/controls-registry/control-type-container.tsx +2 -2
- package/src/dynamics/components/dynamic-selection-control.tsx +2 -2
- package/src/dynamics/components/dynamic-selection.tsx +4 -4
- package/src/dynamics/dynamic-transformer.ts +61 -0
- package/src/dynamics/errors.ts +6 -0
- package/src/dynamics/init.ts +6 -0
- package/src/dynamics/types.ts +17 -0
- package/src/styles-inheritance/create-snapshots-manager.ts +8 -8
- package/src/styles-inheritance/create-styles-inheritance.ts +8 -4
- package/src/styles-inheritance/styles-inheritance-indicator.tsx +17 -34
- package/src/styles-inheritance/types.ts +7 -6
package/dist/index.mjs
CHANGED
|
@@ -10,14 +10,14 @@ import * as React7 from "react";
|
|
|
10
10
|
import { getElementSetting, updateElementSettings as updateElementSettings2, useElementSetting as useElementSetting2 } from "@elementor/editor-elements";
|
|
11
11
|
import { classesPropTypeUtil } from "@elementor/editor-props";
|
|
12
12
|
import {
|
|
13
|
-
ELEMENTS_STYLES_PROVIDER_KEY,
|
|
13
|
+
ELEMENTS_STYLES_PROVIDER_KEY as ELEMENTS_STYLES_PROVIDER_KEY2,
|
|
14
14
|
stylesRepository as stylesRepository4,
|
|
15
15
|
useCreateActionsByProvider,
|
|
16
16
|
useProviders
|
|
17
17
|
} from "@elementor/editor-styles-repository";
|
|
18
18
|
import { MapPinIcon } from "@elementor/icons";
|
|
19
19
|
import { createLocation } from "@elementor/locations";
|
|
20
|
-
import { Chip as Chip2, Stack as
|
|
20
|
+
import { Chip as Chip2, Stack as Stack3, Typography as Typography2 } from "@elementor/ui";
|
|
21
21
|
import { __ as __3 } from "@wordpress/i18n";
|
|
22
22
|
|
|
23
23
|
// src/contexts/classes-prop-context.tsx
|
|
@@ -130,7 +130,18 @@ function MultiCombobox({
|
|
|
130
130
|
value: selected,
|
|
131
131
|
options: options13,
|
|
132
132
|
renderGroup: (params) => /* @__PURE__ */ React4.createElement(Group, { ...params }),
|
|
133
|
-
renderInput: (params) => /* @__PURE__ */ React4.createElement(
|
|
133
|
+
renderInput: (params) => /* @__PURE__ */ React4.createElement(
|
|
134
|
+
TextField,
|
|
135
|
+
{
|
|
136
|
+
...params,
|
|
137
|
+
sx: (theme) => ({
|
|
138
|
+
".MuiAutocomplete-inputRoot.MuiInputBase-adornedStart": {
|
|
139
|
+
paddingLeft: theme.spacing(0.25),
|
|
140
|
+
paddingRight: theme.spacing(0.25)
|
|
141
|
+
}
|
|
142
|
+
})
|
|
143
|
+
}
|
|
144
|
+
),
|
|
134
145
|
onChange: (_, selectedOrInputValue, reason) => {
|
|
135
146
|
const inputValue = selectedOrInputValue.find((option) => typeof option === "string");
|
|
136
147
|
const optionsAndActions = selectedOrInputValue.filter((option) => typeof option !== "string");
|
|
@@ -225,7 +236,7 @@ import { DotsVerticalIcon } from "@elementor/icons";
|
|
|
225
236
|
import {
|
|
226
237
|
bindTrigger,
|
|
227
238
|
Chip,
|
|
228
|
-
Stack,
|
|
239
|
+
Stack as Stack2,
|
|
229
240
|
Typography,
|
|
230
241
|
UnstableChipGroup,
|
|
231
242
|
usePopupState
|
|
@@ -234,9 +245,9 @@ import { __ as __2 } from "@wordpress/i18n";
|
|
|
234
245
|
|
|
235
246
|
// src/components/css-classes/css-class-menu.tsx
|
|
236
247
|
import * as React5 from "react";
|
|
237
|
-
import { stylesRepository as stylesRepository2 } from "@elementor/editor-styles-repository";
|
|
248
|
+
import { ELEMENTS_STYLES_PROVIDER_KEY, stylesRepository as stylesRepository2 } from "@elementor/editor-styles-repository";
|
|
238
249
|
import { MenuListItem } from "@elementor/editor-ui";
|
|
239
|
-
import { bindMenu, Divider, Menu, MenuSubheader } from "@elementor/ui";
|
|
250
|
+
import { bindMenu, Divider, Menu, MenuSubheader, Stack } from "@elementor/ui";
|
|
240
251
|
import { __ } from "@wordpress/i18n";
|
|
241
252
|
|
|
242
253
|
// src/hooks/use-unapply-class.ts
|
|
@@ -261,16 +272,40 @@ var useUnapplyClass = (classId) => {
|
|
|
261
272
|
};
|
|
262
273
|
};
|
|
263
274
|
|
|
275
|
+
// src/components/style-indicator.tsx
|
|
276
|
+
import { styled as styled2 } from "@elementor/ui";
|
|
277
|
+
var StyleIndicator = styled2("div", {
|
|
278
|
+
shouldForwardProp: (prop) => prop !== "variant"
|
|
279
|
+
})`
|
|
280
|
+
width: 5px;
|
|
281
|
+
height: 5px;
|
|
282
|
+
border-radius: 50%;
|
|
283
|
+
background-color: ${({ theme, variant }) => {
|
|
284
|
+
switch (variant) {
|
|
285
|
+
case "overridden":
|
|
286
|
+
return theme.palette.warning.light;
|
|
287
|
+
case "global":
|
|
288
|
+
return theme.palette.global.dark;
|
|
289
|
+
case "local":
|
|
290
|
+
return theme.palette.accent.main;
|
|
291
|
+
default:
|
|
292
|
+
return theme.palette.text.disabled;
|
|
293
|
+
}
|
|
294
|
+
}};
|
|
295
|
+
`;
|
|
296
|
+
|
|
264
297
|
// src/components/css-classes/css-class-menu.tsx
|
|
265
298
|
var STATES = ["hover", "focus", "active"];
|
|
266
299
|
function CssClassMenu({ styleId, provider, popupState, handleRename, anchorEl }) {
|
|
300
|
+
const styledStates = useStyledStates(styleId);
|
|
301
|
+
const indicatorVariant = provider === ELEMENTS_STYLES_PROVIDER_KEY ? "local" : "global";
|
|
267
302
|
const handleKeyDown = (e) => {
|
|
268
303
|
e.stopPropagation();
|
|
269
304
|
};
|
|
270
305
|
return /* @__PURE__ */ React5.createElement(
|
|
271
306
|
Menu,
|
|
272
307
|
{
|
|
273
|
-
MenuListProps: { dense: true },
|
|
308
|
+
MenuListProps: { dense: true, sx: { minWidth: "160px" } },
|
|
274
309
|
...bindMenu(popupState),
|
|
275
310
|
anchorEl,
|
|
276
311
|
anchorOrigin: {
|
|
@@ -284,13 +319,40 @@ function CssClassMenu({ styleId, provider, popupState, handleRename, anchorEl })
|
|
|
284
319
|
onKeyDown: handleKeyDown
|
|
285
320
|
},
|
|
286
321
|
getMenuItemsByProvider({ provider, styleId, handleRename, closeMenu: popupState.close }),
|
|
287
|
-
/* @__PURE__ */ React5.createElement(MenuSubheader, { sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1 } }, __("
|
|
288
|
-
/* @__PURE__ */ React5.createElement(
|
|
322
|
+
/* @__PURE__ */ React5.createElement(MenuSubheader, { sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1 } }, __("States", "elementor")),
|
|
323
|
+
/* @__PURE__ */ React5.createElement(
|
|
324
|
+
StateMenuItem,
|
|
325
|
+
{
|
|
326
|
+
key: "normal",
|
|
327
|
+
state: null,
|
|
328
|
+
styleId,
|
|
329
|
+
closeMenu: popupState.close,
|
|
330
|
+
isStyled: styledStates.normal,
|
|
331
|
+
indicatorVariant
|
|
332
|
+
}
|
|
333
|
+
),
|
|
289
334
|
STATES.map((state) => {
|
|
290
|
-
return /* @__PURE__ */ React5.createElement(
|
|
335
|
+
return /* @__PURE__ */ React5.createElement(
|
|
336
|
+
StateMenuItem,
|
|
337
|
+
{
|
|
338
|
+
key: state,
|
|
339
|
+
state,
|
|
340
|
+
styleId,
|
|
341
|
+
closeMenu: popupState.close,
|
|
342
|
+
isStyled: styledStates[state],
|
|
343
|
+
indicatorVariant
|
|
344
|
+
}
|
|
345
|
+
);
|
|
291
346
|
})
|
|
292
347
|
);
|
|
293
348
|
}
|
|
349
|
+
function useStyledStates(styleId) {
|
|
350
|
+
const { meta } = useStyle();
|
|
351
|
+
const styleDef = stylesRepository2.all().find((style) => style.id === styleId);
|
|
352
|
+
return Object.fromEntries(
|
|
353
|
+
styleDef?.variants.filter((variant) => meta.breakpoint === variant.meta.breakpoint).map((variant) => [variant.meta.state ?? "normal", true]) ?? []
|
|
354
|
+
);
|
|
355
|
+
}
|
|
294
356
|
function getMenuItemsByProvider({
|
|
295
357
|
provider,
|
|
296
358
|
styleId,
|
|
@@ -313,7 +375,7 @@ function getMenuItemsByProvider({
|
|
|
313
375
|
MenuSubheader,
|
|
314
376
|
{
|
|
315
377
|
key: "provider-label",
|
|
316
|
-
sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1 }
|
|
378
|
+
sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1, textTransform: "capitalize" }
|
|
317
379
|
},
|
|
318
380
|
providerInstance?.labels?.singular
|
|
319
381
|
)
|
|
@@ -322,7 +384,14 @@ function getMenuItemsByProvider({
|
|
|
322
384
|
}
|
|
323
385
|
return actions;
|
|
324
386
|
}
|
|
325
|
-
function StateMenuItem({
|
|
387
|
+
function StateMenuItem({
|
|
388
|
+
state,
|
|
389
|
+
styleId,
|
|
390
|
+
closeMenu,
|
|
391
|
+
isStyled = false,
|
|
392
|
+
indicatorVariant,
|
|
393
|
+
...props
|
|
394
|
+
}) {
|
|
326
395
|
const { id: activeId, setId: setActiveId, setMetaState: setActiveMetaState, meta } = useStyle();
|
|
327
396
|
const { state: activeState } = meta;
|
|
328
397
|
const isActive = styleId === activeId;
|
|
@@ -341,7 +410,7 @@ function StateMenuItem({ state, styleId, closeMenu, ...props }) {
|
|
|
341
410
|
closeMenu();
|
|
342
411
|
}
|
|
343
412
|
},
|
|
344
|
-
|
|
413
|
+
/* @__PURE__ */ React5.createElement(Stack, { gap: 0.75, direction: "row", alignItems: "center" }, isStyled && /* @__PURE__ */ React5.createElement(StyleIndicator, { "aria-label": __("Has style", "elementor"), variant: indicatorVariant }), state ?? "normal")
|
|
345
414
|
);
|
|
346
415
|
}
|
|
347
416
|
function UnapplyClassMenuItem({ styleId, closeMenu, ...props }) {
|
|
@@ -408,52 +477,67 @@ function CssClassItem({
|
|
|
408
477
|
const providerActions = stylesRepository3.getProviderByKey(provider)?.actions;
|
|
409
478
|
const allowRename = Boolean(providerActions?.update);
|
|
410
479
|
const isShowingState = isActive && meta.state;
|
|
411
|
-
return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(
|
|
412
|
-
|
|
480
|
+
return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(
|
|
481
|
+
UnstableChipGroup,
|
|
413
482
|
{
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
483
|
+
ref: setChipRef,
|
|
484
|
+
...chipGroupProps,
|
|
485
|
+
"aria-label": `Edit ${label}`,
|
|
486
|
+
role: "group",
|
|
487
|
+
sx: (theme) => ({
|
|
488
|
+
"&.MuiChipGroup-root.MuiAutocomplete-tag": { margin: theme.spacing(0.125) }
|
|
489
|
+
})
|
|
490
|
+
},
|
|
491
|
+
/* @__PURE__ */ React6.createElement(
|
|
492
|
+
Chip,
|
|
493
|
+
{
|
|
494
|
+
size: CHIP_SIZE,
|
|
495
|
+
label: isEditing ? /* @__PURE__ */ React6.createElement(EditableField, { ref, error, ...getEditableProps() }) : /* @__PURE__ */ React6.createElement(EllipsisWithTooltip, { maxWidth: "10ch", title: label, as: "div" }),
|
|
496
|
+
variant: isActive && !meta.state && !isEditing ? "filled" : "standard",
|
|
497
|
+
shape: "rounded",
|
|
498
|
+
icon,
|
|
499
|
+
color,
|
|
500
|
+
onClick: () => {
|
|
501
|
+
if (isShowingState) {
|
|
502
|
+
setMetaState(null);
|
|
503
|
+
return;
|
|
504
|
+
}
|
|
505
|
+
if (allowRename && isActive) {
|
|
506
|
+
openEditMode();
|
|
507
|
+
return;
|
|
508
|
+
}
|
|
509
|
+
onClickActive(id);
|
|
510
|
+
},
|
|
511
|
+
"aria-pressed": isActive,
|
|
512
|
+
sx: (theme) => ({
|
|
513
|
+
cursor: isActive && allowRename && !isShowingState ? "text" : "pointer",
|
|
514
|
+
borderRadius: `${theme.shape.borderRadius * 0.75}px`,
|
|
515
|
+
"&.Mui-focusVisible": {
|
|
516
|
+
boxShadow: "none !important"
|
|
517
|
+
}
|
|
518
|
+
})
|
|
437
519
|
}
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
520
|
+
),
|
|
521
|
+
!isEditing && /* @__PURE__ */ React6.createElement(
|
|
522
|
+
Chip,
|
|
523
|
+
{
|
|
524
|
+
icon: isShowingState ? void 0 : /* @__PURE__ */ React6.createElement(DotsVerticalIcon, { fontSize: "tiny" }),
|
|
525
|
+
size: CHIP_SIZE,
|
|
526
|
+
label: isShowingState ? /* @__PURE__ */ React6.createElement(Stack2, { direction: "row", gap: 0.5, alignItems: "center" }, /* @__PURE__ */ React6.createElement(Typography, { variant: "inherit" }, meta.state), /* @__PURE__ */ React6.createElement(DotsVerticalIcon, { fontSize: "tiny" })) : void 0,
|
|
527
|
+
variant: "filled",
|
|
528
|
+
shape: "rounded",
|
|
529
|
+
color,
|
|
530
|
+
...bindTrigger(popupState),
|
|
531
|
+
"aria-label": __2("Open CSS Class Menu", "elementor"),
|
|
532
|
+
sx: (theme) => ({
|
|
533
|
+
borderRadius: `${theme.shape.borderRadius * 0.75}px`,
|
|
534
|
+
paddingRight: 0,
|
|
535
|
+
...!isShowingState ? { paddingLeft: 0 } : {},
|
|
536
|
+
".MuiChip-label": isShowingState ? { paddingRight: 0 } : { padding: 0 }
|
|
537
|
+
})
|
|
454
538
|
}
|
|
455
|
-
|
|
456
|
-
)
|
|
539
|
+
)
|
|
540
|
+
), /* @__PURE__ */ React6.createElement(
|
|
457
541
|
CssClassMenu,
|
|
458
542
|
{
|
|
459
543
|
styleId: id,
|
|
@@ -466,10 +550,10 @@ function CssClassItem({
|
|
|
466
550
|
}
|
|
467
551
|
var validateLabel = (newLabel) => {
|
|
468
552
|
if (!stylesRepository3.isLabelValid(newLabel)) {
|
|
469
|
-
return __2("
|
|
553
|
+
return __2("Invalid format", "elementor");
|
|
470
554
|
}
|
|
471
555
|
if (stylesRepository3.isLabelExist(newLabel)) {
|
|
472
|
-
return __2("
|
|
556
|
+
return __2("Name exists", "elementor");
|
|
473
557
|
}
|
|
474
558
|
return null;
|
|
475
559
|
};
|
|
@@ -481,9 +565,9 @@ var EMPTY_OPTION = {
|
|
|
481
565
|
label: __3("local", "elementor"),
|
|
482
566
|
value: null,
|
|
483
567
|
fixed: true,
|
|
484
|
-
color: "
|
|
568
|
+
color: "accent",
|
|
485
569
|
icon: /* @__PURE__ */ React7.createElement(MapPinIcon, null),
|
|
486
|
-
provider:
|
|
570
|
+
provider: ELEMENTS_STYLES_PROVIDER_KEY2
|
|
487
571
|
};
|
|
488
572
|
var { Slot: ClassSelectorActionsSlot, inject: injectIntoClassSelectorActions } = createLocation();
|
|
489
573
|
function CssClassSelector() {
|
|
@@ -494,7 +578,7 @@ function CssClassSelector() {
|
|
|
494
578
|
const handleApply = useHandleApply(appliedIds, setAppliedIds);
|
|
495
579
|
const applied = useAppliedOptions(options13, appliedIds);
|
|
496
580
|
const active = applied.find((option) => option.value === activeId) ?? EMPTY_OPTION;
|
|
497
|
-
return /* @__PURE__ */ React7.createElement(
|
|
581
|
+
return /* @__PURE__ */ React7.createElement(Stack3, { gap: 1, p: 2 }, /* @__PURE__ */ React7.createElement(Stack3, { direction: "row", gap: 1, alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React7.createElement(Typography2, { component: "label", variant: "caption", htmlFor: ID }, __3("Classes", "elementor")), /* @__PURE__ */ React7.createElement(Stack3, { direction: "row", gap: 1 }, /* @__PURE__ */ React7.createElement(ClassSelectorActionsSlot, null))), /* @__PURE__ */ React7.createElement(
|
|
498
582
|
MultiCombobox,
|
|
499
583
|
{
|
|
500
584
|
id: ID,
|
|
@@ -544,7 +628,7 @@ function useOptions() {
|
|
|
544
628
|
const { element } = useElement();
|
|
545
629
|
const isProviderEditable = (provider) => !!provider.actions.updateProps;
|
|
546
630
|
return useProviders().filter(isProviderEditable).flatMap((provider) => {
|
|
547
|
-
const isElements = provider.key ===
|
|
631
|
+
const isElements = provider.key === ELEMENTS_STYLES_PROVIDER_KEY2;
|
|
548
632
|
const styleDefs = provider.actions.get({ elementId: element.id });
|
|
549
633
|
if (isElements && styleDefs.length === 0) {
|
|
550
634
|
return [EMPTY_OPTION];
|
|
@@ -554,10 +638,11 @@ function useOptions() {
|
|
|
554
638
|
label: styleDef.label,
|
|
555
639
|
value: styleDef.id,
|
|
556
640
|
fixed: isElements,
|
|
557
|
-
color: isElements ? "
|
|
641
|
+
color: isElements ? "accent" : "global",
|
|
558
642
|
icon: isElements ? /* @__PURE__ */ React7.createElement(MapPinIcon, null) : null,
|
|
559
643
|
provider: provider.key,
|
|
560
|
-
|
|
644
|
+
// translators: %s is the plural label of the provider (e.g "Existing classes").
|
|
645
|
+
group: __3("Existing %s", "elementor").replace("%s", provider.labels?.plural ?? "")
|
|
561
646
|
};
|
|
562
647
|
});
|
|
563
648
|
});
|
|
@@ -569,9 +654,9 @@ function useCreateActions({
|
|
|
569
654
|
return useCreateActionsByProvider().map(([provider, create]) => {
|
|
570
655
|
return {
|
|
571
656
|
// translators: %s is the label of the new class.
|
|
572
|
-
label: (value) => __3('Create
|
|
573
|
-
// translators: %s is the singular label of css class provider (e.g "
|
|
574
|
-
group: __3("Create
|
|
657
|
+
label: (value) => __3('Create "%s"', "elementor").replace("%s", value),
|
|
658
|
+
// translators: %s is the singular label of css class provider (e.g "CSS Class").
|
|
659
|
+
group: __3("Create a new %s", "elementor").replace("%s", provider.labels?.singular ?? ""),
|
|
575
660
|
condition: (_, inputValue) => isLabelValid(inputValue) && !hasReachedLimit(provider),
|
|
576
661
|
apply: (label) => {
|
|
577
662
|
const createdId = create(label);
|
|
@@ -596,7 +681,7 @@ function isLabelValid(newLabel) {
|
|
|
596
681
|
function useAppliedOptions(options13, appliedIds) {
|
|
597
682
|
const applied = options13.filter((option) => option.value && appliedIds.includes(option.value));
|
|
598
683
|
const hasElementsProviderStyleApplied = applied.some(
|
|
599
|
-
(option) => option.provider ===
|
|
684
|
+
(option) => option.provider === ELEMENTS_STYLES_PROVIDER_KEY2
|
|
600
685
|
);
|
|
601
686
|
if (!hasElementsProviderStyleApplied) {
|
|
602
687
|
applied.unshift(EMPTY_OPTION);
|
|
@@ -650,10 +735,11 @@ function useHandleApply(appliedIds, setAppliedIds) {
|
|
|
650
735
|
import { __createPanel as createPanel } from "@elementor/editor-panels";
|
|
651
736
|
|
|
652
737
|
// src/components/editing-panel.tsx
|
|
653
|
-
import * as
|
|
738
|
+
import * as React67 from "react";
|
|
654
739
|
import { ControlActionsProvider, ControlReplacementProvider } from "@elementor/editor-controls";
|
|
655
740
|
import { useSelectedElement } from "@elementor/editor-elements";
|
|
656
741
|
import { Panel, PanelBody, PanelHeader, PanelHeaderTitle } from "@elementor/editor-panels";
|
|
742
|
+
import { ThemeProvider as ThemeProvider9 } from "@elementor/editor-ui";
|
|
657
743
|
import { AtomIcon } from "@elementor/icons";
|
|
658
744
|
import { SessionStorageProvider as SessionStorageProvider3 } from "@elementor/session";
|
|
659
745
|
import { ErrorBoundary } from "@elementor/ui";
|
|
@@ -666,7 +752,7 @@ import { createMenu } from "@elementor/menus";
|
|
|
666
752
|
import * as React8 from "react";
|
|
667
753
|
import { useId as useId2 } from "react";
|
|
668
754
|
import { XIcon } from "@elementor/icons";
|
|
669
|
-
import { bindPopover, bindToggle, IconButton, Popover, Stack as
|
|
755
|
+
import { bindPopover, bindToggle, IconButton, Popover, Stack as Stack4, Tooltip, Typography as Typography3, usePopupState as usePopupState2 } from "@elementor/ui";
|
|
670
756
|
var SIZE = "tiny";
|
|
671
757
|
function PopoverAction({
|
|
672
758
|
title,
|
|
@@ -693,7 +779,7 @@ function PopoverAction({
|
|
|
693
779
|
},
|
|
694
780
|
...bindPopover(popupState)
|
|
695
781
|
},
|
|
696
|
-
/* @__PURE__ */ React8.createElement(
|
|
782
|
+
/* @__PURE__ */ React8.createElement(Stack4, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React8.createElement(Icon, { fontSize: SIZE, sx: { mr: 0.5 } }), /* @__PURE__ */ React8.createElement(Typography3, { variant: "subtitle2" }, title), /* @__PURE__ */ React8.createElement(IconButton, { sx: { ml: "auto" }, size: SIZE, onClick: popupState.close }, /* @__PURE__ */ React8.createElement(XIcon, { fontSize: SIZE }))),
|
|
697
783
|
/* @__PURE__ */ React8.createElement(PopoverContent2, { closePopover: popupState.close })
|
|
698
784
|
));
|
|
699
785
|
}
|
|
@@ -713,14 +799,14 @@ function EditorPanelErrorFallback() {
|
|
|
713
799
|
}
|
|
714
800
|
|
|
715
801
|
// src/components/editing-panel-tabs.tsx
|
|
716
|
-
import * as
|
|
802
|
+
import * as React66 from "react";
|
|
717
803
|
import { Fragment as Fragment8 } from "react";
|
|
718
|
-
import { Divider as Divider5, Stack as
|
|
804
|
+
import { Divider as Divider5, Stack as Stack16, Tab, TabPanel, Tabs, useTabs } from "@elementor/ui";
|
|
719
805
|
import { __ as __44 } from "@wordpress/i18n";
|
|
720
806
|
|
|
721
807
|
// src/components/settings-tab.tsx
|
|
722
808
|
import * as React15 from "react";
|
|
723
|
-
import {
|
|
809
|
+
import { ControlFormLabel } from "@elementor/editor-controls";
|
|
724
810
|
import { SessionStorageProvider } from "@elementor/session";
|
|
725
811
|
|
|
726
812
|
// src/controls-registry/control.tsx
|
|
@@ -764,7 +850,7 @@ var Control = ({ props, type }) => {
|
|
|
764
850
|
|
|
765
851
|
// src/controls-registry/control-type-container.tsx
|
|
766
852
|
import * as React11 from "react";
|
|
767
|
-
import { Box as Box3, styled as
|
|
853
|
+
import { Box as Box3, styled as styled3 } from "@elementor/ui";
|
|
768
854
|
var ControlTypeContainer = ({
|
|
769
855
|
controlType,
|
|
770
856
|
children
|
|
@@ -772,7 +858,7 @@ var ControlTypeContainer = ({
|
|
|
772
858
|
const layout = getLayoutByType(controlType);
|
|
773
859
|
return /* @__PURE__ */ React11.createElement(StyledContainer, { layout }, children);
|
|
774
860
|
};
|
|
775
|
-
var StyledContainer =
|
|
861
|
+
var StyledContainer = styled3(Box3, {
|
|
776
862
|
shouldForwardProp: (prop) => !["layout"].includes(prop)
|
|
777
863
|
})(({ layout, theme }) => ({
|
|
778
864
|
display: "grid",
|
|
@@ -782,8 +868,8 @@ var StyledContainer = styled2(Box3, {
|
|
|
782
868
|
var getGridLayout = (layout) => ({
|
|
783
869
|
justifyContent: "space-between",
|
|
784
870
|
gridTemplateColumns: {
|
|
785
|
-
full: "1fr",
|
|
786
|
-
"two-columns": "repeat(2, 1fr)"
|
|
871
|
+
full: "minmax(0, 1fr)",
|
|
872
|
+
"two-columns": "repeat(2, minmax(0, 1fr))"
|
|
787
873
|
}[layout]
|
|
788
874
|
});
|
|
789
875
|
|
|
@@ -823,12 +909,12 @@ var SettingsField = ({ bind, children }) => {
|
|
|
823
909
|
// src/components/section.tsx
|
|
824
910
|
import * as React13 from "react";
|
|
825
911
|
import { useId as useId3, useState as useState3 } from "react";
|
|
826
|
-
import { Collapse, Divider as Divider2, ListItemButton, ListItemText, Stack as
|
|
912
|
+
import { Collapse, Divider as Divider2, ListItemButton, ListItemText, Stack as Stack5 } from "@elementor/ui";
|
|
827
913
|
|
|
828
914
|
// src/components/collapse-icon.tsx
|
|
829
915
|
import { ChevronDownIcon } from "@elementor/icons";
|
|
830
|
-
import { styled as
|
|
831
|
-
var CollapseIcon =
|
|
916
|
+
import { styled as styled4 } from "@elementor/ui";
|
|
917
|
+
var CollapseIcon = styled4(ChevronDownIcon, {
|
|
832
918
|
shouldForwardProp: (prop) => prop !== "open"
|
|
833
919
|
})(({ theme, open }) => ({
|
|
834
920
|
transform: open ? "rotate(180deg)" : "rotate(0deg)",
|
|
@@ -859,7 +945,7 @@ function Section({ title, children, defaultExpanded = false }) {
|
|
|
859
945
|
}
|
|
860
946
|
),
|
|
861
947
|
/* @__PURE__ */ React13.createElement(CollapseIcon, { open: isOpen, color: "secondary", fontSize: "tiny" })
|
|
862
|
-
), /* @__PURE__ */ React13.createElement(Collapse, { id: contentId, "aria-labelledby": labelId, in: isOpen, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React13.createElement(
|
|
948
|
+
), /* @__PURE__ */ React13.createElement(Collapse, { id: contentId, "aria-labelledby": labelId, in: isOpen, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React13.createElement(Stack5, { gap: 2.5, p: 2 }, children)), /* @__PURE__ */ React13.createElement(Divider2, null));
|
|
863
949
|
}
|
|
864
950
|
|
|
865
951
|
// src/components/sections-list.tsx
|
|
@@ -891,11 +977,11 @@ var Control2 = ({ control }) => {
|
|
|
891
977
|
if (!getControlByType(control.type)) {
|
|
892
978
|
return null;
|
|
893
979
|
}
|
|
894
|
-
return /* @__PURE__ */ React15.createElement(SettingsField, { bind: control.bind }, /* @__PURE__ */ React15.createElement(ControlTypeContainer, { controlType: control.type }, control.label ? /* @__PURE__ */ React15.createElement(
|
|
980
|
+
return /* @__PURE__ */ React15.createElement(SettingsField, { bind: control.bind }, /* @__PURE__ */ React15.createElement(ControlTypeContainer, { controlType: control.type }, control.label ? /* @__PURE__ */ React15.createElement(ControlFormLabel, null, control.label) : null, /* @__PURE__ */ React15.createElement(Control, { type: control.type, props: control.props })));
|
|
895
981
|
};
|
|
896
982
|
|
|
897
983
|
// src/components/style-tab.tsx
|
|
898
|
-
import * as
|
|
984
|
+
import * as React65 from "react";
|
|
899
985
|
import { useState as useState7 } from "react";
|
|
900
986
|
import { getElementStyles, useElementSetting as useElementSetting5 } from "@elementor/editor-elements";
|
|
901
987
|
import { CLASSES_PROP_KEY } from "@elementor/editor-props";
|
|
@@ -1005,16 +1091,16 @@ function buildStateSnapshotSlot(styles, parentBreakpoint, currentBreakpoint, sta
|
|
|
1005
1091
|
}
|
|
1006
1092
|
function buildInitialSnapshotFromStyles(styles) {
|
|
1007
1093
|
const snapshot = {};
|
|
1008
|
-
styles.forEach((
|
|
1094
|
+
styles.forEach((styleData) => {
|
|
1009
1095
|
const {
|
|
1010
|
-
|
|
1011
|
-
} =
|
|
1096
|
+
variant: { props }
|
|
1097
|
+
} = styleData;
|
|
1012
1098
|
Object.entries(props).forEach(([key, value]) => {
|
|
1013
1099
|
if (!snapshot[key]) {
|
|
1014
1100
|
snapshot[key] = [];
|
|
1015
1101
|
}
|
|
1016
1102
|
const snapshotPropValue = {
|
|
1017
|
-
...
|
|
1103
|
+
...styleData,
|
|
1018
1104
|
value
|
|
1019
1105
|
};
|
|
1020
1106
|
snapshot[key].push(snapshotPropValue);
|
|
@@ -1047,8 +1133,9 @@ function createStylesInheritance(styleDefs, breakpointsRoot) {
|
|
|
1047
1133
|
function buildStyleVariantsByMetaMapping(styleDefs) {
|
|
1048
1134
|
const breakpointStateSlots = {};
|
|
1049
1135
|
styleDefs.forEach((styleDef) => {
|
|
1050
|
-
styleDef.
|
|
1051
|
-
|
|
1136
|
+
const provider = getProviderByStyleId(styleDef.id)?.key ?? null;
|
|
1137
|
+
styleDef.variants.forEach((variant) => {
|
|
1138
|
+
const { meta } = variant;
|
|
1052
1139
|
const { state, breakpoint } = meta;
|
|
1053
1140
|
const breakpointKey = getBreakpointKey(breakpoint);
|
|
1054
1141
|
const stateKey = getStateKey(state);
|
|
@@ -1060,8 +1147,9 @@ function buildStyleVariantsByMetaMapping(styleDefs) {
|
|
|
1060
1147
|
breakpointNode[stateKey] = [];
|
|
1061
1148
|
}
|
|
1062
1149
|
breakpointNode[stateKey].push({
|
|
1063
|
-
|
|
1064
|
-
|
|
1150
|
+
style: styleDef,
|
|
1151
|
+
variant,
|
|
1152
|
+
provider
|
|
1065
1153
|
});
|
|
1066
1154
|
});
|
|
1067
1155
|
});
|
|
@@ -1262,57 +1350,40 @@ function useStylesField(propName) {
|
|
|
1262
1350
|
// src/styles-inheritance/styles-inheritance-indicator.tsx
|
|
1263
1351
|
import * as React17 from "react";
|
|
1264
1352
|
import { useBoundProp } from "@elementor/editor-controls";
|
|
1265
|
-
import { ELEMENTS_STYLES_PROVIDER_KEY as
|
|
1266
|
-
import { styled as styled4 } from "@elementor/ui";
|
|
1353
|
+
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY, ELEMENTS_STYLES_PROVIDER_KEY as ELEMENTS_STYLES_PROVIDER_KEY3 } from "@elementor/editor-styles-repository";
|
|
1267
1354
|
import { __ as __5 } from "@wordpress/i18n";
|
|
1268
|
-
var Circle = styled4("div", {
|
|
1269
|
-
shouldForwardProp: (prop) => prop !== "variant"
|
|
1270
|
-
})`
|
|
1271
|
-
width: 5px;
|
|
1272
|
-
height: 5px;
|
|
1273
|
-
border-radius: 50%;
|
|
1274
|
-
background-color: ${({ theme, variant }) => {
|
|
1275
|
-
switch (variant) {
|
|
1276
|
-
case "overridden":
|
|
1277
|
-
return theme.palette.warning.main;
|
|
1278
|
-
case "global-affects":
|
|
1279
|
-
return theme.palette.global.main;
|
|
1280
|
-
case "local-affects":
|
|
1281
|
-
return theme.palette.primary.main;
|
|
1282
|
-
default:
|
|
1283
|
-
return theme.palette.text.secondary;
|
|
1284
|
-
}
|
|
1285
|
-
}};
|
|
1286
|
-
`;
|
|
1287
1355
|
var StylesInheritanceIndicator = () => {
|
|
1288
|
-
const {
|
|
1356
|
+
const { value, path } = useBoundProp();
|
|
1289
1357
|
const { id: currentStyleId, provider: currentStyleProvider, meta: currentStyleMeta } = useStyle();
|
|
1290
|
-
const [
|
|
1358
|
+
const [bind] = path;
|
|
1291
1359
|
const inheritanceChain = useStylesInheritanceField(bind);
|
|
1292
1360
|
if (!inheritanceChain.length) {
|
|
1293
1361
|
return null;
|
|
1294
1362
|
}
|
|
1295
|
-
const [{
|
|
1296
|
-
|
|
1297
|
-
|
|
1363
|
+
const [{ style, variant, provider }] = inheritanceChain;
|
|
1364
|
+
if (provider === ELEMENTS_BASE_STYLES_PROVIDER_KEY) {
|
|
1365
|
+
return null;
|
|
1366
|
+
}
|
|
1367
|
+
const { breakpoint, state } = variant.meta;
|
|
1368
|
+
if (style.id === currentStyleId && breakpoint === currentStyleMeta.breakpoint && state === currentStyleMeta.state) {
|
|
1298
1369
|
return /* @__PURE__ */ React17.createElement(
|
|
1299
|
-
|
|
1370
|
+
StyleIndicator,
|
|
1300
1371
|
{
|
|
1301
1372
|
"aria-label": __5("This is the final value", "elementor"),
|
|
1302
|
-
variant: currentStyleProvider?.key ===
|
|
1373
|
+
variant: currentStyleProvider?.key === ELEMENTS_STYLES_PROVIDER_KEY3 ? "local" : "global"
|
|
1303
1374
|
}
|
|
1304
1375
|
);
|
|
1305
1376
|
}
|
|
1306
1377
|
if (value !== null && value !== void 0) {
|
|
1307
1378
|
return /* @__PURE__ */ React17.createElement(
|
|
1308
|
-
|
|
1379
|
+
StyleIndicator,
|
|
1309
1380
|
{
|
|
1310
1381
|
"aria-label": __5("This value is overridden by another style", "elementor"),
|
|
1311
1382
|
variant: "overridden"
|
|
1312
1383
|
}
|
|
1313
1384
|
);
|
|
1314
1385
|
}
|
|
1315
|
-
return /* @__PURE__ */ React17.createElement(
|
|
1386
|
+
return /* @__PURE__ */ React17.createElement(StyleIndicator, { "aria-label": __5("This has value from another style", "elementor") });
|
|
1316
1387
|
};
|
|
1317
1388
|
|
|
1318
1389
|
// src/controls-registry/styles-field.tsx
|
|
@@ -1353,22 +1424,31 @@ var PanelDivider = () => /* @__PURE__ */ React20.createElement(Divider3, { sx: {
|
|
|
1353
1424
|
|
|
1354
1425
|
// src/components/section-content.tsx
|
|
1355
1426
|
import * as React21 from "react";
|
|
1356
|
-
import { Stack as
|
|
1357
|
-
var SectionContent = ({ gap = 2, sx, children }) => /* @__PURE__ */ React21.createElement(
|
|
1427
|
+
import { Stack as Stack6 } from "@elementor/ui";
|
|
1428
|
+
var SectionContent = ({ gap = 2, sx, children }) => /* @__PURE__ */ React21.createElement(Stack6, { gap, sx: { ...sx } }, children);
|
|
1358
1429
|
|
|
1359
1430
|
// src/components/style-sections/border-section/border-field.tsx
|
|
1360
1431
|
import * as React27 from "react";
|
|
1361
1432
|
import { __ as __9 } from "@wordpress/i18n";
|
|
1362
1433
|
|
|
1363
1434
|
// src/components/add-or-remove-content.tsx
|
|
1364
|
-
import * as
|
|
1365
|
-
import { ControlLabel as ControlLabel2 } from "@elementor/editor-controls";
|
|
1435
|
+
import * as React23 from "react";
|
|
1366
1436
|
import { MinusIcon, PlusIcon } from "@elementor/icons";
|
|
1367
|
-
import { Collapse as Collapse2, IconButton as IconButton2, Stack as
|
|
1437
|
+
import { Collapse as Collapse2, IconButton as IconButton2, Stack as Stack8 } from "@elementor/ui";
|
|
1438
|
+
|
|
1439
|
+
// src/components/control-label.tsx
|
|
1440
|
+
import * as React22 from "react";
|
|
1441
|
+
import { ControlAdornments, ControlFormLabel as ControlFormLabel2 } from "@elementor/editor-controls";
|
|
1442
|
+
import { Stack as Stack7 } from "@elementor/ui";
|
|
1443
|
+
var ControlLabel = ({ children }) => {
|
|
1444
|
+
return /* @__PURE__ */ React22.createElement(Stack7, { direction: "row", alignItems: "center", justifyItems: "start", gap: 1 }, /* @__PURE__ */ React22.createElement(ControlFormLabel2, null, children), /* @__PURE__ */ React22.createElement(ControlAdornments, null));
|
|
1445
|
+
};
|
|
1446
|
+
|
|
1447
|
+
// src/components/add-or-remove-content.tsx
|
|
1368
1448
|
var SIZE2 = "tiny";
|
|
1369
1449
|
var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
|
|
1370
|
-
return /* @__PURE__ */
|
|
1371
|
-
|
|
1450
|
+
return /* @__PURE__ */ React23.createElement(SectionContent, null, /* @__PURE__ */ React23.createElement(
|
|
1451
|
+
Stack8,
|
|
1372
1452
|
{
|
|
1373
1453
|
direction: "row",
|
|
1374
1454
|
sx: {
|
|
@@ -1376,23 +1456,23 @@ var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
|
|
|
1376
1456
|
alignItems: "center"
|
|
1377
1457
|
}
|
|
1378
1458
|
},
|
|
1379
|
-
/* @__PURE__ */
|
|
1380
|
-
isAdded ? /* @__PURE__ */
|
|
1381
|
-
), /* @__PURE__ */
|
|
1459
|
+
/* @__PURE__ */ React23.createElement(ControlLabel, null, label),
|
|
1460
|
+
isAdded ? /* @__PURE__ */ React23.createElement(IconButton2, { size: SIZE2, onClick: onRemove, "aria-label": "Remove" }, /* @__PURE__ */ React23.createElement(MinusIcon, { fontSize: SIZE2 })) : /* @__PURE__ */ React23.createElement(IconButton2, { size: SIZE2, onClick: onAdd, "aria-label": "Add" }, /* @__PURE__ */ React23.createElement(PlusIcon, { fontSize: SIZE2 }))
|
|
1461
|
+
), /* @__PURE__ */ React23.createElement(Collapse2, { in: isAdded, unmountOnExit: true }, /* @__PURE__ */ React23.createElement(SectionContent, null, children)));
|
|
1382
1462
|
};
|
|
1383
1463
|
|
|
1384
1464
|
// src/components/style-sections/border-section/border-color-field.tsx
|
|
1385
|
-
import * as
|
|
1386
|
-
import { ColorControl
|
|
1465
|
+
import * as React24 from "react";
|
|
1466
|
+
import { ColorControl } from "@elementor/editor-controls";
|
|
1387
1467
|
import { Grid } from "@elementor/ui";
|
|
1388
1468
|
import { __ as __6 } from "@wordpress/i18n";
|
|
1389
1469
|
var BorderColorField = () => {
|
|
1390
|
-
return /* @__PURE__ */
|
|
1470
|
+
return /* @__PURE__ */ React24.createElement(StylesField, { bind: "border-color" }, /* @__PURE__ */ React24.createElement(Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React24.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React24.createElement(ControlLabel, null, __6("Border color", "elementor"))), /* @__PURE__ */ React24.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React24.createElement(ColorControl, null))));
|
|
1391
1471
|
};
|
|
1392
1472
|
|
|
1393
1473
|
// src/components/style-sections/border-section/border-style-field.tsx
|
|
1394
|
-
import * as
|
|
1395
|
-
import {
|
|
1474
|
+
import * as React25 from "react";
|
|
1475
|
+
import { SelectControl as SelectControl2 } from "@elementor/editor-controls";
|
|
1396
1476
|
import { Grid as Grid2 } from "@elementor/ui";
|
|
1397
1477
|
import { __ as __7 } from "@wordpress/i18n";
|
|
1398
1478
|
var borderStyles = [
|
|
@@ -1407,7 +1487,7 @@ var borderStyles = [
|
|
|
1407
1487
|
{ value: "outset", label: __7("Outset", "elementor") }
|
|
1408
1488
|
];
|
|
1409
1489
|
var BorderStyleField = () => {
|
|
1410
|
-
return /* @__PURE__ */
|
|
1490
|
+
return /* @__PURE__ */ React25.createElement(StylesField, { bind: "border-style" }, /* @__PURE__ */ React25.createElement(Grid2, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React25.createElement(Grid2, { item: true, xs: 6 }, /* @__PURE__ */ React25.createElement(ControlLabel, null, __7("Border type", "elementor"))), /* @__PURE__ */ React25.createElement(Grid2, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React25.createElement(SelectControl2, { options: borderStyles }))));
|
|
1411
1491
|
};
|
|
1412
1492
|
|
|
1413
1493
|
// src/components/style-sections/border-section/border-width-field.tsx
|
|
@@ -1426,49 +1506,6 @@ function useDirection() {
|
|
|
1426
1506
|
return { isSiteRtl, isUiRtl };
|
|
1427
1507
|
}
|
|
1428
1508
|
|
|
1429
|
-
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
1430
|
-
import * as React25 from "react";
|
|
1431
|
-
import { useRef } from "react";
|
|
1432
|
-
import { useTheme as useTheme2 } from "@elementor/ui";
|
|
1433
|
-
var CLOCKWISE_ANGLES = {
|
|
1434
|
-
row: 0,
|
|
1435
|
-
column: 90,
|
|
1436
|
-
"row-reverse": 180,
|
|
1437
|
-
"column-reverse": 270
|
|
1438
|
-
};
|
|
1439
|
-
var COUNTER_CLOCKWISE_ANGLES = {
|
|
1440
|
-
row: 0,
|
|
1441
|
-
column: -90,
|
|
1442
|
-
"row-reverse": -180,
|
|
1443
|
-
"column-reverse": -270
|
|
1444
|
-
};
|
|
1445
|
-
var RotatedIcon = ({
|
|
1446
|
-
icon: Icon,
|
|
1447
|
-
size,
|
|
1448
|
-
isClockwise = true,
|
|
1449
|
-
offset = 0,
|
|
1450
|
-
disableRotationForReversed = false
|
|
1451
|
-
}) => {
|
|
1452
|
-
const rotate = useRef(useGetTargetAngle(isClockwise, offset, disableRotationForReversed));
|
|
1453
|
-
rotate.current = useGetTargetAngle(isClockwise, offset, disableRotationForReversed, rotate);
|
|
1454
|
-
return /* @__PURE__ */ React25.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
1455
|
-
};
|
|
1456
|
-
var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existingRef) => {
|
|
1457
|
-
const [direction] = useStylesField("flex-direction");
|
|
1458
|
-
const isRtl = "rtl" === useTheme2().direction;
|
|
1459
|
-
const rotationMultiplier = isRtl ? -1 : 1;
|
|
1460
|
-
const angleMap = isClockwise ? CLOCKWISE_ANGLES : COUNTER_CLOCKWISE_ANGLES;
|
|
1461
|
-
const currentDirection = direction?.value || "row";
|
|
1462
|
-
const currentAngle = existingRef ? existingRef.current * rotationMultiplier : angleMap[currentDirection] + offset;
|
|
1463
|
-
const targetAngle = angleMap[currentDirection] + offset;
|
|
1464
|
-
const diffToTargetAngle = (targetAngle - currentAngle + 360) % 360;
|
|
1465
|
-
const formattedDiff = (diffToTargetAngle + 180) % 360 - 180;
|
|
1466
|
-
if (disableRotationForReversed && ["row-reverse", "column-reverse"].includes(currentDirection)) {
|
|
1467
|
-
return 0;
|
|
1468
|
-
}
|
|
1469
|
-
return (currentAngle + formattedDiff) * rotationMultiplier;
|
|
1470
|
-
};
|
|
1471
|
-
|
|
1472
1509
|
// src/components/style-sections/border-section/border-width-field.tsx
|
|
1473
1510
|
var InlineStartIcon = withDirection(SideRightIcon);
|
|
1474
1511
|
var InlineEndIcon = withDirection(SideLeftIcon);
|
|
@@ -1480,7 +1517,7 @@ var getEdges = (isSiteRtl) => [
|
|
|
1480
1517
|
},
|
|
1481
1518
|
{
|
|
1482
1519
|
label: isSiteRtl ? __8("Left", "elementor") : __8("Right", "elementor"),
|
|
1483
|
-
icon: /* @__PURE__ */ React26.createElement(
|
|
1520
|
+
icon: /* @__PURE__ */ React26.createElement(InlineStartIcon, { fontSize: "tiny" }),
|
|
1484
1521
|
bind: "inline-end"
|
|
1485
1522
|
},
|
|
1486
1523
|
{
|
|
@@ -1490,7 +1527,7 @@ var getEdges = (isSiteRtl) => [
|
|
|
1490
1527
|
},
|
|
1491
1528
|
{
|
|
1492
1529
|
label: isSiteRtl ? __8("Right", "elementor") : __8("Left", "elementor"),
|
|
1493
|
-
icon: /* @__PURE__ */ React26.createElement(
|
|
1530
|
+
icon: /* @__PURE__ */ React26.createElement(InlineEndIcon, { fontSize: "tiny" }),
|
|
1494
1531
|
bind: "inline-start"
|
|
1495
1532
|
}
|
|
1496
1533
|
];
|
|
@@ -1565,22 +1602,22 @@ var getEndEndLabel = (isSiteRtl) => isSiteRtl ? __10("Bottom left", "elementor")
|
|
|
1565
1602
|
var getCorners = (isSiteRtl) => [
|
|
1566
1603
|
{
|
|
1567
1604
|
label: getStartStartLabel(isSiteRtl),
|
|
1568
|
-
icon: /* @__PURE__ */ React28.createElement(
|
|
1605
|
+
icon: /* @__PURE__ */ React28.createElement(StartStartIcon, { fontSize: "tiny" }),
|
|
1569
1606
|
bind: "start-start"
|
|
1570
1607
|
},
|
|
1571
1608
|
{
|
|
1572
1609
|
label: getStartEndLabel(isSiteRtl),
|
|
1573
|
-
icon: /* @__PURE__ */ React28.createElement(
|
|
1610
|
+
icon: /* @__PURE__ */ React28.createElement(StartEndIcon, { fontSize: "tiny" }),
|
|
1574
1611
|
bind: "start-end"
|
|
1575
1612
|
},
|
|
1576
1613
|
{
|
|
1577
1614
|
label: getEndStartLabel(isSiteRtl),
|
|
1578
|
-
icon: /* @__PURE__ */ React28.createElement(
|
|
1615
|
+
icon: /* @__PURE__ */ React28.createElement(EndStartIcon, { fontSize: "tiny" }),
|
|
1579
1616
|
bind: "end-start"
|
|
1580
1617
|
},
|
|
1581
1618
|
{
|
|
1582
1619
|
label: getEndEndLabel(isSiteRtl),
|
|
1583
|
-
icon: /* @__PURE__ */ React28.createElement(
|
|
1620
|
+
icon: /* @__PURE__ */ React28.createElement(EndEndIcon, { fontSize: "tiny" }),
|
|
1584
1621
|
bind: "end-end"
|
|
1585
1622
|
}
|
|
1586
1623
|
];
|
|
@@ -1609,8 +1646,8 @@ var EffectsSection = () => {
|
|
|
1609
1646
|
};
|
|
1610
1647
|
|
|
1611
1648
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
1612
|
-
import * as
|
|
1613
|
-
import {
|
|
1649
|
+
import * as React42 from "react";
|
|
1650
|
+
import { ControlFormLabel as ControlFormLabel3 } from "@elementor/editor-controls";
|
|
1614
1651
|
import { useParentElement } from "@elementor/editor-elements";
|
|
1615
1652
|
import { __ as __21 } from "@wordpress/i18n";
|
|
1616
1653
|
|
|
@@ -1640,8 +1677,8 @@ function useComputedStyle(elementId) {
|
|
|
1640
1677
|
}
|
|
1641
1678
|
|
|
1642
1679
|
// src/components/style-sections/layout-section/align-content-field.tsx
|
|
1643
|
-
import * as
|
|
1644
|
-
import {
|
|
1680
|
+
import * as React32 from "react";
|
|
1681
|
+
import { ToggleControl } from "@elementor/editor-controls";
|
|
1645
1682
|
import {
|
|
1646
1683
|
JustifyBottomIcon,
|
|
1647
1684
|
JustifyCenterIcon as CenterIcon,
|
|
@@ -1650,8 +1687,53 @@ import {
|
|
|
1650
1687
|
JustifySpaceBetweenVerticalIcon as BetweenIcon,
|
|
1651
1688
|
JustifyTopIcon
|
|
1652
1689
|
} from "@elementor/icons";
|
|
1653
|
-
import { DirectionProvider, Stack as
|
|
1690
|
+
import { DirectionProvider, Stack as Stack9, ThemeProvider, withDirection as withDirection3 } from "@elementor/ui";
|
|
1654
1691
|
import { __ as __11 } from "@wordpress/i18n";
|
|
1692
|
+
|
|
1693
|
+
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
1694
|
+
import * as React31 from "react";
|
|
1695
|
+
import { useRef } from "react";
|
|
1696
|
+
import { useTheme as useTheme2 } from "@elementor/ui";
|
|
1697
|
+
var CLOCKWISE_ANGLES = {
|
|
1698
|
+
row: 0,
|
|
1699
|
+
column: 90,
|
|
1700
|
+
"row-reverse": 180,
|
|
1701
|
+
"column-reverse": 270
|
|
1702
|
+
};
|
|
1703
|
+
var COUNTER_CLOCKWISE_ANGLES = {
|
|
1704
|
+
row: 0,
|
|
1705
|
+
column: -90,
|
|
1706
|
+
"row-reverse": -180,
|
|
1707
|
+
"column-reverse": -270
|
|
1708
|
+
};
|
|
1709
|
+
var RotatedIcon = ({
|
|
1710
|
+
icon: Icon,
|
|
1711
|
+
size,
|
|
1712
|
+
isClockwise = true,
|
|
1713
|
+
offset = 0,
|
|
1714
|
+
disableRotationForReversed = false
|
|
1715
|
+
}) => {
|
|
1716
|
+
const rotate = useRef(useGetTargetAngle(isClockwise, offset, disableRotationForReversed));
|
|
1717
|
+
rotate.current = useGetTargetAngle(isClockwise, offset, disableRotationForReversed, rotate);
|
|
1718
|
+
return /* @__PURE__ */ React31.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
1719
|
+
};
|
|
1720
|
+
var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existingRef) => {
|
|
1721
|
+
const [direction] = useStylesField("flex-direction");
|
|
1722
|
+
const isRtl = "rtl" === useTheme2().direction;
|
|
1723
|
+
const rotationMultiplier = isRtl ? -1 : 1;
|
|
1724
|
+
const angleMap = isClockwise ? CLOCKWISE_ANGLES : COUNTER_CLOCKWISE_ANGLES;
|
|
1725
|
+
const currentDirection = direction?.value || "row";
|
|
1726
|
+
const currentAngle = existingRef ? existingRef.current * rotationMultiplier : angleMap[currentDirection] + offset;
|
|
1727
|
+
const targetAngle = angleMap[currentDirection] + offset;
|
|
1728
|
+
const diffToTargetAngle = (targetAngle - currentAngle + 360) % 360;
|
|
1729
|
+
const formattedDiff = (diffToTargetAngle + 180) % 360 - 180;
|
|
1730
|
+
if (disableRotationForReversed && ["row-reverse", "column-reverse"].includes(currentDirection)) {
|
|
1731
|
+
return 0;
|
|
1732
|
+
}
|
|
1733
|
+
return (currentAngle + formattedDiff) * rotationMultiplier;
|
|
1734
|
+
};
|
|
1735
|
+
|
|
1736
|
+
// src/components/style-sections/layout-section/align-content-field.tsx
|
|
1655
1737
|
var StartIcon = withDirection3(JustifyTopIcon);
|
|
1656
1738
|
var EndIcon = withDirection3(JustifyBottomIcon);
|
|
1657
1739
|
var iconProps = {
|
|
@@ -1663,48 +1745,48 @@ var options = [
|
|
|
1663
1745
|
{
|
|
1664
1746
|
value: "start",
|
|
1665
1747
|
label: __11("Start", "elementor"),
|
|
1666
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1748
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(RotatedIcon, { icon: StartIcon, size, ...iconProps }),
|
|
1667
1749
|
showTooltip: true
|
|
1668
1750
|
},
|
|
1669
1751
|
{
|
|
1670
1752
|
value: "center",
|
|
1671
1753
|
label: __11("Center", "elementor"),
|
|
1672
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1754
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(RotatedIcon, { icon: CenterIcon, size, ...iconProps }),
|
|
1673
1755
|
showTooltip: true
|
|
1674
1756
|
},
|
|
1675
1757
|
{
|
|
1676
1758
|
value: "end",
|
|
1677
1759
|
label: __11("End", "elementor"),
|
|
1678
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1760
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(RotatedIcon, { icon: EndIcon, size, ...iconProps }),
|
|
1679
1761
|
showTooltip: true
|
|
1680
1762
|
},
|
|
1681
1763
|
{
|
|
1682
1764
|
value: "space-between",
|
|
1683
1765
|
label: __11("Space between", "elementor"),
|
|
1684
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1766
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(RotatedIcon, { icon: BetweenIcon, size, ...iconProps }),
|
|
1685
1767
|
showTooltip: true
|
|
1686
1768
|
},
|
|
1687
1769
|
{
|
|
1688
1770
|
value: "space-around",
|
|
1689
1771
|
label: __11("Space around", "elementor"),
|
|
1690
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1772
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(RotatedIcon, { icon: AroundIcon, size, ...iconProps }),
|
|
1691
1773
|
showTooltip: true
|
|
1692
1774
|
},
|
|
1693
1775
|
{
|
|
1694
1776
|
value: "space-evenly",
|
|
1695
1777
|
label: __11("Space evenly", "elementor"),
|
|
1696
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1778
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(RotatedIcon, { icon: EvenlyIcon, size, ...iconProps }),
|
|
1697
1779
|
showTooltip: true
|
|
1698
1780
|
}
|
|
1699
1781
|
];
|
|
1700
1782
|
var AlignContentField = () => {
|
|
1701
1783
|
const { isSiteRtl } = useDirection();
|
|
1702
|
-
return /* @__PURE__ */
|
|
1784
|
+
return /* @__PURE__ */ React32.createElement(DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React32.createElement(ThemeProvider, null, /* @__PURE__ */ React32.createElement(StylesField, { bind: "align-content" }, /* @__PURE__ */ React32.createElement(Stack9, { gap: 1 }, /* @__PURE__ */ React32.createElement(ControlLabel, null, __11("Align content", "elementor")), /* @__PURE__ */ React32.createElement(ToggleControl, { options, fullWidth: true })))));
|
|
1703
1785
|
};
|
|
1704
1786
|
|
|
1705
1787
|
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
1706
|
-
import * as
|
|
1707
|
-
import {
|
|
1788
|
+
import * as React33 from "react";
|
|
1789
|
+
import { ToggleControl as ToggleControl2 } from "@elementor/editor-controls";
|
|
1708
1790
|
import {
|
|
1709
1791
|
LayoutAlignCenterIcon as CenterIcon2,
|
|
1710
1792
|
LayoutAlignLeftIcon,
|
|
@@ -1723,36 +1805,36 @@ var options2 = [
|
|
|
1723
1805
|
{
|
|
1724
1806
|
value: "start",
|
|
1725
1807
|
label: __12("Start", "elementor"),
|
|
1726
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1808
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: StartIcon2, size, ...iconProps2 }),
|
|
1727
1809
|
showTooltip: true
|
|
1728
1810
|
},
|
|
1729
1811
|
{
|
|
1730
1812
|
value: "center",
|
|
1731
1813
|
label: __12("Center", "elementor"),
|
|
1732
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1814
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: CenterIcon2, size, ...iconProps2 }),
|
|
1733
1815
|
showTooltip: true
|
|
1734
1816
|
},
|
|
1735
1817
|
{
|
|
1736
1818
|
value: "end",
|
|
1737
1819
|
label: __12("End", "elementor"),
|
|
1738
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1820
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: EndIcon2, size, ...iconProps2 }),
|
|
1739
1821
|
showTooltip: true
|
|
1740
1822
|
},
|
|
1741
1823
|
{
|
|
1742
1824
|
value: "stretch",
|
|
1743
1825
|
label: __12("Stretch", "elementor"),
|
|
1744
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1826
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: JustifyIcon, size, ...iconProps2 }),
|
|
1745
1827
|
showTooltip: true
|
|
1746
1828
|
}
|
|
1747
1829
|
];
|
|
1748
1830
|
var AlignItemsField = () => {
|
|
1749
1831
|
const { isSiteRtl } = useDirection();
|
|
1750
|
-
return /* @__PURE__ */
|
|
1832
|
+
return /* @__PURE__ */ React33.createElement(DirectionProvider2, { rtl: isSiteRtl }, /* @__PURE__ */ React33.createElement(ThemeProvider2, null, /* @__PURE__ */ React33.createElement(StylesField, { bind: "align-items" }, /* @__PURE__ */ React33.createElement(Grid3, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React33.createElement(Grid3, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(ControlLabel, null, __12("Align items", "elementor"))), /* @__PURE__ */ React33.createElement(Grid3, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React33.createElement(ToggleControl2, { options: options2 }))))));
|
|
1751
1833
|
};
|
|
1752
1834
|
|
|
1753
1835
|
// src/components/style-sections/layout-section/align-self-child-field.tsx
|
|
1754
|
-
import * as
|
|
1755
|
-
import {
|
|
1836
|
+
import * as React34 from "react";
|
|
1837
|
+
import { ToggleControl as ToggleControl3 } from "@elementor/editor-controls";
|
|
1756
1838
|
import {
|
|
1757
1839
|
LayoutAlignCenterIcon as CenterIcon3,
|
|
1758
1840
|
LayoutAlignLeftIcon as LayoutAlignLeftIcon2,
|
|
@@ -1771,37 +1853,37 @@ var options3 = [
|
|
|
1771
1853
|
{
|
|
1772
1854
|
value: "start",
|
|
1773
1855
|
label: __13("Start", "elementor"),
|
|
1774
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1856
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: StartIcon3, size, ...iconProps3 }),
|
|
1775
1857
|
showTooltip: true
|
|
1776
1858
|
},
|
|
1777
1859
|
{
|
|
1778
1860
|
value: "center",
|
|
1779
1861
|
label: __13("Center", "elementor"),
|
|
1780
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1862
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: CenterIcon3, size, ...iconProps3 }),
|
|
1781
1863
|
showTooltip: true
|
|
1782
1864
|
},
|
|
1783
1865
|
{
|
|
1784
1866
|
value: "end",
|
|
1785
1867
|
label: __13("End", "elementor"),
|
|
1786
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1868
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: EndIcon3, size, ...iconProps3 }),
|
|
1787
1869
|
showTooltip: true
|
|
1788
1870
|
},
|
|
1789
1871
|
{
|
|
1790
1872
|
value: "stretch",
|
|
1791
1873
|
label: __13("Stretch", "elementor"),
|
|
1792
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1874
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: JustifyIcon2, size, ...iconProps3 }),
|
|
1793
1875
|
showTooltip: true
|
|
1794
1876
|
}
|
|
1795
1877
|
];
|
|
1796
1878
|
var AlignSelfChild = () => {
|
|
1797
1879
|
const { isSiteRtl } = useDirection();
|
|
1798
|
-
return /* @__PURE__ */
|
|
1880
|
+
return /* @__PURE__ */ React34.createElement(DirectionProvider3, { rtl: isSiteRtl }, /* @__PURE__ */ React34.createElement(ThemeProvider3, null, /* @__PURE__ */ React34.createElement(StylesField, { bind: "align-self" }, /* @__PURE__ */ React34.createElement(Grid4, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React34.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React34.createElement(ControlLabel, null, __13("Align self", "elementor"))), /* @__PURE__ */ React34.createElement(Grid4, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React34.createElement(ToggleControl3, { options: options3 }))))));
|
|
1799
1881
|
};
|
|
1800
1882
|
|
|
1801
1883
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
1802
|
-
import * as
|
|
1803
|
-
import {
|
|
1804
|
-
import { Stack as
|
|
1884
|
+
import * as React35 from "react";
|
|
1885
|
+
import { ToggleControl as ToggleControl4 } from "@elementor/editor-controls";
|
|
1886
|
+
import { Stack as Stack10 } from "@elementor/ui";
|
|
1805
1887
|
import { __ as __14 } from "@wordpress/i18n";
|
|
1806
1888
|
var DisplayField = () => {
|
|
1807
1889
|
const options13 = [
|
|
@@ -1830,12 +1912,12 @@ var DisplayField = () => {
|
|
|
1830
1912
|
showTooltip: true
|
|
1831
1913
|
}
|
|
1832
1914
|
];
|
|
1833
|
-
return /* @__PURE__ */
|
|
1915
|
+
return /* @__PURE__ */ React35.createElement(StylesField, { bind: "display" }, /* @__PURE__ */ React35.createElement(Stack10, { gap: 0.75 }, /* @__PURE__ */ React35.createElement(ControlLabel, null, __14("Display", "elementor")), /* @__PURE__ */ React35.createElement(ToggleControl4, { options: options13, fullWidth: true })));
|
|
1834
1916
|
};
|
|
1835
1917
|
|
|
1836
1918
|
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
1837
|
-
import * as
|
|
1838
|
-
import {
|
|
1919
|
+
import * as React36 from "react";
|
|
1920
|
+
import { ToggleControl as ToggleControl5 } from "@elementor/editor-controls";
|
|
1839
1921
|
import { ArrowDownSmallIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpSmallIcon } from "@elementor/icons";
|
|
1840
1922
|
import { DirectionProvider as DirectionProvider4, Grid as Grid5, ThemeProvider as ThemeProvider4, withDirection as withDirection6 } from "@elementor/ui";
|
|
1841
1923
|
import { __ as __15 } from "@wordpress/i18n";
|
|
@@ -1844,46 +1926,42 @@ var options4 = [
|
|
|
1844
1926
|
value: "row",
|
|
1845
1927
|
label: __15("Row", "elementor"),
|
|
1846
1928
|
renderContent: ({ size }) => {
|
|
1847
|
-
const
|
|
1848
|
-
return /* @__PURE__ */
|
|
1929
|
+
const StartIcon5 = withDirection6(ArrowRightIcon);
|
|
1930
|
+
return /* @__PURE__ */ React36.createElement(StartIcon5, { fontSize: size });
|
|
1849
1931
|
},
|
|
1850
1932
|
showTooltip: true
|
|
1851
1933
|
},
|
|
1852
1934
|
{
|
|
1853
1935
|
value: "column",
|
|
1854
1936
|
label: __15("Column", "elementor"),
|
|
1855
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1937
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(ArrowDownSmallIcon, { fontSize: size }),
|
|
1856
1938
|
showTooltip: true
|
|
1857
1939
|
},
|
|
1858
1940
|
{
|
|
1859
1941
|
value: "row-reverse",
|
|
1860
1942
|
label: __15("Reversed row", "elementor"),
|
|
1861
1943
|
renderContent: ({ size }) => {
|
|
1862
|
-
const
|
|
1863
|
-
return /* @__PURE__ */
|
|
1944
|
+
const EndIcon5 = withDirection6(ArrowLeftIcon);
|
|
1945
|
+
return /* @__PURE__ */ React36.createElement(EndIcon5, { fontSize: size });
|
|
1864
1946
|
},
|
|
1865
1947
|
showTooltip: true
|
|
1866
1948
|
},
|
|
1867
1949
|
{
|
|
1868
1950
|
value: "column-reverse",
|
|
1869
1951
|
label: __15("Reversed column", "elementor"),
|
|
1870
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1952
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(ArrowUpSmallIcon, { fontSize: size }),
|
|
1871
1953
|
showTooltip: true
|
|
1872
1954
|
}
|
|
1873
1955
|
];
|
|
1874
1956
|
var FlexDirectionField = () => {
|
|
1875
1957
|
const { isSiteRtl } = useDirection();
|
|
1876
|
-
return /* @__PURE__ */
|
|
1958
|
+
return /* @__PURE__ */ React36.createElement(DirectionProvider4, { rtl: isSiteRtl }, /* @__PURE__ */ React36.createElement(ThemeProvider4, null, /* @__PURE__ */ React36.createElement(StylesField, { bind: "flex-direction" }, /* @__PURE__ */ React36.createElement(Grid5, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React36.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React36.createElement(ControlLabel, null, __15("Direction", "elementor"))), /* @__PURE__ */ React36.createElement(Grid5, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React36.createElement(ToggleControl5, { options: options4 }))))));
|
|
1877
1959
|
};
|
|
1878
1960
|
|
|
1879
1961
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
1880
|
-
import * as
|
|
1962
|
+
import * as React37 from "react";
|
|
1881
1963
|
import { useState as useState4 } from "react";
|
|
1882
|
-
import {
|
|
1883
|
-
ControlLabel as ControlLabel10,
|
|
1884
|
-
ControlToggleButtonGroup,
|
|
1885
|
-
NumberControl
|
|
1886
|
-
} from "@elementor/editor-controls";
|
|
1964
|
+
import { ControlToggleButtonGroup, NumberControl } from "@elementor/editor-controls";
|
|
1887
1965
|
import { ArrowDownSmallIcon as ArrowDownSmallIcon2, ArrowUpSmallIcon as ArrowUpSmallIcon2, PencilIcon } from "@elementor/icons";
|
|
1888
1966
|
import { DirectionProvider as DirectionProvider5, Grid as Grid6, ThemeProvider as ThemeProvider5 } from "@elementor/ui";
|
|
1889
1967
|
import { __ as __16 } from "@wordpress/i18n";
|
|
@@ -1900,19 +1978,19 @@ var items = [
|
|
|
1900
1978
|
{
|
|
1901
1979
|
value: FIRST,
|
|
1902
1980
|
label: __16("First", "elementor"),
|
|
1903
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1981
|
+
renderContent: ({ size }) => /* @__PURE__ */ React37.createElement(ArrowUpSmallIcon2, { fontSize: size }),
|
|
1904
1982
|
showTooltip: true
|
|
1905
1983
|
},
|
|
1906
1984
|
{
|
|
1907
1985
|
value: LAST,
|
|
1908
1986
|
label: __16("Last", "elementor"),
|
|
1909
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1987
|
+
renderContent: ({ size }) => /* @__PURE__ */ React37.createElement(ArrowDownSmallIcon2, { fontSize: size }),
|
|
1910
1988
|
showTooltip: true
|
|
1911
1989
|
},
|
|
1912
1990
|
{
|
|
1913
1991
|
value: CUSTOM,
|
|
1914
1992
|
label: __16("Custom", "elementor"),
|
|
1915
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1993
|
+
renderContent: ({ size }) => /* @__PURE__ */ React37.createElement(PencilIcon, { fontSize: size }),
|
|
1916
1994
|
showTooltip: true
|
|
1917
1995
|
}
|
|
1918
1996
|
];
|
|
@@ -1927,7 +2005,7 @@ var FlexOrderField = () => {
|
|
|
1927
2005
|
}
|
|
1928
2006
|
setOrder({ $$type: "number", value: orderValueMap[group] });
|
|
1929
2007
|
};
|
|
1930
|
-
return /* @__PURE__ */
|
|
2008
|
+
return /* @__PURE__ */ React37.createElement(DirectionProvider5, { rtl: isSiteRtl }, /* @__PURE__ */ React37.createElement(ThemeProvider5, null, /* @__PURE__ */ React37.createElement(StylesField, { bind: "order" }, /* @__PURE__ */ React37.createElement(SectionContent, null, /* @__PURE__ */ React37.createElement(Grid6, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(Grid6, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(ControlLabel, null, __16("Order", "elementor"))), /* @__PURE__ */ React37.createElement(Grid6, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React37.createElement(
|
|
1931
2009
|
ControlToggleButtonGroup,
|
|
1932
2010
|
{
|
|
1933
2011
|
items,
|
|
@@ -1935,7 +2013,7 @@ var FlexOrderField = () => {
|
|
|
1935
2013
|
onChange: handleToggleButtonChange,
|
|
1936
2014
|
exclusive: true
|
|
1937
2015
|
}
|
|
1938
|
-
))), CUSTOM === groupControlValue && /* @__PURE__ */
|
|
2016
|
+
))), CUSTOM === groupControlValue && /* @__PURE__ */ React37.createElement(Grid6, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(Grid6, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(ControlLabel, null, __16("Custom order", "elementor"))), /* @__PURE__ */ React37.createElement(Grid6, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React37.createElement(
|
|
1939
2017
|
NumberControl,
|
|
1940
2018
|
{
|
|
1941
2019
|
min: FIRST_DEFAULT_VALUE + 1,
|
|
@@ -1955,14 +2033,14 @@ var getGroupControlValue = (order) => {
|
|
|
1955
2033
|
};
|
|
1956
2034
|
|
|
1957
2035
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
1958
|
-
import * as
|
|
2036
|
+
import * as React38 from "react";
|
|
1959
2037
|
import { useMemo as useMemo2, useState as useState5 } from "react";
|
|
1960
2038
|
import {
|
|
1961
|
-
ControlLabel as ControlLabel11,
|
|
1962
2039
|
ControlToggleButtonGroup as ControlToggleButtonGroup2,
|
|
1963
2040
|
NumberControl as NumberControl2,
|
|
1964
2041
|
SizeControl as SizeControl2
|
|
1965
2042
|
} from "@elementor/editor-controls";
|
|
2043
|
+
import { numberPropTypeUtil } from "@elementor/editor-props";
|
|
1966
2044
|
import { ExpandIcon, PencilIcon as PencilIcon2, ShrinkIcon } from "@elementor/icons";
|
|
1967
2045
|
import { DirectionProvider as DirectionProvider6, Grid as Grid7, ThemeProvider as ThemeProvider6 } from "@elementor/ui";
|
|
1968
2046
|
import { __ as __17 } from "@wordpress/i18n";
|
|
@@ -1971,43 +2049,54 @@ var items2 = [
|
|
|
1971
2049
|
{
|
|
1972
2050
|
value: "flex-grow",
|
|
1973
2051
|
label: __17("Grow", "elementor"),
|
|
1974
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2052
|
+
renderContent: ({ size }) => /* @__PURE__ */ React38.createElement(ExpandIcon, { fontSize: size }),
|
|
1975
2053
|
showTooltip: true
|
|
1976
2054
|
},
|
|
1977
2055
|
{
|
|
1978
2056
|
value: "flex-shrink",
|
|
1979
2057
|
label: __17("Shrink", "elementor"),
|
|
1980
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2058
|
+
renderContent: ({ size }) => /* @__PURE__ */ React38.createElement(ShrinkIcon, { fontSize: size }),
|
|
1981
2059
|
showTooltip: true
|
|
1982
2060
|
},
|
|
1983
2061
|
{
|
|
1984
2062
|
value: "custom",
|
|
1985
2063
|
label: __17("Custom", "elementor"),
|
|
1986
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2064
|
+
renderContent: ({ size }) => /* @__PURE__ */ React38.createElement(PencilIcon2, { fontSize: size }),
|
|
1987
2065
|
showTooltip: true
|
|
1988
2066
|
}
|
|
1989
2067
|
];
|
|
1990
2068
|
var FlexSizeField = () => {
|
|
1991
|
-
const { isSiteRtl } = useDirection()
|
|
1992
|
-
const
|
|
2069
|
+
const { isSiteRtl } = useDirection();
|
|
2070
|
+
const [fields, setFields] = useStylesFields(["flex-grow", "flex-shrink", "flex-basis"]);
|
|
2071
|
+
const grow = fields?.["flex-grow"]?.value || null;
|
|
2072
|
+
const shrink = fields?.["flex-shrink"]?.value || null;
|
|
2073
|
+
const basis = fields?.["flex-basis"]?.value || null;
|
|
1993
2074
|
const currentGroup = useMemo2(() => getActiveGroup({ grow, shrink, basis }), [grow, shrink, basis]), [activeGroup, setActiveGroup] = useState5(currentGroup);
|
|
1994
2075
|
const onChangeGroup = (group = null) => {
|
|
1995
2076
|
setActiveGroup(group);
|
|
1996
|
-
setBasisField(null);
|
|
1997
2077
|
if (!group || group === "custom") {
|
|
1998
|
-
|
|
1999
|
-
|
|
2078
|
+
setFields({
|
|
2079
|
+
"flex-basis": null,
|
|
2080
|
+
"flex-grow": null,
|
|
2081
|
+
"flex-shrink": null
|
|
2082
|
+
});
|
|
2000
2083
|
return;
|
|
2001
2084
|
}
|
|
2002
2085
|
if (group === "flex-grow") {
|
|
2003
|
-
|
|
2004
|
-
|
|
2086
|
+
setFields({
|
|
2087
|
+
"flex-basis": null,
|
|
2088
|
+
"flex-grow": numberPropTypeUtil.create(DEFAULT),
|
|
2089
|
+
"flex-shrink": null
|
|
2090
|
+
});
|
|
2005
2091
|
return;
|
|
2006
2092
|
}
|
|
2007
|
-
|
|
2008
|
-
|
|
2093
|
+
setFields({
|
|
2094
|
+
"flex-basis": null,
|
|
2095
|
+
"flex-grow": null,
|
|
2096
|
+
"flex-shrink": numberPropTypeUtil.create(DEFAULT)
|
|
2097
|
+
});
|
|
2009
2098
|
};
|
|
2010
|
-
return /* @__PURE__ */
|
|
2099
|
+
return /* @__PURE__ */ React38.createElement(DirectionProvider6, { rtl: isSiteRtl }, /* @__PURE__ */ React38.createElement(ThemeProvider6, null, /* @__PURE__ */ React38.createElement(SectionContent, null, /* @__PURE__ */ React38.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React38.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(StylesField, { bind: activeGroup ?? "" }, /* @__PURE__ */ React38.createElement(ControlLabel, null, __17("Size", "elementor")))), /* @__PURE__ */ React38.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React38.createElement(
|
|
2011
2100
|
ControlToggleButtonGroup2,
|
|
2012
2101
|
{
|
|
2013
2102
|
value: activeGroup,
|
|
@@ -2015,9 +2104,9 @@ var FlexSizeField = () => {
|
|
|
2015
2104
|
items: items2,
|
|
2016
2105
|
exclusive: true
|
|
2017
2106
|
}
|
|
2018
|
-
))), "custom" === activeGroup && /* @__PURE__ */
|
|
2107
|
+
))), "custom" === activeGroup && /* @__PURE__ */ React38.createElement(FlexCustomField, null))));
|
|
2019
2108
|
};
|
|
2020
|
-
var FlexCustomField = () => /* @__PURE__ */
|
|
2109
|
+
var FlexCustomField = () => /* @__PURE__ */ React38.createElement(React38.Fragment, null, /* @__PURE__ */ React38.createElement(StylesField, { bind: "flex-grow" }, /* @__PURE__ */ React38.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React38.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(ControlLabel, null, __17("Grow", "elementor"))), /* @__PURE__ */ React38.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React38.createElement(NumberControl2, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React38.createElement(StylesField, { bind: "flex-shrink" }, /* @__PURE__ */ React38.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React38.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(ControlLabel, null, __17("Shrink", "elementor"))), /* @__PURE__ */ React38.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React38.createElement(NumberControl2, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React38.createElement(StylesField, { bind: "flex-basis" }, /* @__PURE__ */ React38.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React38.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(ControlLabel, null, __17("Basis", "elementor"))), /* @__PURE__ */ React38.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React38.createElement(SizeControl2, { extendedValues: ["auto"] })))));
|
|
2021
2110
|
var getActiveGroup = ({
|
|
2022
2111
|
grow,
|
|
2023
2112
|
shrink,
|
|
@@ -2039,17 +2128,17 @@ var getActiveGroup = ({
|
|
|
2039
2128
|
};
|
|
2040
2129
|
|
|
2041
2130
|
// src/components/style-sections/layout-section/gap-control-field.tsx
|
|
2042
|
-
import * as
|
|
2131
|
+
import * as React39 from "react";
|
|
2043
2132
|
import { GapControl } from "@elementor/editor-controls";
|
|
2044
|
-
import { Stack as
|
|
2133
|
+
import { Stack as Stack11 } from "@elementor/ui";
|
|
2045
2134
|
import { __ as __18 } from "@wordpress/i18n";
|
|
2046
2135
|
var GapControlField = () => {
|
|
2047
|
-
return /* @__PURE__ */
|
|
2136
|
+
return /* @__PURE__ */ React39.createElement(Stack11, { gap: 1 }, /* @__PURE__ */ React39.createElement(StylesField, { bind: "gap" }, /* @__PURE__ */ React39.createElement(GapControl, { label: __18("Gaps", "elementor") })));
|
|
2048
2137
|
};
|
|
2049
2138
|
|
|
2050
2139
|
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
2051
|
-
import * as
|
|
2052
|
-
import {
|
|
2140
|
+
import * as React40 from "react";
|
|
2141
|
+
import { ToggleControl as ToggleControl6 } from "@elementor/editor-controls";
|
|
2053
2142
|
import {
|
|
2054
2143
|
JustifyBottomIcon as JustifyBottomIcon2,
|
|
2055
2144
|
JustifyCenterIcon as CenterIcon4,
|
|
@@ -2058,7 +2147,7 @@ import {
|
|
|
2058
2147
|
JustifySpaceBetweenVerticalIcon as BetweenIcon2,
|
|
2059
2148
|
JustifyTopIcon as JustifyTopIcon2
|
|
2060
2149
|
} from "@elementor/icons";
|
|
2061
|
-
import { DirectionProvider as DirectionProvider7, Stack as
|
|
2150
|
+
import { DirectionProvider as DirectionProvider7, Stack as Stack12, ThemeProvider as ThemeProvider7, withDirection as withDirection7 } from "@elementor/ui";
|
|
2062
2151
|
import { __ as __19 } from "@wordpress/i18n";
|
|
2063
2152
|
var StartIcon4 = withDirection7(JustifyTopIcon2);
|
|
2064
2153
|
var EndIcon4 = withDirection7(JustifyBottomIcon2);
|
|
@@ -2068,50 +2157,50 @@ var iconProps4 = {
|
|
|
2068
2157
|
};
|
|
2069
2158
|
var options5 = [
|
|
2070
2159
|
{
|
|
2071
|
-
value: "start",
|
|
2160
|
+
value: "flex-start",
|
|
2072
2161
|
label: __19("Start", "elementor"),
|
|
2073
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2162
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(RotatedIcon, { icon: StartIcon4, size, ...iconProps4 }),
|
|
2074
2163
|
showTooltip: true
|
|
2075
2164
|
},
|
|
2076
2165
|
{
|
|
2077
2166
|
value: "center",
|
|
2078
2167
|
label: __19("Center", "elementor"),
|
|
2079
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2168
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(RotatedIcon, { icon: CenterIcon4, size, ...iconProps4 }),
|
|
2080
2169
|
showTooltip: true
|
|
2081
2170
|
},
|
|
2082
2171
|
{
|
|
2083
|
-
value: "end",
|
|
2172
|
+
value: "flex-end",
|
|
2084
2173
|
label: __19("End", "elementor"),
|
|
2085
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2174
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(RotatedIcon, { icon: EndIcon4, size, ...iconProps4 }),
|
|
2086
2175
|
showTooltip: true
|
|
2087
2176
|
},
|
|
2088
2177
|
{
|
|
2089
2178
|
value: "space-between",
|
|
2090
2179
|
label: __19("Space between", "elementor"),
|
|
2091
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2180
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(RotatedIcon, { icon: BetweenIcon2, size, ...iconProps4 }),
|
|
2092
2181
|
showTooltip: true
|
|
2093
2182
|
},
|
|
2094
2183
|
{
|
|
2095
2184
|
value: "space-around",
|
|
2096
2185
|
label: __19("Space around", "elementor"),
|
|
2097
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2186
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(RotatedIcon, { icon: AroundIcon2, size, ...iconProps4 }),
|
|
2098
2187
|
showTooltip: true
|
|
2099
2188
|
},
|
|
2100
2189
|
{
|
|
2101
2190
|
value: "space-evenly",
|
|
2102
2191
|
label: __19("Space evenly", "elementor"),
|
|
2103
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2192
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(RotatedIcon, { icon: EvenlyIcon2, size, ...iconProps4 }),
|
|
2104
2193
|
showTooltip: true
|
|
2105
2194
|
}
|
|
2106
2195
|
];
|
|
2107
2196
|
var JustifyContentField = () => {
|
|
2108
2197
|
const { isSiteRtl } = useDirection();
|
|
2109
|
-
return /* @__PURE__ */
|
|
2198
|
+
return /* @__PURE__ */ React40.createElement(DirectionProvider7, { rtl: isSiteRtl }, /* @__PURE__ */ React40.createElement(ThemeProvider7, null, /* @__PURE__ */ React40.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React40.createElement(Stack12, { gap: 0.75 }, /* @__PURE__ */ React40.createElement(ControlLabel, null, __19("Justify content", "elementor")), /* @__PURE__ */ React40.createElement(ToggleControl6, { options: options5, fullWidth: true })))));
|
|
2110
2199
|
};
|
|
2111
2200
|
|
|
2112
2201
|
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
2113
|
-
import * as
|
|
2114
|
-
import {
|
|
2202
|
+
import * as React41 from "react";
|
|
2203
|
+
import { ToggleControl as ToggleControl7 } from "@elementor/editor-controls";
|
|
2115
2204
|
import { ArrowBackIcon, ArrowForwardIcon, ArrowRightIcon as ArrowRightIcon2 } from "@elementor/icons";
|
|
2116
2205
|
import { DirectionProvider as DirectionProvider8, Grid as Grid8, ThemeProvider as ThemeProvider8 } from "@elementor/ui";
|
|
2117
2206
|
import { __ as __20 } from "@wordpress/i18n";
|
|
@@ -2119,25 +2208,25 @@ var options6 = [
|
|
|
2119
2208
|
{
|
|
2120
2209
|
value: "nowrap",
|
|
2121
2210
|
label: __20("No wrap", "elementor"),
|
|
2122
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2211
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(ArrowRightIcon2, { fontSize: size }),
|
|
2123
2212
|
showTooltip: true
|
|
2124
2213
|
},
|
|
2125
2214
|
{
|
|
2126
2215
|
value: "wrap",
|
|
2127
2216
|
label: __20("Wrap", "elementor"),
|
|
2128
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2217
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(ArrowBackIcon, { fontSize: size }),
|
|
2129
2218
|
showTooltip: true
|
|
2130
2219
|
},
|
|
2131
2220
|
{
|
|
2132
2221
|
value: "wrap-reverse",
|
|
2133
2222
|
label: __20("Reversed wrap", "elementor"),
|
|
2134
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2223
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(ArrowForwardIcon, { fontSize: size }),
|
|
2135
2224
|
showTooltip: true
|
|
2136
2225
|
}
|
|
2137
2226
|
];
|
|
2138
2227
|
var WrapField = () => {
|
|
2139
2228
|
const { isSiteRtl } = useDirection();
|
|
2140
|
-
return /* @__PURE__ */
|
|
2229
|
+
return /* @__PURE__ */ React41.createElement(DirectionProvider8, { rtl: isSiteRtl }, /* @__PURE__ */ React41.createElement(ThemeProvider8, null, /* @__PURE__ */ React41.createElement(StylesField, { bind: "flex-wrap" }, /* @__PURE__ */ React41.createElement(Grid8, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(Grid8, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(ControlLabel, null, __20("Wrap", "elementor"))), /* @__PURE__ */ React41.createElement(Grid8, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React41.createElement(ToggleControl7, { options: options6 }))))));
|
|
2141
2230
|
};
|
|
2142
2231
|
|
|
2143
2232
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
@@ -2146,45 +2235,45 @@ var LayoutSection = () => {
|
|
|
2146
2235
|
const { element } = useElement();
|
|
2147
2236
|
const parent = useParentElement(element.id);
|
|
2148
2237
|
const parentStyle = useComputedStyle(parent?.id || null);
|
|
2149
|
-
return /* @__PURE__ */
|
|
2238
|
+
return /* @__PURE__ */ React42.createElement(SectionContent, null, /* @__PURE__ */ React42.createElement(DisplayField, null), ("flex" === display?.value || "inline-flex" === display?.value) && /* @__PURE__ */ React42.createElement(FlexFields, null), "flex" === parentStyle?.display && /* @__PURE__ */ React42.createElement(FlexChildFields, null));
|
|
2150
2239
|
};
|
|
2151
2240
|
var FlexFields = () => {
|
|
2152
2241
|
const [flexWrap] = useStylesField("flex-wrap");
|
|
2153
|
-
return /* @__PURE__ */
|
|
2242
|
+
return /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(FlexDirectionField, null), /* @__PURE__ */ React42.createElement(JustifyContentField, null), /* @__PURE__ */ React42.createElement(AlignItemsField, null), /* @__PURE__ */ React42.createElement(PanelDivider, null), /* @__PURE__ */ React42.createElement(GapControlField, null), /* @__PURE__ */ React42.createElement(WrapField, null), ["wrap", "wrap-reverse"].includes(flexWrap?.value) && /* @__PURE__ */ React42.createElement(AlignContentField, null));
|
|
2154
2243
|
};
|
|
2155
|
-
var FlexChildFields = () => /* @__PURE__ */
|
|
2244
|
+
var FlexChildFields = () => /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(PanelDivider, null), /* @__PURE__ */ React42.createElement(ControlFormLabel3, null, __21("Flex child", "elementor")), /* @__PURE__ */ React42.createElement(AlignSelfChild, null), /* @__PURE__ */ React42.createElement(FlexOrderField, null), /* @__PURE__ */ React42.createElement(FlexSizeField, null));
|
|
2156
2245
|
|
|
2157
2246
|
// src/components/style-sections/position-section/position-section.tsx
|
|
2158
|
-
import * as
|
|
2247
|
+
import * as React46 from "react";
|
|
2159
2248
|
import { useSessionStorage } from "@elementor/session";
|
|
2160
2249
|
|
|
2161
2250
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
2162
|
-
import * as
|
|
2163
|
-
import {
|
|
2251
|
+
import * as React43 from "react";
|
|
2252
|
+
import { SizeControl as SizeControl3 } from "@elementor/editor-controls";
|
|
2164
2253
|
import { SideBottomIcon as SideBottomIcon2, SideLeftIcon as SideLeftIcon2, SideRightIcon as SideRightIcon2, SideTopIcon as SideTopIcon2 } from "@elementor/icons";
|
|
2165
|
-
import { Grid as Grid9, Stack as
|
|
2254
|
+
import { Grid as Grid9, Stack as Stack13, withDirection as withDirection8 } from "@elementor/ui";
|
|
2166
2255
|
import { __ as __22 } from "@wordpress/i18n";
|
|
2167
2256
|
var InlineStartIcon2 = withDirection8(SideLeftIcon2);
|
|
2168
2257
|
var InlineEndIcon2 = withDirection8(SideRightIcon2);
|
|
2169
2258
|
var sideIcons = {
|
|
2170
|
-
"inset-block-start": /* @__PURE__ */
|
|
2171
|
-
"inset-block-end": /* @__PURE__ */
|
|
2172
|
-
"inset-inline-start": /* @__PURE__ */
|
|
2173
|
-
"inset-inline-end": /* @__PURE__ */
|
|
2259
|
+
"inset-block-start": /* @__PURE__ */ React43.createElement(SideTopIcon2, { fontSize: "tiny" }),
|
|
2260
|
+
"inset-block-end": /* @__PURE__ */ React43.createElement(SideBottomIcon2, { fontSize: "tiny" }),
|
|
2261
|
+
"inset-inline-start": /* @__PURE__ */ React43.createElement(RotatedIcon, { icon: InlineStartIcon2, size: "tiny" }),
|
|
2262
|
+
"inset-inline-end": /* @__PURE__ */ React43.createElement(RotatedIcon, { icon: InlineEndIcon2, size: "tiny" })
|
|
2174
2263
|
};
|
|
2175
2264
|
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? __22("Right", "elementor") : __22("Left", "elementor");
|
|
2176
2265
|
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? __22("Left", "elementor") : __22("Right", "elementor");
|
|
2177
2266
|
var DimensionsField = () => {
|
|
2178
2267
|
const { isSiteRtl } = useDirection();
|
|
2179
|
-
return /* @__PURE__ */
|
|
2268
|
+
return /* @__PURE__ */ React43.createElement(React43.Fragment, null, /* @__PURE__ */ React43.createElement(Stack13, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React43.createElement(DimensionField, { side: "inset-block-start", label: __22("Top", "elementor") }), /* @__PURE__ */ React43.createElement(DimensionField, { side: "inset-inline-end", label: getInlineEndLabel(isSiteRtl) })), /* @__PURE__ */ React43.createElement(Stack13, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React43.createElement(DimensionField, { side: "inset-block-end", label: __22("Bottom", "elementor") }), /* @__PURE__ */ React43.createElement(DimensionField, { side: "inset-inline-start", label: getInlineStartLabel(isSiteRtl) })));
|
|
2180
2269
|
};
|
|
2181
2270
|
var DimensionField = ({ side, label }) => {
|
|
2182
|
-
return /* @__PURE__ */
|
|
2271
|
+
return /* @__PURE__ */ React43.createElement(Grid9, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React43.createElement(Grid9, { item: true, xs: 12 }, /* @__PURE__ */ React43.createElement(ControlLabel, null, label)), /* @__PURE__ */ React43.createElement(Grid9, { item: true, xs: 12 }, /* @__PURE__ */ React43.createElement(StylesField, { bind: side }, /* @__PURE__ */ React43.createElement(SizeControl3, { startIcon: sideIcons[side], extendedValues: ["auto"] }))));
|
|
2183
2272
|
};
|
|
2184
2273
|
|
|
2185
2274
|
// src/components/style-sections/position-section/position-field.tsx
|
|
2186
|
-
import * as
|
|
2187
|
-
import {
|
|
2275
|
+
import * as React44 from "react";
|
|
2276
|
+
import { SelectControl as SelectControl3 } from "@elementor/editor-controls";
|
|
2188
2277
|
import { Grid as Grid10 } from "@elementor/ui";
|
|
2189
2278
|
import { __ as __23 } from "@wordpress/i18n";
|
|
2190
2279
|
var positionOptions = [
|
|
@@ -2195,16 +2284,16 @@ var positionOptions = [
|
|
|
2195
2284
|
{ label: __23("Sticky", "elementor"), value: "sticky" }
|
|
2196
2285
|
];
|
|
2197
2286
|
var PositionField = ({ onChange }) => {
|
|
2198
|
-
return /* @__PURE__ */
|
|
2287
|
+
return /* @__PURE__ */ React44.createElement(StylesField, { bind: "position" }, /* @__PURE__ */ React44.createElement(Grid10, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React44.createElement(Grid10, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(ControlLabel, null, __23("Position", "elementor"))), /* @__PURE__ */ React44.createElement(Grid10, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React44.createElement(SelectControl3, { options: positionOptions, onChange }))));
|
|
2199
2288
|
};
|
|
2200
2289
|
|
|
2201
2290
|
// src/components/style-sections/position-section/z-index-field.tsx
|
|
2202
|
-
import * as
|
|
2203
|
-
import {
|
|
2291
|
+
import * as React45 from "react";
|
|
2292
|
+
import { NumberControl as NumberControl3 } from "@elementor/editor-controls";
|
|
2204
2293
|
import { Grid as Grid11 } from "@elementor/ui";
|
|
2205
2294
|
import { __ as __24 } from "@wordpress/i18n";
|
|
2206
2295
|
var ZIndexField = () => {
|
|
2207
|
-
return /* @__PURE__ */
|
|
2296
|
+
return /* @__PURE__ */ React45.createElement(StylesField, { bind: "z-index" }, /* @__PURE__ */ React45.createElement(Grid11, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React45.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(ControlLabel, null, __24("Z-index", "elementor"))), /* @__PURE__ */ React45.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(NumberControl3, null))));
|
|
2208
2297
|
};
|
|
2209
2298
|
|
|
2210
2299
|
// src/components/style-sections/position-section/position-section.tsx
|
|
@@ -2236,7 +2325,7 @@ var PositionSection = () => {
|
|
|
2236
2325
|
}
|
|
2237
2326
|
};
|
|
2238
2327
|
const isNotStatic = positionValue && positionValue?.value !== "static";
|
|
2239
|
-
return /* @__PURE__ */
|
|
2328
|
+
return /* @__PURE__ */ React46.createElement(SectionContent, null, /* @__PURE__ */ React46.createElement(PositionField, { onChange: onPositionChange }), isNotStatic ? /* @__PURE__ */ React46.createElement(React46.Fragment, null, /* @__PURE__ */ React46.createElement(DimensionsField, null), /* @__PURE__ */ React46.createElement(ZIndexField, null)) : null);
|
|
2240
2329
|
};
|
|
2241
2330
|
var usePersistDimensions = () => {
|
|
2242
2331
|
const { id: styleDefID, meta } = useStyle();
|
|
@@ -2246,14 +2335,14 @@ var usePersistDimensions = () => {
|
|
|
2246
2335
|
};
|
|
2247
2336
|
|
|
2248
2337
|
// src/components/style-sections/size-section/size-section.tsx
|
|
2249
|
-
import * as
|
|
2250
|
-
import {
|
|
2251
|
-
import { Grid as Grid13, Stack as
|
|
2338
|
+
import * as React48 from "react";
|
|
2339
|
+
import { SizeControl as SizeControl4 } from "@elementor/editor-controls";
|
|
2340
|
+
import { Grid as Grid13, Stack as Stack14 } from "@elementor/ui";
|
|
2252
2341
|
import { __ as __26 } from "@wordpress/i18n";
|
|
2253
2342
|
|
|
2254
2343
|
// src/components/style-sections/size-section/overflow-field.tsx
|
|
2255
|
-
import * as
|
|
2256
|
-
import {
|
|
2344
|
+
import * as React47 from "react";
|
|
2345
|
+
import { ToggleControl as ToggleControl8 } from "@elementor/editor-controls";
|
|
2257
2346
|
import { EyeIcon, EyeOffIcon, LetterAIcon } from "@elementor/icons";
|
|
2258
2347
|
import { Grid as Grid12 } from "@elementor/ui";
|
|
2259
2348
|
import { __ as __25 } from "@wordpress/i18n";
|
|
@@ -2261,78 +2350,78 @@ var options7 = [
|
|
|
2261
2350
|
{
|
|
2262
2351
|
value: "visible",
|
|
2263
2352
|
label: __25("Visible", "elementor"),
|
|
2264
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2353
|
+
renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(EyeIcon, { fontSize: size }),
|
|
2265
2354
|
showTooltip: true
|
|
2266
2355
|
},
|
|
2267
2356
|
{
|
|
2268
2357
|
value: "hidden",
|
|
2269
2358
|
label: __25("Hidden", "elementor"),
|
|
2270
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2359
|
+
renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(EyeOffIcon, { fontSize: size }),
|
|
2271
2360
|
showTooltip: true
|
|
2272
2361
|
},
|
|
2273
2362
|
{
|
|
2274
2363
|
value: "auto",
|
|
2275
2364
|
label: __25("Auto", "elementor"),
|
|
2276
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2365
|
+
renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(LetterAIcon, { fontSize: size }),
|
|
2277
2366
|
showTooltip: true
|
|
2278
2367
|
}
|
|
2279
2368
|
];
|
|
2280
2369
|
var OverflowField = () => {
|
|
2281
|
-
return /* @__PURE__ */
|
|
2370
|
+
return /* @__PURE__ */ React47.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React47.createElement(Grid12, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlLabel, null, __25("Overflow", "elementor"))), /* @__PURE__ */ React47.createElement(Grid12, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React47.createElement(ToggleControl8, { options: options7 }))));
|
|
2282
2371
|
};
|
|
2283
2372
|
|
|
2284
2373
|
// src/components/style-sections/size-section/size-section.tsx
|
|
2285
2374
|
var SizeSection = () => {
|
|
2286
|
-
return /* @__PURE__ */
|
|
2375
|
+
return /* @__PURE__ */ React48.createElement(SectionContent, null, /* @__PURE__ */ React48.createElement(Grid13, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React48.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(SizeField, { bind: "width", label: __26("Width", "elementor"), extendedValues: ["auto"] })), /* @__PURE__ */ React48.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(SizeField, { bind: "height", label: __26("Height", "elementor"), extendedValues: ["auto"] }))), /* @__PURE__ */ React48.createElement(Grid13, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React48.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(
|
|
2287
2376
|
SizeField,
|
|
2288
2377
|
{
|
|
2289
2378
|
bind: "min-width",
|
|
2290
2379
|
label: __26("Min width", "elementor"),
|
|
2291
2380
|
extendedValues: ["auto"]
|
|
2292
2381
|
}
|
|
2293
|
-
)), /* @__PURE__ */
|
|
2382
|
+
)), /* @__PURE__ */ React48.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(
|
|
2294
2383
|
SizeField,
|
|
2295
2384
|
{
|
|
2296
2385
|
bind: "min-height",
|
|
2297
2386
|
label: __26("Min height", "elementor"),
|
|
2298
2387
|
extendedValues: ["auto"]
|
|
2299
2388
|
}
|
|
2300
|
-
))), /* @__PURE__ */
|
|
2389
|
+
))), /* @__PURE__ */ React48.createElement(Grid13, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React48.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(SizeField, { bind: "max-width", label: __26("Max width", "elementor") })), /* @__PURE__ */ React48.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(SizeField, { bind: "max-height", label: __26("Max height", "elementor") }))), /* @__PURE__ */ React48.createElement(PanelDivider, null), /* @__PURE__ */ React48.createElement(Stack14, null, /* @__PURE__ */ React48.createElement(OverflowField, null)));
|
|
2301
2390
|
};
|
|
2302
2391
|
var SizeField = ({ label, bind, extendedValues }) => {
|
|
2303
|
-
return /* @__PURE__ */
|
|
2392
|
+
return /* @__PURE__ */ React48.createElement(StylesField, { bind }, /* @__PURE__ */ React48.createElement(Grid13, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React48.createElement(Grid13, { item: true, xs: 12 }, /* @__PURE__ */ React48.createElement(ControlLabel, null, label)), /* @__PURE__ */ React48.createElement(Grid13, { item: true, xs: 12 }, /* @__PURE__ */ React48.createElement(SizeControl4, { extendedValues }))));
|
|
2304
2393
|
};
|
|
2305
2394
|
|
|
2306
2395
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
2307
|
-
import * as
|
|
2396
|
+
import * as React49 from "react";
|
|
2308
2397
|
import { LinkedDimensionsControl } from "@elementor/editor-controls";
|
|
2309
2398
|
import { __ as __27 } from "@wordpress/i18n";
|
|
2310
2399
|
var SpacingSection = () => {
|
|
2311
2400
|
const { isSiteRtl } = useDirection();
|
|
2312
|
-
return /* @__PURE__ */
|
|
2401
|
+
return /* @__PURE__ */ React49.createElement(SectionContent, null, /* @__PURE__ */ React49.createElement(StylesField, { bind: "margin" }, /* @__PURE__ */ React49.createElement(
|
|
2313
2402
|
LinkedDimensionsControl,
|
|
2314
2403
|
{
|
|
2315
2404
|
label: __27("Margin", "elementor"),
|
|
2316
2405
|
isSiteRtl,
|
|
2317
2406
|
extendedValues: ["auto"]
|
|
2318
2407
|
}
|
|
2319
|
-
)), /* @__PURE__ */
|
|
2408
|
+
)), /* @__PURE__ */ React49.createElement(PanelDivider, null), /* @__PURE__ */ React49.createElement(StylesField, { bind: "padding" }, /* @__PURE__ */ React49.createElement(LinkedDimensionsControl, { label: __27("Padding", "elementor"), isSiteRtl })));
|
|
2320
2409
|
};
|
|
2321
2410
|
|
|
2322
2411
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
2323
|
-
import * as
|
|
2412
|
+
import * as React64 from "react";
|
|
2324
2413
|
|
|
2325
2414
|
// src/components/collapsible-content.tsx
|
|
2326
|
-
import * as
|
|
2415
|
+
import * as React50 from "react";
|
|
2327
2416
|
import { useState as useState6 } from "react";
|
|
2328
|
-
import { Button, Collapse as Collapse3, Stack as
|
|
2417
|
+
import { Button, Collapse as Collapse3, Stack as Stack15 } from "@elementor/ui";
|
|
2329
2418
|
import { __ as __28 } from "@wordpress/i18n";
|
|
2330
2419
|
var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
2331
2420
|
const [open, setOpen] = useState6(defaultOpen);
|
|
2332
2421
|
const handleToggle = () => {
|
|
2333
2422
|
setOpen((prevOpen) => !prevOpen);
|
|
2334
2423
|
};
|
|
2335
|
-
return /* @__PURE__ */
|
|
2424
|
+
return /* @__PURE__ */ React50.createElement(Stack15, null, /* @__PURE__ */ React50.createElement(
|
|
2336
2425
|
Button,
|
|
2337
2426
|
{
|
|
2338
2427
|
fullWidth: true,
|
|
@@ -2340,16 +2429,16 @@ var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
|
2340
2429
|
color: "secondary",
|
|
2341
2430
|
variant: "outlined",
|
|
2342
2431
|
onClick: handleToggle,
|
|
2343
|
-
endIcon: /* @__PURE__ */
|
|
2432
|
+
endIcon: /* @__PURE__ */ React50.createElement(CollapseIcon, { open }),
|
|
2344
2433
|
sx: { my: 0.5 }
|
|
2345
2434
|
},
|
|
2346
2435
|
open ? __28("Show less", "elementor") : __28("Show more", "elementor")
|
|
2347
|
-
), /* @__PURE__ */
|
|
2436
|
+
), /* @__PURE__ */ React50.createElement(Collapse3, { in: open, timeout: "auto", unmountOnExit: true }, children));
|
|
2348
2437
|
};
|
|
2349
2438
|
|
|
2350
2439
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
2351
|
-
import * as
|
|
2352
|
-
import {
|
|
2440
|
+
import * as React51 from "react";
|
|
2441
|
+
import { FontFamilyControl } from "@elementor/editor-controls";
|
|
2353
2442
|
import { Grid as Grid14 } from "@elementor/ui";
|
|
2354
2443
|
import { __ as __30 } from "@wordpress/i18n";
|
|
2355
2444
|
|
|
@@ -2404,21 +2493,21 @@ var FontFamilyField = () => {
|
|
|
2404
2493
|
if (fontFamilies.length === 0) {
|
|
2405
2494
|
return null;
|
|
2406
2495
|
}
|
|
2407
|
-
return /* @__PURE__ */
|
|
2496
|
+
return /* @__PURE__ */ React51.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React51.createElement(Grid14, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React51.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(ControlLabel, null, __30("Font family", "elementor"))), /* @__PURE__ */ React51.createElement(Grid14, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React51.createElement(FontFamilyControl, { fontFamilies }))));
|
|
2408
2497
|
};
|
|
2409
2498
|
|
|
2410
2499
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
2411
|
-
import * as
|
|
2412
|
-
import {
|
|
2500
|
+
import * as React52 from "react";
|
|
2501
|
+
import { SizeControl as SizeControl5 } from "@elementor/editor-controls";
|
|
2413
2502
|
import { Grid as Grid15 } from "@elementor/ui";
|
|
2414
2503
|
import { __ as __31 } from "@wordpress/i18n";
|
|
2415
2504
|
var FontSizeField = () => {
|
|
2416
|
-
return /* @__PURE__ */
|
|
2505
|
+
return /* @__PURE__ */ React52.createElement(StylesField, { bind: "font-size" }, /* @__PURE__ */ React52.createElement(Grid15, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React52.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(ControlLabel, null, __31("Font size", "elementor"))), /* @__PURE__ */ React52.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(SizeControl5, null))));
|
|
2417
2506
|
};
|
|
2418
2507
|
|
|
2419
2508
|
// src/components/style-sections/typography-section/font-style-field.tsx
|
|
2420
|
-
import * as
|
|
2421
|
-
import {
|
|
2509
|
+
import * as React53 from "react";
|
|
2510
|
+
import { ControlFormLabel as ControlFormLabel4, ToggleControl as ToggleControl9 } from "@elementor/editor-controls";
|
|
2422
2511
|
import { ItalicIcon, MinusIcon as MinusIcon2 } from "@elementor/icons";
|
|
2423
2512
|
import { Grid as Grid16 } from "@elementor/ui";
|
|
2424
2513
|
import { __ as __32 } from "@wordpress/i18n";
|
|
@@ -2426,21 +2515,21 @@ var options8 = [
|
|
|
2426
2515
|
{
|
|
2427
2516
|
value: "normal",
|
|
2428
2517
|
label: __32("Normal", "elementor"),
|
|
2429
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2518
|
+
renderContent: ({ size }) => /* @__PURE__ */ React53.createElement(MinusIcon2, { fontSize: size }),
|
|
2430
2519
|
showTooltip: true
|
|
2431
2520
|
},
|
|
2432
2521
|
{
|
|
2433
2522
|
value: "italic",
|
|
2434
2523
|
label: __32("Italic", "elementor"),
|
|
2435
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2524
|
+
renderContent: ({ size }) => /* @__PURE__ */ React53.createElement(ItalicIcon, { fontSize: size }),
|
|
2436
2525
|
showTooltip: true
|
|
2437
2526
|
}
|
|
2438
2527
|
];
|
|
2439
|
-
var FontStyleField = () => /* @__PURE__ */
|
|
2528
|
+
var FontStyleField = () => /* @__PURE__ */ React53.createElement(StylesField, { bind: "font-style" }, /* @__PURE__ */ React53.createElement(Grid16, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React53.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React53.createElement(ControlFormLabel4, null, __32("Font style", "elementor"))), /* @__PURE__ */ React53.createElement(Grid16, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React53.createElement(ToggleControl9, { options: options8 }))));
|
|
2440
2529
|
|
|
2441
2530
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
2442
|
-
import * as
|
|
2443
|
-
import {
|
|
2531
|
+
import * as React54 from "react";
|
|
2532
|
+
import { SelectControl as SelectControl4 } from "@elementor/editor-controls";
|
|
2444
2533
|
import { Grid as Grid17 } from "@elementor/ui";
|
|
2445
2534
|
import { __ as __33 } from "@wordpress/i18n";
|
|
2446
2535
|
var fontWeightOptions = [
|
|
@@ -2455,77 +2544,77 @@ var fontWeightOptions = [
|
|
|
2455
2544
|
{ value: "900", label: __33("900 - Black", "elementor") }
|
|
2456
2545
|
];
|
|
2457
2546
|
var FontWeightField = () => {
|
|
2458
|
-
return /* @__PURE__ */
|
|
2547
|
+
return /* @__PURE__ */ React54.createElement(StylesField, { bind: "font-weight" }, /* @__PURE__ */ React54.createElement(Grid17, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React54.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(ControlLabel, null, __33("Font weight", "elementor"))), /* @__PURE__ */ React54.createElement(Grid17, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React54.createElement(SelectControl4, { options: fontWeightOptions }))));
|
|
2459
2548
|
};
|
|
2460
2549
|
|
|
2461
2550
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
2462
|
-
import * as
|
|
2463
|
-
import {
|
|
2551
|
+
import * as React55 from "react";
|
|
2552
|
+
import { SizeControl as SizeControl6 } from "@elementor/editor-controls";
|
|
2464
2553
|
import { Grid as Grid18 } from "@elementor/ui";
|
|
2465
2554
|
import { __ as __34 } from "@wordpress/i18n";
|
|
2466
2555
|
var LetterSpacingField = () => {
|
|
2467
|
-
return /* @__PURE__ */
|
|
2556
|
+
return /* @__PURE__ */ React55.createElement(StylesField, { bind: "letter-spacing" }, /* @__PURE__ */ React55.createElement(Grid18, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React55.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(ControlLabel, null, __34("Letter spacing", "elementor"))), /* @__PURE__ */ React55.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(SizeControl6, null))));
|
|
2468
2557
|
};
|
|
2469
2558
|
|
|
2470
2559
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
2471
|
-
import * as
|
|
2472
|
-
import {
|
|
2560
|
+
import * as React56 from "react";
|
|
2561
|
+
import { SizeControl as SizeControl7 } from "@elementor/editor-controls";
|
|
2473
2562
|
import { Grid as Grid19 } from "@elementor/ui";
|
|
2474
2563
|
import { __ as __35 } from "@wordpress/i18n";
|
|
2475
2564
|
var LineHeightField = () => {
|
|
2476
|
-
return /* @__PURE__ */
|
|
2565
|
+
return /* @__PURE__ */ React56.createElement(StylesField, { bind: "line-height" }, /* @__PURE__ */ React56.createElement(Grid19, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React56.createElement(Grid19, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(ControlLabel, null, __35("Line height", "elementor"))), /* @__PURE__ */ React56.createElement(Grid19, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(SizeControl7, null))));
|
|
2477
2566
|
};
|
|
2478
2567
|
|
|
2479
2568
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
2480
|
-
import * as
|
|
2481
|
-
import {
|
|
2569
|
+
import * as React57 from "react";
|
|
2570
|
+
import { ToggleControl as ToggleControl10 } from "@elementor/editor-controls";
|
|
2482
2571
|
import { AlignCenterIcon, AlignJustifiedIcon, AlignLeftIcon, AlignRightIcon } from "@elementor/icons";
|
|
2483
2572
|
import { Grid as Grid20, withDirection as withDirection9 } from "@elementor/ui";
|
|
2484
2573
|
import { __ as __36 } from "@wordpress/i18n";
|
|
2485
|
-
var
|
|
2486
|
-
var
|
|
2574
|
+
var AlignStartIcon = withDirection9(AlignLeftIcon);
|
|
2575
|
+
var AlignEndIcon = withDirection9(AlignRightIcon);
|
|
2487
2576
|
var options9 = [
|
|
2488
2577
|
{
|
|
2489
2578
|
value: "start",
|
|
2490
2579
|
label: __36("Start", "elementor"),
|
|
2491
|
-
renderContent: () => /* @__PURE__ */
|
|
2580
|
+
renderContent: ({ size }) => /* @__PURE__ */ React57.createElement(AlignStartIcon, { fontSize: size }),
|
|
2492
2581
|
showTooltip: true
|
|
2493
2582
|
},
|
|
2494
2583
|
{
|
|
2495
2584
|
value: "center",
|
|
2496
2585
|
label: __36("Center", "elementor"),
|
|
2497
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2586
|
+
renderContent: ({ size }) => /* @__PURE__ */ React57.createElement(AlignCenterIcon, { fontSize: size }),
|
|
2498
2587
|
showTooltip: true
|
|
2499
2588
|
},
|
|
2500
2589
|
{
|
|
2501
2590
|
value: "end",
|
|
2502
2591
|
label: __36("End", "elementor"),
|
|
2503
|
-
renderContent: () => /* @__PURE__ */
|
|
2592
|
+
renderContent: ({ size }) => /* @__PURE__ */ React57.createElement(AlignEndIcon, { fontSize: size }),
|
|
2504
2593
|
showTooltip: true
|
|
2505
2594
|
},
|
|
2506
2595
|
{
|
|
2507
2596
|
value: "justify",
|
|
2508
2597
|
label: __36("Justify", "elementor"),
|
|
2509
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2598
|
+
renderContent: ({ size }) => /* @__PURE__ */ React57.createElement(AlignJustifiedIcon, { fontSize: size }),
|
|
2510
2599
|
showTooltip: true
|
|
2511
2600
|
}
|
|
2512
2601
|
];
|
|
2513
2602
|
var TextAlignmentField = () => {
|
|
2514
|
-
return /* @__PURE__ */
|
|
2603
|
+
return /* @__PURE__ */ React57.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React57.createElement(Grid20, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React57.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React57.createElement(ControlLabel, null, __36("Text align", "elementor"))), /* @__PURE__ */ React57.createElement(Grid20, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React57.createElement(ToggleControl10, { options: options9 }))));
|
|
2515
2604
|
};
|
|
2516
2605
|
|
|
2517
2606
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
2518
|
-
import * as
|
|
2519
|
-
import { ColorControl as ColorControl2
|
|
2607
|
+
import * as React58 from "react";
|
|
2608
|
+
import { ColorControl as ColorControl2 } from "@elementor/editor-controls";
|
|
2520
2609
|
import { Grid as Grid21 } from "@elementor/ui";
|
|
2521
2610
|
import { __ as __37 } from "@wordpress/i18n";
|
|
2522
2611
|
var TextColorField = () => {
|
|
2523
|
-
return /* @__PURE__ */
|
|
2612
|
+
return /* @__PURE__ */ React58.createElement(StylesField, { bind: "color" }, /* @__PURE__ */ React58.createElement(Grid21, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React58.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React58.createElement(ControlLabel, null, __37("Text color", "elementor"))), /* @__PURE__ */ React58.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React58.createElement(ColorControl2, null))));
|
|
2524
2613
|
};
|
|
2525
2614
|
|
|
2526
2615
|
// src/components/style-sections/typography-section/text-decoration-field.tsx
|
|
2527
|
-
import * as
|
|
2528
|
-
import {
|
|
2616
|
+
import * as React59 from "react";
|
|
2617
|
+
import { ToggleControl as ToggleControl11 } from "@elementor/editor-controls";
|
|
2529
2618
|
import { MinusIcon as MinusIcon3, OverlineIcon, StrikethroughIcon, UnderlineIcon } from "@elementor/icons";
|
|
2530
2619
|
import { Grid as Grid22 } from "@elementor/ui";
|
|
2531
2620
|
import { __ as __38 } from "@wordpress/i18n";
|
|
@@ -2533,34 +2622,34 @@ var options10 = [
|
|
|
2533
2622
|
{
|
|
2534
2623
|
value: "none",
|
|
2535
2624
|
label: __38("None", "elementor"),
|
|
2536
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2625
|
+
renderContent: ({ size }) => /* @__PURE__ */ React59.createElement(MinusIcon3, { fontSize: size }),
|
|
2537
2626
|
showTooltip: true,
|
|
2538
2627
|
exclusive: true
|
|
2539
2628
|
},
|
|
2540
2629
|
{
|
|
2541
2630
|
value: "underline",
|
|
2542
2631
|
label: __38("Underline", "elementor"),
|
|
2543
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2632
|
+
renderContent: ({ size }) => /* @__PURE__ */ React59.createElement(UnderlineIcon, { fontSize: size }),
|
|
2544
2633
|
showTooltip: true
|
|
2545
2634
|
},
|
|
2546
2635
|
{
|
|
2547
2636
|
value: "line-through",
|
|
2548
2637
|
label: __38("Line-through", "elementor"),
|
|
2549
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2638
|
+
renderContent: ({ size }) => /* @__PURE__ */ React59.createElement(StrikethroughIcon, { fontSize: size }),
|
|
2550
2639
|
showTooltip: true
|
|
2551
2640
|
},
|
|
2552
2641
|
{
|
|
2553
2642
|
value: "overline",
|
|
2554
2643
|
label: __38("Overline", "elementor"),
|
|
2555
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2644
|
+
renderContent: ({ size }) => /* @__PURE__ */ React59.createElement(OverlineIcon, { fontSize: size }),
|
|
2556
2645
|
showTooltip: true
|
|
2557
2646
|
}
|
|
2558
2647
|
];
|
|
2559
|
-
var TextDecorationField = () => /* @__PURE__ */
|
|
2648
|
+
var TextDecorationField = () => /* @__PURE__ */ React59.createElement(StylesField, { bind: "text-decoration" }, /* @__PURE__ */ React59.createElement(Grid22, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React59.createElement(Grid22, { item: true, xs: 6 }, /* @__PURE__ */ React59.createElement(ControlLabel, null, __38("Line decoration", "elementor"))), /* @__PURE__ */ React59.createElement(Grid22, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React59.createElement(ToggleControl11, { options: options10, exclusive: false }))));
|
|
2560
2649
|
|
|
2561
2650
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
2562
|
-
import * as
|
|
2563
|
-
import {
|
|
2651
|
+
import * as React60 from "react";
|
|
2652
|
+
import { ToggleControl as ToggleControl12 } from "@elementor/editor-controls";
|
|
2564
2653
|
import { TextDirectionLtrIcon, TextDirectionRtlIcon } from "@elementor/icons";
|
|
2565
2654
|
import { Grid as Grid23 } from "@elementor/ui";
|
|
2566
2655
|
import { __ as __39 } from "@wordpress/i18n";
|
|
@@ -2568,22 +2657,22 @@ var options11 = [
|
|
|
2568
2657
|
{
|
|
2569
2658
|
value: "ltr",
|
|
2570
2659
|
label: __39("Left to right", "elementor"),
|
|
2571
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2660
|
+
renderContent: ({ size }) => /* @__PURE__ */ React60.createElement(TextDirectionLtrIcon, { fontSize: size }),
|
|
2572
2661
|
showTooltip: true
|
|
2573
2662
|
},
|
|
2574
2663
|
{
|
|
2575
2664
|
value: "rtl",
|
|
2576
2665
|
label: __39("Right to left", "elementor"),
|
|
2577
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2666
|
+
renderContent: ({ size }) => /* @__PURE__ */ React60.createElement(TextDirectionRtlIcon, { fontSize: size }),
|
|
2578
2667
|
showTooltip: true
|
|
2579
2668
|
}
|
|
2580
2669
|
];
|
|
2581
2670
|
var TextDirectionField = () => {
|
|
2582
|
-
return /* @__PURE__ */
|
|
2671
|
+
return /* @__PURE__ */ React60.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React60.createElement(Grid23, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React60.createElement(Grid23, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(ControlLabel, null, __39("Direction", "elementor"))), /* @__PURE__ */ React60.createElement(Grid23, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React60.createElement(ToggleControl12, { options: options11 }))));
|
|
2583
2672
|
};
|
|
2584
2673
|
|
|
2585
2674
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
2586
|
-
import * as
|
|
2675
|
+
import * as React61 from "react";
|
|
2587
2676
|
import { StrokeControl } from "@elementor/editor-controls";
|
|
2588
2677
|
import { __ as __40 } from "@wordpress/i18n";
|
|
2589
2678
|
var initTextStroke = {
|
|
@@ -2611,7 +2700,7 @@ var TextStrokeField = () => {
|
|
|
2611
2700
|
setTextStroke(null);
|
|
2612
2701
|
};
|
|
2613
2702
|
const hasTextStroke = Boolean(textStroke);
|
|
2614
|
-
return /* @__PURE__ */
|
|
2703
|
+
return /* @__PURE__ */ React61.createElement(StylesField, { bind: "stroke" }, /* @__PURE__ */ React61.createElement(
|
|
2615
2704
|
AddOrRemoveContent,
|
|
2616
2705
|
{
|
|
2617
2706
|
label: __40("Text stroke", "elementor"),
|
|
@@ -2619,13 +2708,13 @@ var TextStrokeField = () => {
|
|
|
2619
2708
|
onAdd: addTextStroke,
|
|
2620
2709
|
onRemove: removeTextStroke
|
|
2621
2710
|
},
|
|
2622
|
-
/* @__PURE__ */
|
|
2623
|
-
);
|
|
2711
|
+
/* @__PURE__ */ React61.createElement(StrokeControl, null)
|
|
2712
|
+
));
|
|
2624
2713
|
};
|
|
2625
2714
|
|
|
2626
2715
|
// src/components/style-sections/typography-section/transform-field.tsx
|
|
2627
|
-
import * as
|
|
2628
|
-
import {
|
|
2716
|
+
import * as React62 from "react";
|
|
2717
|
+
import { ToggleControl as ToggleControl13 } from "@elementor/editor-controls";
|
|
2629
2718
|
import { LetterCaseIcon, LetterCaseLowerIcon, LetterCaseUpperIcon, MinusIcon as MinusIcon4 } from "@elementor/icons";
|
|
2630
2719
|
import { Grid as Grid24 } from "@elementor/ui";
|
|
2631
2720
|
import { __ as __41 } from "@wordpress/i18n";
|
|
@@ -2633,42 +2722,42 @@ var options12 = [
|
|
|
2633
2722
|
{
|
|
2634
2723
|
value: "none",
|
|
2635
2724
|
label: __41("None", "elementor"),
|
|
2636
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2725
|
+
renderContent: ({ size }) => /* @__PURE__ */ React62.createElement(MinusIcon4, { fontSize: size }),
|
|
2637
2726
|
showTooltip: true
|
|
2638
2727
|
},
|
|
2639
2728
|
{
|
|
2640
2729
|
value: "capitalize",
|
|
2641
2730
|
label: __41("Capitalize", "elementor"),
|
|
2642
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2731
|
+
renderContent: ({ size }) => /* @__PURE__ */ React62.createElement(LetterCaseIcon, { fontSize: size }),
|
|
2643
2732
|
showTooltip: true
|
|
2644
2733
|
},
|
|
2645
2734
|
{
|
|
2646
2735
|
value: "uppercase",
|
|
2647
2736
|
label: __41("Uppercase", "elementor"),
|
|
2648
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2737
|
+
renderContent: ({ size }) => /* @__PURE__ */ React62.createElement(LetterCaseUpperIcon, { fontSize: size }),
|
|
2649
2738
|
showTooltip: true
|
|
2650
2739
|
},
|
|
2651
2740
|
{
|
|
2652
2741
|
value: "lowercase",
|
|
2653
2742
|
label: __41("Lowercase", "elementor"),
|
|
2654
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2743
|
+
renderContent: ({ size }) => /* @__PURE__ */ React62.createElement(LetterCaseLowerIcon, { fontSize: size }),
|
|
2655
2744
|
showTooltip: true
|
|
2656
2745
|
}
|
|
2657
2746
|
];
|
|
2658
|
-
var TransformField = () => /* @__PURE__ */
|
|
2747
|
+
var TransformField = () => /* @__PURE__ */ React62.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React62.createElement(Grid24, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React62.createElement(Grid24, { item: true, xs: 6 }, /* @__PURE__ */ React62.createElement(ControlLabel, null, __41("Text transform", "elementor"))), /* @__PURE__ */ React62.createElement(Grid24, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React62.createElement(ToggleControl13, { options: options12 }))));
|
|
2659
2748
|
|
|
2660
2749
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
2661
|
-
import * as
|
|
2662
|
-
import {
|
|
2750
|
+
import * as React63 from "react";
|
|
2751
|
+
import { SizeControl as SizeControl8 } from "@elementor/editor-controls";
|
|
2663
2752
|
import { Grid as Grid25 } from "@elementor/ui";
|
|
2664
2753
|
import { __ as __42 } from "@wordpress/i18n";
|
|
2665
2754
|
var WordSpacingField = () => {
|
|
2666
|
-
return /* @__PURE__ */
|
|
2755
|
+
return /* @__PURE__ */ React63.createElement(StylesField, { bind: "word-spacing" }, /* @__PURE__ */ React63.createElement(Grid25, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React63.createElement(Grid25, { item: true, xs: 6 }, /* @__PURE__ */ React63.createElement(ControlLabel, null, __42("Word spacing", "elementor"))), /* @__PURE__ */ React63.createElement(Grid25, { item: true, xs: 6 }, /* @__PURE__ */ React63.createElement(SizeControl8, null))));
|
|
2667
2756
|
};
|
|
2668
2757
|
|
|
2669
2758
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
2670
2759
|
var TypographySection = () => {
|
|
2671
|
-
return /* @__PURE__ */
|
|
2760
|
+
return /* @__PURE__ */ React64.createElement(SectionContent, null, /* @__PURE__ */ React64.createElement(FontFamilyField, null), /* @__PURE__ */ React64.createElement(FontWeightField, null), /* @__PURE__ */ React64.createElement(FontSizeField, null), /* @__PURE__ */ React64.createElement(PanelDivider, null), /* @__PURE__ */ React64.createElement(TextAlignmentField, null), /* @__PURE__ */ React64.createElement(TextColorField, null), /* @__PURE__ */ React64.createElement(CollapsibleContent, null, /* @__PURE__ */ React64.createElement(SectionContent, { sx: { pt: 2 } }, /* @__PURE__ */ React64.createElement(LineHeightField, null), /* @__PURE__ */ React64.createElement(LetterSpacingField, null), /* @__PURE__ */ React64.createElement(WordSpacingField, null), /* @__PURE__ */ React64.createElement(PanelDivider, null), /* @__PURE__ */ React64.createElement(TextDecorationField, null), /* @__PURE__ */ React64.createElement(TransformField, null), /* @__PURE__ */ React64.createElement(TextDirectionField, null), /* @__PURE__ */ React64.createElement(FontStyleField, null), /* @__PURE__ */ React64.createElement(TextStrokeField, null))));
|
|
2672
2761
|
};
|
|
2673
2762
|
|
|
2674
2763
|
// src/components/style-tab.tsx
|
|
@@ -2677,7 +2766,7 @@ var StyleTab = () => {
|
|
|
2677
2766
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp);
|
|
2678
2767
|
const [activeStyleState, setActiveStyleState] = useState7(null);
|
|
2679
2768
|
const breakpoint = useActiveBreakpoint();
|
|
2680
|
-
return /* @__PURE__ */
|
|
2769
|
+
return /* @__PURE__ */ React65.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React65.createElement(
|
|
2681
2770
|
StyleProvider,
|
|
2682
2771
|
{
|
|
2683
2772
|
meta: { breakpoint, state: activeStyleState },
|
|
@@ -2688,7 +2777,7 @@ var StyleTab = () => {
|
|
|
2688
2777
|
},
|
|
2689
2778
|
setMetaState: setActiveStyleState
|
|
2690
2779
|
},
|
|
2691
|
-
/* @__PURE__ */
|
|
2780
|
+
/* @__PURE__ */ React65.createElement(SessionStorageProvider2, { prefix: activeStyleDefId ?? "" }, /* @__PURE__ */ React65.createElement(StyleInheritanceProvider, null, /* @__PURE__ */ React65.createElement(CssClassSelector, null), /* @__PURE__ */ React65.createElement(Divider4, null), /* @__PURE__ */ React65.createElement(SectionsList, null, /* @__PURE__ */ React65.createElement(Section, { title: __43("Layout", "elementor") }, /* @__PURE__ */ React65.createElement(LayoutSection, null)), /* @__PURE__ */ React65.createElement(Section, { title: __43("Spacing", "elementor") }, /* @__PURE__ */ React65.createElement(SpacingSection, null)), /* @__PURE__ */ React65.createElement(Section, { title: __43("Size", "elementor") }, /* @__PURE__ */ React65.createElement(SizeSection, null)), /* @__PURE__ */ React65.createElement(Section, { title: __43("Position", "elementor") }, /* @__PURE__ */ React65.createElement(PositionSection, null)), /* @__PURE__ */ React65.createElement(Section, { title: __43("Typography", "elementor") }, /* @__PURE__ */ React65.createElement(TypographySection, null)), /* @__PURE__ */ React65.createElement(Section, { title: __43("Background", "elementor") }, /* @__PURE__ */ React65.createElement(BackgroundSection, null)), /* @__PURE__ */ React65.createElement(Section, { title: __43("Border", "elementor") }, /* @__PURE__ */ React65.createElement(BorderSection, null)), /* @__PURE__ */ React65.createElement(Section, { title: __43("Effects", "elementor") }, /* @__PURE__ */ React65.createElement(EffectsSection, null)))))
|
|
2692
2781
|
));
|
|
2693
2782
|
};
|
|
2694
2783
|
function useActiveStyleDefId(currentClassesProp) {
|
|
@@ -2720,7 +2809,7 @@ var EditingPanelTabs = () => {
|
|
|
2720
2809
|
return (
|
|
2721
2810
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
2722
2811
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
2723
|
-
/* @__PURE__ */
|
|
2812
|
+
/* @__PURE__ */ React66.createElement(Fragment8, { key: element.id }, /* @__PURE__ */ React66.createElement(Stack16, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React66.createElement(Tabs, { variant: "fullWidth", size: "small", sx: { mt: 0.5 }, ...getTabsProps() }, /* @__PURE__ */ React66.createElement(Tab, { label: __44("General", "elementor"), ...getTabProps("settings") }), /* @__PURE__ */ React66.createElement(Tab, { label: __44("Style", "elementor"), ...getTabProps("style") })), /* @__PURE__ */ React66.createElement(Divider5, null), /* @__PURE__ */ React66.createElement(TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React66.createElement(SettingsTab, null)), /* @__PURE__ */ React66.createElement(TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React66.createElement(StyleTab, null))))
|
|
2724
2813
|
);
|
|
2725
2814
|
};
|
|
2726
2815
|
|
|
@@ -2734,7 +2823,7 @@ var EditingPanel = () => {
|
|
|
2734
2823
|
return null;
|
|
2735
2824
|
}
|
|
2736
2825
|
const panelTitle = __45("Edit %s", "elementor").replace("%s", elementType.title);
|
|
2737
|
-
return /* @__PURE__ */
|
|
2826
|
+
return /* @__PURE__ */ React67.createElement(ErrorBoundary, { fallback: /* @__PURE__ */ React67.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React67.createElement(SessionStorageProvider3, { prefix: "elementor" }, /* @__PURE__ */ React67.createElement(ThemeProvider9, null, /* @__PURE__ */ React67.createElement(Panel, null, /* @__PURE__ */ React67.createElement(PanelHeader, null, /* @__PURE__ */ React67.createElement(PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React67.createElement(AtomIcon, { fontSize: "small", sx: { color: "text.tertiary" } })), /* @__PURE__ */ React67.createElement(PanelBody, null, /* @__PURE__ */ React67.createElement(ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React67.createElement(ControlReplacementProvider, { ...controlReplacement }, /* @__PURE__ */ React67.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React67.createElement(EditingPanelTabs, null)))))))));
|
|
2738
2827
|
};
|
|
2739
2828
|
|
|
2740
2829
|
// src/panel.ts
|
|
@@ -2782,10 +2871,13 @@ var EditingPanelHooks = () => {
|
|
|
2782
2871
|
return null;
|
|
2783
2872
|
};
|
|
2784
2873
|
|
|
2874
|
+
// src/dynamics/init.ts
|
|
2875
|
+
import { settingsTransformersRegistry, styleTransformersRegistry } from "@elementor/editor-canvas";
|
|
2876
|
+
|
|
2785
2877
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
2786
|
-
import * as
|
|
2878
|
+
import * as React71 from "react";
|
|
2787
2879
|
import { useId as useId4 } from "react";
|
|
2788
|
-
import {
|
|
2880
|
+
import { ControlFormLabel as ControlFormLabel5, useBoundProp as useBoundProp5 } from "@elementor/editor-controls";
|
|
2789
2881
|
import { DatabaseIcon as DatabaseIcon2, SettingsIcon, XIcon as XIcon2 } from "@elementor/icons";
|
|
2790
2882
|
import {
|
|
2791
2883
|
bindPopover as bindPopover2,
|
|
@@ -2796,7 +2888,7 @@ import {
|
|
|
2796
2888
|
IconButton as IconButton3,
|
|
2797
2889
|
Paper,
|
|
2798
2890
|
Popover as Popover2,
|
|
2799
|
-
Stack as
|
|
2891
|
+
Stack as Stack19,
|
|
2800
2892
|
Tab as Tab2,
|
|
2801
2893
|
TabPanel as TabPanel2,
|
|
2802
2894
|
Tabs as Tabs2,
|
|
@@ -2808,9 +2900,9 @@ import {
|
|
|
2808
2900
|
import { __ as __47 } from "@wordpress/i18n";
|
|
2809
2901
|
|
|
2810
2902
|
// src/components/popover-content.tsx
|
|
2811
|
-
import * as
|
|
2812
|
-
import { Stack as
|
|
2813
|
-
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */
|
|
2903
|
+
import * as React68 from "react";
|
|
2904
|
+
import { Stack as Stack17 } from "@elementor/ui";
|
|
2905
|
+
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */ React68.createElement(Stack17, { alignItems, gap, p }, children);
|
|
2814
2906
|
|
|
2815
2907
|
// src/hooks/use-persist-dynamic-value.ts
|
|
2816
2908
|
import { useSessionStorage as useSessionStorage2 } from "@elementor/session";
|
|
@@ -2821,7 +2913,7 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
2821
2913
|
};
|
|
2822
2914
|
|
|
2823
2915
|
// src/dynamics/dynamic-control.tsx
|
|
2824
|
-
import * as
|
|
2916
|
+
import * as React69 from "react";
|
|
2825
2917
|
import { PropKeyProvider as PropKeyProvider3, PropProvider as PropProvider3, useBoundProp as useBoundProp3 } from "@elementor/editor-controls";
|
|
2826
2918
|
|
|
2827
2919
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
@@ -2923,11 +3015,11 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
2923
3015
|
});
|
|
2924
3016
|
};
|
|
2925
3017
|
const propType = createTopLevelOjectType({ schema: dynamicTag.props_schema });
|
|
2926
|
-
return /* @__PURE__ */
|
|
3018
|
+
return /* @__PURE__ */ React69.createElement(PropProvider3, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React69.createElement(PropKeyProvider3, { bind }, children));
|
|
2927
3019
|
};
|
|
2928
3020
|
|
|
2929
3021
|
// src/dynamics/components/dynamic-selection.tsx
|
|
2930
|
-
import * as
|
|
3022
|
+
import * as React70 from "react";
|
|
2931
3023
|
import { Fragment as Fragment9, useState as useState8 } from "react";
|
|
2932
3024
|
import { useBoundProp as useBoundProp4 } from "@elementor/editor-controls";
|
|
2933
3025
|
import { DatabaseIcon, SearchIcon } from "@elementor/icons";
|
|
@@ -2939,7 +3031,7 @@ import {
|
|
|
2939
3031
|
MenuItem,
|
|
2940
3032
|
MenuList,
|
|
2941
3033
|
MenuSubheader as MenuSubheader2,
|
|
2942
|
-
Stack as
|
|
3034
|
+
Stack as Stack18,
|
|
2943
3035
|
TextField as TextField2,
|
|
2944
3036
|
Typography as Typography4
|
|
2945
3037
|
} from "@elementor/ui";
|
|
@@ -2957,14 +3049,14 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2957
3049
|
const handleSearch = (event) => {
|
|
2958
3050
|
setSearchValue(event.target.value);
|
|
2959
3051
|
};
|
|
2960
|
-
const handleSetDynamicTag = (value) => {
|
|
3052
|
+
const handleSetDynamicTag = (value, label) => {
|
|
2961
3053
|
if (!isCurrentValueDynamic) {
|
|
2962
3054
|
updatePropValueHistory(anyValue);
|
|
2963
3055
|
}
|
|
2964
|
-
setValue({ name: value, settings: {} });
|
|
3056
|
+
setValue({ name: value, settings: { label } });
|
|
2965
3057
|
onSelect?.();
|
|
2966
3058
|
};
|
|
2967
|
-
return /* @__PURE__ */
|
|
3059
|
+
return /* @__PURE__ */ React70.createElement(Stack18, null, hasNoDynamicTags ? /* @__PURE__ */ React70.createElement(NoDynamicTags, null) : /* @__PURE__ */ React70.createElement(Fragment9, null, /* @__PURE__ */ React70.createElement(Box4, { px: 1.5, pb: 1 }, /* @__PURE__ */ React70.createElement(
|
|
2968
3060
|
TextField2,
|
|
2969
3061
|
{
|
|
2970
3062
|
fullWidth: true,
|
|
@@ -2973,10 +3065,10 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2973
3065
|
onChange: handleSearch,
|
|
2974
3066
|
placeholder: __46("Search dynamic tags\u2026", "elementor"),
|
|
2975
3067
|
InputProps: {
|
|
2976
|
-
startAdornment: /* @__PURE__ */
|
|
3068
|
+
startAdornment: /* @__PURE__ */ React70.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React70.createElement(SearchIcon, { fontSize: SIZE3 }))
|
|
2977
3069
|
}
|
|
2978
3070
|
}
|
|
2979
|
-
)), /* @__PURE__ */
|
|
3071
|
+
)), /* @__PURE__ */ React70.createElement(Divider6, null), /* @__PURE__ */ React70.createElement(Box4, { sx: { overflowY: "auto", height: 260, width: 220 } }, options13.length > 0 ? /* @__PURE__ */ React70.createElement(MenuList, { role: "listbox", tabIndex: 0 }, options13.map(([category, items3], index) => /* @__PURE__ */ React70.createElement(Fragment9, { key: index }, /* @__PURE__ */ React70.createElement(
|
|
2980
3072
|
MenuSubheader2,
|
|
2981
3073
|
{
|
|
2982
3074
|
sx: { px: 1.5, typography: "caption", color: "text.tertiary" }
|
|
@@ -2984,21 +3076,21 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2984
3076
|
dynamicGroups?.[category]?.title || category
|
|
2985
3077
|
), items3.map(({ value, label: tagLabel }) => {
|
|
2986
3078
|
const isSelected = isCurrentValueDynamic && value === dynamicValue?.name;
|
|
2987
|
-
return /* @__PURE__ */
|
|
3079
|
+
return /* @__PURE__ */ React70.createElement(
|
|
2988
3080
|
MenuItem,
|
|
2989
3081
|
{
|
|
2990
3082
|
key: value,
|
|
2991
3083
|
selected: isSelected,
|
|
2992
3084
|
autoFocus: isSelected,
|
|
2993
|
-
sx: { px:
|
|
2994
|
-
onClick: () => handleSetDynamicTag(value)
|
|
3085
|
+
sx: { px: 3.5, typography: "caption" },
|
|
3086
|
+
onClick: () => handleSetDynamicTag(value, tagLabel)
|
|
2995
3087
|
},
|
|
2996
3088
|
tagLabel
|
|
2997
3089
|
);
|
|
2998
|
-
})))) : /* @__PURE__ */
|
|
3090
|
+
})))) : /* @__PURE__ */ React70.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") }))));
|
|
2999
3091
|
};
|
|
3000
|
-
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */
|
|
3001
|
-
|
|
3092
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React70.createElement(
|
|
3093
|
+
Stack18,
|
|
3002
3094
|
{
|
|
3003
3095
|
gap: 1,
|
|
3004
3096
|
alignItems: "center",
|
|
@@ -3008,12 +3100,12 @@ var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React69.createElem
|
|
|
3008
3100
|
color: "text.secondary",
|
|
3009
3101
|
sx: { pb: 3.5 }
|
|
3010
3102
|
},
|
|
3011
|
-
/* @__PURE__ */
|
|
3012
|
-
/* @__PURE__ */
|
|
3013
|
-
/* @__PURE__ */
|
|
3103
|
+
/* @__PURE__ */ React70.createElement(DatabaseIcon, { fontSize: "large" }),
|
|
3104
|
+
/* @__PURE__ */ React70.createElement(Typography4, { align: "center", variant: "subtitle2" }, __46("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React70.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
3105
|
+
/* @__PURE__ */ React70.createElement(Typography4, { align: "center", variant: "caption" }, __46("Try something else.", "elementor"), "\xA0", /* @__PURE__ */ React70.createElement(Link, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, __46("Clear & try again", "elementor")))
|
|
3014
3106
|
);
|
|
3015
|
-
var NoDynamicTags = () => /* @__PURE__ */
|
|
3016
|
-
|
|
3107
|
+
var NoDynamicTags = () => /* @__PURE__ */ React70.createElement(Box4, { sx: { overflowY: "hidden", height: 297, width: 220 } }, /* @__PURE__ */ React70.createElement(Divider6, null), /* @__PURE__ */ React70.createElement(
|
|
3108
|
+
Stack18,
|
|
3017
3109
|
{
|
|
3018
3110
|
gap: 1,
|
|
3019
3111
|
alignItems: "center",
|
|
@@ -3023,9 +3115,9 @@ var NoDynamicTags = () => /* @__PURE__ */ React69.createElement(Box4, { sx: { ov
|
|
|
3023
3115
|
color: "text.secondary",
|
|
3024
3116
|
sx: { pb: 3.5 }
|
|
3025
3117
|
},
|
|
3026
|
-
/* @__PURE__ */
|
|
3027
|
-
/* @__PURE__ */
|
|
3028
|
-
/* @__PURE__ */
|
|
3118
|
+
/* @__PURE__ */ React70.createElement(DatabaseIcon, { fontSize: "large" }),
|
|
3119
|
+
/* @__PURE__ */ React70.createElement(Typography4, { align: "center", variant: "subtitle2" }, __46("Streamline your workflow with dynamic tags", "elementor")),
|
|
3120
|
+
/* @__PURE__ */ React70.createElement(Typography4, { align: "center", variant: "caption" }, __46("You\u2019ll need Elementor Pro to use this feature.", "elementor"))
|
|
3029
3121
|
));
|
|
3030
3122
|
var useFilteredOptions = (searchValue) => {
|
|
3031
3123
|
const dynamicTags = usePropDynamicTags();
|
|
@@ -3059,25 +3151,25 @@ var DynamicSelectionControl = () => {
|
|
|
3059
3151
|
if (!dynamicTag) {
|
|
3060
3152
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
3061
3153
|
}
|
|
3062
|
-
return /* @__PURE__ */
|
|
3154
|
+
return /* @__PURE__ */ React71.createElement(Box5, null, /* @__PURE__ */ React71.createElement(
|
|
3063
3155
|
Tag,
|
|
3064
3156
|
{
|
|
3065
3157
|
fullWidth: true,
|
|
3066
3158
|
showActionsOnHover: true,
|
|
3067
3159
|
label: dynamicTag.label,
|
|
3068
|
-
startIcon: /* @__PURE__ */
|
|
3160
|
+
startIcon: /* @__PURE__ */ React71.createElement(DatabaseIcon2, { fontSize: SIZE4 }),
|
|
3069
3161
|
...bindTrigger2(selectionPopoverState),
|
|
3070
|
-
actions: /* @__PURE__ */
|
|
3162
|
+
actions: /* @__PURE__ */ React71.createElement(React71.Fragment, null, /* @__PURE__ */ React71.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React71.createElement(
|
|
3071
3163
|
IconButton3,
|
|
3072
3164
|
{
|
|
3073
3165
|
size: SIZE4,
|
|
3074
3166
|
onClick: removeDynamicTag,
|
|
3075
3167
|
"aria-label": __47("Remove dynamic value", "elementor")
|
|
3076
3168
|
},
|
|
3077
|
-
/* @__PURE__ */
|
|
3169
|
+
/* @__PURE__ */ React71.createElement(XIcon2, { fontSize: SIZE4 })
|
|
3078
3170
|
))
|
|
3079
3171
|
}
|
|
3080
|
-
), /* @__PURE__ */
|
|
3172
|
+
), /* @__PURE__ */ React71.createElement(
|
|
3081
3173
|
Popover2,
|
|
3082
3174
|
{
|
|
3083
3175
|
disablePortal: true,
|
|
@@ -3085,7 +3177,7 @@ var DynamicSelectionControl = () => {
|
|
|
3085
3177
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
3086
3178
|
...bindPopover2(selectionPopoverState)
|
|
3087
3179
|
},
|
|
3088
|
-
/* @__PURE__ */
|
|
3180
|
+
/* @__PURE__ */ React71.createElement(Stack19, null, /* @__PURE__ */ React71.createElement(Stack19, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React71.createElement(DatabaseIcon2, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React71.createElement(Typography5, { variant: "subtitle2" }, __47("Dynamic tags", "elementor")), /* @__PURE__ */ React71.createElement(IconButton3, { size: SIZE4, sx: { ml: "auto" }, onClick: selectionPopoverState.close }, /* @__PURE__ */ React71.createElement(XIcon2, { fontSize: SIZE4 }))), /* @__PURE__ */ React71.createElement(DynamicSelection, { onSelect: selectionPopoverState.close }))
|
|
3089
3181
|
));
|
|
3090
3182
|
};
|
|
3091
3183
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
@@ -3095,22 +3187,22 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
3095
3187
|
if (!hasDynamicSettings) {
|
|
3096
3188
|
return null;
|
|
3097
3189
|
}
|
|
3098
|
-
return /* @__PURE__ */
|
|
3190
|
+
return /* @__PURE__ */ React71.createElement(React71.Fragment, null, /* @__PURE__ */ React71.createElement(
|
|
3099
3191
|
IconButton3,
|
|
3100
3192
|
{
|
|
3101
3193
|
size: SIZE4,
|
|
3102
3194
|
...bindTrigger2(settingsPopupState),
|
|
3103
3195
|
"aria-label": __47("Settings", "elementor")
|
|
3104
3196
|
},
|
|
3105
|
-
/* @__PURE__ */
|
|
3106
|
-
), /* @__PURE__ */
|
|
3197
|
+
/* @__PURE__ */ React71.createElement(SettingsIcon, { fontSize: SIZE4 })
|
|
3198
|
+
), /* @__PURE__ */ React71.createElement(
|
|
3107
3199
|
Popover2,
|
|
3108
3200
|
{
|
|
3109
3201
|
disableScrollLock: true,
|
|
3110
3202
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
3111
3203
|
...bindPopover2(settingsPopupState)
|
|
3112
3204
|
},
|
|
3113
|
-
/* @__PURE__ */
|
|
3205
|
+
/* @__PURE__ */ React71.createElement(Paper, { component: Stack19, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React71.createElement(Stack19, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React71.createElement(DatabaseIcon2, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React71.createElement(Typography5, { variant: "subtitle2" }, dynamicTag.label), /* @__PURE__ */ React71.createElement(IconButton3, { sx: { ml: "auto" }, size: SIZE4, onClick: settingsPopupState.close }, /* @__PURE__ */ React71.createElement(XIcon2, { fontSize: SIZE4 }))), /* @__PURE__ */ React71.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls }))
|
|
3114
3206
|
));
|
|
3115
3207
|
};
|
|
3116
3208
|
var DynamicSettings = ({ controls }) => {
|
|
@@ -3119,10 +3211,10 @@ var DynamicSettings = ({ controls }) => {
|
|
|
3119
3211
|
if (!tabs.length) {
|
|
3120
3212
|
return null;
|
|
3121
3213
|
}
|
|
3122
|
-
return /* @__PURE__ */
|
|
3123
|
-
return /* @__PURE__ */
|
|
3214
|
+
return /* @__PURE__ */ React71.createElement(React71.Fragment, null, /* @__PURE__ */ React71.createElement(Tabs2, { size: "small", variant: "fullWidth", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React71.createElement(Tab2, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React71.createElement(Divider7, null), tabs.map(({ value }, index) => {
|
|
3215
|
+
return /* @__PURE__ */ React71.createElement(TabPanel2, { key: index, sx: { flexGrow: 1, py: 0 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React71.createElement(PopoverContent, { p: 2, gap: 2 }, value.items.map((item) => {
|
|
3124
3216
|
if (item.type === "control") {
|
|
3125
|
-
return /* @__PURE__ */
|
|
3217
|
+
return /* @__PURE__ */ React71.createElement(Control3, { key: item.value.bind, control: item.value });
|
|
3126
3218
|
}
|
|
3127
3219
|
return null;
|
|
3128
3220
|
})));
|
|
@@ -3132,11 +3224,60 @@ var Control3 = ({ control }) => {
|
|
|
3132
3224
|
if (!getControlByType(control.type)) {
|
|
3133
3225
|
return null;
|
|
3134
3226
|
}
|
|
3135
|
-
return /* @__PURE__ */
|
|
3227
|
+
return /* @__PURE__ */ React71.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React71.createElement(Grid26, { container: true, gap: 0.75 }, control.label ? /* @__PURE__ */ React71.createElement(Grid26, { item: true, xs: 12 }, /* @__PURE__ */ React71.createElement(ControlFormLabel5, null, control.label)) : null, /* @__PURE__ */ React71.createElement(Grid26, { item: true, xs: 12 }, /* @__PURE__ */ React71.createElement(Control, { type: control.type, props: control.props }))));
|
|
3136
3228
|
};
|
|
3137
3229
|
|
|
3230
|
+
// src/dynamics/dynamic-transformer.ts
|
|
3231
|
+
import { createTransformer } from "@elementor/editor-canvas";
|
|
3232
|
+
import { isTransformable as isTransformable2 } from "@elementor/editor-props";
|
|
3233
|
+
|
|
3234
|
+
// src/dynamics/errors.ts
|
|
3235
|
+
import { createError as createError2 } from "@elementor/utils";
|
|
3236
|
+
var DynamicTagsManagerNotFoundError = createError2({
|
|
3237
|
+
code: "dynamic_tags_manager_not_found",
|
|
3238
|
+
message: "Dynamic tags manager not found"
|
|
3239
|
+
});
|
|
3240
|
+
|
|
3241
|
+
// src/dynamics/dynamic-transformer.ts
|
|
3242
|
+
var dynamicTransformer = createTransformer((value) => {
|
|
3243
|
+
if (!value.name) {
|
|
3244
|
+
return null;
|
|
3245
|
+
}
|
|
3246
|
+
return getDynamicValue(value.name, simpleTransform(value.settings ?? {}));
|
|
3247
|
+
});
|
|
3248
|
+
function simpleTransform(props) {
|
|
3249
|
+
const transformed = Object.entries(props).map(([settingKey, settingValue]) => {
|
|
3250
|
+
const value = isTransformable2(settingValue) ? settingValue.value : settingValue;
|
|
3251
|
+
return [settingKey, value];
|
|
3252
|
+
});
|
|
3253
|
+
return Object.fromEntries(transformed);
|
|
3254
|
+
}
|
|
3255
|
+
function getDynamicValue(name, settings) {
|
|
3256
|
+
const extendedWindow = window;
|
|
3257
|
+
const { dynamicTags } = extendedWindow.elementor ?? {};
|
|
3258
|
+
if (!dynamicTags) {
|
|
3259
|
+
throw new DynamicTagsManagerNotFoundError();
|
|
3260
|
+
}
|
|
3261
|
+
const getTagValue = () => {
|
|
3262
|
+
const tag = dynamicTags.createTag("v4-dynamic-tag", name, settings);
|
|
3263
|
+
if (!tag) {
|
|
3264
|
+
return null;
|
|
3265
|
+
}
|
|
3266
|
+
return dynamicTags.loadTagDataFromCache(tag) ?? null;
|
|
3267
|
+
};
|
|
3268
|
+
const tagValue = getTagValue();
|
|
3269
|
+
if (tagValue !== null) {
|
|
3270
|
+
return tagValue;
|
|
3271
|
+
}
|
|
3272
|
+
return new Promise((resolve) => {
|
|
3273
|
+
dynamicTags.refreshCacheFromServer(() => {
|
|
3274
|
+
resolve(getTagValue());
|
|
3275
|
+
});
|
|
3276
|
+
});
|
|
3277
|
+
}
|
|
3278
|
+
|
|
3138
3279
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
3139
|
-
import * as
|
|
3280
|
+
import * as React72 from "react";
|
|
3140
3281
|
import { useBoundProp as useBoundProp6 } from "@elementor/editor-controls";
|
|
3141
3282
|
import { DatabaseIcon as DatabaseIcon3 } from "@elementor/icons";
|
|
3142
3283
|
import { __ as __48 } from "@wordpress/i18n";
|
|
@@ -3147,7 +3288,7 @@ var usePropDynamicAction = () => {
|
|
|
3147
3288
|
visible,
|
|
3148
3289
|
icon: DatabaseIcon3,
|
|
3149
3290
|
title: __48("Dynamic tags", "elementor"),
|
|
3150
|
-
popoverContent: ({ closePopover }) => /* @__PURE__ */
|
|
3291
|
+
popoverContent: ({ closePopover }) => /* @__PURE__ */ React72.createElement(DynamicSelection, { onSelect: closePopover })
|
|
3151
3292
|
};
|
|
3152
3293
|
};
|
|
3153
3294
|
|
|
@@ -3162,6 +3303,8 @@ var init = () => {
|
|
|
3162
3303
|
id: "dynamic-tags",
|
|
3163
3304
|
useProps: usePropDynamicAction
|
|
3164
3305
|
});
|
|
3306
|
+
styleTransformersRegistry.register("dynamic", dynamicTransformer);
|
|
3307
|
+
settingsTransformersRegistry.register("dynamic", dynamicTransformer);
|
|
3165
3308
|
};
|
|
3166
3309
|
|
|
3167
3310
|
// src/init.ts
|