@flozy/editor 1.9.5 → 1.9.6

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.
Files changed (36) hide show
  1. package/dist/Editor/CommonEditor.js +15 -12
  2. package/dist/Editor/Editor.css +0 -6
  3. package/dist/Editor/Elements/Color Picker/ColorButtons.js +3 -0
  4. package/dist/Editor/Elements/Color Picker/ColorPicker.js +6 -1
  5. package/dist/Editor/Elements/Color Picker/Styles.js +9 -4
  6. package/dist/Editor/Elements/Form/Workflow/FormWorkflow.js +2 -3
  7. package/dist/Editor/Elements/Form/Workflow/Styles.js +19 -1
  8. package/dist/Editor/Elements/Form/Workflow/UserInputs.js +6 -2
  9. package/dist/Editor/Elements/Form/Workflow/index.js +8 -2
  10. package/dist/Editor/Elements/SimpleText.js +5 -1
  11. package/dist/Editor/Styles/EditorStyles.js +11 -2
  12. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +6 -1
  13. package/dist/Editor/Toolbar/FormatTools/TextSize.js +2 -0
  14. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +5 -4
  15. package/dist/Editor/Toolbar/Mini/Styles.js +15 -1
  16. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +1 -0
  17. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +113 -9
  18. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +3 -0
  19. package/dist/Editor/Toolbar/PopupTool/index.js +4 -1
  20. package/dist/Editor/common/ColorPickerButton.js +6 -8
  21. package/dist/Editor/common/ImageSelector/ImageSelector.js +6 -5
  22. package/dist/Editor/common/ImageSelector/Styles.js +59 -45
  23. package/dist/Editor/common/ImageSelector/UploadStyles.js +10 -10
  24. package/dist/Editor/common/MentionsPopup/Styles.js +16 -7
  25. package/dist/Editor/common/MentionsPopup/index.js +5 -4
  26. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +5 -1
  27. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +6 -4
  28. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +6 -3
  29. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +3 -1
  30. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +3 -1
  31. package/dist/Editor/common/StyleBuilder/index.js +14 -4
  32. package/dist/Editor/common/iconslist.js +0 -2
  33. package/dist/Editor/commonStyle.js +50 -6
  34. package/dist/Editor/hooks/useMouseMove.js +3 -1
  35. package/dist/Editor/utils/draftToSlate.js +0 -2
  36. package/package.json +1 -1
@@ -75,7 +75,8 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
75
75
  readOnly,
76
76
  toolbarOptions,
77
77
  otherProps,
78
- isIframe
78
+ isIframe,
79
+ theme
79
80
  } = props;
80
81
  const editorWrapper = useRef();
81
82
  const mentionsRef = useRef();
@@ -130,7 +131,8 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
130
131
  };
131
132
  const classes = editorStyles({
132
133
  padHeight: !fullScreen ? otherProps?.padHeight : 120,
133
- placeHolderColor: invertColor(pageColor || "#FFF")
134
+ placeHolderColor: invertColor(pageColor || "#FFF"),
135
+ theme
134
136
  });
135
137
  const isListItem = useElement(editor, ["list-item", "check-list-item", "accordion-summary"]);
136
138
  useEffect(() => {
@@ -228,7 +230,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
228
230
  });
229
231
  },
230
232
  getPageSettings: {
231
- background: pageBgImage && pageBgImage !== "none" ? `url(${pageBgImage})` : pageColor || "#fff"
233
+ background: pageBgImage && pageBgImage !== "none" ? `url(${pageBgImage})` : pageColor || ""
232
234
  }
233
235
  }));
234
236
  const [htmlAction, setHtmlAction] = useState({
@@ -339,6 +341,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
339
341
  }) : null;
340
342
  };
