@flozy/editor 1.2.0 → 1.2.2

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 (38) hide show
  1. package/dist/Editor/CollaborativeEditor.js +30 -14
  2. package/dist/Editor/CommonEditor.js +26 -3
  3. package/dist/Editor/Editor.css +132 -16
  4. package/dist/Editor/Elements/Accordion/AccordionButton.js +2 -2
  5. package/dist/Editor/Elements/AppHeader/AppHeaderButton.js +2 -2
  6. package/dist/Editor/Elements/Button/ButtonToolIcon.js +2 -2
  7. package/dist/Editor/Elements/Carousel/CarouselButton.js +2 -2
  8. package/dist/Editor/Elements/ChipText/ChipTextButton.js +5 -1
  9. package/dist/Editor/Elements/Color Picker/ColorPicker.css +26 -6
  10. package/dist/Editor/Elements/Color Picker/ColorPicker.js +58 -44
  11. package/dist/Editor/Elements/DrawerMenu/DrawerMenu.js +6 -1
  12. package/dist/Editor/Elements/DrawerMenu/DrawerMenuButton.js +2 -2
  13. package/dist/Editor/Elements/Embed/Embed.js +72 -34
  14. package/dist/Editor/Elements/Grid/GridButton.js +2 -2
  15. package/dist/Editor/Elements/Link/LinkButton.js +87 -38
  16. package/dist/Editor/Elements/NewLine/NewLineButton.js +7 -1
  17. package/dist/Editor/Elements/PageSettings/PageSettings.js +13 -0
  18. package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +2 -2
  19. package/dist/Editor/Elements/Signature/Signature.css +75 -0
  20. package/dist/Editor/Elements/Signature/SignatureButton.js +2 -2
  21. package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +20 -3
  22. package/dist/Editor/Elements/Signature/SignaturePopup.js +203 -150
  23. package/dist/Editor/Elements/Table/TableSelector.js +112 -41
  24. package/dist/Editor/Toolbar/Toolbar.js +1 -1
  25. package/dist/Editor/Toolbar/styles.css +8 -2
  26. package/dist/Editor/common/ColorPickerButton.js +6 -2
  27. package/dist/Editor/common/EditorIcons.js +81 -0
  28. package/dist/Editor/common/Icon.js +40 -20
  29. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +38 -19
  30. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +27 -9
  31. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +38 -20
  32. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +14 -3
  33. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +8 -4
  34. package/dist/Editor/common/StyleBuilder/index.js +68 -28
  35. package/dist/Editor/common/Uploader.js +29 -23
  36. package/dist/Editor/common/iconslist.js +883 -0
  37. package/dist/Editor/utils/SlateUtilityFunctions.js +5 -0
  38. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import React, { useEffect, useMemo, useState } from "react";
1
+ import React, { useEffect, useMemo, useState, useRef } from "react";
2
2
  import * as Y from "yjs";
3
3
  import { HocuspocusProvider } from "@hocuspocus/provider";
4
4
  import { Editor, Transforms } from "slate";
@@ -9,7 +9,9 @@ import withCommon from "./hooks/withCommon";
9
9
  import withCollaborative from "./hooks/withCollaborative";
10
10
  import CommonEditor from "./CommonEditor";
11
11
  import { jsx as _jsx } from "react/jsx-runtime";
12
+ import { Fragment as _Fragment } from "react/jsx-runtime";
12
13
  const CollaborativeEditor = props => {
14
+ const editorRef = useRef(null);
13
15
  const {
14
16
  id,
15
17
  content,
@@ -91,7 +93,7 @@ const CollaborativeEditor = props => {
91
93
  });
92
94
  provider.on("authenticationFailed", () => {
93
95
  setAuthenticated({
94
- status: 'error',
96
+ status: "error",
95
97
  scope: null
96
98
  });
97
99
  });
@@ -107,7 +109,18 @@ const CollaborativeEditor = props => {
107
109
  setConnected(false);
108
110
  setMessage("Seems your connection is lost... Reload the page to edit the document...");
109
111
  });
