@elementor/editor-editing-panel 1.24.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/dist/index.js CHANGED
@@ -50,7 +50,7 @@ var import_editor_props = require("@elementor/editor-props");
50
50
  var import_editor_styles_repository4 = require("@elementor/editor-styles-repository");
51
51
  var import_icons2 = require("@elementor/icons");
52
52
  var import_locations = require("@elementor/locations");
53
- var import_ui4 = require("@elementor/ui");
53
+ var import_ui5 = require("@elementor/ui");
54
54
  var import_i18n3 = require("@wordpress/i18n");
55
55
 
56
56
  // src/contexts/classes-prop-context.tsx
@@ -260,14 +260,14 @@ var import_react5 = require("react");
260
260
  var import_editor_styles_repository3 = require("@elementor/editor-styles-repository");
261
261
  var import_editor_ui2 = require("@elementor/editor-ui");
262
262
  var import_icons = require("@elementor/icons");
263
- var import_ui3 = require("@elementor/ui");
263
+ var import_ui4 = require("@elementor/ui");
264
264
  var import_i18n2 = require("@wordpress/i18n");
265
265
 
266
266
  // src/components/css-classes/css-class-menu.tsx
267
267
  var React5 = __toESM(require("react"));
268
268
  var import_editor_styles_repository2 = require("@elementor/editor-styles-repository");
269
269
  var import_editor_ui = require("@elementor/editor-ui");
270
- var import_ui2 = require("@elementor/ui");
270
+ var import_ui3 = require("@elementor/ui");
271
271
  var import_i18n = require("@wordpress/i18n");
272
272
 
273
273
  // src/hooks/use-unapply-class.ts
@@ -292,17 +292,41 @@ var useUnapplyClass = (classId) => {
292
292
  };
293
293
  };
294
294
 
295
+ // src/components/style-indicator.tsx
296
+ var import_ui2 = require("@elementor/ui");
297
+ var StyleIndicator = (0, import_ui2.styled)("div", {
298
+ shouldForwardProp: (prop) => prop !== "variant"
299
+ })`
300
+ width: 5px;
301
+ height: 5px;
302
+ border-radius: 50%;
303
+ background-color: ${({ theme, variant }) => {
304
+ switch (variant) {
305
+ case "overridden":
306
+ return theme.palette.warning.light;
307
+ case "global":
308
+ return theme.palette.global.dark;
309
+ case "local":
310
+ return theme.palette.accent.main;
311
+ default:
312
+ return theme.palette.text.disabled;
313
+ }
314
+ }};
315
+ `;
316
+
295
317
  // src/components/css-classes/css-class-menu.tsx
296
318
  var STATES = ["hover", "focus", "active"];
297
319
  function CssClassMenu({ styleId, provider, popupState, handleRename, anchorEl }) {
320
+ const styledStates = useStyledStates(styleId);
321
+ const indicatorVariant = provider === import_editor_styles_repository2.ELEMENTS_STYLES_PROVIDER_KEY ? "local" : "global";
298
322
  const handleKeyDown = (e) => {
299
323
  e.stopPropagation();
300
324
  };
301
325
  return /* @__PURE__ */ React5.createElement(
302
- import_ui2.Menu,
326
+ import_ui3.Menu,
303
327
  {
304
- MenuListProps: { dense: true },
305
- ...(0, import_ui2.bindMenu)(popupState),
328
+ MenuListProps: { dense: true, sx: { minWidth: "160px" } },
329
+ ...(0, import_ui3.bindMenu)(popupState),
306
330
  anchorEl,
307
331
  anchorOrigin: {
308
332
  vertical: "bottom",
@@ -315,13 +339,40 @@ function CssClassMenu({ styleId, provider, popupState, handleRename, anchorEl })
315
339
  onKeyDown: handleKeyDown
316
340
  },
317
341
  getMenuItemsByProvider({ provider, styleId, handleRename, closeMenu: popupState.close }),
318
- /* @__PURE__ */ React5.createElement(import_ui2.MenuSubheader, { sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1 } }, (0, import_i18n.__)("Pseudo classes", "elementor")),
319
- /* @__PURE__ */ React5.createElement(StateMenuItem, { key: "normal", state: null, styleId, closeMenu: popupState.close }),
342
+ /* @__PURE__ */ React5.createElement(import_ui3.MenuSubheader, { sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1 } }, (0, import_i18n.__)("States", "elementor")),
343
+ /* @__PURE__ */ React5.createElement(
344
+ StateMenuItem,
345
+ {
346
+ key: "normal",
347
+ state: null,
348
+ styleId,
349
+ closeMenu: popupState.close,
350
+ isStyled: styledStates.normal,
351
+ indicatorVariant
352
+ }
353
+ ),
320
354
  STATES.map((state) => {
321
- return /* @__PURE__ */ React5.createElement(StateMenuItem, { key: state, state, styleId, closeMenu: popupState.close });
355
+ return /* @__PURE__ */ React5.createElement(
356
+ StateMenuItem,
357
+ {
358
+ key: state,
359
+ state,
360
+ styleId,
361
+ closeMenu: popupState.close,
362
+ isStyled: styledStates[state],
363
+ indicatorVariant
364
+ }
365
+ );
322
366
  })
323
367
  );
324
368
  }
369
+ function useStyledStates(styleId) {
370
+ const { meta } = useStyle();
371
+ const styleDef = import_editor_styles_repository2.stylesRepository.all().find((style) => style.id === styleId);
372
+ return Object.fromEntries(
373
+ styleDef?.variants.filter((variant) => meta.breakpoint === variant.meta.breakpoint).map((variant) => [variant.meta.state ?? "normal", true]) ?? []
374
+ );
375
+ }
325
376
  function getMenuItemsByProvider({
326
377
  provider,
327
378
  styleId,
@@ -341,19 +392,26 @@ function getMenuItemsByProvider({
341
392
  if (actions.length) {
342
393
  actions.unshift(
343
394
  /* @__PURE__ */ React5.createElement(
344
- import_ui2.MenuSubheader,
395
+ import_ui3.MenuSubheader,
345
396
  {
346
397
  key: "provider-label",
347
- sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1 }
398
+ sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1, textTransform: "capitalize" }
348
399
  },
349
400
  providerInstance?.labels?.singular
350
401
  )
351
402
  );
352
- actions.push(/* @__PURE__ */ React5.createElement(import_ui2.Divider, { key: "provider-actions-divider" }));
403
+ actions.push(/* @__PURE__ */ React5.createElement(import_ui3.Divider, { key: "provider-actions-divider" }));
353
404
  }
354
405
  return actions;
355
406
  }
356
- function StateMenuItem({ state, styleId, closeMenu, ...props }) {
407
+ function StateMenuItem({
408
+ state,
409
+ styleId,
410
+ closeMenu,
411
+ isStyled = false,
412
+ indicatorVariant,
413
+ ...props
414
+ }) {
357
415
  const { id: activeId, setId: setActiveId, setMetaState: setActiveMetaState, meta } = useStyle();
358
416
  const { state: activeState } = meta;
359
417
  const isActive = styleId === activeId;
@@ -372,7 +430,7 @@ function StateMenuItem({ state, styleId, closeMenu, ...props }) {
372
430
  closeMenu();
373
431
  }
374
432
  },
375
- state ? state : "Normal"
433
+ /* @__PURE__ */ React5.createElement(import_ui3.Stack, { gap: 0.75, direction: "row", alignItems: "center" }, isStyled && /* @__PURE__ */ React5.createElement(StyleIndicator, { "aria-label": (0, import_i18n.__)("Has style", "elementor"), variant: indicatorVariant }), state ?? "normal")
376
434
  );
377
435
  }
