@elementor/editor-editing-panel 4.3.0-960 → 4.3.0-962

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.mjs CHANGED
@@ -2722,7 +2722,7 @@ import { CLASSES_PROP_KEY } from "@elementor/editor-props";
2722
2722
  import { useActiveBreakpoint } from "@elementor/editor-responsive";
2723
2723
  import { createLocation as createLocation4 } from "@elementor/locations";
2724
2724
  import { SessionStorageProvider as SessionStorageProvider2 } from "@elementor/session";
2725
- import { Box as Box6, Divider as Divider5, Stack as Stack13 } from "@elementor/ui";
2725
+ import { Box as Box7, Divider as Divider5, Stack as Stack13 } from "@elementor/ui";
2726
2726
  import { __ as __62 } from "@wordpress/i18n";
2727
2727
 
2728
2728
  // src/contexts/styles-inheritance-context.tsx
@@ -4467,11 +4467,28 @@ var GridJustifyItemsField = () => /* @__PURE__ */ React55.createElement(StylesFi
4467
4467
 
4468
4468
  // src/components/style-sections/layout-section/grid-outline-field.tsx
4469
4469
  import * as React56 from "react";
4470
- import { SwitchControl as SwitchControl2 } from "@elementor/editor-controls";
4470
+ import { updateElementEditorSettings, useElementEditorSettings } from "@elementor/editor-elements";
4471
+ import { Box as Box5, Switch } from "@elementor/ui";
4471
4472
  import { __ as __32 } from "@wordpress/i18n";
4472
4473
  var GRID_OUTLINE_LABEL = __32("Show Grid Outline", "elementor");
4473
4474
  var GridOutlineField = () => {
4474
- return /* @__PURE__ */ React56.createElement(SettingsField, { bind: "grid_outline", propDisplayName: GRID_OUTLINE_LABEL }, /* @__PURE__ */ React56.createElement(StylesFieldLayout, { label: GRID_OUTLINE_LABEL }, /* @__PURE__ */ React56.createElement(SwitchControl2, null)));
4475
+ const { element } = useElement();
4476
+ const settings = useElementEditorSettings(element.id);
4477
+ const value = settings?.grid_outline ?? true;
4478
+ return /* @__PURE__ */ React56.createElement(StylesFieldLayout, { label: GRID_OUTLINE_LABEL }, /* @__PURE__ */ React56.createElement(Box5, { sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React56.createElement(
4479
+ Switch,
4480
+ {
4481
+ "aria-label": GRID_OUTLINE_LABEL,
4482
+ checked: value,
4483
+ onChange: (event) => {
4484
+ updateElementEditorSettings({
4485
+ elementId: element.id,
4486
+ settings: { grid_outline: event.target.checked }
4487
+ });
4488
+ },
4489
+ size: "small"
4490
+ }
4491
+ )));
4475
4492
  };
4476
4493
 
4477
4494
  // src/components/style-sections/layout-section/grid-size-field.tsx
@@ -4855,12 +4872,12 @@ var PositionField = () => {
4855
4872
  import * as React65 from "react";
4856
4873
  import { NumberControl as NumberControl4 } from "@elementor/editor-controls";
4857
4874
  import { InfoCircleFilledIcon } from "@elementor/icons";
4858
- import { Alert as Alert3, AlertTitle as AlertTitle2, Box as Box5, Infotip } from "@elementor/ui";
4875
+ import { Alert as Alert3, AlertTitle as AlertTitle2, Box as Box6, Infotip } from "@elementor/ui";
4859
4876
  import { __ as __41 } from "@wordpress/i18n";
4860
4877
  var Z_INDEX_LABEL = __41("Z-index", "elementor");
4861
4878
  var ZIndexField = ({ disabled }) => {
4862
4879
  const StyleField = /* @__PURE__ */ React65.createElement(StylesField, { bind: "z-index", propDisplayName: Z_INDEX_LABEL }, /* @__PURE__ */ React65.createElement(StylesFieldLayout, { label: Z_INDEX_LABEL }, /* @__PURE__ */ React65.createElement(NumberControl4, { disabled })));
4863
- const content = /* @__PURE__ */ React65.createElement(Alert3, { color: "secondary", icon: /* @__PURE__ */ React65.createElement(InfoCircleFilledIcon, null), size: "small" }, /* @__PURE__ */ React65.createElement(AlertTitle2, null, __41("Z-index", "elementor")), /* @__PURE__ */ React65.createElement(Box5, { component: "span" }, __41(
4880
+ const content = /* @__PURE__ */ React65.createElement(Alert3, { color: "secondary", icon: /* @__PURE__ */ React65.createElement(InfoCircleFilledIcon, null), size: "small" }, /* @__PURE__ */ React65.createElement(AlertTitle2, null, __41("Z-index", "elementor")), /* @__PURE__ */ React65.createElement(Box6, { component: "span" }, __41(
4864
4881
  "z-index only works on positioned elements. Change position to relative, absolute, or fixed to enable layering.",
4865
4882
  "elementor"
4866
4883
  )));
@@ -4872,7 +4889,7 @@ var ZIndexField = ({ disabled }) => {
4872
4889
  color: "secondary",
4873
4890
  slotProps: { popper: { sx: { width: 300 } } }
4874
4891
  },
4875
- /* @__PURE__ */ React65.createElement(Box5, null, StyleField)
4892
+ /* @__PURE__ */ React65.createElement(Box6, null, StyleField)
4876
4893
  ) : /* @__PURE__ */ React65.createElement(React65.Fragment, null, StyleField);
4877
4894
  };
4878
4895
 
@@ -5614,7 +5631,7 @@ var StyleTab = () => {
5614
5631
  "transition"
5615
5632
  ]
5616
5633
  }
5617
- ), /* @__PURE__ */ React89.createElement(StyleTabSlot, null)), /* @__PURE__ */ React89.createElement(Box6, { sx: { height: "150px" } })))
5634
+ ), /* @__PURE__ */ React89.createElement(StyleTabSlot, null)), /* @__PURE__ */ React89.createElement(Box7, { sx: { height: "150px" } })))
5618
5635
  ));
