@flozy/editor 1.8.3 → 1.8.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. package/dist/Editor/CommonEditor.js +10 -8
  2. package/dist/Editor/Editor.css +15 -12
  3. package/dist/Editor/Elements/AppHeader/AppHeader.js +5 -11
  4. package/dist/Editor/Elements/Button/EditorButton.js +4 -10
  5. package/dist/Editor/Elements/Carousel/Arrows.js +6 -2
  6. package/dist/Editor/Elements/Carousel/Carousel.js +1 -1
  7. package/dist/Editor/Elements/ChipText/ChipText.js +8 -12
  8. package/dist/Editor/Elements/Color Picker/ColorPicker.js +5 -3
  9. package/dist/Editor/Elements/Color Picker/Styles.js +3 -17
  10. package/dist/Editor/Elements/Color Picker/colorWheel.png +0 -0
  11. package/dist/Editor/Elements/Embed/Embed.css +48 -45
  12. package/dist/Editor/Elements/Embed/Image.js +8 -14
  13. package/dist/Editor/Elements/Embed/Video.js +1 -7
  14. package/dist/Editor/Elements/Form/Form.js +17 -23
  15. package/dist/Editor/Elements/Form/FormElements/FormText.js +8 -12
  16. package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +8 -12
  17. package/dist/Editor/Elements/Grid/Grid.js +8 -20
  18. package/dist/Editor/Elements/Grid/GridItem.js +13 -23
  19. package/dist/Editor/Elements/Grid/templates/carousel_item.js +2 -3
  20. package/dist/Editor/Elements/Grid/templates/default_grid.js +2 -2
  21. package/dist/Editor/Elements/SimpleText.js +0 -1
  22. package/dist/Editor/Elements/Table/Table.js +3 -1
  23. package/dist/Editor/Elements/TopBanner/TopBanner.js +3 -1
  24. package/dist/Editor/IframeEditor.js +36 -0
  25. package/dist/Editor/MiniEditor.js +6 -8
  26. package/dist/Editor/Styles/EditorStyles.js +13 -2
  27. package/dist/Editor/Toolbar/Basic/index.js +3 -1
  28. package/dist/Editor/Toolbar/FormatTools/TextSize.js +30 -13
  29. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +7 -1
  30. package/dist/Editor/common/Icon.js +3 -0
  31. package/dist/Editor/common/Section/index.js +13 -16
  32. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +13 -4
  33. package/dist/Editor/common/StyleBuilder/fieldTypes/gridSize.js +10 -3
  34. package/dist/Editor/common/StyleBuilder/formStyle.js +3 -0
  35. package/dist/Editor/common/StyleBuilder/sectionStyle.js +1 -1
  36. package/dist/Editor/helper/theme.js +83 -0
  37. package/dist/Editor/hooks/useWindowMessage.js +35 -0
  38. package/dist/Editor/hooks/useWindowResize.js +5 -2
  39. package/dist/Editor/plugins/withLayout.js +42 -27
  40. package/dist/Editor/utils/SlateUtilityFunctions.js +22 -5
  41. package/dist/index.js +3 -1
  42. package/package.json +1 -1
  43. package/dist/Editor/Elements/Color Picker/LogoIcon.js +0 -25
@@ -1,4 +1,6 @@
1
1
  import React from "react";
2
+ import { Box } from "@mui/material";
3
+ import { getTRBLBreakPoints } from "../../../helper/theme";
2
4
  import { jsx as _jsx } from "react/jsx-runtime";
