@elementor/editor-editing-panel 1.34.0 → 1.35.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 CHANGED
@@ -1,5 +1,22 @@
1
1
  # Change Log
2
2
 
3
+ ## 1.35.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 398d703: Adding stateful memory for selected panels/sections/tabs
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [be87c6e]
12
+ - Updated dependencies [d05046f]
13
+ - @elementor/editor-controls@0.30.0
14
+ - @elementor/locations@0.8.0
15
+ - @elementor/editor@0.19.2
16
+ - @elementor/editor-panels@0.15.2
17
+ - @elementor/menus@0.1.5
18
+ - @elementor/editor-canvas@0.21.2
19
+
3
20
  ## 1.34.0
4
21
 
5
22
  ### Minor Changes
package/dist/index.js CHANGED
@@ -922,7 +922,7 @@ var import_editor_elements8 = require("@elementor/editor-elements");
922
922
  var import_editor_panels = require("@elementor/editor-panels");
923
923
  var import_editor_ui3 = require("@elementor/editor-ui");
924
924
  var import_icons23 = require("@elementor/icons");
925
- var import_session4 = require("@elementor/session");
925
+ var import_session5 = require("@elementor/session");
926
926
  var import_ui58 = require("@elementor/ui");
927
927
  var import_i18n46 = require("@wordpress/i18n");
928
928
 
