@elementor/editor-controls 3.32.0-73 → 3.32.0-74

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.d.mts CHANGED
@@ -156,12 +156,12 @@ type Props$2<TMultiPropType extends string, TPropValue extends MultiSizePropValu
156
156
  };
157
157
  declare function EqualUnequalSizesControl<TMultiPropType extends string, TPropValue extends MultiSizePropValue>({ label, icon, tooltipLabel, items, multiSizePropTypeUtil, }: Props$2<TMultiPropType, TPropValue>): React$1.JSX.Element;
158
158
 
159
- declare const LinkedDimensionsControl: ControlComponent<({ label, isSiteRtl, extendedOptions, min, }: {
159
+ declare const LinkedDimensionsControl: ({ label, isSiteRtl, extendedOptions, min, }: {
160
160
  label: string;
161
161
  isSiteRtl?: boolean;
162
162
  extendedOptions?: ExtendedOption[];
163
163
  min?: number;
164
- }) => React$1.JSX.Element>;
164
+ }) => React$1.JSX.Element;
165
165
 
166
166
  type FontCategory = {
167
167
  label: string;
@@ -219,9 +219,9 @@ type Props$1 = ControlProps<{
219
219
  }>;
220
220
  declare const LinkControl: ControlComponent<(props: Props$1) => React$1.JSX.Element>;
221
221
 
222
- declare const GapControl: ControlComponent<({ label }: {
222
+ declare const GapControl: ({ label }: {
223
223
  label: string;
224
- }) => React$1.JSX.Element>;
224
+ }) => React$1.JSX.Element;
225
225
 
226
226
  declare const AspectRatioControl: ControlComponent<({ label }: {
227
227
  label: string;
package/dist/index.d.ts CHANGED
@@ -156,12 +156,12 @@ type Props$2<TMultiPropType extends string, TPropValue extends MultiSizePropValu
156
156
  };
157
157
  declare function EqualUnequalSizesControl<TMultiPropType extends string, TPropValue extends MultiSizePropValue>({ label, icon, tooltipLabel, items, multiSizePropTypeUtil, }: Props$2<TMultiPropType, TPropValue>): React$1.JSX.Element;
158
158
 
159
- declare const LinkedDimensionsControl: ControlComponent<({ label, isSiteRtl, extendedOptions, min, }: {
159
+ declare const LinkedDimensionsControl: ({ label, isSiteRtl, extendedOptions, min, }: {
160
160
  label: string;
161
161
  isSiteRtl?: boolean;
162
162
  extendedOptions?: ExtendedOption[];
163
163
  min?: number;
164
- }) => React$1.JSX.Element>;
164
+ }) => React$1.JSX.Element;
165
165
 
166
166
  type FontCategory = {
167
167
  label: string;
@@ -219,9 +219,9 @@ type Props$1 = ControlProps<{
219
219
  }>;
220
220
  declare const LinkControl: ControlComponent<(props: Props$1) => React$1.JSX.Element>;
221
221
 
222
- declare const GapControl: ControlComponent<({ label }: {
222
+ declare const GapControl: ({ label }: {
223
223
  label: string;
224
- }) => React$1.JSX.Element>;
224
+ }) => React$1.JSX.Element;
225
225
 
226
226
  declare const AspectRatioControl: ControlComponent<({ label }: {
227
227
  label: string;
package/dist/index.js CHANGED
@@ -2347,85 +2347,83 @@ var import_editor_props17 = require("@elementor/editor-props");
2347
2347
  var import_icons7 = require("@elementor/icons");
2348
2348
  var import_ui30 = require("@elementor/ui");
2349
2349
  var import_i18n10 = require("@wordpress/i18n");
2350
- var LinkedDimensionsControl = createControl(
2351
- ({
2352
- label,
2353
- isSiteRtl = false,
2354
- extendedOptions,
2355
- min
2356
- }) => {
2357
- const {
2358
- value: sizeValue,
2359
- setValue: setSizeValue,
2360
- disabled: sizeDisabled,
2361
- placeholder: sizePlaceholder
2362
- } = useBoundProp(import_editor_props17.sizePropTypeUtil);
2363
- const gridRowRefs = [(0, import_react23.useRef)(null), (0, import_react23.useRef)(null)];
2364
- const {
2350
+ var LinkedDimensionsControl = ({
2351
+ label,
2352
+ isSiteRtl = false,
2353
+ extendedOptions,
2354
+ min
2355
+ }) => {
2356
+ const {
2357
+ value: sizeValue,
2358
+ setValue: setSizeValue,
2359
+ disabled: sizeDisabled,
2360
+ placeholder: sizePlaceholder
2361
+ } = useBoundProp(import_editor_props17.sizePropTypeUtil);
2362
+ const gridRowRefs = [(0, import_react23.useRef)(null), (0, import_react23.useRef)(null)];
2363
+ const {
2364
+ value: dimensionsValue,
2365
+ setValue: setDimensionsValue,
2366
+ propType,
2367
+ placeholder: dimensionsPlaceholder,
2368
+ disabled: dimensionsDisabled
2369
+ } = useBoundProp(import_editor_props17.dimensionsPropTypeUtil);
2370
+ const hasUserValues = !!(dimensionsValue || sizeValue);
2371
+ const hasPlaceholders = !!(sizePlaceholder || dimensionsPlaceholder);
2372
+ const isLinked = !hasUserValues && !hasPlaceholders || (hasPlaceholders ? !!sizePlaceholder : !!sizeValue);
2373
+ const onLinkToggle = () => {
2374
+ if (!isLinked) {
2375
+ setSizeValue(dimensionsValue["block-start"]?.value ?? null);
2376
+ return;
2377
+ }
2378
+ const value = sizeValue ? import_editor_props17.sizePropTypeUtil.create(sizeValue) : null;
2379
+ setDimensionsValue({
2380
+ "block-start": value,
2381
+ "block-end": value,
2382
+ "inline-start": value,
2383
+ "inline-end": value
2384
+ });
2385
+ };
2386
+ const tooltipLabel = label.toLowerCase();
2387
+ const LinkedIcon = isLinked ? import_icons7.LinkIcon : import_icons7.DetachIcon;
2388
+ const linkedLabel = (0, import_i18n10.__)("Link %s", "elementor").replace("%s", tooltipLabel);
2389
+ const unlinkedLabel = (0, import_i18n10.__)("Unlink %s", "elementor").replace("%s", tooltipLabel);
2390
+ const disabled = sizeDisabled || dimensionsDisabled;
2391
+ return /* @__PURE__ */ React38.createElement(
2392
+ PropProvider,
2393
+ {
2394
+ propType,
2365
2395
  value: dimensionsValue,
2366
2396
  setValue: setDimensionsValue,
2367
- propType,
2368
2397
  placeholder: dimensionsPlaceholder,
2369
- disabled: dimensionsDisabled
2370
- } = useBoundProp(import_editor_props17.dimensionsPropTypeUtil);
2371
- const hasUserValues = !!(dimensionsValue || sizeValue);
2372
- const hasPlaceholders = !!(sizePlaceholder || dimensionsPlaceholder);
2373
- const isLinked = !hasUserValues && !hasPlaceholders || (hasPlaceholders ? !!sizePlaceholder : !!sizeValue);
2374
- const onLinkToggle = () => {
2375
- if (!isLinked) {
2376
- setSizeValue(dimensionsValue["block-start"]?.value ?? null);
2377
- return;
2378
- }
2379
- const value = sizeValue ? import_editor_props17.sizePropTypeUtil.create(sizeValue) : null;
2380
- setDimensionsValue({
2381
- "block-start": value,
2382
- "block-end": value,
2383
- "inline-start": value,
2384
- "inline-end": value
2385
- });
2386
- };
2387
- const tooltipLabel = label.toLowerCase();
2388
- const LinkedIcon = isLinked ? import_icons7.LinkIcon : import_icons7.DetachIcon;
2389
- const linkedLabel = (0, import_i18n10.__)("Link %s", "elementor").replace("%s", tooltipLabel);
2390
- const unlinkedLabel = (0, import_i18n10.__)("Unlink %s", "elementor").replace("%s", tooltipLabel);
2391
- const disabled = sizeDisabled || dimensionsDisabled;
2392
- return /* @__PURE__ */ React38.createElement(
2393
- PropProvider,
2398
+ isDisabled: () => disabled
2399
+ },
2400
+ /* @__PURE__ */ React38.createElement(import_ui30.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React38.createElement(ControlFormLabel, null, label), /* @__PURE__ */ React38.createElement(import_ui30.Tooltip, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React38.createElement(
2401
+ StyledToggleButton,
2394
2402
  {
2395
- propType,
2396
- value: dimensionsValue,
2397
- setValue: setDimensionsValue,
2398
- placeholder: dimensionsPlaceholder,
2399
- isDisabled: () => disabled
2403
+ "aria-label": isLinked ? unlinkedLabel : linkedLabel,
2404
+ size: "tiny",
2405
+ value: "check",
2406
+ selected: isLinked,
2407
+ sx: { marginLeft: "auto" },
2408
+ onChange: onLinkToggle,
2409
+ disabled,
2410
+ isPlaceholder: hasPlaceholders
2400
2411
  },
2401
- /* @__PURE__ */ React38.createElement(import_ui30.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React38.createElement(ControlFormLabel, null, label), /* @__PURE__ */ React38.createElement(import_ui30.Tooltip, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React38.createElement(
2402
- StyledToggleButton,
2403
- {
2404
- "aria-label": isLinked ? unlinkedLabel : linkedLabel,
2405
- size: "tiny",
2406
- value: "check",
2407
- selected: isLinked,
2408
- sx: { marginLeft: "auto" },
2409
- onChange: onLinkToggle,
2410
- disabled,
2411
- isPlaceholder: hasPlaceholders
2412
- },
2413
- /* @__PURE__ */ React38.createElement(LinkedIcon, { fontSize: "tiny" })
2414
- ))),
2415
- getCssDimensionProps(isSiteRtl).map((row, index) => /* @__PURE__ */ React38.createElement(import_ui30.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", key: index, ref: gridRowRefs[index] }, row.map(({ icon, ...props }) => /* @__PURE__ */ React38.createElement(import_ui30.Grid, { container: true, gap: 0.75, alignItems: "center", key: props.bind }, /* @__PURE__ */ React38.createElement(import_ui30.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React38.createElement(Label, { ...props })), /* @__PURE__ */ React38.createElement(import_ui30.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React38.createElement(
2416
- Control3,
2417
- {
2418
- bind: props.bind,
2419
- startIcon: icon,
2420
- isLinked,
2421
- extendedOptions,
2422
- anchorRef: gridRowRefs[index],
2423
- min
2424
- }
2425
- ))))))
2426
- );
2427
- }
2428
- );
2412
+ /* @__PURE__ */ React38.createElement(LinkedIcon, { fontSize: "tiny" })
2413
+ ))),
2414
+ getCssDimensionProps(isSiteRtl).map((row, index) => /* @__PURE__ */ React38.createElement(import_ui30.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", key: index, ref: gridRowRefs[index] }, row.map(({ icon, ...props }) => /* @__PURE__ */ React38.createElement(import_ui30.Grid, { container: true, gap: 0.75, alignItems: "center", key: props.bind }, /* @__PURE__ */ React38.createElement(import_ui30.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React38.createElement(Label, { ...props })), /* @__PURE__ */ React38.createElement(import_ui30.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React38.createElement(
2415
+ Control3,
2416
+ {
2417
+ bind: props.bind,
2418
+ startIcon: icon,
2419
+ isLinked,
2420
+ extendedOptions,
2421
+ anchorRef: gridRowRefs[index],
2422
+ min
2423
+ }
2424
+ ))))))
2425
+ );
2426
+ };
2429
2427
  var Control3 = ({
2430
2428
  bind,
2431
2429
  startIcon,
@@ -3074,7 +3072,7 @@ var import_editor_props22 = require("@elementor/editor-props");
3074
3072
  var import_icons12 = require("@elementor/icons");
3075
3073
  var import_ui38 = require("@elementor/ui");
3076
3074
  var import_i18n15 = require("@wordpress/i18n");
3077
- var GapControl = createControl(({ label }) => {
3075
+ var GapControl = ({ label }) => {
3078
3076
  const {
3079
3077
  value: directionValue,
3080
3078
  setValue: setDirectionValue,
@@ -3113,7 +3111,7 @@ var GapControl = createControl(({ label }) => {
3113
3111
  },
3114
3112
  /* @__PURE__ */ React46.createElement(LinkedIcon, { fontSize: "tiny" })
3115
3113
  ))), /* @__PURE__ */ React46.createElement(import_ui38.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", ref: stackRef }, /* @__PURE__ */ React46.createElement(import_ui38.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React46.createElement(import_ui38.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React46.createElement(ControlFormLabel, null, (0, import_i18n15.__)("Column", "elementor"))), /* @__PURE__ */ React46.createElement(import_ui38.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React46.createElement(Control4, { bind: "column", isLinked, anchorRef: stackRef }))), /* @__PURE__ */ React46.createElement(import_ui38.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React46.createElement(import_ui38.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React46.createElement(ControlFormLabel, null, (0, import_i18n15.__)("Row", "elementor"))), /* @__PURE__ */ React46.createElement(import_ui38.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React46.createElement(Control4, { bind: "row", isLinked, anchorRef: stackRef })))));
3116
- });
3114
+ };
3117
3115
  var Control4 = ({
3118
3116
  bind,
3119
3117
  isLinked,