3
5
  const FormTextArea = props => {
4
6
  const {
@@ -15,12 +17,6 @@ const FormTextArea = props => {
15
17
  bgColor,
16
18
  ...rest
17
19
  } = fieldProps;
18
- const {
19
- left,
20
- top,
21
- right,
22
- bottom
23
- } = bannerSpacing || {};
24
20
  const {
25
21
  topLeft,
26
22
  topRight,
@@ -36,16 +32,16 @@ const FormTextArea = props => {
36
32
  display: "flex"
37
33
  },
38
34
  contentEditable: false,
39
- children: /*#__PURE__*/_jsx("textarea", {
35
+ children: /*#__PURE__*/_jsx(Box, {
36
+ component: "textarea",
40
37
  ...rest,
41
38
  onChange: onChange,
42
- style: {
39
+ sx: {
43
40
  width: "100%",
44
41
  border: `1px solid ${borderColor || "#FFF"}`,
45
- paddingLeft: `${left || 8}px`,
46
- paddingRight: `${right || 8}px`,
47
- paddingTop: `${top || 8}px`,
48
- paddingBottom: `${bottom || 8}px`,
42
+ padding: {
43
+ ...getTRBLBreakPoints(bannerSpacing)
44
+ },
49
45
  height: height || "150px",
50
46
  borderColor: borderColor || "transparent",
51
47
  borderWidth: borderWidth || "1px",
@@ -12,6 +12,7 @@ import GridPopup from "./GridPopup";
12
12
  import SectionPopup from "./SectionPopup";
13
13
  import { gridItem } from "../../utils/gridItem";
14
14
  import { useEditorContext } from "../../hooks/useMouseMove";
15
+ import { getTRBLBreakPoints } from "../../helper/theme";
15
16
  import { jsx as _jsx } from "react/jsx-runtime";
16
17
  import { Fragment as _Fragment } from "react/jsx-runtime";
17
18
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -41,15 +42,8 @@ const Grid = props => {
41
42
  borderWidth,
42
43
  borderColor,
43
44
  borderStyle,
44
- borderRadius,
45
- gridSize
45
+ borderRadius
46
46
  } = element;
47
- const {
48
- left,
49
- top,
50
- right,
51
- bottom
52
- } = bannerSpacing || {};
53
47
  const {
54
48
  vertical,
55
49
  horizantal,
@@ -267,11 +261,7 @@ const Grid = props => {
267
261
  borderRadius: `${topLeft}px ${topRight}px ${bottomLeft}px ${bottomRight}px`,
268
262
  borderStyle: borderStyle || "solid"
269
263
  },
270
- "data-path": path.join(",")
271
- // sx={{
272
- // width: `${((gridSize || 12) / 12) * 100}%`,
273
- // }}
274
- ,
264
+ "data-path": path.join(","),
275
265
  children: [fgColor && /*#__PURE__*/_jsx("div", {
276
266
  style: {
277
267
  position: "absolute",
@@ -305,15 +295,13 @@ const Grid = props => {
305
295
  onDelete: onDelete,
306
296
  customProps: customProps
307
297
  }) : null, /*#__PURE__*/_jsx(GridContainer, {
308
- item: true,
309
- xs: 12,
298
+ container: true,
310
299
  className: "grid-c-wrpr",
311
- style: {
300
+ sx: {
312
301
  display: "flex",
313
- paddingLeft: `${left}px`,
314
- paddingRight: `${right}px`,
315
- paddingTop: `${top}px`,
316
- paddingBottom: `${bottom}px`,
302
+ padding: {
303
+ ...getTRBLBreakPoints(bannerSpacing)
304
+ },
317
305
  alignItems: vertical || "start",
318
306
  justifyContent: horizantal || "start",
319
307
  flexDirection: flexDirection || "row",
@@ -6,6 +6,7 @@ import GridItemPopup from "./GridItemPopup";
6
6
  import { IconButton, Tooltip, Box, Grid as Item } from "@mui/material";
7
7
  import { GridSettingsIcon } from "../../common/iconslist";
8
8
  import { useEditorContext } from "../../hooks/useMouseMove";
9
+ import { getBreakPointsValue, getTRBLBreakPoints } from "../../helper/theme";
9
10
  import { jsx as _jsx } from "react/jsx-runtime";
10
11
  import { jsxs as _jsxs } from "react/jsx-runtime";
11
12
  const GridItem = props => {
@@ -24,7 +25,6 @@ const GridItem = props => {
24
25
  bannerSpacing,
25
26
  bgColor,
26
27
  alignment,
27
- gridHeight,
28
28
  borderRadius,
29
29
  borderStyle,
30
30
  borderWidth,
@@ -35,12 +35,6 @@ const GridItem = props => {
35
35
  textColor,
36
36
  animation
37
37
  } = element;
38
- const {
39
- left,
40
- top,
41
- right,
42
- bottom
43
- } = bannerSpacing || {};
44
38
  const {
45
39
  vertical,
46
40
  horizantal,
@@ -53,7 +47,6 @@ const GridItem = props => {
53
47
  bottomRight
54
48
  } = borderRadius || {};
55
49
  const editor = useSlateStatic();
56
- const itemWidth = (grid || 6) / 12 * 100;
57
50
  const path = ReactEditor.findPath(editor, element);
58
51
  const {
59
52
  hoverPath
@@ -104,11 +97,13 @@ const GridItem = props => {
104
97
  };
105
98
  return /*#__PURE__*/_jsxs(Item, {
106
99
  item: true,
107
- xs: grid,
108
100
  component: "div",
109
- className: `grid-item xs-${grid} element-root gi-top-wrpr content-editable`,
101
+ className: `grid-item element-root gi-top-wrpr content-editable`,
110
102
  ...attributes,
111
103
  sx: {
104
+ width: {
105
+ ...getBreakPointsValue(grid, null, "overrideGridSize", true)
106
+ },
112
107
  display: "flex",
113
108
  flexDirection: flexDirection || "column",
114
109
  background: bgColor || "transparent",
@@ -118,15 +113,12 @@ const GridItem = props => {
118
113
  borderStyle: borderStyle || "solid",
119
114
  alignItems: horizantal,
120
115
  justifyContent: vertical,
121
- width: `${itemWidth}%`,
122
- marginLeft: `${margin?.left || 0}px`,
123
- marginRight: `${margin?.right || 0}px`,
124
- marginTop: `${margin?.top || 0}px`,
125
- marginBottom: `${margin?.bottom || 0}px`,
116
+ margin: {
117
+ ...getTRBLBreakPoints(margin)
118
+ },
126
119
  "&:hover": {
127
120
  background: `${bgColorHover || bgColor || "transparent"}`
128
- },
129
- height: "100%"
121
+ }
130
122
  },
131
123
  "data-path": path.join(","),
132
124
  style: {
@@ -159,13 +151,11 @@ const GridItem = props => {
159
151
  sx: {
160
152
  display: "flex",
161
153
  flexDirection: flexDirection || "column",
162
- paddingLeft: `${left}px`,
163
- paddingRight: `${right}px`,
164
- paddingTop: `${top}px`,
165
- paddingBottom: `${bottom}px`,
166
- justifyContent: vertical,
167
- height: gridHeight || "100%",
154
+ padding: {
155
+ ...getTRBLBreakPoints(bannerSpacing)
156
+ },
168
157
  width: "100%",
158
+ height: "100%",
169
159
  color: textColor || "#000",
170
160
  "&:hover": {
171
161
  borderColor: borderColorHover || borderColor || "transparent"
@@ -31,7 +31,6 @@ const carousel_item = itemNo => ({
31
31
  }]
32
32
  }]
33
33
  }],
34
- bgColor: "#ECF4FF",
35
34
  lockSpacing: true,
36
35
  borderRadius: {
37
36
  topLeft: 8,
@@ -50,6 +49,7 @@ const carousel_item = itemNo => ({
50
49
  horizontal: "center"
51
50
  }
52
51
  }],
52
+ bgColor: "#ECF4FF",
53
53
  alignment: {
54
54
  flexDirection: "row"
55
55
  },
@@ -59,8 +59,7 @@ const carousel_item = itemNo => ({
59
59
  left: "16",
60
60
  right: "16",
61
61
  bottom: "16"
62
- },
63
- bgColor: "transparent"
62
+ }
64
63
  }]
65
64
  });
66
65
  export default carousel_item;
@@ -3,7 +3,7 @@ const default_grid = [{
3
3
  grid: "container",
4
4
  children: [{
5
5
  type: "grid-item",
6
- grid: 12,
6
+ grid: 6,
7
7
  children: [{
8
8
  type: "alignLeft",
9
9
  children: [{
@@ -63,7 +63,7 @@ const default_grid = [{
63
63
  }
64
64
  }, {
65
65
  type: "grid-item",
66
- grid: 12,
66
+ grid: 6,
67
67
  children: [{
68
68
  type: "alignLeft",
69
69
  children: [{
@@ -18,7 +18,6 @@ const SimpleTextStyle = ({
18
18
  position: "absolute",
19
19
  zIndex: -1,
20
20
  left: "0px",
21
- paddingLeft: "4px",
22
21
  top: "-1px",
23
22
  bottom: 0,
24
23
  margin: "auto",
@@ -176,7 +176,9 @@ const Table = props => {
176
176
  style: {
177
177
  minWidth: "100%",
178
178
  maxWidth: "100%",
179
- position: "relative"
179
+ position: "relative",
180
+ overflowX: "auto",
181
+ overflowY: "hidden"
180
182
  },
181
183
  children: [/*#__PURE__*/_jsx(TableComp, {
182
184
  sx: classes.table,
@@ -92,8 +92,10 @@ const TopBanner = props => {
92
92
  ...props,
93
93
  classes: classes
94
94
  }) : null, /*#__PURE__*/_jsx("span", {
95
+ className: "hidden-children",
95
96
  style: {
96
- display: "none"
97
+ display: "none",
98
+ height: "0px"
97
99
  },
98
100
  children: children
99
101
  })]
@@ -0,0 +1,36 @@
1
+ import React from "react";
2
+ import CommonEditor from "./CommonEditor";
3
+ import useWindowMessage from "./hooks/useWindowMessage";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ const IframeEditor = () => {
6
+ const [message, sendMessage] = useWindowMessage({
7
+ type: "editorProps"
8
+ });
9
+ const device = {
10
+ label: "Mobile",
11
+ breakpoint: "sm",
12
+ width: 425
13
+ };
14
+ const onSave = (a, b) => {
15
+ sendMessage({
16
+ type: "Editor:onSave",
17
+ payload: {
18
+ a,
19
+ b
20
+ }
21
+ });
22
+ };
23
+ if (message?.id && message?.content_status) {
24
+ return /*#__PURE__*/_jsx(CommonEditor, {
25
+ ...message,
26
+ isIframe: true,
27
+ onSave: onSave,
28
+ device: device
29
+ });
30
+ } else {
31
+ return /*#__PURE__*/_jsx("div", {
32
+ children: "Waiting to receive data"
33
+ });
34
+ }
35
+ };
36
+ export default IframeEditor;
@@ -10,20 +10,16 @@ import withCommon from "./hooks/withCommon";
10
10
  import "./Editor.css";
11
11
  import { jsx as _jsx } from "react/jsx-runtime";
12
12
  import { jsxs as _jsxs } from "react/jsx-runtime";
13
- const initialValue = [{
14
- type: "paragraph",
15
- children: [{
16
- text: ""
17
- }]
18
- }];
19
13
  const MiniEditor = props => {
20
14
  const {
21
15
  id,
22
- // content,
16
+ content,
17
+ handleEditorChange,
23
18
  // onSave,
24
19
  // editor: collaborativeEditor,
25
20
  readOnly,
26
21
  miniEditorPlaceholder,
22
+ className,
27
23
  otherProps
28
24
  } = props;
29
25
  const {
@@ -103,10 +99,12 @@ const MiniEditor = props => {
103
99
  }, []);
104
100
  return /*#__PURE__*/_jsxs(Slate, {
105
101
  editor: editor,
106
- initialValue: initialValue,
102
+ initialValue: content,
103
+ onChange: handleEditorChange,
107
104
  children: [/*#__PURE__*/_jsx(BasicToolbar, {
108
105
  ...props
109
106
  }), /*#__PURE__*/_jsx(Editable, {
107
+ className: className || "mini-editor-cls",
110
108
  renderElement: renderElement,
111
109
  renderLeaf: renderLeaf,
112
110
  onKeyDown: onKeyDown
@@ -7,7 +7,15 @@ const editorStyles = ({
7
7
  position: "relative",
8
8
  padding: "0px",
9
9
  alignItems: "center",
10
- justifyContent: "center"
10
+ justifyContent: "center",
11
+ "*": {
12
+ boxSizing: "border-box"
13
+ },
14
+ "&.iframe-editor": {
15
+ "& .mini-tool-wrpr-ei": {
16
+ display: "none"
17
+ }
18
+ }
11
19
  },
12
20
  slateWrapper: {
13
21
  paddingTop: "0px",
@@ -109,7 +117,7 @@ const editorStyles = ({
109
117
  display: "none"
110
118
  }
111
119
  },
112
- "&:before": {
120
+ "&.needHover:before": {
113
121
  content: '" "',
114
122
  position: "absolute",
115
123
  width: "calc(100% - 2px)",
@@ -168,6 +176,9 @@ const editorStyles = ({
168
176
  }
169
177
  }
170
178
  },
179
+ "& .carousel-item": {
180
+ padding: "12px 32px"
181
+ },
171
182
  "& .slick-arrow": {
172
183
  borderRadius: "50%",
173
184
  backgroundColor: "#F8FAFF",
@@ -59,6 +59,8 @@ const BasicToolbar = props => {
59
59
  });
60
60
  };
61
61
  BasicToolbar.defaultProps = {
62
- variableOptions: []
62
+ otherProps: {
63
+ variableOptions: []
64
+ }
63
65
  };
64
66
  export default BasicToolbar;
@@ -3,6 +3,9 @@ import { TextField, IconButton } from "@mui/material";
3
3
  import { addMarkData, activeMark } from "../../utils/SlateUtilityFunctions.js";
4
4
  import { sizeMap } from "../../utils/font.js";
5
5
  import { TextMinusIcon, TextPlusIcon } from "../../common/iconslist.js";
6
+ import { getBreakPointsValue } from "../../helper/theme.js";
7
+ import useWindowResize from "../../hooks/useWindowResize.js";
8
+ import { BREAKPOINTS_DEVICES } from "../../helper/theme.js";
6
9
  import { jsx as _jsx } from "react/jsx-runtime";
7
10
  import { jsxs as _jsxs } from "react/jsx-runtime";
8
11
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -11,15 +14,35 @@ const TextSize = ({
11
14
  format,
12
15
  fullWidth
13
16
  }) => {
14
- const value = activeMark(editor, format);
15
- const onChangeSize = e => {
16
- let inc = parseInt(e.target.value) || 8;
17
- inc = inc > 200 ? 200 : inc;
17
+ const [size] = useWindowResize();
18
+ const val = activeMark(editor, format);
19
+ const value = getBreakPointsValue(val, size?.device);
20
+ const updateMarkData = newVal => {
21
+ let upData = {
22
+ ...getBreakPointsValue(val),
23
+ [size?.device]: `${newVal}px`
24
+ };
25
+
26
+ // if desktop update to all other devices
27
+ // to avoid default normal size
28
+ if (size?.device === "lg") {
29
+ upData = BREAKPOINTS_DEVICES.reduce((a, b) => {
30
+ a[b] = `${newVal}px`;
31
+ return a;
32
+ }, {});
33
+ }
18
34
  addMarkData(editor, {
19
35
  format,
20
- value: `${inc || 8}px`
36
+ value: {
37
+ ...upData
38
+ }
21
39
  });
22
40
  };
41
+ const onChangeSize = e => {
42
+ let inc = parseInt(e.target.value) || 8;
43
+ inc = inc > 200 ? 200 : inc;
44
+ updateMarkData(inc || 8);
45
+ };
23
46
  const getSizeVal = () => {
24
47
  try {
25
48
  const size = `${value}`?.indexOf("px") >= 0 ? value : sizeMap[value] || value;
@@ -32,17 +55,11 @@ const TextSize = ({
32
55
  const onIncreaseSize = () => {
33
56
  let inc = (combinedOldVal || 0) + 1;
34
57
  inc = inc > 200 ? 200 : inc;
35
- addMarkData(editor, {
36
- format,
37
- value: `${inc}px`
38
- });
58
+ updateMarkData(inc);
39
59
  };
40
60
  const onDecreaseSize = () => {
41
61
  const newVal = combinedOldVal - 1 < 0 ? 0 : combinedOldVal - 1;
42
- addMarkData(editor, {
43
- format,
44
- value: `${newVal}px`
45
- });
62
+ updateMarkData(newVal);
46
63
  };
47
64
  return /*#__PURE__*/_jsx(_Fragment, {
48
65
  children: /*#__PURE__*/_jsx(TextField, {
@@ -1,4 +1,4 @@
1
- import React, { useState } from "react";
1
+ import React, { useEffect, useState } from "react";
2
2
  import { useSlate } from "slate-react";
3
3
  import { Box, Dialog, IconButton, Paper, Popper, Tooltip } from "@mui/material";
4
4
  import MENU_OPTIONS from "./Options/Options";
@@ -37,6 +37,11 @@ const MiniToolbar = props => {
37
37
  const PopupComponent = POPUP_TYPES[popper] || null;
38
38
  const open = Boolean(PopupComponent);
39
39
  const DialogComp = !fullScreen ? Popper : Dialog;
40
+ useEffect(() => {
41
+ if (popper) {
42
+ setPopper(null);
43
+ }
44
+ }, [editor.selection]);
40
45
  const handleClick = type => e => {
41
46
  setPopper(type);
42
47
  setAnchorEl(e.currentTarget);
@@ -51,6 +56,7 @@ const MiniToolbar = props => {
51
56
  return /*#__PURE__*/_jsxs(_Fragment, {
52
57
  children: [/*#__PURE__*/_jsx(Box, {
53
58
  component: "div",
59
+ className: "mini-tool-wrpr-ei",
54
60
  sx: classes.root,
55
61
  children: MENU_OPTIONS.map(({
56
62
  type,
@@ -185,6 +185,9 @@ const iconList = {
185
185
  moreHorizantal: /*#__PURE__*/_jsx(MoreHorizontal, {}),
186
186
  docsUpload: /*#__PURE__*/_jsx(DocsUpload, {}),
187
187
  colorbox: /*#__PURE__*/_jsx(BsFillMenuButtonWideFill, {
188
+ style: {
189
+ fill: "#64748B"
190
+ },
188
191
  size: 20
189
192
  }),
190
193
  leftArrow: /*#__PURE__*/_jsx(LeftArrow, {}),
@@ -4,6 +4,7 @@ import { ReactEditor, useSlateStatic } from "slate-react";
4
4
  import { Box, IconButton, Tooltip } from "@mui/material";
5
5
  import TuneIcon from "@mui/icons-material/Tune";
6
6
  import SectionPopup from "../../Elements/Grid/SectionPopup";
7
+ import { getBreakPointsValue, getTRBLBreakPoints } from "../../helper/theme";
7
8
  import { jsx as _jsx } from "react/jsx-runtime";
8
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
9
10
  const Section = props => {
@@ -25,12 +26,6 @@ const Section = props => {
25
26
  sectionGridSize,
26
27
  sectionAlignment
27
28
  } = element;
28
- const {
29
- left: ssleft,
30
- top: sstop,
31
- right: ssright,
32
- bottom: ssbottom
33
- } = sectionBannerSpacing || {};
34
29
  const {
35
30
  topLeft: ssTopLeft,
36
31
  topRight: ssTopRight,
@@ -49,9 +44,9 @@ const Section = props => {
49
44
  const Toolbar = () => {
50
45
  return !readOnly ? /*#__PURE__*/_jsx(Box, {
51
46
  component: "div",
52
- className: "element-toolbar ss hr section-tw",
47
+ className: "element-toolbar no-border-button ss hr section-tw",
53
48
  style: {
54
- left: "20px",
49
+ left: "-28px",
55
50
  top: "0px"
56
51
  },
57
52
  children: /*#__PURE__*/_jsx(Tooltip, {
@@ -83,20 +78,19 @@ const Section = props => {
83
78
  at: path
84
79
  });
85
80
  };
81
+ const needHover = element?.children?.find(f => f.type === "grid") ? "needHover" : "";
86
82
  const sectionBgImage = sectionBackgroundImage && sectionBackgroundImage !== "none" ? {
87
83
  backgroundImage: `url(${sectionBackgroundImage})`
88
84
  } : {};
89
85
  return path.length === 1 ? /*#__PURE__*/_jsxs(Box, {
90
86
  component: "section",
91
- className: `ed-section-wrapper ${readOnly ? "" : "hselect"}`,
92
- style: {
93
- position: "relative",
87
+ className: `ed-section-wrapper ${readOnly ? "" : "hselect"} ${needHover}`,
88
+ sx: {
94
89
  background: sectionBgColor,
95
90
  ...sectionBgImage,
96
- paddingLeft: `${ssleft}px`,
97
- paddingRight: `${ssright}px`,
98
- paddingTop: `${sstop || 2}px`,
99
- paddingBottom: `${ssbottom || 2}px`,
91
+ padding: {
92
+ ...getTRBLBreakPoints(sectionBannerSpacing)
93
+ },
100
94
  borderRadius: `${ssTopLeft}px ${ssTopRight}px ${ssBottomLeft}px ${ssBottomRight}px`,
101
95
  flexDirection: flexDirection || "column",
102
96
  alignItems: horizantal,
@@ -105,7 +99,10 @@ const Section = props => {
105
99
  children: [/*#__PURE__*/_jsxs(Box, {
106
100
  className: "ed-section-inner",
107
101
  sx: {
108
- width: `${(sectionGridSize || 8) / 12 * 100}%`
102
+ position: "relative",
103
+ width: {
104
+ ...getBreakPointsValue(sectionGridSize || 8, null, "overrideGridSize", true)
105
+ }
109
106
  },
110
107
  children: [children, /*#__PURE__*/_jsx(Toolbar, {})]
111
108
  }), openSetttings ? /*#__PURE__*/_jsx(SectionPopup, {
@@ -1,12 +1,14 @@
1
1
  import React from "react";
2
2
  import { Checkbox, FormControlLabel, Grid, Slider, Typography } from "@mui/material";
3
3
  import { squreStyle } from "./radiusStyle";
4
+ import { getBreakPointsValue } from "../../../helper/theme";
5
+ import useWindowResize from "../../../hooks/useWindowResize";
4
6
  import { jsx as _jsx } from "react/jsx-runtime";
5
7
  import { jsxs as _jsxs } from "react/jsx-runtime";
6
8
  const BANNER_SPACING_KEYS = ["top", "left", "right", "bottom"];
7
9
  const BannerSpacing = props => {
8
10
  const {
9
- value,
11
+ value: val,
10
12
  data,
11
13
  onChange,
12
14
  elementProps
@@ -19,6 +21,8 @@ const BannerSpacing = props => {
19
21
  if (lockSpacing === undefined) {
20
22
  lockSpacing = true;
21
23
  }
24
+ const [size] = useWindowResize();
25
+ const value = getBreakPointsValue(val, size?.device);
22
26
  const handleChange = e => {
23
27
  let changeAll = {};
24
28
  if (lockSpacing) {
@@ -28,9 +32,12 @@ const BannerSpacing = props => {
28
32
  }
29
33
  onChange({
30
34
  [key]: {
31
- ...value,
32
- [e.target.name]: e.target.value,
33
- ...changeAll
35
+ ...getBreakPointsValue(val),
36
+ [size?.device]: {
37
+ ...value,
38
+ ...changeAll,
39
+ [e.target.name]: e.target.value
40
+ }
34
41
  }
35
42
  });
36
43
  };
@@ -64,8 +71,10 @@ const BannerSpacing = props => {
64
71
  "aria-label": "Default",
65
72
  valueLabelDisplay: "auto",
66
73
  max: 100,
74
+ name: "top",
67
75
  onChange: handleChange
68
76
  }), /*#__PURE__*/_jsx("input", {
77
+ name: "top",
69
78
  value: !lockSpacing ? "" : value?.top || 0,
70
79
  className: "sliderInput",
71
80
  disabled: !lockSpacing,
@@ -1,19 +1,26 @@
1
1
  import React from "react";
2
2
  import { Grid, Slider, Typography } from "@mui/material";
3
+ import useWindowResize from "../../../hooks/useWindowResize";
4
+ import { getBreakPointsValue } from "../../../helper/theme";
3
5
  import { jsxs as _jsxs } from "react/jsx-runtime";
4
6
  import { jsx as _jsx } from "react/jsx-runtime";
5
7
  const GridSize = props => {
6
8
  const {
7
- value,
9
+ value: val,
8
10
  data,
9
11
  onChange
10
12
  } = props;
11
13
  const {
12
14
  key
13
15
  } = data;
16
+ const [size] = useWindowResize();
17
+ const value = getBreakPointsValue(val, size?.device);
14
18
  const handleChange = e => {
15
19
  onChange({
16
- [key]: e.target.value
20
+ [key]: {
21
+ ...getBreakPointsValue(val),
22
+ [size?.device]: e.target.value
23
+ }
17
24
  });
18
25
  };
19
26
  return /*#__PURE__*/_jsxs(Grid, {
@@ -27,7 +34,7 @@ const GridSize = props => {
27
34
  fontWeight: 500,
28
35
  marginBottom: "5px"
29
36
  },
30
- children: ["Grid Size: ", value || 12]
37
+ children: [data?.label || "Grid Size", ": ", value || 12]
31
38
  }), /*#__PURE__*/_jsx("div", {
32
39
  className: "sld-wrpr",
33
40
  children: /*#__PURE__*/_jsx(Slider, {
@@ -33,6 +33,9 @@ const formStyle = [{
33
33
  width: 7,
34
34
  renderOption: option => {
35
35
  return /*#__PURE__*/_jsx("span", {
36
+ style: {
37
+ fontFamily: option.value
38
+ },
36
39
  children: option.text
37
40
  });
38
41
  }
@@ -46,7 +46,7 @@ const gridStyle = [{
46
46
  tab: "Size",
47
47
  value: "gridSize",
48
48
  fields: [{
49
- label: "Grid Size",
49
+ label: "Width Size",
50
50
  key: "sectionGridSize",
51
51
  type: "gridSize"
52
52
  }]