@elementor/editor-editing-panel 4.2.0-854 → 4.2.0-855
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -4244,37 +4244,8 @@ var React52 = __toESM(require("react"));
|
|
|
4244
4244
|
var import_editor_controls27 = require("@elementor/editor-controls");
|
|
4245
4245
|
var import_ui31 = require("@elementor/ui");
|
|
4246
4246
|
var import_i18n30 = require("@wordpress/i18n");
|
|
4247
|
-
var
|
|
4248
|
-
|
|
4249
|
-
const { value, setValue, canEdit } = useStylesField(cssProp, {
|
|
4250
|
-
history: { propDisplayName: label }
|
|
4251
|
-
});
|
|
4252
|
-
const spanValue = value?.value ?? null;
|
|
4253
|
-
const handleChange = (event) => {
|
|
4254
|
-
const raw = event.target.value;
|
|
4255
|
-
if (raw === "") {
|
|
4256
|
-
setValue(null);
|
|
4257
|
-
return;
|
|
4258
|
-
}
|
|
4259
|
-
const num = parseInt(raw, 10);
|
|
4260
|
-
if (Number.isNaN(num)) {
|
|
4261
|
-
return;
|
|
4262
|
-
}
|
|
4263
|
-
const clamped = Math.max(num, MIN_SPAN);
|
|
4264
|
-
setValue({ $$type: "span", value: clamped });
|
|
4265
|
-
};
|
|
4266
|
-
return /* @__PURE__ */ React52.createElement(StylesFieldLayout, { label, direction: "column" }, /* @__PURE__ */ React52.createElement(
|
|
4267
|
-
import_editor_controls27.NumberInput,
|
|
4268
|
-
{
|
|
4269
|
-
size: "tiny",
|
|
4270
|
-
type: "number",
|
|
4271
|
-
fullWidth: true,
|
|
4272
|
-
disabled: !canEdit,
|
|
4273
|
-
value: spanValue ?? "",
|
|
4274
|
-
onInput: handleChange,
|
|
4275
|
-
inputProps: { min: MIN_SPAN }
|
|
4276
|
-
}
|
|
4277
|
-
));
|
|
4247
|
+
var GridSpanFieldContent = ({ label }) => {
|
|
4248
|
+
return /* @__PURE__ */ React52.createElement(StylesFieldLayout, { label, direction: "column" }, /* @__PURE__ */ React52.createElement(import_editor_controls27.GridSpanControl, null));
|
|
4278
4249
|
};
|
|
4279
4250
|
var GridSpanField = ({ cssProp, label }) => /* @__PURE__ */ React52.createElement(StylesField, { bind: cssProp, propDisplayName: label }, /* @__PURE__ */ React52.createElement(UiProviders, null, /* @__PURE__ */ React52.createElement(GridSpanFieldContent, { cssProp, label })));
|
|
4280
4251
|
var GridSpanFields = () => /* @__PURE__ */ React52.createElement(import_ui31.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React52.createElement(import_ui31.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(GridSpanField, { cssProp: "grid-column", label: (0, import_i18n30.__)("Column Span", "elementor") })), /* @__PURE__ */ React52.createElement(import_ui31.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(GridSpanField, { cssProp: "grid-row", label: (0, import_i18n30.__)("Row Span", "elementor") })));
|