@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.mjs
CHANGED
|
@@ -4313,40 +4313,11 @@ var GridSizeFields = () => /* @__PURE__ */ React51.createElement(Grid4, { contai
|
|
|
4313
4313
|
|
|
4314
4314
|
// src/components/style-sections/layout-section/grid-span-field.tsx
|
|
4315
4315
|
import * as React52 from "react";
|
|
4316
|
-
import {
|
|
4316
|
+
import { GridSpanControl } from "@elementor/editor-controls";
|
|
4317
4317
|
import { Grid as Grid5 } from "@elementor/ui";
|
|
4318
4318
|
import { __ as __30 } from "@wordpress/i18n";
|
|
4319
|
-
var
|
|
4320
|
-
|
|
4321
|
-
const { value, setValue, canEdit } = useStylesField(cssProp, {
|
|
4322
|
-
history: { propDisplayName: label }
|
|
4323
|
-
});
|
|
4324
|
-
const spanValue = value?.value ?? null;
|
|
4325
|
-
const handleChange = (event) => {
|
|
4326
|
-
const raw = event.target.value;
|
|
4327
|
-
if (raw === "") {
|
|
4328
|
-
setValue(null);
|
|
4329
|
-
return;
|
|
4330
|
-
}
|
|
4331
|
-
const num = parseInt(raw, 10);
|
|
4332
|
-
if (Number.isNaN(num)) {
|
|
4333
|
-
return;
|
|
4334
|
-
}
|
|
4335
|
-
const clamped = Math.max(num, MIN_SPAN);
|
|
4336
|
-
setValue({ $$type: "span", value: clamped });
|
|
4337
|
-
};
|
|
4338
|
-
return /* @__PURE__ */ React52.createElement(StylesFieldLayout, { label, direction: "column" }, /* @__PURE__ */ React52.createElement(
|
|
4339
|
-
NumberInput,
|
|
4340
|
-
{
|
|
4341
|
-
size: "tiny",
|
|
4342
|
-
type: "number",
|
|
4343
|
-
fullWidth: true,
|
|
4344
|
-
disabled: !canEdit,
|
|
4345
|
-
value: spanValue ?? "",
|
|
4346
|
-
onInput: handleChange,
|
|
4347
|
-
inputProps: { min: MIN_SPAN }
|
|
4348
|
-
}
|
|
4349
|
-
));
|
|
4319
|
+
var GridSpanFieldContent = ({ label }) => {
|
|
4320
|
+
return /* @__PURE__ */ React52.createElement(StylesFieldLayout, { label, direction: "column" }, /* @__PURE__ */ React52.createElement(GridSpanControl, null));
|
|
4350
4321
|
};
|
|
4351
4322
|
var GridSpanField = ({ cssProp, label }) => /* @__PURE__ */ React52.createElement(StylesField, { bind: cssProp, propDisplayName: label }, /* @__PURE__ */ React52.createElement(UiProviders, null, /* @__PURE__ */ React52.createElement(GridSpanFieldContent, { cssProp, label })));
|
|
4352
4323
|
var GridSpanFields = () => /* @__PURE__ */ React52.createElement(Grid5, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React52.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(GridSpanField, { cssProp: "grid-column", label: __30("Column Span", "elementor") })), /* @__PURE__ */ React52.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(GridSpanField, { cssProp: "grid-row", label: __30("Row Span", "elementor") })));
|