@@ -981,7 +981,7 @@ function EditorPanelErrorFallback() {
981
981
 
982
982
  // src/components/editing-panel-tabs.tsx
983
983
  var React69 = __toESM(require("react"));
984
- var import_react24 = require("react");
984
+ var import_react25 = require("react");
985
985
  var import_ui57 = require("@elementor/ui");
986
986
  var import_i18n45 = require("@wordpress/i18n");
987
987
 
@@ -1024,10 +1024,25 @@ function useScrollDirection() {
1024
1024
  return (0, import_react9.useContext)(ScrollContext)?.direction ?? DEFAULT_SCROLL_DIRECTION;
1025
1025
  }
1026
1026
 
1027
+ // src/hooks/use-state-by-element.ts
1028
+ var import_react10 = require("react");
1029
+ var import_session = require("@elementor/session");
1030
+ var useStateByElement = (key, initialValue) => {
1031
+ const { element } = useElement();
1032
+ const lookup = `elementor/editor-state/${element.id}/${key}`;
1033
+ const storedValue = (0, import_session.getSessionStorageItem)(lookup);
1034
+ const [value, setValue] = (0, import_react10.useState)(storedValue ?? initialValue);
1035
+ const doUpdate = (newValue) => {
1036
+ (0, import_session.setSessionStorageItem)(lookup, newValue);
1037
+ setValue(newValue);
1038
+ };
1039
+ return [value, doUpdate];
1040
+ };
1041
+
1027
1042
  // src/components/settings-tab.tsx
1028
1043
  var React16 = __toESM(require("react"));
1029
1044
  var import_editor_controls4 = require("@elementor/editor-controls");
1030
- var import_session = require("@elementor/session");
1045
+ var import_session2 = require("@elementor/session");
1031
1046
  var import_ui14 = require("@elementor/ui");
1032
1047
 
1033
1048
  // src/controls-registry/control.tsx
@@ -1116,7 +1131,7 @@ var SettingsField = ({ bind, children }) => {
1116
1131
 
1117
1132
  // src/components/section.tsx
1118
1133
  var React14 = __toESM(require("react"));
1119
- var import_react10 = require("react");
1134
+ var import_react11 = require("react");
1120
1135
  var import_ui12 = require("@elementor/ui");
1121
1136
 
1122
1137
  // src/components/collapse-icon.tsx
@@ -1133,8 +1148,8 @@ var CollapseIcon = (0, import_ui11.styled)(import_icons4.ChevronDownIcon, {
1133
1148
 
1134
1149
  // src/components/section.tsx
1135
1150
  function Section({ title, children, defaultExpanded = false }) {
1136
- const [isOpen, setIsOpen] = (0, import_react10.useState)(!!defaultExpanded);
1137
- const id = (0, import_react10.useId)();
1151
+ const [isOpen, setIsOpen] = useStateByElement(title, !!defaultExpanded);
1152
+ const id = (0, import_react11.useId)();
1138
1153
  const labelId = `label-${id}`;
1139
1154
  const contentId = `content-${id}`;
1140
1155
  return /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(
@@ -1142,7 +1157,7 @@ function Section({ title, children, defaultExpanded = false }) {
1142
1157
  {
1143
1158
  id: labelId,
1144
1159
  "aria-controls": contentId,
1145
- onClick: () => setIsOpen((prev) => !prev),
1160
+ onClick: () => setIsOpen(!isOpen),
1146
1161
  sx: { "&:hover": { backgroundColor: "transparent" } }
1147
1162
  },
1148
1163
  /* @__PURE__ */ React14.createElement(
@@ -1166,7 +1181,7 @@ function SectionsList(props) {
1166
1181
  // src/components/settings-tab.tsx
1167
1182
  var SettingsTab = () => {
1168
1183
  const { elementType, element } = useElement();
1169
- return /* @__PURE__ */ React16.createElement(import_session.SessionStorageProvider, { prefix: element.id }, /* @__PURE__ */ React16.createElement(SectionsList, null, elementType.controls.map(({ type, value }, index) => {
1184
+ return /* @__PURE__ */ React16.createElement(import_session2.SessionStorageProvider, { prefix: element.id }, /* @__PURE__ */ React16.createElement(SectionsList, null, elementType.controls.map(({ type, value }, index) => {
1170
1185
  if (type === "control") {
1171
1186
  return /* @__PURE__ */ React16.createElement(Control2, { key: value.bind, control: value });
1172
1187
  }
@@ -1191,27 +1206,27 @@ var Control2 = ({ control }) => {
1191
1206
 
1192
1207
  // src/components/style-tab.tsx
1193
1208
  var React68 = __toESM(require("react"));
1194
- var import_react23 = require("react");
1209
+ var import_react24 = require("react");
1195
1210
  var import_editor_props7 = require("@elementor/editor-props");
1196
1211
  var import_editor_responsive2 = require("@elementor/editor-responsive");
1197
- var import_session3 = require("@elementor/session");
1212
+ var import_session4 = require("@elementor/session");
1198
1213
  var import_ui56 = require("@elementor/ui");
1199
1214
  var import_i18n44 = require("@wordpress/i18n");
1200
1215
 
1201
1216
  // src/contexts/styles-inheritance-context.tsx
1202
1217
  var React17 = __toESM(require("react"));
1203
- var import_react12 = require("react");
1218
+ var import_react13 = require("react");
1204
1219
  var import_editor_elements4 = require("@elementor/editor-elements");
1205
1220
  var import_editor_props3 = require("@elementor/editor-props");
1206
1221
  var import_editor_responsive = require("@elementor/editor-responsive");
1207
1222
  var import_editor_styles_repository5 = require("@elementor/editor-styles-repository");
1208
1223
 
1209
1224
  // src/hooks/use-styles-rerender.ts
1210
- var import_react11 = require("react");
1225
+ var import_react12 = require("react");
1211
1226
  var useStylesRerender = () => {
1212
1227
  const { provider } = useStyle();
1213
- const [, reRender] = (0, import_react11.useReducer)((p) => !p, false);
1214
- (0, import_react11.useEffect)(() => provider?.subscribe(reRender), [provider]);
1228
+ const [, reRender] = (0, import_react12.useReducer)((p) => !p, false);
1229
+ (0, import_react12.useEffect)(() => provider?.subscribe(reRender), [provider]);
1215
1230
  };
1216
1231
 
1217
1232
  // src/styles-inheritance/create-snapshots-manager.ts
@@ -1372,7 +1387,7 @@ function buildStyleVariantsByMetaMapping(styleDefs) {
1372
1387
  }
1373
1388
 
1374
1389
  // src/contexts/styles-inheritance-context.tsx
1375
- var Context4 = (0, import_react12.createContext)(null);
1390
+ var Context4 = (0, import_react13.createContext)(null);
1376
1391
  function StyleInheritanceProvider({ children }) {
1377
1392
  const styleDefs = useAppliedStyles();
1378
1393
  const breakpointsTree = (0, import_editor_responsive.getBreakpointsTree)();
@@ -1380,7 +1395,7 @@ function StyleInheritanceProvider({ children }) {
1380
1395
  return /* @__PURE__ */ React17.createElement(Context4.Provider, { value: { getSnapshot } }, children);
1381
1396
  }
1382
1397
  function useStylesInheritanceFields(fields) {
1383
- const context = (0, import_react12.useContext)(Context4);
1398
+ const context = (0, import_react13.useContext)(Context4);
1384
1399
  const { meta } = useStyle();
1385
1400
  if (!context) {
1386
1401
  throw new Error("useStylesInheritanceFields must be used within a StyleInheritanceProvider");
@@ -1414,10 +1429,10 @@ var useBaseStyles = () => {
1414
1429
  };
1415
1430
 
1416
1431
  // src/hooks/use-active-style-def-id.ts
1417
- var import_react13 = require("react");
1432
+ var import_react14 = require("react");
1418
1433
  var import_editor_elements5 = require("@elementor/editor-elements");
1419
1434
  function useActiveStyleDefId(classProp) {
1420
- const [activeStyledDefId, setActiveStyledDefId] = (0, import_react13.useState)(null);
1435
+ const [activeStyledDefId, setActiveStyledDefId] = (0, import_react14.useState)(null);
1421
1436
  const appliedClassesIds = useAppliedClassesIds2(classProp)?.value || [];
1422
1437
  const fallback = useFirstAppliedClass(appliedClassesIds);
1423
1438
  const activeAndAppliedClassId = useActiveAndAppliedClassId(activeStyledDefId, appliedClassesIds);
@@ -1447,7 +1462,7 @@ var import_editor_controls6 = require("@elementor/editor-controls");
1447
1462
  var import_editor_styles3 = require("@elementor/editor-styles");
1448
1463
 
1449
1464
  // src/hooks/use-styles-fields.ts
1450
- var import_react14 = require("react");
1465
+ var import_react15 = require("react");
1451
1466
  var import_editor_elements6 = require("@elementor/editor-elements");
1452
1467
  var import_editor_styles = require("@elementor/editor-styles");
1453
1468
  var import_editor_styles_repository6 = require("@elementor/editor-styles-repository");
@@ -1501,7 +1516,7 @@ function getProps({ styleId, elementId, provider, meta, propNames }) {
1501
1516
  );
1502
1517
  }
1503
1518
  function useUndoableCreateElementStyle() {
1504
- return (0, import_react14.useMemo)(() => {
1519
+ return (0, import_react15.useMemo)(() => {
1505
1520
  return (0, import_editor_v1_adapters.undoable)(
1506
1521
  {
1507
1522
  do: (payload) => {
@@ -1529,7 +1544,7 @@ function useUndoableCreateElementStyle() {
1529
1544
  }, []);
1530
1545
  }
1531
1546
  function useUndoableUpdateStyle() {
1532
- return (0, import_react14.useMemo)(() => {
1547
+ return (0, import_react15.useMemo)(() => {
1533
1548
  return (0, import_editor_v1_adapters.undoable)(
1534
1549
  {
1535
1550
  do: ({ elementId, styleId, provider, meta, props }) => {
@@ -1584,7 +1599,7 @@ function useStylesField(propName) {
1584
1599
 
1585
1600
  // src/styles-inheritance/styles-inheritance-indicator.tsx
1586
1601
  var React19 = __toESM(require("react"));
1587
- var import_react17 = require("react");
1602
+ var import_react18 = require("react");
1588
1603
  var import_editor_controls5 = require("@elementor/editor-controls");
1589
1604
  var import_editor_styles_repository7 = require("@elementor/editor-styles-repository");
1590
1605
  var import_ui16 = require("@elementor/ui");
@@ -1612,17 +1627,17 @@ var isExperimentActive = (experiment) => {
1612
1627
 
1613
1628
  // src/styles-inheritance/styles-inheritance-infotip.tsx
1614
1629
  var React18 = __toESM(require("react"));
1615
- var import_react16 = require("react");
1630
+ var import_react17 = require("react");
1616
1631
  var import_editor_canvas = require("@elementor/editor-canvas");
1617
1632
  var import_editor_styles2 = require("@elementor/editor-styles");
1618
1633
  var import_ui15 = require("@elementor/ui");
1619
1634
 
1620
1635
  // src/hooks/use-normalized-inheritance-chain-items.tsx
1621
- var import_react15 = require("react");
1636
+ var import_react16 = require("react");
1622
1637
  var MAXIMUM_ITEMS = 2;
1623
1638
  var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
1624
- const [items3, setItems] = (0, import_react15.useState)([]);
1625
- (0, import_react15.useEffect)(() => {
1639
+ const [items3, setItems] = (0, import_react16.useState)([]);
1640
+ (0, import_react16.useEffect)(() => {
1626
1641
  (async () => {
1627
1642
  const normalizedItems = await Promise.all(
1628
1643
  inheritanceChain.filter((item) => item.style?.label).map((item, index) => normalizeInheritanceItem(item, index, bind, resolve))
@@ -1659,7 +1674,7 @@ var getTransformedValue = async (item, bind, resolve) => {
1659
1674
 
1660
1675
  // src/styles-inheritance/styles-inheritance-infotip.tsx
1661
1676
  var StyleIndicatorInfotip = ({ inheritanceChain, bind }) => {
1662
- const resolve = (0, import_react16.useMemo)(() => {
1677
+ const resolve = (0, import_react17.useMemo)(() => {
1663
1678
  const stylesSchema = (0, import_editor_styles2.getStylesSchema)();
1664
1679
  return (0, import_editor_canvas.createPropsResolver)({
1665
1680
  transformers: import_editor_canvas.styleTransformersRegistry,
@@ -1677,7 +1692,7 @@ var StyleIndicatorInfotip = ({ inheritanceChain, bind }) => {
1677
1692
 
1678
1693
  // src/styles-inheritance/styles-inheritance-indicator.tsx
1679
1694
  var StylesInheritanceIndicator = () => {
1680
- const [open, setOpen] = (0, import_react17.useState)(false);
1695
+ const [open, setOpen] = (0, import_react18.useState)(false);
1681
1696
  const { value, path } = (0, import_editor_controls5.useBoundProp)();
1682
1697
  const { id: currentStyleId, provider: currentStyleProvider, meta: currentStyleMeta } = useStyle();
1683
1698
  const [bind] = path;
@@ -2038,7 +2053,7 @@ var import_i18n11 = require("@wordpress/i18n");
2038
2053
 
2039
2054
  // src/components/style-sections/layout-section/utils/rotated-icon.tsx
2040
2055
  var React33 = __toESM(require("react"));
2041
- var import_react18 = require("react");
2056
+ var import_react19 = require("react");
2042
2057
  var import_ui26 = require("@elementor/ui");
2043
2058
  var CLOCKWISE_ANGLES = {
2044
2059
  row: 0,
@@ -2059,7 +2074,7 @@ var RotatedIcon = ({
2059
2074
  offset = 0,
2060
2075
  disableRotationForReversed = false
2061
2076
  }) => {
2062
- const rotate = (0, import_react18.useRef)(useGetTargetAngle(isClockwise, offset, disableRotationForReversed));
2077
+ const rotate = (0, import_react19.useRef)(useGetTargetAngle(isClockwise, offset, disableRotationForReversed));
2063
2078
  rotate.current = useGetTargetAngle(isClockwise, offset, disableRotationForReversed, rotate);
2064
2079
  return /* @__PURE__ */ React33.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
2065
2080
  };
@@ -2345,7 +2360,7 @@ var FlexDirectionField = () => {
2345
2360
 
2346
2361
  // src/components/style-sections/layout-section/flex-order-field.tsx
2347
2362
  var React39 = __toESM(require("react"));
2348
- var import_react19 = require("react");
2363
+ var import_react20 = require("react");
2349
2364
  var import_editor_controls19 = require("@elementor/editor-controls");
2350
2365
  var import_icons12 = require("@elementor/icons");
2351
2366
  var import_ui32 = require("@elementor/ui");
@@ -2381,7 +2396,7 @@ var items = [
2381
2396
  ];
2382
2397
  var FlexOrderField = () => {
2383
2398
  const { isSiteRtl } = useDirection(), [order, setOrder] = useStylesField("order");
2384
- const [groupControlValue, setGroupControlValue] = (0, import_react19.useState)(getGroupControlValue(order?.value || null));
2399
+ const [groupControlValue, setGroupControlValue] = (0, import_react20.useState)(getGroupControlValue(order?.value || null));
2385
2400
  const handleToggleButtonChange = (group) => {
2386
2401
  setGroupControlValue(group);
2387
2402
  if (!group || group === CUSTOM) {
@@ -2419,7 +2434,7 @@ var getGroupControlValue = (order) => {
2419
2434
 
2420
2435
  // src/components/style-sections/layout-section/flex-size-field.tsx
2421
2436
  var React40 = __toESM(require("react"));
2422
- var import_react20 = require("react");
2437
+ var import_react21 = require("react");
2423
2438
  var import_editor_controls20 = require("@elementor/editor-controls");
2424
2439
  var import_editor_props6 = require("@elementor/editor-props");
2425
2440
  var import_icons13 = require("@elementor/icons");
@@ -2452,7 +2467,7 @@ var FlexSizeField = () => {
2452
2467
  const grow = fields?.["flex-grow"]?.value || null;
2453
2468
  const shrink = fields?.["flex-shrink"]?.value || null;
2454
2469
  const basis = fields?.["flex-basis"]?.value || null;
2455
- const currentGroup = (0, import_react20.useMemo)(() => getActiveGroup({ grow, shrink, basis }), [grow, shrink, basis]), [activeGroup, setActiveGroup] = (0, import_react20.useState)(currentGroup);
2470
+ const currentGroup = (0, import_react21.useMemo)(() => getActiveGroup({ grow, shrink, basis }), [grow, shrink, basis]), [activeGroup, setActiveGroup] = (0, import_react21.useState)(currentGroup);
2456
2471
  const onChangeGroup = (group = null) => {
2457
2472
  setActiveGroup(group);
2458
2473
  if (!group || group === "custom") {
@@ -2629,7 +2644,7 @@ var shouldDisplayFlexFields = (display, local) => {
2629
2644
 
2630
2645
  // src/components/style-sections/position-section/position-section.tsx
2631
2646
  var React49 = __toESM(require("react"));
2632
- var import_session2 = require("@elementor/session");
2647
+ var import_session3 = require("@elementor/session");
2633
2648
 
2634
2649
  // src/components/style-sections/position-section/dimensions-field.tsx
2635
2650
  var React45 = __toESM(require("react"));
@@ -2725,7 +2740,7 @@ var usePersistDimensions = () => {
2725
2740
  const { id: styleDefID, meta } = useStyle();
2726
2741
  const styleVariantPath = `styles/${styleDefID}/${meta.breakpoint || "desktop"}/${meta.state || "null"}`;
2727
2742
  const dimensionsPath = `${styleVariantPath}/dimensions`;
2728
- return (0, import_session2.useSessionStorage)(dimensionsPath);
2743
+ return (0, import_session3.useSessionStorage)(dimensionsPath);
2729
2744
  };
2730
2745
 
2731
2746
  // src/components/style-sections/size-section/size-section.tsx
@@ -2807,11 +2822,11 @@ var React67 = __toESM(require("react"));
2807
2822
 
2808
2823
  // src/components/collapsible-content.tsx
2809
2824
  var React53 = __toESM(require("react"));
2810
- var import_react21 = require("react");
2825
+ var import_react22 = require("react");
2811
2826
  var import_ui43 = require("@elementor/ui");
2812
2827
  var import_i18n29 = require("@wordpress/i18n");
2813
2828
  var CollapsibleContent = ({ children, defaultOpen = false }) => {
2814
- const [open, setOpen] = (0, import_react21.useState)(defaultOpen);
2829
+ const [open, setOpen] = (0, import_react22.useState)(defaultOpen);
2815
2830
  const handleToggle = () => {
2816
2831
  setOpen((prevOpen) => !prevOpen);
2817
2832
  };
@@ -2837,7 +2852,7 @@ var import_ui44 = require("@elementor/ui");
2837
2852
  var import_i18n31 = require("@wordpress/i18n");
2838
2853
 
2839
2854
  // src/components/style-sections/typography-section/hooks/use-font-families.ts
2840
- var import_react22 = require("react");
2855
+ var import_react23 = require("react");
2841
2856
  var import_i18n30 = require("@wordpress/i18n");
2842
2857
  var supportedCategories = {
2843
2858
  system: (0, import_i18n30.__)("System", "elementor"),
@@ -2854,7 +2869,7 @@ var getFontFamilies = () => {
2854
2869
  };
2855
2870
  var useFontFamilies = () => {
2856
2871
  const fontFamilies = getFontFamilies();
2857
- return (0, import_react22.useMemo)(() => {
2872
+ return (0, import_react23.useMemo)(() => {
2858
2873
  const categoriesOrder = ["system", "custom", "googlefonts"];
2859
2874
  return Object.entries(fontFamilies || {}).reduce((acc, [font, category]) => {
2860
2875
  if (!supportedCategories[category]) {
@@ -3158,7 +3173,7 @@ var stickyHeaderStyles = {
3158
3173
  var StyleTab = () => {
3159
3174
  const currentClassesProp = useCurrentClassesProp();
3160
3175
  const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp);
3161
- const [activeStyleState, setActiveStyleState] = (0, import_react23.useState)(null);
3176
+ const [activeStyleState, setActiveStyleState] = (0, import_react24.useState)(null);
3162
3177
  const breakpoint = (0, import_editor_responsive2.useActiveBreakpoint)();
3163
3178
  return /* @__PURE__ */ React68.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React68.createElement(
3164
3179
  StyleProvider,
@@ -3171,7 +3186,7 @@ var StyleTab = () => {
3171
3186
  },
3172
3187
  setMetaState: setActiveStyleState
3173
3188
  },
3174
- /* @__PURE__ */ React68.createElement(import_session3.SessionStorageProvider, { prefix: activeStyleDefId ?? "" }, /* @__PURE__ */ React68.createElement(StyleInheritanceProvider, null, /* @__PURE__ */ React68.createElement(ClassesHeader, null, /* @__PURE__ */ React68.createElement(CssClassSelector, null), /* @__PURE__ */ React68.createElement(import_ui56.Divider, null)), /* @__PURE__ */ React68.createElement(SectionsList, null, /* @__PURE__ */ React68.createElement(Section, { title: (0, import_i18n44.__)("Layout", "elementor") }, /* @__PURE__ */ React68.createElement(LayoutSection, null)), /* @__PURE__ */ React68.createElement(Section, { title: (0, import_i18n44.__)("Spacing", "elementor") }, /* @__PURE__ */ React68.createElement(SpacingSection, null)), /* @__PURE__ */ React68.createElement(Section, { title: (0, import_i18n44.__)("Size", "elementor") }, /* @__PURE__ */ React68.createElement(SizeSection, null)), /* @__PURE__ */ React68.createElement(Section, { title: (0, import_i18n44.__)("Position", "elementor") }, /* @__PURE__ */ React68.createElement(PositionSection, null)), /* @__PURE__ */ React68.createElement(Section, { title: (0, import_i18n44.__)("Typography", "elementor") }, /* @__PURE__ */ React68.createElement(TypographySection, null)), /* @__PURE__ */ React68.createElement(Section, { title: (0, import_i18n44.__)("Background", "elementor") }, /* @__PURE__ */ React68.createElement(BackgroundSection, null)), /* @__PURE__ */ React68.createElement(Section, { title: (0, import_i18n44.__)("Border", "elementor") }, /* @__PURE__ */ React68.createElement(BorderSection, null)), /* @__PURE__ */ React68.createElement(Section, { title: (0, import_i18n44.__)("Effects", "elementor") }, /* @__PURE__ */ React68.createElement(EffectsSection, null)))))
3189
+ /* @__PURE__ */ React68.createElement(import_session4.SessionStorageProvider, { prefix: activeStyleDefId ?? "" }, /* @__PURE__ */ React68.createElement(StyleInheritanceProvider, null, /* @__PURE__ */ React68.createElement(ClassesHeader, null, /* @__PURE__ */ React68.createElement(CssClassSelector, null), /* @__PURE__ */ React68.createElement(import_ui56.Divider, null)), /* @__PURE__ */ React68.createElement(SectionsList, null, /* @__PURE__ */ React68.createElement(Section, { title: (0, import_i18n44.__)("Layout", "elementor") }, /* @__PURE__ */ React68.createElement(LayoutSection, null)), /* @__PURE__ */ React68.createElement(Section, { title: (0, import_i18n44.__)("Spacing", "elementor") }, /* @__PURE__ */ React68.createElement(SpacingSection, null)), /* @__PURE__ */ React68.createElement(Section, { title: (0, import_i18n44.__)("Size", "elementor") }, /* @__PURE__ */ React68.createElement(SizeSection, null)), /* @__PURE__ */ React68.createElement(Section, { title: (0, import_i18n44.__)("Position", "elementor") }, /* @__PURE__ */ React68.createElement(PositionSection, null)), /* @__PURE__ */ React68.createElement(Section, { title: (0, import_i18n44.__)("Typography", "elementor") }, /* @__PURE__ */ React68.createElement(TypographySection, null)), /* @__PURE__ */ React68.createElement(Section, { title: (0, import_i18n44.__)("Background", "elementor") }, /* @__PURE__ */ React68.createElement(BackgroundSection, null)), /* @__PURE__ */ React68.createElement(Section, { title: (0, import_i18n44.__)("Border", "elementor") }, /* @__PURE__ */ React68.createElement(BorderSection, null)), /* @__PURE__ */ React68.createElement(Section, { title: (0, import_i18n44.__)("Effects", "elementor") }, /* @__PURE__ */ React68.createElement(EffectsSection, null)))))
3175
3190
  ));
3176
3191
  };
3177
3192
  function ClassesHeader({ children }) {
@@ -3192,13 +3207,32 @@ function useCurrentClassesProp() {
3192
3207
  // src/components/editing-panel-tabs.tsx
3193
3208
  var EditingPanelTabs = () => {
3194
3209
  const { element } = useElement();
3195
- const { getTabProps, getTabPanelProps, getTabsProps } = (0, import_ui57.useTabs)("settings");
3196
3210
  return (
3197
3211
  // When switching between elements, the local states should be reset. We are using key to rerender the tabs.
3198
3212
  // Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
3199
- /* @__PURE__ */ React69.createElement(import_react24.Fragment, { key: element.id }, /* @__PURE__ */ React69.createElement(ScrollProvider, null, /* @__PURE__ */ React69.createElement(import_ui57.Stack, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React69.createElement(import_ui57.Stack, { sx: { ...stickyHeaderStyles, top: 0 } }, /* @__PURE__ */ React69.createElement(import_ui57.Tabs, { variant: "fullWidth", size: "small", sx: { mt: 0.5 }, ...getTabsProps() }, /* @__PURE__ */ React69.createElement(import_ui57.Tab, { label: (0, import_i18n45.__)("General", "elementor"), ...getTabProps("settings") }), /* @__PURE__ */ React69.createElement(import_ui57.Tab, { label: (0, import_i18n45.__)("Style", "elementor"), ...getTabProps("style") })), /* @__PURE__ */ React69.createElement(import_ui57.Divider, null)), /* @__PURE__ */ React69.createElement(import_ui57.TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React69.createElement(SettingsTab, null)), /* @__PURE__ */ React69.createElement(import_ui57.TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React69.createElement(StyleTab, null)))))
3213
+ /* @__PURE__ */ React69.createElement(import_react25.Fragment, { key: element.id }, /* @__PURE__ */ React69.createElement(PanelTabContent, null))
3200
3214
  );
3201
3215
  };
3216
+ var PanelTabContent = () => {
3217
+ const defaultComponentTab = "settings";
3218
+ const [currentTab, setCurrentTab] = useStateByElement("tab", defaultComponentTab);
3219
+ const { getTabProps, getTabPanelProps, getTabsProps } = (0, import_ui57.useTabs)(currentTab);
3220
+ return /* @__PURE__ */ React69.createElement(ScrollProvider, null, /* @__PURE__ */ React69.createElement(import_ui57.Stack, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React69.createElement(import_ui57.Stack, { sx: { ...stickyHeaderStyles, top: 0 } }, /* @__PURE__ */ React69.createElement(
3221
+ import_ui57.Tabs,
3222
+ {
3223
+ variant: "fullWidth",
3224
+ size: "small",
3225
+ sx: { mt: 0.5 },
3226
+ ...getTabsProps(),
3227
+ onChange: (_, newValue) => {
3228
+ getTabsProps().onChange(_, newValue);
3229
+ setCurrentTab(newValue);
3230
+ }
3231
+ },
3232
+ /* @__PURE__ */ React69.createElement(import_ui57.Tab, { label: (0, import_i18n45.__)("General", "elementor"), ...getTabProps("settings") }),
3233
+ /* @__PURE__ */ React69.createElement(import_ui57.Tab, { label: (0, import_i18n45.__)("Style", "elementor"), ...getTabProps("style") })
3234
+ ), /* @__PURE__ */ React69.createElement(import_ui57.Divider, null)), /* @__PURE__ */ React69.createElement(import_ui57.TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React69.createElement(SettingsTab, null)), /* @__PURE__ */ React69.createElement(import_ui57.TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React69.createElement(StyleTab, null))));
3235
+ };
3202
3236
 
3203
3237
  // src/components/editing-panel.tsx
3204
3238
  var { useMenuItems } = controlActionsMenu;
@@ -3210,7 +3244,7 @@ var EditingPanel = () => {
3210
3244
  return null;
3211
3245
  }
3212
3246
  const panelTitle = (0, import_i18n46.__)("Edit %s", "elementor").replace("%s", elementType.title);
3213
- return /* @__PURE__ */ React70.createElement(import_ui58.ErrorBoundary, { fallback: /* @__PURE__ */ React70.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React70.createElement(import_session4.SessionStorageProvider, { prefix: "elementor" }, /* @__PURE__ */ React70.createElement(import_editor_ui3.ThemeProvider, null, /* @__PURE__ */ React70.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React70.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React70.createElement(import_editor_panels.PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React70.createElement(import_icons23.AtomIcon, { fontSize: "small", sx: { color: "text.tertiary" } })), /* @__PURE__ */ React70.createElement(import_editor_panels.PanelBody, null, /* @__PURE__ */ React70.createElement(import_editor_controls45.ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React70.createElement(import_editor_controls45.ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React70.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React70.createElement(EditingPanelTabs, null)))))))));
3247
+ return /* @__PURE__ */ React70.createElement(import_ui58.ErrorBoundary, { fallback: /* @__PURE__ */ React70.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React70.createElement(import_session5.SessionStorageProvider, { prefix: "elementor" }, /* @__PURE__ */ React70.createElement(import_editor_ui3.ThemeProvider, null, /* @__PURE__ */ React70.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React70.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React70.createElement(import_editor_panels.PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React70.createElement(import_icons23.AtomIcon, { fontSize: "small", sx: { color: "text.tertiary" } })), /* @__PURE__ */ React70.createElement(import_editor_panels.PanelBody, null, /* @__PURE__ */ React70.createElement(import_editor_controls45.ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React70.createElement(import_editor_controls45.ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React70.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React70.createElement(EditingPanelTabs, null)))))))));
3214
3248
  };
3215
3249
 
3216
3250
  // src/panel.ts
@@ -3226,7 +3260,7 @@ var import_editor_panels3 = require("@elementor/editor-panels");
3226
3260
  var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
3227
3261
 
3228
3262
  // src/hooks/use-open-editor-panel.ts
3229
- var import_react25 = require("react");
3263
+ var import_react26 = require("react");
3230
3264
  var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
3231
3265
 
3232
3266
  // src/sync/is-atomic-widget-selected.ts
@@ -3243,7 +3277,7 @@ var isAtomicWidgetSelected = () => {
3243
3277
  // src/hooks/use-open-editor-panel.ts
3244
3278
  var useOpenEditorPanel = () => {
3245
3279
  const { open } = usePanelActions();
3246
- (0, import_react25.useEffect)(() => {
3280
+ (0, import_react26.useEffect)(() => {
3247
3281
  return (0, import_editor_v1_adapters3.__privateListenTo)((0, import_editor_v1_adapters3.commandStartEvent)("panel/editor/open"), () => {
3248
3282
  if (isAtomicWidgetSelected()) {
3249
3283
  open();
@@ -3274,11 +3308,11 @@ var import_ui59 = require("@elementor/ui");
3274
3308
  var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */ React71.createElement(import_ui59.Stack, { alignItems, gap, p }, children);
3275
3309
 
3276
3310
  // src/hooks/use-persist-dynamic-value.ts
3277
- var import_session5 = require("@elementor/session");
3311
+ var import_session6 = require("@elementor/session");
3278
3312
  var usePersistDynamicValue = (propKey) => {
3279
3313
  const { element } = useElement();
3280
3314
  const prefixedKey = `dynamic/non-dynamic-values-history/${element.id}/${propKey}`;
3281
- return (0, import_session5.useSessionStorage)(prefixedKey);
3315
+ return (0, import_session6.useSessionStorage)(prefixedKey);
3282
3316
  };
3283
3317
 
3284
3318
  // src/dynamics/dynamic-control.tsx
@@ -3286,10 +3320,10 @@ var React72 = __toESM(require("react"));
3286
3320
  var import_editor_controls47 = require("@elementor/editor-controls");
3287
3321
 
3288
3322
  // src/dynamics/hooks/use-dynamic-tag.ts
3289
- var import_react27 = require("react");
3323
+ var import_react28 = require("react");
3290
3324
 
3291
3325
  // src/dynamics/hooks/use-prop-dynamic-tags.ts
3292
- var import_react26 = require("react");
3326
+ var import_react27 = require("react");
3293
3327
  var import_editor_controls46 = require("@elementor/editor-controls");
3294
3328
 
3295
3329
  // src/dynamics/sync/get-elementor-config.ts
@@ -3341,7 +3375,7 @@ var usePropDynamicTags = () => {
3341
3375
  const propDynamicType = getDynamicPropType(propType);
3342
3376
  categories = propDynamicType?.settings.categories || [];
3343
3377
  }
3344
- return (0, import_react26.useMemo)(() => getDynamicTagsByCategories(categories), [categories.join()]);
3378
+ return (0, import_react27.useMemo)(() => getDynamicTagsByCategories(categories), [categories.join()]);
3345
3379
  };
3346
3380
  var getDynamicTagsByCategories = (categories) => {
3347
3381
  const dynamicTags = getAtomicDynamicTags();
@@ -3357,7 +3391,7 @@ var getDynamicTagsByCategories = (categories) => {
3357
3391
  // src/dynamics/hooks/use-dynamic-tag.ts
3358
3392
  var useDynamicTag = (tagName) => {
3359
3393
  const dynamicTags = usePropDynamicTags();
3360
- return (0, import_react27.useMemo)(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
3394
+ return (0, import_react28.useMemo)(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
3361
3395
  };
3362
3396
 
3363
3397
  // src/dynamics/dynamic-control.tsx
@@ -3386,14 +3420,14 @@ var DynamicControl = ({ bind, children }) => {
3386
3420
 
3387
3421
  // src/dynamics/components/dynamic-selection.tsx
3388
3422
  var React73 = __toESM(require("react"));
3389
- var import_react28 = require("react");
3423
+ var import_react29 = require("react");
3390
3424
  var import_editor_controls48 = require("@elementor/editor-controls");
3391
3425
  var import_icons24 = require("@elementor/icons");
3392
3426
  var import_ui60 = require("@elementor/ui");
3393
3427
  var import_i18n47 = require("@wordpress/i18n");
3394
3428
  var SIZE3 = "tiny";
3395
3429
  var DynamicSelection = ({ onSelect }) => {
3396
- const [searchValue, setSearchValue] = (0, import_react28.useState)("");
3430
+ const [searchValue, setSearchValue] = (0, import_react29.useState)("");
3397
3431
  const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
3398
3432
  const { value: anyValue } = (0, import_editor_controls48.useBoundProp)();
3399
3433
  const { bind, value: dynamicValue, setValue } = (0, import_editor_controls48.useBoundProp)(dynamicPropTypeUtil);
@@ -3411,7 +3445,7 @@ var DynamicSelection = ({ onSelect }) => {
3411
3445
  setValue({ name: value, settings: { label } });
3412
3446
  onSelect?.();
3413
3447
  };
3414
- return /* @__PURE__ */ React73.createElement(import_ui60.Stack, null, hasNoDynamicTags ? /* @__PURE__ */ React73.createElement(NoDynamicTags, null) : /* @__PURE__ */ React73.createElement(import_react28.Fragment, null, /* @__PURE__ */ React73.createElement(import_ui60.Box, { px: 1.5, pb: 1 }, /* @__PURE__ */ React73.createElement(
3448
+ return /* @__PURE__ */ React73.createElement(import_ui60.Stack, null, hasNoDynamicTags ? /* @__PURE__ */ React73.createElement(NoDynamicTags, null) : /* @__PURE__ */ React73.createElement(import_react29.Fragment, null, /* @__PURE__ */ React73.createElement(import_ui60.Box, { px: 1.5, pb: 1 }, /* @__PURE__ */ React73.createElement(
3415
3449
  import_ui60.TextField,
3416
3450
  {
3417
3451
  fullWidth: true,
@@ -3423,7 +3457,7 @@ var DynamicSelection = ({ onSelect }) => {
3423
3457
  startAdornment: /* @__PURE__ */ React73.createElement(import_ui60.InputAdornment, { position: "start" }, /* @__PURE__ */ React73.createElement(import_icons24.SearchIcon, { fontSize: SIZE3 }))
3424
3458
  }
3425
3459
  }
3426
- )), /* @__PURE__ */ React73.createElement(import_ui60.Divider, null), /* @__PURE__ */ React73.createElement(import_ui60.Box, { sx: { overflowY: "auto", height: 260, width: 220 } }, options12.length > 0 ? /* @__PURE__ */ React73.createElement(import_ui60.MenuList, { role: "listbox", tabIndex: 0 }, options12.map(([category, items3], index) => /* @__PURE__ */ React73.createElement(import_react28.Fragment, { key: index }, /* @__PURE__ */ React73.createElement(
3460
+ )), /* @__PURE__ */ React73.createElement(import_ui60.Divider, null), /* @__PURE__ */ React73.createElement(import_ui60.Box, { sx: { overflowY: "auto", height: 260, width: 220 } }, options12.length > 0 ? /* @__PURE__ */ React73.createElement(import_ui60.MenuList, { role: "listbox", tabIndex: 0 }, options12.map(([category, items3], index) => /* @__PURE__ */ React73.createElement(import_react29.Fragment, { key: index }, /* @__PURE__ */ React73.createElement(
3427
3461
  import_ui60.MenuSubheader,
3428
3462
  {
3429
3463
  sx: { px: 1.5, typography: "caption", color: "text.tertiary" }