110
- if (authenticated.status === 'error') {
112
+
113
+ // const getContent = () => {
114
+ // console.log(editorRef.current.getContent());
115
+ // };
116
+
117
+ // const insertFragments = () => {
118
+ // editorRef.current.insertFragments([
119
+ // { type: "paragraph", children: [{ text: "some fragements to inss" }] },
120
+ // ]);
121
+ // };
122
+
123
+ if (authenticated.status === "error") {
111
124
  return /*#__PURE__*/_jsx("h1", {
112
125
  "data-status": connected,
113
126
  children: "Authentication Error"
@@ -118,17 +131,20 @@ const CollaborativeEditor = props => {
118
131
  children: message || "Loading..."
119
132
  });
120
133
  }
121
- return /*#__PURE__*/_jsx(CommonEditor, {
122
- editor: editor,
123
- id: id,
124
- content: [],
125
- onSave: onSave,
126
- readOnly: authenticated.scope,
127
- otherProps: {
128
- token: user?.token,
129
- API_HOST: apiHOST
130
- },
131
- ...rest
134
+ return /*#__PURE__*/_jsx(_Fragment, {
135
+ children: /*#__PURE__*/_jsx(CommonEditor, {
136
+ ref: editorRef,
137
+ editor: editor,
138
+ id: id,
139
+ content: [],
140
+ onSave: onSave,
141
+ readOnly: authenticated.scope,
142
+ otherProps: {
143
+ token: user?.token,
144
+ API_HOST: apiHOST
145
+ },
146
+ ...rest
147
+ })
132
148
  });
133
149
  };
134
150
  export default CollaborativeEditor;
@@ -1,4 +1,4 @@
1
- import React, { useRef, useCallback, useEffect, useMemo, useState } from "react";
1
+ import React, { useRef, useCallback, useEffect, useMemo, useState, forwardRef, useImperativeHandle } from "react";
2
2
  import { createEditor } from "slate";
3
3
  import { Slate, Editable } from "slate-react";
4
4
  import html2canvas from "html2canvas";
@@ -31,7 +31,7 @@ const Leaf = ({
31
31
  children: children
32
32
  });
33
33
  };
34
- const CommonEditor = props => {
34
+ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
35
35
  const {
36
36
  id,
37
37
  content,
@@ -78,6 +78,28 @@ const CommonEditor = props => {
78
78
  updateChanges(value);
79
79
  }
80
80
  }, [count]);
81
+ useImperativeHandle(ref, () => ({
82
+ async getThumbnail() {
83
+ try {
84
+ const c = await html2canvas(editorWrapper?.current);
85
+ if (c) {
86
+ return c.toDataURL();
87
+ }
88
+ } catch (err) {
89
+ console.log(err);
90
+ return null;
91
+ }
92
+ },
93
+ getEditor() {
94
+ return editor;
95
+ },
96
+ getContent() {
97
+ return value;
98
+ },
99
+ insertFragments(fragments) {
100
+ editor.insertNode(fragments);
101
+ }
102
+ }));
81
103
  const [htmlAction, setHtmlAction] = useState({
82
104
  showInput: false,
83
105
  html: "",
@@ -211,6 +233,7 @@ const CommonEditor = props => {
211
233
  }, id)
212
234
  })
213
235
  });
214
- };
236
+ });
237
+ CommonEditor.displayName = "CommonEditor";
215
238
  const CHARACTERS = ["Aayla Secura", "Adi Gallia"];
216
239
  export default CommonEditor;