341
343
  return /*#__PURE__*/_jsx(EditorProvider, {
344
+ theme: theme,
342
345
  children: /*#__PURE__*/_jsx(DialogWrapper, {
343
346
  ...props,
344
347
  fullScreen: fullScreen,
@@ -357,21 +360,18 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
357
360
  children: [/*#__PURE__*/_jsx(DragAndDrop, {
358
361
  children: /*#__PURE__*/_jsx(Overlay, {
359
362
  children: /*#__PURE__*/_jsx(Box, {
360
- className: `${hasTopBanner() ? "has-topbanner" : ""}`,
363
+ className: `${hasTopBanner() ? "has-topbanner" : ""} ${!pageColor ? "no-color" : ""}`,
361
364
  sx: classes.slateWrapper,
362
365
  id: "slate-wrapper-scroll-container",
363
366
  style: {
364
- background: pageColor || "#FFF"
367
+ background: pageColor || "",
368
+ color: pageTextColor || ""
365
369
  },
366
370
  children: /*#__PURE__*/_jsxs(Box, {
367
371
  component: "div",
368
372
  className: "max-content",
369
373
  children: [renderTopBanner(), /*#__PURE__*/_jsx("div", {
370
374
  className: "scroll-area",
371
- style: {
372
- // background: pageColor || "#FFF",
373
- color: pageTextColor || "#000000"
374
- },
375
375
  children: /*#__PURE__*/_jsxs(Box, {
376
376
  component: "div",
377
377
  ref: editorWrapper,
@@ -390,7 +390,8 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
390
390
  maxWidth: pageMaxWidth ? `${parseInt(pageMaxWidth)}px !important` : "auto"
391
391
  },
392
392
  children: [!readOnly ? /*#__PURE__*/_jsx(PopupTool, {
393
- onDrawerOpen: onDrawerOpen
393
+ onDrawerOpen: onDrawerOpen,
394
+ theme: theme
394
395
  }) : null, /*#__PURE__*/_jsx(Editable, {
395
396
  className: "innert-editor-textbox",
396
397
  readOnly: isReadOnly,
@@ -406,12 +407,14 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
406
407
  target: target,
407
408
  index: index,
408
409
  chars: chars,
409
- type: type
410
+ type: type,
411
+ theme: theme
410
412
  }) : null]
411
413
  })
412
414
  }), !readOnly ? /*#__PURE__*/_jsx(MiniToolbar, {
413
415
  customProps: customProps,
414
- toolbarOptions: toolbarOptions
416
+ toolbarOptions: toolbarOptions,
417
+ theme: theme
415
418
  }) : null, footer && /*#__PURE__*/_jsx(Typography, {
416
419
  sx: {
417
420
  color: "rgb(100, 116, 139)",
@@ -1,6 +1,5 @@
1
1
  .editor-wrapper {
2
2
  font-family: "Inter", sans-serif;
3
- color: #0f172a;
4
3
  line-height: 1.43;
5
4
  font-weight: 400;
6
5
  letter-spacing: 0.01071em;
@@ -248,7 +247,6 @@ blockquote {
248
247
  }
249
248
 
250
249
  .close-popupbtn {
251
- background-color: #f8fafc !important;
252
250
  border-radius: 4px !important;
253
251
  width: 24px;
254
252
  height: 24px;
@@ -779,10 +777,6 @@ blockquote {
779
777
  font-weight: 500;
780
778
  }
781
779
 
782
- .dialogComp .MuiOutlinedInput-notchedOutline {
783
- border: 1px solid #ececec;
784
- }
785
-
786
780
  .iconRadioButton .MuiRadio-root {
787
781
  visibility: hidden;
788
782
  width: 0px;
@@ -72,6 +72,7 @@ export const AllColors = props => {
72
72
  horizontal: "center"
73
73
  },
74
74
  onClose: onClose,
75
+ sx: classes.colorPopper,
75
76
  children: /*#__PURE__*/_jsx(Box, {
76
77
  component: "div",
77
78
  sx: classes.allColor,
@@ -145,6 +146,8 @@ const ColorButtons = props => {
145
146
  vertical: "top",
146
147
  horizontal: "right"
147
148
  },
149
+ sx: classes.colorPopper,
150
+ className: "colorPopper",
148
151
  children: /*#__PURE__*/_jsx(Box, {
149
152
  sx: classes.colorButtonsInner,
150
153
  children: restRows.map((m, i) => {
@@ -8,6 +8,7 @@ import ColorButtons from "./ColorButtons";
8
8
  import ColorPickerStyles from "./Styles";
9
9
  import colorWheel from "./colorWheel.png";
10
10
  import "./ColorPicker.css";
11
+ import { useEditorContext } from "../../hooks/useMouseMove";
11
12
  import { jsx as _jsx } from "react/jsx-runtime";
12
13
  import { Fragment as _Fragment } from "react/jsx-runtime";
13
14
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -23,10 +24,13 @@ const ColorPicker = ({
23
24
  title,
24
25
  classes
25
26
  }) => {
27
+ const {
28
+ theme
29
+ } = useEditorContext();
26
30
  const [selection, setSelection] = useState();
27
31
  const [anchorEl, setAnchorEl] = useState(null);
28
32
  const open = Boolean(anchorEl);
29
- const pickerStyles = ColorPickerStyles();
33
+ const pickerStyles = ColorPickerStyles(theme);
30
34
  const onOpen = e => {
31
35
  e.preventDefault();
32
36
  setAnchorEl(e.currentTarget);
@@ -82,6 +86,7 @@ const ColorPicker = ({
82
86
  vertical: "bottom",
83
87
  horizontal: "top"
84
88
  },
89
+ sx: classes.colorPickerPopup,
85
90
  children: /*#__PURE__*/_jsx(ColorPickerTool, {
86
91
  gradient: true,
87
92
  value: activeColor,
@@ -1,4 +1,4 @@
1
- const ColorPickerStyles = () => ({
1
+ const ColorPickerStyles = theme => ({
2
2
  colorButtons: {
3
3
  padding: "0px",
4
4
  "& .buttonsWrpr": {
@@ -12,6 +12,11 @@ const ColorPickerStyles = () => ({
12
12
  border: "1px solid #ccc"
13
13
  }
14
14
  },
15
+ colorPopper: {
16
+ "& .MuiPaper-root": {
17
+ backgroundColor: theme?.palette?.editor?.background
18
+ }
19
+ },
15
20
  colorButtonSingle: {
16
21
  "&.active": {
17
22
  "&:before": {
@@ -49,9 +54,9 @@ const ColorPickerStyles = () => ({
49
54
  }
50
55
  },
51
56
  colorPickerIcon: {
52
- '& img': {
53
- width: '24px',
54
- height: '24px'
57
+ "& img": {
58
+ width: "24px",
59
+ height: "24px"
55
60
  }
56
61
  }
57
62
  });
@@ -1,6 +1,5 @@
1
1
  import React, { useState } from "react";
2
2
  import { Grid, Radio, RadioGroup, Typography, FormControlLabel, Select, MenuItem, FormControl, TextField, Button, Menu } from "@mui/material";
3
- import FormStyles from "./Styles";
4
3
  import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
5
4
  import UserInputs from "./UserInputs";
6
5
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -21,9 +20,9 @@ const FormWorkflow = props => {
21
20
  bodyData,
22
21
  setBodyData,
23
22
  handleSelectedVariables,
24
- handleInputReset
23
+ handleInputReset,
24
+ classes
25
25
  } = props;
26
- const classes = FormStyles();
27
26
  const [anchorEl, setAnchorEl] = useState(null);
28
27
  const variables = element?.children;
29
28
  const type = 1;
@@ -1,4 +1,4 @@
1
- const FormStyles = () => ({
1
+ const FormStyles = theme => ({
2
2
  addButton: {
3
3
  display: "flex",
4
4
  justifyContent: "flex-end"
@@ -224,6 +224,24 @@ const FormStyles = () => ({
224
224
  color: "#fff",
225
225
  padding: "8px",
226
226
  marginLeft: "8px"
227
+ },
228
+ formWorkflow: {
229
+ "& .MuiPaper-root": {
230
+ backgroundColor: theme?.palette?.editor?.background
231
+ },
232
+ "& .MuiTypography-root": {
233
+ color: theme?.palette?.editor?.textColor
234
+ },
235
+ "& svg": {
236
+ color: theme?.palette?.editor?.activeColor
237
+ },
238
+ "& input": {
239
+ color: theme?.palette?.editor?.textColor
240
+ },
241
+ "& textarea": {
242
+ backgroundColor: theme?.palette?.editor?.background,
243
+ color: theme?.palette?.editor?.textColor
244
+ }
227
245
  }
228
246
  });
229
247
  export default FormStyles;
@@ -6,6 +6,7 @@ import { RestRight } from "../../../common/iconslist";
6
6
  import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
7
7
  import { AllColors } from "../../Color Picker/ColorButtons";
8
8
  import PopupToolStyle from "../../../Toolbar/PopupTool/PopupToolStyle";
9
+ import { useEditorContext } from "../../../hooks/useMouseMove";
9
10
  import { jsx as _jsx } from "react/jsx-runtime";
10
11
  import { jsxs as _jsxs } from "react/jsx-runtime";
11
12
  const UserInputs = props => {
@@ -18,8 +19,11 @@ const UserInputs = props => {
18
19
  handleInputReset
19
20
  } = props;
20
21
  const variables = element?.children;
21
- const classes = FormStyles();
22
- const popupClasses = PopupToolStyle();
22
+ const {
23
+ theme
24
+ } = useEditorContext();
25
+ const classes = FormStyles(theme);
26
+ const popupClasses = PopupToolStyle(theme);
23
27
  const [activeColor, setActiveColor] = useState(["#000000"]);
24
28
  //state
25
29
  const [anchorEl, setAnchorEl] = useState(null);
@@ -8,6 +8,7 @@ import FormWorkflow from "./FormWorkflow";
8
8
  import { minutes, hours, days } from "./constant";
9
9
  import ListWorkflow from "./ListWorkflow";
10
10
  import { PlusIcon } from "../../../common/iconslist";
11
+ import { useEditorContext } from "../../../hooks/useMouseMove";
11
12
  import { jsx as _jsx } from "react/jsx-runtime";
12
13
  import { jsxs as _jsxs } from "react/jsx-runtime";
13
14
  const Workflow = props => {
@@ -20,7 +21,10 @@ const Workflow = props => {
20
21
  const {
21
22
  workflow
22
23
  } = element;
23
- const classes = FormStyles();
24
+ const {
25
+ theme
26
+ } = useEditorContext();
27
+ const classes = FormStyles(theme);
24
28
  const [workflowList, setWorkflowList] = useState([]);
25
29
  const [formData, setFormData] = useState(false);
26
30
  const [schedule, setSchedule] = useState("immediately");
@@ -111,6 +115,7 @@ const Workflow = props => {
111
115
  }
112
116
  };
113
117
  return /*#__PURE__*/_jsxs(Dialog, {
118
+ sx: classes?.formWorkflow,
114
119
  open: openWorkflow,
115
120
  onClose: closeWorkflow,
116
121
  fullWidth: true,
@@ -155,7 +160,8 @@ const Workflow = props => {
155
160
  setScheduleEvery: setScheduleEvery,
156
161
  setScheduleOn: setScheduleOn,
157
162
  handleSelectedVariables: handleSelectedVariables,
158
- handleInputReset: handleInputReset
163
+ handleInputReset: handleInputReset,
164
+ classes: classes
159
165
  })]
160
166
  }), /*#__PURE__*/_jsxs(DialogActions, {
161
167
  sx: classes.dialogFooter,
@@ -4,6 +4,7 @@ import { Box } from "@mui/material";
4
4
  import { getPageSettings } from "../utils/pageSettings";
5
5
  import { invertColor } from "../helper";
6
6
  import { isTextSelected } from "../utils/helper";
7
+ import { useEditorContext } from "../hooks/useMouseMove";
7
8
  import { jsx as _jsx } from "react/jsx-runtime";
8
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
9
10
  const SimpleTextStyle = ({
@@ -45,6 +46,9 @@ const SimpleTextStyle = ({
45
46
  }
46
47
  });
47
48
  const SimpleText = props => {
49
+ const {
50
+ theme
51
+ } = useEditorContext();
48
52
  const editor = useSlateStatic();
49
53
  const {
50
54
  element,
@@ -64,7 +68,7 @@ const SimpleText = props => {
64
68
  pageColor
65
69
  } = pageSt?.pageProps || {};
66
70
  const classes = SimpleTextStyle({
67
- pageColor: pageColor || "rgba(255,255,255,1)"
71
+ pageColor: pageColor || theme?.palette?.editor?.background
68
72
  });
69
73
  const selected = useSelected();
70
74
  const path = ReactEditor.findPath(editor, element);
@@ -1,6 +1,7 @@
1
1
  const editorStyles = ({
2
2
  padHeight,
3
- placeHolderColor
3
+ placeHolderColor,
4
+ theme
4
5
  }) => ({
5
6
  root: {
6
7
  display: "flex",
@@ -26,6 +27,11 @@ const editorStyles = ({
26
27
  display: "flex",
27
28
  flexDirection: "column",
28
29
  alignItems: "center",
30
+ color: "#0f172a",
31
+ "&.no-color": {
32
+ backgroundColor: theme?.palette?.editor?.background,
33
+ color: theme?.palette?.editor?.textColor
34
+ },
29
35
  "& .max-content": {
30
36
  width: "100%",
31
37
  display: "flex",
@@ -171,7 +177,10 @@ const editorStyles = ({
171
177
  }
172
178
  },
173
179
  "& .tools-drawer": {
174
- zIndex: 1300
180
+ zIndex: 1300,
181
+ "& .MuiDrawer-paper": {
182
+ backgroundColor: theme?.palette?.editor?.background
183
+ }
175
184
  },
176
185
  "& .section-tw": {
177
186
  "& button": {
@@ -4,6 +4,7 @@ import { addMarkData, activeMark } from "../../utils/SlateUtilityFunctions.js";
4
4
  import { fontFamilyMap } from "../../utils/font";
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  const Dropdown = ({
7
+ classes,
7
8
  editor,
8
9
  format,
9
10
  options,
@@ -26,10 +27,14 @@ const Dropdown = ({
26
27
  fontFamily: fontFamilyMap[value],
27
28
  width: width || "100%",
28
29
  height: "36px",
29
- overflow: "hidden",
30
30
  borderRadius: "10px",
31
31
  fontSize: "14px"
32
32
  },
33
+ MenuProps: {
34
+ PaperProps: {
35
+ sx: classes?.textOptions
36
+ }
37
+ },
33
38
  children: options.map((item, index) => /*#__PURE__*/_jsx(MenuItem, {
34
39
  style: {
35
40
  fontFamily: item.text
@@ -10,6 +10,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
10
10
  import { jsxs as _jsxs } from "react/jsx-runtime";
11
11
  import { Fragment as _Fragment } from "react/jsx-runtime";
12
12
  const TextSize = ({
13
+ classes,
13
14
  editor,
14
15
  format,
15
16
  fullWidth
@@ -63,6 +64,7 @@ const TextSize = ({
63
64
  };
64
65
  return /*#__PURE__*/_jsx(_Fragment, {
65
66
  children: /*#__PURE__*/_jsx(TextField, {
67
+ sx: classes?.textSize,
66
68
  value: combinedOldVal,
67
69
  onChange: onChangeSize,
68
70
  size: "small",
@@ -1,6 +1,6 @@
1
1
  import React, { useEffect, useState } from "react";
2
2
  import { useSlate } from "slate-react";
3
- import { Box, Dialog, IconButton, Paper, Popper, Tooltip } from "@mui/material";
3
+ import { Box, Dialog, IconButton, Paper, Popper, Tooltip, useTheme } from "@mui/material";
4
4
  import MENU_OPTIONS from "./Options/Options";
5
5
  import TextFormat from "../PopupTool/TextFormat";
6
6
  import AddElements from "../PopupTool/AddElements";
@@ -27,10 +27,11 @@ const POPUP_TITLE = {
27
27
  };
28
28
  const MiniToolbar = props => {
29
29
  const {
30
- customProps
30
+ customProps,
31
+ theme
31
32
  } = props;
32
- const classes = miniToolbarStyles();
33
- const popupStyles = usePopupStyle();
33
+ const classes = miniToolbarStyles(theme);
34
+ const popupStyles = usePopupStyle(theme);
34
35
  const editor = useSlate();
35
36
  const [popper, setPopper] = useState(null);
36
37
  const [anchorEl, setAnchorEl] = useState(null);
@@ -1,4 +1,4 @@
1
- const miniToolbarStyles = () => ({
1
+ const miniToolbarStyles = theme => ({
2
2
  root: {
3
3
  display: "flex",
4
4
  flexDirection: "row",
@@ -26,6 +26,20 @@ const miniToolbarStyles = () => ({
26
26
  stroke: "#2563EB"
27
27
  }
28
28
  }
29
+ },
30
+ "&.mini-tool-wrpr-ei": {
31
+ background: theme?.palette?.editor?.background,
32
+ borderColor: theme?.palette?.editor?.borderColor,
33
+ "& button": {
34
+ "& svg": {
35
+ stroke: theme?.palette?.editor?.textColor
36
+ },
37
+ "&.active": {
38
+ "& svg": {
39
+ stroke: theme?.palette?.editor?.activeColor
40
+ }
41
+ }
42
+ }
29
43
  }
30
44
  }
31
45
  });
@@ -80,6 +80,7 @@ const PopperHeader = props => {
80
80
  title: "Close",
81
81
  arrow: true,
82
82
  children: /*#__PURE__*/_jsx(IconButton, {
83
+ sx: classes.closeBtn,
83
84
  className: "close-popupbtn",
84
85
  onClick: onClose,
85
86
  children: /*#__PURE__*/_jsx(CloseIcon, {})
@@ -1,4 +1,4 @@
1
- const usePopupStyle = () => ({
1
+ const usePopupStyle = theme => ({
2
2
  popupWrapper: {
3
3
  boxShadow: "0px 4px 10px 0px rgba(0, 0, 0, 0.16)",
4
4
  zIndex: 1300,
@@ -14,6 +14,37 @@ const usePopupStyle = () => ({
14
14
  },
15
15
  "&.xs": {
16
16
  transform: "none !important"
17
+ },
18
+ "& .MuiPaper-root": {
19
+ backgroundColor: theme?.palette?.editor?.background
20
+ },
21
+ "& .MuiTypography-root": {
22
+ color: theme?.palette?.editor?.textColor
23
+ },
24
+ "& .MuiInputBase-root": {
25
+ color: theme?.palette?.editor?.textColor,
26
+ "& svg": {
27
+ color: theme?.palette?.editor?.textColor
28
+ },
29
+ "&.MuiOutlinedInput-root:hover": {
30
+ "& .MuiOutlinedInput-notchedOutline": {
31
+ border: `1px solid ${theme?.palette?.editor?.textColor}`
32
+ }
33
+ }
34
+ },
35
+ "& .MuiCheckbox-root": {
36
+ color: theme?.palette?.editor?.textColor
37
+ },
38
+ "& .MuiOutlinedInput-notchedOutline": {
39
+ border: `1px solid ${theme?.palette?.editor?.borderColor}`
40
+ },
41
+ "& button": {
42
+ color: theme?.palette?.editor?.textColor
43
+ },
44
+ "& .buttonsWrpr": {
45
+ "& button": {
46
+ color: theme?.palette?.editor?.textColor
47
+ }
17
48
  }
18
49
  },
19
50
  textFormatWrapper: {
@@ -37,7 +68,7 @@ const usePopupStyle = () => ({
37
68
  marginBottom: "20px"
38
69
  },
39
70
  "& .MuiOutlinedInput-notchedOutline": {
40
- border: "1px solid #ECECEC"
71
+ border: `1px solid ${theme?.palette?.editor?.borderColor}`
41
72
  },
42
73
  "& .MuiOutlinedInput-root": {
43
74
  boxShadow: "0px 4px 18px 0px rgba(0, 0, 0, 0.05)"
@@ -70,6 +101,16 @@ const usePopupStyle = () => ({
70
101
  fontSize: "14px",
71
102
  color: "#64748B"
72
103
  }
104
+ },
105
+ "& .MuiTab-root": {
106
+ color: theme?.palette?.editor?.textColor
107
+ },
108
+ "& button": {
109
+ "&:hover": {
110
+ "& span": {
111
+ color: theme?.palette?.editor?.activeColor
112
+ }
113
+ }
73
114
  }
74
115
  },
75
116
  textFormatLabel: {
@@ -187,25 +228,40 @@ const usePopupStyle = () => ({
187
228
  marginTop: "8px",
188
229
  textTransform: "capitalize",
189
230
  "&.active": {
190
- background: "rgba(45,66,91,0.1)"
231
+ backgroundColor: theme?.palette?.editor?.background,
232
+ border: `1px solid transparent`,
233
+ color: theme?.palette?.editor?.activeColor
191
234
  }
192
235
  },
193
236
  btnGroup: {
194
- backgroundColor: "#fff",
237
+ backgroundColor: theme?.palette?.editor?.background,
195
238
  "& button": {
239
+ backgroundColor: theme?.palette?.editor?.background,
196
240
  marginRight: "0px",
197
- color: "#64748B",
198
- border: "1px solid #ECECEC",
241
+ color: theme?.palette?.editor?.textColor,
242
+ borderColor: theme?.palette?.editor?.borderColor,
199
243
  textTransform: "capitalize",
244
+ marginBottom: "0px",
245
+ "&:hover": {
246
+ color: theme?.palette?.editor?.borderColor,
247
+ background: theme?.palette?.editor?.background
248
+ },
200
249
  "&.active": {
201
- backgroundColor: "#ECECEC"
250
+ background: theme?.palette?.editor?.background,
251
+ color: theme?.palette?.editor?.activeColor
202
252
  },
203
253
  "&.no-hover": {
204
- border: "1px solid #ECECEC"
254
+ border: `1px solid ${theme?.palette?.editor?.borderColor}`
255
+ }
256
+ }
257
+ },
258
+ allColor: {
259
+ "& .buttonsWrpr": {
260
+ "& button": {
261
+ color: theme?.palette?.editor?.textColor
205
262
  }
206
263
  }
207
264
  },
208
- allColor: {},
209
265
  allColorInner: {
210
266
  "& .buttonsWrpr": {
211
267
  "& button": {
@@ -269,6 +325,54 @@ const usePopupStyle = () => ({
269
325
  "& svg": {
270
326
  color: "#CCC"
271
327
  }
328
+ },
329
+ textOptions: {
330
+ backgroundColor: theme?.palette?.editor?.background,
331
+ color: theme?.palette?.editor?.textColor
332
+ },
333
+ textSize: {
334
+ "& .textFontArrows": {
335
+ "& svg": {
336
+ stroke: theme?.palette?.editor?.textColor
337
+ }
338
+ }
339
+ },
340
+ closeBtn: {
341
+ backgroundColor: theme?.palette?.editor?.background,
342
+ color: theme?.palette?.editor?.textColor
343
+ },
344
+ colorPickerPopup: {
345
+ "& .MuiPaper-root": {
346
+ overflow: "auto",
347
+ backgroundColor: theme?.palette?.editor?.background
348
+ },
349
+ "& .popup_tabs": {
350
+ backgroundColor: theme?.palette?.editor?.background
351
+ },
352
+ "& .popup_tabs-header": {
353
+ backgroundColor: theme?.palette?.editor?.background,
354
+ "& .popup_tabs-header-label-active": {
355
+ color: theme?.palette?.editor?.activeColor,
356
+ backgroundColor: theme?.palette?.editor?.background
357
+ }
358
+ },
359
+ "& .colorpicker": {
360
+ backgroundColor: theme?.palette?.editor?.background
361
+ },
362
+ "& .color-picker-panel": {
363
+ backgroundColor: theme?.palette?.editor?.background
364
+ },
365
+ "& .input_rgba": {
366
+ "& input": {
367
+ backgroundColor: theme?.palette?.editor?.background,
368
+ color: theme?.palette?.editor?.textColor
369
+ }
370
+ }
371
+ },
372
+ colorPopper: {
373
+ "& .MuiPaper-root": {
374
+ backgroundColor: theme?.palette?.editor?.background
375
+ }
272
376
  }
273
377
  });
274
378
  export default usePopupStyle;
@@ -131,6 +131,7 @@ const TextFormat = props => {
131
131
  xs: 12,
132
132
  sx: classes.textFormatField,
133
133
  children: /*#__PURE__*/_jsx(Dropdown, {
134
+ classes: classes,
134
135
  ...fontFamily,
135
136
  editor: editor
136
137
  })
@@ -151,6 +152,7 @@ const TextFormat = props => {
151
152
  xs: 12,
152
153
  sx: classes.textFormatField,
153
154
  children: /*#__PURE__*/_jsx(Dropdown, {
155
+ classes: classes,
154
156
  ...fontWeight,
155
157
  editor: editor,
156
158
  width: "100%"
@@ -169,6 +171,7 @@ const TextFormat = props => {
169
171
  xs: 12,
170
172
  sx: classes.textFormatCG,
171
173
  children: /*#__PURE__*/_jsx(TextSize, {
174
+ classes: classes,
172
175
  format: "fontSize",
173
176
  activeMark: activeMark,
174
177
  editor: editor,
@@ -11,7 +11,10 @@ import useWindowResize from "../../hooks/useWindowResize";
11
11
  import { jsx as _jsx } from "react/jsx-runtime";
12
12
  import { jsxs as _jsxs } from "react/jsx-runtime";
13
13
  const PopupTool = props => {
14
- const classes = usePopupStyle();
14
+ const {
15
+ theme
16
+ } = props;
17
+ const classes = usePopupStyle(theme);
15
18
  const [anchorEl, setAnchorEl] = useState(null);
16
19
  const [open, setOpen] = useState(false);
17
20
  const editor = useSlate();