378
436
  function UnapplyClassMenuItem({ styleId, closeMenu, ...props }) {
@@ -421,7 +479,7 @@ function CssClassItem({
421
479
  renameLabel
422
480
  }) {
423
481
  const { meta, setMetaState } = useStyle();
424
- const popupState = (0, import_ui3.usePopupState)({ variant: "popover" });
482
+ const popupState = (0, import_ui4.usePopupState)({ variant: "popover" });
425
483
  const [chipRef, setChipRef] = (0, import_react5.useState)(null);
426
484
  const { onDelete, ...chipGroupProps } = chipProps;
427
485
  const {
@@ -440,7 +498,7 @@ function CssClassItem({
440
498
  const allowRename = Boolean(providerActions?.update);
441
499
  const isShowingState = isActive && meta.state;
442
500
  return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(
443
- import_ui3.UnstableChipGroup,
501
+ import_ui4.UnstableChipGroup,
444
502
  {
445
503
  ref: setChipRef,
446
504
  ...chipGroupProps,
@@ -451,7 +509,7 @@ function CssClassItem({
451
509
  })
452
510
  },
453
511
  /* @__PURE__ */ React6.createElement(
454
- import_ui3.Chip,
512
+ import_ui4.Chip,
455
513
  {
456
514
  size: CHIP_SIZE,
457
515
  label: isEditing ? /* @__PURE__ */ React6.createElement(import_editor_ui2.EditableField, { ref, error, ...getEditableProps() }) : /* @__PURE__ */ React6.createElement(import_editor_ui2.EllipsisWithTooltip, { maxWidth: "10ch", title: label, as: "div" }),
@@ -481,15 +539,15 @@ function CssClassItem({
481
539
  }
482
540
  ),
483
541
  !isEditing && /* @__PURE__ */ React6.createElement(
484
- import_ui3.Chip,
542
+ import_ui4.Chip,
485
543
  {
486
544
  icon: isShowingState ? void 0 : /* @__PURE__ */ React6.createElement(import_icons.DotsVerticalIcon, { fontSize: "tiny" }),
487
545
  size: CHIP_SIZE,
488
- label: isShowingState ? /* @__PURE__ */ React6.createElement(import_ui3.Stack, { direction: "row", gap: 0.5, alignItems: "center" }, /* @__PURE__ */ React6.createElement(import_ui3.Typography, { variant: "inherit" }, meta.state), /* @__PURE__ */ React6.createElement(import_icons.DotsVerticalIcon, { fontSize: "tiny" })) : void 0,
546
+ label: isShowingState ? /* @__PURE__ */ React6.createElement(import_ui4.Stack, { direction: "row", gap: 0.5, alignItems: "center" }, /* @__PURE__ */ React6.createElement(import_ui4.Typography, { variant: "inherit" }, meta.state), /* @__PURE__ */ React6.createElement(import_icons.DotsVerticalIcon, { fontSize: "tiny" })) : void 0,
489
547
  variant: "filled",
490
548
  shape: "rounded",
491
549
  color,
492
- ...(0, import_ui3.bindTrigger)(popupState),
550
+ ...(0, import_ui4.bindTrigger)(popupState),
493
551
  "aria-label": (0, import_i18n2.__)("Open CSS Class Menu", "elementor"),
494
552
  sx: (theme) => ({
495
553
  borderRadius: `${theme.shape.borderRadius * 0.75}px`,
@@ -512,10 +570,10 @@ function CssClassItem({
512
570
  }
513
571
  var validateLabel = (newLabel) => {
514
572
  if (!import_editor_styles_repository3.stylesRepository.isLabelValid(newLabel)) {
515
- return (0, import_i18n2.__)("Format is not valid", "elementor");
573
+ return (0, import_i18n2.__)("Invalid format", "elementor");
516
574
  }
517
575
  if (import_editor_styles_repository3.stylesRepository.isLabelExist(newLabel)) {
518
- return (0, import_i18n2.__)("Existing name", "elementor");
576
+ return (0, import_i18n2.__)("Name exists", "elementor");
519
577
  }
520
578
  return null;
521
579
  };
@@ -540,7 +598,7 @@ function CssClassSelector() {
540
598
  const handleApply = useHandleApply(appliedIds, setAppliedIds);
541
599
  const applied = useAppliedOptions(options13, appliedIds);
542
600
  const active = applied.find((option) => option.value === activeId) ?? EMPTY_OPTION;
543
- return /* @__PURE__ */ React7.createElement(import_ui4.Stack, { gap: 1, p: 2 }, /* @__PURE__ */ React7.createElement(import_ui4.Stack, { direction: "row", gap: 1, alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React7.createElement(import_ui4.Typography, { component: "label", variant: "caption", htmlFor: ID }, (0, import_i18n3.__)("CSS classes", "elementor")), /* @__PURE__ */ React7.createElement(import_ui4.Stack, { direction: "row", gap: 1 }, /* @__PURE__ */ React7.createElement(ClassSelectorActionsSlot, null))), /* @__PURE__ */ React7.createElement(
601
+ return /* @__PURE__ */ React7.createElement(import_ui5.Stack, { gap: 1, p: 2 }, /* @__PURE__ */ React7.createElement(import_ui5.Stack, { direction: "row", gap: 1, alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React7.createElement(import_ui5.Typography, { component: "label", variant: "caption", htmlFor: ID }, (0, import_i18n3.__)("Classes", "elementor")), /* @__PURE__ */ React7.createElement(import_ui5.Stack, { direction: "row", gap: 1 }, /* @__PURE__ */ React7.createElement(ClassSelectorActionsSlot, null))), /* @__PURE__ */ React7.createElement(
544
602
  MultiCombobox,
545
603
  {
546
604
  id: ID,
@@ -550,7 +608,7 @@ function CssClassSelector() {
550
608
  onSelect: handleApply,
551
609
  limitTags: TAGS_LIMIT,
552
610
  actions,
553
- getLimitTagsText: (more) => /* @__PURE__ */ React7.createElement(import_ui4.Chip, { size: "tiny", variant: "standard", label: `+${more}`, clickable: true }),
611
+ getLimitTagsText: (more) => /* @__PURE__ */ React7.createElement(import_ui5.Chip, { size: "tiny", variant: "standard", label: `+${more}`, clickable: true }),
554
612
  renderTags: (values, getTagProps) => values.map((value, index) => {
555
613
  const chipProps = getTagProps({ index });
556
614
  const isActive = value.value === active?.value;
@@ -603,7 +661,8 @@ function useOptions() {
603
661
  color: isElements ? "accent" : "global",
604
662
  icon: isElements ? /* @__PURE__ */ React7.createElement(import_icons2.MapPinIcon, null) : null,
605
663
  provider: provider.key,
606
- group: provider.labels?.plural
664
+ // translators: %s is the plural label of the provider (e.g "Existing classes").
665
+ group: (0, import_i18n3.__)("Existing %s", "elementor").replace("%s", provider.labels?.plural ?? "")
607
666
  };
608
667
  });
609
668
  });
@@ -615,9 +674,9 @@ function useCreateActions({
615
674
  return (0, import_editor_styles_repository4.useCreateActionsByProvider)().map(([provider, create]) => {
616
675
  return {
617
676
  // translators: %s is the label of the new class.
618
- label: (value) => (0, import_i18n3.__)('Create new "%s"', "elementor").replace("%s", value),
619
- // translators: %s is the singular label of css class provider (e.g "Global CSS Class").
620
- group: (0, import_i18n3.__)("Create New %s", "elementor").replace("%s", provider.labels?.singular ?? ""),
677
+ label: (value) => (0, import_i18n3.__)('Create "%s"', "elementor").replace("%s", value),
678
+ // translators: %s is the singular label of css class provider (e.g "CSS Class").
679
+ group: (0, import_i18n3.__)("Create a new %s", "elementor").replace("%s", provider.labels?.singular ?? ""),
621
680
  condition: (_, inputValue) => isLabelValid(inputValue) && !hasReachedLimit(provider),
622
681
  apply: (label) => {
623
682
  const createdId = create(label);
@@ -713,7 +772,7 @@ var import_menus = require("@elementor/menus");
713
772
  var React8 = __toESM(require("react"));
714
773
  var import_react6 = require("react");
715
774
  var import_icons3 = require("@elementor/icons");
716
- var import_ui5 = require("@elementor/ui");
775
+ var import_ui6 = require("@elementor/ui");
717
776
  var SIZE = "tiny";
718
777
  function PopoverAction({
719
778
  title,
@@ -722,15 +781,15 @@ function PopoverAction({
722
781
  popoverContent: PopoverContent2
723
782
  }) {
724
783
  const id = (0, import_react6.useId)();
725
- const popupState = (0, import_ui5.usePopupState)({
784
+ const popupState = (0, import_ui6.usePopupState)({
726
785
  variant: "popover",
727
786
  popupId: `elementor-popover-action-${id}`
728
787
  });
729
788
  if (!visible) {
730
789
  return null;
731
790
  }
732
- return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(import_ui5.Tooltip, { placement: "top", title }, /* @__PURE__ */ React8.createElement(import_ui5.IconButton, { "aria-label": title, key: id, size: SIZE, ...(0, import_ui5.bindToggle)(popupState) }, /* @__PURE__ */ React8.createElement(Icon, { fontSize: SIZE }))), /* @__PURE__ */ React8.createElement(
733
- import_ui5.Popover,
791
+ return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(import_ui6.Tooltip, { placement: "top", title }, /* @__PURE__ */ React8.createElement(import_ui6.IconButton, { "aria-label": title, key: id, size: SIZE, ...(0, import_ui6.bindToggle)(popupState) }, /* @__PURE__ */ React8.createElement(Icon, { fontSize: SIZE }))), /* @__PURE__ */ React8.createElement(
792
+ import_ui6.Popover,
734
793
  {
735
794
  disablePortal: true,
736
795
  disableScrollLock: true,
@@ -738,9 +797,9 @@ function PopoverAction({
738
797
  vertical: "bottom",
739
798
  horizontal: "center"
740
799
  },
741
- ...(0, import_ui5.bindPopover)(popupState)
800
+ ...(0, import_ui6.bindPopover)(popupState)
742
801
  },
743
- /* @__PURE__ */ React8.createElement(import_ui5.Stack, { 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(import_ui5.Typography, { variant: "subtitle2" }, title), /* @__PURE__ */ React8.createElement(import_ui5.IconButton, { sx: { ml: "auto" }, size: SIZE, onClick: popupState.close }, /* @__PURE__ */ React8.createElement(import_icons3.XIcon, { fontSize: SIZE }))),
802
+ /* @__PURE__ */ React8.createElement(import_ui6.Stack, { 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(import_ui6.Typography, { variant: "subtitle2" }, title), /* @__PURE__ */ React8.createElement(import_ui6.IconButton, { sx: { ml: "auto" }, size: SIZE, onClick: popupState.close }, /* @__PURE__ */ React8.createElement(import_icons3.XIcon, { fontSize: SIZE }))),
744
803
  /* @__PURE__ */ React8.createElement(PopoverContent2, { closePopover: popupState.close })
745
804
  ));
746
805
  }
@@ -754,9 +813,9 @@ var controlActionsMenu = (0, import_menus.createMenu)({
754
813
 
755
814
  // src/components/editing-panel-error-fallback.tsx
756
815
  var React9 = __toESM(require("react"));
757
- var import_ui6 = require("@elementor/ui");
816
+ var import_ui7 = require("@elementor/ui");
758
817
  function EditorPanelErrorFallback() {
759
- return /* @__PURE__ */ React9.createElement(import_ui6.Box, { role: "alert", sx: { minHeight: "100%", p: 2 } }, /* @__PURE__ */ React9.createElement(import_ui6.Alert, { severity: "error", sx: { mb: 2, maxWidth: 400, textAlign: "center" } }, /* @__PURE__ */ React9.createElement("strong", null, "Something went wrong")));
818
+ return /* @__PURE__ */ React9.createElement(import_ui7.Box, { role: "alert", sx: { minHeight: "100%", p: 2 } }, /* @__PURE__ */ React9.createElement(import_ui7.Alert, { severity: "error", sx: { mb: 2, maxWidth: 400, textAlign: "center" } }, /* @__PURE__ */ React9.createElement("strong", null, "Something went wrong")));
760
819
  }
761
820
 
762
821
  // src/components/editing-panel-tabs.tsx
@@ -802,7 +861,7 @@ var Control = ({ props, type }) => {
802
861
 
803
862
  // src/controls-registry/control-type-container.tsx
804
863
  var React11 = __toESM(require("react"));
805
- var import_ui7 = require("@elementor/ui");
864
+ var import_ui8 = require("@elementor/ui");
806
865
  var ControlTypeContainer = ({
807
866
  controlType,
808
867
  children
@@ -810,7 +869,7 @@ var ControlTypeContainer = ({
810
869
  const layout = getLayoutByType(controlType);
811
870
  return /* @__PURE__ */ React11.createElement(StyledContainer, { layout }, children);
812
871
  };
813
- var StyledContainer = (0, import_ui7.styled)(import_ui7.Box, {
872
+ var StyledContainer = (0, import_ui8.styled)(import_ui8.Box, {
814
873
  shouldForwardProp: (prop) => !["layout"].includes(prop)
815
874
  })(({ layout, theme }) => ({
816
875
  display: "grid",
@@ -820,8 +879,8 @@ var StyledContainer = (0, import_ui7.styled)(import_ui7.Box, {
820
879
  var getGridLayout = (layout) => ({
821
880
  justifyContent: "space-between",
822
881
  gridTemplateColumns: {
823
- full: "1fr",
824
- "two-columns": "repeat(2, 1fr)"
882
+ full: "minmax(0, 1fr)",
883
+ "two-columns": "repeat(2, minmax(0, 1fr))"
825
884
  }[layout]
826
885
  });
827
886
 
@@ -861,12 +920,12 @@ var SettingsField = ({ bind, children }) => {
861
920
  // src/components/section.tsx
862
921
  var React13 = __toESM(require("react"));
863
922
  var import_react7 = require("react");
864
- var import_ui9 = require("@elementor/ui");
923
+ var import_ui10 = require("@elementor/ui");
865
924
 
866
925
  // src/components/collapse-icon.tsx
867
926
  var import_icons4 = require("@elementor/icons");
868
- var import_ui8 = require("@elementor/ui");
869
- var CollapseIcon = (0, import_ui8.styled)(import_icons4.ChevronDownIcon, {
927
+ var import_ui9 = require("@elementor/ui");
928
+ var CollapseIcon = (0, import_ui9.styled)(import_icons4.ChevronDownIcon, {
870
929
  shouldForwardProp: (prop) => prop !== "open"
871
930
  })(({ theme, open }) => ({
872
931
  transform: open ? "rotate(180deg)" : "rotate(0deg)",
@@ -882,7 +941,7 @@ function Section({ title, children, defaultExpanded = false }) {
882
941
  const labelId = `label-${id}`;
883
942
  const contentId = `content-${id}`;
884
943
  return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(
885
- import_ui9.ListItemButton,
944
+ import_ui10.ListItemButton,
886
945
  {
887
946
  id: labelId,
888
947
  "aria-controls": contentId,
@@ -890,21 +949,21 @@ function Section({ title, children, defaultExpanded = false }) {
890
949
  sx: { "&:hover": { backgroundColor: "transparent" } }
891
950
  },
892
951
  /* @__PURE__ */ React13.createElement(
893
- import_ui9.ListItemText,
952
+ import_ui10.ListItemText,
894
953
  {
895
954
  secondary: title,
896
955
  secondaryTypographyProps: { color: "text.primary", variant: "caption", fontWeight: "bold" }
897
956
  }
898
957
  ),
899
958
  /* @__PURE__ */ React13.createElement(CollapseIcon, { open: isOpen, color: "secondary", fontSize: "tiny" })
900
- ), /* @__PURE__ */ React13.createElement(import_ui9.Collapse, { id: contentId, "aria-labelledby": labelId, in: isOpen, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React13.createElement(import_ui9.Stack, { gap: 2.5, p: 2 }, children)), /* @__PURE__ */ React13.createElement(import_ui9.Divider, null));
959
+ ), /* @__PURE__ */ React13.createElement(import_ui10.Collapse, { id: contentId, "aria-labelledby": labelId, in: isOpen, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React13.createElement(import_ui10.Stack, { gap: 2.5, p: 2 }, children)), /* @__PURE__ */ React13.createElement(import_ui10.Divider, null));
901
960
  }
902
961
 
903
962
  // src/components/sections-list.tsx
904
963
  var React14 = __toESM(require("react"));
905
- var import_ui10 = require("@elementor/ui");
964
+ var import_ui11 = require("@elementor/ui");
906
965
  function SectionsList(props) {
907
- return /* @__PURE__ */ React14.createElement(import_ui10.List, { disablePadding: true, component: "div", ...props });
966
+ return /* @__PURE__ */ React14.createElement(import_ui11.List, { disablePadding: true, component: "div", ...props });
908
967
  }
909
968
 
910
969
  // src/components/settings-tab.tsx
@@ -936,7 +995,7 @@ var Control2 = ({ control }) => {
936
995
  var React65 = __toESM(require("react"));
937
996
  var import_react16 = require("react");
938
997
  var import_editor_elements7 = require("@elementor/editor-elements");
939
- var import_editor_props5 = require("@elementor/editor-props");
998
+ var import_editor_props6 = require("@elementor/editor-props");
940
999
  var import_editor_responsive2 = require("@elementor/editor-responsive");
941
1000
  var import_session3 = require("@elementor/session");
942
1001
  var import_ui50 = require("@elementor/ui");
@@ -1043,16 +1102,16 @@ function buildStateSnapshotSlot(styles, parentBreakpoint, currentBreakpoint, sta
1043
1102
  }
1044
1103
  function buildInitialSnapshotFromStyles(styles) {
1045
1104
  const snapshot = {};
1046
- styles.forEach((styleVariantWithId) => {
1105
+ styles.forEach((styleData) => {
1047
1106
  const {
1048
- styleVariant: { props }
1049
- } = styleVariantWithId;
1107
+ variant: { props }
1108
+ } = styleData;
1050
1109
  Object.entries(props).forEach(([key, value]) => {
1051
1110
  if (!snapshot[key]) {
1052
1111
  snapshot[key] = [];
1053
1112
  }
1054
1113
  const snapshotPropValue = {
1055
- ...styleVariantWithId,
1114
+ ...styleData,
1056
1115
  value
1057
1116
  };
1058
1117
  snapshot[key].push(snapshotPropValue);
@@ -1085,8 +1144,9 @@ function createStylesInheritance(styleDefs, breakpointsRoot) {
1085
1144
  function buildStyleVariantsByMetaMapping(styleDefs) {
1086
1145
  const breakpointStateSlots = {};
1087
1146
  styleDefs.forEach((styleDef) => {
1088
- styleDef.variants.forEach((styleVariant) => {
1089
- const { meta } = styleVariant;
1147
+ const provider = getProviderByStyleId(styleDef.id)?.key ?? null;
1148
+ styleDef.variants.forEach((variant) => {
1149
+ const { meta } = variant;
1090
1150
  const { state, breakpoint } = meta;
1091
1151
  const breakpointKey = getBreakpointKey(breakpoint);
1092
1152
  const stateKey = getStateKey(state);
@@ -1098,8 +1158,9 @@ function buildStyleVariantsByMetaMapping(styleDefs) {
1098
1158
  breakpointNode[stateKey] = [];
1099
1159
  }
1100
1160
  breakpointNode[stateKey].push({
1101
- styleId: styleDef.id,
1102
- styleVariant
1161
+ style: styleDef,
1162
+ variant,
1163
+ provider
1103
1164
  });
1104
1165
  });
1105
1166
  });
@@ -1297,27 +1358,7 @@ function useStylesField(propName) {
1297
1358
  var React17 = __toESM(require("react"));
1298
1359
  var import_editor_controls5 = require("@elementor/editor-controls");
1299
1360
  var import_editor_styles_repository7 = require("@elementor/editor-styles-repository");
1300
- var import_ui11 = require("@elementor/ui");
1301
1361
  var import_i18n5 = require("@wordpress/i18n");
1302
- var Circle = (0, import_ui11.styled)("div", {
1303
- shouldForwardProp: (prop) => prop !== "variant"
1304
- })`
1305
- width: 5px;
1306
- height: 5px;
1307
- border-radius: 50%;
1308
- background-color: ${({ theme, variant }) => {
1309
- switch (variant) {
1310
- case "overridden":
1311
- return theme.palette.warning.light;
1312
- case "global-affects":
1313
- return theme.palette.global.dark;
1314
- case "local-affects":
1315
- return theme.palette.primary.main;
1316
- default:
1317
- return theme.palette.text.disabled;
1318
- }
1319
- }};
1320
- `;
1321
1362
  var StylesInheritanceIndicator = () => {
1322
1363
  const { value, path } = (0, import_editor_controls5.useBoundProp)();
1323
1364
  const { id: currentStyleId, provider: currentStyleProvider, meta: currentStyleMeta } = useStyle();
@@ -1326,27 +1367,30 @@ var StylesInheritanceIndicator = () => {
1326
1367
  if (!inheritanceChain.length) {
1327
1368
  return null;
1328
1369
  }
1329
- const [{ styleId, styleVariant }] = inheritanceChain;
1330
- const { breakpoint, state } = styleVariant.meta;
1331
- if (styleId === currentStyleId && breakpoint === currentStyleMeta.breakpoint && state === currentStyleMeta.state) {
1370
+ const [{ style, variant, provider }] = inheritanceChain;
1371
+ if (provider === import_editor_styles_repository7.ELEMENTS_BASE_STYLES_PROVIDER_KEY) {
1372
+ return null;
1373
+ }
1374
+ const { breakpoint, state } = variant.meta;
1375
+ if (style.id === currentStyleId && breakpoint === currentStyleMeta.breakpoint && state === currentStyleMeta.state) {
1332
1376
  return /* @__PURE__ */ React17.createElement(
1333
- Circle,
1377
+ StyleIndicator,
1334
1378
  {
1335
1379
  "aria-label": (0, import_i18n5.__)("This is the final value", "elementor"),
1336
- variant: currentStyleProvider?.key === import_editor_styles_repository7.ELEMENTS_STYLES_PROVIDER_KEY ? "local-affects" : "global-affects"
1380
+ variant: currentStyleProvider?.key === import_editor_styles_repository7.ELEMENTS_STYLES_PROVIDER_KEY ? "local" : "global"
1337
1381
  }
1338
1382
  );
1339
1383
  }
1340
1384
  if (value !== null && value !== void 0) {
1341
1385
  return /* @__PURE__ */ React17.createElement(
1342
- Circle,
1386
+ StyleIndicator,
1343
1387
  {
1344
1388
  "aria-label": (0, import_i18n5.__)("This value is overridden by another style", "elementor"),
1345
1389
  variant: "overridden"
1346
1390
  }
1347
1391
  );
1348
1392
  }
1349
- return /* @__PURE__ */ React17.createElement(Circle, { "aria-label": (0, import_i18n5.__)("This has value from another style", "elementor") });
1393
+ return /* @__PURE__ */ React17.createElement(StyleIndicator, { "aria-label": (0, import_i18n5.__)("This has value from another style", "elementor") });
1350
1394
  };
1351
1395
 
1352
1396
  // src/controls-registry/styles-field.tsx
@@ -1378,7 +1422,7 @@ var BackgroundSection = () => {
1378
1422
  };
1379
1423
 
1380
1424
  // src/components/style-sections/border-section/border-section.tsx
1381
- var React30 = __toESM(require("react"));
1425
+ var React29 = __toESM(require("react"));
1382
1426
 
1383
1427
  // src/components/panel-divider.tsx
1384
1428
  var React20 = __toESM(require("react"));
@@ -1391,7 +1435,7 @@ var import_ui13 = require("@elementor/ui");
1391
1435
  var SectionContent = ({ gap = 2, sx, children }) => /* @__PURE__ */ React21.createElement(import_ui13.Stack, { gap, sx: { ...sx } }, children);
1392
1436
 
1393
1437
  // src/components/style-sections/border-section/border-field.tsx
1394
- var React28 = __toESM(require("react"));
1438
+ var React27 = __toESM(require("react"));
1395
1439
  var import_i18n9 = require("@wordpress/i18n");
1396
1440
 
1397
1441
  // src/components/add-or-remove-content.tsx
@@ -1454,11 +1498,11 @@ var BorderStyleField = () => {
1454
1498
  };
1455
1499
 
1456
1500
  // src/components/style-sections/border-section/border-width-field.tsx
1457
- var React27 = __toESM(require("react"));
1501
+ var React26 = __toESM(require("react"));
1458
1502
  var import_editor_controls11 = require("@elementor/editor-controls");
1459
1503
  var import_editor_props3 = require("@elementor/editor-props");
1460
1504
  var import_icons6 = require("@elementor/icons");
1461
- var import_ui20 = require("@elementor/ui");
1505
+ var import_ui19 = require("@elementor/ui");
1462
1506
  var import_i18n8 = require("@wordpress/i18n");
1463
1507
 
1464
1508
  // src/hooks/use-direction.ts
@@ -1469,82 +1513,39 @@ function useDirection() {
1469
1513
  return { isSiteRtl, isUiRtl };
1470
1514
  }
1471
1515
 
1472
- // src/components/style-sections/layout-section/utils/rotated-icon.tsx
1473
- var React26 = __toESM(require("react"));
1474
- var import_react11 = require("react");
1475
- var import_ui19 = require("@elementor/ui");
1476
- var CLOCKWISE_ANGLES = {
1477
- row: 0,
1478
- column: 90,
1479
- "row-reverse": 180,
1480
- "column-reverse": 270
1481
- };
1482
- var COUNTER_CLOCKWISE_ANGLES = {
1483
- row: 0,
1484
- column: -90,
1485
- "row-reverse": -180,
1486
- "column-reverse": -270
1487
- };
1488
- var RotatedIcon = ({
1489
- icon: Icon,
1490
- size,
1491
- isClockwise = true,
1492
- offset = 0,
1493
- disableRotationForReversed = false
1494
- }) => {
1495
- const rotate = (0, import_react11.useRef)(useGetTargetAngle(isClockwise, offset, disableRotationForReversed));
1496
- rotate.current = useGetTargetAngle(isClockwise, offset, disableRotationForReversed, rotate);
1497
- return /* @__PURE__ */ React26.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
1498
- };
1499
- var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existingRef) => {
1500
- const [direction] = useStylesField("flex-direction");
1501
- const isRtl = "rtl" === (0, import_ui19.useTheme)().direction;
1502
- const rotationMultiplier = isRtl ? -1 : 1;
1503
- const angleMap = isClockwise ? CLOCKWISE_ANGLES : COUNTER_CLOCKWISE_ANGLES;
1504
- const currentDirection = direction?.value || "row";
1505
- const currentAngle = existingRef ? existingRef.current * rotationMultiplier : angleMap[currentDirection] + offset;
1506
- const targetAngle = angleMap[currentDirection] + offset;
1507
- const diffToTargetAngle = (targetAngle - currentAngle + 360) % 360;
1508
- const formattedDiff = (diffToTargetAngle + 180) % 360 - 180;
1509
- if (disableRotationForReversed && ["row-reverse", "column-reverse"].includes(currentDirection)) {
1510
- return 0;
1511
- }
1512
- return (currentAngle + formattedDiff) * rotationMultiplier;
1513
- };
1514
-
1515
1516
  // src/components/style-sections/border-section/border-width-field.tsx
1516
- var InlineStartIcon = (0, import_ui20.withDirection)(import_icons6.SideRightIcon);
1517
- var InlineEndIcon = (0, import_ui20.withDirection)(import_icons6.SideLeftIcon);
1517
+ var InlineStartIcon = (0, import_ui19.withDirection)(import_icons6.SideRightIcon);
1518
+ var InlineEndIcon = (0, import_ui19.withDirection)(import_icons6.SideLeftIcon);
1518
1519
  var getEdges = (isSiteRtl) => [
1519
1520
  {
1520
1521
  label: (0, import_i18n8.__)("Top", "elementor"),
1521
- icon: /* @__PURE__ */ React27.createElement(import_icons6.SideTopIcon, { fontSize: "tiny" }),
1522
+ icon: /* @__PURE__ */ React26.createElement(import_icons6.SideTopIcon, { fontSize: "tiny" }),
1522
1523
  bind: "block-start"
1523
1524
  },
1524
1525
  {
1525
1526
  label: isSiteRtl ? (0, import_i18n8.__)("Left", "elementor") : (0, import_i18n8.__)("Right", "elementor"),
1526
- icon: /* @__PURE__ */ React27.createElement(RotatedIcon, { icon: InlineStartIcon, size: "tiny" }),
1527
+ icon: /* @__PURE__ */ React26.createElement(InlineStartIcon, { fontSize: "tiny" }),
1527
1528
  bind: "inline-end"
1528
1529
  },
1529
1530
  {
1530
1531
  label: (0, import_i18n8.__)("Bottom", "elementor"),
1531
- icon: /* @__PURE__ */ React27.createElement(import_icons6.SideBottomIcon, { fontSize: "tiny" }),
1532
+ icon: /* @__PURE__ */ React26.createElement(import_icons6.SideBottomIcon, { fontSize: "tiny" }),
1532
1533
  bind: "block-end"
1533
1534
  },
1534
1535
  {
1535
1536
  label: isSiteRtl ? (0, import_i18n8.__)("Right", "elementor") : (0, import_i18n8.__)("Left", "elementor"),
1536
- icon: /* @__PURE__ */ React27.createElement(RotatedIcon, { icon: InlineEndIcon, size: "tiny" }),
1537
+ icon: /* @__PURE__ */ React26.createElement(InlineEndIcon, { fontSize: "tiny" }),
1537
1538
  bind: "inline-start"
1538
1539
  }
1539
1540
  ];
1540
1541
  var BorderWidthField = () => {
1541
1542
  const { isSiteRtl } = useDirection();
1542
- return /* @__PURE__ */ React27.createElement(StylesField, { bind: "border-width" }, /* @__PURE__ */ React27.createElement(
1543
+ return /* @__PURE__ */ React26.createElement(StylesField, { bind: "border-width" }, /* @__PURE__ */ React26.createElement(
1543
1544
  import_editor_controls11.EqualUnequalSizesControl,
1544
1545
  {
1545
1546
  items: getEdges(isSiteRtl),
1546
1547
  label: (0, import_i18n8.__)("Border width", "elementor"),
1547
- icon: /* @__PURE__ */ React27.createElement(import_icons6.SideAllIcon, { fontSize: "tiny" }),
1548
+ icon: /* @__PURE__ */ React26.createElement(import_icons6.SideAllIcon, { fontSize: "tiny" }),
1548
1549
  tooltipLabel: (0, import_i18n8.__)("Adjust borders", "elementor"),
1549
1550
  multiSizePropTypeUtil: import_editor_props3.borderWidthPropTypeUtil
1550
1551
  }
@@ -1570,7 +1571,7 @@ var BorderField = () => {
1570
1571
  });
1571
1572
  };
1572
1573
  const hasBorder = Object.values(border ?? {}).some(Boolean);
1573
- return /* @__PURE__ */ React28.createElement(
1574
+ return /* @__PURE__ */ React27.createElement(
1574
1575
  AddOrRemoveContent,
1575
1576
  {
1576
1577
  label: (0, import_i18n9.__)("Border", "elementor"),
@@ -1578,23 +1579,23 @@ var BorderField = () => {
1578
1579
  onAdd: addBorder,
1579
1580
  onRemove: removeBorder
1580
1581
  },
1581
- /* @__PURE__ */ React28.createElement(BorderWidthField, null),
1582
- /* @__PURE__ */ React28.createElement(BorderColorField, null),
1583
- /* @__PURE__ */ React28.createElement(BorderStyleField, null)
1582
+ /* @__PURE__ */ React27.createElement(BorderWidthField, null),
1583
+ /* @__PURE__ */ React27.createElement(BorderColorField, null),
1584
+ /* @__PURE__ */ React27.createElement(BorderStyleField, null)
1584
1585
  );
1585
1586
  };
1586
1587
 
1587
1588
  // src/components/style-sections/border-section/border-radius-field.tsx
1588
- var React29 = __toESM(require("react"));
1589
+ var React28 = __toESM(require("react"));
1589
1590
  var import_editor_controls12 = require("@elementor/editor-controls");
1590
1591
  var import_editor_props4 = require("@elementor/editor-props");
1591
1592
  var import_icons7 = require("@elementor/icons");
1592
- var import_ui21 = require("@elementor/ui");
1593
+ var import_ui20 = require("@elementor/ui");
1593
1594
  var import_i18n10 = require("@wordpress/i18n");
1594
- var StartStartIcon = (0, import_ui21.withDirection)(import_icons7.RadiusTopLeftIcon);
1595
- var StartEndIcon = (0, import_ui21.withDirection)(import_icons7.RadiusTopRightIcon);
1596
- var EndStartIcon = (0, import_ui21.withDirection)(import_icons7.RadiusBottomLeftIcon);
1597
- var EndEndIcon = (0, import_ui21.withDirection)(import_icons7.RadiusBottomRightIcon);
1595
+ var StartStartIcon = (0, import_ui20.withDirection)(import_icons7.RadiusTopLeftIcon);
1596
+ var StartEndIcon = (0, import_ui20.withDirection)(import_icons7.RadiusTopRightIcon);
1597
+ var EndStartIcon = (0, import_ui20.withDirection)(import_icons7.RadiusBottomLeftIcon);
1598
+ var EndEndIcon = (0, import_ui20.withDirection)(import_icons7.RadiusBottomRightIcon);
1598
1599
  var getStartStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n10.__)("Top right", "elementor") : (0, import_i18n10.__)("Top left", "elementor");
1599
1600
  var getStartEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n10.__)("Top left", "elementor") : (0, import_i18n10.__)("Top right", "elementor");
1600
1601
  var getEndStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n10.__)("Bottom right", "elementor") : (0, import_i18n10.__)("Bottom left", "elementor");
@@ -1602,33 +1603,33 @@ var getEndEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n10.__)("Bottom le
1602
1603
  var getCorners = (isSiteRtl) => [
1603
1604
  {
1604
1605
  label: getStartStartLabel(isSiteRtl),
1605
- icon: /* @__PURE__ */ React29.createElement(RotatedIcon, { icon: StartStartIcon, size: "tiny" }),
1606
+ icon: /* @__PURE__ */ React28.createElement(StartStartIcon, { fontSize: "tiny" }),
1606
1607
  bind: "start-start"
1607
1608
  },
1608
1609
  {
1609
1610
  label: getStartEndLabel(isSiteRtl),
1610
- icon: /* @__PURE__ */ React29.createElement(RotatedIcon, { icon: StartEndIcon, size: "tiny" }),
1611
+ icon: /* @__PURE__ */ React28.createElement(StartEndIcon, { fontSize: "tiny" }),
1611
1612
  bind: "start-end"
1612
1613
  },
1613
1614
  {
1614
1615
  label: getEndStartLabel(isSiteRtl),
1615
- icon: /* @__PURE__ */ React29.createElement(RotatedIcon, { icon: EndStartIcon, size: "tiny" }),
1616
+ icon: /* @__PURE__ */ React28.createElement(EndStartIcon, { fontSize: "tiny" }),
1616
1617
  bind: "end-start"
1617
1618
  },
1618
1619
  {
1619
1620
  label: getEndEndLabel(isSiteRtl),
1620
- icon: /* @__PURE__ */ React29.createElement(RotatedIcon, { icon: EndEndIcon, size: "tiny" }),
1621
+ icon: /* @__PURE__ */ React28.createElement(EndEndIcon, { fontSize: "tiny" }),
1621
1622
  bind: "end-end"
1622
1623
  }
1623
1624
  ];
1624
1625
  var BorderRadiusField = () => {
1625
1626
  const { isSiteRtl } = useDirection();
1626
- return /* @__PURE__ */ React29.createElement(StylesField, { bind: "border-radius" }, /* @__PURE__ */ React29.createElement(
1627
+ return /* @__PURE__ */ React28.createElement(StylesField, { bind: "border-radius" }, /* @__PURE__ */ React28.createElement(
1627
1628
  import_editor_controls12.EqualUnequalSizesControl,
1628
1629
  {
1629
1630
  items: getCorners(isSiteRtl),
1630
1631
  label: (0, import_i18n10.__)("Border radius", "elementor"),
1631
- icon: /* @__PURE__ */ React29.createElement(import_icons7.BorderCornersIcon, { fontSize: "tiny" }),
1632
+ icon: /* @__PURE__ */ React28.createElement(import_icons7.BorderCornersIcon, { fontSize: "tiny" }),
1632
1633
  tooltipLabel: (0, import_i18n10.__)("Adjust corners", "elementor"),
1633
1634
  multiSizePropTypeUtil: import_editor_props4.borderRadiusPropTypeUtil
1634
1635
  }
@@ -1636,13 +1637,13 @@ var BorderRadiusField = () => {
1636
1637
  };
1637
1638
 
1638
1639
  // src/components/style-sections/border-section/border-section.tsx
1639
- var BorderSection = () => /* @__PURE__ */ React30.createElement(SectionContent, null, /* @__PURE__ */ React30.createElement(BorderRadiusField, null), /* @__PURE__ */ React30.createElement(PanelDivider, null), /* @__PURE__ */ React30.createElement(BorderField, null));
1640
+ var BorderSection = () => /* @__PURE__ */ React29.createElement(SectionContent, null, /* @__PURE__ */ React29.createElement(BorderRadiusField, null), /* @__PURE__ */ React29.createElement(PanelDivider, null), /* @__PURE__ */ React29.createElement(BorderField, null));
1640
1641
 
1641
1642
  // src/components/style-sections/effects-section/effects-section.tsx
1642
- var React31 = __toESM(require("react"));
1643
+ var React30 = __toESM(require("react"));
1643
1644
  var import_editor_controls13 = require("@elementor/editor-controls");
1644
1645
  var EffectsSection = () => {
1645
- return /* @__PURE__ */ React31.createElement(SectionContent, null, /* @__PURE__ */ React31.createElement(StylesField, { bind: "box-shadow" }, /* @__PURE__ */ React31.createElement(import_editor_controls13.BoxShadowRepeaterControl, null)));
1646
+ return /* @__PURE__ */ React30.createElement(SectionContent, null, /* @__PURE__ */ React30.createElement(StylesField, { bind: "box-shadow" }, /* @__PURE__ */ React30.createElement(import_editor_controls13.BoxShadowRepeaterControl, null)));
1646
1647
  };
1647
1648
 
1648
1649
  // src/components/style-sections/layout-section/layout-section.tsx
@@ -1682,6 +1683,51 @@ var import_editor_controls14 = require("@elementor/editor-controls");
1682
1683
  var import_icons8 = require("@elementor/icons");
1683
1684
  var import_ui22 = require("@elementor/ui");
1684
1685
  var import_i18n11 = require("@wordpress/i18n");
1686
+
1687
+ // src/components/style-sections/layout-section/utils/rotated-icon.tsx
1688
+ var React31 = __toESM(require("react"));
1689
+ var import_react11 = require("react");
1690
+ var import_ui21 = require("@elementor/ui");
1691
+ var CLOCKWISE_ANGLES = {
1692
+ row: 0,
1693
+ column: 90,
1694
+ "row-reverse": 180,
1695
+ "column-reverse": 270
1696
+ };
1697
+ var COUNTER_CLOCKWISE_ANGLES = {
1698
+ row: 0,
1699
+ column: -90,
1700
+ "row-reverse": -180,
1701
+ "column-reverse": -270
1702
+ };
1703
+ var RotatedIcon = ({
1704
+ icon: Icon,
1705
+ size,
1706
+ isClockwise = true,
1707
+ offset = 0,
1708
+ disableRotationForReversed = false
1709
+ }) => {
1710
+ const rotate = (0, import_react11.useRef)(useGetTargetAngle(isClockwise, offset, disableRotationForReversed));
1711
+ rotate.current = useGetTargetAngle(isClockwise, offset, disableRotationForReversed, rotate);
1712
+ return /* @__PURE__ */ React31.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
1713
+ };
1714
+ var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existingRef) => {
1715
+ const [direction] = useStylesField("flex-direction");
1716
+ const isRtl = "rtl" === (0, import_ui21.useTheme)().direction;
1717
+ const rotationMultiplier = isRtl ? -1 : 1;
1718
+ const angleMap = isClockwise ? CLOCKWISE_ANGLES : COUNTER_CLOCKWISE_ANGLES;
1719
+ const currentDirection = direction?.value || "row";
1720
+ const currentAngle = existingRef ? existingRef.current * rotationMultiplier : angleMap[currentDirection] + offset;
1721
+ const targetAngle = angleMap[currentDirection] + offset;
1722
+ const diffToTargetAngle = (targetAngle - currentAngle + 360) % 360;
1723
+ const formattedDiff = (diffToTargetAngle + 180) % 360 - 180;
1724
+ if (disableRotationForReversed && ["row-reverse", "column-reverse"].includes(currentDirection)) {
1725
+ return 0;
1726
+ }
1727
+ return (currentAngle + formattedDiff) * rotationMultiplier;
1728
+ };
1729
+
1730
+ // src/components/style-sections/layout-section/align-content-field.tsx
1685
1731
  var StartIcon = (0, import_ui22.withDirection)(import_icons8.JustifyTopIcon);
1686
1732
  var EndIcon = (0, import_ui22.withDirection)(import_icons8.JustifyBottomIcon);
1687
1733
  var iconProps = {
@@ -1864,8 +1910,8 @@ var options4 = [
1864
1910
  value: "row",
1865
1911
  label: (0, import_i18n15.__)("Row", "elementor"),
1866
1912
  renderContent: ({ size }) => {
1867
- const StartIcon6 = (0, import_ui26.withDirection)(import_icons11.ArrowRightIcon);
1868
- return /* @__PURE__ */ React36.createElement(StartIcon6, { fontSize: size });
1913
+ const StartIcon5 = (0, import_ui26.withDirection)(import_icons11.ArrowRightIcon);
1914
+ return /* @__PURE__ */ React36.createElement(StartIcon5, { fontSize: size });
1869
1915
  },
1870
1916
  showTooltip: true
1871
1917
  },
@@ -1879,8 +1925,8 @@ var options4 = [
1879
1925
  value: "row-reverse",
1880
1926
  label: (0, import_i18n15.__)("Reversed row", "elementor"),
1881
1927
  renderContent: ({ size }) => {
1882
- const EndIcon6 = (0, import_ui26.withDirection)(import_icons11.ArrowLeftIcon);
1883
- return /* @__PURE__ */ React36.createElement(EndIcon6, { fontSize: size });
1928
+ const EndIcon5 = (0, import_ui26.withDirection)(import_icons11.ArrowLeftIcon);
1929
+ return /* @__PURE__ */ React36.createElement(EndIcon5, { fontSize: size });
1884
1930
  },
1885
1931
  showTooltip: true
1886
1932
  },
@@ -1974,6 +2020,7 @@ var getGroupControlValue = (order) => {
1974
2020
  var React38 = __toESM(require("react"));
1975
2021
  var import_react13 = require("react");
1976
2022
  var import_editor_controls20 = require("@elementor/editor-controls");
2023
+ var import_editor_props5 = require("@elementor/editor-props");
1977
2024
  var import_icons13 = require("@elementor/icons");
1978
2025
  var import_ui28 = require("@elementor/ui");
1979
2026
  var import_i18n17 = require("@wordpress/i18n");
@@ -1999,26 +2046,37 @@ var items2 = [
1999
2046
  }
2000
2047
  ];
2001
2048
  var FlexSizeField = () => {
2002
- const { isSiteRtl } = useDirection(), [growField, setGrowField] = useStylesField("flex-grow"), [shrinkField, setShrinkField] = useStylesField("flex-shrink"), [basisField, setBasisField] = useStylesField("flex-basis");
2003
- const grow = growField?.value || null, shrink = shrinkField?.value || null, basis = basisField?.value || null;
2049
+ const { isSiteRtl } = useDirection();
2050
+ const [fields, setFields] = useStylesFields(["flex-grow", "flex-shrink", "flex-basis"]);
2051
+ const grow = fields?.["flex-grow"]?.value || null;
2052
+ const shrink = fields?.["flex-shrink"]?.value || null;
2053
+ const basis = fields?.["flex-basis"]?.value || null;
2004
2054
  const currentGroup = (0, import_react13.useMemo)(() => getActiveGroup({ grow, shrink, basis }), [grow, shrink, basis]), [activeGroup, setActiveGroup] = (0, import_react13.useState)(currentGroup);
2005
2055
  const onChangeGroup = (group = null) => {
2006
2056
  setActiveGroup(group);
2007
- setBasisField(null);
2008
2057
  if (!group || group === "custom") {
2009
- setGrowField(null);
2010
- setShrinkField(null);
2058
+ setFields({
2059
+ "flex-basis": null,
2060
+ "flex-grow": null,
2061
+ "flex-shrink": null
2062
+ });
2011
2063
  return;
2012
2064
  }
2013
2065
  if (group === "flex-grow") {
2014
- setGrowField({ $$type: "number", value: DEFAULT });
2015
- setShrinkField(null);
2066
+ setFields({
2067
+ "flex-basis": null,
2068
+ "flex-grow": import_editor_props5.numberPropTypeUtil.create(DEFAULT),
2069
+ "flex-shrink": null
2070
+ });
2016
2071
  return;
2017
2072
  }
2018
- setGrowField(null);
2019
- setShrinkField({ $$type: "number", value: DEFAULT });
2073
+ setFields({
2074
+ "flex-basis": null,
2075
+ "flex-grow": null,
2076
+ "flex-shrink": import_editor_props5.numberPropTypeUtil.create(DEFAULT)
2077
+ });
2020
2078
  };
2021
- return /* @__PURE__ */ React38.createElement(import_ui28.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React38.createElement(import_ui28.ThemeProvider, null, /* @__PURE__ */ React38.createElement(SectionContent, null, /* @__PURE__ */ React38.createElement(import_ui28.Typography, { fontSize: "large" }, activeGroup), /* @__PURE__ */ React38.createElement(import_ui28.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React38.createElement(import_ui28.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(StylesField, { bind: activeGroup ?? "" }, /* @__PURE__ */ React38.createElement(ControlLabel, null, (0, import_i18n17.__)("Size", "elementor")))), /* @__PURE__ */ React38.createElement(import_ui28.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React38.createElement(
2079
+ return /* @__PURE__ */ React38.createElement(import_ui28.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React38.createElement(import_ui28.ThemeProvider, null, /* @__PURE__ */ React38.createElement(SectionContent, null, /* @__PURE__ */ React38.createElement(import_ui28.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React38.createElement(import_ui28.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(StylesField, { bind: activeGroup ?? "" }, /* @__PURE__ */ React38.createElement(ControlLabel, null, (0, import_i18n17.__)("Size", "elementor")))), /* @__PURE__ */ React38.createElement(import_ui28.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React38.createElement(
2022
2080
  import_editor_controls20.ControlToggleButtonGroup,
2023
2081
  {
2024
2082
  value: activeGroup,
@@ -2486,13 +2544,13 @@ var import_editor_controls37 = require("@elementor/editor-controls");
2486
2544
  var import_icons19 = require("@elementor/icons");
2487
2545
  var import_ui44 = require("@elementor/ui");
2488
2546
  var import_i18n36 = require("@wordpress/i18n");
2489
- var StartIcon5 = (0, import_ui44.withDirection)(import_icons19.AlignLeftIcon);
2490
- var EndIcon5 = (0, import_ui44.withDirection)(import_icons19.AlignRightIcon);
2547
+ var AlignStartIcon = (0, import_ui44.withDirection)(import_icons19.AlignLeftIcon);
2548
+ var AlignEndIcon = (0, import_ui44.withDirection)(import_icons19.AlignRightIcon);
2491
2549
  var options9 = [
2492
2550
  {
2493
2551
  value: "start",
2494
2552
  label: (0, import_i18n36.__)("Start", "elementor"),
2495
- renderContent: () => /* @__PURE__ */ React57.createElement(RotatedIcon, { icon: StartIcon5, size: "tiny" }),
2553
+ renderContent: ({ size }) => /* @__PURE__ */ React57.createElement(AlignStartIcon, { fontSize: size }),
2496
2554
  showTooltip: true
2497
2555
  },
2498
2556
  {
@@ -2504,7 +2562,7 @@ var options9 = [
2504
2562
  {
2505
2563
  value: "end",
2506
2564
  label: (0, import_i18n36.__)("End", "elementor"),
2507
- renderContent: () => /* @__PURE__ */ React57.createElement(RotatedIcon, { icon: EndIcon5, size: "tiny" }),
2565
+ renderContent: ({ size }) => /* @__PURE__ */ React57.createElement(AlignEndIcon, { fontSize: size }),
2508
2566
  showTooltip: true
2509
2567
  },
2510
2568
  {
@@ -2515,7 +2573,7 @@ var options9 = [
2515
2573
  }
2516
2574
  ];
2517
2575
  var TextAlignmentField = () => {
2518
- return /* @__PURE__ */ React57.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React57.createElement(import_ui44.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React57.createElement(import_ui44.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React57.createElement(ControlLabel, null, (0, import_i18n36.__)("Alignment", "elementor"))), /* @__PURE__ */ React57.createElement(import_ui44.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React57.createElement(import_editor_controls37.ToggleControl, { options: options9 }))));
2576
+ return /* @__PURE__ */ React57.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React57.createElement(import_ui44.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React57.createElement(import_ui44.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React57.createElement(ControlLabel, null, (0, import_i18n36.__)("Text align", "elementor"))), /* @__PURE__ */ React57.createElement(import_ui44.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React57.createElement(import_editor_controls37.ToggleControl, { options: options9 }))));
2519
2577
  };
2520
2578
 
2521
2579
  // src/components/style-sections/typography-section/text-color-field.tsx
@@ -2709,7 +2767,7 @@ function useFirstElementStyleDef(currentClassesProp) {
2709
2767
  function useCurrentClassesProp() {
2710
2768
  const { elementType } = useElement();
2711
2769
  const prop = Object.entries(elementType.propsSchema).find(
2712
- ([, propType]) => propType.kind === "plain" && propType.key === import_editor_props5.CLASSES_PROP_KEY
2770
+ ([, propType]) => propType.kind === "plain" && propType.key === import_editor_props6.CLASSES_PROP_KEY
2713
2771
  );
2714
2772
  if (!prop) {
2715
2773
  throw new Error("Element does not have a classes prop");
@@ -2724,19 +2782,7 @@ var EditingPanelTabs = () => {
2724
2782
  return (
2725
2783
  // When switching between elements, the local states should be reset. We are using key to rerender the tabs.
2726
2784
  // Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
2727
- /* @__PURE__ */ React66.createElement(import_react17.Fragment, { key: element.id }, /* @__PURE__ */ React66.createElement(import_ui51.Stack, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React66.createElement(
2728
- import_ui51.Tabs,
2729
- {
2730
- variant: "fullWidth",
2731
- indicatorColor: "secondary",
2732
- textColor: "inherit",
2733
- size: "small",
2734
- sx: { mt: 0.5 },
2735
- ...getTabsProps()
2736
- },
2737
- /* @__PURE__ */ React66.createElement(import_ui51.Tab, { label: (0, import_i18n44.__)("General", "elementor"), ...getTabProps("settings") }),
2738
- /* @__PURE__ */ React66.createElement(import_ui51.Tab, { label: (0, import_i18n44.__)("Style", "elementor"), ...getTabProps("style") })
2739
- ), /* @__PURE__ */ React66.createElement(import_ui51.Divider, null), /* @__PURE__ */ React66.createElement(import_ui51.TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React66.createElement(SettingsTab, null)), /* @__PURE__ */ React66.createElement(import_ui51.TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React66.createElement(StyleTab, null))))
2785
+ /* @__PURE__ */ React66.createElement(import_react17.Fragment, { key: element.id }, /* @__PURE__ */ React66.createElement(import_ui51.Stack, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React66.createElement(import_ui51.Tabs, { variant: "fullWidth", size: "small", sx: { mt: 0.5 }, ...getTabsProps() }, /* @__PURE__ */ React66.createElement(import_ui51.Tab, { label: (0, import_i18n44.__)("General", "elementor"), ...getTabProps("settings") }), /* @__PURE__ */ React66.createElement(import_ui51.Tab, { label: (0, import_i18n44.__)("Style", "elementor"), ...getTabProps("style") })), /* @__PURE__ */ React66.createElement(import_ui51.Divider, null), /* @__PURE__ */ React66.createElement(import_ui51.TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React66.createElement(SettingsTab, null)), /* @__PURE__ */ React66.createElement(import_ui51.TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React66.createElement(StyleTab, null))))
2740
2786
  );
2741
2787
  };
2742
2788
 
@@ -2798,6 +2844,9 @@ var EditingPanelHooks = () => {
2798
2844
  return null;
2799
2845
  };
2800
2846
 
2847
+ // src/dynamics/init.ts
2848
+ var import_editor_canvas2 = require("@elementor/editor-canvas");
2849
+
2801
2850
  // src/dynamics/components/dynamic-selection-control.tsx
2802
2851
  var React71 = __toESM(require("react"));
2803
2852
  var import_react22 = require("react");
@@ -2849,7 +2898,7 @@ var getAtomicDynamicTags = () => {
2849
2898
  };
2850
2899
 
2851
2900
  // src/dynamics/utils.ts
2852
- var import_editor_props6 = require("@elementor/editor-props");
2901
+ var import_editor_props7 = require("@elementor/editor-props");
2853
2902
  var import_schema = require("@elementor/schema");
2854
2903
  var DYNAMIC_PROP_TYPE_KEY = "dynamic";
2855
2904
  var isDynamicPropType = (prop) => prop.key === DYNAMIC_PROP_TYPE_KEY;
@@ -2858,12 +2907,12 @@ var getDynamicPropType = (propType) => {
2858
2907
  return dynamicPropType && isDynamicPropType(dynamicPropType) ? dynamicPropType : null;
2859
2908
  };
2860
2909
  var isDynamicPropValue = (prop) => {
2861
- return (0, import_editor_props6.isTransformable)(prop) && prop.$$type === DYNAMIC_PROP_TYPE_KEY;
2910
+ return (0, import_editor_props7.isTransformable)(prop) && prop.$$type === DYNAMIC_PROP_TYPE_KEY;
2862
2911
  };
2863
2912
  var supportsDynamic = (propType) => {
2864
2913
  return !!getDynamicPropType(propType);
2865
2914
  };
2866
- var dynamicPropTypeUtil = (0, import_editor_props6.createPropUtils)(
2915
+ var dynamicPropTypeUtil = (0, import_editor_props7.createPropUtils)(
2867
2916
  DYNAMIC_PROP_TYPE_KEY,
2868
2917
  import_schema.z.strictObject({
2869
2918
  name: import_schema.z.string(),
@@ -3120,6 +3169,55 @@ var Control3 = ({ control }) => {
3120
3169
  return /* @__PURE__ */ React71.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React71.createElement(import_ui55.Grid, { container: true, gap: 0.75 }, control.label ? /* @__PURE__ */ React71.createElement(import_ui55.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React71.createElement(import_editor_controls48.ControlFormLabel, null, control.label)) : null, /* @__PURE__ */ React71.createElement(import_ui55.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React71.createElement(Control, { type: control.type, props: control.props }))));
3121
3170
  };
3122
3171
 
3172
+ // src/dynamics/dynamic-transformer.ts
3173
+ var import_editor_canvas = require("@elementor/editor-canvas");
3174
+ var import_editor_props8 = require("@elementor/editor-props");
3175
+
3176
+ // src/dynamics/errors.ts
3177
+ var import_utils8 = require("@elementor/utils");
3178
+ var DynamicTagsManagerNotFoundError = (0, import_utils8.createError)({
3179
+ code: "dynamic_tags_manager_not_found",
3180
+ message: "Dynamic tags manager not found"
3181
+ });
3182
+
3183
+ // src/dynamics/dynamic-transformer.ts
3184
+ var dynamicTransformer = (0, import_editor_canvas.createTransformer)((value) => {
3185
+ if (!value.name) {
3186
+ return null;
3187
+ }
3188
+ return getDynamicValue(value.name, simpleTransform(value.settings ?? {}));
3189
+ });
3190
+ function simpleTransform(props) {
3191
+ const transformed = Object.entries(props).map(([settingKey, settingValue]) => {
3192
+ const value = (0, import_editor_props8.isTransformable)(settingValue) ? settingValue.value : settingValue;
3193
+ return [settingKey, value];
3194
+ });
3195
+ return Object.fromEntries(transformed);
3196
+ }
3197
+ function getDynamicValue(name, settings) {
3198
+ const extendedWindow = window;
3199
+ const { dynamicTags } = extendedWindow.elementor ?? {};
3200
+ if (!dynamicTags) {
3201
+ throw new DynamicTagsManagerNotFoundError();
3202
+ }
3203
+ const getTagValue = () => {
3204
+ const tag = dynamicTags.createTag("v4-dynamic-tag", name, settings);
3205
+ if (!tag) {
3206
+ return null;
3207
+ }
3208
+ return dynamicTags.loadTagDataFromCache(tag) ?? null;
3209
+ };
3210
+ const tagValue = getTagValue();
3211
+ if (tagValue !== null) {
3212
+ return tagValue;
3213
+ }
3214
+ return new Promise((resolve) => {
3215
+ dynamicTags.refreshCacheFromServer(() => {
3216
+ resolve(getTagValue());
3217
+ });
3218
+ });
3219
+ }
3220
+
3123
3221
  // src/dynamics/hooks/use-prop-dynamic-action.tsx
3124
3222
  var React72 = __toESM(require("react"));
3125
3223
  var import_editor_controls49 = require("@elementor/editor-controls");
@@ -3147,6 +3245,8 @@ var init = () => {
3147
3245
  id: "dynamic-tags",
3148
3246
  useProps: usePropDynamicAction
3149
3247
  });
3248
+ import_editor_canvas2.styleTransformersRegistry.register("dynamic", dynamicTransformer);
3249
+ import_editor_canvas2.settingsTransformersRegistry.register("dynamic", dynamicTransformer);
3150
3250
  };
3151
3251
 
3152
3252
  // src/init.ts