@@ -1,3 +1,18 @@
1
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap');
2
+
3
+ * {
4
+ font-family: 'Inter', sans-serif;
5
+ }
6
+
7
+ .ml-1 {
8
+ margin-left: 10px;
9
+ }
10
+ .dflex {
11
+ display: flex;
12
+ }
13
+ .alignCenter {
14
+ align-items: center;
15
+ }
1
16
  blockquote{
2
17
  border-left: 2px solid #ddd;
3
18
  margin-left: 0;
@@ -47,8 +62,9 @@ td{
47
62
  bottom: 0;
48
63
  margin: auto;
49
64
  background-color: white;
50
- padding: 6px 10px;
51
- border: 1px solid lightgray;
65
+ padding: 20px;
66
+ border-radius: 6px;
67
+ /* border: 1px solid lightgray; */
52
68
  height: fit-content;
53
69
  z-index: 1;
54
70
  width: 300px;
@@ -85,7 +101,7 @@ html{
85
101
  .grid-item-toolbar {
86
102
  position: absolute;
87
103
  right: 0;
88
- top: -25px;
104
+ top: -30px;
89
105
  }
90
106
 
91
107
  .element-toolbar {
@@ -98,9 +114,16 @@ html{
98
114
  .grid-container-toolbar button,
99
115
  .grid-item-toolbar button,
100
116
  .element-toolbar button {
101
- margin-right: 8px;
117
+ /* margin-right: 8px;
102
118
  background-color: rgba(0, 0, 0, 0.8);
103
- color: #FFF;
119
+ color: #FFF; */
120
+ margin-left: 8px;
121
+ background-color: rgb(255 255 255);
122
+ color: #64748b;
123
+ padding: 5px;
124
+ font-size: 12px;
125
+ border-radius: 4px;
126
+ border: 1px solid #64748b;
104
127
  }
105
128
 
106
129
  .grid-item {
@@ -164,22 +187,36 @@ html{
164
187
  display: flex;
165
188
  justify-content: space-around;
166
189
  }
190
+ .signature-btn-grps svg {
191
+ height: 17px !important;
192
+ width: 17px !important;
193
+ }
167
194
 
168
- .signature-btn-grps .MuiButtonBase-root {
169
- border: 1px solid #2563eb;
170
- color: #0f172a;
171
- opacity: 1;
195
+ .close-popupbtn {
196
+ background-color: #EDEDED !important;
197
+ border-radius: 4px !important;
198
+ width: 24px;
199
+ height: 24px;
172
200
  }
173
201
 
174
- .signature-btn-grps .MuiButtonBase-root.active {
175
- background-color: #0052CC;
176
- color: #FFFFFF;
202
+ .close-popupbtn svg {
203
+ width: 17px;
204
+ height: 17px;
177
205
  }
178
206
 
207
+ .popupTitle {
208
+ font-size: 16px !important;
209
+ font-weight: 600 !important;
210
+ font-family: Inter, sans-serif;
211
+ text-transform: uppercase;
212
+ }
213
+
214
+
215
+
179
216
  .signature-tab-content {
180
217
  display: flex;
181
- margin: 12px 16px;
182
- padding: 0px;
218
+ margin: 12px 0px;
219
+ padding: 0px 5px;
183
220
  border: 0px solid #CCC;
184
221
  min-height: 100px;
185
222
  }
@@ -213,11 +250,24 @@ html{
213
250
 
214
251
  .typesignature-fontfamily .MuiButtonBase-root {
215
252
  opacity: 1;
216
- border: 1px solid #ccc;
253
+ border: 1px solid #cccccc6b;
254
+ color: #0F172A;
255
+ box-shadow: 1px 2px 5px rgba(0, 0, 0, 0.08);
217
256
  }
218
257
  .typesignature-fontfamily .MuiButtonBase-root.active {
219
258
  border: 1px solid #0052CC;
220
259
  }
260
+ .typesignature-input-wrapper .MuiInputAdornment-root .MuiButtonBase-root {
261
+ background-color: #E9EBF8 !important;
262
+ border-radius: 4px !important;
263
+ width: 24px;
264
+ height: 24px;
265
+ padding: 2px;
266
+ }
267
+ .typesignature-input-wrapper .MuiInputAdornment-root svg{
268
+ width: 100%;
269
+ height: 100%;
270
+ }
221
271
 
222
272
  .signature-canvas{
223
273
  height: 100%;
@@ -231,7 +281,7 @@ html{
231
281
  align-items: center;
232
282
  }
233
283
  .react-datepicker__input-container input {
234
- height: 36px;
284
+ height: 27px;
235
285
  border: 1px solid #ccc;
236
286
  border-radius: 5px;
237
287
  width: 100%;
@@ -308,6 +358,41 @@ html{
308
358
  display: inline-flex;
309
359
  }
310
360
 
361
+ .MuiButton-root.primaryBtn {
362
+ background: #2563eb !important;
363
+ box-shadow: 0px 8px 24px rgba(30, 64, 175, 0.08);
364
+ border-radius: 8px !important;
365
+ height: 28px !important;
366
+ font-weight: 600 !important;
367
+ font-size: 12px !important;
368
+ color: #ffffff !important;
369
+ border: 1px solid #2563eb !important;
370
+ width: auto !important;
371
+ }
372
+ .MuiButton-root.secondaryBtn {
373
+ background: #ffffff;
374
+ border: 1px solid #2563eb !important;
375
+ box-shadow: 0px 8px 24px rgba(30, 64, 175, 0.08);
376
+ border-radius: 8px !important;
377
+ height: 28px !important;
378
+ font-weight: 600 !important;
379
+ font-size: 12px !important;
380
+ margin-right: 15px !important;
381
+ color: #2563EB;
382
+ width: auto !important;
383
+ }
384
+ .deleteBtn {
385
+ background: #ffffff;
386
+ border: 1px solid #d32f2f !important;
387
+ box-shadow: 0px 8px 24px rgba(30, 64, 175, 0.08);
388
+ border-radius: 8px !important;
389
+ height: 28px !important;
390
+ font-weight: 600 !important;
391
+ font-size: 12px !important;
392
+ margin-right: 15px !important;
393
+ color: #d32f2f;
394
+ width: auto !important;
395
+ }
311
396
  @media (max-width: 480px) {
312
397
  .toolbar {
313
398
  display: flex;
@@ -322,3 +407,34 @@ html{
322
407
  width: 100% !important;
323
408
  }
324
409
  }
410
+
411
+
412
+ .editorTabs {
413
+ height: 40px;
414
+ min-height: 40px;
415
+ }
416
+
417
+ .editorTabs .MuiTab-root {
418
+ min-width: 80px;
419
+ min-height: 30px !important;
420
+ font-size: 14px;
421
+ /* max-width: 130px; */
422
+ /* padding: 6px 6px !important; */
423
+ color: #0F172A;
424
+ text-transform: capitalize;
425
+ }
426
+
427
+ .editorTabs .MuiTabScrollButton-horizontal.Mui-disabled {
428
+ display: none;
429
+ }
430
+ .editorTabs .MuiTabs-scroller {
431
+ border-bottom: 1px solid #8080801c;
432
+ }
433
+
434
+ .btnColorPicker .MuiOutlinedInput-input, .tablePopup .MuiOutlinedInput-input {
435
+ padding: 8.5px 14px;
436
+ }
437
+
438
+ .toolbar svg {
439
+ /* fill: 'red' */
440
+ }
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { IconButton } from "@mui/material";
3
- import ExpandCircleDownIcon from "@mui/icons-material/ExpandCircleDown";
4
3
  import { insertAccordion } from "../../utils/accordion";
4
+ import { AccordionIcon } from "../../common/iconslist";
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  const AccordionButton = props => {
7
7
  const {
@@ -16,7 +16,7 @@ const AccordionButton = props => {
16
16
  style: {
17
17
  marginLeft: "0px"
18
18
  },
19
- children: /*#__PURE__*/_jsx(ExpandCircleDownIcon, {})
19
+ children: /*#__PURE__*/_jsx(AccordionIcon, {})
20
20
  });
21
21
  };
22
22
  export default AccordionButton;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { IconButton } from "@mui/material";
3
- import ViewDayIcon from "@mui/icons-material/ViewDay";
4
3
  import { insertAppHeader } from "../../utils/insertAppHeader";
4
+ import { AppHeader } from "../../common/iconslist";
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  const AppHeaderButton = props => {
7
7
  const {
@@ -13,7 +13,7 @@ const AppHeaderButton = props => {
13
13
  return /*#__PURE__*/_jsx(IconButton, {
14
14
  title: "App Header",
15
15
  onClick: handleClick,
16
- children: /*#__PURE__*/_jsx(ViewDayIcon, {})
16
+ children: /*#__PURE__*/_jsx(AppHeader, {})
17
17
  });
18
18
  };
19
19
  export default AppHeaderButton;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { IconButton } from "@mui/material";
3
- import ViewStreamIcon from "@mui/icons-material/ViewStream";
4
3
  import { insertButton } from "../../utils/button";
4
+ import { ButtonIcon } from "../../common/iconslist";
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  const ButtonToolIcon = props => {
7
7
  const {
@@ -13,7 +13,7 @@ const ButtonToolIcon = props => {
13
13
  return /*#__PURE__*/_jsx(IconButton, {
14
14
  onClick: handleInsertButton,
15
15
  title: "Button",
16
- children: /*#__PURE__*/_jsx(ViewStreamIcon, {})
16
+ children: /*#__PURE__*/_jsx(ButtonIcon, {})
17
17
  });
18
18
  };
19
19
  export default ButtonToolIcon;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { IconButton } from "@mui/material";
3
- import ViewCarouselIcon from "@mui/icons-material/ViewCarousel";
4
3
  import { insertCarousel } from "../../utils/carousel";
4
+ import { Carousal } from "../../common/iconslist";
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  const CarouselButton = props => {
7
7
  const {
@@ -13,7 +13,7 @@ const CarouselButton = props => {
13
13
  return /*#__PURE__*/_jsx(IconButton, {
14
14
  title: "Carousel",
15
15
  onClick: handleClick,
16
- children: /*#__PURE__*/_jsx(ViewCarouselIcon, {})
16
+ children: /*#__PURE__*/_jsx(Carousal, {})
17
17
  });
18
18
  };
19
19
  export default CarouselButton;
@@ -51,7 +51,11 @@ const ChipTextButton = props => {
51
51
  children: [/*#__PURE__*/_jsx(IconButton, {
52
52
  title: "Chip Text",
53
53
  onClick: handleClick,
54
- children: /*#__PURE__*/_jsx(SmartButtonIcon, {})
54
+ children: /*#__PURE__*/_jsx(SmartButtonIcon, {
55
+ sx: {
56
+ fill: '#64748B'
57
+ }
58
+ })
55
59
  }), openSetttings !== false ? /*#__PURE__*/_jsx(ChipTextPopup, {
56
60
  element: openSetttings?.element || {},
57
61
  onSave: onSave,
@@ -3,17 +3,18 @@
3
3
  display: grid;
4
4
  grid-template-columns: auto auto auto auto auto auto auto;
5
5
  align-items: center;
6
- gap: 5px;
6
+ gap: 10px;
7
7
  }
8
8
  .clicked{
9
- border: 1px solid lightgray;
9
+ /* border: 1px solid lightgray; */
10
10
  border-bottom: none;
11
11
  }
12
12
  .option,.hexPreview{
13
- width: 16px;
14
- height: 16px;
13
+ width: 20px;
14
+ height: 20px;
15
+ border-radius: 20px;
15
16
  background-color: #000000;
16
-
17
+ border: 1px solid #eee;
17
18
  }
18
19
  .color-picker form{
19
20
  display: flex;
@@ -23,7 +24,7 @@
23
24
  }
24
25
  .color-picker input{
25
26
  width: 65%;
26
- height:1.3em;
27
+ height: 30px;
27
28
  border:1px solid lightgray;
28
29
  border-radius: 5px;
29
30
  padding-left:5px
@@ -36,3 +37,22 @@
36
37
  .color-picker input:focus{
37
38
  outline: none;
38
39
  }
40
+ .color-picker-dialog .MuiPaper-root {
41
+ padding: 20px;
42
+ }
43
+ .color-picker-dialog .popup {
44
+ width: 100%;
45
+ max-width: fit-content;
46
+ }
47
+ .backdrop {
48
+ position: fixed;
49
+ right: 0;
50
+ bottom: 0;
51
+ top: 0;
52
+ left: 0;
53
+ background-color: rgba(0, 0, 0, 0.5);
54
+ z-index: 1;
55
+ }
56
+ .colorSaveBtn {
57
+ border-radius: 6px;
58
+ }
@@ -1,5 +1,5 @@
1
1
  import React, { useRef, useState } from "react";
2
- import { MdFormatColorText, MdFormatColorFill, MdCheck } from "react-icons/md";
2
+ import { MdFormatColorText, MdFormatColorFill } from "react-icons/md";
3
3
  import "./ColorPicker.css";
4
4
  import { colors } from "./defaultColors";
5
5
  import { addMarkData, activeMark } from "../../utils/SlateUtilityFunctions";
@@ -8,12 +8,19 @@ import usePopup from "../../utils/customHooks/usePopup";
8
8
  import { ReactEditor } from "slate-react";
9
9
  import { jsx as _jsx } from "react/jsx-runtime";
10
10
  import { jsxs as _jsxs } from "react/jsx-runtime";
11
+ import { Fragment as _Fragment } from "react/jsx-runtime";
11
12
  const logo = {
12
13
  color: /*#__PURE__*/_jsx(MdFormatColorText, {
13
- size: 20
14
+ size: 17,
15
+ style: {
16
+ fill: '#64748B'
17
+ }
14
18
  }),
15
19
  bgColor: /*#__PURE__*/_jsx(MdFormatColorFill, {
16
- size: 20
20
+ size: 17,
21
+ style: {
22
+ fill: '#64748B'
23
+ }
17
24
  })
18
25
  };
19
26
  const ColorPicker = ({
@@ -62,7 +69,7 @@ const ColorPicker = ({
62
69
  setHexValue(newHex);
63
70
  };
64
71
  return /*#__PURE__*/_jsxs("div", {
65
- className: "color-picker popup-wrapper1",
72
+ className: "color-picker popup-wrapper1 color-picker-dialog",
66
73
  ref: colorPickerRef,
67
74
  children: [/*#__PURE__*/_jsx("button", {
68
75
  style: {
@@ -72,50 +79,57 @@ const ColorPicker = ({
72
79
  className: showOptions ? "clicked" : "",
73
80
  onClick: toggleOption,
74
81
  children: logo[format]
75
- }), showOptions && /*#__PURE__*/_jsxs("div", {
76
- className: "popup",
82
+ }), showOptions && /*#__PURE__*/_jsxs(_Fragment, {
77
83
  children: [/*#__PURE__*/_jsx("div", {
78
- className: "color-options",
79
- children: colors.map((color, index) => {
80
- return /*#__PURE__*/_jsx("div", {
81
- "data-value": color,
82
- onClick: changeColor,
83
- className: "option",
84
- style: {
85
- background: color
86
- }
87
- }, index);
88
- })
89
- }), /*#__PURE__*/_jsx("p", {
90
- style: {
91
- textAlign: "center",
92
- opacity: "0.7",
93
- width: "100%"
94
- },
95
- children: "OR"
96
- }), /*#__PURE__*/_jsxs("form", {
97
- onSubmit: handleFormSubmit,
84
+ className: "backdrop",
85
+ onClick: () => {
86
+ setShowOptions(false);
87
+ }
88
+ }), /*#__PURE__*/_jsxs("div", {
89
+ className: "popup",
98
90
  children: [/*#__PURE__*/_jsx("div", {
99
- className: "hexPreview",
100
- style: {
101
- background: validHex ? hexValue : "#000000"
102
- }
103
- }), /*#__PURE__*/_jsx("input", {
104
- type: "text",
105
- placeholder: "#000000",
106
- value: hexValue,
107
- onChange: handleHexChange,
108
- style: {
109
- border: validHex === false ? "1px solid red" : "1px solid lightgray"
110
- }
111
- }), /*#__PURE__*/_jsx("button", {
91
+ className: "color-options",
92
+ children: colors.map((color, index) => {
93
+ return /*#__PURE__*/_jsx("div", {
94
+ "data-value": color,
95
+ onClick: changeColor,
96
+ className: "option",
97
+ style: {
98
+ background: color
99
+ }
100
+ }, index);
101
+ })
102
+ }), /*#__PURE__*/_jsx("p", {
112
103
  style: {
113
- color: validHex ? "green" : ""
104
+ textAlign: "center",
105
+ opacity: "0.7",
106
+ width: "100%"
114
107
  },
115
- type: "submit",
116
- children: /*#__PURE__*/_jsx(MdCheck, {
117
- size: 20
118
- })
108
+ children: "or"
109
+ }), /*#__PURE__*/_jsxs("form", {
110
+ onSubmit: handleFormSubmit,
111
+ children: [/*#__PURE__*/_jsx("div", {
112
+ className: "hexPreview",
113
+ style: {
114
+ background: validHex ? hexValue : "#000000"
115
+ }
116
+ }), /*#__PURE__*/_jsx("input", {
117
+ type: "text",
118
+ placeholder: "#000000",
119
+ value: hexValue,
120
+ onChange: handleHexChange,
121
+ style: {
122
+ border: validHex === false ? "1px solid red" : "1px solid lightgray"
123
+ }
124
+ }), /*#__PURE__*/_jsx("button", {
125
+ className: "colorSaveBtn",
126
+ style: {
127
+ background: validHex ? "#2563EB" : "#64748B",
128
+ color: '#fff'
129
+ },
130
+ type: "submit",
131
+ children: "Save"
132
+ })]
119
133
  })]
120
134
  })]
121
135
  })]
@@ -29,7 +29,11 @@ const DrawerMenu = props => {
29
29
  contentEditable: false,
30
30
  children: [/*#__PURE__*/_jsx(IconButton, {
31
31
  onClick: handleClick,
32
- children: /*#__PURE__*/_jsx(MenuIcon, {})
32
+ children: /*#__PURE__*/_jsx(MenuIcon, {
33
+ sx: {
34
+ fill: '#64748B'
35
+ }
36
+ })
33
37
  }), /*#__PURE__*/_jsx(Drawer, {
34
38
  anchor: anchor || "left",
35
39
  open: open,
@@ -56,6 +60,7 @@ const DrawerMenu = props => {
56
60
  children: /*#__PURE__*/_jsx(Button, {
57
61
  color: "error",
58
62
  onClick: handleDelete,
63
+ className: "deleteBtn",
59
64
  children: "Delete"
60
65
  })
61
66
  })]
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { IconButton } from "@mui/material";
3
- import ViewSidebarIcon from "@mui/icons-material/ViewSidebar";
4
3
  import { insertDrawerMenu } from "../../utils/insertDrawerMenu";
4
+ import { DrawerMenu } from "../../common/iconslist";
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  const DrawerButton = props => {
7
7
  const {
@@ -15,7 +15,7 @@ const DrawerButton = props => {
15
15
  return /*#__PURE__*/_jsx(IconButton, {
16
16
  title: "Drawer Menu",
17
17
  onClick: handleClick,
18
- children: /*#__PURE__*/_jsx(ViewSidebarIcon, {})
18
+ children: /*#__PURE__*/_jsx(DrawerMenu, {})
19
19
  });
20
20
  };
21
21
  export default DrawerButton;