@elementor/editor-editing-panel 3.33.0-287 → 3.33.0-289
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 +1532 -1519
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1324 -1311
- package/dist/index.mjs.map +1 -1
- package/package.json +20 -20
- package/src/components/settings-tab.tsx +11 -12
- package/src/controls-registry/styles-field.tsx +2 -9
- package/src/field-indicators-registry.ts +37 -0
- package/src/styles-inheritance/init.ts +9 -0
package/dist/index.js
CHANGED
|
@@ -1756,14 +1756,14 @@ var useFontFamilies = () => {
|
|
|
1756
1756
|
};
|
|
1757
1757
|
|
|
1758
1758
|
// src/components/style-tab.tsx
|
|
1759
|
-
var
|
|
1760
|
-
var
|
|
1761
|
-
var
|
|
1762
|
-
var
|
|
1759
|
+
var React74 = __toESM(require("react"));
|
|
1760
|
+
var import_react34 = require("react");
|
|
1761
|
+
var import_editor_props11 = require("@elementor/editor-props");
|
|
1762
|
+
var import_editor_responsive3 = require("@elementor/editor-responsive");
|
|
1763
1763
|
var import_locations3 = require("@elementor/locations");
|
|
1764
1764
|
var import_session5 = require("@elementor/session");
|
|
1765
|
-
var
|
|
1766
|
-
var
|
|
1765
|
+
var import_ui33 = require("@elementor/ui");
|
|
1766
|
+
var import_i18n54 = require("@wordpress/i18n");
|
|
1767
1767
|
|
|
1768
1768
|
// src/contexts/scroll-context.tsx
|
|
1769
1769
|
var React14 = __toESM(require("react"));
|
|
@@ -2134,14 +2134,34 @@ function SectionsList(props) {
|
|
|
2134
2134
|
}
|
|
2135
2135
|
|
|
2136
2136
|
// src/components/style-sections/background-section/background-section.tsx
|
|
2137
|
-
var
|
|
2138
|
-
var
|
|
2139
|
-
var
|
|
2137
|
+
var React18 = __toESM(require("react"));
|
|
2138
|
+
var import_editor_controls3 = require("@elementor/editor-controls");
|
|
2139
|
+
var import_i18n8 = require("@wordpress/i18n");
|
|
2140
2140
|
|
|
2141
2141
|
// src/controls-registry/styles-field.tsx
|
|
2142
|
-
var
|
|
2143
|
-
var
|
|
2144
|
-
var
|
|
2142
|
+
var React17 = __toESM(require("react"));
|
|
2143
|
+
var import_editor_controls2 = require("@elementor/editor-controls");
|
|
2144
|
+
var import_editor_styles6 = require("@elementor/editor-styles");
|
|
2145
|
+
|
|
2146
|
+
// src/field-indicators-registry.ts
|
|
2147
|
+
var indicatorsRegistry = {
|
|
2148
|
+
settings: /* @__PURE__ */ new Map(),
|
|
2149
|
+
styles: /* @__PURE__ */ new Map()
|
|
2150
|
+
};
|
|
2151
|
+
var DEFAULT_PRIORITY = 10;
|
|
2152
|
+
var FIELD_TYPE = {
|
|
2153
|
+
SETTINGS: "settings",
|
|
2154
|
+
STYLES: "styles"
|
|
2155
|
+
};
|
|
2156
|
+
var registerFieldIndicator = ({
|
|
2157
|
+
fieldType,
|
|
2158
|
+
id,
|
|
2159
|
+
indicator,
|
|
2160
|
+
priority = DEFAULT_PRIORITY
|
|
2161
|
+
}) => {
|
|
2162
|
+
indicatorsRegistry[fieldType].set(id, { id, indicator, priority });
|
|
2163
|
+
};
|
|
2164
|
+
var getFieldIndicators = (fieldType) => Array.from(indicatorsRegistry[fieldType].values()).sort((a, b) => a.priority - b.priority).map(({ id, indicator: Adornment }) => ({ id, Adornment }));
|
|
2145
2165
|
|
|
2146
2166
|
// src/hooks/use-styles-field.ts
|
|
2147
2167
|
function useStylesField(propName, meta) {
|
|
@@ -2153,690 +2173,285 @@ function useStylesField(propName, meta) {
|
|
|
2153
2173
|
return { value, setValue, canEdit };
|
|
2154
2174
|
}
|
|
2155
2175
|
|
|
2156
|
-
// src/
|
|
2157
|
-
var React22 = __toESM(require("react"));
|
|
2176
|
+
// src/controls-registry/conditional-field.tsx
|
|
2158
2177
|
var import_editor_controls = require("@elementor/editor-controls");
|
|
2159
2178
|
var import_editor_props7 = require("@elementor/editor-props");
|
|
2160
|
-
var
|
|
2161
|
-
|
|
2179
|
+
var ConditionalField = ({ children }) => {
|
|
2180
|
+
const { propType } = (0, import_editor_controls.useBoundProp)();
|
|
2181
|
+
const depList = getDependencies(propType);
|
|
2182
|
+
const { values: depValues } = useStylesFields(depList);
|
|
2183
|
+
const isHidden = !(0, import_editor_props7.isDependencyMet)(propType?.dependencies, depValues).isMet;
|
|
2184
|
+
return isHidden ? null : children;
|
|
2185
|
+
};
|
|
2186
|
+
function getDependencies(propType) {
|
|
2187
|
+
if (!propType?.dependencies?.terms.length) {
|
|
2188
|
+
return [];
|
|
2189
|
+
}
|
|
2190
|
+
return propType.dependencies.terms.flatMap((term) => !(0, import_editor_props7.isDependency)(term) ? term.path : []);
|
|
2191
|
+
}
|
|
2162
2192
|
|
|
2163
|
-
// src/
|
|
2193
|
+
// src/controls-registry/create-top-level-object-type.ts
|
|
2194
|
+
var createTopLevelObjectType = ({ schema }) => {
|
|
2195
|
+
const schemaPropType = {
|
|
2196
|
+
key: "",
|
|
2197
|
+
kind: "object",
|
|
2198
|
+
meta: {},
|
|
2199
|
+
settings: {},
|
|
2200
|
+
default: null,
|
|
2201
|
+
shape: schema
|
|
2202
|
+
};
|
|
2203
|
+
return schemaPropType;
|
|
2204
|
+
};
|
|
2205
|
+
|
|
2206
|
+
// src/controls-registry/styles-field.tsx
|
|
2207
|
+
var StylesField = ({ bind, propDisplayName, children }) => {
|
|
2208
|
+
const stylesSchema = (0, import_editor_styles6.getStylesSchema)();
|
|
2209
|
+
const stylesInheritanceChain = useStylesInheritanceChain([bind]);
|
|
2210
|
+
const { value, canEdit, ...fields } = useStylesField(bind, { history: { propDisplayName } });
|
|
2211
|
+
const propType = createTopLevelObjectType({ schema: stylesSchema });
|
|
2212
|
+
const [actualValue] = stylesInheritanceChain;
|
|
2213
|
+
const placeholderValues = {
|
|
2214
|
+
[bind]: actualValue?.value
|
|
2215
|
+
};
|
|
2216
|
+
const setValue = (newValue) => {
|
|
2217
|
+
fields.setValue(newValue[bind]);
|
|
2218
|
+
};
|
|
2219
|
+
return /* @__PURE__ */ React17.createElement(import_editor_controls2.ControlAdornmentsProvider, { items: getFieldIndicators("styles") }, /* @__PURE__ */ React17.createElement(
|
|
2220
|
+
import_editor_controls2.PropProvider,
|
|
2221
|
+
{
|
|
2222
|
+
propType,
|
|
2223
|
+
value: { [bind]: value },
|
|
2224
|
+
setValue,
|
|
2225
|
+
placeholder: placeholderValues,
|
|
2226
|
+
isDisabled: () => !canEdit
|
|
2227
|
+
},
|
|
2228
|
+
/* @__PURE__ */ React17.createElement(import_editor_controls2.PropKeyProvider, { bind }, /* @__PURE__ */ React17.createElement(ConditionalField, null, children))
|
|
2229
|
+
));
|
|
2230
|
+
};
|
|
2231
|
+
|
|
2232
|
+
// src/components/style-sections/background-section/background-section.tsx
|
|
2233
|
+
var BACKGROUND_LABEL = (0, import_i18n8.__)("Background", "elementor");
|
|
2234
|
+
var BackgroundSection = () => {
|
|
2235
|
+
return /* @__PURE__ */ React18.createElement(SectionContent, null, /* @__PURE__ */ React18.createElement(StylesField, { bind: "background", propDisplayName: BACKGROUND_LABEL }, /* @__PURE__ */ React18.createElement(import_editor_controls3.BackgroundControl, null)));
|
|
2236
|
+
};
|
|
2237
|
+
|
|
2238
|
+
// src/components/style-sections/border-section/border-section.tsx
|
|
2239
|
+
var React26 = __toESM(require("react"));
|
|
2240
|
+
|
|
2241
|
+
// src/components/style-sections/border-section/border-color-field.tsx
|
|
2164
2242
|
var React21 = __toESM(require("react"));
|
|
2165
|
-
var
|
|
2166
|
-
var
|
|
2167
|
-
|
|
2168
|
-
|
|
2243
|
+
var import_editor_controls5 = require("@elementor/editor-controls");
|
|
2244
|
+
var import_i18n9 = require("@wordpress/i18n");
|
|
2245
|
+
|
|
2246
|
+
// src/components/styles-field-layout.tsx
|
|
2247
|
+
var React20 = __toESM(require("react"));
|
|
2248
|
+
var import_ui12 = require("@elementor/ui");
|
|
2249
|
+
|
|
2250
|
+
// src/components/control-label.tsx
|
|
2251
|
+
var React19 = __toESM(require("react"));
|
|
2252
|
+
var import_editor_controls4 = require("@elementor/editor-controls");
|
|
2253
|
+
var import_ui11 = require("@elementor/ui");
|
|
2254
|
+
var ControlLabel = ({ children }) => {
|
|
2255
|
+
return /* @__PURE__ */ React19.createElement(import_ui11.Stack, { direction: "row", alignItems: "center", justifyItems: "start", gap: 0.25 }, /* @__PURE__ */ React19.createElement(import_editor_controls4.ControlFormLabel, null, children), /* @__PURE__ */ React19.createElement(import_editor_controls4.ControlAdornments, null));
|
|
2256
|
+
};
|
|
2257
|
+
|
|
2258
|
+
// src/components/styles-field-layout.tsx
|
|
2259
|
+
var StylesFieldLayout = React20.forwardRef((props, ref) => {
|
|
2260
|
+
const { direction = "row", children, label } = props;
|
|
2261
|
+
const LayoutComponent = direction === "row" ? Row : Column;
|
|
2262
|
+
return /* @__PURE__ */ React20.createElement(LayoutComponent, { label, ref, children });
|
|
2263
|
+
});
|
|
2264
|
+
var Row = React20.forwardRef(
|
|
2265
|
+
({ label, children }, ref) => {
|
|
2266
|
+
return /* @__PURE__ */ React20.createElement(
|
|
2267
|
+
import_ui12.Grid,
|
|
2268
|
+
{
|
|
2269
|
+
container: true,
|
|
2270
|
+
gap: 2,
|
|
2271
|
+
alignItems: "center",
|
|
2272
|
+
flexWrap: "nowrap",
|
|
2273
|
+
ref,
|
|
2274
|
+
"aria-label": `${label} control`
|
|
2275
|
+
},
|
|
2276
|
+
/* @__PURE__ */ React20.createElement(import_ui12.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React20.createElement(ControlLabel, null, label)),
|
|
2277
|
+
/* @__PURE__ */ React20.createElement(
|
|
2278
|
+
import_ui12.Grid,
|
|
2279
|
+
{
|
|
2280
|
+
item: true,
|
|
2281
|
+
xs: 6,
|
|
2282
|
+
sx: (theme) => ({
|
|
2283
|
+
width: `calc(50% - ${theme.spacing(2)})`
|
|
2284
|
+
})
|
|
2285
|
+
},
|
|
2286
|
+
children
|
|
2287
|
+
)
|
|
2288
|
+
);
|
|
2289
|
+
}
|
|
2290
|
+
);
|
|
2291
|
+
var Column = React20.forwardRef(
|
|
2292
|
+
({ label, children }, ref) => {
|
|
2293
|
+
return /* @__PURE__ */ React20.createElement(import_ui12.Stack, { gap: 0.75, ref }, /* @__PURE__ */ React20.createElement(ControlLabel, null, label), children);
|
|
2294
|
+
}
|
|
2295
|
+
);
|
|
2296
|
+
|
|
2297
|
+
// src/components/style-sections/border-section/border-color-field.tsx
|
|
2298
|
+
var BORDER_COLOR_LABEL = (0, import_i18n9.__)("Border color", "elementor");
|
|
2299
|
+
var BorderColorField = () => /* @__PURE__ */ React21.createElement(StylesField, { bind: "border-color", propDisplayName: BORDER_COLOR_LABEL }, /* @__PURE__ */ React21.createElement(StylesFieldLayout, { label: BORDER_COLOR_LABEL }, /* @__PURE__ */ React21.createElement(import_editor_controls5.ColorControl, null)));
|
|
2300
|
+
|
|
2301
|
+
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
2302
|
+
var React23 = __toESM(require("react"));
|
|
2303
|
+
var import_editor_controls6 = require("@elementor/editor-controls");
|
|
2304
|
+
var import_editor_props8 = require("@elementor/editor-props");
|
|
2305
|
+
var import_icons3 = require("@elementor/icons");
|
|
2306
|
+
var import_ui15 = require("@elementor/ui");
|
|
2169
2307
|
var import_i18n10 = require("@wordpress/i18n");
|
|
2170
2308
|
|
|
2171
2309
|
// src/hooks/use-direction.ts
|
|
2172
|
-
var
|
|
2310
|
+
var import_ui13 = require("@elementor/ui");
|
|
2173
2311
|
function useDirection() {
|
|
2174
|
-
const theme = (0,
|
|
2312
|
+
const theme = (0, import_ui13.useTheme)();
|
|
2175
2313
|
const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!getElementorFrontendConfig()?.is_rtl;
|
|
2176
2314
|
return { isSiteRtl, isUiRtl };
|
|
2177
2315
|
}
|
|
2178
2316
|
|
|
2179
|
-
// src/styles-inheritance/
|
|
2180
|
-
var
|
|
2181
|
-
var
|
|
2182
|
-
var
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
2186
|
-
const [items3, setItems] = (0, import_react19.useState)([]);
|
|
2187
|
-
(0, import_react19.useEffect)(() => {
|
|
2188
|
-
(async () => {
|
|
2189
|
-
const normalizedItems = await Promise.all(
|
|
2190
|
-
inheritanceChain.filter(({ style }) => style).map((item, index) => normalizeInheritanceItem(item, index, bind, resolve))
|
|
2191
|
-
);
|
|
2192
|
-
const validItems = normalizedItems.map((item) => ({
|
|
2193
|
-
...item,
|
|
2194
|
-
displayLabel: import_editor_styles_repository12.ELEMENTS_BASE_STYLES_PROVIDER_KEY !== item.provider ? item.displayLabel : (0, import_i18n8.__)("Base", "elementor")
|
|
2195
|
-
})).filter((item) => !item.value || item.displayLabel !== "").slice(0, MAXIMUM_ITEMS);
|
|
2196
|
-
setItems(validItems);
|
|
2197
|
-
})();
|
|
2198
|
-
}, [inheritanceChain, bind, resolve]);
|
|
2199
|
-
return items3;
|
|
2200
|
-
};
|
|
2201
|
-
var DEFAULT_BREAKPOINT2 = "desktop";
|
|
2202
|
-
var normalizeInheritanceItem = async (item, index, bind, resolve) => {
|
|
2203
|
-
const {
|
|
2204
|
-
variant: {
|
|
2205
|
-
meta: { state, breakpoint }
|
|
2206
|
-
},
|
|
2207
|
-
style: { label, id }
|
|
2208
|
-
} = item;
|
|
2209
|
-
const displayLabel = getLabel({ label, state });
|
|
2210
|
-
return {
|
|
2211
|
-
id: id ? id + (state ?? "") : index,
|
|
2212
|
-
provider: item.provider || "",
|
|
2213
|
-
breakpoint: breakpoint ?? DEFAULT_BREAKPOINT2,
|
|
2214
|
-
displayLabel,
|
|
2215
|
-
value: await getTransformedValue(item, bind, resolve)
|
|
2216
|
-
};
|
|
2317
|
+
// src/styles-inheritance/components/ui-providers.tsx
|
|
2318
|
+
var React22 = __toESM(require("react"));
|
|
2319
|
+
var import_ui14 = require("@elementor/ui");
|
|
2320
|
+
var UiProviders = ({ children }) => {
|
|
2321
|
+
const { isSiteRtl } = useDirection();
|
|
2322
|
+
return /* @__PURE__ */ React22.createElement(import_ui14.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React22.createElement(import_ui14.ThemeProvider, null, children));
|
|
2217
2323
|
};
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2324
|
+
|
|
2325
|
+
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
2326
|
+
var BORDER_RADIUS_LABEL = (0, import_i18n10.__)("Border radius", "elementor");
|
|
2327
|
+
var StartStartIcon = (0, import_ui15.withDirection)(import_icons3.RadiusTopLeftIcon);
|
|
2328
|
+
var StartEndIcon = (0, import_ui15.withDirection)(import_icons3.RadiusTopRightIcon);
|
|
2329
|
+
var EndStartIcon = (0, import_ui15.withDirection)(import_icons3.RadiusBottomLeftIcon);
|
|
2330
|
+
var EndEndIcon = (0, import_ui15.withDirection)(import_icons3.RadiusBottomRightIcon);
|
|
2331
|
+
var getStartStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n10.__)("Top right", "elementor") : (0, import_i18n10.__)("Top left", "elementor");
|
|
2332
|
+
var getStartEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n10.__)("Top left", "elementor") : (0, import_i18n10.__)("Top right", "elementor");
|
|
2333
|
+
var getEndStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n10.__)("Bottom right", "elementor") : (0, import_i18n10.__)("Bottom left", "elementor");
|
|
2334
|
+
var getEndEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n10.__)("Bottom left", "elementor") : (0, import_i18n10.__)("Bottom right", "elementor");
|
|
2335
|
+
var getCorners = (isSiteRtl) => [
|
|
2336
|
+
{
|
|
2337
|
+
label: getStartStartLabel(isSiteRtl),
|
|
2338
|
+
icon: /* @__PURE__ */ React23.createElement(StartStartIcon, { fontSize: "tiny" }),
|
|
2339
|
+
bind: "start-start"
|
|
2340
|
+
},
|
|
2341
|
+
{
|
|
2342
|
+
label: getStartEndLabel(isSiteRtl),
|
|
2343
|
+
icon: /* @__PURE__ */ React23.createElement(StartEndIcon, { fontSize: "tiny" }),
|
|
2344
|
+
bind: "start-end"
|
|
2345
|
+
},
|
|
2346
|
+
{
|
|
2347
|
+
label: getEndStartLabel(isSiteRtl),
|
|
2348
|
+
icon: /* @__PURE__ */ React23.createElement(EndStartIcon, { fontSize: "tiny" }),
|
|
2349
|
+
bind: "end-start"
|
|
2350
|
+
},
|
|
2351
|
+
{
|
|
2352
|
+
label: getEndEndLabel(isSiteRtl),
|
|
2353
|
+
icon: /* @__PURE__ */ React23.createElement(EndEndIcon, { fontSize: "tiny" }),
|
|
2354
|
+
bind: "end-end"
|
|
2224
2355
|
}
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
return value;
|
|
2237
|
-
}
|
|
2238
|
-
if (typeof value === "object") {
|
|
2239
|
-
return JSON.stringify(value);
|
|
2356
|
+
];
|
|
2357
|
+
var BorderRadiusField = () => {
|
|
2358
|
+
const { isSiteRtl } = useDirection();
|
|
2359
|
+
return /* @__PURE__ */ React23.createElement(UiProviders, null, /* @__PURE__ */ React23.createElement(StylesField, { bind: "border-radius", propDisplayName: BORDER_RADIUS_LABEL }, /* @__PURE__ */ React23.createElement(
|
|
2360
|
+
import_editor_controls6.EqualUnequalSizesControl,
|
|
2361
|
+
{
|
|
2362
|
+
items: getCorners(isSiteRtl),
|
|
2363
|
+
label: BORDER_RADIUS_LABEL,
|
|
2364
|
+
icon: /* @__PURE__ */ React23.createElement(import_icons3.BorderCornersIcon, { fontSize: "tiny" }),
|
|
2365
|
+
tooltipLabel: (0, import_i18n10.__)("Adjust corners", "elementor"),
|
|
2366
|
+
multiSizePropTypeUtil: import_editor_props8.borderRadiusPropTypeUtil
|
|
2240
2367
|
}
|
|
2241
|
-
|
|
2242
|
-
} catch {
|
|
2243
|
-
return "";
|
|
2244
|
-
}
|
|
2368
|
+
)));
|
|
2245
2369
|
};
|
|
2246
2370
|
|
|
2247
|
-
// src/
|
|
2248
|
-
var
|
|
2249
|
-
var
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
var
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
mobile_extra: import_icons3.MobileLandscapeIcon,
|
|
2265
|
-
mobile: import_icons3.MobilePortraitIcon
|
|
2266
|
-
};
|
|
2267
|
-
var BreakpointIcon = ({ breakpoint }) => {
|
|
2268
|
-
const breakpoints = (0, import_editor_responsive3.useBreakpoints)();
|
|
2269
|
-
const currentBreakpoint = breakpoint || DEFAULT_BREAKPOINT3;
|
|
2270
|
-
const IconComponent = breakpointIconMap[currentBreakpoint];
|
|
2271
|
-
if (!IconComponent) {
|
|
2272
|
-
return null;
|
|
2273
|
-
}
|
|
2274
|
-
const breakpointLabel = breakpoints.find((breakpointItem) => breakpointItem.id === currentBreakpoint)?.label;
|
|
2275
|
-
return /* @__PURE__ */ React17.createElement(import_ui12.Tooltip, { title: breakpointLabel, placement: "top" }, /* @__PURE__ */ React17.createElement(IconComponent, { fontSize: SIZE, sx: { mt: "2px" } }));
|
|
2276
|
-
};
|
|
2277
|
-
|
|
2278
|
-
// src/styles-inheritance/components/infotip/label-chip.tsx
|
|
2279
|
-
var React18 = __toESM(require("react"));
|
|
2280
|
-
var import_editor_styles_repository13 = require("@elementor/editor-styles-repository");
|
|
2281
|
-
var import_icons4 = require("@elementor/icons");
|
|
2282
|
-
var import_ui13 = require("@elementor/ui");
|
|
2283
|
-
var import_i18n9 = require("@wordpress/i18n");
|
|
2284
|
-
var SIZE2 = "tiny";
|
|
2285
|
-
var LabelChip = ({ displayLabel, provider }) => {
|
|
2286
|
-
const isBaseStyle = provider === import_editor_styles_repository13.ELEMENTS_BASE_STYLES_PROVIDER_KEY;
|
|
2287
|
-
const chipIcon = isBaseStyle ? /* @__PURE__ */ React18.createElement(import_ui13.Tooltip, { title: (0, import_i18n9.__)("Inherited from base styles", "elementor"), placement: "top" }, /* @__PURE__ */ React18.createElement(import_icons4.InfoCircleIcon, { fontSize: SIZE2 })) : void 0;
|
|
2288
|
-
return /* @__PURE__ */ React18.createElement(
|
|
2289
|
-
import_ui13.Chip,
|
|
2290
|
-
{
|
|
2291
|
-
label: displayLabel,
|
|
2292
|
-
size: SIZE2,
|
|
2293
|
-
color: getStylesProviderColorName(provider),
|
|
2294
|
-
variant: "standard",
|
|
2295
|
-
state: "enabled",
|
|
2296
|
-
icon: chipIcon,
|
|
2297
|
-
sx: (theme) => ({
|
|
2298
|
-
lineHeight: 1,
|
|
2299
|
-
flexWrap: "nowrap",
|
|
2300
|
-
alignItems: "center",
|
|
2301
|
-
borderRadius: `${theme.shape.borderRadius * 0.75}px`,
|
|
2302
|
-
flexDirection: "row-reverse",
|
|
2303
|
-
".MuiChip-label": {
|
|
2304
|
-
overflow: "hidden",
|
|
2305
|
-
textOverflow: "ellipsis",
|
|
2306
|
-
whiteSpace: "nowrap"
|
|
2307
|
-
}
|
|
2308
|
-
})
|
|
2309
|
-
}
|
|
2310
|
-
);
|
|
2311
|
-
};
|
|
2312
|
-
|
|
2313
|
-
// src/styles-inheritance/components/infotip/value-component.tsx
|
|
2314
|
-
var React19 = __toESM(require("react"));
|
|
2315
|
-
var import_ui14 = require("@elementor/ui");
|
|
2316
|
-
var ValueComponent = ({ index, value }) => {
|
|
2317
|
-
return /* @__PURE__ */ React19.createElement(
|
|
2318
|
-
import_ui14.Typography,
|
|
2319
|
-
{
|
|
2320
|
-
variant: "caption",
|
|
2321
|
-
color: "text.tertiary",
|
|
2322
|
-
sx: {
|
|
2323
|
-
mt: "1px",
|
|
2324
|
-
textDecoration: index === 0 ? "none" : "line-through",
|
|
2325
|
-
overflow: "hidden",
|
|
2326
|
-
textOverflow: "ellipsis",
|
|
2327
|
-
whiteSpace: "nowrap",
|
|
2328
|
-
pl: 2.5,
|
|
2329
|
-
minWidth: 0,
|
|
2330
|
-
maxWidth: "100%"
|
|
2331
|
-
}
|
|
2332
|
-
},
|
|
2333
|
-
value
|
|
2334
|
-
);
|
|
2335
|
-
};
|
|
2336
|
-
|
|
2337
|
-
// src/styles-inheritance/components/infotip/action-icons.tsx
|
|
2338
|
-
var React20 = __toESM(require("react"));
|
|
2339
|
-
var import_ui15 = require("@elementor/ui");
|
|
2340
|
-
var ActionIcons = () => /* @__PURE__ */ React20.createElement(import_ui15.Box, { display: "flex", gap: 0.5, alignItems: "center" });
|
|
2341
|
-
|
|
2342
|
-
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
2343
|
-
var SECTION_PADDING_INLINE = 32;
|
|
2344
|
-
var StylesInheritanceInfotip = ({
|
|
2345
|
-
inheritanceChain,
|
|
2346
|
-
propType,
|
|
2347
|
-
path,
|
|
2348
|
-
label,
|
|
2349
|
-
children,
|
|
2350
|
-
isDisabled
|
|
2351
|
-
}) => {
|
|
2352
|
-
const [showInfotip, setShowInfotip] = (0, import_react20.useState)(false);
|
|
2353
|
-
const toggleInfotip = () => {
|
|
2354
|
-
if (isDisabled) {
|
|
2355
|
-
return;
|
|
2356
|
-
}
|
|
2357
|
-
setShowInfotip((prev) => !prev);
|
|
2358
|
-
};
|
|
2359
|
-
const closeInfotip = () => {
|
|
2360
|
-
if (isDisabled) {
|
|
2361
|
-
return;
|
|
2362
|
-
}
|
|
2363
|
-
setShowInfotip(false);
|
|
2364
|
-
};
|
|
2365
|
-
const key = path.join(".");
|
|
2366
|
-
const sectionWidth = useSectionWidth();
|
|
2367
|
-
const resolve = (0, import_react20.useMemo)(() => {
|
|
2368
|
-
return (0, import_editor_canvas2.createPropsResolver)({
|
|
2369
|
-
transformers: stylesInheritanceTransformersRegistry,
|
|
2370
|
-
schema: { [key]: propType }
|
|
2371
|
-
});
|
|
2372
|
-
}, [key, propType]);
|
|
2373
|
-
const items3 = useNormalizedInheritanceChainItems(inheritanceChain, key, resolve);
|
|
2374
|
-
const infotipContent = /* @__PURE__ */ React21.createElement(import_ui16.ClickAwayListener, { onClickAway: closeInfotip }, /* @__PURE__ */ React21.createElement(
|
|
2375
|
-
import_ui16.Card,
|
|
2376
|
-
{
|
|
2377
|
-
elevation: 0,
|
|
2378
|
-
sx: {
|
|
2379
|
-
width: `${sectionWidth - SECTION_PADDING_INLINE}px`,
|
|
2380
|
-
maxWidth: 496,
|
|
2381
|
-
maxHeight: 268,
|
|
2382
|
-
overflowX: "hidden",
|
|
2383
|
-
display: "flex",
|
|
2384
|
-
flexDirection: "column"
|
|
2385
|
-
}
|
|
2386
|
-
},
|
|
2387
|
-
/* @__PURE__ */ React21.createElement(
|
|
2388
|
-
import_ui16.Box,
|
|
2389
|
-
{
|
|
2390
|
-
sx: {
|
|
2391
|
-
position: "sticky",
|
|
2392
|
-
top: 0,
|
|
2393
|
-
zIndex: 1,
|
|
2394
|
-
backgroundColor: "background.paper"
|
|
2395
|
-
}
|
|
2396
|
-
},
|
|
2397
|
-
/* @__PURE__ */ React21.createElement(import_editor_ui5.PopoverHeader, { title: (0, import_i18n10.__)("Style origin", "elementor"), onClose: closeInfotip })
|
|
2398
|
-
),
|
|
2399
|
-
/* @__PURE__ */ React21.createElement(
|
|
2400
|
-
import_ui16.CardContent,
|
|
2401
|
-
{
|
|
2402
|
-
sx: {
|
|
2403
|
-
display: "flex",
|
|
2404
|
-
flexDirection: "column",
|
|
2405
|
-
p: 0,
|
|
2406
|
-
flex: 1,
|
|
2407
|
-
overflow: "auto",
|
|
2408
|
-
"&:last-child": {
|
|
2409
|
-
pb: 0
|
|
2410
|
-
}
|
|
2411
|
-
}
|
|
2412
|
-
},
|
|
2413
|
-
/* @__PURE__ */ React21.createElement(import_ui16.Stack, { gap: 1.5, sx: { pl: 3, pr: 1, pb: 2 }, role: "list" }, items3.map((item, index) => {
|
|
2414
|
-
return /* @__PURE__ */ React21.createElement(
|
|
2415
|
-
import_ui16.Box,
|
|
2416
|
-
{
|
|
2417
|
-
key: item.id,
|
|
2418
|
-
display: "flex",
|
|
2419
|
-
gap: 0.5,
|
|
2420
|
-
role: "listitem",
|
|
2421
|
-
"aria-label": (0, import_i18n10.__)("Inheritance item: %s", "elementor").replace(
|
|
2422
|
-
"%s",
|
|
2423
|
-
item.displayLabel
|
|
2424
|
-
)
|
|
2425
|
-
},
|
|
2426
|
-
/* @__PURE__ */ React21.createElement(
|
|
2427
|
-
import_ui16.Box,
|
|
2428
|
-
{
|
|
2429
|
-
display: "flex",
|
|
2430
|
-
gap: 0.5,
|
|
2431
|
-
sx: { flexWrap: "wrap", width: "100%", alignItems: "flex-start" }
|
|
2432
|
-
},
|
|
2433
|
-
/* @__PURE__ */ React21.createElement(BreakpointIcon, { breakpoint: item.breakpoint }),
|
|
2434
|
-
/* @__PURE__ */ React21.createElement(LabelChip, { displayLabel: item.displayLabel, provider: item.provider }),
|
|
2435
|
-
/* @__PURE__ */ React21.createElement(ValueComponent, { index, value: item.value })
|
|
2436
|
-
),
|
|
2437
|
-
/* @__PURE__ */ React21.createElement(ActionIcons, null)
|
|
2438
|
-
);
|
|
2439
|
-
}))
|
|
2440
|
-
)
|
|
2441
|
-
));
|
|
2442
|
-
if (isDisabled) {
|
|
2443
|
-
return /* @__PURE__ */ React21.createElement(import_ui16.Box, { sx: { display: "inline-flex" } }, children);
|
|
2444
|
-
}
|
|
2445
|
-
return /* @__PURE__ */ React21.createElement(
|
|
2446
|
-
TooltipOrInfotip,
|
|
2447
|
-
{
|
|
2448
|
-
showInfotip,
|
|
2449
|
-
onClose: closeInfotip,
|
|
2450
|
-
infotipContent,
|
|
2451
|
-
isDisabled
|
|
2452
|
-
},
|
|
2453
|
-
/* @__PURE__ */ React21.createElement(import_ui16.IconButton, { onClick: toggleInfotip, "aria-label": label, sx: { my: "-1px" }, disabled: isDisabled }, children)
|
|
2454
|
-
);
|
|
2455
|
-
};
|
|
2456
|
-
function TooltipOrInfotip({
|
|
2457
|
-
children,
|
|
2458
|
-
showInfotip,
|
|
2459
|
-
onClose,
|
|
2460
|
-
infotipContent,
|
|
2461
|
-
isDisabled
|
|
2462
|
-
}) {
|
|
2463
|
-
const direction = useDirection();
|
|
2464
|
-
const isSiteRtl = direction.isSiteRtl;
|
|
2465
|
-
const forceInfotipAlignLeft = isSiteRtl ? 9999999 : -9999999;
|
|
2466
|
-
if (isDisabled) {
|
|
2467
|
-
return /* @__PURE__ */ React21.createElement(import_ui16.Box, { sx: { display: "inline-flex" } }, children);
|
|
2468
|
-
}
|
|
2469
|
-
if (showInfotip) {
|
|
2470
|
-
return /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement(
|
|
2471
|
-
import_ui16.Backdrop,
|
|
2472
|
-
{
|
|
2473
|
-
open: showInfotip,
|
|
2474
|
-
onClick: onClose,
|
|
2475
|
-
sx: {
|
|
2476
|
-
backgroundColor: "transparent",
|
|
2477
|
-
zIndex: (theme) => theme.zIndex.modal - 1
|
|
2478
|
-
}
|
|
2479
|
-
}
|
|
2480
|
-
), /* @__PURE__ */ React21.createElement(
|
|
2481
|
-
import_ui16.Infotip,
|
|
2482
|
-
{
|
|
2483
|
-
placement: "top",
|
|
2484
|
-
content: infotipContent,
|
|
2485
|
-
open: showInfotip,
|
|
2486
|
-
onClose,
|
|
2487
|
-
disableHoverListener: true,
|
|
2488
|
-
componentsProps: {
|
|
2489
|
-
tooltip: {
|
|
2490
|
-
sx: { mx: 2 }
|
|
2491
|
-
}
|
|
2492
|
-
},
|
|
2493
|
-
slotProps: {
|
|
2494
|
-
popper: {
|
|
2495
|
-
modifiers: [
|
|
2496
|
-
{
|
|
2497
|
-
name: "offset",
|
|
2498
|
-
options: { offset: [forceInfotipAlignLeft, 0] }
|
|
2499
|
-
}
|
|
2500
|
-
]
|
|
2501
|
-
}
|
|
2502
|
-
}
|
|
2503
|
-
},
|
|
2504
|
-
children
|
|
2505
|
-
));
|
|
2506
|
-
}
|
|
2507
|
-
return /* @__PURE__ */ React21.createElement(import_ui16.Tooltip, { title: (0, import_i18n10.__)("Style origin", "elementor"), placement: "top" }, children);
|
|
2508
|
-
}
|
|
2509
|
-
|
|
2510
|
-
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
2511
|
-
var StylesInheritanceIndicator = ({
|
|
2512
|
-
customContext
|
|
2513
|
-
}) => {
|
|
2514
|
-
const context = (0, import_editor_controls.useBoundProp)();
|
|
2515
|
-
const { path, propType } = customContext || context;
|
|
2516
|
-
const inheritanceChain = useStylesInheritanceChain(path);
|
|
2517
|
-
if (!path || !inheritanceChain.length) {
|
|
2518
|
-
return null;
|
|
2519
|
-
}
|
|
2520
|
-
return /* @__PURE__ */ React22.createElement(Indicator, { inheritanceChain, path, propType });
|
|
2521
|
-
};
|
|
2522
|
-
var Indicator = ({ inheritanceChain, path, propType, isDisabled }) => {
|
|
2523
|
-
const { id: currentStyleId, provider: currentStyleProvider, meta: currentStyleMeta } = useStyle();
|
|
2524
|
-
const currentItem = currentStyleId ? getValueFromInheritanceChain(inheritanceChain, currentStyleId, currentStyleMeta) : null;
|
|
2525
|
-
const hasValue = !(0, import_editor_props7.isEmpty)(currentItem?.value);
|
|
2526
|
-
const [actualStyle] = inheritanceChain;
|
|
2527
|
-
if (actualStyle.provider === import_editor_styles_repository14.ELEMENTS_BASE_STYLES_PROVIDER_KEY) {
|
|
2528
|
-
return null;
|
|
2529
|
-
}
|
|
2530
|
-
const isFinalValue = currentItem === actualStyle;
|
|
2531
|
-
const label = getLabel2({ isFinalValue, hasValue });
|
|
2532
|
-
const styleIndicatorProps = {
|
|
2533
|
-
getColor: isFinalValue && currentStyleProvider ? getStylesProviderThemeColor(currentStyleProvider.getKey()) : void 0,
|
|
2534
|
-
isOverridden: hasValue && !isFinalValue ? true : void 0
|
|
2535
|
-
};
|
|
2536
|
-
return /* @__PURE__ */ React22.createElement(
|
|
2537
|
-
StylesInheritanceInfotip,
|
|
2538
|
-
{
|
|
2539
|
-
inheritanceChain,
|
|
2540
|
-
path,
|
|
2541
|
-
propType,
|
|
2542
|
-
label,
|
|
2543
|
-
isDisabled
|
|
2544
|
-
},
|
|
2545
|
-
/* @__PURE__ */ React22.createElement(StyleIndicator, { ...styleIndicatorProps })
|
|
2546
|
-
);
|
|
2547
|
-
};
|
|
2548
|
-
var getLabel2 = ({ isFinalValue, hasValue }) => {
|
|
2549
|
-
if (isFinalValue) {
|
|
2550
|
-
return (0, import_i18n11.__)("This is the final value", "elementor");
|
|
2551
|
-
}
|
|
2552
|
-
if (hasValue) {
|
|
2553
|
-
return (0, import_i18n11.__)("This value is overridden by another style", "elementor");
|
|
2554
|
-
}
|
|
2555
|
-
return (0, import_i18n11.__)("This has value from another style", "elementor");
|
|
2556
|
-
};
|
|
2557
|
-
|
|
2558
|
-
// src/controls-registry/conditional-field.tsx
|
|
2559
|
-
var import_editor_controls2 = require("@elementor/editor-controls");
|
|
2560
|
-
var import_editor_props8 = require("@elementor/editor-props");
|
|
2561
|
-
var ConditionalField = ({ children }) => {
|
|
2562
|
-
const { propType } = (0, import_editor_controls2.useBoundProp)();
|
|
2563
|
-
const depList = getDependencies(propType);
|
|
2564
|
-
const { values: depValues } = useStylesFields(depList);
|
|
2565
|
-
const isHidden = !(0, import_editor_props8.isDependencyMet)(propType?.dependencies, depValues).isMet;
|
|
2566
|
-
return isHidden ? null : children;
|
|
2567
|
-
};
|
|
2568
|
-
function getDependencies(propType) {
|
|
2569
|
-
if (!propType?.dependencies?.terms.length) {
|
|
2570
|
-
return [];
|
|
2571
|
-
}
|
|
2572
|
-
return propType.dependencies.terms.flatMap((term) => !(0, import_editor_props8.isDependency)(term) ? term.path : []);
|
|
2573
|
-
}
|
|
2574
|
-
|
|
2575
|
-
// src/controls-registry/create-top-level-object-type.ts
|
|
2576
|
-
var createTopLevelObjectType = ({ schema }) => {
|
|
2577
|
-
const schemaPropType = {
|
|
2578
|
-
key: "",
|
|
2579
|
-
kind: "object",
|
|
2580
|
-
meta: {},
|
|
2581
|
-
settings: {},
|
|
2582
|
-
default: null,
|
|
2583
|
-
shape: schema
|
|
2584
|
-
};
|
|
2585
|
-
return schemaPropType;
|
|
2586
|
-
};
|
|
2587
|
-
|
|
2588
|
-
// src/controls-registry/styles-field.tsx
|
|
2589
|
-
var StylesField = ({ bind, propDisplayName, children }) => {
|
|
2590
|
-
const stylesSchema = (0, import_editor_styles7.getStylesSchema)();
|
|
2591
|
-
const stylesInheritanceChain = useStylesInheritanceChain([bind]);
|
|
2592
|
-
const { value, canEdit, ...fields } = useStylesField(bind, { history: { propDisplayName } });
|
|
2593
|
-
const propType = createTopLevelObjectType({ schema: stylesSchema });
|
|
2594
|
-
const [actualValue] = stylesInheritanceChain;
|
|
2595
|
-
const placeholderValues = {
|
|
2596
|
-
[bind]: actualValue?.value
|
|
2597
|
-
};
|
|
2598
|
-
const setValue = (newValue) => {
|
|
2599
|
-
fields.setValue(newValue[bind]);
|
|
2600
|
-
};
|
|
2601
|
-
return /* @__PURE__ */ React23.createElement(
|
|
2602
|
-
import_editor_controls3.ControlAdornmentsProvider,
|
|
2603
|
-
{
|
|
2604
|
-
items: [
|
|
2605
|
-
{
|
|
2606
|
-
id: "styles-inheritance",
|
|
2607
|
-
Adornment: StylesInheritanceIndicator
|
|
2608
|
-
}
|
|
2609
|
-
]
|
|
2610
|
-
},
|
|
2611
|
-
/* @__PURE__ */ React23.createElement(
|
|
2612
|
-
import_editor_controls3.PropProvider,
|
|
2613
|
-
{
|
|
2614
|
-
propType,
|
|
2615
|
-
value: { [bind]: value },
|
|
2616
|
-
setValue,
|
|
2617
|
-
placeholder: placeholderValues,
|
|
2618
|
-
isDisabled: () => !canEdit
|
|
2619
|
-
},
|
|
2620
|
-
/* @__PURE__ */ React23.createElement(import_editor_controls3.PropKeyProvider, { bind }, /* @__PURE__ */ React23.createElement(ConditionalField, null, children))
|
|
2621
|
-
)
|
|
2622
|
-
);
|
|
2623
|
-
};
|
|
2624
|
-
|
|
2625
|
-
// src/components/style-sections/background-section/background-section.tsx
|
|
2626
|
-
var BACKGROUND_LABEL = (0, import_i18n12.__)("Background", "elementor");
|
|
2627
|
-
var BackgroundSection = () => {
|
|
2628
|
-
return /* @__PURE__ */ React24.createElement(SectionContent, null, /* @__PURE__ */ React24.createElement(StylesField, { bind: "background", propDisplayName: BACKGROUND_LABEL }, /* @__PURE__ */ React24.createElement(import_editor_controls4.BackgroundControl, null)));
|
|
2629
|
-
};
|
|
2630
|
-
|
|
2631
|
-
// src/components/style-sections/border-section/border-section.tsx
|
|
2632
|
-
var React32 = __toESM(require("react"));
|
|
2633
|
-
|
|
2634
|
-
// src/components/style-sections/border-section/border-color-field.tsx
|
|
2635
|
-
var React27 = __toESM(require("react"));
|
|
2636
|
-
var import_editor_controls6 = require("@elementor/editor-controls");
|
|
2637
|
-
var import_i18n13 = require("@wordpress/i18n");
|
|
2638
|
-
|
|
2639
|
-
// src/components/styles-field-layout.tsx
|
|
2640
|
-
var React26 = __toESM(require("react"));
|
|
2641
|
-
var import_ui18 = require("@elementor/ui");
|
|
2642
|
-
|
|
2643
|
-
// src/components/control-label.tsx
|
|
2644
|
-
var React25 = __toESM(require("react"));
|
|
2645
|
-
var import_editor_controls5 = require("@elementor/editor-controls");
|
|
2646
|
-
var import_ui17 = require("@elementor/ui");
|
|
2647
|
-
var ControlLabel = ({ children }) => {
|
|
2648
|
-
return /* @__PURE__ */ React25.createElement(import_ui17.Stack, { direction: "row", alignItems: "center", justifyItems: "start", gap: 0.25 }, /* @__PURE__ */ React25.createElement(import_editor_controls5.ControlFormLabel, null, children), /* @__PURE__ */ React25.createElement(import_editor_controls5.ControlAdornments, null));
|
|
2649
|
-
};
|
|
2650
|
-
|
|
2651
|
-
// src/components/styles-field-layout.tsx
|
|
2652
|
-
var StylesFieldLayout = React26.forwardRef((props, ref) => {
|
|
2653
|
-
const { direction = "row", children, label } = props;
|
|
2654
|
-
const LayoutComponent = direction === "row" ? Row : Column;
|
|
2655
|
-
return /* @__PURE__ */ React26.createElement(LayoutComponent, { label, ref, children });
|
|
2656
|
-
});
|
|
2657
|
-
var Row = React26.forwardRef(
|
|
2658
|
-
({ label, children }, ref) => {
|
|
2659
|
-
return /* @__PURE__ */ React26.createElement(
|
|
2660
|
-
import_ui18.Grid,
|
|
2661
|
-
{
|
|
2662
|
-
container: true,
|
|
2663
|
-
gap: 2,
|
|
2664
|
-
alignItems: "center",
|
|
2665
|
-
flexWrap: "nowrap",
|
|
2666
|
-
ref,
|
|
2667
|
-
"aria-label": `${label} control`
|
|
2668
|
-
},
|
|
2669
|
-
/* @__PURE__ */ React26.createElement(import_ui18.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React26.createElement(ControlLabel, null, label)),
|
|
2670
|
-
/* @__PURE__ */ React26.createElement(
|
|
2671
|
-
import_ui18.Grid,
|
|
2672
|
-
{
|
|
2673
|
-
item: true,
|
|
2674
|
-
xs: 6,
|
|
2675
|
-
sx: (theme) => ({
|
|
2676
|
-
width: `calc(50% - ${theme.spacing(2)})`
|
|
2677
|
-
})
|
|
2678
|
-
},
|
|
2679
|
-
children
|
|
2680
|
-
)
|
|
2681
|
-
);
|
|
2682
|
-
}
|
|
2683
|
-
);
|
|
2684
|
-
var Column = React26.forwardRef(
|
|
2685
|
-
({ label, children }, ref) => {
|
|
2686
|
-
return /* @__PURE__ */ React26.createElement(import_ui18.Stack, { gap: 0.75, ref }, /* @__PURE__ */ React26.createElement(ControlLabel, null, label), children);
|
|
2687
|
-
}
|
|
2688
|
-
);
|
|
2689
|
-
|
|
2690
|
-
// src/components/style-sections/border-section/border-color-field.tsx
|
|
2691
|
-
var BORDER_COLOR_LABEL = (0, import_i18n13.__)("Border color", "elementor");
|
|
2692
|
-
var BorderColorField = () => /* @__PURE__ */ React27.createElement(StylesField, { bind: "border-color", propDisplayName: BORDER_COLOR_LABEL }, /* @__PURE__ */ React27.createElement(StylesFieldLayout, { label: BORDER_COLOR_LABEL }, /* @__PURE__ */ React27.createElement(import_editor_controls6.ColorControl, null)));
|
|
2693
|
-
|
|
2694
|
-
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
2695
|
-
var React29 = __toESM(require("react"));
|
|
2696
|
-
var import_editor_controls7 = require("@elementor/editor-controls");
|
|
2697
|
-
var import_editor_props9 = require("@elementor/editor-props");
|
|
2698
|
-
var import_icons5 = require("@elementor/icons");
|
|
2699
|
-
var import_ui20 = require("@elementor/ui");
|
|
2700
|
-
var import_i18n14 = require("@wordpress/i18n");
|
|
2701
|
-
|
|
2702
|
-
// src/styles-inheritance/components/ui-providers.tsx
|
|
2703
|
-
var React28 = __toESM(require("react"));
|
|
2704
|
-
var import_ui19 = require("@elementor/ui");
|
|
2705
|
-
var UiProviders = ({ children }) => {
|
|
2706
|
-
const { isSiteRtl } = useDirection();
|
|
2707
|
-
return /* @__PURE__ */ React28.createElement(import_ui19.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React28.createElement(import_ui19.ThemeProvider, null, children));
|
|
2708
|
-
};
|
|
2709
|
-
|
|
2710
|
-
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
2711
|
-
var BORDER_RADIUS_LABEL = (0, import_i18n14.__)("Border radius", "elementor");
|
|
2712
|
-
var StartStartIcon = (0, import_ui20.withDirection)(import_icons5.RadiusTopLeftIcon);
|
|
2713
|
-
var StartEndIcon = (0, import_ui20.withDirection)(import_icons5.RadiusTopRightIcon);
|
|
2714
|
-
var EndStartIcon = (0, import_ui20.withDirection)(import_icons5.RadiusBottomLeftIcon);
|
|
2715
|
-
var EndEndIcon = (0, import_ui20.withDirection)(import_icons5.RadiusBottomRightIcon);
|
|
2716
|
-
var getStartStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n14.__)("Top right", "elementor") : (0, import_i18n14.__)("Top left", "elementor");
|
|
2717
|
-
var getStartEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n14.__)("Top left", "elementor") : (0, import_i18n14.__)("Top right", "elementor");
|
|
2718
|
-
var getEndStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n14.__)("Bottom right", "elementor") : (0, import_i18n14.__)("Bottom left", "elementor");
|
|
2719
|
-
var getEndEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n14.__)("Bottom left", "elementor") : (0, import_i18n14.__)("Bottom right", "elementor");
|
|
2720
|
-
var getCorners = (isSiteRtl) => [
|
|
2721
|
-
{
|
|
2722
|
-
label: getStartStartLabel(isSiteRtl),
|
|
2723
|
-
icon: /* @__PURE__ */ React29.createElement(StartStartIcon, { fontSize: "tiny" }),
|
|
2724
|
-
bind: "start-start"
|
|
2725
|
-
},
|
|
2726
|
-
{
|
|
2727
|
-
label: getStartEndLabel(isSiteRtl),
|
|
2728
|
-
icon: /* @__PURE__ */ React29.createElement(StartEndIcon, { fontSize: "tiny" }),
|
|
2729
|
-
bind: "start-end"
|
|
2730
|
-
},
|
|
2731
|
-
{
|
|
2732
|
-
label: getEndStartLabel(isSiteRtl),
|
|
2733
|
-
icon: /* @__PURE__ */ React29.createElement(EndStartIcon, { fontSize: "tiny" }),
|
|
2734
|
-
bind: "end-start"
|
|
2735
|
-
},
|
|
2736
|
-
{
|
|
2737
|
-
label: getEndEndLabel(isSiteRtl),
|
|
2738
|
-
icon: /* @__PURE__ */ React29.createElement(EndEndIcon, { fontSize: "tiny" }),
|
|
2739
|
-
bind: "end-end"
|
|
2740
|
-
}
|
|
2741
|
-
];
|
|
2742
|
-
var BorderRadiusField = () => {
|
|
2743
|
-
const { isSiteRtl } = useDirection();
|
|
2744
|
-
return /* @__PURE__ */ React29.createElement(UiProviders, null, /* @__PURE__ */ React29.createElement(StylesField, { bind: "border-radius", propDisplayName: BORDER_RADIUS_LABEL }, /* @__PURE__ */ React29.createElement(
|
|
2745
|
-
import_editor_controls7.EqualUnequalSizesControl,
|
|
2746
|
-
{
|
|
2747
|
-
items: getCorners(isSiteRtl),
|
|
2748
|
-
label: BORDER_RADIUS_LABEL,
|
|
2749
|
-
icon: /* @__PURE__ */ React29.createElement(import_icons5.BorderCornersIcon, { fontSize: "tiny" }),
|
|
2750
|
-
tooltipLabel: (0, import_i18n14.__)("Adjust corners", "elementor"),
|
|
2751
|
-
multiSizePropTypeUtil: import_editor_props9.borderRadiusPropTypeUtil
|
|
2752
|
-
}
|
|
2753
|
-
)));
|
|
2754
|
-
};
|
|
2755
|
-
|
|
2756
|
-
// src/components/style-sections/border-section/border-style-field.tsx
|
|
2757
|
-
var React30 = __toESM(require("react"));
|
|
2758
|
-
var import_editor_controls8 = require("@elementor/editor-controls");
|
|
2759
|
-
var import_i18n15 = require("@wordpress/i18n");
|
|
2760
|
-
var BORDER_TYPE_LABEL = (0, import_i18n15.__)("Border type", "elementor");
|
|
2761
|
-
var borderStyles = [
|
|
2762
|
-
{ value: "none", label: (0, import_i18n15.__)("None", "elementor") },
|
|
2763
|
-
{ value: "solid", label: (0, import_i18n15.__)("Solid", "elementor") },
|
|
2764
|
-
{ value: "dashed", label: (0, import_i18n15.__)("Dashed", "elementor") },
|
|
2765
|
-
{ value: "dotted", label: (0, import_i18n15.__)("Dotted", "elementor") },
|
|
2766
|
-
{ value: "double", label: (0, import_i18n15.__)("Double", "elementor") },
|
|
2767
|
-
{ value: "groove", label: (0, import_i18n15.__)("Groove", "elementor") },
|
|
2768
|
-
{ value: "ridge", label: (0, import_i18n15.__)("Ridge", "elementor") },
|
|
2769
|
-
{ value: "inset", label: (0, import_i18n15.__)("Inset", "elementor") },
|
|
2770
|
-
{ value: "outset", label: (0, import_i18n15.__)("Outset", "elementor") }
|
|
2771
|
-
];
|
|
2772
|
-
var BorderStyleField = () => /* @__PURE__ */ React30.createElement(StylesField, { bind: "border-style", propDisplayName: BORDER_TYPE_LABEL }, /* @__PURE__ */ React30.createElement(StylesFieldLayout, { label: BORDER_TYPE_LABEL }, /* @__PURE__ */ React30.createElement(import_editor_controls8.SelectControl, { options: borderStyles })));
|
|
2371
|
+
// src/components/style-sections/border-section/border-style-field.tsx
|
|
2372
|
+
var React24 = __toESM(require("react"));
|
|
2373
|
+
var import_editor_controls7 = require("@elementor/editor-controls");
|
|
2374
|
+
var import_i18n11 = require("@wordpress/i18n");
|
|
2375
|
+
var BORDER_TYPE_LABEL = (0, import_i18n11.__)("Border type", "elementor");
|
|
2376
|
+
var borderStyles = [
|
|
2377
|
+
{ value: "none", label: (0, import_i18n11.__)("None", "elementor") },
|
|
2378
|
+
{ value: "solid", label: (0, import_i18n11.__)("Solid", "elementor") },
|
|
2379
|
+
{ value: "dashed", label: (0, import_i18n11.__)("Dashed", "elementor") },
|
|
2380
|
+
{ value: "dotted", label: (0, import_i18n11.__)("Dotted", "elementor") },
|
|
2381
|
+
{ value: "double", label: (0, import_i18n11.__)("Double", "elementor") },
|
|
2382
|
+
{ value: "groove", label: (0, import_i18n11.__)("Groove", "elementor") },
|
|
2383
|
+
{ value: "ridge", label: (0, import_i18n11.__)("Ridge", "elementor") },
|
|
2384
|
+
{ value: "inset", label: (0, import_i18n11.__)("Inset", "elementor") },
|
|
2385
|
+
{ value: "outset", label: (0, import_i18n11.__)("Outset", "elementor") }
|
|
2386
|
+
];
|
|
2387
|
+
var BorderStyleField = () => /* @__PURE__ */ React24.createElement(StylesField, { bind: "border-style", propDisplayName: BORDER_TYPE_LABEL }, /* @__PURE__ */ React24.createElement(StylesFieldLayout, { label: BORDER_TYPE_LABEL }, /* @__PURE__ */ React24.createElement(import_editor_controls7.SelectControl, { options: borderStyles })));
|
|
2773
2388
|
|
|
2774
2389
|
// src/components/style-sections/border-section/border-width-field.tsx
|
|
2775
|
-
var
|
|
2776
|
-
var
|
|
2777
|
-
var
|
|
2778
|
-
var
|
|
2779
|
-
var
|
|
2780
|
-
var
|
|
2781
|
-
var BORDER_WIDTH_LABEL = (0,
|
|
2782
|
-
var InlineStartIcon = (0,
|
|
2783
|
-
var InlineEndIcon = (0,
|
|
2390
|
+
var React25 = __toESM(require("react"));
|
|
2391
|
+
var import_editor_controls8 = require("@elementor/editor-controls");
|
|
2392
|
+
var import_editor_props9 = require("@elementor/editor-props");
|
|
2393
|
+
var import_icons4 = require("@elementor/icons");
|
|
2394
|
+
var import_ui16 = require("@elementor/ui");
|
|
2395
|
+
var import_i18n12 = require("@wordpress/i18n");
|
|
2396
|
+
var BORDER_WIDTH_LABEL = (0, import_i18n12.__)("Border width", "elementor");
|
|
2397
|
+
var InlineStartIcon = (0, import_ui16.withDirection)(import_icons4.SideRightIcon);
|
|
2398
|
+
var InlineEndIcon = (0, import_ui16.withDirection)(import_icons4.SideLeftIcon);
|
|
2784
2399
|
var getEdges = (isSiteRtl) => [
|
|
2785
2400
|
{
|
|
2786
|
-
label: (0,
|
|
2787
|
-
icon: /* @__PURE__ */
|
|
2401
|
+
label: (0, import_i18n12.__)("Top", "elementor"),
|
|
2402
|
+
icon: /* @__PURE__ */ React25.createElement(import_icons4.SideTopIcon, { fontSize: "tiny" }),
|
|
2788
2403
|
bind: "block-start"
|
|
2789
2404
|
},
|
|
2790
2405
|
{
|
|
2791
|
-
label: isSiteRtl ? (0,
|
|
2792
|
-
icon: /* @__PURE__ */
|
|
2406
|
+
label: isSiteRtl ? (0, import_i18n12.__)("Left", "elementor") : (0, import_i18n12.__)("Right", "elementor"),
|
|
2407
|
+
icon: /* @__PURE__ */ React25.createElement(InlineStartIcon, { fontSize: "tiny" }),
|
|
2793
2408
|
bind: "inline-end"
|
|
2794
2409
|
},
|
|
2795
2410
|
{
|
|
2796
|
-
label: (0,
|
|
2797
|
-
icon: /* @__PURE__ */
|
|
2411
|
+
label: (0, import_i18n12.__)("Bottom", "elementor"),
|
|
2412
|
+
icon: /* @__PURE__ */ React25.createElement(import_icons4.SideBottomIcon, { fontSize: "tiny" }),
|
|
2798
2413
|
bind: "block-end"
|
|
2799
2414
|
},
|
|
2800
2415
|
{
|
|
2801
|
-
label: isSiteRtl ? (0,
|
|
2802
|
-
icon: /* @__PURE__ */
|
|
2416
|
+
label: isSiteRtl ? (0, import_i18n12.__)("Right", "elementor") : (0, import_i18n12.__)("Left", "elementor"),
|
|
2417
|
+
icon: /* @__PURE__ */ React25.createElement(InlineEndIcon, { fontSize: "tiny" }),
|
|
2803
2418
|
bind: "inline-start"
|
|
2804
2419
|
}
|
|
2805
2420
|
];
|
|
2806
2421
|
var BorderWidthField = () => {
|
|
2807
2422
|
const { isSiteRtl } = useDirection();
|
|
2808
|
-
return /* @__PURE__ */
|
|
2809
|
-
|
|
2423
|
+
return /* @__PURE__ */ React25.createElement(StylesField, { bind: "border-width", propDisplayName: BORDER_WIDTH_LABEL }, /* @__PURE__ */ React25.createElement(
|
|
2424
|
+
import_editor_controls8.EqualUnequalSizesControl,
|
|
2810
2425
|
{
|
|
2811
2426
|
items: getEdges(isSiteRtl),
|
|
2812
2427
|
label: BORDER_WIDTH_LABEL,
|
|
2813
|
-
icon: /* @__PURE__ */
|
|
2814
|
-
tooltipLabel: (0,
|
|
2815
|
-
multiSizePropTypeUtil:
|
|
2428
|
+
icon: /* @__PURE__ */ React25.createElement(import_icons4.SideAllIcon, { fontSize: "tiny" }),
|
|
2429
|
+
tooltipLabel: (0, import_i18n12.__)("Adjust borders", "elementor"),
|
|
2430
|
+
multiSizePropTypeUtil: import_editor_props9.borderWidthPropTypeUtil
|
|
2816
2431
|
}
|
|
2817
2432
|
));
|
|
2818
2433
|
};
|
|
2819
2434
|
|
|
2820
2435
|
// src/components/style-sections/border-section/border-section.tsx
|
|
2821
|
-
var BorderSection = () => /* @__PURE__ */
|
|
2436
|
+
var BorderSection = () => /* @__PURE__ */ React26.createElement(SectionContent, null, /* @__PURE__ */ React26.createElement(BorderWidthField, null), /* @__PURE__ */ React26.createElement(BorderColorField, null), /* @__PURE__ */ React26.createElement(BorderStyleField, null), /* @__PURE__ */ React26.createElement(BorderRadiusField, null));
|
|
2822
2437
|
|
|
2823
2438
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
2824
|
-
var
|
|
2825
|
-
var
|
|
2439
|
+
var React30 = __toESM(require("react"));
|
|
2440
|
+
var import_editor_controls11 = require("@elementor/editor-controls");
|
|
2826
2441
|
var import_editor_elements10 = require("@elementor/editor-elements");
|
|
2827
|
-
var
|
|
2442
|
+
var import_i18n15 = require("@wordpress/i18n");
|
|
2828
2443
|
|
|
2829
2444
|
// src/utils/get-recently-used-styles.ts
|
|
2830
|
-
var
|
|
2445
|
+
var import_editor_canvas = require("@elementor/editor-canvas");
|
|
2831
2446
|
var import_editor_elements9 = require("@elementor/editor-elements");
|
|
2832
|
-
var
|
|
2447
|
+
var import_editor_styles7 = require("@elementor/editor-styles");
|
|
2833
2448
|
var getRecentlyUsedList = async (elementId) => {
|
|
2834
2449
|
if (!elementId) {
|
|
2835
2450
|
return [];
|
|
2836
2451
|
}
|
|
2837
|
-
const resolver = (0,
|
|
2838
|
-
transformers:
|
|
2839
|
-
schema: (0,
|
|
2452
|
+
const resolver = (0, import_editor_canvas.createPropsResolver)({
|
|
2453
|
+
transformers: import_editor_canvas.styleTransformersRegistry,
|
|
2454
|
+
schema: (0, import_editor_styles7.getStylesSchema)()
|
|
2840
2455
|
});
|
|
2841
2456
|
const styles = (0, import_editor_elements9.getElementStyles)(elementId) ?? {};
|
|
2842
2457
|
const styleKeys = Object.keys(styles ?? {});
|
|
@@ -2845,7 +2460,7 @@ var getRecentlyUsedList = async (elementId) => {
|
|
|
2845
2460
|
variants.flat().map(async (variant) => {
|
|
2846
2461
|
const result = await resolver({
|
|
2847
2462
|
props: variant.props ?? {},
|
|
2848
|
-
schema: (0,
|
|
2463
|
+
schema: (0, import_editor_styles7.getStylesSchema)()
|
|
2849
2464
|
});
|
|
2850
2465
|
return Object.entries(result).filter(([, value]) => value !== null).map(([key]) => key);
|
|
2851
2466
|
})
|
|
@@ -2855,36 +2470,36 @@ var getRecentlyUsedList = async (elementId) => {
|
|
|
2855
2470
|
};
|
|
2856
2471
|
|
|
2857
2472
|
// src/components/panel-divider.tsx
|
|
2858
|
-
var
|
|
2859
|
-
var
|
|
2860
|
-
var PanelDivider = () => /* @__PURE__ */
|
|
2473
|
+
var React27 = __toESM(require("react"));
|
|
2474
|
+
var import_ui17 = require("@elementor/ui");
|
|
2475
|
+
var PanelDivider = () => /* @__PURE__ */ React27.createElement(import_ui17.Divider, { sx: { my: 0.5 } });
|
|
2861
2476
|
|
|
2862
2477
|
// src/components/style-sections/effects-section/blend-mode-field.tsx
|
|
2863
|
-
var
|
|
2864
|
-
var
|
|
2865
|
-
var
|
|
2866
|
-
var BLEND_MODE_LABEL = (0,
|
|
2478
|
+
var React28 = __toESM(require("react"));
|
|
2479
|
+
var import_editor_controls9 = require("@elementor/editor-controls");
|
|
2480
|
+
var import_i18n13 = require("@wordpress/i18n");
|
|
2481
|
+
var BLEND_MODE_LABEL = (0, import_i18n13.__)("Blend mode", "elementor");
|
|
2867
2482
|
var blendModeOptions = [
|
|
2868
|
-
{ label: (0,
|
|
2869
|
-
{ label: (0,
|
|
2870
|
-
{ label: (0,
|
|
2871
|
-
{ label: (0,
|
|
2872
|
-
{ label: (0,
|
|
2873
|
-
{ label: (0,
|
|
2874
|
-
{ label: (0,
|
|
2875
|
-
{ label: (0,
|
|
2876
|
-
{ label: (0,
|
|
2877
|
-
{ label: (0,
|
|
2878
|
-
{ label: (0,
|
|
2879
|
-
{ label: (0,
|
|
2880
|
-
{ label: (0,
|
|
2881
|
-
{ label: (0,
|
|
2882
|
-
{ label: (0,
|
|
2883
|
-
{ label: (0,
|
|
2483
|
+
{ label: (0, import_i18n13.__)("Normal", "elementor"), value: "normal" },
|
|
2484
|
+
{ label: (0, import_i18n13.__)("Multiply", "elementor"), value: "multiply" },
|
|
2485
|
+
{ label: (0, import_i18n13.__)("Screen", "elementor"), value: "screen" },
|
|
2486
|
+
{ label: (0, import_i18n13.__)("Overlay", "elementor"), value: "overlay" },
|
|
2487
|
+
{ label: (0, import_i18n13.__)("Darken", "elementor"), value: "darken" },
|
|
2488
|
+
{ label: (0, import_i18n13.__)("Lighten", "elementor"), value: "lighten" },
|
|
2489
|
+
{ label: (0, import_i18n13.__)("Color dodge", "elementor"), value: "color-dodge" },
|
|
2490
|
+
{ label: (0, import_i18n13.__)("Color burn", "elementor"), value: "color-burn" },
|
|
2491
|
+
{ label: (0, import_i18n13.__)("Saturation", "elementor"), value: "saturation" },
|
|
2492
|
+
{ label: (0, import_i18n13.__)("Color", "elementor"), value: "color" },
|
|
2493
|
+
{ label: (0, import_i18n13.__)("Difference", "elementor"), value: "difference" },
|
|
2494
|
+
{ label: (0, import_i18n13.__)("Exclusion", "elementor"), value: "exclusion" },
|
|
2495
|
+
{ label: (0, import_i18n13.__)("Hue", "elementor"), value: "hue" },
|
|
2496
|
+
{ label: (0, import_i18n13.__)("Luminosity", "elementor"), value: "luminosity" },
|
|
2497
|
+
{ label: (0, import_i18n13.__)("Soft light", "elementor"), value: "soft-light" },
|
|
2498
|
+
{ label: (0, import_i18n13.__)("Hard light", "elementor"), value: "hard-light" }
|
|
2884
2499
|
];
|
|
2885
2500
|
var BlendModeField = () => {
|
|
2886
|
-
return /* @__PURE__ */
|
|
2887
|
-
|
|
2501
|
+
return /* @__PURE__ */ React28.createElement(StylesField, { bind: "mix-blend-mode", propDisplayName: BLEND_MODE_LABEL }, /* @__PURE__ */ React28.createElement(StylesFieldLayout, { label: BLEND_MODE_LABEL }, /* @__PURE__ */ React28.createElement(
|
|
2502
|
+
import_editor_controls9.SelectControl,
|
|
2888
2503
|
{
|
|
2889
2504
|
options: blendModeOptions,
|
|
2890
2505
|
MenuProps: {
|
|
@@ -2897,39 +2512,39 @@ var BlendModeField = () => {
|
|
|
2897
2512
|
};
|
|
2898
2513
|
|
|
2899
2514
|
// src/components/style-sections/effects-section/opacity-control-field.tsx
|
|
2900
|
-
var
|
|
2901
|
-
var
|
|
2902
|
-
var
|
|
2903
|
-
var
|
|
2904
|
-
var OPACITY_LABEL = (0,
|
|
2515
|
+
var React29 = __toESM(require("react"));
|
|
2516
|
+
var import_react19 = require("react");
|
|
2517
|
+
var import_editor_controls10 = require("@elementor/editor-controls");
|
|
2518
|
+
var import_i18n14 = require("@wordpress/i18n");
|
|
2519
|
+
var OPACITY_LABEL = (0, import_i18n14.__)("Opacity", "elementor");
|
|
2905
2520
|
var OpacityControlField = () => {
|
|
2906
|
-
const rowRef = (0,
|
|
2907
|
-
return /* @__PURE__ */
|
|
2521
|
+
const rowRef = (0, import_react19.useRef)(null);
|
|
2522
|
+
return /* @__PURE__ */ React29.createElement(StylesField, { bind: "opacity", propDisplayName: OPACITY_LABEL }, /* @__PURE__ */ React29.createElement(StylesFieldLayout, { ref: rowRef, label: OPACITY_LABEL }, /* @__PURE__ */ React29.createElement(import_editor_controls10.SizeControl, { units: ["%"], anchorRef: rowRef, defaultUnit: "%" })));
|
|
2908
2523
|
};
|
|
2909
2524
|
|
|
2910
2525
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
2911
|
-
var BOX_SHADOW_LABEL = (0,
|
|
2912
|
-
var FILTER_LABEL = (0,
|
|
2913
|
-
var TRANSFORM_LABEL = (0,
|
|
2914
|
-
var BACKDROP_FILTER_LABEL = (0,
|
|
2915
|
-
var TRANSITIONS_LABEL = (0,
|
|
2526
|
+
var BOX_SHADOW_LABEL = (0, import_i18n15.__)("Box shadow", "elementor");
|
|
2527
|
+
var FILTER_LABEL = (0, import_i18n15.__)("Filters", "elementor");
|
|
2528
|
+
var TRANSFORM_LABEL = (0, import_i18n15.__)("Transform", "elementor");
|
|
2529
|
+
var BACKDROP_FILTER_LABEL = (0, import_i18n15.__)("Backdrop filters", "elementor");
|
|
2530
|
+
var TRANSITIONS_LABEL = (0, import_i18n15.__)("Transitions", "elementor");
|
|
2916
2531
|
var EffectsSection = () => {
|
|
2917
2532
|
const { element } = (0, import_editor_elements10.useSelectedElement)();
|
|
2918
2533
|
const { meta } = useStyle();
|
|
2919
|
-
return /* @__PURE__ */
|
|
2920
|
-
|
|
2534
|
+
return /* @__PURE__ */ React30.createElement(SectionContent, { gap: 1 }, /* @__PURE__ */ React30.createElement(BlendModeField, null), /* @__PURE__ */ React30.createElement(PanelDivider, null), /* @__PURE__ */ React30.createElement(OpacityControlField, null), /* @__PURE__ */ React30.createElement(PanelDivider, null), /* @__PURE__ */ React30.createElement(StylesField, { bind: "box-shadow", propDisplayName: BOX_SHADOW_LABEL }, /* @__PURE__ */ React30.createElement(import_editor_controls11.BoxShadowRepeaterControl, null)), /* @__PURE__ */ React30.createElement(PanelDivider, null), /* @__PURE__ */ React30.createElement(StylesField, { bind: "transform", propDisplayName: TRANSFORM_LABEL }, /* @__PURE__ */ React30.createElement(import_editor_controls11.TransformRepeaterControl, null)), /* @__PURE__ */ React30.createElement(PanelDivider, null), /* @__PURE__ */ React30.createElement(StylesField, { bind: "transition", propDisplayName: TRANSITIONS_LABEL }, /* @__PURE__ */ React30.createElement(
|
|
2535
|
+
import_editor_controls11.TransitionRepeaterControl,
|
|
2921
2536
|
{
|
|
2922
2537
|
currentStyleState: meta.state,
|
|
2923
2538
|
recentlyUsedListGetter: () => getRecentlyUsedList(element?.id ?? "")
|
|
2924
2539
|
}
|
|
2925
|
-
)), /* @__PURE__ */
|
|
2540
|
+
)), /* @__PURE__ */ React30.createElement(PanelDivider, null), /* @__PURE__ */ React30.createElement(StylesField, { bind: "filter", propDisplayName: FILTER_LABEL }, /* @__PURE__ */ React30.createElement(import_editor_controls11.FilterRepeaterControl, null)), /* @__PURE__ */ React30.createElement(PanelDivider, null), /* @__PURE__ */ React30.createElement(StylesField, { bind: "backdrop-filter", propDisplayName: BACKDROP_FILTER_LABEL }, /* @__PURE__ */ React30.createElement(import_editor_controls11.FilterRepeaterControl, { filterPropName: "backdrop-filter" })));
|
|
2926
2541
|
};
|
|
2927
2542
|
|
|
2928
2543
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
2929
|
-
var
|
|
2930
|
-
var
|
|
2544
|
+
var React42 = __toESM(require("react"));
|
|
2545
|
+
var import_editor_controls22 = require("@elementor/editor-controls");
|
|
2931
2546
|
var import_editor_elements11 = require("@elementor/editor-elements");
|
|
2932
|
-
var
|
|
2547
|
+
var import_i18n27 = require("@wordpress/i18n");
|
|
2933
2548
|
|
|
2934
2549
|
// src/hooks/use-computed-style.ts
|
|
2935
2550
|
var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
|
|
@@ -2956,18 +2571,18 @@ function useComputedStyle(elementId) {
|
|
|
2956
2571
|
}
|
|
2957
2572
|
|
|
2958
2573
|
// src/components/style-sections/layout-section/align-content-field.tsx
|
|
2959
|
-
var
|
|
2960
|
-
var
|
|
2961
|
-
var
|
|
2962
|
-
var
|
|
2963
|
-
var
|
|
2574
|
+
var React32 = __toESM(require("react"));
|
|
2575
|
+
var import_editor_controls12 = require("@elementor/editor-controls");
|
|
2576
|
+
var import_icons5 = require("@elementor/icons");
|
|
2577
|
+
var import_ui19 = require("@elementor/ui");
|
|
2578
|
+
var import_i18n17 = require("@wordpress/i18n");
|
|
2964
2579
|
|
|
2965
2580
|
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
2966
|
-
var
|
|
2967
|
-
var
|
|
2968
|
-
var
|
|
2969
|
-
var
|
|
2970
|
-
var FLEX_DIRECTION_LABEL = (0,
|
|
2581
|
+
var React31 = __toESM(require("react"));
|
|
2582
|
+
var import_react20 = require("react");
|
|
2583
|
+
var import_ui18 = require("@elementor/ui");
|
|
2584
|
+
var import_i18n16 = require("@wordpress/i18n");
|
|
2585
|
+
var FLEX_DIRECTION_LABEL = (0, import_i18n16.__)("Flex direction", "elementor");
|
|
2971
2586
|
var CLOCKWISE_ANGLES = {
|
|
2972
2587
|
row: 0,
|
|
2973
2588
|
column: 90,
|
|
@@ -2987,15 +2602,15 @@ var RotatedIcon = ({
|
|
|
2987
2602
|
offset = 0,
|
|
2988
2603
|
disableRotationForReversed = false
|
|
2989
2604
|
}) => {
|
|
2990
|
-
const rotate = (0,
|
|
2605
|
+
const rotate = (0, import_react20.useRef)(useGetTargetAngle(isClockwise, offset, disableRotationForReversed));
|
|
2991
2606
|
rotate.current = useGetTargetAngle(isClockwise, offset, disableRotationForReversed, rotate);
|
|
2992
|
-
return /* @__PURE__ */
|
|
2607
|
+
return /* @__PURE__ */ React31.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
2993
2608
|
};
|
|
2994
2609
|
var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existingRef) => {
|
|
2995
2610
|
const { value: direction } = useStylesField("flex-direction", {
|
|
2996
2611
|
history: { propDisplayName: FLEX_DIRECTION_LABEL }
|
|
2997
2612
|
});
|
|
2998
|
-
const isRtl = "rtl" === (0,
|
|
2613
|
+
const isRtl = "rtl" === (0, import_ui18.useTheme)().direction;
|
|
2999
2614
|
const rotationMultiplier = isRtl ? -1 : 1;
|
|
3000
2615
|
const angleMap = isClockwise ? CLOCKWISE_ANGLES : COUNTER_CLOCKWISE_ANGLES;
|
|
3001
2616
|
const currentDirection = direction?.value || "row";
|
|
@@ -3010,9 +2625,9 @@ var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existi
|
|
|
3010
2625
|
};
|
|
3011
2626
|
|
|
3012
2627
|
// src/components/style-sections/layout-section/align-content-field.tsx
|
|
3013
|
-
var ALIGN_CONTENT_LABEL = (0,
|
|
3014
|
-
var StartIcon = (0,
|
|
3015
|
-
var EndIcon = (0,
|
|
2628
|
+
var ALIGN_CONTENT_LABEL = (0, import_i18n17.__)("Align content", "elementor");
|
|
2629
|
+
var StartIcon = (0, import_ui19.withDirection)(import_icons5.JustifyTopIcon);
|
|
2630
|
+
var EndIcon = (0, import_ui19.withDirection)(import_icons5.JustifyBottomIcon);
|
|
3016
2631
|
var iconProps = {
|
|
3017
2632
|
isClockwise: false,
|
|
3018
2633
|
offset: 0,
|
|
@@ -3021,52 +2636,52 @@ var iconProps = {
|
|
|
3021
2636
|
var options = [
|
|
3022
2637
|
{
|
|
3023
2638
|
value: "start",
|
|
3024
|
-
label: (0,
|
|
3025
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2639
|
+
label: (0, import_i18n17.__)("Start", "elementor"),
|
|
2640
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(RotatedIcon, { icon: StartIcon, size, ...iconProps }),
|
|
3026
2641
|
showTooltip: true
|
|
3027
2642
|
},
|
|
3028
2643
|
{
|
|
3029
2644
|
value: "center",
|
|
3030
|
-
label: (0,
|
|
3031
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2645
|
+
label: (0, import_i18n17.__)("Center", "elementor"),
|
|
2646
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(RotatedIcon, { icon: import_icons5.JustifyCenterIcon, size, ...iconProps }),
|
|
3032
2647
|
showTooltip: true
|
|
3033
2648
|
},
|
|
3034
2649
|
{
|
|
3035
2650
|
value: "end",
|
|
3036
|
-
label: (0,
|
|
3037
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2651
|
+
label: (0, import_i18n17.__)("End", "elementor"),
|
|
2652
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(RotatedIcon, { icon: EndIcon, size, ...iconProps }),
|
|
3038
2653
|
showTooltip: true
|
|
3039
2654
|
},
|
|
3040
2655
|
{
|
|
3041
2656
|
value: "space-between",
|
|
3042
|
-
label: (0,
|
|
3043
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2657
|
+
label: (0, import_i18n17.__)("Space between", "elementor"),
|
|
2658
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(RotatedIcon, { icon: import_icons5.JustifySpaceBetweenVerticalIcon, size, ...iconProps }),
|
|
3044
2659
|
showTooltip: true
|
|
3045
2660
|
},
|
|
3046
2661
|
{
|
|
3047
2662
|
value: "space-around",
|
|
3048
|
-
label: (0,
|
|
3049
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2663
|
+
label: (0, import_i18n17.__)("Space around", "elementor"),
|
|
2664
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(RotatedIcon, { icon: import_icons5.JustifySpaceAroundVerticalIcon, size, ...iconProps }),
|
|
3050
2665
|
showTooltip: true
|
|
3051
2666
|
},
|
|
3052
2667
|
{
|
|
3053
2668
|
value: "space-evenly",
|
|
3054
|
-
label: (0,
|
|
3055
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2669
|
+
label: (0, import_i18n17.__)("Space evenly", "elementor"),
|
|
2670
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(RotatedIcon, { icon: import_icons5.JustifyDistributeVerticalIcon, size, ...iconProps }),
|
|
3056
2671
|
showTooltip: true
|
|
3057
2672
|
}
|
|
3058
2673
|
];
|
|
3059
|
-
var AlignContentField = () => /* @__PURE__ */
|
|
2674
|
+
var AlignContentField = () => /* @__PURE__ */ React32.createElement(StylesField, { bind: "align-content", propDisplayName: ALIGN_CONTENT_LABEL }, /* @__PURE__ */ React32.createElement(UiProviders, null, /* @__PURE__ */ React32.createElement(StylesFieldLayout, { label: ALIGN_CONTENT_LABEL, direction: "column" }, /* @__PURE__ */ React32.createElement(import_editor_controls12.ToggleControl, { options, fullWidth: true }))));
|
|
3060
2675
|
|
|
3061
2676
|
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
3062
|
-
var
|
|
3063
|
-
var
|
|
3064
|
-
var
|
|
3065
|
-
var
|
|
3066
|
-
var
|
|
3067
|
-
var ALIGN_ITEMS_LABEL = (0,
|
|
3068
|
-
var StartIcon2 = (0,
|
|
3069
|
-
var EndIcon2 = (0,
|
|
2677
|
+
var React33 = __toESM(require("react"));
|
|
2678
|
+
var import_editor_controls13 = require("@elementor/editor-controls");
|
|
2679
|
+
var import_icons6 = require("@elementor/icons");
|
|
2680
|
+
var import_ui20 = require("@elementor/ui");
|
|
2681
|
+
var import_i18n18 = require("@wordpress/i18n");
|
|
2682
|
+
var ALIGN_ITEMS_LABEL = (0, import_i18n18.__)("Align items", "elementor");
|
|
2683
|
+
var StartIcon2 = (0, import_ui20.withDirection)(import_icons6.LayoutAlignLeftIcon);
|
|
2684
|
+
var EndIcon2 = (0, import_ui20.withDirection)(import_icons6.LayoutAlignRightIcon);
|
|
3070
2685
|
var iconProps2 = {
|
|
3071
2686
|
isClockwise: false,
|
|
3072
2687
|
offset: 90
|
|
@@ -3074,56 +2689,56 @@ var iconProps2 = {
|
|
|
3074
2689
|
var options2 = [
|
|
3075
2690
|
{
|
|
3076
2691
|
value: "start",
|
|
3077
|
-
label: (0,
|
|
3078
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2692
|
+
label: (0, import_i18n18.__)("Start", "elementor"),
|
|
2693
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: StartIcon2, size, ...iconProps2 }),
|
|
3079
2694
|
showTooltip: true
|
|
3080
2695
|
},
|
|
3081
2696
|
{
|
|
3082
2697
|
value: "center",
|
|
3083
|
-
label: (0,
|
|
3084
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2698
|
+
label: (0, import_i18n18.__)("Center", "elementor"),
|
|
2699
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: import_icons6.LayoutAlignCenterIcon, size, ...iconProps2 }),
|
|
3085
2700
|
showTooltip: true
|
|
3086
2701
|
},
|
|
3087
2702
|
{
|
|
3088
2703
|
value: "end",
|
|
3089
|
-
label: (0,
|
|
3090
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2704
|
+
label: (0, import_i18n18.__)("End", "elementor"),
|
|
2705
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: EndIcon2, size, ...iconProps2 }),
|
|
3091
2706
|
showTooltip: true
|
|
3092
2707
|
},
|
|
3093
2708
|
{
|
|
3094
2709
|
value: "stretch",
|
|
3095
|
-
label: (0,
|
|
3096
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2710
|
+
label: (0, import_i18n18.__)("Stretch", "elementor"),
|
|
2711
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: import_icons6.LayoutDistributeVerticalIcon, size, ...iconProps2 }),
|
|
3097
2712
|
showTooltip: true
|
|
3098
2713
|
}
|
|
3099
2714
|
];
|
|
3100
2715
|
var AlignItemsField = () => {
|
|
3101
|
-
return /* @__PURE__ */
|
|
2716
|
+
return /* @__PURE__ */ React33.createElement(UiProviders, null, /* @__PURE__ */ React33.createElement(StylesField, { bind: "align-items", propDisplayName: ALIGN_ITEMS_LABEL }, /* @__PURE__ */ React33.createElement(StylesFieldLayout, { label: ALIGN_ITEMS_LABEL }, /* @__PURE__ */ React33.createElement(import_editor_controls13.ToggleControl, { options: options2 }))));
|
|
3102
2717
|
};
|
|
3103
2718
|
|
|
3104
2719
|
// src/components/style-sections/layout-section/align-self-child-field.tsx
|
|
3105
|
-
var
|
|
3106
|
-
var
|
|
3107
|
-
var
|
|
3108
|
-
var
|
|
3109
|
-
var
|
|
3110
|
-
var ALIGN_SELF_LABEL = (0,
|
|
2720
|
+
var React34 = __toESM(require("react"));
|
|
2721
|
+
var import_editor_controls14 = require("@elementor/editor-controls");
|
|
2722
|
+
var import_icons7 = require("@elementor/icons");
|
|
2723
|
+
var import_ui21 = require("@elementor/ui");
|
|
2724
|
+
var import_i18n19 = require("@wordpress/i18n");
|
|
2725
|
+
var ALIGN_SELF_LABEL = (0, import_i18n19.__)("Align self", "elementor");
|
|
3111
2726
|
var ALIGN_SELF_CHILD_OFFSET_MAP = {
|
|
3112
2727
|
row: 90,
|
|
3113
2728
|
"row-reverse": 90,
|
|
3114
2729
|
column: 0,
|
|
3115
2730
|
"column-reverse": 0
|
|
3116
2731
|
};
|
|
3117
|
-
var StartIcon3 = (0,
|
|
3118
|
-
var EndIcon3 = (0,
|
|
2732
|
+
var StartIcon3 = (0, import_ui21.withDirection)(import_icons7.LayoutAlignLeftIcon);
|
|
2733
|
+
var EndIcon3 = (0, import_ui21.withDirection)(import_icons7.LayoutAlignRightIcon);
|
|
3119
2734
|
var iconProps3 = {
|
|
3120
2735
|
isClockwise: false
|
|
3121
2736
|
};
|
|
3122
2737
|
var getOptions = (parentStyleDirection) => [
|
|
3123
2738
|
{
|
|
3124
2739
|
value: "start",
|
|
3125
|
-
label: (0,
|
|
3126
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2740
|
+
label: (0, import_i18n19.__)("Start", "elementor"),
|
|
2741
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(
|
|
3127
2742
|
RotatedIcon,
|
|
3128
2743
|
{
|
|
3129
2744
|
icon: StartIcon3,
|
|
@@ -3136,11 +2751,11 @@ var getOptions = (parentStyleDirection) => [
|
|
|
3136
2751
|
},
|
|
3137
2752
|
{
|
|
3138
2753
|
value: "center",
|
|
3139
|
-
label: (0,
|
|
3140
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2754
|
+
label: (0, import_i18n19.__)("Center", "elementor"),
|
|
2755
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(
|
|
3141
2756
|
RotatedIcon,
|
|
3142
2757
|
{
|
|
3143
|
-
icon:
|
|
2758
|
+
icon: import_icons7.LayoutAlignCenterIcon,
|
|
3144
2759
|
size,
|
|
3145
2760
|
offset: ALIGN_SELF_CHILD_OFFSET_MAP[parentStyleDirection],
|
|
3146
2761
|
...iconProps3
|
|
@@ -3150,8 +2765,8 @@ var getOptions = (parentStyleDirection) => [
|
|
|
3150
2765
|
},
|
|
3151
2766
|
{
|
|
3152
2767
|
value: "end",
|
|
3153
|
-
label: (0,
|
|
3154
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2768
|
+
label: (0, import_i18n19.__)("End", "elementor"),
|
|
2769
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(
|
|
3155
2770
|
RotatedIcon,
|
|
3156
2771
|
{
|
|
3157
2772
|
icon: EndIcon3,
|
|
@@ -3164,11 +2779,11 @@ var getOptions = (parentStyleDirection) => [
|
|
|
3164
2779
|
},
|
|
3165
2780
|
{
|
|
3166
2781
|
value: "stretch",
|
|
3167
|
-
label: (0,
|
|
3168
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2782
|
+
label: (0, import_i18n19.__)("Stretch", "elementor"),
|
|
2783
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(
|
|
3169
2784
|
RotatedIcon,
|
|
3170
2785
|
{
|
|
3171
|
-
icon:
|
|
2786
|
+
icon: import_icons7.LayoutDistributeVerticalIcon,
|
|
3172
2787
|
size,
|
|
3173
2788
|
offset: ALIGN_SELF_CHILD_OFFSET_MAP[parentStyleDirection],
|
|
3174
2789
|
...iconProps3
|
|
@@ -3177,102 +2792,102 @@ var getOptions = (parentStyleDirection) => [
|
|
|
3177
2792
|
showTooltip: true
|
|
3178
2793
|
}
|
|
3179
2794
|
];
|
|
3180
|
-
var AlignSelfChild = ({ parentStyleDirection }) => /* @__PURE__ */
|
|
2795
|
+
var AlignSelfChild = ({ parentStyleDirection }) => /* @__PURE__ */ React34.createElement(StylesField, { bind: "align-self", propDisplayName: ALIGN_SELF_LABEL }, /* @__PURE__ */ React34.createElement(UiProviders, null, /* @__PURE__ */ React34.createElement(StylesFieldLayout, { label: ALIGN_SELF_LABEL }, /* @__PURE__ */ React34.createElement(import_editor_controls14.ToggleControl, { options: getOptions(parentStyleDirection) }))));
|
|
3181
2796
|
|
|
3182
2797
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
3183
|
-
var
|
|
3184
|
-
var
|
|
3185
|
-
var
|
|
3186
|
-
var DISPLAY_LABEL = (0,
|
|
2798
|
+
var React35 = __toESM(require("react"));
|
|
2799
|
+
var import_editor_controls15 = require("@elementor/editor-controls");
|
|
2800
|
+
var import_i18n20 = require("@wordpress/i18n");
|
|
2801
|
+
var DISPLAY_LABEL = (0, import_i18n20.__)("Display", "elementor");
|
|
3187
2802
|
var displayFieldItems = [
|
|
3188
2803
|
{
|
|
3189
2804
|
value: "block",
|
|
3190
|
-
renderContent: () => (0,
|
|
3191
|
-
label: (0,
|
|
2805
|
+
renderContent: () => (0, import_i18n20.__)("Block", "elementor"),
|
|
2806
|
+
label: (0, import_i18n20.__)("Block", "elementor"),
|
|
3192
2807
|
showTooltip: true
|
|
3193
2808
|
},
|
|
3194
2809
|
{
|
|
3195
2810
|
value: "flex",
|
|
3196
|
-
renderContent: () => (0,
|
|
3197
|
-
label: (0,
|
|
2811
|
+
renderContent: () => (0, import_i18n20.__)("Flex", "elementor"),
|
|
2812
|
+
label: (0, import_i18n20.__)("Flex", "elementor"),
|
|
3198
2813
|
showTooltip: true
|
|
3199
2814
|
},
|
|
3200
2815
|
{
|
|
3201
2816
|
value: "inline-block",
|
|
3202
|
-
renderContent: () => (0,
|
|
3203
|
-
label: (0,
|
|
2817
|
+
renderContent: () => (0, import_i18n20.__)("In-blk", "elementor"),
|
|
2818
|
+
label: (0, import_i18n20.__)("Inline-block", "elementor"),
|
|
3204
2819
|
showTooltip: true
|
|
3205
2820
|
},
|
|
3206
2821
|
{
|
|
3207
2822
|
value: "none",
|
|
3208
|
-
renderContent: () => (0,
|
|
3209
|
-
label: (0,
|
|
2823
|
+
renderContent: () => (0, import_i18n20.__)("None", "elementor"),
|
|
2824
|
+
label: (0, import_i18n20.__)("None", "elementor"),
|
|
3210
2825
|
showTooltip: true
|
|
3211
2826
|
},
|
|
3212
2827
|
{
|
|
3213
2828
|
value: "inline-flex",
|
|
3214
|
-
renderContent: () => (0,
|
|
3215
|
-
label: (0,
|
|
2829
|
+
renderContent: () => (0, import_i18n20.__)("In-flx", "elementor"),
|
|
2830
|
+
label: (0, import_i18n20.__)("Inline-flex", "elementor"),
|
|
3216
2831
|
showTooltip: true
|
|
3217
2832
|
}
|
|
3218
2833
|
];
|
|
3219
2834
|
var DisplayField = () => {
|
|
3220
2835
|
const placeholder = useDisplayPlaceholderValue();
|
|
3221
|
-
return /* @__PURE__ */
|
|
2836
|
+
return /* @__PURE__ */ React35.createElement(StylesField, { bind: "display", propDisplayName: DISPLAY_LABEL, placeholder }, /* @__PURE__ */ React35.createElement(StylesFieldLayout, { label: DISPLAY_LABEL, direction: "column" }, /* @__PURE__ */ React35.createElement(import_editor_controls15.ToggleControl, { options: displayFieldItems, maxItems: 4, fullWidth: true })));
|
|
3222
2837
|
};
|
|
3223
2838
|
var useDisplayPlaceholderValue = () => useStylesInheritanceChain(["display"])[0]?.value ?? void 0;
|
|
3224
2839
|
|
|
3225
2840
|
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
3226
|
-
var
|
|
3227
|
-
var
|
|
3228
|
-
var
|
|
3229
|
-
var
|
|
3230
|
-
var
|
|
3231
|
-
var FLEX_DIRECTION_LABEL2 = (0,
|
|
2841
|
+
var React36 = __toESM(require("react"));
|
|
2842
|
+
var import_editor_controls16 = require("@elementor/editor-controls");
|
|
2843
|
+
var import_icons8 = require("@elementor/icons");
|
|
2844
|
+
var import_ui22 = require("@elementor/ui");
|
|
2845
|
+
var import_i18n21 = require("@wordpress/i18n");
|
|
2846
|
+
var FLEX_DIRECTION_LABEL2 = (0, import_i18n21.__)("Direction", "elementor");
|
|
3232
2847
|
var options3 = [
|
|
3233
2848
|
{
|
|
3234
2849
|
value: "row",
|
|
3235
|
-
label: (0,
|
|
2850
|
+
label: (0, import_i18n21.__)("Row", "elementor"),
|
|
3236
2851
|
renderContent: ({ size }) => {
|
|
3237
|
-
const StartIcon5 = (0,
|
|
3238
|
-
return /* @__PURE__ */
|
|
2852
|
+
const StartIcon5 = (0, import_ui22.withDirection)(import_icons8.ArrowRightIcon);
|
|
2853
|
+
return /* @__PURE__ */ React36.createElement(StartIcon5, { fontSize: size });
|
|
3239
2854
|
},
|
|
3240
2855
|
showTooltip: true
|
|
3241
2856
|
},
|
|
3242
2857
|
{
|
|
3243
2858
|
value: "column",
|
|
3244
|
-
label: (0,
|
|
3245
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2859
|
+
label: (0, import_i18n21.__)("Column", "elementor"),
|
|
2860
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(import_icons8.ArrowDownSmallIcon, { fontSize: size }),
|
|
3246
2861
|
showTooltip: true
|
|
3247
2862
|
},
|
|
3248
2863
|
{
|
|
3249
2864
|
value: "row-reverse",
|
|
3250
|
-
label: (0,
|
|
2865
|
+
label: (0, import_i18n21.__)("Reversed row", "elementor"),
|
|
3251
2866
|
renderContent: ({ size }) => {
|
|
3252
|
-
const EndIcon5 = (0,
|
|
3253
|
-
return /* @__PURE__ */
|
|
2867
|
+
const EndIcon5 = (0, import_ui22.withDirection)(import_icons8.ArrowLeftIcon);
|
|
2868
|
+
return /* @__PURE__ */ React36.createElement(EndIcon5, { fontSize: size });
|
|
3254
2869
|
},
|
|
3255
2870
|
showTooltip: true
|
|
3256
2871
|
},
|
|
3257
2872
|
{
|
|
3258
2873
|
value: "column-reverse",
|
|
3259
|
-
label: (0,
|
|
3260
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2874
|
+
label: (0, import_i18n21.__)("Reversed column", "elementor"),
|
|
2875
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(import_icons8.ArrowUpSmallIcon, { fontSize: size }),
|
|
3261
2876
|
showTooltip: true
|
|
3262
2877
|
}
|
|
3263
2878
|
];
|
|
3264
2879
|
var FlexDirectionField = () => {
|
|
3265
|
-
return /* @__PURE__ */
|
|
2880
|
+
return /* @__PURE__ */ React36.createElement(StylesField, { bind: "flex-direction", propDisplayName: FLEX_DIRECTION_LABEL2 }, /* @__PURE__ */ React36.createElement(UiProviders, null, /* @__PURE__ */ React36.createElement(StylesFieldLayout, { label: FLEX_DIRECTION_LABEL2 }, /* @__PURE__ */ React36.createElement(import_editor_controls16.ToggleControl, { options: options3 }))));
|
|
3266
2881
|
};
|
|
3267
2882
|
|
|
3268
2883
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
3269
|
-
var
|
|
3270
|
-
var
|
|
3271
|
-
var
|
|
3272
|
-
var
|
|
3273
|
-
var
|
|
3274
|
-
var
|
|
3275
|
-
var ORDER_LABEL = (0,
|
|
2884
|
+
var React37 = __toESM(require("react"));
|
|
2885
|
+
var import_react21 = require("react");
|
|
2886
|
+
var import_editor_controls17 = require("@elementor/editor-controls");
|
|
2887
|
+
var import_icons9 = require("@elementor/icons");
|
|
2888
|
+
var import_ui23 = require("@elementor/ui");
|
|
2889
|
+
var import_i18n22 = require("@wordpress/i18n");
|
|
2890
|
+
var ORDER_LABEL = (0, import_i18n22.__)("Order", "elementor");
|
|
3276
2891
|
var FIRST_DEFAULT_VALUE = -99999;
|
|
3277
2892
|
var LAST_DEFAULT_VALUE = 99999;
|
|
3278
2893
|
var FIRST = "first";
|
|
@@ -3285,25 +2900,25 @@ var orderValueMap = {
|
|
|
3285
2900
|
var items = [
|
|
3286
2901
|
{
|
|
3287
2902
|
value: FIRST,
|
|
3288
|
-
label: (0,
|
|
3289
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2903
|
+
label: (0, import_i18n22.__)("First", "elementor"),
|
|
2904
|
+
renderContent: ({ size }) => /* @__PURE__ */ React37.createElement(import_icons9.ArrowUpSmallIcon, { fontSize: size }),
|
|
3290
2905
|
showTooltip: true
|
|
3291
2906
|
},
|
|
3292
2907
|
{
|
|
3293
2908
|
value: LAST,
|
|
3294
|
-
label: (0,
|
|
3295
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2909
|
+
label: (0, import_i18n22.__)("Last", "elementor"),
|
|
2910
|
+
renderContent: ({ size }) => /* @__PURE__ */ React37.createElement(import_icons9.ArrowDownSmallIcon, { fontSize: size }),
|
|
3296
2911
|
showTooltip: true
|
|
3297
2912
|
},
|
|
3298
2913
|
{
|
|
3299
2914
|
value: CUSTOM,
|
|
3300
|
-
label: (0,
|
|
3301
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2915
|
+
label: (0, import_i18n22.__)("Custom", "elementor"),
|
|
2916
|
+
renderContent: ({ size }) => /* @__PURE__ */ React37.createElement(import_icons9.PencilIcon, { fontSize: size }),
|
|
3302
2917
|
showTooltip: true
|
|
3303
2918
|
}
|
|
3304
2919
|
];
|
|
3305
2920
|
var FlexOrderField = () => {
|
|
3306
|
-
return /* @__PURE__ */
|
|
2921
|
+
return /* @__PURE__ */ React37.createElement(StylesField, { bind: "order", propDisplayName: ORDER_LABEL }, /* @__PURE__ */ React37.createElement(UiProviders, null, /* @__PURE__ */ React37.createElement(SectionContent, null, /* @__PURE__ */ React37.createElement(FlexOrderFieldContent, null))));
|
|
3307
2922
|
};
|
|
3308
2923
|
function FlexOrderFieldContent() {
|
|
3309
2924
|
const {
|
|
@@ -3313,17 +2928,17 @@ function FlexOrderFieldContent() {
|
|
|
3313
2928
|
} = useStylesField("order", {
|
|
3314
2929
|
history: { propDisplayName: ORDER_LABEL }
|
|
3315
2930
|
});
|
|
3316
|
-
const { placeholder } = (0,
|
|
2931
|
+
const { placeholder } = (0, import_editor_controls17.useBoundProp)();
|
|
3317
2932
|
const placeholderValue = placeholder;
|
|
3318
|
-
const currentGroup = (0,
|
|
3319
|
-
const [activeGroup, setActiveGroup] = (0,
|
|
3320
|
-
const [customLocked, setCustomLocked] = (0,
|
|
3321
|
-
(0,
|
|
2933
|
+
const currentGroup = (0, import_react21.useMemo)(() => getGroupControlValue(order?.value ?? null), [order]);
|
|
2934
|
+
const [activeGroup, setActiveGroup] = (0, import_react21.useState)(currentGroup);
|
|
2935
|
+
const [customLocked, setCustomLocked] = (0, import_react21.useState)(false);
|
|
2936
|
+
(0, import_react21.useEffect)(() => {
|
|
3322
2937
|
if (!customLocked) {
|
|
3323
2938
|
setActiveGroup(currentGroup);
|
|
3324
2939
|
}
|
|
3325
2940
|
}, [currentGroup, customLocked]);
|
|
3326
|
-
(0,
|
|
2941
|
+
(0, import_react21.useEffect)(() => {
|
|
3327
2942
|
if (order === null) {
|
|
3328
2943
|
setCustomLocked(false);
|
|
3329
2944
|
}
|
|
@@ -3348,8 +2963,8 @@ function FlexOrderFieldContent() {
|
|
|
3348
2963
|
};
|
|
3349
2964
|
const isCustomVisible = CUSTOM === activeGroup || CUSTOM === groupPlaceholder;
|
|
3350
2965
|
const orderPlaceholder = CUSTOM === groupPlaceholder ? String(placeholderValue?.value ?? null) : "";
|
|
3351
|
-
return /* @__PURE__ */
|
|
3352
|
-
|
|
2966
|
+
return /* @__PURE__ */ React37.createElement(React37.Fragment, null, /* @__PURE__ */ React37.createElement(StylesFieldLayout, { label: ORDER_LABEL }, /* @__PURE__ */ React37.createElement(
|
|
2967
|
+
import_editor_controls17.ControlToggleButtonGroup,
|
|
3353
2968
|
{
|
|
3354
2969
|
items,
|
|
3355
2970
|
value: activeGroup,
|
|
@@ -3358,8 +2973,8 @@ function FlexOrderFieldContent() {
|
|
|
3358
2973
|
placeholder: groupPlaceholder,
|
|
3359
2974
|
disabled: !canEdit
|
|
3360
2975
|
}
|
|
3361
|
-
)), isCustomVisible && /* @__PURE__ */
|
|
3362
|
-
|
|
2976
|
+
)), isCustomVisible && /* @__PURE__ */ React37.createElement(import_ui23.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(import_ui23.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(ControlLabel, null, (0, import_i18n22.__)("Custom order", "elementor"))), /* @__PURE__ */ React37.createElement(import_ui23.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React37.createElement(
|
|
2977
|
+
import_editor_controls17.NumberControl,
|
|
3363
2978
|
{
|
|
3364
2979
|
min: FIRST_DEFAULT_VALUE + 1,
|
|
3365
2980
|
max: LAST_DEFAULT_VALUE - 1,
|
|
@@ -3382,52 +2997,52 @@ var getGroupControlValue = (order) => {
|
|
|
3382
2997
|
};
|
|
3383
2998
|
|
|
3384
2999
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
3385
|
-
var
|
|
3386
|
-
var
|
|
3387
|
-
var
|
|
3388
|
-
var
|
|
3389
|
-
var
|
|
3390
|
-
var
|
|
3391
|
-
var FLEX_SIZE_LABEL = (0,
|
|
3000
|
+
var React38 = __toESM(require("react"));
|
|
3001
|
+
var import_react22 = require("react");
|
|
3002
|
+
var import_editor_controls18 = require("@elementor/editor-controls");
|
|
3003
|
+
var import_editor_props10 = require("@elementor/editor-props");
|
|
3004
|
+
var import_icons10 = require("@elementor/icons");
|
|
3005
|
+
var import_i18n23 = require("@wordpress/i18n");
|
|
3006
|
+
var FLEX_SIZE_LABEL = (0, import_i18n23.__)("Flex Size", "elementor");
|
|
3392
3007
|
var DEFAULT = 1;
|
|
3393
3008
|
var items2 = [
|
|
3394
3009
|
{
|
|
3395
3010
|
value: "flex-grow",
|
|
3396
|
-
label: (0,
|
|
3397
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3011
|
+
label: (0, import_i18n23.__)("Grow", "elementor"),
|
|
3012
|
+
renderContent: ({ size }) => /* @__PURE__ */ React38.createElement(import_icons10.ExpandIcon, { fontSize: size }),
|
|
3398
3013
|
showTooltip: true
|
|
3399
3014
|
},
|
|
3400
3015
|
{
|
|
3401
3016
|
value: "flex-shrink",
|
|
3402
|
-
label: (0,
|
|
3403
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3017
|
+
label: (0, import_i18n23.__)("Shrink", "elementor"),
|
|
3018
|
+
renderContent: ({ size }) => /* @__PURE__ */ React38.createElement(import_icons10.ShrinkIcon, { fontSize: size }),
|
|
3404
3019
|
showTooltip: true
|
|
3405
3020
|
},
|
|
3406
3021
|
{
|
|
3407
3022
|
value: "custom",
|
|
3408
|
-
label: (0,
|
|
3409
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3023
|
+
label: (0, import_i18n23.__)("Custom", "elementor"),
|
|
3024
|
+
renderContent: ({ size }) => /* @__PURE__ */ React38.createElement(import_icons10.PencilIcon, { fontSize: size }),
|
|
3410
3025
|
showTooltip: true
|
|
3411
3026
|
}
|
|
3412
3027
|
];
|
|
3413
3028
|
var FlexSizeField = () => {
|
|
3414
|
-
return /* @__PURE__ */
|
|
3029
|
+
return /* @__PURE__ */ React38.createElement(UiProviders, null, /* @__PURE__ */ React38.createElement(SectionContent, null, /* @__PURE__ */ React38.createElement(StylesField, { bind: "flex", propDisplayName: FLEX_SIZE_LABEL }, /* @__PURE__ */ React38.createElement(FlexSizeFieldContent, null))));
|
|
3415
3030
|
};
|
|
3416
3031
|
var FlexSizeFieldContent = () => {
|
|
3417
3032
|
const { value, setValue, canEdit } = useStylesField("flex", {
|
|
3418
3033
|
history: { propDisplayName: FLEX_SIZE_LABEL }
|
|
3419
3034
|
});
|
|
3420
|
-
const { placeholder } = (0,
|
|
3035
|
+
const { placeholder } = (0, import_editor_controls18.useBoundProp)();
|
|
3421
3036
|
const flexValues = extractFlexValues(value);
|
|
3422
|
-
const currentGroup = (0,
|
|
3423
|
-
const [activeGroup, setActiveGroup] = (0,
|
|
3424
|
-
const [customLocked, setCustomLocked] = (0,
|
|
3425
|
-
(0,
|
|
3037
|
+
const currentGroup = (0, import_react22.useMemo)(() => getActiveGroup(flexValues), [flexValues]);
|
|
3038
|
+
const [activeGroup, setActiveGroup] = (0, import_react22.useState)(currentGroup);
|
|
3039
|
+
const [customLocked, setCustomLocked] = (0, import_react22.useState)(false);
|
|
3040
|
+
(0, import_react22.useEffect)(() => {
|
|
3426
3041
|
if (!customLocked) {
|
|
3427
3042
|
setActiveGroup(currentGroup);
|
|
3428
3043
|
}
|
|
3429
3044
|
}, [currentGroup, customLocked]);
|
|
3430
|
-
(0,
|
|
3045
|
+
(0, import_react22.useEffect)(() => {
|
|
3431
3046
|
if (value === null) {
|
|
3432
3047
|
setCustomLocked(false);
|
|
3433
3048
|
}
|
|
@@ -3440,8 +3055,8 @@ var FlexSizeFieldContent = () => {
|
|
|
3440
3055
|
};
|
|
3441
3056
|
const groupPlaceholder = getActiveGroup(extractFlexValues(placeholder));
|
|
3442
3057
|
const isCustomVisible = "custom" === activeGroup || "custom" === groupPlaceholder;
|
|
3443
|
-
return /* @__PURE__ */
|
|
3444
|
-
|
|
3058
|
+
return /* @__PURE__ */ React38.createElement(React38.Fragment, null, /* @__PURE__ */ React38.createElement(StylesFieldLayout, { label: FLEX_SIZE_LABEL }, /* @__PURE__ */ React38.createElement(
|
|
3059
|
+
import_editor_controls18.ControlToggleButtonGroup,
|
|
3445
3060
|
{
|
|
3446
3061
|
value: activeGroup ?? null,
|
|
3447
3062
|
placeholder: groupPlaceholder ?? null,
|
|
@@ -3450,7 +3065,7 @@ var FlexSizeFieldContent = () => {
|
|
|
3450
3065
|
items: items2,
|
|
3451
3066
|
exclusive: true
|
|
3452
3067
|
}
|
|
3453
|
-
)), isCustomVisible && /* @__PURE__ */
|
|
3068
|
+
)), isCustomVisible && /* @__PURE__ */ React38.createElement(FlexCustomField, null));
|
|
3454
3069
|
};
|
|
3455
3070
|
function extractFlexValues(source) {
|
|
3456
3071
|
return {
|
|
@@ -3464,16 +3079,16 @@ var createFlexValueForGroup = (group, flexValue) => {
|
|
|
3464
3079
|
return null;
|
|
3465
3080
|
}
|
|
3466
3081
|
if (group === "flex-grow") {
|
|
3467
|
-
return
|
|
3468
|
-
flexGrow:
|
|
3082
|
+
return import_editor_props10.flexPropTypeUtil.create({
|
|
3083
|
+
flexGrow: import_editor_props10.numberPropTypeUtil.create(DEFAULT),
|
|
3469
3084
|
flexShrink: null,
|
|
3470
3085
|
flexBasis: null
|
|
3471
3086
|
});
|
|
3472
3087
|
}
|
|
3473
3088
|
if (group === "flex-shrink") {
|
|
3474
|
-
return
|
|
3089
|
+
return import_editor_props10.flexPropTypeUtil.create({
|
|
3475
3090
|
flexGrow: null,
|
|
3476
|
-
flexShrink:
|
|
3091
|
+
flexShrink: import_editor_props10.numberPropTypeUtil.create(DEFAULT),
|
|
3477
3092
|
flexBasis: null
|
|
3478
3093
|
});
|
|
3479
3094
|
}
|
|
@@ -3481,7 +3096,7 @@ var createFlexValueForGroup = (group, flexValue) => {
|
|
|
3481
3096
|
if (flexValue) {
|
|
3482
3097
|
return flexValue;
|
|
3483
3098
|
}
|
|
3484
|
-
return
|
|
3099
|
+
return import_editor_props10.flexPropTypeUtil.create({
|
|
3485
3100
|
flexGrow: null,
|
|
3486
3101
|
flexShrink: null,
|
|
3487
3102
|
flexBasis: null
|
|
@@ -3490,9 +3105,9 @@ var createFlexValueForGroup = (group, flexValue) => {
|
|
|
3490
3105
|
return null;
|
|
3491
3106
|
};
|
|
3492
3107
|
var FlexCustomField = () => {
|
|
3493
|
-
const flexBasisRowRef = (0,
|
|
3494
|
-
const context = (0,
|
|
3495
|
-
return /* @__PURE__ */
|
|
3108
|
+
const flexBasisRowRef = (0, import_react22.useRef)(null);
|
|
3109
|
+
const context = (0, import_editor_controls18.useBoundProp)(import_editor_props10.flexPropTypeUtil);
|
|
3110
|
+
return /* @__PURE__ */ React38.createElement(import_editor_controls18.PropProvider, { ...context }, /* @__PURE__ */ React38.createElement(React38.Fragment, null, /* @__PURE__ */ React38.createElement(StylesFieldLayout, { label: (0, import_i18n23.__)("Grow", "elementor") }, /* @__PURE__ */ React38.createElement(import_editor_controls18.PropKeyProvider, { bind: "flexGrow" }, /* @__PURE__ */ React38.createElement(import_editor_controls18.NumberControl, { min: 0, shouldForceInt: true }))), /* @__PURE__ */ React38.createElement(StylesFieldLayout, { label: (0, import_i18n23.__)("Shrink", "elementor") }, /* @__PURE__ */ React38.createElement(import_editor_controls18.PropKeyProvider, { bind: "flexShrink" }, /* @__PURE__ */ React38.createElement(import_editor_controls18.NumberControl, { min: 0, shouldForceInt: true }))), /* @__PURE__ */ React38.createElement(StylesFieldLayout, { label: (0, import_i18n23.__)("Basis", "elementor"), ref: flexBasisRowRef }, /* @__PURE__ */ React38.createElement(import_editor_controls18.PropKeyProvider, { bind: "flexBasis" }, /* @__PURE__ */ React38.createElement(import_editor_controls18.SizeControl, { extendedOptions: ["auto"], anchorRef: flexBasisRowRef })))));
|
|
3496
3111
|
};
|
|
3497
3112
|
var getActiveGroup = ({
|
|
3498
3113
|
grow,
|
|
@@ -3515,23 +3130,23 @@ var getActiveGroup = ({
|
|
|
3515
3130
|
};
|
|
3516
3131
|
|
|
3517
3132
|
// src/components/style-sections/layout-section/gap-control-field.tsx
|
|
3518
|
-
var
|
|
3519
|
-
var
|
|
3520
|
-
var
|
|
3521
|
-
var GAPS_LABEL = (0,
|
|
3133
|
+
var React39 = __toESM(require("react"));
|
|
3134
|
+
var import_editor_controls19 = require("@elementor/editor-controls");
|
|
3135
|
+
var import_i18n24 = require("@wordpress/i18n");
|
|
3136
|
+
var GAPS_LABEL = (0, import_i18n24.__)("Gaps", "elementor");
|
|
3522
3137
|
var GapControlField = () => {
|
|
3523
|
-
return /* @__PURE__ */
|
|
3138
|
+
return /* @__PURE__ */ React39.createElement(StylesField, { bind: "gap", propDisplayName: GAPS_LABEL }, /* @__PURE__ */ React39.createElement(import_editor_controls19.GapControl, { label: GAPS_LABEL }));
|
|
3524
3139
|
};
|
|
3525
3140
|
|
|
3526
3141
|
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
3527
|
-
var
|
|
3528
|
-
var
|
|
3529
|
-
var
|
|
3530
|
-
var
|
|
3531
|
-
var
|
|
3532
|
-
var JUSTIFY_CONTENT_LABEL = (0,
|
|
3533
|
-
var StartIcon4 = (0,
|
|
3534
|
-
var EndIcon4 = (0,
|
|
3142
|
+
var React40 = __toESM(require("react"));
|
|
3143
|
+
var import_editor_controls20 = require("@elementor/editor-controls");
|
|
3144
|
+
var import_icons11 = require("@elementor/icons");
|
|
3145
|
+
var import_ui24 = require("@elementor/ui");
|
|
3146
|
+
var import_i18n25 = require("@wordpress/i18n");
|
|
3147
|
+
var JUSTIFY_CONTENT_LABEL = (0, import_i18n25.__)("Justify content", "elementor");
|
|
3148
|
+
var StartIcon4 = (0, import_ui24.withDirection)(import_icons11.JustifyTopIcon);
|
|
3149
|
+
var EndIcon4 = (0, import_ui24.withDirection)(import_icons11.JustifyBottomIcon);
|
|
3535
3150
|
var iconProps4 = {
|
|
3536
3151
|
isClockwise: true,
|
|
3537
3152
|
offset: -90
|
|
@@ -3539,76 +3154,76 @@ var iconProps4 = {
|
|
|
3539
3154
|
var options4 = [
|
|
3540
3155
|
{
|
|
3541
3156
|
value: "flex-start",
|
|
3542
|
-
label: (0,
|
|
3543
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3157
|
+
label: (0, import_i18n25.__)("Start", "elementor"),
|
|
3158
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(RotatedIcon, { icon: StartIcon4, size, ...iconProps4 }),
|
|
3544
3159
|
showTooltip: true
|
|
3545
3160
|
},
|
|
3546
3161
|
{
|
|
3547
3162
|
value: "center",
|
|
3548
|
-
label: (0,
|
|
3549
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3163
|
+
label: (0, import_i18n25.__)("Center", "elementor"),
|
|
3164
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(RotatedIcon, { icon: import_icons11.JustifyCenterIcon, size, ...iconProps4 }),
|
|
3550
3165
|
showTooltip: true
|
|
3551
3166
|
},
|
|
3552
3167
|
{
|
|
3553
3168
|
value: "flex-end",
|
|
3554
|
-
label: (0,
|
|
3555
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3169
|
+
label: (0, import_i18n25.__)("End", "elementor"),
|
|
3170
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(RotatedIcon, { icon: EndIcon4, size, ...iconProps4 }),
|
|
3556
3171
|
showTooltip: true
|
|
3557
3172
|
},
|
|
3558
3173
|
{
|
|
3559
3174
|
value: "space-between",
|
|
3560
|
-
label: (0,
|
|
3561
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3175
|
+
label: (0, import_i18n25.__)("Space between", "elementor"),
|
|
3176
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(RotatedIcon, { icon: import_icons11.JustifySpaceBetweenVerticalIcon, size, ...iconProps4 }),
|
|
3562
3177
|
showTooltip: true
|
|
3563
3178
|
},
|
|
3564
3179
|
{
|
|
3565
3180
|
value: "space-around",
|
|
3566
|
-
label: (0,
|
|
3567
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3181
|
+
label: (0, import_i18n25.__)("Space around", "elementor"),
|
|
3182
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(RotatedIcon, { icon: import_icons11.JustifySpaceAroundVerticalIcon, size, ...iconProps4 }),
|
|
3568
3183
|
showTooltip: true
|
|
3569
3184
|
},
|
|
3570
3185
|
{
|
|
3571
3186
|
value: "space-evenly",
|
|
3572
|
-
label: (0,
|
|
3573
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3187
|
+
label: (0, import_i18n25.__)("Space evenly", "elementor"),
|
|
3188
|
+
renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(RotatedIcon, { icon: import_icons11.JustifyDistributeVerticalIcon, size, ...iconProps4 }),
|
|
3574
3189
|
showTooltip: true
|
|
3575
3190
|
}
|
|
3576
3191
|
];
|
|
3577
|
-
var JustifyContentField = () => /* @__PURE__ */
|
|
3192
|
+
var JustifyContentField = () => /* @__PURE__ */ React40.createElement(StylesField, { bind: "justify-content", propDisplayName: JUSTIFY_CONTENT_LABEL }, /* @__PURE__ */ React40.createElement(UiProviders, null, /* @__PURE__ */ React40.createElement(StylesFieldLayout, { label: JUSTIFY_CONTENT_LABEL, direction: "column" }, /* @__PURE__ */ React40.createElement(import_editor_controls20.ToggleControl, { options: options4, fullWidth: true }))));
|
|
3578
3193
|
|
|
3579
3194
|
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
3580
|
-
var
|
|
3581
|
-
var
|
|
3582
|
-
var
|
|
3583
|
-
var
|
|
3584
|
-
var FLEX_WRAP_LABEL = (0,
|
|
3195
|
+
var React41 = __toESM(require("react"));
|
|
3196
|
+
var import_editor_controls21 = require("@elementor/editor-controls");
|
|
3197
|
+
var import_icons12 = require("@elementor/icons");
|
|
3198
|
+
var import_i18n26 = require("@wordpress/i18n");
|
|
3199
|
+
var FLEX_WRAP_LABEL = (0, import_i18n26.__)("Wrap", "elementor");
|
|
3585
3200
|
var options5 = [
|
|
3586
3201
|
{
|
|
3587
3202
|
value: "nowrap",
|
|
3588
|
-
label: (0,
|
|
3589
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3203
|
+
label: (0, import_i18n26.__)("No wrap", "elementor"),
|
|
3204
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(import_icons12.ArrowRightIcon, { fontSize: size }),
|
|
3590
3205
|
showTooltip: true
|
|
3591
3206
|
},
|
|
3592
3207
|
{
|
|
3593
3208
|
value: "wrap",
|
|
3594
|
-
label: (0,
|
|
3595
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3209
|
+
label: (0, import_i18n26.__)("Wrap", "elementor"),
|
|
3210
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(import_icons12.ArrowBackIcon, { fontSize: size }),
|
|
3596
3211
|
showTooltip: true
|
|
3597
3212
|
},
|
|
3598
3213
|
{
|
|
3599
3214
|
value: "wrap-reverse",
|
|
3600
|
-
label: (0,
|
|
3601
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3215
|
+
label: (0, import_i18n26.__)("Reversed wrap", "elementor"),
|
|
3216
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(import_icons12.ArrowForwardIcon, { fontSize: size }),
|
|
3602
3217
|
showTooltip: true
|
|
3603
3218
|
}
|
|
3604
3219
|
];
|
|
3605
3220
|
var WrapField = () => {
|
|
3606
|
-
return /* @__PURE__ */
|
|
3221
|
+
return /* @__PURE__ */ React41.createElement(StylesField, { bind: "flex-wrap", propDisplayName: FLEX_WRAP_LABEL }, /* @__PURE__ */ React41.createElement(UiProviders, null, /* @__PURE__ */ React41.createElement(StylesFieldLayout, { label: FLEX_WRAP_LABEL }, /* @__PURE__ */ React41.createElement(import_editor_controls21.ToggleControl, { options: options5 }))));
|
|
3607
3222
|
};
|
|
3608
3223
|
|
|
3609
3224
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
3610
|
-
var DISPLAY_LABEL2 = (0,
|
|
3611
|
-
var FLEX_WRAP_LABEL2 = (0,
|
|
3225
|
+
var DISPLAY_LABEL2 = (0, import_i18n27.__)("Display", "elementor");
|
|
3226
|
+
var FLEX_WRAP_LABEL2 = (0, import_i18n27.__)("Flex wrap", "elementor");
|
|
3612
3227
|
var LayoutSection = () => {
|
|
3613
3228
|
const { value: display } = useStylesField("display", {
|
|
3614
3229
|
history: { propDisplayName: DISPLAY_LABEL2 }
|
|
@@ -3619,15 +3234,15 @@ var LayoutSection = () => {
|
|
|
3619
3234
|
const parent = (0, import_editor_elements11.useParentElement)(element.id);
|
|
3620
3235
|
const parentStyle = useComputedStyle(parent?.id || null);
|
|
3621
3236
|
const parentStyleDirection = parentStyle?.flexDirection ?? "row";
|
|
3622
|
-
return /* @__PURE__ */
|
|
3237
|
+
return /* @__PURE__ */ React42.createElement(SectionContent, null, /* @__PURE__ */ React42.createElement(DisplayField, null), isDisplayFlex && /* @__PURE__ */ React42.createElement(FlexFields, null), "flex" === parentStyle?.display && /* @__PURE__ */ React42.createElement(FlexChildFields, { parentStyleDirection }));
|
|
3623
3238
|
};
|
|
3624
3239
|
var FlexFields = () => {
|
|
3625
3240
|
const { value: flexWrap } = useStylesField("flex-wrap", {
|
|
3626
3241
|
history: { propDisplayName: FLEX_WRAP_LABEL2 }
|
|
3627
3242
|
});
|
|
3628
|
-
return /* @__PURE__ */
|
|
3243
|
+
return /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(FlexDirectionField, null), /* @__PURE__ */ React42.createElement(JustifyContentField, null), /* @__PURE__ */ React42.createElement(AlignItemsField, null), /* @__PURE__ */ React42.createElement(PanelDivider, null), /* @__PURE__ */ React42.createElement(GapControlField, null), /* @__PURE__ */ React42.createElement(WrapField, null), ["wrap", "wrap-reverse"].includes(flexWrap?.value) && /* @__PURE__ */ React42.createElement(AlignContentField, null));
|
|
3629
3244
|
};
|
|
3630
|
-
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */
|
|
3245
|
+
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(PanelDivider, null), /* @__PURE__ */ React42.createElement(import_editor_controls22.ControlFormLabel, null, (0, import_i18n27.__)("Flex child", "elementor")), /* @__PURE__ */ React42.createElement(AlignSelfChild, { parentStyleDirection }), /* @__PURE__ */ React42.createElement(FlexOrderField, null), /* @__PURE__ */ React42.createElement(FlexSizeField, null));
|
|
3631
3246
|
var shouldDisplayFlexFields = (display, local) => {
|
|
3632
3247
|
const value = display?.value ?? local?.value;
|
|
3633
3248
|
if (!value) {
|
|
@@ -3637,38 +3252,38 @@ var shouldDisplayFlexFields = (display, local) => {
|
|
|
3637
3252
|
};
|
|
3638
3253
|
|
|
3639
3254
|
// src/components/style-sections/position-section/position-section.tsx
|
|
3640
|
-
var
|
|
3255
|
+
var React47 = __toESM(require("react"));
|
|
3641
3256
|
var import_session4 = require("@elementor/session");
|
|
3642
|
-
var
|
|
3257
|
+
var import_i18n32 = require("@wordpress/i18n");
|
|
3643
3258
|
|
|
3644
3259
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
3645
|
-
var
|
|
3646
|
-
var
|
|
3647
|
-
var
|
|
3648
|
-
var
|
|
3649
|
-
var
|
|
3650
|
-
var
|
|
3651
|
-
var InlineStartIcon2 = (0,
|
|
3652
|
-
var InlineEndIcon2 = (0,
|
|
3260
|
+
var React43 = __toESM(require("react"));
|
|
3261
|
+
var import_react23 = require("react");
|
|
3262
|
+
var import_editor_controls23 = require("@elementor/editor-controls");
|
|
3263
|
+
var import_icons13 = require("@elementor/icons");
|
|
3264
|
+
var import_ui25 = require("@elementor/ui");
|
|
3265
|
+
var import_i18n28 = require("@wordpress/i18n");
|
|
3266
|
+
var InlineStartIcon2 = (0, import_ui25.withDirection)(import_icons13.SideLeftIcon);
|
|
3267
|
+
var InlineEndIcon2 = (0, import_ui25.withDirection)(import_icons13.SideRightIcon);
|
|
3653
3268
|
var sideIcons = {
|
|
3654
|
-
"inset-block-start": /* @__PURE__ */
|
|
3655
|
-
"inset-block-end": /* @__PURE__ */
|
|
3656
|
-
"inset-inline-start": /* @__PURE__ */
|
|
3657
|
-
"inset-inline-end": /* @__PURE__ */
|
|
3269
|
+
"inset-block-start": /* @__PURE__ */ React43.createElement(import_icons13.SideTopIcon, { fontSize: "tiny" }),
|
|
3270
|
+
"inset-block-end": /* @__PURE__ */ React43.createElement(import_icons13.SideBottomIcon, { fontSize: "tiny" }),
|
|
3271
|
+
"inset-inline-start": /* @__PURE__ */ React43.createElement(RotatedIcon, { icon: InlineStartIcon2, size: "tiny" }),
|
|
3272
|
+
"inset-inline-end": /* @__PURE__ */ React43.createElement(RotatedIcon, { icon: InlineEndIcon2, size: "tiny" })
|
|
3658
3273
|
};
|
|
3659
|
-
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? (0,
|
|
3660
|
-
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? (0,
|
|
3274
|
+
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n28.__)("Right", "elementor") : (0, import_i18n28.__)("Left", "elementor");
|
|
3275
|
+
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n28.__)("Left", "elementor") : (0, import_i18n28.__)("Right", "elementor");
|
|
3661
3276
|
var DimensionsField = () => {
|
|
3662
3277
|
const { isSiteRtl } = useDirection();
|
|
3663
|
-
const rowRefs = [(0,
|
|
3664
|
-
return /* @__PURE__ */
|
|
3278
|
+
const rowRefs = [(0, import_react23.useRef)(null), (0, import_react23.useRef)(null)];
|
|
3279
|
+
return /* @__PURE__ */ React43.createElement(UiProviders, null, /* @__PURE__ */ React43.createElement(import_ui25.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", ref: rowRefs[0] }, /* @__PURE__ */ React43.createElement(DimensionField, { side: "inset-block-start", label: (0, import_i18n28.__)("Top", "elementor"), rowRef: rowRefs[0] }), /* @__PURE__ */ React43.createElement(
|
|
3665
3280
|
DimensionField,
|
|
3666
3281
|
{
|
|
3667
3282
|
side: "inset-inline-end",
|
|
3668
3283
|
label: getInlineEndLabel(isSiteRtl),
|
|
3669
3284
|
rowRef: rowRefs[0]
|
|
3670
3285
|
}
|
|
3671
|
-
)), /* @__PURE__ */
|
|
3286
|
+
)), /* @__PURE__ */ React43.createElement(import_ui25.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", ref: rowRefs[1] }, /* @__PURE__ */ React43.createElement(DimensionField, { side: "inset-block-end", label: (0, import_i18n28.__)("Bottom", "elementor"), rowRef: rowRefs[1] }), /* @__PURE__ */ React43.createElement(
|
|
3672
3287
|
DimensionField,
|
|
3673
3288
|
{
|
|
3674
3289
|
side: "inset-inline-start",
|
|
@@ -3681,8 +3296,8 @@ var DimensionField = ({
|
|
|
3681
3296
|
side,
|
|
3682
3297
|
label,
|
|
3683
3298
|
rowRef
|
|
3684
|
-
}) => /* @__PURE__ */
|
|
3685
|
-
|
|
3299
|
+
}) => /* @__PURE__ */ React43.createElement(StylesField, { bind: side, propDisplayName: label }, /* @__PURE__ */ React43.createElement(import_ui25.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React43.createElement(import_ui25.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React43.createElement(ControlLabel, null, label)), /* @__PURE__ */ React43.createElement(import_ui25.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React43.createElement(
|
|
3300
|
+
import_editor_controls23.SizeControl,
|
|
3686
3301
|
{
|
|
3687
3302
|
startIcon: sideIcons[side],
|
|
3688
3303
|
extendedOptions: ["auto"],
|
|
@@ -3692,45 +3307,45 @@ var DimensionField = ({
|
|
|
3692
3307
|
))));
|
|
3693
3308
|
|
|
3694
3309
|
// src/components/style-sections/position-section/offset-field.tsx
|
|
3695
|
-
var
|
|
3696
|
-
var
|
|
3697
|
-
var
|
|
3698
|
-
var
|
|
3699
|
-
var OFFSET_LABEL = (0,
|
|
3310
|
+
var React44 = __toESM(require("react"));
|
|
3311
|
+
var import_react24 = require("react");
|
|
3312
|
+
var import_editor_controls24 = require("@elementor/editor-controls");
|
|
3313
|
+
var import_i18n29 = require("@wordpress/i18n");
|
|
3314
|
+
var OFFSET_LABEL = (0, import_i18n29.__)("Anchor offset", "elementor");
|
|
3700
3315
|
var UNITS = ["px", "em", "rem", "vw", "vh"];
|
|
3701
3316
|
var OffsetField = () => {
|
|
3702
|
-
const rowRef = (0,
|
|
3703
|
-
return /* @__PURE__ */
|
|
3317
|
+
const rowRef = (0, import_react24.useRef)(null);
|
|
3318
|
+
return /* @__PURE__ */ React44.createElement(StylesField, { bind: "scroll-margin-top", propDisplayName: OFFSET_LABEL }, /* @__PURE__ */ React44.createElement(StylesFieldLayout, { label: OFFSET_LABEL, ref: rowRef }, /* @__PURE__ */ React44.createElement(import_editor_controls24.SizeControl, { units: UNITS, anchorRef: rowRef })));
|
|
3704
3319
|
};
|
|
3705
3320
|
|
|
3706
3321
|
// src/components/style-sections/position-section/position-field.tsx
|
|
3707
|
-
var
|
|
3708
|
-
var
|
|
3709
|
-
var
|
|
3710
|
-
var POSITION_LABEL = (0,
|
|
3322
|
+
var React45 = __toESM(require("react"));
|
|
3323
|
+
var import_editor_controls25 = require("@elementor/editor-controls");
|
|
3324
|
+
var import_i18n30 = require("@wordpress/i18n");
|
|
3325
|
+
var POSITION_LABEL = (0, import_i18n30.__)("Position", "elementor");
|
|
3711
3326
|
var positionOptions = [
|
|
3712
|
-
{ label: (0,
|
|
3713
|
-
{ label: (0,
|
|
3714
|
-
{ label: (0,
|
|
3715
|
-
{ label: (0,
|
|
3716
|
-
{ label: (0,
|
|
3327
|
+
{ label: (0, import_i18n30.__)("Static", "elementor"), value: "static" },
|
|
3328
|
+
{ label: (0, import_i18n30.__)("Relative", "elementor"), value: "relative" },
|
|
3329
|
+
{ label: (0, import_i18n30.__)("Absolute", "elementor"), value: "absolute" },
|
|
3330
|
+
{ label: (0, import_i18n30.__)("Fixed", "elementor"), value: "fixed" },
|
|
3331
|
+
{ label: (0, import_i18n30.__)("Sticky", "elementor"), value: "sticky" }
|
|
3717
3332
|
];
|
|
3718
3333
|
var PositionField = ({ onChange }) => {
|
|
3719
|
-
return /* @__PURE__ */
|
|
3334
|
+
return /* @__PURE__ */ React45.createElement(StylesField, { bind: "position", propDisplayName: POSITION_LABEL }, /* @__PURE__ */ React45.createElement(StylesFieldLayout, { label: POSITION_LABEL }, /* @__PURE__ */ React45.createElement(import_editor_controls25.SelectControl, { options: positionOptions, onChange })));
|
|
3720
3335
|
};
|
|
3721
3336
|
|
|
3722
3337
|
// src/components/style-sections/position-section/z-index-field.tsx
|
|
3723
|
-
var
|
|
3724
|
-
var
|
|
3725
|
-
var
|
|
3726
|
-
var Z_INDEX_LABEL = (0,
|
|
3338
|
+
var React46 = __toESM(require("react"));
|
|
3339
|
+
var import_editor_controls26 = require("@elementor/editor-controls");
|
|
3340
|
+
var import_i18n31 = require("@wordpress/i18n");
|
|
3341
|
+
var Z_INDEX_LABEL = (0, import_i18n31.__)("Z-index", "elementor");
|
|
3727
3342
|
var ZIndexField = () => {
|
|
3728
|
-
return /* @__PURE__ */
|
|
3343
|
+
return /* @__PURE__ */ React46.createElement(StylesField, { bind: "z-index", propDisplayName: Z_INDEX_LABEL }, /* @__PURE__ */ React46.createElement(StylesFieldLayout, { label: Z_INDEX_LABEL }, /* @__PURE__ */ React46.createElement(import_editor_controls26.NumberControl, null)));
|
|
3729
3344
|
};
|
|
3730
3345
|
|
|
3731
3346
|
// src/components/style-sections/position-section/position-section.tsx
|
|
3732
|
-
var POSITION_LABEL2 = (0,
|
|
3733
|
-
var DIMENSIONS_LABEL = (0,
|
|
3347
|
+
var POSITION_LABEL2 = (0, import_i18n32.__)("Position", "elementor");
|
|
3348
|
+
var DIMENSIONS_LABEL = (0, import_i18n32.__)("Dimensions", "elementor");
|
|
3734
3349
|
var PositionSection = () => {
|
|
3735
3350
|
const { value: positionValue } = useStylesField("position", {
|
|
3736
3351
|
history: { propDisplayName: POSITION_LABEL2 }
|
|
@@ -3765,7 +3380,7 @@ var PositionSection = () => {
|
|
|
3765
3380
|
}
|
|
3766
3381
|
};
|
|
3767
3382
|
const isNotStatic = positionValue && positionValue?.value !== "static";
|
|
3768
|
-
return /* @__PURE__ */
|
|
3383
|
+
return /* @__PURE__ */ React47.createElement(SectionContent, null, /* @__PURE__ */ React47.createElement(PositionField, { onChange: onPositionChange }), isNotStatic ? /* @__PURE__ */ React47.createElement(React47.Fragment, null, /* @__PURE__ */ React47.createElement(DimensionsField, null), /* @__PURE__ */ React47.createElement(ZIndexField, null)) : null, /* @__PURE__ */ React47.createElement(PanelDivider, null), /* @__PURE__ */ React47.createElement(OffsetField, null));
|
|
3769
3384
|
};
|
|
3770
3385
|
var usePersistDimensions = () => {
|
|
3771
3386
|
const { id: styleDefID, meta } = useStyle();
|
|
@@ -3775,25 +3390,25 @@ var usePersistDimensions = () => {
|
|
|
3775
3390
|
};
|
|
3776
3391
|
|
|
3777
3392
|
// src/components/style-sections/size-section/size-section.tsx
|
|
3778
|
-
var
|
|
3779
|
-
var
|
|
3780
|
-
var
|
|
3781
|
-
var
|
|
3782
|
-
var
|
|
3393
|
+
var React53 = __toESM(require("react"));
|
|
3394
|
+
var import_react26 = require("react");
|
|
3395
|
+
var import_editor_controls29 = require("@elementor/editor-controls");
|
|
3396
|
+
var import_ui29 = require("@elementor/ui");
|
|
3397
|
+
var import_i18n37 = require("@wordpress/i18n");
|
|
3783
3398
|
|
|
3784
3399
|
// src/components/style-tab-collapsible-content.tsx
|
|
3785
|
-
var
|
|
3400
|
+
var React50 = __toESM(require("react"));
|
|
3786
3401
|
|
|
3787
3402
|
// src/styles-inheritance/components/styles-inheritance-section-indicators.tsx
|
|
3788
|
-
var
|
|
3789
|
-
var
|
|
3790
|
-
var
|
|
3791
|
-
var
|
|
3403
|
+
var React48 = __toESM(require("react"));
|
|
3404
|
+
var import_editor_styles_repository12 = require("@elementor/editor-styles-repository");
|
|
3405
|
+
var import_ui26 = require("@elementor/ui");
|
|
3406
|
+
var import_i18n33 = require("@wordpress/i18n");
|
|
3792
3407
|
var StylesInheritanceSectionIndicators = ({ fields }) => {
|
|
3793
3408
|
const { id, meta, provider } = useStyle();
|
|
3794
3409
|
const snapshot = useStylesInheritanceSnapshot();
|
|
3795
3410
|
if (fields.includes("custom_css")) {
|
|
3796
|
-
return /* @__PURE__ */
|
|
3411
|
+
return /* @__PURE__ */ React48.createElement(CustomCssIndicator, null);
|
|
3797
3412
|
}
|
|
3798
3413
|
const snapshotFields = Object.fromEntries(
|
|
3799
3414
|
Object.entries(snapshot ?? {}).filter(([key]) => fields.includes(key))
|
|
@@ -3802,17 +3417,17 @@ var StylesInheritanceSectionIndicators = ({ fields }) => {
|
|
|
3802
3417
|
if (!hasValues && !hasOverrides) {
|
|
3803
3418
|
return null;
|
|
3804
3419
|
}
|
|
3805
|
-
const hasValueLabel = (0,
|
|
3806
|
-
const hasOverridesLabel = (0,
|
|
3807
|
-
return /* @__PURE__ */
|
|
3420
|
+
const hasValueLabel = (0, import_i18n33.__)("Has effective styles", "elementor");
|
|
3421
|
+
const hasOverridesLabel = (0, import_i18n33.__)("Has overridden styles", "elementor");
|
|
3422
|
+
return /* @__PURE__ */ React48.createElement(import_ui26.Tooltip, { title: (0, import_i18n33.__)("Has styles", "elementor"), placement: "top" }, /* @__PURE__ */ React48.createElement(import_ui26.Stack, { direction: "row", sx: { "& > *": { marginInlineStart: -0.25 } }, role: "list" }, hasValues && provider && /* @__PURE__ */ React48.createElement(
|
|
3808
3423
|
StyleIndicator,
|
|
3809
3424
|
{
|
|
3810
3425
|
getColor: getStylesProviderThemeColor(provider.getKey()),
|
|
3811
|
-
"data-variant": (0,
|
|
3426
|
+
"data-variant": (0, import_editor_styles_repository12.isElementsStylesProvider)(provider.getKey()) ? "local" : "global",
|
|
3812
3427
|
role: "listitem",
|
|
3813
3428
|
"aria-label": hasValueLabel
|
|
3814
3429
|
}
|
|
3815
|
-
), hasOverrides && /* @__PURE__ */
|
|
3430
|
+
), hasOverrides && /* @__PURE__ */ React48.createElement(
|
|
3816
3431
|
StyleIndicator,
|
|
3817
3432
|
{
|
|
3818
3433
|
isOverridden: true,
|
|
@@ -3851,15 +3466,15 @@ function getCurrentStyleFromChain(chain, styleId, meta) {
|
|
|
3851
3466
|
}
|
|
3852
3467
|
|
|
3853
3468
|
// src/components/collapsible-content.tsx
|
|
3854
|
-
var
|
|
3855
|
-
var
|
|
3856
|
-
var
|
|
3857
|
-
var
|
|
3469
|
+
var React49 = __toESM(require("react"));
|
|
3470
|
+
var import_react25 = require("react");
|
|
3471
|
+
var import_ui28 = require("@elementor/ui");
|
|
3472
|
+
var import_i18n34 = require("@wordpress/i18n");
|
|
3858
3473
|
|
|
3859
3474
|
// src/components/collapse-icon.tsx
|
|
3860
|
-
var
|
|
3861
|
-
var
|
|
3862
|
-
var CollapseIcon = (0,
|
|
3475
|
+
var import_icons14 = require("@elementor/icons");
|
|
3476
|
+
var import_ui27 = require("@elementor/ui");
|
|
3477
|
+
var CollapseIcon = (0, import_ui27.styled)(import_icons14.ChevronDownIcon, {
|
|
3863
3478
|
shouldForwardProp: (prop) => prop !== "open"
|
|
3864
3479
|
})(({ theme, open }) => ({
|
|
3865
3480
|
transform: open ? "rotate(180deg)" : "rotate(0deg)",
|
|
@@ -3869,7 +3484,7 @@ var CollapseIcon = (0, import_ui32.styled)(import_icons16.ChevronDownIcon, {
|
|
|
3869
3484
|
}));
|
|
3870
3485
|
|
|
3871
3486
|
// src/components/collapsible-content.tsx
|
|
3872
|
-
var IndicatorsWrapper = (0,
|
|
3487
|
+
var IndicatorsWrapper = (0, import_ui28.styled)("div")`
|
|
3873
3488
|
position: absolute;
|
|
3874
3489
|
top: 0;
|
|
3875
3490
|
right: ${({ theme }) => theme.spacing(3)};
|
|
@@ -3880,24 +3495,24 @@ var IndicatorsWrapper = (0, import_ui33.styled)("div")`
|
|
|
3880
3495
|
justify-content: center;
|
|
3881
3496
|
`;
|
|
3882
3497
|
var CollapsibleContent = ({ children, defaultOpen = false, titleEnd = null }) => {
|
|
3883
|
-
const [open, setOpen] = (0,
|
|
3498
|
+
const [open, setOpen] = (0, import_react25.useState)(defaultOpen);
|
|
3884
3499
|
const handleToggle = () => {
|
|
3885
3500
|
setOpen((prevOpen) => !prevOpen);
|
|
3886
3501
|
};
|
|
3887
|
-
return /* @__PURE__ */
|
|
3888
|
-
|
|
3502
|
+
return /* @__PURE__ */ React49.createElement(import_ui28.Stack, null, /* @__PURE__ */ React49.createElement(import_ui28.Stack, { sx: { position: "relative" } }, /* @__PURE__ */ React49.createElement(
|
|
3503
|
+
import_ui28.Button,
|
|
3889
3504
|
{
|
|
3890
3505
|
fullWidth: true,
|
|
3891
3506
|
size: "small",
|
|
3892
3507
|
color: "secondary",
|
|
3893
3508
|
variant: "outlined",
|
|
3894
3509
|
onClick: handleToggle,
|
|
3895
|
-
endIcon: /* @__PURE__ */
|
|
3510
|
+
endIcon: /* @__PURE__ */ React49.createElement(CollapseIcon, { open }),
|
|
3896
3511
|
sx: { my: 0.5 },
|
|
3897
3512
|
"aria-label": open ? "Show less" : "Show more"
|
|
3898
3513
|
},
|
|
3899
|
-
open ? (0,
|
|
3900
|
-
), titleEnd && /* @__PURE__ */
|
|
3514
|
+
open ? (0, import_i18n34.__)("Show less", "elementor") : (0, import_i18n34.__)("Show more", "elementor")
|
|
3515
|
+
), titleEnd && /* @__PURE__ */ React49.createElement(IndicatorsWrapper, null, getCollapsibleValue(titleEnd, open))), /* @__PURE__ */ React49.createElement(import_ui28.Collapse, { in: open, timeout: "auto", unmountOnExit: true }, children));
|
|
3901
3516
|
};
|
|
3902
3517
|
function getCollapsibleValue(value, isOpen) {
|
|
3903
3518
|
if (typeof value === "function") {
|
|
@@ -3908,59 +3523,59 @@ function getCollapsibleValue(value, isOpen) {
|
|
|
3908
3523
|
|
|
3909
3524
|
// src/components/style-tab-collapsible-content.tsx
|
|
3910
3525
|
var StyleTabCollapsibleContent = ({ fields = [], children }) => {
|
|
3911
|
-
return /* @__PURE__ */
|
|
3526
|
+
return /* @__PURE__ */ React50.createElement(CollapsibleContent, { titleEnd: getStylesInheritanceIndicators(fields) }, children);
|
|
3912
3527
|
};
|
|
3913
3528
|
function getStylesInheritanceIndicators(fields) {
|
|
3914
3529
|
if (fields.length === 0) {
|
|
3915
3530
|
return null;
|
|
3916
3531
|
}
|
|
3917
|
-
return (isOpen) => !isOpen ? /* @__PURE__ */
|
|
3532
|
+
return (isOpen) => !isOpen ? /* @__PURE__ */ React50.createElement(StylesInheritanceSectionIndicators, { fields }) : null;
|
|
3918
3533
|
}
|
|
3919
3534
|
|
|
3920
3535
|
// src/components/style-sections/size-section/object-fit-field.tsx
|
|
3921
|
-
var
|
|
3922
|
-
var
|
|
3923
|
-
var
|
|
3924
|
-
var OBJECT_FIT_LABEL = (0,
|
|
3536
|
+
var React51 = __toESM(require("react"));
|
|
3537
|
+
var import_editor_controls27 = require("@elementor/editor-controls");
|
|
3538
|
+
var import_i18n35 = require("@wordpress/i18n");
|
|
3539
|
+
var OBJECT_FIT_LABEL = (0, import_i18n35.__)("Object fit", "elementor");
|
|
3925
3540
|
var positionOptions2 = [
|
|
3926
|
-
{ label: (0,
|
|
3927
|
-
{ label: (0,
|
|
3928
|
-
{ label: (0,
|
|
3929
|
-
{ label: (0,
|
|
3930
|
-
{ label: (0,
|
|
3541
|
+
{ label: (0, import_i18n35.__)("Fill", "elementor"), value: "fill" },
|
|
3542
|
+
{ label: (0, import_i18n35.__)("Cover", "elementor"), value: "cover" },
|
|
3543
|
+
{ label: (0, import_i18n35.__)("Contain", "elementor"), value: "contain" },
|
|
3544
|
+
{ label: (0, import_i18n35.__)("None", "elementor"), value: "none" },
|
|
3545
|
+
{ label: (0, import_i18n35.__)("Scale down", "elementor"), value: "scale-down" }
|
|
3931
3546
|
];
|
|
3932
3547
|
var ObjectFitField = () => {
|
|
3933
|
-
return /* @__PURE__ */
|
|
3548
|
+
return /* @__PURE__ */ React51.createElement(StylesField, { bind: "object-fit", propDisplayName: OBJECT_FIT_LABEL }, /* @__PURE__ */ React51.createElement(StylesFieldLayout, { label: OBJECT_FIT_LABEL }, /* @__PURE__ */ React51.createElement(import_editor_controls27.SelectControl, { options: positionOptions2 })));
|
|
3934
3549
|
};
|
|
3935
3550
|
|
|
3936
3551
|
// src/components/style-sections/size-section/overflow-field.tsx
|
|
3937
|
-
var
|
|
3938
|
-
var
|
|
3939
|
-
var
|
|
3940
|
-
var
|
|
3941
|
-
var OVERFLOW_LABEL = (0,
|
|
3552
|
+
var React52 = __toESM(require("react"));
|
|
3553
|
+
var import_editor_controls28 = require("@elementor/editor-controls");
|
|
3554
|
+
var import_icons15 = require("@elementor/icons");
|
|
3555
|
+
var import_i18n36 = require("@wordpress/i18n");
|
|
3556
|
+
var OVERFLOW_LABEL = (0, import_i18n36.__)("Overflow", "elementor");
|
|
3942
3557
|
var options6 = [
|
|
3943
3558
|
{
|
|
3944
3559
|
value: "visible",
|
|
3945
|
-
label: (0,
|
|
3946
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3560
|
+
label: (0, import_i18n36.__)("Visible", "elementor"),
|
|
3561
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(import_icons15.EyeIcon, { fontSize: size }),
|
|
3947
3562
|
showTooltip: true
|
|
3948
3563
|
},
|
|
3949
3564
|
{
|
|
3950
3565
|
value: "hidden",
|
|
3951
|
-
label: (0,
|
|
3952
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3566
|
+
label: (0, import_i18n36.__)("Hidden", "elementor"),
|
|
3567
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(import_icons15.EyeOffIcon, { fontSize: size }),
|
|
3953
3568
|
showTooltip: true
|
|
3954
3569
|
},
|
|
3955
3570
|
{
|
|
3956
3571
|
value: "auto",
|
|
3957
|
-
label: (0,
|
|
3958
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3572
|
+
label: (0, import_i18n36.__)("Auto", "elementor"),
|
|
3573
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(import_icons15.LetterAIcon, { fontSize: size }),
|
|
3959
3574
|
showTooltip: true
|
|
3960
3575
|
}
|
|
3961
3576
|
];
|
|
3962
3577
|
var OverflowField = () => {
|
|
3963
|
-
return /* @__PURE__ */
|
|
3578
|
+
return /* @__PURE__ */ React52.createElement(StylesField, { bind: "overflow", propDisplayName: OVERFLOW_LABEL }, /* @__PURE__ */ React52.createElement(StylesFieldLayout, { label: OVERFLOW_LABEL }, /* @__PURE__ */ React52.createElement(import_editor_controls28.ToggleControl, { options: options6 })));
|
|
3964
3579
|
};
|
|
3965
3580
|
|
|
3966
3581
|
// src/components/style-sections/size-section/size-section.tsx
|
|
@@ -3968,98 +3583,98 @@ var CssSizeProps = [
|
|
|
3968
3583
|
[
|
|
3969
3584
|
{
|
|
3970
3585
|
bind: "width",
|
|
3971
|
-
label: (0,
|
|
3586
|
+
label: (0, import_i18n37.__)("Width", "elementor")
|
|
3972
3587
|
},
|
|
3973
3588
|
{
|
|
3974
3589
|
bind: "height",
|
|
3975
|
-
label: (0,
|
|
3590
|
+
label: (0, import_i18n37.__)("Height", "elementor")
|
|
3976
3591
|
}
|
|
3977
3592
|
],
|
|
3978
3593
|
[
|
|
3979
3594
|
{
|
|
3980
3595
|
bind: "min-width",
|
|
3981
|
-
label: (0,
|
|
3596
|
+
label: (0, import_i18n37.__)("Min width", "elementor")
|
|
3982
3597
|
},
|
|
3983
3598
|
{
|
|
3984
3599
|
bind: "min-height",
|
|
3985
|
-
label: (0,
|
|
3600
|
+
label: (0, import_i18n37.__)("Min height", "elementor")
|
|
3986
3601
|
}
|
|
3987
3602
|
],
|
|
3988
3603
|
[
|
|
3989
3604
|
{
|
|
3990
3605
|
bind: "max-width",
|
|
3991
|
-
label: (0,
|
|
3606
|
+
label: (0, import_i18n37.__)("Max width", "elementor")
|
|
3992
3607
|
},
|
|
3993
3608
|
{
|
|
3994
3609
|
bind: "max-height",
|
|
3995
|
-
label: (0,
|
|
3610
|
+
label: (0, import_i18n37.__)("Max height", "elementor")
|
|
3996
3611
|
}
|
|
3997
3612
|
]
|
|
3998
3613
|
];
|
|
3999
|
-
var ASPECT_RATIO_LABEL = (0,
|
|
3614
|
+
var ASPECT_RATIO_LABEL = (0, import_i18n37.__)("Aspect Ratio", "elementor");
|
|
4000
3615
|
var SizeSection = () => {
|
|
4001
|
-
const gridRowRefs = [(0,
|
|
4002
|
-
return /* @__PURE__ */
|
|
3616
|
+
const gridRowRefs = [(0, import_react26.useRef)(null), (0, import_react26.useRef)(null), (0, import_react26.useRef)(null)];
|
|
3617
|
+
return /* @__PURE__ */ React53.createElement(SectionContent, null, CssSizeProps.map((row, rowIndex) => /* @__PURE__ */ React53.createElement(import_ui29.Grid, { key: rowIndex, container: true, gap: 2, flexWrap: "nowrap", ref: gridRowRefs[rowIndex] }, row.map((props) => /* @__PURE__ */ React53.createElement(import_ui29.Grid, { item: true, xs: 6, key: props.bind }, /* @__PURE__ */ React53.createElement(SizeField, { ...props, rowRef: gridRowRefs[rowIndex], extendedOptions: ["auto"] }))))), /* @__PURE__ */ React53.createElement(PanelDivider, null), /* @__PURE__ */ React53.createElement(import_ui29.Stack, null, /* @__PURE__ */ React53.createElement(OverflowField, null)), /* @__PURE__ */ React53.createElement(StyleTabCollapsibleContent, { fields: ["aspect-ratio", "object-fit"] }, /* @__PURE__ */ React53.createElement(import_ui29.Stack, { gap: 2, pt: 2 }, /* @__PURE__ */ React53.createElement(StylesField, { bind: "aspect-ratio", propDisplayName: ASPECT_RATIO_LABEL }, /* @__PURE__ */ React53.createElement(import_editor_controls29.AspectRatioControl, { label: ASPECT_RATIO_LABEL })), /* @__PURE__ */ React53.createElement(PanelDivider, null), /* @__PURE__ */ React53.createElement(ObjectFitField, null), /* @__PURE__ */ React53.createElement(StylesField, { bind: "object-position", propDisplayName: (0, import_i18n37.__)("Object position", "elementor") }, /* @__PURE__ */ React53.createElement(import_ui29.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React53.createElement(import_editor_controls29.PositionControl, null))))));
|
|
4003
3618
|
};
|
|
4004
3619
|
var SizeField = ({ label, bind, rowRef, extendedOptions }) => {
|
|
4005
|
-
return /* @__PURE__ */
|
|
3620
|
+
return /* @__PURE__ */ React53.createElement(StylesField, { bind, propDisplayName: label }, /* @__PURE__ */ React53.createElement(import_ui29.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React53.createElement(import_ui29.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React53.createElement(ControlLabel, null, label)), /* @__PURE__ */ React53.createElement(import_ui29.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React53.createElement(import_editor_controls29.SizeControl, { extendedOptions, anchorRef: rowRef }))));
|
|
4006
3621
|
};
|
|
4007
3622
|
|
|
4008
3623
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
4009
|
-
var
|
|
4010
|
-
var
|
|
4011
|
-
var
|
|
4012
|
-
var MARGIN_LABEL = (0,
|
|
4013
|
-
var PADDING_LABEL = (0,
|
|
3624
|
+
var React54 = __toESM(require("react"));
|
|
3625
|
+
var import_editor_controls30 = require("@elementor/editor-controls");
|
|
3626
|
+
var import_i18n38 = require("@wordpress/i18n");
|
|
3627
|
+
var MARGIN_LABEL = (0, import_i18n38.__)("Margin", "elementor");
|
|
3628
|
+
var PADDING_LABEL = (0, import_i18n38.__)("Padding", "elementor");
|
|
4014
3629
|
var SpacingSection = () => {
|
|
4015
3630
|
const { isSiteRtl } = useDirection();
|
|
4016
|
-
return /* @__PURE__ */
|
|
4017
|
-
|
|
3631
|
+
return /* @__PURE__ */ React54.createElement(SectionContent, null, /* @__PURE__ */ React54.createElement(StylesField, { bind: "margin", propDisplayName: MARGIN_LABEL }, /* @__PURE__ */ React54.createElement(
|
|
3632
|
+
import_editor_controls30.LinkedDimensionsControl,
|
|
4018
3633
|
{
|
|
4019
3634
|
label: MARGIN_LABEL,
|
|
4020
3635
|
isSiteRtl,
|
|
4021
3636
|
extendedOptions: ["auto"],
|
|
4022
3637
|
min: -Number.MAX_SAFE_INTEGER
|
|
4023
3638
|
}
|
|
4024
|
-
)), /* @__PURE__ */
|
|
3639
|
+
)), /* @__PURE__ */ React54.createElement(PanelDivider, null), /* @__PURE__ */ React54.createElement(StylesField, { bind: "padding", propDisplayName: PADDING_LABEL }, /* @__PURE__ */ React54.createElement(import_editor_controls30.LinkedDimensionsControl, { label: PADDING_LABEL, isSiteRtl })));
|
|
4025
3640
|
};
|
|
4026
3641
|
|
|
4027
3642
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
4028
|
-
var
|
|
3643
|
+
var React71 = __toESM(require("react"));
|
|
4029
3644
|
|
|
4030
3645
|
// src/components/style-sections/typography-section/column-count-field.tsx
|
|
4031
|
-
var
|
|
4032
|
-
var
|
|
4033
|
-
var
|
|
4034
|
-
var COLUMN_COUNT_LABEL = (0,
|
|
3646
|
+
var React55 = __toESM(require("react"));
|
|
3647
|
+
var import_editor_controls31 = require("@elementor/editor-controls");
|
|
3648
|
+
var import_i18n39 = require("@wordpress/i18n");
|
|
3649
|
+
var COLUMN_COUNT_LABEL = (0, import_i18n39.__)("Columns", "elementor");
|
|
4035
3650
|
var ColumnCountField = () => {
|
|
4036
|
-
return /* @__PURE__ */
|
|
3651
|
+
return /* @__PURE__ */ React55.createElement(StylesField, { bind: "column-count", propDisplayName: COLUMN_COUNT_LABEL }, /* @__PURE__ */ React55.createElement(StylesFieldLayout, { label: COLUMN_COUNT_LABEL }, /* @__PURE__ */ React55.createElement(import_editor_controls31.NumberControl, { shouldForceInt: true, min: 0, step: 1 })));
|
|
4037
3652
|
};
|
|
4038
3653
|
|
|
4039
3654
|
// src/components/style-sections/typography-section/column-gap-field.tsx
|
|
4040
|
-
var
|
|
4041
|
-
var
|
|
4042
|
-
var
|
|
4043
|
-
var
|
|
4044
|
-
var COLUMN_GAP_LABEL = (0,
|
|
3655
|
+
var React56 = __toESM(require("react"));
|
|
3656
|
+
var import_react27 = require("react");
|
|
3657
|
+
var import_editor_controls32 = require("@elementor/editor-controls");
|
|
3658
|
+
var import_i18n40 = require("@wordpress/i18n");
|
|
3659
|
+
var COLUMN_GAP_LABEL = (0, import_i18n40.__)("Column gap", "elementor");
|
|
4045
3660
|
var ColumnGapField = () => {
|
|
4046
|
-
const rowRef = (0,
|
|
4047
|
-
return /* @__PURE__ */
|
|
3661
|
+
const rowRef = (0, import_react27.useRef)(null);
|
|
3662
|
+
return /* @__PURE__ */ React56.createElement(StylesField, { bind: "column-gap", propDisplayName: COLUMN_GAP_LABEL }, /* @__PURE__ */ React56.createElement(StylesFieldLayout, { label: COLUMN_GAP_LABEL, ref: rowRef }, /* @__PURE__ */ React56.createElement(import_editor_controls32.SizeControl, { anchorRef: rowRef })));
|
|
4048
3663
|
};
|
|
4049
3664
|
|
|
4050
3665
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
4051
|
-
var
|
|
4052
|
-
var
|
|
4053
|
-
var
|
|
4054
|
-
var FONT_FAMILY_LABEL = (0,
|
|
3666
|
+
var React57 = __toESM(require("react"));
|
|
3667
|
+
var import_editor_controls33 = require("@elementor/editor-controls");
|
|
3668
|
+
var import_i18n41 = require("@wordpress/i18n");
|
|
3669
|
+
var FONT_FAMILY_LABEL = (0, import_i18n41.__)("Font family", "elementor");
|
|
4055
3670
|
var FontFamilyField = () => {
|
|
4056
3671
|
const fontFamilies = useFontFamilies();
|
|
4057
3672
|
const sectionWidth = useSectionWidth();
|
|
4058
3673
|
if (fontFamilies.length === 0) {
|
|
4059
3674
|
return null;
|
|
4060
3675
|
}
|
|
4061
|
-
return /* @__PURE__ */
|
|
4062
|
-
|
|
3676
|
+
return /* @__PURE__ */ React57.createElement(StylesField, { bind: "font-family", propDisplayName: FONT_FAMILY_LABEL }, /* @__PURE__ */ React57.createElement(StylesFieldLayout, { label: FONT_FAMILY_LABEL }, /* @__PURE__ */ React57.createElement(
|
|
3677
|
+
import_editor_controls33.FontFamilyControl,
|
|
4063
3678
|
{
|
|
4064
3679
|
fontFamilies,
|
|
4065
3680
|
sectionWidth,
|
|
@@ -4069,199 +3684,199 @@ var FontFamilyField = () => {
|
|
|
4069
3684
|
};
|
|
4070
3685
|
|
|
4071
3686
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
4072
|
-
var
|
|
4073
|
-
var
|
|
4074
|
-
var
|
|
4075
|
-
var
|
|
4076
|
-
var FONT_SIZE_LABEL = (0,
|
|
3687
|
+
var React58 = __toESM(require("react"));
|
|
3688
|
+
var import_react28 = require("react");
|
|
3689
|
+
var import_editor_controls34 = require("@elementor/editor-controls");
|
|
3690
|
+
var import_i18n42 = require("@wordpress/i18n");
|
|
3691
|
+
var FONT_SIZE_LABEL = (0, import_i18n42.__)("Font size", "elementor");
|
|
4077
3692
|
var FontSizeField = () => {
|
|
4078
|
-
const rowRef = (0,
|
|
4079
|
-
return /* @__PURE__ */
|
|
3693
|
+
const rowRef = (0, import_react28.useRef)(null);
|
|
3694
|
+
return /* @__PURE__ */ React58.createElement(StylesField, { bind: "font-size", propDisplayName: FONT_SIZE_LABEL }, /* @__PURE__ */ React58.createElement(StylesFieldLayout, { label: FONT_SIZE_LABEL, ref: rowRef }, /* @__PURE__ */ React58.createElement(import_editor_controls34.SizeControl, { anchorRef: rowRef, ariaLabel: FONT_SIZE_LABEL })));
|
|
4080
3695
|
};
|
|
4081
3696
|
|
|
4082
3697
|
// src/components/style-sections/typography-section/font-style-field.tsx
|
|
4083
|
-
var
|
|
4084
|
-
var
|
|
4085
|
-
var
|
|
4086
|
-
var
|
|
4087
|
-
var FONT_STYLE_LABEL = (0,
|
|
3698
|
+
var React59 = __toESM(require("react"));
|
|
3699
|
+
var import_editor_controls35 = require("@elementor/editor-controls");
|
|
3700
|
+
var import_icons16 = require("@elementor/icons");
|
|
3701
|
+
var import_i18n43 = require("@wordpress/i18n");
|
|
3702
|
+
var FONT_STYLE_LABEL = (0, import_i18n43.__)("Font style", "elementor");
|
|
4088
3703
|
var options7 = [
|
|
4089
3704
|
{
|
|
4090
3705
|
value: "normal",
|
|
4091
|
-
label: (0,
|
|
4092
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3706
|
+
label: (0, import_i18n43.__)("Normal", "elementor"),
|
|
3707
|
+
renderContent: ({ size }) => /* @__PURE__ */ React59.createElement(import_icons16.MinusIcon, { fontSize: size }),
|
|
4093
3708
|
showTooltip: true
|
|
4094
3709
|
},
|
|
4095
3710
|
{
|
|
4096
3711
|
value: "italic",
|
|
4097
|
-
label: (0,
|
|
4098
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3712
|
+
label: (0, import_i18n43.__)("Italic", "elementor"),
|
|
3713
|
+
renderContent: ({ size }) => /* @__PURE__ */ React59.createElement(import_icons16.ItalicIcon, { fontSize: size }),
|
|
4099
3714
|
showTooltip: true
|
|
4100
3715
|
}
|
|
4101
3716
|
];
|
|
4102
3717
|
var FontStyleField = () => {
|
|
4103
|
-
return /* @__PURE__ */
|
|
3718
|
+
return /* @__PURE__ */ React59.createElement(StylesField, { bind: "font-style", propDisplayName: FONT_STYLE_LABEL }, /* @__PURE__ */ React59.createElement(StylesFieldLayout, { label: FONT_STYLE_LABEL }, /* @__PURE__ */ React59.createElement(import_editor_controls35.ToggleControl, { options: options7 })));
|
|
4104
3719
|
};
|
|
4105
3720
|
|
|
4106
3721
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
4107
|
-
var
|
|
4108
|
-
var
|
|
4109
|
-
var
|
|
4110
|
-
var FONT_WEIGHT_LABEL = (0,
|
|
3722
|
+
var React60 = __toESM(require("react"));
|
|
3723
|
+
var import_editor_controls36 = require("@elementor/editor-controls");
|
|
3724
|
+
var import_i18n44 = require("@wordpress/i18n");
|
|
3725
|
+
var FONT_WEIGHT_LABEL = (0, import_i18n44.__)("Font weight", "elementor");
|
|
4111
3726
|
var fontWeightOptions = [
|
|
4112
|
-
{ value: "100", label: (0,
|
|
4113
|
-
{ value: "200", label: (0,
|
|
4114
|
-
{ value: "300", label: (0,
|
|
4115
|
-
{ value: "400", label: (0,
|
|
4116
|
-
{ value: "500", label: (0,
|
|
4117
|
-
{ value: "600", label: (0,
|
|
4118
|
-
{ value: "700", label: (0,
|
|
4119
|
-
{ value: "800", label: (0,
|
|
4120
|
-
{ value: "900", label: (0,
|
|
3727
|
+
{ value: "100", label: (0, import_i18n44.__)("100 - Thin", "elementor") },
|
|
3728
|
+
{ value: "200", label: (0, import_i18n44.__)("200 - Extra light", "elementor") },
|
|
3729
|
+
{ value: "300", label: (0, import_i18n44.__)("300 - Light", "elementor") },
|
|
3730
|
+
{ value: "400", label: (0, import_i18n44.__)("400 - Normal", "elementor") },
|
|
3731
|
+
{ value: "500", label: (0, import_i18n44.__)("500 - Medium", "elementor") },
|
|
3732
|
+
{ value: "600", label: (0, import_i18n44.__)("600 - Semi bold", "elementor") },
|
|
3733
|
+
{ value: "700", label: (0, import_i18n44.__)("700 - Bold", "elementor") },
|
|
3734
|
+
{ value: "800", label: (0, import_i18n44.__)("800 - Extra bold", "elementor") },
|
|
3735
|
+
{ value: "900", label: (0, import_i18n44.__)("900 - Black", "elementor") }
|
|
4121
3736
|
];
|
|
4122
3737
|
var FontWeightField = () => {
|
|
4123
|
-
return /* @__PURE__ */
|
|
3738
|
+
return /* @__PURE__ */ React60.createElement(StylesField, { bind: "font-weight", propDisplayName: FONT_WEIGHT_LABEL }, /* @__PURE__ */ React60.createElement(StylesFieldLayout, { label: FONT_WEIGHT_LABEL }, /* @__PURE__ */ React60.createElement(import_editor_controls36.SelectControl, { options: fontWeightOptions })));
|
|
4124
3739
|
};
|
|
4125
3740
|
|
|
4126
3741
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
4127
|
-
var
|
|
4128
|
-
var
|
|
4129
|
-
var
|
|
4130
|
-
var
|
|
4131
|
-
var LETTER_SPACING_LABEL = (0,
|
|
3742
|
+
var React61 = __toESM(require("react"));
|
|
3743
|
+
var import_react29 = require("react");
|
|
3744
|
+
var import_editor_controls37 = require("@elementor/editor-controls");
|
|
3745
|
+
var import_i18n45 = require("@wordpress/i18n");
|
|
3746
|
+
var LETTER_SPACING_LABEL = (0, import_i18n45.__)("Letter spacing", "elementor");
|
|
4132
3747
|
var LetterSpacingField = () => {
|
|
4133
|
-
const rowRef = (0,
|
|
4134
|
-
return /* @__PURE__ */
|
|
3748
|
+
const rowRef = (0, import_react29.useRef)(null);
|
|
3749
|
+
return /* @__PURE__ */ React61.createElement(StylesField, { bind: "letter-spacing", propDisplayName: LETTER_SPACING_LABEL }, /* @__PURE__ */ React61.createElement(StylesFieldLayout, { label: LETTER_SPACING_LABEL, ref: rowRef }, /* @__PURE__ */ React61.createElement(import_editor_controls37.SizeControl, { anchorRef: rowRef, min: -Number.MAX_SAFE_INTEGER })));
|
|
4135
3750
|
};
|
|
4136
3751
|
|
|
4137
3752
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
4138
|
-
var
|
|
4139
|
-
var
|
|
4140
|
-
var
|
|
4141
|
-
var
|
|
4142
|
-
var LINE_HEIGHT_LABEL = (0,
|
|
3753
|
+
var React62 = __toESM(require("react"));
|
|
3754
|
+
var import_react30 = require("react");
|
|
3755
|
+
var import_editor_controls38 = require("@elementor/editor-controls");
|
|
3756
|
+
var import_i18n46 = require("@wordpress/i18n");
|
|
3757
|
+
var LINE_HEIGHT_LABEL = (0, import_i18n46.__)("Line height", "elementor");
|
|
4143
3758
|
var LineHeightField = () => {
|
|
4144
|
-
const rowRef = (0,
|
|
4145
|
-
return /* @__PURE__ */
|
|
3759
|
+
const rowRef = (0, import_react30.useRef)(null);
|
|
3760
|
+
return /* @__PURE__ */ React62.createElement(StylesField, { bind: "line-height", propDisplayName: LINE_HEIGHT_LABEL }, /* @__PURE__ */ React62.createElement(StylesFieldLayout, { label: LINE_HEIGHT_LABEL, ref: rowRef }, /* @__PURE__ */ React62.createElement(import_editor_controls38.SizeControl, { anchorRef: rowRef })));
|
|
4146
3761
|
};
|
|
4147
3762
|
|
|
4148
3763
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
4149
|
-
var
|
|
4150
|
-
var
|
|
4151
|
-
var
|
|
4152
|
-
var
|
|
4153
|
-
var
|
|
4154
|
-
var TEXT_ALIGNMENT_LABEL = (0,
|
|
4155
|
-
var AlignStartIcon = (0,
|
|
4156
|
-
var AlignEndIcon = (0,
|
|
3764
|
+
var React63 = __toESM(require("react"));
|
|
3765
|
+
var import_editor_controls39 = require("@elementor/editor-controls");
|
|
3766
|
+
var import_icons17 = require("@elementor/icons");
|
|
3767
|
+
var import_ui30 = require("@elementor/ui");
|
|
3768
|
+
var import_i18n47 = require("@wordpress/i18n");
|
|
3769
|
+
var TEXT_ALIGNMENT_LABEL = (0, import_i18n47.__)("Text align", "elementor");
|
|
3770
|
+
var AlignStartIcon = (0, import_ui30.withDirection)(import_icons17.AlignLeftIcon);
|
|
3771
|
+
var AlignEndIcon = (0, import_ui30.withDirection)(import_icons17.AlignRightIcon);
|
|
4157
3772
|
var options8 = [
|
|
4158
3773
|
{
|
|
4159
3774
|
value: "start",
|
|
4160
|
-
label: (0,
|
|
4161
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3775
|
+
label: (0, import_i18n47.__)("Start", "elementor"),
|
|
3776
|
+
renderContent: ({ size }) => /* @__PURE__ */ React63.createElement(AlignStartIcon, { fontSize: size }),
|
|
4162
3777
|
showTooltip: true
|
|
4163
3778
|
},
|
|
4164
3779
|
{
|
|
4165
3780
|
value: "center",
|
|
4166
|
-
label: (0,
|
|
4167
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3781
|
+
label: (0, import_i18n47.__)("Center", "elementor"),
|
|
3782
|
+
renderContent: ({ size }) => /* @__PURE__ */ React63.createElement(import_icons17.AlignCenterIcon, { fontSize: size }),
|
|
4168
3783
|
showTooltip: true
|
|
4169
3784
|
},
|
|
4170
3785
|
{
|
|
4171
3786
|
value: "end",
|
|
4172
|
-
label: (0,
|
|
4173
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3787
|
+
label: (0, import_i18n47.__)("End", "elementor"),
|
|
3788
|
+
renderContent: ({ size }) => /* @__PURE__ */ React63.createElement(AlignEndIcon, { fontSize: size }),
|
|
4174
3789
|
showTooltip: true
|
|
4175
3790
|
},
|
|
4176
3791
|
{
|
|
4177
3792
|
value: "justify",
|
|
4178
|
-
label: (0,
|
|
4179
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3793
|
+
label: (0, import_i18n47.__)("Justify", "elementor"),
|
|
3794
|
+
renderContent: ({ size }) => /* @__PURE__ */ React63.createElement(import_icons17.AlignJustifiedIcon, { fontSize: size }),
|
|
4180
3795
|
showTooltip: true
|
|
4181
3796
|
}
|
|
4182
3797
|
];
|
|
4183
3798
|
var TextAlignmentField = () => {
|
|
4184
|
-
return /* @__PURE__ */
|
|
3799
|
+
return /* @__PURE__ */ React63.createElement(StylesField, { bind: "text-align", propDisplayName: TEXT_ALIGNMENT_LABEL }, /* @__PURE__ */ React63.createElement(UiProviders, null, /* @__PURE__ */ React63.createElement(StylesFieldLayout, { label: TEXT_ALIGNMENT_LABEL }, /* @__PURE__ */ React63.createElement(import_editor_controls39.ToggleControl, { options: options8 }))));
|
|
4185
3800
|
};
|
|
4186
3801
|
|
|
4187
3802
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
4188
|
-
var
|
|
4189
|
-
var
|
|
4190
|
-
var
|
|
4191
|
-
var TEXT_COLOR_LABEL = (0,
|
|
3803
|
+
var React64 = __toESM(require("react"));
|
|
3804
|
+
var import_editor_controls40 = require("@elementor/editor-controls");
|
|
3805
|
+
var import_i18n48 = require("@wordpress/i18n");
|
|
3806
|
+
var TEXT_COLOR_LABEL = (0, import_i18n48.__)("Text color", "elementor");
|
|
4192
3807
|
var TextColorField = () => {
|
|
4193
|
-
return /* @__PURE__ */
|
|
3808
|
+
return /* @__PURE__ */ React64.createElement(StylesField, { bind: "color", propDisplayName: TEXT_COLOR_LABEL }, /* @__PURE__ */ React64.createElement(StylesFieldLayout, { label: TEXT_COLOR_LABEL }, /* @__PURE__ */ React64.createElement(import_editor_controls40.ColorControl, { id: "text-color-control" })));
|
|
4194
3809
|
};
|
|
4195
3810
|
|
|
4196
3811
|
// src/components/style-sections/typography-section/text-decoration-field.tsx
|
|
4197
|
-
var
|
|
4198
|
-
var
|
|
4199
|
-
var
|
|
4200
|
-
var
|
|
4201
|
-
var TEXT_DECORATION_LABEL = (0,
|
|
3812
|
+
var React65 = __toESM(require("react"));
|
|
3813
|
+
var import_editor_controls41 = require("@elementor/editor-controls");
|
|
3814
|
+
var import_icons18 = require("@elementor/icons");
|
|
3815
|
+
var import_i18n49 = require("@wordpress/i18n");
|
|
3816
|
+
var TEXT_DECORATION_LABEL = (0, import_i18n49.__)("Line decoration", "elementor");
|
|
4202
3817
|
var options9 = [
|
|
4203
3818
|
{
|
|
4204
3819
|
value: "none",
|
|
4205
|
-
label: (0,
|
|
4206
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3820
|
+
label: (0, import_i18n49.__)("None", "elementor"),
|
|
3821
|
+
renderContent: ({ size }) => /* @__PURE__ */ React65.createElement(import_icons18.MinusIcon, { fontSize: size }),
|
|
4207
3822
|
showTooltip: true,
|
|
4208
3823
|
exclusive: true
|
|
4209
3824
|
},
|
|
4210
3825
|
{
|
|
4211
3826
|
value: "underline",
|
|
4212
|
-
label: (0,
|
|
4213
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3827
|
+
label: (0, import_i18n49.__)("Underline", "elementor"),
|
|
3828
|
+
renderContent: ({ size }) => /* @__PURE__ */ React65.createElement(import_icons18.UnderlineIcon, { fontSize: size }),
|
|
4214
3829
|
showTooltip: true
|
|
4215
3830
|
},
|
|
4216
3831
|
{
|
|
4217
3832
|
value: "line-through",
|
|
4218
|
-
label: (0,
|
|
4219
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3833
|
+
label: (0, import_i18n49.__)("Line-through", "elementor"),
|
|
3834
|
+
renderContent: ({ size }) => /* @__PURE__ */ React65.createElement(import_icons18.StrikethroughIcon, { fontSize: size }),
|
|
4220
3835
|
showTooltip: true
|
|
4221
3836
|
},
|
|
4222
3837
|
{
|
|
4223
3838
|
value: "overline",
|
|
4224
|
-
label: (0,
|
|
4225
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3839
|
+
label: (0, import_i18n49.__)("Overline", "elementor"),
|
|
3840
|
+
renderContent: ({ size }) => /* @__PURE__ */ React65.createElement(import_icons18.OverlineIcon, { fontSize: size }),
|
|
4226
3841
|
showTooltip: true
|
|
4227
3842
|
}
|
|
4228
3843
|
];
|
|
4229
|
-
var TextDecorationField = () => /* @__PURE__ */
|
|
3844
|
+
var TextDecorationField = () => /* @__PURE__ */ React65.createElement(StylesField, { bind: "text-decoration", propDisplayName: TEXT_DECORATION_LABEL }, /* @__PURE__ */ React65.createElement(StylesFieldLayout, { label: TEXT_DECORATION_LABEL }, /* @__PURE__ */ React65.createElement(import_editor_controls41.ToggleControl, { options: options9, exclusive: false })));
|
|
4230
3845
|
|
|
4231
3846
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
4232
|
-
var
|
|
4233
|
-
var
|
|
4234
|
-
var
|
|
4235
|
-
var
|
|
4236
|
-
var TEXT_DIRECTION_LABEL = (0,
|
|
3847
|
+
var React66 = __toESM(require("react"));
|
|
3848
|
+
var import_editor_controls42 = require("@elementor/editor-controls");
|
|
3849
|
+
var import_icons19 = require("@elementor/icons");
|
|
3850
|
+
var import_i18n50 = require("@wordpress/i18n");
|
|
3851
|
+
var TEXT_DIRECTION_LABEL = (0, import_i18n50.__)("Direction", "elementor");
|
|
4237
3852
|
var options10 = [
|
|
4238
3853
|
{
|
|
4239
3854
|
value: "ltr",
|
|
4240
|
-
label: (0,
|
|
4241
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3855
|
+
label: (0, import_i18n50.__)("Left to right", "elementor"),
|
|
3856
|
+
renderContent: ({ size }) => /* @__PURE__ */ React66.createElement(import_icons19.TextDirectionLtrIcon, { fontSize: size }),
|
|
4242
3857
|
showTooltip: true
|
|
4243
3858
|
},
|
|
4244
3859
|
{
|
|
4245
3860
|
value: "rtl",
|
|
4246
|
-
label: (0,
|
|
4247
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3861
|
+
label: (0, import_i18n50.__)("Right to left", "elementor"),
|
|
3862
|
+
renderContent: ({ size }) => /* @__PURE__ */ React66.createElement(import_icons19.TextDirectionRtlIcon, { fontSize: size }),
|
|
4248
3863
|
showTooltip: true
|
|
4249
3864
|
}
|
|
4250
3865
|
];
|
|
4251
3866
|
var TextDirectionField = () => {
|
|
4252
|
-
return /* @__PURE__ */
|
|
3867
|
+
return /* @__PURE__ */ React66.createElement(StylesField, { bind: "direction", propDisplayName: TEXT_DIRECTION_LABEL }, /* @__PURE__ */ React66.createElement(StylesFieldLayout, { label: TEXT_DIRECTION_LABEL }, /* @__PURE__ */ React66.createElement(import_editor_controls42.ToggleControl, { options: options10 })));
|
|
4253
3868
|
};
|
|
4254
3869
|
|
|
4255
3870
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
4256
|
-
var
|
|
4257
|
-
var
|
|
4258
|
-
var
|
|
3871
|
+
var React68 = __toESM(require("react"));
|
|
3872
|
+
var import_editor_controls43 = require("@elementor/editor-controls");
|
|
3873
|
+
var import_i18n51 = require("@wordpress/i18n");
|
|
4259
3874
|
|
|
4260
3875
|
// src/components/add-or-remove-content.tsx
|
|
4261
|
-
var
|
|
4262
|
-
var
|
|
4263
|
-
var
|
|
4264
|
-
var
|
|
3876
|
+
var React67 = __toESM(require("react"));
|
|
3877
|
+
var import_icons20 = require("@elementor/icons");
|
|
3878
|
+
var import_ui31 = require("@elementor/ui");
|
|
3879
|
+
var SIZE = "tiny";
|
|
4265
3880
|
var AddOrRemoveContent = ({
|
|
4266
3881
|
isAdded,
|
|
4267
3882
|
onAdd,
|
|
@@ -4270,8 +3885,8 @@ var AddOrRemoveContent = ({
|
|
|
4270
3885
|
disabled,
|
|
4271
3886
|
renderLabel
|
|
4272
3887
|
}) => {
|
|
4273
|
-
return /* @__PURE__ */
|
|
4274
|
-
|
|
3888
|
+
return /* @__PURE__ */ React67.createElement(SectionContent, null, /* @__PURE__ */ React67.createElement(
|
|
3889
|
+
import_ui31.Stack,
|
|
4275
3890
|
{
|
|
4276
3891
|
direction: "row",
|
|
4277
3892
|
sx: {
|
|
@@ -4281,8 +3896,8 @@ var AddOrRemoveContent = ({
|
|
|
4281
3896
|
}
|
|
4282
3897
|
},
|
|
4283
3898
|
renderLabel(),
|
|
4284
|
-
isAdded ? /* @__PURE__ */
|
|
4285
|
-
), /* @__PURE__ */
|
|
3899
|
+
isAdded ? /* @__PURE__ */ React67.createElement(import_ui31.IconButton, { size: SIZE, onClick: onRemove, "aria-label": "Remove", disabled }, /* @__PURE__ */ React67.createElement(import_icons20.MinusIcon, { fontSize: SIZE })) : /* @__PURE__ */ React67.createElement(import_ui31.IconButton, { size: SIZE, onClick: onAdd, "aria-label": "Add", disabled }, /* @__PURE__ */ React67.createElement(import_icons20.PlusIcon, { fontSize: SIZE }))
|
|
3900
|
+
), /* @__PURE__ */ React67.createElement(import_ui31.Collapse, { in: isAdded, unmountOnExit: true }, /* @__PURE__ */ React67.createElement(SectionContent, null, children)));
|
|
4286
3901
|
};
|
|
4287
3902
|
|
|
4288
3903
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
@@ -4302,7 +3917,7 @@ var initTextStroke = {
|
|
|
4302
3917
|
}
|
|
4303
3918
|
}
|
|
4304
3919
|
};
|
|
4305
|
-
var TEXT_STROKE_LABEL = (0,
|
|
3920
|
+
var TEXT_STROKE_LABEL = (0, import_i18n51.__)("Text stroke", "elementor");
|
|
4306
3921
|
var TextStrokeField = () => {
|
|
4307
3922
|
const { value, setValue, canEdit } = useStylesField("stroke", {
|
|
4308
3923
|
history: { propDisplayName: TEXT_STROKE_LABEL }
|
|
@@ -4314,67 +3929,67 @@ var TextStrokeField = () => {
|
|
|
4314
3929
|
setValue(null);
|
|
4315
3930
|
};
|
|
4316
3931
|
const hasTextStroke = Boolean(value);
|
|
4317
|
-
return /* @__PURE__ */
|
|
3932
|
+
return /* @__PURE__ */ React68.createElement(StylesField, { bind: "stroke", propDisplayName: TEXT_STROKE_LABEL }, /* @__PURE__ */ React68.createElement(
|
|
4318
3933
|
AddOrRemoveContent,
|
|
4319
3934
|
{
|
|
4320
3935
|
isAdded: hasTextStroke,
|
|
4321
3936
|
onAdd: addTextStroke,
|
|
4322
3937
|
onRemove: removeTextStroke,
|
|
4323
3938
|
disabled: !canEdit,
|
|
4324
|
-
renderLabel: () => /* @__PURE__ */
|
|
3939
|
+
renderLabel: () => /* @__PURE__ */ React68.createElement(ControlLabel, null, TEXT_STROKE_LABEL)
|
|
4325
3940
|
},
|
|
4326
|
-
/* @__PURE__ */
|
|
3941
|
+
/* @__PURE__ */ React68.createElement(import_editor_controls43.StrokeControl, null)
|
|
4327
3942
|
));
|
|
4328
3943
|
};
|
|
4329
3944
|
|
|
4330
3945
|
// src/components/style-sections/typography-section/transform-field.tsx
|
|
4331
|
-
var
|
|
4332
|
-
var
|
|
4333
|
-
var
|
|
4334
|
-
var
|
|
4335
|
-
var TEXT_TRANSFORM_LABEL = (0,
|
|
3946
|
+
var React69 = __toESM(require("react"));
|
|
3947
|
+
var import_editor_controls44 = require("@elementor/editor-controls");
|
|
3948
|
+
var import_icons21 = require("@elementor/icons");
|
|
3949
|
+
var import_i18n52 = require("@wordpress/i18n");
|
|
3950
|
+
var TEXT_TRANSFORM_LABEL = (0, import_i18n52.__)("Text transform", "elementor");
|
|
4336
3951
|
var options11 = [
|
|
4337
3952
|
{
|
|
4338
3953
|
value: "none",
|
|
4339
|
-
label: (0,
|
|
4340
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3954
|
+
label: (0, import_i18n52.__)("None", "elementor"),
|
|
3955
|
+
renderContent: ({ size }) => /* @__PURE__ */ React69.createElement(import_icons21.MinusIcon, { fontSize: size }),
|
|
4341
3956
|
showTooltip: true
|
|
4342
3957
|
},
|
|
4343
3958
|
{
|
|
4344
3959
|
value: "capitalize",
|
|
4345
|
-
label: (0,
|
|
4346
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3960
|
+
label: (0, import_i18n52.__)("Capitalize", "elementor"),
|
|
3961
|
+
renderContent: ({ size }) => /* @__PURE__ */ React69.createElement(import_icons21.LetterCaseIcon, { fontSize: size }),
|
|
4347
3962
|
showTooltip: true
|
|
4348
3963
|
},
|
|
4349
3964
|
{
|
|
4350
3965
|
value: "uppercase",
|
|
4351
|
-
label: (0,
|
|
4352
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3966
|
+
label: (0, import_i18n52.__)("Uppercase", "elementor"),
|
|
3967
|
+
renderContent: ({ size }) => /* @__PURE__ */ React69.createElement(import_icons21.LetterCaseUpperIcon, { fontSize: size }),
|
|
4353
3968
|
showTooltip: true
|
|
4354
3969
|
},
|
|
4355
3970
|
{
|
|
4356
3971
|
value: "lowercase",
|
|
4357
|
-
label: (0,
|
|
4358
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3972
|
+
label: (0, import_i18n52.__)("Lowercase", "elementor"),
|
|
3973
|
+
renderContent: ({ size }) => /* @__PURE__ */ React69.createElement(import_icons21.LetterCaseLowerIcon, { fontSize: size }),
|
|
4359
3974
|
showTooltip: true
|
|
4360
3975
|
}
|
|
4361
3976
|
];
|
|
4362
|
-
var TransformField = () => /* @__PURE__ */
|
|
3977
|
+
var TransformField = () => /* @__PURE__ */ React69.createElement(StylesField, { bind: "text-transform", propDisplayName: TEXT_TRANSFORM_LABEL }, /* @__PURE__ */ React69.createElement(StylesFieldLayout, { label: TEXT_TRANSFORM_LABEL }, /* @__PURE__ */ React69.createElement(import_editor_controls44.ToggleControl, { options: options11 })));
|
|
4363
3978
|
|
|
4364
3979
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
4365
|
-
var
|
|
4366
|
-
var
|
|
4367
|
-
var
|
|
4368
|
-
var
|
|
4369
|
-
var WORD_SPACING_LABEL = (0,
|
|
3980
|
+
var React70 = __toESM(require("react"));
|
|
3981
|
+
var import_react31 = require("react");
|
|
3982
|
+
var import_editor_controls45 = require("@elementor/editor-controls");
|
|
3983
|
+
var import_i18n53 = require("@wordpress/i18n");
|
|
3984
|
+
var WORD_SPACING_LABEL = (0, import_i18n53.__)("Word spacing", "elementor");
|
|
4370
3985
|
var WordSpacingField = () => {
|
|
4371
|
-
const rowRef = (0,
|
|
4372
|
-
return /* @__PURE__ */
|
|
3986
|
+
const rowRef = (0, import_react31.useRef)(null);
|
|
3987
|
+
return /* @__PURE__ */ React70.createElement(StylesField, { bind: "word-spacing", propDisplayName: WORD_SPACING_LABEL }, /* @__PURE__ */ React70.createElement(StylesFieldLayout, { label: WORD_SPACING_LABEL, ref: rowRef }, /* @__PURE__ */ React70.createElement(import_editor_controls45.SizeControl, { anchorRef: rowRef, min: -Number.MAX_SAFE_INTEGER })));
|
|
4373
3988
|
};
|
|
4374
3989
|
|
|
4375
3990
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
4376
3991
|
var TypographySection = () => {
|
|
4377
|
-
return /* @__PURE__ */
|
|
3992
|
+
return /* @__PURE__ */ React71.createElement(SectionContent, null, /* @__PURE__ */ React71.createElement(FontFamilyField, null), /* @__PURE__ */ React71.createElement(FontWeightField, null), /* @__PURE__ */ React71.createElement(FontSizeField, null), /* @__PURE__ */ React71.createElement(PanelDivider, null), /* @__PURE__ */ React71.createElement(TextAlignmentField, null), /* @__PURE__ */ React71.createElement(TextColorField, null), /* @__PURE__ */ React71.createElement(
|
|
4378
3993
|
StyleTabCollapsibleContent,
|
|
4379
3994
|
{
|
|
4380
3995
|
fields: [
|
|
@@ -4389,15 +4004,15 @@ var TypographySection = () => {
|
|
|
4389
4004
|
"stroke"
|
|
4390
4005
|
]
|
|
4391
4006
|
},
|
|
4392
|
-
/* @__PURE__ */
|
|
4007
|
+
/* @__PURE__ */ React71.createElement(SectionContent, { sx: { pt: 2 } }, /* @__PURE__ */ React71.createElement(LineHeightField, null), /* @__PURE__ */ React71.createElement(LetterSpacingField, null), /* @__PURE__ */ React71.createElement(WordSpacingField, null), /* @__PURE__ */ React71.createElement(ColumnCountField, null), /* @__PURE__ */ React71.createElement(ColumnGapField, null), /* @__PURE__ */ React71.createElement(PanelDivider, null), /* @__PURE__ */ React71.createElement(TextDecorationField, null), /* @__PURE__ */ React71.createElement(TransformField, null), /* @__PURE__ */ React71.createElement(TextDirectionField, null), /* @__PURE__ */ React71.createElement(FontStyleField, null), /* @__PURE__ */ React71.createElement(TextStrokeField, null))
|
|
4393
4008
|
));
|
|
4394
4009
|
};
|
|
4395
4010
|
|
|
4396
4011
|
// src/components/style-tab-section.tsx
|
|
4397
|
-
var
|
|
4012
|
+
var React73 = __toESM(require("react"));
|
|
4398
4013
|
|
|
4399
4014
|
// src/hooks/use-default-panel-settings.ts
|
|
4400
|
-
var
|
|
4015
|
+
var import_react32 = require("react");
|
|
4401
4016
|
var fallbackEditorSettings = {
|
|
4402
4017
|
defaultSectionsExpanded: {
|
|
4403
4018
|
settings: ["Content", "Settings"],
|
|
@@ -4405,7 +4020,7 @@ var fallbackEditorSettings = {
|
|
|
4405
4020
|
},
|
|
4406
4021
|
defaultTab: "settings"
|
|
4407
4022
|
};
|
|
4408
|
-
var defaultPanelSettingsContext = (0,
|
|
4023
|
+
var defaultPanelSettingsContext = (0, import_react32.createContext)({
|
|
4409
4024
|
"e-div-block": {
|
|
4410
4025
|
defaultSectionsExpanded: fallbackEditorSettings.defaultSectionsExpanded,
|
|
4411
4026
|
defaultTab: "style"
|
|
@@ -4421,25 +4036,25 @@ var defaultPanelSettingsContext = (0, import_react34.createContext)({
|
|
|
4421
4036
|
});
|
|
4422
4037
|
var useDefaultPanelSettings = () => {
|
|
4423
4038
|
const { element } = useElement();
|
|
4424
|
-
const defaults = (0,
|
|
4039
|
+
const defaults = (0, import_react32.useContext)(defaultPanelSettingsContext)[element.type];
|
|
4425
4040
|
return defaults || fallbackEditorSettings;
|
|
4426
4041
|
};
|
|
4427
4042
|
|
|
4428
4043
|
// src/components/section.tsx
|
|
4429
|
-
var
|
|
4430
|
-
var
|
|
4431
|
-
var
|
|
4044
|
+
var React72 = __toESM(require("react"));
|
|
4045
|
+
var import_react33 = require("react");
|
|
4046
|
+
var import_ui32 = require("@elementor/ui");
|
|
4432
4047
|
function Section({ title, children, defaultExpanded = false, titleEnd, unmountOnExit = true }) {
|
|
4433
4048
|
const [isOpen, setIsOpen] = useStateByElement(title, !!defaultExpanded);
|
|
4434
|
-
const ref = (0,
|
|
4049
|
+
const ref = (0, import_react33.useRef)(null);
|
|
4435
4050
|
const handleClick = () => {
|
|
4436
4051
|
setIsOpen(!isOpen);
|
|
4437
4052
|
};
|
|
4438
|
-
const id = (0,
|
|
4053
|
+
const id = (0, import_react33.useId)();
|
|
4439
4054
|
const labelId = `label-${id}`;
|
|
4440
4055
|
const contentId = `content-${id}`;
|
|
4441
|
-
return /* @__PURE__ */
|
|
4442
|
-
|
|
4056
|
+
return /* @__PURE__ */ React72.createElement(React72.Fragment, null, /* @__PURE__ */ React72.createElement(
|
|
4057
|
+
import_ui32.ListItemButton,
|
|
4443
4058
|
{
|
|
4444
4059
|
id: labelId,
|
|
4445
4060
|
"aria-controls": contentId,
|
|
@@ -4447,17 +4062,17 @@ function Section({ title, children, defaultExpanded = false, titleEnd, unmountOn
|
|
|
4447
4062
|
onClick: handleClick,
|
|
4448
4063
|
sx: { "&:hover": { backgroundColor: "transparent" } }
|
|
4449
4064
|
},
|
|
4450
|
-
/* @__PURE__ */
|
|
4451
|
-
|
|
4065
|
+
/* @__PURE__ */ React72.createElement(import_ui32.Stack, { direction: "row", alignItems: "center", justifyItems: "start", flexGrow: 1, gap: 0.5 }, /* @__PURE__ */ React72.createElement(
|
|
4066
|
+
import_ui32.ListItemText,
|
|
4452
4067
|
{
|
|
4453
4068
|
secondary: title,
|
|
4454
4069
|
secondaryTypographyProps: { color: "text.primary", variant: "caption", fontWeight: "bold" },
|
|
4455
4070
|
sx: { flexGrow: 0, flexShrink: 1, marginInlineEnd: 1 }
|
|
4456
4071
|
}
|
|
4457
4072
|
), getCollapsibleValue(titleEnd, isOpen)),
|
|
4458
|
-
/* @__PURE__ */
|
|
4459
|
-
), /* @__PURE__ */
|
|
4460
|
-
|
|
4073
|
+
/* @__PURE__ */ React72.createElement(CollapseIcon, { open: isOpen, color: "secondary", fontSize: "tiny" })
|
|
4074
|
+
), /* @__PURE__ */ React72.createElement(
|
|
4075
|
+
import_ui32.Collapse,
|
|
4461
4076
|
{
|
|
4462
4077
|
id: contentId,
|
|
4463
4078
|
"aria-labelledby": labelId,
|
|
@@ -4465,8 +4080,8 @@ function Section({ title, children, defaultExpanded = false, titleEnd, unmountOn
|
|
|
4465
4080
|
timeout: "auto",
|
|
4466
4081
|
unmountOnExit
|
|
4467
4082
|
},
|
|
4468
|
-
/* @__PURE__ */
|
|
4469
|
-
), /* @__PURE__ */
|
|
4083
|
+
/* @__PURE__ */ React72.createElement(SectionRefContext.Provider, { value: ref }, /* @__PURE__ */ React72.createElement(import_ui32.Stack, { ref, gap: 2.5, p: 2, "aria-label": `${title} section content` }, children))
|
|
4084
|
+
), /* @__PURE__ */ React72.createElement(import_ui32.Divider, null));
|
|
4470
4085
|
}
|
|
4471
4086
|
|
|
4472
4087
|
// src/components/style-tab-section.tsx
|
|
@@ -4475,7 +4090,7 @@ var StyleTabSection = ({ section, fields = [], unmountOnExit = true }) => {
|
|
|
4475
4090
|
const tabDefaults = useDefaultPanelSettings();
|
|
4476
4091
|
const SectionComponent = component;
|
|
4477
4092
|
const isExpanded = tabDefaults.defaultSectionsExpanded.style?.includes(name);
|
|
4478
|
-
return /* @__PURE__ */
|
|
4093
|
+
return /* @__PURE__ */ React73.createElement(
|
|
4479
4094
|
Section,
|
|
4480
4095
|
{
|
|
4481
4096
|
title,
|
|
@@ -4483,7 +4098,7 @@ var StyleTabSection = ({ section, fields = [], unmountOnExit = true }) => {
|
|
|
4483
4098
|
titleEnd: getStylesInheritanceIndicators(fields),
|
|
4484
4099
|
unmountOnExit
|
|
4485
4100
|
},
|
|
4486
|
-
/* @__PURE__ */
|
|
4101
|
+
/* @__PURE__ */ React73.createElement(SectionComponent, null)
|
|
4487
4102
|
);
|
|
4488
4103
|
};
|
|
4489
4104
|
|
|
@@ -4500,12 +4115,12 @@ var stickyHeaderStyles = {
|
|
|
4500
4115
|
var StyleTab = () => {
|
|
4501
4116
|
const currentClassesProp = useCurrentClassesProp();
|
|
4502
4117
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp ?? "");
|
|
4503
|
-
const [activeStyleState, setActiveStyleState] = (0,
|
|
4504
|
-
const breakpoint = (0,
|
|
4118
|
+
const [activeStyleState, setActiveStyleState] = (0, import_react34.useState)(null);
|
|
4119
|
+
const breakpoint = (0, import_editor_responsive3.useActiveBreakpoint)();
|
|
4505
4120
|
if (!currentClassesProp) {
|
|
4506
4121
|
return null;
|
|
4507
4122
|
}
|
|
4508
|
-
return /* @__PURE__ */
|
|
4123
|
+
return /* @__PURE__ */ React74.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React74.createElement(
|
|
4509
4124
|
StyleProvider,
|
|
4510
4125
|
{
|
|
4511
4126
|
meta: { breakpoint, state: activeStyleState },
|
|
@@ -4516,13 +4131,13 @@ var StyleTab = () => {
|
|
|
4516
4131
|
},
|
|
4517
4132
|
setMetaState: setActiveStyleState
|
|
4518
4133
|
},
|
|
4519
|
-
/* @__PURE__ */
|
|
4134
|
+
/* @__PURE__ */ React74.createElement(import_session5.SessionStorageProvider, { prefix: activeStyleDefId ?? "" }, /* @__PURE__ */ React74.createElement(StyleInheritanceProvider, null, /* @__PURE__ */ React74.createElement(ClassesHeader, null, /* @__PURE__ */ React74.createElement(CssClassSelector, null), /* @__PURE__ */ React74.createElement(import_ui33.Divider, null)), /* @__PURE__ */ React74.createElement(SectionsList, null, /* @__PURE__ */ React74.createElement(
|
|
4520
4135
|
StyleTabSection,
|
|
4521
4136
|
{
|
|
4522
4137
|
section: {
|
|
4523
4138
|
component: LayoutSection,
|
|
4524
4139
|
name: "Layout",
|
|
4525
|
-
title: (0,
|
|
4140
|
+
title: (0, import_i18n54.__)("Layout", "elementor")
|
|
4526
4141
|
},
|
|
4527
4142
|
fields: [
|
|
4528
4143
|
"display",
|
|
@@ -4535,23 +4150,23 @@ var StyleTab = () => {
|
|
|
4535
4150
|
"gap"
|
|
4536
4151
|
]
|
|
4537
4152
|
}
|
|
4538
|
-
), /* @__PURE__ */
|
|
4153
|
+
), /* @__PURE__ */ React74.createElement(
|
|
4539
4154
|
StyleTabSection,
|
|
4540
4155
|
{
|
|
4541
4156
|
section: {
|
|
4542
4157
|
component: SpacingSection,
|
|
4543
4158
|
name: "Spacing",
|
|
4544
|
-
title: (0,
|
|
4159
|
+
title: (0, import_i18n54.__)("Spacing", "elementor")
|
|
4545
4160
|
},
|
|
4546
4161
|
fields: ["margin", "padding"]
|
|
4547
4162
|
}
|
|
4548
|
-
), /* @__PURE__ */
|
|
4163
|
+
), /* @__PURE__ */ React74.createElement(
|
|
4549
4164
|
StyleTabSection,
|
|
4550
4165
|
{
|
|
4551
4166
|
section: {
|
|
4552
4167
|
component: SizeSection,
|
|
4553
4168
|
name: "Size",
|
|
4554
|
-
title: (0,
|
|
4169
|
+
title: (0, import_i18n54.__)("Size", "elementor")
|
|
4555
4170
|
},
|
|
4556
4171
|
fields: [
|
|
4557
4172
|
"width",
|
|
@@ -4565,23 +4180,23 @@ var StyleTab = () => {
|
|
|
4565
4180
|
"object-fit"
|
|
4566
4181
|
]
|
|
4567
4182
|
}
|
|
4568
|
-
), /* @__PURE__ */
|
|
4183
|
+
), /* @__PURE__ */ React74.createElement(
|
|
4569
4184
|
StyleTabSection,
|
|
4570
4185
|
{
|
|
4571
4186
|
section: {
|
|
4572
4187
|
component: PositionSection,
|
|
4573
4188
|
name: "Position",
|
|
4574
|
-
title: (0,
|
|
4189
|
+
title: (0, import_i18n54.__)("Position", "elementor")
|
|
4575
4190
|
},
|
|
4576
4191
|
fields: ["position", "z-index", "scroll-margin-top"]
|
|
4577
4192
|
}
|
|
4578
|
-
), /* @__PURE__ */
|
|
4193
|
+
), /* @__PURE__ */ React74.createElement(
|
|
4579
4194
|
StyleTabSection,
|
|
4580
4195
|
{
|
|
4581
4196
|
section: {
|
|
4582
4197
|
component: TypographySection,
|
|
4583
4198
|
name: "Typography",
|
|
4584
|
-
title: (0,
|
|
4199
|
+
title: (0, import_i18n54.__)("Typography", "elementor")
|
|
4585
4200
|
},
|
|
4586
4201
|
fields: [
|
|
4587
4202
|
"font-family",
|
|
@@ -4600,33 +4215,33 @@ var StyleTab = () => {
|
|
|
4600
4215
|
"stroke"
|
|
4601
4216
|
]
|
|
4602
4217
|
}
|
|
4603
|
-
), /* @__PURE__ */
|
|
4218
|
+
), /* @__PURE__ */ React74.createElement(
|
|
4604
4219
|
StyleTabSection,
|
|
4605
4220
|
{
|
|
4606
4221
|
section: {
|
|
4607
4222
|
component: BackgroundSection,
|
|
4608
4223
|
name: "Background",
|
|
4609
|
-
title: (0,
|
|
4224
|
+
title: (0, import_i18n54.__)("Background", "elementor")
|
|
4610
4225
|
},
|
|
4611
4226
|
fields: ["background"]
|
|
4612
4227
|
}
|
|
4613
|
-
), /* @__PURE__ */
|
|
4228
|
+
), /* @__PURE__ */ React74.createElement(
|
|
4614
4229
|
StyleTabSection,
|
|
4615
4230
|
{
|
|
4616
4231
|
section: {
|
|
4617
4232
|
component: BorderSection,
|
|
4618
4233
|
name: "Border",
|
|
4619
|
-
title: (0,
|
|
4234
|
+
title: (0, import_i18n54.__)("Border", "elementor")
|
|
4620
4235
|
},
|
|
4621
4236
|
fields: ["border-radius", "border-width", "border-color", "border-style"]
|
|
4622
4237
|
}
|
|
4623
|
-
), /* @__PURE__ */
|
|
4238
|
+
), /* @__PURE__ */ React74.createElement(
|
|
4624
4239
|
StyleTabSection,
|
|
4625
4240
|
{
|
|
4626
4241
|
section: {
|
|
4627
4242
|
component: EffectsSection,
|
|
4628
4243
|
name: "Effects",
|
|
4629
|
-
title: (0,
|
|
4244
|
+
title: (0, import_i18n54.__)("Effects", "elementor")
|
|
4630
4245
|
},
|
|
4631
4246
|
fields: [
|
|
4632
4247
|
"mix-blend-mode",
|
|
@@ -4639,17 +4254,17 @@ var StyleTab = () => {
|
|
|
4639
4254
|
"transition"
|
|
4640
4255
|
]
|
|
4641
4256
|
}
|
|
4642
|
-
), /* @__PURE__ */
|
|
4257
|
+
), /* @__PURE__ */ React74.createElement(StyleTabSlot, null)), /* @__PURE__ */ React74.createElement(import_ui33.Box, { sx: { height: "150px" } })))
|
|
4643
4258
|
));
|
|
4644
4259
|
};
|
|
4645
4260
|
function ClassesHeader({ children }) {
|
|
4646
4261
|
const scrollDirection = useScrollDirection();
|
|
4647
|
-
return /* @__PURE__ */
|
|
4262
|
+
return /* @__PURE__ */ React74.createElement(import_ui33.Stack, { sx: { ...stickyHeaderStyles, top: scrollDirection === "up" ? TABS_HEADER_HEIGHT : 0 } }, children);
|
|
4648
4263
|
}
|
|
4649
4264
|
function useCurrentClassesProp() {
|
|
4650
4265
|
const { elementType } = useElement();
|
|
4651
4266
|
const prop = Object.entries(elementType.propsSchema).find(
|
|
4652
|
-
([, propType]) => propType.kind === "plain" && propType.key ===
|
|
4267
|
+
([, propType]) => propType.kind === "plain" && propType.key === import_editor_props11.CLASSES_PROP_KEY
|
|
4653
4268
|
);
|
|
4654
4269
|
if (!prop) {
|
|
4655
4270
|
return null;
|
|
@@ -4658,35 +4273,35 @@ function useCurrentClassesProp() {
|
|
|
4658
4273
|
}
|
|
4659
4274
|
|
|
4660
4275
|
// src/control-replacement.tsx
|
|
4661
|
-
var
|
|
4662
|
-
var { registerControlReplacement, getControlReplacements } = (0,
|
|
4276
|
+
var import_editor_controls46 = require("@elementor/editor-controls");
|
|
4277
|
+
var { registerControlReplacement, getControlReplacements } = (0, import_editor_controls46.createControlReplacementsRegistry)();
|
|
4663
4278
|
|
|
4664
4279
|
// src/controls-actions.ts
|
|
4665
4280
|
var import_menus = require("@elementor/menus");
|
|
4666
4281
|
|
|
4667
4282
|
// src/action.tsx
|
|
4668
|
-
var
|
|
4669
|
-
var
|
|
4670
|
-
var
|
|
4283
|
+
var React75 = __toESM(require("react"));
|
|
4284
|
+
var import_ui34 = require("@elementor/ui");
|
|
4285
|
+
var SIZE2 = "tiny";
|
|
4671
4286
|
function Action({ title, visible = true, icon: Icon, onClick }) {
|
|
4672
4287
|
if (!visible) {
|
|
4673
4288
|
return null;
|
|
4674
4289
|
}
|
|
4675
|
-
return /* @__PURE__ */
|
|
4290
|
+
return /* @__PURE__ */ React75.createElement(import_ui34.Tooltip, { placement: "top", title, arrow: true }, /* @__PURE__ */ React75.createElement(import_ui34.IconButton, { "aria-label": title, size: SIZE2, onClick }, /* @__PURE__ */ React75.createElement(Icon, { fontSize: SIZE2 })));
|
|
4676
4291
|
}
|
|
4677
4292
|
|
|
4678
4293
|
// src/popover-action.tsx
|
|
4679
|
-
var
|
|
4680
|
-
var
|
|
4681
|
-
var
|
|
4682
|
-
var
|
|
4294
|
+
var React76 = __toESM(require("react"));
|
|
4295
|
+
var import_editor_controls47 = require("@elementor/editor-controls");
|
|
4296
|
+
var import_ui35 = require("@elementor/ui");
|
|
4297
|
+
var SIZE3 = "tiny";
|
|
4683
4298
|
function PopoverAction({ title, visible = true, icon: Icon, content: PopoverContent }) {
|
|
4684
4299
|
const { popupState, triggerProps, popoverProps } = useFloatingActionsPopover();
|
|
4685
4300
|
if (!visible) {
|
|
4686
4301
|
return null;
|
|
4687
4302
|
}
|
|
4688
|
-
return /* @__PURE__ */
|
|
4689
|
-
|
|
4303
|
+
return /* @__PURE__ */ React76.createElement(React76.Fragment, null, /* @__PURE__ */ React76.createElement(import_ui35.Tooltip, { placement: "top", title }, /* @__PURE__ */ React76.createElement(import_ui35.IconButton, { "aria-label": title, size: SIZE3, ...triggerProps }, /* @__PURE__ */ React76.createElement(Icon, { fontSize: SIZE3 }))), /* @__PURE__ */ React76.createElement(
|
|
4304
|
+
import_ui35.Popover,
|
|
4690
4305
|
{
|
|
4691
4306
|
disableScrollLock: true,
|
|
4692
4307
|
anchorOrigin: {
|
|
@@ -4702,14 +4317,14 @@ function PopoverAction({ title, visible = true, icon: Icon, content: PopoverCont
|
|
|
4702
4317
|
},
|
|
4703
4318
|
...popoverProps
|
|
4704
4319
|
},
|
|
4705
|
-
/* @__PURE__ */
|
|
4320
|
+
/* @__PURE__ */ React76.createElement(PopoverContent, { close: popupState.close })
|
|
4706
4321
|
));
|
|
4707
4322
|
}
|
|
4708
4323
|
function useFloatingActionsPopover() {
|
|
4709
|
-
const { setOpen } = (0,
|
|
4710
|
-
const popupState = (0,
|
|
4711
|
-
const triggerProps = (0,
|
|
4712
|
-
const popoverProps = (0,
|
|
4324
|
+
const { setOpen } = (0, import_editor_controls47.useFloatingActionsBar)();
|
|
4325
|
+
const popupState = (0, import_ui35.usePopupState)({ variant: "popover" });
|
|
4326
|
+
const triggerProps = (0, import_ui35.bindTrigger)(popupState);
|
|
4327
|
+
const popoverProps = (0, import_ui35.bindPopover)(popupState);
|
|
4713
4328
|
const onClick = (e) => {
|
|
4714
4329
|
triggerProps.onClick(e);
|
|
4715
4330
|
setOpen(true);
|
|
@@ -4738,26 +4353,26 @@ var controlActionsMenu = (0, import_menus.createMenu)({
|
|
|
4738
4353
|
});
|
|
4739
4354
|
|
|
4740
4355
|
// src/controls-registry/controls-registry.tsx
|
|
4741
|
-
var
|
|
4742
|
-
var
|
|
4356
|
+
var import_editor_controls48 = require("@elementor/editor-controls");
|
|
4357
|
+
var import_editor_props12 = require("@elementor/editor-props");
|
|
4743
4358
|
var controlTypes = {
|
|
4744
|
-
image: { component:
|
|
4745
|
-
"svg-media": { component:
|
|
4746
|
-
text: { component:
|
|
4747
|
-
textarea: { component:
|
|
4748
|
-
size: { component:
|
|
4749
|
-
select: { component:
|
|
4750
|
-
link: { component:
|
|
4751
|
-
query: { component:
|
|
4752
|
-
url: { component:
|
|
4753
|
-
switch: { component:
|
|
4754
|
-
number: { component:
|
|
4755
|
-
repeatable: { component:
|
|
4756
|
-
"key-value": { component:
|
|
4757
|
-
"html-tag": { component:
|
|
4758
|
-
toggle: { component:
|
|
4759
|
-
"date-time": { component:
|
|
4760
|
-
"inline-editing": { component:
|
|
4359
|
+
image: { component: import_editor_controls48.ImageControl, layout: "full", propTypeUtil: import_editor_props12.imagePropTypeUtil },
|
|
4360
|
+
"svg-media": { component: import_editor_controls48.SvgMediaControl, layout: "full", propTypeUtil: import_editor_props12.imageSrcPropTypeUtil },
|
|
4361
|
+
text: { component: import_editor_controls48.TextControl, layout: "full", propTypeUtil: import_editor_props12.stringPropTypeUtil },
|
|
4362
|
+
textarea: { component: import_editor_controls48.TextAreaControl, layout: "full", propTypeUtil: import_editor_props12.stringPropTypeUtil },
|
|
4363
|
+
size: { component: import_editor_controls48.SizeControl, layout: "two-columns", propTypeUtil: import_editor_props12.sizePropTypeUtil },
|
|
4364
|
+
select: { component: import_editor_controls48.SelectControlWrapper, layout: "two-columns", propTypeUtil: import_editor_props12.stringPropTypeUtil },
|
|
4365
|
+
link: { component: import_editor_controls48.LinkControl, layout: "custom", propTypeUtil: import_editor_props12.linkPropTypeUtil },
|
|
4366
|
+
query: { component: import_editor_controls48.QueryControl, layout: "full", propTypeUtil: import_editor_props12.queryPropTypeUtil },
|
|
4367
|
+
url: { component: import_editor_controls48.UrlControl, layout: "full", propTypeUtil: import_editor_props12.stringPropTypeUtil },
|
|
4368
|
+
switch: { component: import_editor_controls48.SwitchControl, layout: "two-columns", propTypeUtil: import_editor_props12.booleanPropTypeUtil },
|
|
4369
|
+
number: { component: import_editor_controls48.NumberControl, layout: "two-columns", propTypeUtil: import_editor_props12.numberPropTypeUtil },
|
|
4370
|
+
repeatable: { component: import_editor_controls48.RepeatableControl, layout: "full", propTypeUtil: void 0 },
|
|
4371
|
+
"key-value": { component: import_editor_controls48.KeyValueControl, layout: "full", propTypeUtil: import_editor_props12.keyValuePropTypeUtil },
|
|
4372
|
+
"html-tag": { component: import_editor_controls48.HtmlTagControl, layout: "two-columns", propTypeUtil: import_editor_props12.stringPropTypeUtil },
|
|
4373
|
+
toggle: { component: import_editor_controls48.ToggleControl, layout: "full", propTypeUtil: import_editor_props12.stringPropTypeUtil },
|
|
4374
|
+
"date-time": { component: import_editor_controls48.DateTimeControl, layout: "full", propTypeUtil: import_editor_props12.DateTimePropTypeUtil },
|
|
4375
|
+
"inline-editing": { component: import_editor_controls48.InlineEditingControl, layout: "full", propTypeUtil: import_editor_props12.htmlPropTypeUtil }
|
|
4761
4376
|
};
|
|
4762
4377
|
var ControlsRegistry = class {
|
|
4763
4378
|
constructor(controlsRegistry2) {
|
|
@@ -4798,53 +4413,53 @@ var import_editor_panels3 = require("@elementor/editor-panels");
|
|
|
4798
4413
|
var import_editor_v1_adapters8 = require("@elementor/editor-v1-adapters");
|
|
4799
4414
|
|
|
4800
4415
|
// src/hooks/use-open-editor-panel.ts
|
|
4801
|
-
var
|
|
4416
|
+
var import_react37 = require("react");
|
|
4802
4417
|
var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
|
|
4803
4418
|
|
|
4804
4419
|
// src/panel.ts
|
|
4805
4420
|
var import_editor_panels2 = require("@elementor/editor-panels");
|
|
4806
4421
|
|
|
4807
4422
|
// src/components/editing-panel.tsx
|
|
4808
|
-
var
|
|
4809
|
-
var
|
|
4423
|
+
var React84 = __toESM(require("react"));
|
|
4424
|
+
var import_editor_controls51 = require("@elementor/editor-controls");
|
|
4810
4425
|
var import_editor_elements13 = require("@elementor/editor-elements");
|
|
4811
4426
|
var import_editor_panels = require("@elementor/editor-panels");
|
|
4812
|
-
var
|
|
4813
|
-
var
|
|
4427
|
+
var import_editor_ui5 = require("@elementor/editor-ui");
|
|
4428
|
+
var import_icons22 = require("@elementor/icons");
|
|
4814
4429
|
var import_session8 = require("@elementor/session");
|
|
4815
|
-
var
|
|
4816
|
-
var
|
|
4430
|
+
var import_ui40 = require("@elementor/ui");
|
|
4431
|
+
var import_i18n57 = require("@wordpress/i18n");
|
|
4817
4432
|
|
|
4818
4433
|
// src/components/editing-panel-error-fallback.tsx
|
|
4819
|
-
var
|
|
4820
|
-
var
|
|
4434
|
+
var React77 = __toESM(require("react"));
|
|
4435
|
+
var import_ui36 = require("@elementor/ui");
|
|
4821
4436
|
function EditorPanelErrorFallback() {
|
|
4822
|
-
return /* @__PURE__ */
|
|
4437
|
+
return /* @__PURE__ */ React77.createElement(import_ui36.Box, { role: "alert", sx: { minHeight: "100%", p: 2 } }, /* @__PURE__ */ React77.createElement(import_ui36.Alert, { severity: "error", sx: { mb: 2, maxWidth: 400, textAlign: "center" } }, /* @__PURE__ */ React77.createElement("strong", null, "Something went wrong")));
|
|
4823
4438
|
}
|
|
4824
4439
|
|
|
4825
4440
|
// src/components/editing-panel-tabs.tsx
|
|
4826
|
-
var
|
|
4827
|
-
var
|
|
4441
|
+
var import_react36 = require("react");
|
|
4442
|
+
var React83 = __toESM(require("react"));
|
|
4828
4443
|
var import_editor_v1_adapters6 = require("@elementor/editor-v1-adapters");
|
|
4829
|
-
var
|
|
4830
|
-
var
|
|
4444
|
+
var import_ui39 = require("@elementor/ui");
|
|
4445
|
+
var import_i18n56 = require("@wordpress/i18n");
|
|
4831
4446
|
|
|
4832
4447
|
// src/components/interactions-tab.tsx
|
|
4833
|
-
var
|
|
4448
|
+
var React78 = __toESM(require("react"));
|
|
4834
4449
|
var import_editor_interactions = require("@elementor/editor-interactions");
|
|
4835
4450
|
var InteractionsTab = () => {
|
|
4836
4451
|
const { element } = useElement();
|
|
4837
|
-
return /* @__PURE__ */
|
|
4452
|
+
return /* @__PURE__ */ React78.createElement(SectionsList, null, /* @__PURE__ */ React78.createElement(import_editor_interactions.InteractionsTab, { elementId: element.id }));
|
|
4838
4453
|
};
|
|
4839
4454
|
|
|
4840
4455
|
// src/components/settings-tab.tsx
|
|
4841
|
-
var
|
|
4842
|
-
var
|
|
4456
|
+
var React82 = __toESM(require("react"));
|
|
4457
|
+
var import_editor_controls50 = require("@elementor/editor-controls");
|
|
4843
4458
|
var import_session7 = require("@elementor/session");
|
|
4844
|
-
var
|
|
4459
|
+
var import_ui38 = require("@elementor/ui");
|
|
4845
4460
|
|
|
4846
4461
|
// src/controls-registry/control.tsx
|
|
4847
|
-
var
|
|
4462
|
+
var React79 = __toESM(require("react"));
|
|
4848
4463
|
var Control = ({ props, type }) => {
|
|
4849
4464
|
const ControlByType = controlsRegistry.get(type);
|
|
4850
4465
|
const { element } = useElement();
|
|
@@ -4853,19 +4468,19 @@ var Control = ({ props, type }) => {
|
|
|
4853
4468
|
context: { controlType: type }
|
|
4854
4469
|
});
|
|
4855
4470
|
}
|
|
4856
|
-
return /* @__PURE__ */
|
|
4471
|
+
return /* @__PURE__ */ React79.createElement(ControlByType, { ...props, context: { elementId: element.id } });
|
|
4857
4472
|
};
|
|
4858
4473
|
|
|
4859
4474
|
// src/controls-registry/control-type-container.tsx
|
|
4860
|
-
var
|
|
4861
|
-
var
|
|
4475
|
+
var React80 = __toESM(require("react"));
|
|
4476
|
+
var import_ui37 = require("@elementor/ui");
|
|
4862
4477
|
var ControlTypeContainer = ({ children, layout }) => {
|
|
4863
4478
|
if (layout === "custom") {
|
|
4864
4479
|
return children;
|
|
4865
4480
|
}
|
|
4866
|
-
return /* @__PURE__ */
|
|
4481
|
+
return /* @__PURE__ */ React80.createElement(StyledContainer, { layout }, children);
|
|
4867
4482
|
};
|
|
4868
|
-
var StyledContainer = (0,
|
|
4483
|
+
var StyledContainer = (0, import_ui37.styled)(import_ui37.Box, {
|
|
4869
4484
|
shouldForwardProp: (prop) => !["layout"].includes(prop)
|
|
4870
4485
|
})(({ layout, theme }) => ({
|
|
4871
4486
|
display: "grid",
|
|
@@ -4891,17 +4506,17 @@ var getStyleByLayout = (layout) => {
|
|
|
4891
4506
|
};
|
|
4892
4507
|
|
|
4893
4508
|
// src/controls-registry/settings-field.tsx
|
|
4894
|
-
var
|
|
4895
|
-
var
|
|
4896
|
-
var
|
|
4509
|
+
var React81 = __toESM(require("react"));
|
|
4510
|
+
var import_react35 = require("react");
|
|
4511
|
+
var import_editor_controls49 = require("@elementor/editor-controls");
|
|
4897
4512
|
var import_editor_documents2 = require("@elementor/editor-documents");
|
|
4898
4513
|
var import_editor_elements12 = require("@elementor/editor-elements");
|
|
4899
|
-
var
|
|
4514
|
+
var import_editor_props14 = require("@elementor/editor-props");
|
|
4900
4515
|
var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
|
|
4901
|
-
var
|
|
4516
|
+
var import_i18n55 = require("@wordpress/i18n");
|
|
4902
4517
|
|
|
4903
4518
|
// src/utils/prop-dependency-utils.ts
|
|
4904
|
-
var
|
|
4519
|
+
var import_editor_props13 = require("@elementor/editor-props");
|
|
4905
4520
|
var import_session6 = require("@elementor/session");
|
|
4906
4521
|
function extractOrderedDependencies(bind, propsSchema, elementValues, dependenciesPerTargetMapping) {
|
|
4907
4522
|
const prop = getPropType(propsSchema, elementValues, bind.split("."));
|
|
@@ -4950,8 +4565,8 @@ function getUpdatedValues(values, dependencies, propsSchema, elementValues, elem
|
|
|
4950
4565
|
return newValues;
|
|
4951
4566
|
}
|
|
4952
4567
|
const testDependencies = {
|
|
4953
|
-
previousValues: (0,
|
|
4954
|
-
newValues: (0,
|
|
4568
|
+
previousValues: (0, import_editor_props13.isDependencyMet)(propType.dependencies, elementValues),
|
|
4569
|
+
newValues: (0, import_editor_props13.isDependencyMet)(propType.dependencies, combinedValues)
|
|
4955
4570
|
};
|
|
4956
4571
|
if (!testDependencies.newValues.isMet) {
|
|
4957
4572
|
const newValue = handleUnmetCondition({
|
|
@@ -5001,7 +4616,7 @@ function evaluatePropType(props) {
|
|
|
5001
4616
|
const { key, index, path, elementValues, basePropKey } = props;
|
|
5002
4617
|
switch (prop.kind) {
|
|
5003
4618
|
case "union":
|
|
5004
|
-
const value = (0,
|
|
4619
|
+
const value = (0, import_editor_props13.extractValue)(path.slice(0, index + 1), elementValues);
|
|
5005
4620
|
const type = value?.$$type ?? null;
|
|
5006
4621
|
return getPropType(
|
|
5007
4622
|
{ [basePropKey]: prop.prop_types?.[type] },
|
|
@@ -5033,7 +4648,7 @@ function updateValue(path, value, values) {
|
|
|
5033
4648
|
function handleUnmetCondition(props) {
|
|
5034
4649
|
const { failingDependencies, dependency, elementValues, defaultValue, elementId } = props;
|
|
5035
4650
|
const newValue = failingDependencies.find((term) => term.newValue)?.newValue ?? null;
|
|
5036
|
-
const currentValue = (0,
|
|
4651
|
+
const currentValue = (0, import_editor_props13.extractValue)(dependency.split("."), elementValues) ?? defaultValue;
|
|
5037
4652
|
savePreviousValueToStorage({
|
|
5038
4653
|
path: dependency,
|
|
5039
4654
|
elementId,
|
|
@@ -5085,14 +4700,14 @@ var SettingsField = ({ bind, children, propDisplayName }) => {
|
|
|
5085
4700
|
const settings = getUpdatedValues(newValue, dependents, propsSchema, elementSettingValues, elementId);
|
|
5086
4701
|
undoableUpdateElementProp(settings);
|
|
5087
4702
|
};
|
|
5088
|
-
const isDisabled = (prop) => !(0,
|
|
5089
|
-
return /* @__PURE__ */
|
|
4703
|
+
const isDisabled = (prop) => !(0, import_editor_props14.isDependencyMet)(prop?.dependencies, elementSettingValues).isMet;
|
|
4704
|
+
return /* @__PURE__ */ React81.createElement(import_editor_controls49.PropProvider, { propType, value, setValue, isDisabled }, /* @__PURE__ */ React81.createElement(import_editor_controls49.PropKeyProvider, { bind }, children));
|
|
5090
4705
|
};
|
|
5091
4706
|
function useUndoableUpdateElementProp({
|
|
5092
4707
|
elementId,
|
|
5093
4708
|
propDisplayName
|
|
5094
4709
|
}) {
|
|
5095
|
-
return (0,
|
|
4710
|
+
return (0, import_react35.useMemo)(() => {
|
|
5096
4711
|
return (0, import_editor_v1_adapters5.undoable)(
|
|
5097
4712
|
{
|
|
5098
4713
|
do: (newSettings) => {
|
|
@@ -5108,7 +4723,7 @@ function useUndoableUpdateElementProp({
|
|
|
5108
4723
|
{
|
|
5109
4724
|
title: (0, import_editor_elements12.getElementLabel)(elementId),
|
|
5110
4725
|
// translators: %s is the name of the property that was edited.
|
|
5111
|
-
subtitle: (0,
|
|
4726
|
+
subtitle: (0, import_i18n55.__)("%s edited", "elementor").replace("%s", propDisplayName),
|
|
5112
4727
|
debounce: { wait: HISTORY_DEBOUNCE_WAIT2 }
|
|
5113
4728
|
}
|
|
5114
4729
|
);
|
|
@@ -5120,13 +4735,13 @@ var SettingsTab = () => {
|
|
|
5120
4735
|
const { elementType, element } = useElement();
|
|
5121
4736
|
const settingsDefault = useDefaultPanelSettings();
|
|
5122
4737
|
const isDefaultExpanded = (sectionId) => settingsDefault.defaultSectionsExpanded.settings?.includes(sectionId);
|
|
5123
|
-
return /* @__PURE__ */
|
|
4738
|
+
return /* @__PURE__ */ React82.createElement(import_session7.SessionStorageProvider, { prefix: element.id }, /* @__PURE__ */ React82.createElement(SectionsList, null, elementType.controls.map((control, index) => {
|
|
5124
4739
|
if (isControl(control)) {
|
|
5125
|
-
return /* @__PURE__ */
|
|
4740
|
+
return /* @__PURE__ */ React82.createElement(Control2, { key: getKey(control, element), control });
|
|
5126
4741
|
}
|
|
5127
4742
|
const { type, value } = control;
|
|
5128
4743
|
if (type === "section") {
|
|
5129
|
-
return /* @__PURE__ */
|
|
4744
|
+
return /* @__PURE__ */ React82.createElement(
|
|
5130
4745
|
Section,
|
|
5131
4746
|
{
|
|
5132
4747
|
title: value.label,
|
|
@@ -5135,7 +4750,7 @@ var SettingsTab = () => {
|
|
|
5135
4750
|
},
|
|
5136
4751
|
value.items?.map((item) => {
|
|
5137
4752
|
if (isControl(item)) {
|
|
5138
|
-
return /* @__PURE__ */
|
|
4753
|
+
return /* @__PURE__ */ React82.createElement(Control2, { key: getKey(item, element), control: item });
|
|
5139
4754
|
}
|
|
5140
4755
|
return null;
|
|
5141
4756
|
})
|
|
@@ -5154,17 +4769,15 @@ var Control2 = ({ control: { value, type } }) => {
|
|
|
5154
4769
|
controlProps.label = value.label;
|
|
5155
4770
|
}
|
|
5156
4771
|
if (type === "element-control") {
|
|
5157
|
-
return /* @__PURE__ */
|
|
4772
|
+
return /* @__PURE__ */ React82.createElement(ControlLayout, { control: value, layout, controlProps });
|
|
5158
4773
|
}
|
|
5159
|
-
return /* @__PURE__ */
|
|
4774
|
+
return /* @__PURE__ */ React82.createElement(SettingsField, { bind: value.bind, propDisplayName: value.label || value.bind }, /* @__PURE__ */ React82.createElement(ControlLayout, { control: value, layout, controlProps }));
|
|
5160
4775
|
};
|
|
5161
4776
|
var ControlLayout = ({
|
|
5162
4777
|
control,
|
|
5163
4778
|
layout,
|
|
5164
4779
|
controlProps
|
|
5165
|
-
}) => {
|
|
5166
|
-
return /* @__PURE__ */ React88.createElement(React88.Fragment, null, control.meta?.topDivider && /* @__PURE__ */ React88.createElement(import_ui43.Divider, null), /* @__PURE__ */ React88.createElement(ControlTypeContainer, { layout }, control.label && layout !== "custom" ? /* @__PURE__ */ React88.createElement(import_editor_controls51.ControlFormLabel, null, control.label) : null, /* @__PURE__ */ React88.createElement(Control, { type: control.type, props: controlProps })));
|
|
5167
|
-
};
|
|
4780
|
+
}) => /* @__PURE__ */ React82.createElement(import_editor_controls50.ControlAdornmentsProvider, { items: getFieldIndicators("settings") }, control.meta?.topDivider && /* @__PURE__ */ React82.createElement(import_ui38.Divider, null), /* @__PURE__ */ React82.createElement(ControlTypeContainer, { layout }, control.label && layout !== "custom" ? /* @__PURE__ */ React82.createElement(import_editor_controls50.ControlFormLabel, null, control.label) : null, /* @__PURE__ */ React82.createElement(Control, { type: control.type, props: controlProps })));
|
|
5168
4781
|
function populateChildControlProps(props) {
|
|
5169
4782
|
if (props.childControlType) {
|
|
5170
4783
|
const childComponent = controlsRegistry.get(props.childControlType);
|
|
@@ -5196,7 +4809,7 @@ var EditingPanelTabs = () => {
|
|
|
5196
4809
|
return (
|
|
5197
4810
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
5198
4811
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
5199
|
-
/* @__PURE__ */
|
|
4812
|
+
/* @__PURE__ */ React83.createElement(import_react36.Fragment, { key: element.id }, /* @__PURE__ */ React83.createElement(PanelTabContent, null))
|
|
5200
4813
|
);
|
|
5201
4814
|
};
|
|
5202
4815
|
var PanelTabContent = () => {
|
|
@@ -5204,9 +4817,9 @@ var PanelTabContent = () => {
|
|
|
5204
4817
|
const defaultComponentTab = editorDefaults.defaultTab;
|
|
5205
4818
|
const isInteractionsActive = (0, import_editor_v1_adapters6.isExperimentActive)("e_interactions");
|
|
5206
4819
|
const [currentTab, setCurrentTab] = useStateByElement("tab", defaultComponentTab);
|
|
5207
|
-
const { getTabProps, getTabPanelProps, getTabsProps } = (0,
|
|
5208
|
-
return /* @__PURE__ */
|
|
5209
|
-
|
|
4820
|
+
const { getTabProps, getTabPanelProps, getTabsProps } = (0, import_ui39.useTabs)(currentTab);
|
|
4821
|
+
return /* @__PURE__ */ React83.createElement(ScrollProvider, null, /* @__PURE__ */ React83.createElement(import_ui39.Stack, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React83.createElement(import_ui39.Stack, { sx: { ...stickyHeaderStyles, top: 0 } }, /* @__PURE__ */ React83.createElement(
|
|
4822
|
+
import_ui39.Tabs,
|
|
5210
4823
|
{
|
|
5211
4824
|
variant: "fullWidth",
|
|
5212
4825
|
size: "small",
|
|
@@ -5217,10 +4830,10 @@ var PanelTabContent = () => {
|
|
|
5217
4830
|
setCurrentTab(newValue);
|
|
5218
4831
|
}
|
|
5219
4832
|
},
|
|
5220
|
-
/* @__PURE__ */
|
|
5221
|
-
/* @__PURE__ */
|
|
5222
|
-
isInteractionsActive && /* @__PURE__ */
|
|
5223
|
-
), /* @__PURE__ */
|
|
4833
|
+
/* @__PURE__ */ React83.createElement(import_ui39.Tab, { label: (0, import_i18n56.__)("General", "elementor"), ...getTabProps("settings") }),
|
|
4834
|
+
/* @__PURE__ */ React83.createElement(import_ui39.Tab, { label: (0, import_i18n56.__)("Style", "elementor"), ...getTabProps("style") }),
|
|
4835
|
+
isInteractionsActive && /* @__PURE__ */ React83.createElement(import_ui39.Tab, { label: (0, import_i18n56.__)("Interactions", "elementor"), ...getTabProps("interactions") })
|
|
4836
|
+
), /* @__PURE__ */ React83.createElement(import_ui39.Divider, null)), /* @__PURE__ */ React83.createElement(import_ui39.TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React83.createElement(SettingsTab, null)), /* @__PURE__ */ React83.createElement(import_ui39.TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React83.createElement(StyleTab, null)), isInteractionsActive && /* @__PURE__ */ React83.createElement(import_ui39.TabPanel, { ...getTabPanelProps("interactions"), disablePadding: true }, /* @__PURE__ */ React83.createElement(InteractionsTab, null))));
|
|
5224
4837
|
};
|
|
5225
4838
|
|
|
5226
4839
|
// src/components/editing-panel.tsx
|
|
@@ -5232,8 +4845,8 @@ var EditingPanel = () => {
|
|
|
5232
4845
|
if (!element || !elementType) {
|
|
5233
4846
|
return null;
|
|
5234
4847
|
}
|
|
5235
|
-
const panelTitle = (0,
|
|
5236
|
-
return /* @__PURE__ */
|
|
4848
|
+
const panelTitle = (0, import_i18n57.__)("Edit %s", "elementor").replace("%s", elementType.title);
|
|
4849
|
+
return /* @__PURE__ */ React84.createElement(import_ui40.ErrorBoundary, { fallback: /* @__PURE__ */ React84.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React84.createElement(import_session8.SessionStorageProvider, { prefix: "elementor" }, /* @__PURE__ */ React84.createElement(import_editor_ui5.ThemeProvider, null, /* @__PURE__ */ React84.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React84.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React84.createElement(import_editor_panels.PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React84.createElement(import_icons22.AtomIcon, { fontSize: "small", sx: { color: "text.tertiary" } })), /* @__PURE__ */ React84.createElement(import_editor_panels.PanelBody, null, /* @__PURE__ */ React84.createElement(import_editor_controls51.ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React84.createElement(import_editor_controls51.ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React84.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React84.createElement(EditingPanelTabs, null)))))))));
|
|
5237
4850
|
};
|
|
5238
4851
|
|
|
5239
4852
|
// src/panel.ts
|
|
@@ -5256,7 +4869,7 @@ var isAtomicWidgetSelected = () => {
|
|
|
5256
4869
|
// src/hooks/use-open-editor-panel.ts
|
|
5257
4870
|
var useOpenEditorPanel = () => {
|
|
5258
4871
|
const { open } = usePanelActions();
|
|
5259
|
-
(0,
|
|
4872
|
+
(0, import_react37.useEffect)(() => {
|
|
5260
4873
|
return (0, import_editor_v1_adapters7.__privateListenTo)((0, import_editor_v1_adapters7.commandStartEvent)("panel/editor/open"), () => {
|
|
5261
4874
|
if (isAtomicWidgetSelected()) {
|
|
5262
4875
|
open();
|
|
@@ -5272,13 +4885,13 @@ var EditingPanelHooks = () => {
|
|
|
5272
4885
|
};
|
|
5273
4886
|
|
|
5274
4887
|
// src/controls-registry/element-controls/tabs-control/tabs-control.tsx
|
|
5275
|
-
var
|
|
5276
|
-
var
|
|
4888
|
+
var React85 = __toESM(require("react"));
|
|
4889
|
+
var import_editor_controls53 = require("@elementor/editor-controls");
|
|
5277
4890
|
var import_editor_elements17 = require("@elementor/editor-elements");
|
|
5278
|
-
var
|
|
5279
|
-
var
|
|
5280
|
-
var
|
|
5281
|
-
var
|
|
4891
|
+
var import_editor_props16 = require("@elementor/editor-props");
|
|
4892
|
+
var import_icons23 = require("@elementor/icons");
|
|
4893
|
+
var import_ui41 = require("@elementor/ui");
|
|
4894
|
+
var import_i18n59 = require("@wordpress/i18n");
|
|
5282
4895
|
|
|
5283
4896
|
// src/controls-registry/element-controls/get-element-by-type.ts
|
|
5284
4897
|
var import_editor_elements15 = require("@elementor/editor-elements");
|
|
@@ -5298,14 +4911,14 @@ var getElementByType = (elementId, type) => {
|
|
|
5298
4911
|
};
|
|
5299
4912
|
|
|
5300
4913
|
// src/controls-registry/element-controls/tabs-control/use-actions.ts
|
|
5301
|
-
var
|
|
4914
|
+
var import_editor_controls52 = require("@elementor/editor-controls");
|
|
5302
4915
|
var import_editor_elements16 = require("@elementor/editor-elements");
|
|
5303
|
-
var
|
|
5304
|
-
var
|
|
4916
|
+
var import_editor_props15 = require("@elementor/editor-props");
|
|
4917
|
+
var import_i18n58 = require("@wordpress/i18n");
|
|
5305
4918
|
var TAB_ELEMENT_TYPE = "e-tab";
|
|
5306
4919
|
var TAB_CONTENT_ELEMENT_TYPE = "e-tab-content";
|
|
5307
4920
|
var useActions = () => {
|
|
5308
|
-
const { value, setValue: setDefaultActiveTab } = (0,
|
|
4921
|
+
const { value, setValue: setDefaultActiveTab } = (0, import_editor_controls52.useBoundProp)(import_editor_props15.numberPropTypeUtil);
|
|
5309
4922
|
const defaultActiveTab = value ?? 0;
|
|
5310
4923
|
const duplicateItem = ({
|
|
5311
4924
|
items: items3,
|
|
@@ -5320,7 +4933,7 @@ var useActions = () => {
|
|
|
5320
4933
|
}
|
|
5321
4934
|
(0, import_editor_elements16.duplicateElements)({
|
|
5322
4935
|
elementIds: [tabId, tabContentId],
|
|
5323
|
-
title: (0,
|
|
4936
|
+
title: (0, import_i18n58.__)("Duplicate Tab", "elementor")
|
|
5324
4937
|
});
|
|
5325
4938
|
});
|
|
5326
4939
|
};
|
|
@@ -5342,7 +4955,7 @@ var useActions = () => {
|
|
|
5342
4955
|
defaultActiveTab
|
|
5343
4956
|
});
|
|
5344
4957
|
(0, import_editor_elements16.moveElements)({
|
|
5345
|
-
title: (0,
|
|
4958
|
+
title: (0, import_i18n58.__)("Reorder Tabs", "elementor"),
|
|
5346
4959
|
moves: [
|
|
5347
4960
|
{
|
|
5348
4961
|
elementId: movedElementId,
|
|
@@ -5376,7 +4989,7 @@ var useActions = () => {
|
|
|
5376
4989
|
defaultActiveTab
|
|
5377
4990
|
});
|
|
5378
4991
|
(0, import_editor_elements16.removeElements)({
|
|
5379
|
-
title: (0,
|
|
4992
|
+
title: (0, import_i18n58.__)("Tabs", "elementor"),
|
|
5380
4993
|
elementIds: items3.flatMap(({ item, index }) => {
|
|
5381
4994
|
const tabId = item.id;
|
|
5382
4995
|
const tabContentContainer = (0, import_editor_elements16.getContainer)(tabContentAreaId);
|
|
@@ -5406,7 +5019,7 @@ var useActions = () => {
|
|
|
5406
5019
|
items3.forEach(({ index }) => {
|
|
5407
5020
|
const position = index + 1;
|
|
5408
5021
|
(0, import_editor_elements16.createElements)({
|
|
5409
|
-
title: (0,
|
|
5022
|
+
title: (0, import_i18n58.__)("Tabs", "elementor"),
|
|
5410
5023
|
elements: [
|
|
5411
5024
|
{
|
|
5412
5025
|
containerId: tabContentAreaId,
|
|
@@ -5468,7 +5081,7 @@ var calculateDefaultOnRemove = ({
|
|
|
5468
5081
|
var TAB_MENU_ELEMENT_TYPE = "e-tabs-menu";
|
|
5469
5082
|
var TAB_CONTENT_AREA_ELEMENT_TYPE = "e-tabs-content-area";
|
|
5470
5083
|
var TabsControl = ({ label }) => {
|
|
5471
|
-
return /* @__PURE__ */
|
|
5084
|
+
return /* @__PURE__ */ React85.createElement(SettingsField, { bind: "default-active-tab", propDisplayName: (0, import_i18n59.__)("Tabs", "elementor") }, /* @__PURE__ */ React85.createElement(TabsControlContent, { label }));
|
|
5472
5085
|
};
|
|
5473
5086
|
var TabsControlContent = ({ label }) => {
|
|
5474
5087
|
const { element } = useElement();
|
|
@@ -5513,8 +5126,8 @@ var TabsControlContent = ({ label }) => {
|
|
|
5513
5126
|
});
|
|
5514
5127
|
}
|
|
5515
5128
|
};
|
|
5516
|
-
return /* @__PURE__ */
|
|
5517
|
-
|
|
5129
|
+
return /* @__PURE__ */ React85.createElement(
|
|
5130
|
+
import_editor_controls53.Repeater,
|
|
5518
5131
|
{
|
|
5519
5132
|
showToggle: false,
|
|
5520
5133
|
values: repeaterValues,
|
|
@@ -5535,27 +5148,27 @@ var ItemLabel = ({ value, index }) => {
|
|
|
5535
5148
|
const id = value.id ?? "";
|
|
5536
5149
|
const editorSettings = (0, import_editor_elements17.useElementEditorSettings)(id);
|
|
5537
5150
|
const elementTitle = editorSettings?.title;
|
|
5538
|
-
return /* @__PURE__ */
|
|
5151
|
+
return /* @__PURE__ */ React85.createElement(import_ui41.Stack, { sx: { minHeight: 20 }, direction: "row", alignItems: "center", gap: 1.5 }, /* @__PURE__ */ React85.createElement("span", null, elementTitle), /* @__PURE__ */ React85.createElement(ItemDefaultTab, { index }));
|
|
5539
5152
|
};
|
|
5540
5153
|
var ItemDefaultTab = ({ index }) => {
|
|
5541
|
-
const { value: defaultItem } = (0,
|
|
5154
|
+
const { value: defaultItem } = (0, import_editor_controls53.useBoundProp)(import_editor_props16.numberPropTypeUtil);
|
|
5542
5155
|
const isDefault = defaultItem === index;
|
|
5543
5156
|
if (!isDefault) {
|
|
5544
5157
|
return null;
|
|
5545
5158
|
}
|
|
5546
|
-
return /* @__PURE__ */
|
|
5159
|
+
return /* @__PURE__ */ React85.createElement(import_ui41.Chip, { size: "tiny", shape: "rounded", label: (0, import_i18n59.__)("Default", "elementor") });
|
|
5547
5160
|
};
|
|
5548
5161
|
var ItemContent = ({ value, index }) => {
|
|
5549
5162
|
if (!value.id) {
|
|
5550
5163
|
return null;
|
|
5551
5164
|
}
|
|
5552
|
-
return /* @__PURE__ */
|
|
5165
|
+
return /* @__PURE__ */ React85.createElement(import_ui41.Stack, { p: 2, gap: 1.5 }, /* @__PURE__ */ React85.createElement(TabLabelControl, { elementId: value.id }), /* @__PURE__ */ React85.createElement(SettingsField, { bind: "default-active-tab", propDisplayName: (0, import_i18n59.__)("Tabs", "elementor") }, /* @__PURE__ */ React85.createElement(DefaultTabControl, { tabIndex: index })));
|
|
5553
5166
|
};
|
|
5554
5167
|
var DefaultTabControl = ({ tabIndex }) => {
|
|
5555
|
-
const { value, setValue } = (0,
|
|
5168
|
+
const { value, setValue } = (0, import_editor_controls53.useBoundProp)(import_editor_props16.numberPropTypeUtil);
|
|
5556
5169
|
const isDefault = value === tabIndex;
|
|
5557
|
-
return /* @__PURE__ */
|
|
5558
|
-
|
|
5170
|
+
return /* @__PURE__ */ React85.createElement(import_ui41.Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 2 }, /* @__PURE__ */ React85.createElement(import_editor_controls53.ControlFormLabel, null, (0, import_i18n59.__)("Set as default tab", "elementor")), /* @__PURE__ */ React85.createElement(ConditionalTooltip, { showTooltip: isDefault, placement: "right" }, /* @__PURE__ */ React85.createElement(
|
|
5171
|
+
import_ui41.Switch,
|
|
5559
5172
|
{
|
|
5560
5173
|
size: "small",
|
|
5561
5174
|
checked: isDefault,
|
|
@@ -5572,8 +5185,8 @@ var DefaultTabControl = ({ tabIndex }) => {
|
|
|
5572
5185
|
var TabLabelControl = ({ elementId }) => {
|
|
5573
5186
|
const editorSettings = (0, import_editor_elements17.useElementEditorSettings)(elementId);
|
|
5574
5187
|
const label = editorSettings?.title ?? "";
|
|
5575
|
-
return /* @__PURE__ */
|
|
5576
|
-
|
|
5188
|
+
return /* @__PURE__ */ React85.createElement(import_ui41.Stack, { gap: 1 }, /* @__PURE__ */ React85.createElement(import_editor_controls53.ControlFormLabel, null, (0, import_i18n59.__)("Tab name", "elementor")), /* @__PURE__ */ React85.createElement(
|
|
5189
|
+
import_ui41.TextField,
|
|
5577
5190
|
{
|
|
5578
5191
|
size: "tiny",
|
|
5579
5192
|
value: label,
|
|
@@ -5593,22 +5206,22 @@ var ConditionalTooltip = ({
|
|
|
5593
5206
|
if (!showTooltip) {
|
|
5594
5207
|
return children;
|
|
5595
5208
|
}
|
|
5596
|
-
return /* @__PURE__ */
|
|
5597
|
-
|
|
5209
|
+
return /* @__PURE__ */ React85.createElement(
|
|
5210
|
+
import_ui41.Infotip,
|
|
5598
5211
|
{
|
|
5599
5212
|
arrow: false,
|
|
5600
|
-
content: /* @__PURE__ */
|
|
5601
|
-
|
|
5213
|
+
content: /* @__PURE__ */ React85.createElement(
|
|
5214
|
+
import_ui41.Alert,
|
|
5602
5215
|
{
|
|
5603
5216
|
color: "secondary",
|
|
5604
|
-
icon: /* @__PURE__ */
|
|
5217
|
+
icon: /* @__PURE__ */ React85.createElement(import_icons23.InfoCircleFilledIcon, { fontSize: "tiny" }),
|
|
5605
5218
|
size: "small",
|
|
5606
5219
|
sx: { width: 288 }
|
|
5607
5220
|
},
|
|
5608
|
-
/* @__PURE__ */
|
|
5221
|
+
/* @__PURE__ */ React85.createElement(import_ui41.Typography, { variant: "body2" }, (0, import_i18n59.__)("To change the default tab, simply set another tab as default.", "elementor"))
|
|
5609
5222
|
)
|
|
5610
5223
|
},
|
|
5611
|
-
/* @__PURE__ */
|
|
5224
|
+
/* @__PURE__ */ React85.createElement("span", null, children)
|
|
5612
5225
|
);
|
|
5613
5226
|
};
|
|
5614
5227
|
|
|
@@ -5625,21 +5238,21 @@ var registerElementControls = () => {
|
|
|
5625
5238
|
};
|
|
5626
5239
|
|
|
5627
5240
|
// src/dynamics/init.ts
|
|
5628
|
-
var
|
|
5629
|
-
var
|
|
5241
|
+
var import_editor_canvas3 = require("@elementor/editor-canvas");
|
|
5242
|
+
var import_editor_controls60 = require("@elementor/editor-controls");
|
|
5630
5243
|
|
|
5631
5244
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
5632
|
-
var
|
|
5633
|
-
var
|
|
5634
|
-
var
|
|
5635
|
-
var
|
|
5245
|
+
var React86 = __toESM(require("react"));
|
|
5246
|
+
var import_editor_controls55 = require("@elementor/editor-controls");
|
|
5247
|
+
var import_editor_props18 = require("@elementor/editor-props");
|
|
5248
|
+
var import_icons24 = require("@elementor/icons");
|
|
5636
5249
|
|
|
5637
5250
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
5638
|
-
var
|
|
5251
|
+
var import_react39 = require("react");
|
|
5639
5252
|
|
|
5640
5253
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
5641
|
-
var
|
|
5642
|
-
var
|
|
5254
|
+
var import_react38 = require("react");
|
|
5255
|
+
var import_editor_controls54 = require("@elementor/editor-controls");
|
|
5643
5256
|
|
|
5644
5257
|
// src/dynamics/sync/get-elementor-config.ts
|
|
5645
5258
|
var getElementorConfig2 = () => {
|
|
@@ -5660,7 +5273,7 @@ var getAtomicDynamicTags = () => {
|
|
|
5660
5273
|
};
|
|
5661
5274
|
|
|
5662
5275
|
// src/dynamics/utils.ts
|
|
5663
|
-
var
|
|
5276
|
+
var import_editor_props17 = require("@elementor/editor-props");
|
|
5664
5277
|
var import_schema = require("@elementor/schema");
|
|
5665
5278
|
var DYNAMIC_PROP_TYPE_KEY = "dynamic";
|
|
5666
5279
|
var isDynamicPropType = (prop) => prop.key === DYNAMIC_PROP_TYPE_KEY;
|
|
@@ -5669,12 +5282,12 @@ var getDynamicPropType = (propType) => {
|
|
|
5669
5282
|
return dynamicPropType && isDynamicPropType(dynamicPropType) ? dynamicPropType : null;
|
|
5670
5283
|
};
|
|
5671
5284
|
var isDynamicPropValue = (prop) => {
|
|
5672
|
-
return (0,
|
|
5285
|
+
return (0, import_editor_props17.isTransformable)(prop) && prop.$$type === DYNAMIC_PROP_TYPE_KEY;
|
|
5673
5286
|
};
|
|
5674
5287
|
var supportsDynamic = (propType) => {
|
|
5675
5288
|
return !!getDynamicPropType(propType);
|
|
5676
5289
|
};
|
|
5677
|
-
var dynamicPropTypeUtil = (0,
|
|
5290
|
+
var dynamicPropTypeUtil = (0, import_editor_props17.createPropUtils)(
|
|
5678
5291
|
DYNAMIC_PROP_TYPE_KEY,
|
|
5679
5292
|
import_schema.z.strictObject({
|
|
5680
5293
|
name: import_schema.z.string(),
|
|
@@ -5685,12 +5298,12 @@ var dynamicPropTypeUtil = (0, import_editor_props18.createPropUtils)(
|
|
|
5685
5298
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
5686
5299
|
var usePropDynamicTags = () => {
|
|
5687
5300
|
let categories = [];
|
|
5688
|
-
const { propType } = (0,
|
|
5301
|
+
const { propType } = (0, import_editor_controls54.useBoundProp)();
|
|
5689
5302
|
if (propType) {
|
|
5690
5303
|
const propDynamicType = getDynamicPropType(propType);
|
|
5691
5304
|
categories = propDynamicType?.settings.categories || [];
|
|
5692
5305
|
}
|
|
5693
|
-
return (0,
|
|
5306
|
+
return (0, import_react38.useMemo)(() => getDynamicTagsByCategories(categories), [categories.join()]);
|
|
5694
5307
|
};
|
|
5695
5308
|
var getDynamicTagsByCategories = (categories) => {
|
|
5696
5309
|
const { tags, groups } = getAtomicDynamicTags() || {};
|
|
@@ -5720,33 +5333,33 @@ var getDynamicTagsByCategories = (categories) => {
|
|
|
5720
5333
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
5721
5334
|
var useDynamicTag = (tagName) => {
|
|
5722
5335
|
const dynamicTags = usePropDynamicTags();
|
|
5723
|
-
return (0,
|
|
5336
|
+
return (0, import_react39.useMemo)(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
|
|
5724
5337
|
};
|
|
5725
5338
|
|
|
5726
5339
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
5727
|
-
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */
|
|
5340
|
+
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */ React86.createElement(import_icons24.DatabaseIcon, { fontSize: "tiny" });
|
|
5728
5341
|
var BackgroundControlDynamicTagLabel = ({ value }) => {
|
|
5729
|
-
const context = (0,
|
|
5730
|
-
return /* @__PURE__ */
|
|
5342
|
+
const context = (0, import_editor_controls55.useBoundProp)(import_editor_props18.backgroundImageOverlayPropTypeUtil);
|
|
5343
|
+
return /* @__PURE__ */ React86.createElement(import_editor_controls55.PropProvider, { ...context, value: value.value }, /* @__PURE__ */ React86.createElement(import_editor_controls55.PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React86.createElement(Wrapper, { rawValue: value.value })));
|
|
5731
5344
|
};
|
|
5732
5345
|
var Wrapper = ({ rawValue }) => {
|
|
5733
|
-
const { propType } = (0,
|
|
5346
|
+
const { propType } = (0, import_editor_controls55.useBoundProp)();
|
|
5734
5347
|
const imageOverlayPropType = propType.prop_types["background-image-overlay"];
|
|
5735
|
-
return /* @__PURE__ */
|
|
5348
|
+
return /* @__PURE__ */ React86.createElement(import_editor_controls55.PropProvider, { propType: imageOverlayPropType.shape.image, value: rawValue, setValue: () => void 0 }, /* @__PURE__ */ React86.createElement(import_editor_controls55.PropKeyProvider, { bind: "src" }, /* @__PURE__ */ React86.createElement(Content, { rawValue: rawValue.image })));
|
|
5736
5349
|
};
|
|
5737
5350
|
var Content = ({ rawValue }) => {
|
|
5738
5351
|
const src = rawValue.value.src;
|
|
5739
5352
|
const dynamicTag = useDynamicTag(src.value.name || "");
|
|
5740
|
-
return /* @__PURE__ */
|
|
5353
|
+
return /* @__PURE__ */ React86.createElement(React86.Fragment, null, dynamicTag?.label);
|
|
5741
5354
|
};
|
|
5742
5355
|
|
|
5743
|
-
// src/dynamics/components/dynamic-selection-control.tsx
|
|
5744
|
-
var
|
|
5745
|
-
var
|
|
5746
|
-
var
|
|
5747
|
-
var
|
|
5748
|
-
var
|
|
5749
|
-
var
|
|
5356
|
+
// src/dynamics/components/dynamic-selection-control.tsx
|
|
5357
|
+
var React90 = __toESM(require("react"));
|
|
5358
|
+
var import_editor_controls58 = require("@elementor/editor-controls");
|
|
5359
|
+
var import_editor_ui7 = require("@elementor/editor-ui");
|
|
5360
|
+
var import_icons26 = require("@elementor/icons");
|
|
5361
|
+
var import_ui43 = require("@elementor/ui");
|
|
5362
|
+
var import_i18n61 = require("@wordpress/i18n");
|
|
5750
5363
|
|
|
5751
5364
|
// src/hooks/use-persist-dynamic-value.ts
|
|
5752
5365
|
var import_session9 = require("@elementor/session");
|
|
@@ -5757,19 +5370,19 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
5757
5370
|
};
|
|
5758
5371
|
|
|
5759
5372
|
// src/dynamics/dynamic-control.tsx
|
|
5760
|
-
var
|
|
5761
|
-
var
|
|
5373
|
+
var React88 = __toESM(require("react"));
|
|
5374
|
+
var import_editor_controls56 = require("@elementor/editor-controls");
|
|
5762
5375
|
|
|
5763
5376
|
// src/dynamics/components/dynamic-conditional-control.tsx
|
|
5764
|
-
var
|
|
5765
|
-
var
|
|
5377
|
+
var React87 = __toESM(require("react"));
|
|
5378
|
+
var import_editor_props19 = require("@elementor/editor-props");
|
|
5766
5379
|
var DynamicConditionalControl = ({
|
|
5767
5380
|
children,
|
|
5768
5381
|
propType,
|
|
5769
5382
|
propsSchema,
|
|
5770
5383
|
dynamicSettings
|
|
5771
5384
|
}) => {
|
|
5772
|
-
const defaults =
|
|
5385
|
+
const defaults = React87.useMemo(() => {
|
|
5773
5386
|
if (!propsSchema) {
|
|
5774
5387
|
return {};
|
|
5775
5388
|
}
|
|
@@ -5779,7 +5392,7 @@ var DynamicConditionalControl = ({
|
|
|
5779
5392
|
return result;
|
|
5780
5393
|
}, {});
|
|
5781
5394
|
}, [propsSchema]);
|
|
5782
|
-
const convertedSettings =
|
|
5395
|
+
const convertedSettings = React87.useMemo(() => {
|
|
5783
5396
|
if (!dynamicSettings) {
|
|
5784
5397
|
return {};
|
|
5785
5398
|
}
|
|
@@ -5798,19 +5411,19 @@ var DynamicConditionalControl = ({
|
|
|
5798
5411
|
{}
|
|
5799
5412
|
);
|
|
5800
5413
|
}, [dynamicSettings]);
|
|
5801
|
-
const effectiveSettings =
|
|
5414
|
+
const effectiveSettings = React87.useMemo(() => {
|
|
5802
5415
|
return { ...defaults, ...convertedSettings };
|
|
5803
5416
|
}, [defaults, convertedSettings]);
|
|
5804
5417
|
if (!propType?.dependencies?.terms.length) {
|
|
5805
|
-
return /* @__PURE__ */
|
|
5418
|
+
return /* @__PURE__ */ React87.createElement(React87.Fragment, null, children);
|
|
5806
5419
|
}
|
|
5807
|
-
const isHidden = !(0,
|
|
5808
|
-
return isHidden ? null : /* @__PURE__ */
|
|
5420
|
+
const isHidden = !(0, import_editor_props19.isDependencyMet)(propType?.dependencies, effectiveSettings).isMet;
|
|
5421
|
+
return isHidden ? null : /* @__PURE__ */ React87.createElement(React87.Fragment, null, children);
|
|
5809
5422
|
};
|
|
5810
5423
|
|
|
5811
5424
|
// src/dynamics/dynamic-control.tsx
|
|
5812
5425
|
var DynamicControl = ({ bind, children }) => {
|
|
5813
|
-
const { value, setValue } = (0,
|
|
5426
|
+
const { value, setValue } = (0, import_editor_controls56.useBoundProp)(dynamicPropTypeUtil);
|
|
5814
5427
|
const { name = "", settings } = value ?? {};
|
|
5815
5428
|
const dynamicTag = useDynamicTag(name);
|
|
5816
5429
|
if (!dynamicTag) {
|
|
@@ -5829,7 +5442,7 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
5829
5442
|
});
|
|
5830
5443
|
};
|
|
5831
5444
|
const propType = createTopLevelObjectType({ schema: dynamicTag.props_schema });
|
|
5832
|
-
return /* @__PURE__ */
|
|
5445
|
+
return /* @__PURE__ */ React88.createElement(import_editor_controls56.PropProvider, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React88.createElement(import_editor_controls56.PropKeyProvider, { bind }, /* @__PURE__ */ React88.createElement(
|
|
5833
5446
|
DynamicConditionalControl,
|
|
5834
5447
|
{
|
|
5835
5448
|
propType: dynamicPropType,
|
|
@@ -5841,20 +5454,20 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
5841
5454
|
};
|
|
5842
5455
|
|
|
5843
5456
|
// src/dynamics/components/dynamic-selection.tsx
|
|
5844
|
-
var
|
|
5845
|
-
var
|
|
5846
|
-
var
|
|
5847
|
-
var
|
|
5848
|
-
var
|
|
5849
|
-
var
|
|
5850
|
-
var
|
|
5851
|
-
var
|
|
5457
|
+
var import_react40 = require("react");
|
|
5458
|
+
var React89 = __toESM(require("react"));
|
|
5459
|
+
var import_editor_controls57 = require("@elementor/editor-controls");
|
|
5460
|
+
var import_editor_ui6 = require("@elementor/editor-ui");
|
|
5461
|
+
var import_icons25 = require("@elementor/icons");
|
|
5462
|
+
var import_ui42 = require("@elementor/ui");
|
|
5463
|
+
var import_i18n60 = require("@wordpress/i18n");
|
|
5464
|
+
var SIZE4 = "tiny";
|
|
5852
5465
|
var DynamicSelection = ({ close: closePopover }) => {
|
|
5853
|
-
const [searchValue, setSearchValue] = (0,
|
|
5466
|
+
const [searchValue, setSearchValue] = (0, import_react40.useState)("");
|
|
5854
5467
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
5855
|
-
const theme = (0,
|
|
5856
|
-
const { value: anyValue } = (0,
|
|
5857
|
-
const { bind, value: dynamicValue, setValue } = (0,
|
|
5468
|
+
const theme = (0, import_ui42.useTheme)();
|
|
5469
|
+
const { value: anyValue } = (0, import_editor_controls57.useBoundProp)();
|
|
5470
|
+
const { bind, value: dynamicValue, setValue } = (0, import_editor_controls57.useBoundProp)(dynamicPropTypeUtil);
|
|
5858
5471
|
const [, updatePropValueHistory] = usePersistDynamicValue(bind);
|
|
5859
5472
|
const isCurrentValueDynamic = !!dynamicValue;
|
|
5860
5473
|
const options12 = useFilteredOptions(searchValue);
|
|
@@ -5882,34 +5495,34 @@ var DynamicSelection = ({ close: closePopover }) => {
|
|
|
5882
5495
|
label: item.label
|
|
5883
5496
|
}))
|
|
5884
5497
|
]);
|
|
5885
|
-
return /* @__PURE__ */
|
|
5886
|
-
|
|
5498
|
+
return /* @__PURE__ */ React89.createElement(PopoverBody, { "aria-label": (0, import_i18n60.__)("Dynamic tags", "elementor") }, /* @__PURE__ */ React89.createElement(
|
|
5499
|
+
import_editor_ui6.PopoverHeader,
|
|
5887
5500
|
{
|
|
5888
|
-
title: (0,
|
|
5501
|
+
title: (0, import_i18n60.__)("Dynamic tags", "elementor"),
|
|
5889
5502
|
onClose: closePopover,
|
|
5890
|
-
icon: /* @__PURE__ */
|
|
5503
|
+
icon: /* @__PURE__ */ React89.createElement(import_icons25.DatabaseIcon, { fontSize: SIZE4 })
|
|
5891
5504
|
}
|
|
5892
|
-
), hasNoDynamicTags ? /* @__PURE__ */
|
|
5893
|
-
|
|
5505
|
+
), hasNoDynamicTags ? /* @__PURE__ */ React89.createElement(NoDynamicTags, null) : /* @__PURE__ */ React89.createElement(import_react40.Fragment, null, /* @__PURE__ */ React89.createElement(
|
|
5506
|
+
import_editor_ui6.SearchField,
|
|
5894
5507
|
{
|
|
5895
5508
|
value: searchValue,
|
|
5896
5509
|
onSearch: handleSearch,
|
|
5897
|
-
placeholder: (0,
|
|
5510
|
+
placeholder: (0, import_i18n60.__)("Search dynamic tags\u2026", "elementor")
|
|
5898
5511
|
}
|
|
5899
|
-
), /* @__PURE__ */
|
|
5900
|
-
|
|
5512
|
+
), /* @__PURE__ */ React89.createElement(import_ui42.Divider, null), /* @__PURE__ */ React89.createElement(
|
|
5513
|
+
import_editor_ui6.PopoverMenuList,
|
|
5901
5514
|
{
|
|
5902
5515
|
items: virtualizedItems,
|
|
5903
5516
|
onSelect: handleSetDynamicTag,
|
|
5904
5517
|
onClose: closePopover,
|
|
5905
5518
|
selectedValue: dynamicValue?.name,
|
|
5906
5519
|
itemStyle: (item) => item.type === "item" ? { paddingInlineStart: theme.spacing(3.5) } : {},
|
|
5907
|
-
noResultsComponent: /* @__PURE__ */
|
|
5520
|
+
noResultsComponent: /* @__PURE__ */ React89.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") })
|
|
5908
5521
|
}
|
|
5909
5522
|
)));
|
|
5910
5523
|
};
|
|
5911
|
-
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */
|
|
5912
|
-
|
|
5524
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React89.createElement(
|
|
5525
|
+
import_ui42.Stack,
|
|
5913
5526
|
{
|
|
5914
5527
|
gap: 1,
|
|
5915
5528
|
alignItems: "center",
|
|
@@ -5919,12 +5532,12 @@ var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React95.createElem
|
|
|
5919
5532
|
color: "text.secondary",
|
|
5920
5533
|
sx: { pb: 3.5 }
|
|
5921
5534
|
},
|
|
5922
|
-
/* @__PURE__ */
|
|
5923
|
-
/* @__PURE__ */
|
|
5924
|
-
/* @__PURE__ */
|
|
5535
|
+
/* @__PURE__ */ React89.createElement(import_icons25.DatabaseIcon, { fontSize: "large" }),
|
|
5536
|
+
/* @__PURE__ */ React89.createElement(import_ui42.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n60.__)("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React89.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
5537
|
+
/* @__PURE__ */ React89.createElement(import_ui42.Typography, { align: "center", variant: "caption", sx: { display: "flex", flexDirection: "column" } }, (0, import_i18n60.__)("Try something else.", "elementor"), /* @__PURE__ */ React89.createElement(import_ui42.Link, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, (0, import_i18n60.__)("Clear & try again", "elementor")))
|
|
5925
5538
|
);
|
|
5926
|
-
var NoDynamicTags = () => /* @__PURE__ */
|
|
5927
|
-
|
|
5539
|
+
var NoDynamicTags = () => /* @__PURE__ */ React89.createElement(React89.Fragment, null, /* @__PURE__ */ React89.createElement(import_ui42.Divider, null), /* @__PURE__ */ React89.createElement(
|
|
5540
|
+
import_ui42.Stack,
|
|
5928
5541
|
{
|
|
5929
5542
|
gap: 1,
|
|
5930
5543
|
alignItems: "center",
|
|
@@ -5934,9 +5547,9 @@ var NoDynamicTags = () => /* @__PURE__ */ React95.createElement(React95.Fragment
|
|
|
5934
5547
|
color: "text.secondary",
|
|
5935
5548
|
sx: { pb: 3.5 }
|
|
5936
5549
|
},
|
|
5937
|
-
/* @__PURE__ */
|
|
5938
|
-
/* @__PURE__ */
|
|
5939
|
-
/* @__PURE__ */
|
|
5550
|
+
/* @__PURE__ */ React89.createElement(import_icons25.DatabaseIcon, { fontSize: "large" }),
|
|
5551
|
+
/* @__PURE__ */ React89.createElement(import_ui42.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n60.__)("Streamline your workflow with dynamic tags", "elementor")),
|
|
5552
|
+
/* @__PURE__ */ React89.createElement(import_ui42.Typography, { align: "center", variant: "caption" }, (0, import_i18n60.__)("You'll need Elementor Pro to use this feature.", "elementor"))
|
|
5940
5553
|
));
|
|
5941
5554
|
var useFilteredOptions = (searchValue) => {
|
|
5942
5555
|
const dynamicTags = usePropDynamicTags();
|
|
@@ -5955,13 +5568,13 @@ var useFilteredOptions = (searchValue) => {
|
|
|
5955
5568
|
};
|
|
5956
5569
|
|
|
5957
5570
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
5958
|
-
var
|
|
5571
|
+
var SIZE5 = "tiny";
|
|
5959
5572
|
var tagsWithoutTabs = ["popup"];
|
|
5960
5573
|
var DynamicSelectionControl = () => {
|
|
5961
|
-
const { setValue: setAnyValue } = (0,
|
|
5962
|
-
const { bind, value } = (0,
|
|
5574
|
+
const { setValue: setAnyValue } = (0, import_editor_controls58.useBoundProp)();
|
|
5575
|
+
const { bind, value } = (0, import_editor_controls58.useBoundProp)(dynamicPropTypeUtil);
|
|
5963
5576
|
const [propValueFromHistory] = usePersistDynamicValue(bind);
|
|
5964
|
-
const selectionPopoverState = (0,
|
|
5577
|
+
const selectionPopoverState = (0, import_ui43.usePopupState)({ variant: "popover" });
|
|
5965
5578
|
const { name: tagName = "" } = value;
|
|
5966
5579
|
const dynamicTag = useDynamicTag(tagName);
|
|
5967
5580
|
const removeDynamicTag = () => {
|
|
@@ -5970,26 +5583,26 @@ var DynamicSelectionControl = () => {
|
|
|
5970
5583
|
if (!dynamicTag) {
|
|
5971
5584
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
5972
5585
|
}
|
|
5973
|
-
return /* @__PURE__ */
|
|
5974
|
-
|
|
5586
|
+
return /* @__PURE__ */ React90.createElement(import_ui43.Box, null, /* @__PURE__ */ React90.createElement(
|
|
5587
|
+
import_ui43.UnstableTag,
|
|
5975
5588
|
{
|
|
5976
5589
|
fullWidth: true,
|
|
5977
5590
|
showActionsOnHover: true,
|
|
5978
5591
|
label: dynamicTag.label,
|
|
5979
|
-
startIcon: /* @__PURE__ */
|
|
5980
|
-
...(0,
|
|
5981
|
-
actions: /* @__PURE__ */
|
|
5982
|
-
|
|
5592
|
+
startIcon: /* @__PURE__ */ React90.createElement(import_icons26.DatabaseIcon, { fontSize: SIZE5 }),
|
|
5593
|
+
...(0, import_ui43.bindTrigger)(selectionPopoverState),
|
|
5594
|
+
actions: /* @__PURE__ */ React90.createElement(React90.Fragment, null, /* @__PURE__ */ React90.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React90.createElement(
|
|
5595
|
+
import_ui43.IconButton,
|
|
5983
5596
|
{
|
|
5984
|
-
size:
|
|
5597
|
+
size: SIZE5,
|
|
5985
5598
|
onClick: removeDynamicTag,
|
|
5986
|
-
"aria-label": (0,
|
|
5599
|
+
"aria-label": (0, import_i18n61.__)("Remove dynamic value", "elementor")
|
|
5987
5600
|
},
|
|
5988
|
-
/* @__PURE__ */
|
|
5601
|
+
/* @__PURE__ */ React90.createElement(import_icons26.XIcon, { fontSize: SIZE5 })
|
|
5989
5602
|
))
|
|
5990
5603
|
}
|
|
5991
|
-
), /* @__PURE__ */
|
|
5992
|
-
|
|
5604
|
+
), /* @__PURE__ */ React90.createElement(
|
|
5605
|
+
import_ui43.Popover,
|
|
5993
5606
|
{
|
|
5994
5607
|
disablePortal: true,
|
|
5995
5608
|
disableScrollLock: true,
|
|
@@ -5998,27 +5611,27 @@ var DynamicSelectionControl = () => {
|
|
|
5998
5611
|
PaperProps: {
|
|
5999
5612
|
sx: { my: 1 }
|
|
6000
5613
|
},
|
|
6001
|
-
...(0,
|
|
5614
|
+
...(0, import_ui43.bindPopover)(selectionPopoverState)
|
|
6002
5615
|
},
|
|
6003
|
-
/* @__PURE__ */
|
|
5616
|
+
/* @__PURE__ */ React90.createElement(PopoverBody, { "aria-label": (0, import_i18n61.__)("Dynamic tags", "elementor") }, /* @__PURE__ */ React90.createElement(DynamicSelection, { close: selectionPopoverState.close }))
|
|
6004
5617
|
));
|
|
6005
5618
|
};
|
|
6006
5619
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
6007
|
-
const popupState = (0,
|
|
5620
|
+
const popupState = (0, import_ui43.usePopupState)({ variant: "popover" });
|
|
6008
5621
|
const hasDynamicSettings = !!dynamicTag.atomic_controls.length;
|
|
6009
5622
|
if (!hasDynamicSettings) {
|
|
6010
5623
|
return null;
|
|
6011
5624
|
}
|
|
6012
|
-
return /* @__PURE__ */
|
|
6013
|
-
|
|
5625
|
+
return /* @__PURE__ */ React90.createElement(React90.Fragment, null, /* @__PURE__ */ React90.createElement(
|
|
5626
|
+
import_ui43.IconButton,
|
|
6014
5627
|
{
|
|
6015
|
-
size:
|
|
6016
|
-
...(0,
|
|
6017
|
-
"aria-label": (0,
|
|
5628
|
+
size: SIZE5,
|
|
5629
|
+
...(0, import_ui43.bindTrigger)(popupState),
|
|
5630
|
+
"aria-label": (0, import_i18n61.__)("Dynamic settings", "elementor")
|
|
6018
5631
|
},
|
|
6019
|
-
/* @__PURE__ */
|
|
6020
|
-
), /* @__PURE__ */
|
|
6021
|
-
|
|
5632
|
+
/* @__PURE__ */ React90.createElement(import_icons26.SettingsIcon, { fontSize: SIZE5 })
|
|
5633
|
+
), /* @__PURE__ */ React90.createElement(
|
|
5634
|
+
import_ui43.Popover,
|
|
6022
5635
|
{
|
|
6023
5636
|
disablePortal: true,
|
|
6024
5637
|
disableScrollLock: true,
|
|
@@ -6027,45 +5640,45 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
6027
5640
|
PaperProps: {
|
|
6028
5641
|
sx: { my: 1 }
|
|
6029
5642
|
},
|
|
6030
|
-
...(0,
|
|
5643
|
+
...(0, import_ui43.bindPopover)(popupState)
|
|
6031
5644
|
},
|
|
6032
|
-
/* @__PURE__ */
|
|
6033
|
-
|
|
5645
|
+
/* @__PURE__ */ React90.createElement(PopoverBody, { "aria-label": (0, import_i18n61.__)("Dynamic settings", "elementor") }, /* @__PURE__ */ React90.createElement(
|
|
5646
|
+
import_editor_ui7.PopoverHeader,
|
|
6034
5647
|
{
|
|
6035
5648
|
title: dynamicTag.label,
|
|
6036
5649
|
onClose: popupState.close,
|
|
6037
|
-
icon: /* @__PURE__ */
|
|
5650
|
+
icon: /* @__PURE__ */ React90.createElement(import_icons26.DatabaseIcon, { fontSize: SIZE5 })
|
|
6038
5651
|
}
|
|
6039
|
-
), /* @__PURE__ */
|
|
5652
|
+
), /* @__PURE__ */ React90.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls, tagName: dynamicTag.name }))
|
|
6040
5653
|
));
|
|
6041
5654
|
};
|
|
6042
5655
|
var DynamicSettings = ({ controls, tagName }) => {
|
|
6043
5656
|
const tabs = controls.filter(({ type }) => type === "section");
|
|
6044
|
-
const { getTabsProps, getTabProps, getTabPanelProps } = (0,
|
|
5657
|
+
const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui43.useTabs)(0);
|
|
6045
5658
|
if (!tabs.length) {
|
|
6046
5659
|
return null;
|
|
6047
5660
|
}
|
|
6048
5661
|
if (tagsWithoutTabs.includes(tagName)) {
|
|
6049
5662
|
const singleTab = tabs[0];
|
|
6050
|
-
return /* @__PURE__ */
|
|
5663
|
+
return /* @__PURE__ */ React90.createElement(React90.Fragment, null, /* @__PURE__ */ React90.createElement(import_ui43.Divider, null), /* @__PURE__ */ React90.createElement(ControlsItemsStack, { items: singleTab.value.items }));
|
|
6051
5664
|
}
|
|
6052
|
-
return /* @__PURE__ */
|
|
6053
|
-
|
|
5665
|
+
return /* @__PURE__ */ React90.createElement(React90.Fragment, null, tabs.length > 1 && /* @__PURE__ */ React90.createElement(import_ui43.Tabs, { size: "small", variant: "fullWidth", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React90.createElement(
|
|
5666
|
+
import_ui43.Tab,
|
|
6054
5667
|
{
|
|
6055
5668
|
key: index,
|
|
6056
5669
|
label: value.label,
|
|
6057
5670
|
sx: { px: 1, py: 0.5 },
|
|
6058
5671
|
...getTabProps(index)
|
|
6059
5672
|
}
|
|
6060
|
-
))), /* @__PURE__ */
|
|
6061
|
-
return /* @__PURE__ */
|
|
6062
|
-
|
|
5673
|
+
))), /* @__PURE__ */ React90.createElement(import_ui43.Divider, null), tabs.map(({ value }, index) => {
|
|
5674
|
+
return /* @__PURE__ */ React90.createElement(
|
|
5675
|
+
import_ui43.TabPanel,
|
|
6063
5676
|
{
|
|
6064
5677
|
key: index,
|
|
6065
5678
|
sx: { flexGrow: 1, py: 0, overflowY: "auto" },
|
|
6066
5679
|
...getTabPanelProps(index)
|
|
6067
5680
|
},
|
|
6068
|
-
/* @__PURE__ */
|
|
5681
|
+
/* @__PURE__ */ React90.createElement(ControlsItemsStack, { items: value.items })
|
|
6069
5682
|
);
|
|
6070
5683
|
}));
|
|
6071
5684
|
};
|
|
@@ -6107,27 +5720,27 @@ var Control3 = ({ control }) => {
|
|
|
6107
5720
|
display: "grid",
|
|
6108
5721
|
gridTemplateColumns: isSwitchControl ? "minmax(0, 1fr) max-content" : "1fr 1fr"
|
|
6109
5722
|
} : {};
|
|
6110
|
-
return /* @__PURE__ */
|
|
5723
|
+
return /* @__PURE__ */ React90.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React90.createElement(import_ui43.Grid, { container: true, gap: 0.75, sx: layoutStyleProps }, control.label ? /* @__PURE__ */ React90.createElement(import_ui43.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React90.createElement(import_editor_controls58.ControlFormLabel, null, control.label)) : null, /* @__PURE__ */ React90.createElement(import_ui43.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React90.createElement(Control, { type: control.type, props: controlProps }))));
|
|
6111
5724
|
};
|
|
6112
5725
|
function ControlsItemsStack({ items: items3 }) {
|
|
6113
|
-
return /* @__PURE__ */
|
|
6114
|
-
(item) => item.type === "control" ? /* @__PURE__ */
|
|
5726
|
+
return /* @__PURE__ */ React90.createElement(import_ui43.Stack, { p: 2, gap: 2, sx: { overflowY: "auto" } }, items3.map(
|
|
5727
|
+
(item) => item.type === "control" ? /* @__PURE__ */ React90.createElement(Control3, { key: item.value.bind, control: item.value }) : null
|
|
6115
5728
|
));
|
|
6116
5729
|
}
|
|
6117
5730
|
|
|
6118
5731
|
// src/dynamics/dynamic-transformer.ts
|
|
6119
|
-
var
|
|
6120
|
-
var
|
|
5732
|
+
var import_editor_canvas2 = require("@elementor/editor-canvas");
|
|
5733
|
+
var import_editor_props20 = require("@elementor/editor-props");
|
|
6121
5734
|
|
|
6122
5735
|
// src/dynamics/errors.ts
|
|
6123
|
-
var
|
|
6124
|
-
var DynamicTagsManagerNotFoundError = (0,
|
|
5736
|
+
var import_utils9 = require("@elementor/utils");
|
|
5737
|
+
var DynamicTagsManagerNotFoundError = (0, import_utils9.createError)({
|
|
6125
5738
|
code: "dynamic_tags_manager_not_found",
|
|
6126
5739
|
message: "Dynamic tags manager not found"
|
|
6127
5740
|
});
|
|
6128
5741
|
|
|
6129
5742
|
// src/dynamics/dynamic-transformer.ts
|
|
6130
|
-
var dynamicTransformer = (0,
|
|
5743
|
+
var dynamicTransformer = (0, import_editor_canvas2.createTransformer)((value) => {
|
|
6131
5744
|
if (!value.name) {
|
|
6132
5745
|
return null;
|
|
6133
5746
|
}
|
|
@@ -6135,7 +5748,7 @@ var dynamicTransformer = (0, import_editor_canvas4.createTransformer)((value) =>
|
|
|
6135
5748
|
});
|
|
6136
5749
|
function simpleTransform(props) {
|
|
6137
5750
|
const transformed = Object.entries(props).map(([settingKey, settingValue]) => {
|
|
6138
|
-
const value = (0,
|
|
5751
|
+
const value = (0, import_editor_props20.isTransformable)(settingValue) ? settingValue.value : settingValue;
|
|
6139
5752
|
return [settingKey, value];
|
|
6140
5753
|
});
|
|
6141
5754
|
return Object.fromEntries(transformed);
|
|
@@ -6165,18 +5778,18 @@ function getDynamicValue(name, settings) {
|
|
|
6165
5778
|
}
|
|
6166
5779
|
|
|
6167
5780
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
6168
|
-
var
|
|
6169
|
-
var
|
|
6170
|
-
var
|
|
6171
|
-
var
|
|
5781
|
+
var React91 = __toESM(require("react"));
|
|
5782
|
+
var import_editor_controls59 = require("@elementor/editor-controls");
|
|
5783
|
+
var import_icons27 = require("@elementor/icons");
|
|
5784
|
+
var import_i18n62 = require("@wordpress/i18n");
|
|
6172
5785
|
var usePropDynamicAction = () => {
|
|
6173
|
-
const { propType } = (0,
|
|
5786
|
+
const { propType } = (0, import_editor_controls59.useBoundProp)();
|
|
6174
5787
|
const visible = !!propType && supportsDynamic(propType);
|
|
6175
5788
|
return {
|
|
6176
5789
|
visible,
|
|
6177
|
-
icon:
|
|
6178
|
-
title: (0,
|
|
6179
|
-
content: ({ close }) => /* @__PURE__ */
|
|
5790
|
+
icon: import_icons27.DatabaseIcon,
|
|
5791
|
+
title: (0, import_i18n62.__)("Dynamic tags", "elementor"),
|
|
5792
|
+
content: ({ close }) => /* @__PURE__ */ React91.createElement(DynamicSelection, { close })
|
|
6180
5793
|
};
|
|
6181
5794
|
};
|
|
6182
5795
|
|
|
@@ -6187,12 +5800,12 @@ var init = () => {
|
|
|
6187
5800
|
component: DynamicSelectionControl,
|
|
6188
5801
|
condition: ({ value }) => isDynamicPropValue(value)
|
|
6189
5802
|
});
|
|
6190
|
-
(0,
|
|
5803
|
+
(0, import_editor_controls60.injectIntoRepeaterItemLabel)({
|
|
6191
5804
|
id: "dynamic-background-image",
|
|
6192
5805
|
condition: ({ value }) => isDynamicPropValue(value.value?.image?.value?.src),
|
|
6193
5806
|
component: BackgroundControlDynamicTagLabel
|
|
6194
5807
|
});
|
|
6195
|
-
(0,
|
|
5808
|
+
(0, import_editor_controls60.injectIntoRepeaterItemIcon)({
|
|
6196
5809
|
id: "dynamic-background-image",
|
|
6197
5810
|
condition: ({ value }) => isDynamicPropValue(value.value?.image?.value?.src),
|
|
6198
5811
|
component: BackgroundControlDynamicTagIcon
|
|
@@ -6201,89 +5814,483 @@ var init = () => {
|
|
|
6201
5814
|
id: "dynamic-tags",
|
|
6202
5815
|
useProps: usePropDynamicAction
|
|
6203
5816
|
});
|
|
6204
|
-
|
|
6205
|
-
|
|
5817
|
+
import_editor_canvas3.styleTransformersRegistry.register("dynamic", dynamicTransformer);
|
|
5818
|
+
import_editor_canvas3.settingsTransformersRegistry.register("dynamic", dynamicTransformer);
|
|
5819
|
+
};
|
|
5820
|
+
|
|
5821
|
+
// src/reset-style-props.tsx
|
|
5822
|
+
var import_editor_controls61 = require("@elementor/editor-controls");
|
|
5823
|
+
var import_icons28 = require("@elementor/icons");
|
|
5824
|
+
var import_i18n63 = require("@wordpress/i18n");
|
|
5825
|
+
|
|
5826
|
+
// src/utils/is-equal.ts
|
|
5827
|
+
function isEqual(a, b) {
|
|
5828
|
+
if (a === b) {
|
|
5829
|
+
return true;
|
|
5830
|
+
}
|
|
5831
|
+
if (a === null || b === null) {
|
|
5832
|
+
return false;
|
|
5833
|
+
}
|
|
5834
|
+
if (typeof a !== typeof b) {
|
|
5835
|
+
return false;
|
|
5836
|
+
}
|
|
5837
|
+
if (Array.isArray(a) && Array.isArray(b)) {
|
|
5838
|
+
if (a.length !== b.length) {
|
|
5839
|
+
return false;
|
|
5840
|
+
}
|
|
5841
|
+
for (let i = 0; i < a.length; i++) {
|
|
5842
|
+
if (!isEqual(a[i], b[i])) {
|
|
5843
|
+
return false;
|
|
5844
|
+
}
|
|
5845
|
+
}
|
|
5846
|
+
return true;
|
|
5847
|
+
}
|
|
5848
|
+
if (typeof a === "object" && typeof b === "object") {
|
|
5849
|
+
const objA = a;
|
|
5850
|
+
const objB = b;
|
|
5851
|
+
const keysA = Object.keys(objA);
|
|
5852
|
+
const keysB = Object.keys(objB);
|
|
5853
|
+
if (keysA.length !== keysB.length) {
|
|
5854
|
+
return false;
|
|
5855
|
+
}
|
|
5856
|
+
for (const key of keysA) {
|
|
5857
|
+
if (!(key in objB)) {
|
|
5858
|
+
return false;
|
|
5859
|
+
}
|
|
5860
|
+
if (!isEqual(objA[key], objB[key])) {
|
|
5861
|
+
return false;
|
|
5862
|
+
}
|
|
5863
|
+
}
|
|
5864
|
+
return true;
|
|
5865
|
+
}
|
|
5866
|
+
return false;
|
|
5867
|
+
}
|
|
5868
|
+
|
|
5869
|
+
// src/reset-style-props.tsx
|
|
5870
|
+
var { registerAction } = controlActionsMenu;
|
|
5871
|
+
function initResetStyleProps() {
|
|
5872
|
+
registerAction({
|
|
5873
|
+
id: "reset-style-value",
|
|
5874
|
+
useProps: useResetStyleValueProps
|
|
5875
|
+
});
|
|
5876
|
+
}
|
|
5877
|
+
function useResetStyleValueProps() {
|
|
5878
|
+
const isStyle = useIsStyle();
|
|
5879
|
+
const { value, resetValue, propType } = (0, import_editor_controls61.useBoundProp)();
|
|
5880
|
+
const hasValue = value !== null && value !== void 0;
|
|
5881
|
+
const hasInitial = propType.initial_value !== void 0 && propType.initial_value !== null;
|
|
5882
|
+
const isRequired = !!propType.settings?.required;
|
|
5883
|
+
function calculateVisibility() {
|
|
5884
|
+
if (!isStyle || !hasValue) {
|
|
5885
|
+
return false;
|
|
5886
|
+
}
|
|
5887
|
+
if (hasInitial) {
|
|
5888
|
+
return !isEqual(value, propType.initial_value);
|
|
5889
|
+
}
|
|
5890
|
+
return !isRequired;
|
|
5891
|
+
}
|
|
5892
|
+
const visible = calculateVisibility();
|
|
5893
|
+
return {
|
|
5894
|
+
visible,
|
|
5895
|
+
title: (0, import_i18n63.__)("Clear", "elementor"),
|
|
5896
|
+
icon: import_icons28.BrushBigIcon,
|
|
5897
|
+
onClick: () => resetValue()
|
|
5898
|
+
};
|
|
5899
|
+
}
|
|
5900
|
+
|
|
5901
|
+
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
5902
|
+
var React97 = __toESM(require("react"));
|
|
5903
|
+
var import_editor_controls62 = require("@elementor/editor-controls");
|
|
5904
|
+
var import_editor_props21 = require("@elementor/editor-props");
|
|
5905
|
+
var import_editor_styles_repository15 = require("@elementor/editor-styles-repository");
|
|
5906
|
+
var import_i18n67 = require("@wordpress/i18n");
|
|
5907
|
+
|
|
5908
|
+
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
5909
|
+
var React96 = __toESM(require("react"));
|
|
5910
|
+
var import_react42 = require("react");
|
|
5911
|
+
var import_editor_canvas5 = require("@elementor/editor-canvas");
|
|
5912
|
+
var import_editor_ui8 = require("@elementor/editor-ui");
|
|
5913
|
+
var import_ui48 = require("@elementor/ui");
|
|
5914
|
+
var import_i18n66 = require("@wordpress/i18n");
|
|
5915
|
+
|
|
5916
|
+
// src/styles-inheritance/hooks/use-normalized-inheritance-chain-items.tsx
|
|
5917
|
+
var import_react41 = require("react");
|
|
5918
|
+
var import_editor_styles8 = require("@elementor/editor-styles");
|
|
5919
|
+
var import_editor_styles_repository13 = require("@elementor/editor-styles-repository");
|
|
5920
|
+
var import_i18n64 = require("@wordpress/i18n");
|
|
5921
|
+
var MAXIMUM_ITEMS = 2;
|
|
5922
|
+
var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
5923
|
+
const [items3, setItems] = (0, import_react41.useState)([]);
|
|
5924
|
+
(0, import_react41.useEffect)(() => {
|
|
5925
|
+
(async () => {
|
|
5926
|
+
const normalizedItems = await Promise.all(
|
|
5927
|
+
inheritanceChain.filter(({ style }) => style).map((item, index) => normalizeInheritanceItem(item, index, bind, resolve))
|
|
5928
|
+
);
|
|
5929
|
+
const validItems = normalizedItems.map((item) => ({
|
|
5930
|
+
...item,
|
|
5931
|
+
displayLabel: import_editor_styles_repository13.ELEMENTS_BASE_STYLES_PROVIDER_KEY !== item.provider ? item.displayLabel : (0, import_i18n64.__)("Base", "elementor")
|
|
5932
|
+
})).filter((item) => !item.value || item.displayLabel !== "").slice(0, MAXIMUM_ITEMS);
|
|
5933
|
+
setItems(validItems);
|
|
5934
|
+
})();
|
|
5935
|
+
}, [inheritanceChain, bind, resolve]);
|
|
5936
|
+
return items3;
|
|
5937
|
+
};
|
|
5938
|
+
var DEFAULT_BREAKPOINT2 = "desktop";
|
|
5939
|
+
var normalizeInheritanceItem = async (item, index, bind, resolve) => {
|
|
5940
|
+
const {
|
|
5941
|
+
variant: {
|
|
5942
|
+
meta: { state, breakpoint }
|
|
5943
|
+
},
|
|
5944
|
+
style: { label, id }
|
|
5945
|
+
} = item;
|
|
5946
|
+
const displayLabel = getLabel({ label, state });
|
|
5947
|
+
return {
|
|
5948
|
+
id: id ? id + (state ?? "") : index,
|
|
5949
|
+
provider: item.provider || "",
|
|
5950
|
+
breakpoint: breakpoint ?? DEFAULT_BREAKPOINT2,
|
|
5951
|
+
displayLabel,
|
|
5952
|
+
value: await getTransformedValue(item, bind, resolve)
|
|
5953
|
+
};
|
|
5954
|
+
};
|
|
5955
|
+
function getLabel({ label, state }) {
|
|
5956
|
+
if ((0, import_editor_styles8.isClassState)(state)) {
|
|
5957
|
+
return `${label}.${state}`;
|
|
5958
|
+
}
|
|
5959
|
+
if ((0, import_editor_styles8.isPseudoState)(state)) {
|
|
5960
|
+
return `${label}:${state}`;
|
|
5961
|
+
}
|
|
5962
|
+
return label;
|
|
5963
|
+
}
|
|
5964
|
+
var getTransformedValue = async (item, bind, resolve) => {
|
|
5965
|
+
try {
|
|
5966
|
+
const result = await resolve({
|
|
5967
|
+
props: {
|
|
5968
|
+
[bind]: item.value
|
|
5969
|
+
}
|
|
5970
|
+
});
|
|
5971
|
+
const value = result?.[bind] ?? result;
|
|
5972
|
+
if ((0, import_react41.isValidElement)(value)) {
|
|
5973
|
+
return value;
|
|
5974
|
+
}
|
|
5975
|
+
if (typeof value === "object") {
|
|
5976
|
+
return JSON.stringify(value);
|
|
5977
|
+
}
|
|
5978
|
+
return String(value);
|
|
5979
|
+
} catch {
|
|
5980
|
+
return "";
|
|
5981
|
+
}
|
|
5982
|
+
};
|
|
5983
|
+
|
|
5984
|
+
// src/styles-inheritance/styles-inheritance-transformers-registry.tsx
|
|
5985
|
+
var import_editor_canvas4 = require("@elementor/editor-canvas");
|
|
5986
|
+
var stylesInheritanceTransformersRegistry = (0, import_editor_canvas4.createTransformersRegistry)();
|
|
5987
|
+
|
|
5988
|
+
// src/styles-inheritance/components/infotip/breakpoint-icon.tsx
|
|
5989
|
+
var React92 = __toESM(require("react"));
|
|
5990
|
+
var import_editor_responsive4 = require("@elementor/editor-responsive");
|
|
5991
|
+
var import_icons29 = require("@elementor/icons");
|
|
5992
|
+
var import_ui44 = require("@elementor/ui");
|
|
5993
|
+
var SIZE6 = "tiny";
|
|
5994
|
+
var DEFAULT_BREAKPOINT3 = "desktop";
|
|
5995
|
+
var breakpointIconMap = {
|
|
5996
|
+
widescreen: import_icons29.WidescreenIcon,
|
|
5997
|
+
desktop: import_icons29.DesktopIcon,
|
|
5998
|
+
laptop: import_icons29.LaptopIcon,
|
|
5999
|
+
tablet_extra: import_icons29.TabletLandscapeIcon,
|
|
6000
|
+
tablet: import_icons29.TabletPortraitIcon,
|
|
6001
|
+
mobile_extra: import_icons29.MobileLandscapeIcon,
|
|
6002
|
+
mobile: import_icons29.MobilePortraitIcon
|
|
6003
|
+
};
|
|
6004
|
+
var BreakpointIcon = ({ breakpoint }) => {
|
|
6005
|
+
const breakpoints = (0, import_editor_responsive4.useBreakpoints)();
|
|
6006
|
+
const currentBreakpoint = breakpoint || DEFAULT_BREAKPOINT3;
|
|
6007
|
+
const IconComponent = breakpointIconMap[currentBreakpoint];
|
|
6008
|
+
if (!IconComponent) {
|
|
6009
|
+
return null;
|
|
6010
|
+
}
|
|
6011
|
+
const breakpointLabel = breakpoints.find((breakpointItem) => breakpointItem.id === currentBreakpoint)?.label;
|
|
6012
|
+
return /* @__PURE__ */ React92.createElement(import_ui44.Tooltip, { title: breakpointLabel, placement: "top" }, /* @__PURE__ */ React92.createElement(IconComponent, { fontSize: SIZE6, sx: { mt: "2px" } }));
|
|
6013
|
+
};
|
|
6014
|
+
|
|
6015
|
+
// src/styles-inheritance/components/infotip/label-chip.tsx
|
|
6016
|
+
var React93 = __toESM(require("react"));
|
|
6017
|
+
var import_editor_styles_repository14 = require("@elementor/editor-styles-repository");
|
|
6018
|
+
var import_icons30 = require("@elementor/icons");
|
|
6019
|
+
var import_ui45 = require("@elementor/ui");
|
|
6020
|
+
var import_i18n65 = require("@wordpress/i18n");
|
|
6021
|
+
var SIZE7 = "tiny";
|
|
6022
|
+
var LabelChip = ({ displayLabel, provider }) => {
|
|
6023
|
+
const isBaseStyle = provider === import_editor_styles_repository14.ELEMENTS_BASE_STYLES_PROVIDER_KEY;
|
|
6024
|
+
const chipIcon = isBaseStyle ? /* @__PURE__ */ React93.createElement(import_ui45.Tooltip, { title: (0, import_i18n65.__)("Inherited from base styles", "elementor"), placement: "top" }, /* @__PURE__ */ React93.createElement(import_icons30.InfoCircleIcon, { fontSize: SIZE7 })) : void 0;
|
|
6025
|
+
return /* @__PURE__ */ React93.createElement(
|
|
6026
|
+
import_ui45.Chip,
|
|
6027
|
+
{
|
|
6028
|
+
label: displayLabel,
|
|
6029
|
+
size: SIZE7,
|
|
6030
|
+
color: getStylesProviderColorName(provider),
|
|
6031
|
+
variant: "standard",
|
|
6032
|
+
state: "enabled",
|
|
6033
|
+
icon: chipIcon,
|
|
6034
|
+
sx: (theme) => ({
|
|
6035
|
+
lineHeight: 1,
|
|
6036
|
+
flexWrap: "nowrap",
|
|
6037
|
+
alignItems: "center",
|
|
6038
|
+
borderRadius: `${theme.shape.borderRadius * 0.75}px`,
|
|
6039
|
+
flexDirection: "row-reverse",
|
|
6040
|
+
".MuiChip-label": {
|
|
6041
|
+
overflow: "hidden",
|
|
6042
|
+
textOverflow: "ellipsis",
|
|
6043
|
+
whiteSpace: "nowrap"
|
|
6044
|
+
}
|
|
6045
|
+
})
|
|
6046
|
+
}
|
|
6047
|
+
);
|
|
6048
|
+
};
|
|
6049
|
+
|
|
6050
|
+
// src/styles-inheritance/components/infotip/value-component.tsx
|
|
6051
|
+
var React94 = __toESM(require("react"));
|
|
6052
|
+
var import_ui46 = require("@elementor/ui");
|
|
6053
|
+
var ValueComponent = ({ index, value }) => {
|
|
6054
|
+
return /* @__PURE__ */ React94.createElement(
|
|
6055
|
+
import_ui46.Typography,
|
|
6056
|
+
{
|
|
6057
|
+
variant: "caption",
|
|
6058
|
+
color: "text.tertiary",
|
|
6059
|
+
sx: {
|
|
6060
|
+
mt: "1px",
|
|
6061
|
+
textDecoration: index === 0 ? "none" : "line-through",
|
|
6062
|
+
overflow: "hidden",
|
|
6063
|
+
textOverflow: "ellipsis",
|
|
6064
|
+
whiteSpace: "nowrap",
|
|
6065
|
+
pl: 2.5,
|
|
6066
|
+
minWidth: 0,
|
|
6067
|
+
maxWidth: "100%"
|
|
6068
|
+
}
|
|
6069
|
+
},
|
|
6070
|
+
value
|
|
6071
|
+
);
|
|
6206
6072
|
};
|
|
6207
6073
|
|
|
6208
|
-
// src/
|
|
6209
|
-
var
|
|
6210
|
-
var
|
|
6211
|
-
var
|
|
6074
|
+
// src/styles-inheritance/components/infotip/action-icons.tsx
|
|
6075
|
+
var React95 = __toESM(require("react"));
|
|
6076
|
+
var import_ui47 = require("@elementor/ui");
|
|
6077
|
+
var ActionIcons = () => /* @__PURE__ */ React95.createElement(import_ui47.Box, { display: "flex", gap: 0.5, alignItems: "center" });
|
|
6212
6078
|
|
|
6213
|
-
// src/
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
|
|
6218
|
-
|
|
6219
|
-
|
|
6220
|
-
|
|
6221
|
-
|
|
6222
|
-
|
|
6223
|
-
|
|
6224
|
-
|
|
6225
|
-
if (
|
|
6226
|
-
return
|
|
6227
|
-
}
|
|
6228
|
-
for (let i = 0; i < a.length; i++) {
|
|
6229
|
-
if (!isEqual(a[i], b[i])) {
|
|
6230
|
-
return false;
|
|
6231
|
-
}
|
|
6079
|
+
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
6080
|
+
var SECTION_PADDING_INLINE = 32;
|
|
6081
|
+
var StylesInheritanceInfotip = ({
|
|
6082
|
+
inheritanceChain,
|
|
6083
|
+
propType,
|
|
6084
|
+
path,
|
|
6085
|
+
label,
|
|
6086
|
+
children,
|
|
6087
|
+
isDisabled
|
|
6088
|
+
}) => {
|
|
6089
|
+
const [showInfotip, setShowInfotip] = (0, import_react42.useState)(false);
|
|
6090
|
+
const toggleInfotip = () => {
|
|
6091
|
+
if (isDisabled) {
|
|
6092
|
+
return;
|
|
6232
6093
|
}
|
|
6233
|
-
|
|
6234
|
-
}
|
|
6235
|
-
|
|
6236
|
-
|
|
6237
|
-
|
|
6238
|
-
const keysA = Object.keys(objA);
|
|
6239
|
-
const keysB = Object.keys(objB);
|
|
6240
|
-
if (keysA.length !== keysB.length) {
|
|
6241
|
-
return false;
|
|
6094
|
+
setShowInfotip((prev) => !prev);
|
|
6095
|
+
};
|
|
6096
|
+
const closeInfotip = () => {
|
|
6097
|
+
if (isDisabled) {
|
|
6098
|
+
return;
|
|
6242
6099
|
}
|
|
6243
|
-
|
|
6244
|
-
|
|
6245
|
-
|
|
6100
|
+
setShowInfotip(false);
|
|
6101
|
+
};
|
|
6102
|
+
const key = path.join(".");
|
|
6103
|
+
const sectionWidth = useSectionWidth();
|
|
6104
|
+
const resolve = (0, import_react42.useMemo)(() => {
|
|
6105
|
+
return (0, import_editor_canvas5.createPropsResolver)({
|
|
6106
|
+
transformers: stylesInheritanceTransformersRegistry,
|
|
6107
|
+
schema: { [key]: propType }
|
|
6108
|
+
});
|
|
6109
|
+
}, [key, propType]);
|
|
6110
|
+
const items3 = useNormalizedInheritanceChainItems(inheritanceChain, key, resolve);
|
|
6111
|
+
const infotipContent = /* @__PURE__ */ React96.createElement(import_ui48.ClickAwayListener, { onClickAway: closeInfotip }, /* @__PURE__ */ React96.createElement(
|
|
6112
|
+
import_ui48.Card,
|
|
6113
|
+
{
|
|
6114
|
+
elevation: 0,
|
|
6115
|
+
sx: {
|
|
6116
|
+
width: `${sectionWidth - SECTION_PADDING_INLINE}px`,
|
|
6117
|
+
maxWidth: 496,
|
|
6118
|
+
maxHeight: 268,
|
|
6119
|
+
overflowX: "hidden",
|
|
6120
|
+
display: "flex",
|
|
6121
|
+
flexDirection: "column"
|
|
6246
6122
|
}
|
|
6247
|
-
|
|
6248
|
-
|
|
6123
|
+
},
|
|
6124
|
+
/* @__PURE__ */ React96.createElement(
|
|
6125
|
+
import_ui48.Box,
|
|
6126
|
+
{
|
|
6127
|
+
sx: {
|
|
6128
|
+
position: "sticky",
|
|
6129
|
+
top: 0,
|
|
6130
|
+
zIndex: 1,
|
|
6131
|
+
backgroundColor: "background.paper"
|
|
6132
|
+
}
|
|
6133
|
+
},
|
|
6134
|
+
/* @__PURE__ */ React96.createElement(import_editor_ui8.PopoverHeader, { title: (0, import_i18n66.__)("Style origin", "elementor"), onClose: closeInfotip })
|
|
6135
|
+
),
|
|
6136
|
+
/* @__PURE__ */ React96.createElement(
|
|
6137
|
+
import_ui48.CardContent,
|
|
6138
|
+
{
|
|
6139
|
+
sx: {
|
|
6140
|
+
display: "flex",
|
|
6141
|
+
flexDirection: "column",
|
|
6142
|
+
p: 0,
|
|
6143
|
+
flex: 1,
|
|
6144
|
+
overflow: "auto",
|
|
6145
|
+
"&:last-child": {
|
|
6146
|
+
pb: 0
|
|
6147
|
+
}
|
|
6148
|
+
}
|
|
6149
|
+
},
|
|
6150
|
+
/* @__PURE__ */ React96.createElement(import_ui48.Stack, { gap: 1.5, sx: { pl: 3, pr: 1, pb: 2 }, role: "list" }, items3.map((item, index) => {
|
|
6151
|
+
return /* @__PURE__ */ React96.createElement(
|
|
6152
|
+
import_ui48.Box,
|
|
6153
|
+
{
|
|
6154
|
+
key: item.id,
|
|
6155
|
+
display: "flex",
|
|
6156
|
+
gap: 0.5,
|
|
6157
|
+
role: "listitem",
|
|
6158
|
+
"aria-label": (0, import_i18n66.__)("Inheritance item: %s", "elementor").replace(
|
|
6159
|
+
"%s",
|
|
6160
|
+
item.displayLabel
|
|
6161
|
+
)
|
|
6162
|
+
},
|
|
6163
|
+
/* @__PURE__ */ React96.createElement(
|
|
6164
|
+
import_ui48.Box,
|
|
6165
|
+
{
|
|
6166
|
+
display: "flex",
|
|
6167
|
+
gap: 0.5,
|
|
6168
|
+
sx: { flexWrap: "wrap", width: "100%", alignItems: "flex-start" }
|
|
6169
|
+
},
|
|
6170
|
+
/* @__PURE__ */ React96.createElement(BreakpointIcon, { breakpoint: item.breakpoint }),
|
|
6171
|
+
/* @__PURE__ */ React96.createElement(LabelChip, { displayLabel: item.displayLabel, provider: item.provider }),
|
|
6172
|
+
/* @__PURE__ */ React96.createElement(ValueComponent, { index, value: item.value })
|
|
6173
|
+
),
|
|
6174
|
+
/* @__PURE__ */ React96.createElement(ActionIcons, null)
|
|
6175
|
+
);
|
|
6176
|
+
}))
|
|
6177
|
+
)
|
|
6178
|
+
));
|
|
6179
|
+
if (isDisabled) {
|
|
6180
|
+
return /* @__PURE__ */ React96.createElement(import_ui48.Box, { sx: { display: "inline-flex" } }, children);
|
|
6181
|
+
}
|
|
6182
|
+
return /* @__PURE__ */ React96.createElement(
|
|
6183
|
+
TooltipOrInfotip,
|
|
6184
|
+
{
|
|
6185
|
+
showInfotip,
|
|
6186
|
+
onClose: closeInfotip,
|
|
6187
|
+
infotipContent,
|
|
6188
|
+
isDisabled
|
|
6189
|
+
},
|
|
6190
|
+
/* @__PURE__ */ React96.createElement(import_ui48.IconButton, { onClick: toggleInfotip, "aria-label": label, sx: { my: "-1px" }, disabled: isDisabled }, children)
|
|
6191
|
+
);
|
|
6192
|
+
};
|
|
6193
|
+
function TooltipOrInfotip({
|
|
6194
|
+
children,
|
|
6195
|
+
showInfotip,
|
|
6196
|
+
onClose,
|
|
6197
|
+
infotipContent,
|
|
6198
|
+
isDisabled
|
|
6199
|
+
}) {
|
|
6200
|
+
const direction = useDirection();
|
|
6201
|
+
const isSiteRtl = direction.isSiteRtl;
|
|
6202
|
+
const forceInfotipAlignLeft = isSiteRtl ? 9999999 : -9999999;
|
|
6203
|
+
if (isDisabled) {
|
|
6204
|
+
return /* @__PURE__ */ React96.createElement(import_ui48.Box, { sx: { display: "inline-flex" } }, children);
|
|
6205
|
+
}
|
|
6206
|
+
if (showInfotip) {
|
|
6207
|
+
return /* @__PURE__ */ React96.createElement(React96.Fragment, null, /* @__PURE__ */ React96.createElement(
|
|
6208
|
+
import_ui48.Backdrop,
|
|
6209
|
+
{
|
|
6210
|
+
open: showInfotip,
|
|
6211
|
+
onClick: onClose,
|
|
6212
|
+
sx: {
|
|
6213
|
+
backgroundColor: "transparent",
|
|
6214
|
+
zIndex: (theme) => theme.zIndex.modal - 1
|
|
6215
|
+
}
|
|
6249
6216
|
}
|
|
6250
|
-
|
|
6251
|
-
|
|
6217
|
+
), /* @__PURE__ */ React96.createElement(
|
|
6218
|
+
import_ui48.Infotip,
|
|
6219
|
+
{
|
|
6220
|
+
placement: "top",
|
|
6221
|
+
content: infotipContent,
|
|
6222
|
+
open: showInfotip,
|
|
6223
|
+
onClose,
|
|
6224
|
+
disableHoverListener: true,
|
|
6225
|
+
componentsProps: {
|
|
6226
|
+
tooltip: {
|
|
6227
|
+
sx: { mx: 2 }
|
|
6228
|
+
}
|
|
6229
|
+
},
|
|
6230
|
+
slotProps: {
|
|
6231
|
+
popper: {
|
|
6232
|
+
modifiers: [
|
|
6233
|
+
{
|
|
6234
|
+
name: "offset",
|
|
6235
|
+
options: { offset: [forceInfotipAlignLeft, 0] }
|
|
6236
|
+
}
|
|
6237
|
+
]
|
|
6238
|
+
}
|
|
6239
|
+
}
|
|
6240
|
+
},
|
|
6241
|
+
children
|
|
6242
|
+
));
|
|
6252
6243
|
}
|
|
6253
|
-
return
|
|
6244
|
+
return /* @__PURE__ */ React96.createElement(import_ui48.Tooltip, { title: (0, import_i18n66.__)("Style origin", "elementor"), placement: "top" }, children);
|
|
6254
6245
|
}
|
|
6255
6246
|
|
|
6256
|
-
// src/
|
|
6257
|
-
var
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
const isStyle = useIsStyle();
|
|
6266
|
-
const { value, resetValue, propType } = (0, import_editor_controls62.useBoundProp)();
|
|
6267
|
-
const hasValue = value !== null && value !== void 0;
|
|
6268
|
-
const hasInitial = propType.initial_value !== void 0 && propType.initial_value !== null;
|
|
6269
|
-
const isRequired = !!propType.settings?.required;
|
|
6270
|
-
function calculateVisibility() {
|
|
6271
|
-
if (!isStyle || !hasValue) {
|
|
6272
|
-
return false;
|
|
6273
|
-
}
|
|
6274
|
-
if (hasInitial) {
|
|
6275
|
-
return !isEqual(value, propType.initial_value);
|
|
6276
|
-
}
|
|
6277
|
-
return !isRequired;
|
|
6247
|
+
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
6248
|
+
var StylesInheritanceIndicator = ({
|
|
6249
|
+
customContext
|
|
6250
|
+
}) => {
|
|
6251
|
+
const context = (0, import_editor_controls62.useBoundProp)();
|
|
6252
|
+
const { path, propType } = customContext || context;
|
|
6253
|
+
const inheritanceChain = useStylesInheritanceChain(path);
|
|
6254
|
+
if (!path || !inheritanceChain.length) {
|
|
6255
|
+
return null;
|
|
6278
6256
|
}
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6257
|
+
return /* @__PURE__ */ React97.createElement(Indicator, { inheritanceChain, path, propType });
|
|
6258
|
+
};
|
|
6259
|
+
var Indicator = ({ inheritanceChain, path, propType, isDisabled }) => {
|
|
6260
|
+
const { id: currentStyleId, provider: currentStyleProvider, meta: currentStyleMeta } = useStyle();
|
|
6261
|
+
const currentItem = currentStyleId ? getValueFromInheritanceChain(inheritanceChain, currentStyleId, currentStyleMeta) : null;
|
|
6262
|
+
const hasValue = !(0, import_editor_props21.isEmpty)(currentItem?.value);
|
|
6263
|
+
const [actualStyle] = inheritanceChain;
|
|
6264
|
+
if (actualStyle.provider === import_editor_styles_repository15.ELEMENTS_BASE_STYLES_PROVIDER_KEY) {
|
|
6265
|
+
return null;
|
|
6266
|
+
}
|
|
6267
|
+
const isFinalValue = currentItem === actualStyle;
|
|
6268
|
+
const label = getLabel2({ isFinalValue, hasValue });
|
|
6269
|
+
const styleIndicatorProps = {
|
|
6270
|
+
getColor: isFinalValue && currentStyleProvider ? getStylesProviderThemeColor(currentStyleProvider.getKey()) : void 0,
|
|
6271
|
+
isOverridden: hasValue && !isFinalValue ? true : void 0
|
|
6285
6272
|
};
|
|
6286
|
-
|
|
6273
|
+
return /* @__PURE__ */ React97.createElement(
|
|
6274
|
+
StylesInheritanceInfotip,
|
|
6275
|
+
{
|
|
6276
|
+
inheritanceChain,
|
|
6277
|
+
path,
|
|
6278
|
+
propType,
|
|
6279
|
+
label,
|
|
6280
|
+
isDisabled
|
|
6281
|
+
},
|
|
6282
|
+
/* @__PURE__ */ React97.createElement(StyleIndicator, { ...styleIndicatorProps })
|
|
6283
|
+
);
|
|
6284
|
+
};
|
|
6285
|
+
var getLabel2 = ({ isFinalValue, hasValue }) => {
|
|
6286
|
+
if (isFinalValue) {
|
|
6287
|
+
return (0, import_i18n67.__)("This is the final value", "elementor");
|
|
6288
|
+
}
|
|
6289
|
+
if (hasValue) {
|
|
6290
|
+
return (0, import_i18n67.__)("This value is overridden by another style", "elementor");
|
|
6291
|
+
}
|
|
6292
|
+
return (0, import_i18n67.__)("This has value from another style", "elementor");
|
|
6293
|
+
};
|
|
6287
6294
|
|
|
6288
6295
|
// src/styles-inheritance/init-styles-inheritance-transformers.ts
|
|
6289
6296
|
var import_editor_canvas13 = require("@elementor/editor-canvas");
|
|
@@ -6504,6 +6511,12 @@ function registerCustomTransformers(originalStyleTransformers) {
|
|
|
6504
6511
|
// src/styles-inheritance/init.ts
|
|
6505
6512
|
var init2 = () => {
|
|
6506
6513
|
initStylesInheritanceTransformers();
|
|
6514
|
+
registerFieldIndicator({
|
|
6515
|
+
fieldType: FIELD_TYPE.STYLES,
|
|
6516
|
+
id: "styles-inheritance",
|
|
6517
|
+
priority: 1,
|
|
6518
|
+
indicator: StylesInheritanceIndicator
|
|
6519
|
+
});
|
|
6507
6520
|
};
|
|
6508
6521
|
|
|
6509
6522
|
// src/init.ts
|