5619
5636
  };
5620
5637
  function ClassesHeader({ children }) {
@@ -5779,13 +5796,13 @@ import {
5779
5796
  useBoundProp as useBoundProp7
5780
5797
  } from "@elementor/editor-controls";
5781
5798
  import {
5782
- updateElementEditorSettings,
5799
+ updateElementEditorSettings as updateElementEditorSettings2,
5783
5800
  useElementChildren,
5784
- useElementEditorSettings
5801
+ useElementEditorSettings as useElementEditorSettings2
5785
5802
  } from "@elementor/editor-elements";
5786
5803
  import { numberPropTypeUtil as numberPropTypeUtil4 } from "@elementor/editor-props";
5787
5804
  import { InfoCircleFilledIcon as InfoCircleFilledIcon2 } from "@elementor/icons";
5788
- import { Alert as Alert4, Chip as Chip4, Infotip as Infotip2, Stack as Stack15, Switch, TextField as TextField2, Typography as Typography5 } from "@elementor/ui";
5805
+ import { Alert as Alert4, Chip as Chip4, Infotip as Infotip2, Stack as Stack15, Switch as Switch2, TextField as TextField2, Typography as Typography5 } from "@elementor/ui";
5789
5806
  import { __ as __67 } from "@wordpress/i18n";
5790
5807
 
5791
5808
  // src/controls-registry/element-controls/get-element-by-type.ts
@@ -6093,7 +6110,7 @@ var DefaultTabControl = ({ tabIndex }) => {
6093
6110
  const { value, setValue } = useBoundProp7(numberPropTypeUtil4);
6094
6111
  const isDefault = value === tabIndex;
6095
6112
  return /* @__PURE__ */ React93.createElement(Stack15, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 2 }, /* @__PURE__ */ React93.createElement(ControlFormLabel3, null, __67("Set as default tab", "elementor")), /* @__PURE__ */ React93.createElement(ConditionalTooltip, { showTooltip: isDefault, placement: "right" }, /* @__PURE__ */ React93.createElement(
6096
- Switch,
6113
+ Switch2,
6097
6114
  {
6098
6115
  size: "small",
6099
6116
  checked: isDefault,
@@ -6108,7 +6125,7 @@ var DefaultTabControl = ({ tabIndex }) => {
6108
6125
  )));
6109
6126
  };
6110
6127
  var TabLabelControl = ({ elementId }) => {
6111
- const editorSettings = useElementEditorSettings(elementId);
6128
+ const editorSettings = useElementEditorSettings2(elementId);
6112
6129
  const label = editorSettings?.title ?? "";
6113
6130
  return /* @__PURE__ */ React93.createElement(Stack15, { gap: 1 }, /* @__PURE__ */ React93.createElement(ControlFormLabel3, null, __67("Tab name", "elementor")), /* @__PURE__ */ React93.createElement(
6114
6131
  TextField2,
@@ -6116,7 +6133,7 @@ var TabLabelControl = ({ elementId }) => {
6116
6133
  size: "tiny",
6117
6134
  value: label,
6118
6135
  onChange: ({ target }) => {
6119
- updateElementEditorSettings({
6136
+ updateElementEditorSettings2({
6120
6137
  elementId,
6121
6138
  settings: { title: target.value }
6122
6139
  });
@@ -6344,7 +6361,7 @@ import { DatabaseIcon as DatabaseIcon3, SettingsIcon, XIcon } from "@elementor/i
6344
6361
  import {
6345
6362
  bindPopover,
6346
6363
  bindTrigger as bindTrigger2,
6347
- Box as Box7,
6364
+ Box as Box8,
6348
6365
  Divider as Divider8,
6349
6366
  Grid as Grid8,
6350
6367
  IconButton as IconButton2,
@@ -6643,7 +6660,7 @@ var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
6643
6660
  if (!dynamicTag) {
6644
6661
  throw new Error(`Dynamic tag ${tagName} not found`);
6645
6662
  }
6646
- return /* @__PURE__ */ React98.createElement(Box7, null, /* @__PURE__ */ React98.createElement(
6663
+ return /* @__PURE__ */ React98.createElement(Box8, null, /* @__PURE__ */ React98.createElement(
6647
6664
  Tag,
6648
6665
  {
6649
6666
  fullWidth: true,
@@ -6990,7 +7007,7 @@ import {
6990
7007
  import { PopoverHeader as PopoverHeader3, useSectionWidth as useSectionWidth2 } from "@elementor/editor-ui";
6991
7008
  import {
6992
7009
  Backdrop,
6993
- Box as Box9,
7010
+ Box as Box10,
6994
7011
  Card,
6995
7012
  CardContent,
6996
7013
  ClickAwayListener,
@@ -7173,8 +7190,8 @@ var ValueComponent = ({ index, value }) => {
7173
7190
 
7174
7191
  // src/styles-inheritance/components/infotip/action-icons.tsx
7175
7192
  import * as React103 from "react";
7176
- import { Box as Box8 } from "@elementor/ui";
7177
- var ActionIcons = () => /* @__PURE__ */ React103.createElement(Box8, { display: "flex", gap: 0.5, alignItems: "center" });
7193
+ import { Box as Box9 } from "@elementor/ui";
7194
+ var ActionIcons = () => /* @__PURE__ */ React103.createElement(Box9, { display: "flex", gap: 0.5, alignItems: "center" });
7178
7195
 
7179
7196
  // src/styles-inheritance/components/styles-inheritance-infotip.tsx
7180
7197
  var SECTION_PADDING_INLINE = 32;
@@ -7224,7 +7241,7 @@ var StylesInheritanceInfotip = ({
7224
7241
  }
7225
7242
  },
7226
7243
  /* @__PURE__ */ React104.createElement(
7227
- Box9,
7244
+ Box10,
7228
7245
  {
7229
7246
  sx: {
7230
7247
  position: "sticky",
@@ -7251,7 +7268,7 @@ var StylesInheritanceInfotip = ({
7251
7268
  },
7252
7269
  /* @__PURE__ */ React104.createElement(Stack18, { gap: 1.5, sx: { pl: 2, pr: 1, pt: 1.5, pb: 1.5 }, role: "list" }, items3.map((item, index) => {
7253
7270
  return /* @__PURE__ */ React104.createElement(
7254
- Box9,
7271
+ Box10,
7255
7272
  {
7256
7273
  key: item.id,
7257
7274
  display: "flex",
@@ -7263,7 +7280,7 @@ var StylesInheritanceInfotip = ({
7263
7280
  )
7264
7281
  },
7265
7282
  /* @__PURE__ */ React104.createElement(
7266
- Box9,
7283
+ Box10,
7267
7284
  {
7268
7285
  display: "flex",
7269
7286
  gap: 0.5,
@@ -7279,9 +7296,9 @@ var StylesInheritanceInfotip = ({
7279
7296
  )
7280
7297
  ));
7281
7298
  if (isDisabled) {
7282
- return /* @__PURE__ */ React104.createElement(Box9, { sx: { display: "inline-flex" } }, children);
7299
+ return /* @__PURE__ */ React104.createElement(Box10, { sx: { display: "inline-flex" } }, children);
7283
7300
  }
7284
- return /* @__PURE__ */ React104.createElement(Box9, { ref: triggerRef, sx: { display: "inline-flex" } }, /* @__PURE__ */ React104.createElement(
7301
+ return /* @__PURE__ */ React104.createElement(Box10, { ref: triggerRef, sx: { display: "inline-flex" } }, /* @__PURE__ */ React104.createElement(
7285
7302
  TooltipOrInfotip,
7286
7303
  {
7287
7304
  showInfotip,
@@ -7309,7 +7326,7 @@ function TooltipOrInfotip({
7309
7326
  isDisabled
7310
7327
  }) {
7311
7328
  if (isDisabled) {
7312
- return /* @__PURE__ */ React104.createElement(Box9, { sx: { display: "inline-flex" } }, children);
7329
+ return /* @__PURE__ */ React104.createElement(Box10, { sx: { display: "inline-flex" } }, children);
7313
7330
  }
7314
7331
  if (showInfotip) {
7315
7332
  return /* @__PURE__ */ React104.createElement(React104.Fragment, null, /* @__PURE__ */ React104.createElement(