@flozy/editor 9.5.4 → 9.5.5

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 (254) hide show
  1. package/dist/Editor/ChatEditor.js +29 -20
  2. package/dist/Editor/CommonEditor.js +19 -130
  3. package/dist/Editor/DialogWrapper.js +25 -31
  4. package/dist/Editor/Editor.css +7 -11
  5. package/dist/Editor/Elements/AI/AIInput.js +3 -5
  6. package/dist/Editor/Elements/AI/CustomSelect.js +5 -9
  7. package/dist/Editor/Elements/AI/PopoverAIInput.js +2 -4
  8. package/dist/Editor/Elements/Accordion/Accordion.js +3 -4
  9. package/dist/Editor/Elements/Accordion/AccordionBtnPopup.js +1 -4
  10. package/dist/Editor/Elements/Accordion/AccordionButton.js +2 -6
  11. package/dist/Editor/Elements/Accordion/AccordionTitlePopup.js +1 -4
  12. package/dist/Editor/Elements/AppHeader/AppHeader.js +3 -3
  13. package/dist/Editor/Elements/AppHeader/AppHeaderButton.js +2 -6
  14. package/dist/Editor/Elements/AppHeader/AppHeaderPopup.js +1 -4
  15. package/dist/Editor/Elements/Attachments/AttachmentsButton.js +1 -4
  16. package/dist/Editor/Elements/Button/ButtonPopup.js +1 -4
  17. package/dist/Editor/Elements/Button/ButtonToolIcon.js +2 -6
  18. package/dist/Editor/Elements/Button/EditorButton.js +14 -31
  19. package/dist/Editor/Elements/Carousel/Carousel.js +4 -5
  20. package/dist/Editor/Elements/Carousel/CarouselButton.js +2 -6
  21. package/dist/Editor/Elements/Carousel/CarouselItem.js +2 -3
  22. package/dist/Editor/Elements/ChipText/ChipTextPopup.js +1 -4
  23. package/dist/Editor/Elements/CodeToText/CodeToText.js +4 -5
  24. package/dist/Editor/Elements/CodeToText/HtmlContextMenu.js +2 -6
  25. package/dist/Editor/Elements/Color Picker/ColorButtons.js +14 -60
  26. package/dist/Editor/Elements/Color Picker/ColorPicker.css +1 -25
  27. package/dist/Editor/Elements/Color Picker/ColorPicker.js +7 -10
  28. package/dist/Editor/Elements/Color Picker/Styles.js +3 -3
  29. package/dist/Editor/Elements/Colorbox/ColorboxButton.js +2 -6
  30. package/dist/Editor/Elements/DataView/DataView.js +2 -5
  31. package/dist/Editor/Elements/DataView/DataViewButton.js +2 -6
  32. package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +2 -7
  33. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +3 -4
  34. package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +5 -25
  35. package/dist/Editor/Elements/DataView/Layouts/DataTypes/TextType.js +2 -7
  36. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +12 -13
  37. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +4 -7
  38. package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +5 -7
  39. package/dist/Editor/Elements/DataView/Layouts/FilterView.js +7 -9
  40. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +3 -8
  41. package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +3 -5
  42. package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +5 -6
  43. package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +3 -5
  44. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +7 -9
  45. package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +38 -64
  46. package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +2 -3
  47. package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +2 -3
  48. package/dist/Editor/Elements/DataView/Layouts/Options/index.js +6 -23
  49. package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +1 -4
  50. package/dist/Editor/Elements/DataView/Layouts/TableView.js +4 -6
  51. package/dist/Editor/Elements/DataView/Layouts/ViewData.js +4 -8
  52. package/dist/Editor/Elements/DataView/Layouts/index.js +1 -3
  53. package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +2 -5
  54. package/dist/Editor/Elements/DataView/styles.js +0 -13
  55. package/dist/Editor/Elements/Divider/Divider.js +3 -5
  56. package/dist/Editor/Elements/Divider/DividerButton.js +2 -6
  57. package/dist/Editor/Elements/Divider/DividerPopup.js +2 -3
  58. package/dist/Editor/Elements/Embed/Embed.js +1 -4
  59. package/dist/Editor/Elements/Embed/EmbedPopup.js +1 -4
  60. package/dist/Editor/Elements/Embed/Image.js +11 -16
  61. package/dist/Editor/Elements/Embed/Video.js +6 -9
  62. package/dist/Editor/Elements/EmbedScript/Code.js +4 -7
  63. package/dist/Editor/Elements/EmbedScript/EmbedScript.js +2 -6
  64. package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +5 -8
  65. package/dist/Editor/Elements/Emoji/EmojiButton.js +2 -6
  66. package/dist/Editor/Elements/Form/FieldPopup.js +1 -4
  67. package/dist/Editor/Elements/Form/Form.js +9 -12
  68. package/dist/Editor/Elements/Form/FormButton.js +2 -6
  69. package/dist/Editor/Elements/Form/FormPopup.js +2 -3
  70. package/dist/Editor/Elements/Form/Workflow/FormWorkflow.js +12 -18
  71. package/dist/Editor/Elements/Form/Workflow/ListWorkflow.js +8 -13
  72. package/dist/Editor/Elements/Form/Workflow/MoreOptions.js +2 -3
  73. package/dist/Editor/Elements/Form/Workflow/UserInputs.js +2 -4
  74. package/dist/Editor/Elements/Form/Workflow/index.js +9 -15
  75. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +23 -67
  76. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +3 -21
  77. package/dist/Editor/Elements/FreeGrid/FreeGridButton.js +2 -6
  78. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +4 -34
  79. package/dist/Editor/Elements/FreeGrid/Options/AddElement.js +2 -3
  80. package/dist/Editor/Elements/FreeGrid/Options/More.js +4 -10
  81. package/dist/Editor/Elements/FreeGrid/styles.js +0 -3
  82. package/dist/Editor/Elements/Grid/Grid.js +10 -13
  83. package/dist/Editor/Elements/Grid/GridButton.js +5 -9
  84. package/dist/Editor/Elements/Grid/GridItem.js +8 -14
  85. package/dist/Editor/Elements/Grid/GridItemPopup.js +1 -4
  86. package/dist/Editor/Elements/Grid/GridPopup.js +1 -4
  87. package/dist/Editor/Elements/Grid/SectionPopup.js +1 -4
  88. package/dist/Editor/Elements/Link/Link.js +5 -8
  89. package/dist/Editor/Elements/Link/LinkButton.js +1 -4
  90. package/dist/Editor/Elements/List/CheckList.js +9 -14
  91. package/dist/Editor/Elements/NewLine/NewLineButton.js +2 -6
  92. package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +1 -4
  93. package/dist/Editor/Elements/PageSettings/PageSettingsPopup.js +1 -4
  94. package/dist/Editor/Elements/Search/SearchButton.js +3 -6
  95. package/dist/Editor/Elements/Search/SearchList.js +3 -7
  96. package/dist/Editor/Elements/Signature/SignatureButton.js +2 -6
  97. package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +2 -6
  98. package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +1 -4
  99. package/dist/Editor/Elements/Signature/SignaturePopup.js +16 -17
  100. package/dist/Editor/Elements/SimpleText/index.js +4 -5
  101. package/dist/Editor/Elements/SimpleText/style.js +2 -2
  102. package/dist/Editor/Elements/Table/DragButton.js +2 -4
  103. package/dist/Editor/Elements/Table/Table.js +11 -23
  104. package/dist/Editor/Elements/Table/TableCell.js +2 -6
  105. package/dist/Editor/Elements/Table/TablePopup.js +1 -4
  106. package/dist/Editor/Elements/Table/TableSelector.js +6 -10
  107. package/dist/Editor/Elements/Table/TableTool.js +4 -8
  108. package/dist/Editor/Elements/Title/title.js +0 -10
  109. package/dist/Editor/Elements/TopBanner/TopBannerButton.js +1 -4
  110. package/dist/Editor/Elements/Variables/VariableButton.js +1 -10
  111. package/dist/Editor/MiniEditor.js +3 -10
  112. package/dist/Editor/Styles/EditorStyles.js +5 -5
  113. package/dist/Editor/Toolbar/Basic/index.js +1 -2
  114. package/dist/Editor/Toolbar/FormatTools/BlockButton.js +2 -6
  115. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +3 -27
  116. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +3 -4
  117. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +4 -8
  118. package/dist/Editor/Toolbar/FormatTools/TextSize.js +13 -10
  119. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +3 -5
  120. package/dist/Editor/Toolbar/PopupTool/AddTemplates.js +5 -10
  121. package/dist/Editor/Toolbar/PopupTool/ButtonTemplatesCard.js +4 -10
  122. package/dist/Editor/Toolbar/PopupTool/FullViewCard.js +4 -10
  123. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +3 -9
  124. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectAlignment.js +35 -42
  125. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +13 -6
  126. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectList.js +51 -58
  127. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectSuperSubscript.js +22 -29
  128. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +87 -226
  129. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +10 -20
  130. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +4 -8
  131. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +9 -16
  132. package/dist/Editor/Toolbar/PopupTool/TemplateCard.js +5 -11
  133. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +42 -122
  134. package/dist/Editor/Toolbar/PopupTool/index.js +1 -17
  135. package/dist/Editor/Toolbar/Toolbar.js +10 -20
  136. package/dist/Editor/Toolbar/toolbarGroups.js +6 -48
  137. package/dist/Editor/common/ColorPickerButton.js +14 -39
  138. package/dist/Editor/common/CustomDialog/index.js +10 -8
  139. package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
  140. package/dist/Editor/common/FontLoader/FontLoader.js +0 -3
  141. package/dist/Editor/common/Icon.js +1 -46
  142. package/dist/Editor/common/ImageSelector/ImageSelector.js +8 -10
  143. package/dist/Editor/common/ImageSelector/Options/AddLink.js +4 -6
  144. package/dist/Editor/common/ImageSelector/Styles.js +9 -3
  145. package/dist/Editor/common/LinkSettings/NavComponents.js +10 -14
  146. package/dist/Editor/common/LinkSettings/index.js +14 -20
  147. package/dist/Editor/common/LinkSettings/navOptions.js +1 -1
  148. package/dist/Editor/common/MentionsPopup/index.js +2 -6
  149. package/dist/Editor/common/RnD/ContextMenu/CMenus.js +22 -22
  150. package/dist/Editor/common/RnD/ContextMenu/index.js +2 -3
  151. package/dist/Editor/common/RnD/ElementOptions/index.js +2 -7
  152. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/SaveAsTemplate.js +3 -8
  153. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +3 -7
  154. package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +2 -3
  155. package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +2 -3
  156. package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +2 -3
  157. package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +2 -3
  158. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +4 -7
  159. package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +2 -3
  160. package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +2 -3
  161. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +2 -6
  162. package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +2 -3
  163. package/dist/Editor/common/RnD/OptionsPopup/index.js +3 -4
  164. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +4 -11
  165. package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +3 -6
  166. package/dist/Editor/common/RnD/Utils/gridDropItem.js +7 -56
  167. package/dist/Editor/common/RnD/Utils/index.js +0 -3
  168. package/dist/Editor/common/RnD/VirtualElement/index.js +103 -187
  169. package/dist/Editor/common/RnD/VirtualElement/styles.js +7 -123
  170. package/dist/Editor/common/RnD/VirtualElement/updateAutoProps.js +3 -5
  171. package/dist/Editor/common/RnD/index.js +7 -59
  172. package/dist/Editor/common/Section/index.js +4 -7
  173. package/dist/Editor/common/Shorthands/elements.js +3 -74
  174. package/dist/Editor/common/StyleBuilder/appHeaderStyle.js +4 -4
  175. package/dist/Editor/common/StyleBuilder/boxStyle.js +2 -2
  176. package/dist/Editor/common/StyleBuilder/buttonStyle.js +4 -6
  177. package/dist/Editor/common/StyleBuilder/dividerStyles.js +2 -2
  178. package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +6 -6
  179. package/dist/Editor/common/StyleBuilder/fieldStyle.js +2 -2
  180. package/dist/Editor/common/StyleBuilder/fieldTypes/alignment.js +9 -13
  181. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +3 -11
  182. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +5 -19
  183. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +10 -22
  184. package/dist/Editor/common/StyleBuilder/fieldTypes/buttonLink.js +3 -6
  185. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +13 -27
  186. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +14 -43
  187. package/dist/Editor/common/StyleBuilder/fieldTypes/elementSize.js +6 -10
  188. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +6 -19
  189. package/dist/Editor/common/StyleBuilder/fieldTypes/gridSize.js +2 -6
  190. package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +2 -5
  191. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +6 -9
  192. package/dist/Editor/common/StyleBuilder/fieldTypes/metaDataMapping.js +2 -8
  193. package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +11 -12
  194. package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +2 -6
  195. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +4 -8
  196. package/dist/Editor/common/StyleBuilder/fieldTypes/textAlign.js +2 -6
  197. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +12 -21
  198. package/dist/Editor/common/StyleBuilder/formStyle.js +7 -7
  199. package/dist/Editor/common/StyleBuilder/gridItemStyle.js +6 -6
  200. package/dist/Editor/common/StyleBuilder/gridStyle.js +5 -5
  201. package/dist/Editor/common/StyleBuilder/index.js +5 -8
  202. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +7 -5
  203. package/dist/Editor/common/Uploader.js +5 -16
  204. package/dist/Editor/commonStyle.js +57 -68
  205. package/dist/Editor/helper/index.js +2 -2
  206. package/dist/Editor/helper/theme.js +2 -202
  207. package/dist/Editor/hooks/useMouseMove.js +3 -9
  208. package/dist/Editor/plugins/withEmbeds.js +1 -1
  209. package/dist/Editor/plugins/withHTML.js +7 -10
  210. package/dist/Editor/plugins/withLayout.js +2 -3
  211. package/dist/Editor/plugins/withTable.js +1 -1
  212. package/dist/Editor/theme/ThemeList.js +173 -50
  213. package/dist/Editor/utils/SlateUtilityFunctions.js +47 -164
  214. package/dist/Editor/utils/draftToSlate.js +2 -3
  215. package/dist/Editor/utils/embed.js +6 -8
  216. package/dist/Editor/utils/font.js +37 -40
  217. package/dist/Editor/utils/freegrid.js +2 -2
  218. package/dist/Editor/utils/helper.js +19 -90
  219. package/dist/Editor/utils/table.js +6 -9
  220. package/package.json +2 -2
  221. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +0 -425
  222. package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -441
  223. package/dist/Editor/assets/svg/ClearAllRounded.js +0 -31
  224. package/dist/Editor/assets/svg/ThemeIcons.js +0 -291
  225. package/dist/Editor/common/CustomColorPicker/index.js +0 -131
  226. package/dist/Editor/common/CustomColorPicker/style.js +0 -53
  227. package/dist/Editor/common/CustomDialog2/index.js +0 -94
  228. package/dist/Editor/common/CustomDialog2/style.js +0 -67
  229. package/dist/Editor/common/CustomSelect.js +0 -33
  230. package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +0 -17
  231. package/dist/Editor/common/RnD/VirtualElement/ForceAutoAlignment.js +0 -117
  232. package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +0 -134
  233. package/dist/Editor/common/RnD/VirtualElement/helper.js +0 -281
  234. package/dist/Editor/common/SnackBar/index.js +0 -43
  235. package/dist/Editor/helper/textIndeces.js +0 -58
  236. package/dist/Editor/hooks/useAutoScroll.js +0 -38
  237. package/dist/Editor/hooks/useEditorTheme.js +0 -153
  238. package/dist/Editor/hooks/useThemeValues.js +0 -63
  239. package/dist/Editor/theme/index.js +0 -147
  240. package/dist/Editor/themeSettings/ActiveTheme.js +0 -72
  241. package/dist/Editor/themeSettings/buttons/index.js +0 -285
  242. package/dist/Editor/themeSettings/buttons/style.js +0 -23
  243. package/dist/Editor/themeSettings/colorTheme/index.js +0 -305
  244. package/dist/Editor/themeSettings/colorTheme/style.js +0 -81
  245. package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -121
  246. package/dist/Editor/themeSettings/fonts/index.js +0 -222
  247. package/dist/Editor/themeSettings/fonts/style.js +0 -60
  248. package/dist/Editor/themeSettings/icons.js +0 -60
  249. package/dist/Editor/themeSettings/index.js +0 -331
  250. package/dist/Editor/themeSettings/style.js +0 -211
  251. package/dist/Editor/themeSettingsAI/icons.js +0 -96
  252. package/dist/Editor/themeSettingsAI/index.js +0 -355
  253. package/dist/Editor/themeSettingsAI/saveTheme.js +0 -205
  254. package/dist/Editor/themeSettingsAI/style.js +0 -259
@@ -1,205 +0,0 @@
1
- import React, { useEffect, useState } from "react";
2
- import { Box, Button, CircularProgress, Dialog, Divider, Grid, IconButton, TextField, Typography, styled } from "@mui/material";
3
-
4
- // Style
5
- import Style from "./style";
6
-
7
- // icons
8
- import { CloseIcon } from "../common/iconslist";
9
- import { jsx as _jsx } from "react/jsx-runtime";
10
- import { jsxs as _jsxs } from "react/jsx-runtime";
11
- import { Fragment as _Fragment } from "react/jsx-runtime";
12
- const SaveTheme = props => {
13
- const {
14
- className,
15
- // enableGenerateTheme,
16
- saveBtnLabel,
17
- loading,
18
- onSave,
19
- defaultFormData = {},
20
- addNewTheme
21
- } = props;
22
-
23
- // State
24
- const [saveTheme, setSaveTheme] = useState(false);
25
- const [error, setError] = useState({});
26
- const [form, setForm] = useState(defaultFormData);
27
- const {
28
- name,
29
- mood_name
30
- } = form;
31
- const updateForm = update => {
32
- setForm(prev => ({
33
- ...prev,
34
- ...update
35
- }));
36
- };
37
- useEffect(() => {
38
- setForm(defaultFormData);
39
- }, [defaultFormData]);
40
- const onClose = () => {
41
- setSaveTheme(false);
42
- setError({});
43
- setForm({});
44
- };
45
- const validate = () => {
46
- let err = {};
47
- if (!name) {
48
- err.name = "This field is required!";
49
- }
50
- if (!mood_name) {
51
- err.mood_name = "This field is required!";
52
- }
53
- return err;
54
- };
55
- return /*#__PURE__*/_jsxs(Box, {
56
- className: className,
57
- children: [/*#__PURE__*/_jsx(Button, {
58
- variant: "contained",
59
- size: "small"
60
- // className={`blueBtn ${enableGenerateTheme ? "eanbled" : "disabled"}`}
61
- // disabled={!enableGenerateTheme}
62
- ,
63
- className: addNewTheme ? `outlineBtn` : `blueBtn`,
64
- onClick: () => setSaveTheme(true),
65
- children: saveBtnLabel
66
- }), /*#__PURE__*/_jsx(Dialog, {
67
- fullWidth: true,
68
- maxWidth: "sm",
69
- open: saveTheme,
70
- onClose: onClose,
71
- className: className,
72
- sx: {
73
- borderRadius: "10px"
74
- },
75
- children: /*#__PURE__*/_jsxs(Grid, {
76
- className: "saveThemeContainer",
77
- sx: {
78
- p: 2,
79
- pt: 2.5
80
- },
81
- children: [/*#__PURE__*/_jsxs(Grid, {
82
- container: true,
83
- justifyContent: "space-between",
84
- alignItems: "center",
85
- children: [/*#__PURE__*/_jsx(Typography, {
86
- variant: "h4",
87
- sx: {
88
- fontSize: "18px"
89
- },
90
- className: "fw-600",
91
- children: saveBtnLabel
92
- }), /*#__PURE__*/_jsx(IconButton, {
93
- onClick: onClose,
94
- className: "closeBtn",
95
- children: /*#__PURE__*/_jsx(CloseIcon, {})
96
- })]
97
- }), /*#__PURE__*/_jsx(Divider, {
98
- sx: {
99
- mt: 2,
100
- mb: 2
101
- }
102
- }), /*#__PURE__*/_jsx(Typography, {
103
- variant: "body1",
104
- className: "fw-500",
105
- sx: {
106
- pb: 1
107
- },
108
- children: "Theme name"
109
- }), /*#__PURE__*/_jsx(TextField, {
110
- variant: "outlined",
111
- fullWidth: true,
112
- size: "small",
113
- placeholder: "Ex : Forest green",
114
- onChange: e => updateForm({
115
- name: e.target.value
116
- }),
117
- value: name
118
- }), /*#__PURE__*/_jsx(Error, {
119
- error: error?.name
120
- }), /*#__PURE__*/_jsx(Typography, {
121
- variant: "body1",
122
- className: "fw-500",
123
- sx: {
124
- pt: 2,
125
- pb: 1
126
- },
127
- children: "Category"
128
- }), /*#__PURE__*/_jsx(TextField, {
129
- variant: "outlined",
130
- size: "small",
131
- placeholder: "Ex : Nature and Calm",
132
- fullWidth: true,
133
- onChange: e => updateForm({
134
- mood_name: e.target.value
135
- }),
136
- value: mood_name
137
- }), /*#__PURE__*/_jsx(Error, {
138
- error: error?.mood_name
139
- }), loading ? /*#__PURE__*/_jsx(Box, {
140
- sx: {
141
- position: "absolute",
142
- top: 0,
143
- left: 0,
144
- right: 0,
145
- bottom: 0,
146
- zIndex: 99999,
147
- display: "flex",
148
- justifyContent: "center",
149
- alignItems: "center"
150
- },
151
- children: /*#__PURE__*/_jsx(CircularProgress, {})
152
- }) : null, /*#__PURE__*/_jsxs(Grid, {
153
- container: true,
154
- justifyContent: "flex-end",
155
- sx: {
156
- mt: 3
157
- },
158
- children: [/*#__PURE__*/_jsx(Button, {
159
- variant: "outlined",
160
- className: "seondaryOutlineBtn",
161
- color: "secondary",
162
- onClick: onClose,
163
- children: "Cancel"
164
- }), /*#__PURE__*/_jsx(Button, {
165
- variant: "contained",
166
- color: "primary",
167
- className: "blueBtn",
168
- sx: {
169
- ml: 1
170
- },
171
- onClick: async () => {
172
- const err = validate();
173
- setError(err);
174
- if (Object.keys(err)?.length) {
175
- return;
176
- }
177
- await onSave({
178
- ...form
179
- }, addNewTheme);
180
- onClose();
181
- },
182
- children: saveBtnLabel
183
- })]
184
- })]
185
- })
186
- })]
187
- });
188
- };
189
- export default styled(SaveTheme)(Style);
190
- function Error({
191
- error = ""
192
- }) {
193
- if (error) {
194
- return /*#__PURE__*/_jsx(Typography, {
195
- variant: "body1",
196
- sx: {
197
- color: "red",
198
- mt: 1
199
- },
200
- children: error
201
- });
202
- } else {
203
- return /*#__PURE__*/_jsx(_Fragment, {});
204
- }
205
- }
@@ -1,259 +0,0 @@
1
- const style = () => ({
2
- ".fs-12": {
3
- fontSize: "12px"
4
- },
5
- ".fs-14": {
6
- fontSize: "14px"
7
- },
8
- ".fw-500": {
9
- fontWeight: "500"
10
- },
11
- ".fw-600": {
12
- fontWeight: "600"
13
- },
14
- ".pointer": {
15
- cursor: "pointer"
16
- },
17
- ".transformNone": {
18
- textTransform: "none"
19
- },
20
- ".settingsContainer": {
21
- width: "340px",
22
- padding: "16px 16px",
23
- background: "#fff",
24
- ".header": {
25
- borderBottom: `1px solid #DCE4EC`,
26
- paddingBottom: "8px"
27
- // marginBottom: "16px",
28
- }
29
- },
30
-
31
- ".title": {
32
- fontWeight: "700",
33
- fontSize: "14px"
34
- },
35
- ".closeBtn": {
36
- width: "26px",
37
- height: "26px",
38
- BorderRadius: "4px",
39
- flexShrik: "0",
40
- padding: "4px",
41
- background: " #F8FAFC",
42
- borderRadius: "4px"
43
- },
44
- ".MuiTabs-scroller": {
45
- borderBottom: `1px solid #DCE4EC`
46
- },
47
- ".themeCardWrapper": {
48
- borderRadius: "4px",
49
- ".active": {
50
- background: "#ECF2FF"
51
- }
52
- },
53
- ".primaryCard, .secondaryCard": {
54
- width: "44px",
55
- height: "44px",
56
- borderRadius: "5px",
57
- border: `1px solid #929292`
58
- },
59
- ".flexAlign": {
60
- display: "flex",
61
- alignItems: "center"
62
- },
63
- ".activeColorBox, .xsColorBox": {
64
- width: "24px",
65
- height: "24px",
66
- borderRadius: "5px",
67
- border: `1px solid #929292`
68
- },
69
- ".themeCard": {
70
- borderRadius: "7px",
71
- padding: "16px",
72
- border: "1px solid #F3F3F3",
73
- boxShadow: "1px 2px 5px 0px #00000014",
74
- position: "relative",
75
- flexWrap: "nowrap",
76
- ".tickIcon": {
77
- visibility: "hidden",
78
- opacity: "0",
79
- position: "absolute",
80
- right: "-8px",
81
- top: "-8px"
82
- },
83
- "&.selected": {
84
- ".tickIcon": {
85
- visibility: "visible",
86
- opacity: "1"
87
- }
88
- }
89
- },
90
- ".otherColors": {
91
- display: "flex",
92
- flexWrap: "wrap",
93
- width: "48px",
94
- ".smallCard": {
95
- width: "20px",
96
- height: "20px",
97
- borderRadius: "5px",
98
- border: `1px solid #929292`
99
- }
100
- },
101
- ".imageUpload": {
102
- background: "#F3F3F3",
103
- borderRadius: "12px",
104
- padding: "10px",
105
- height: "208px",
106
- position: "relative",
107
- "& .resetIcon": {
108
- position: "absolute",
109
- right: "10px",
110
- top: "10px"
111
- },
112
- ".changeImgText": {
113
- position: "absolute",
114
- left: "50%",
115
- top: "50%",
116
- transform: "translate(-50%, -50%)",
117
- zIndex: 1,
118
- background: "#0000004D",
119
- color: "#fff",
120
- padding: "6px",
121
- borderRadius: "6px",
122
- fontSize: "12px",
123
- fontWeight: 600,
124
- opacity: "0",
125
- visibility: "hidden"
126
- },
127
- "&:hover": {
128
- ".changeImgText": {
129
- opacity: "1",
130
- visibility: "visible"
131
- }
132
- }
133
- },
134
- ".imgUploadInner": {
135
- background: "#fff",
136
- borderRadius: "10px",
137
- border: "0.79px dashed #8360FD",
138
- height: "100%"
139
- },
140
- ".outlineBtn": {
141
- color: "#2563EB",
142
- borderRadius: "8px",
143
- boxShadow: "0px 4px 10px 0px #00000026",
144
- border: "1px solid #2563EB",
145
- background: "#EBF1F9",
146
- height: "34px",
147
- textTransform: "unset",
148
- fontWeight: "bold",
149
- "&:hover": {
150
- background: "#EBF1F9"
151
- }
152
- },
153
- ".seondaryOutlineBtn": {
154
- border: "1px solid #D8DDE1",
155
- borderRadius: "8px",
156
- // boxShadow: "0px 4px 10px 0px #00000026",
157
- height: "34px",
158
- textTransform: "unset",
159
- background: "#f5f6f9 !important",
160
- color: "#64748B !important",
161
- "&:hover": {
162
- border: "1px solid #D8DDE1",
163
- background: "#f5f6f9 !important"
164
- }
165
- },
166
- ".blueBtn": {
167
- boxShadow: "0px 4px 10px 0px #00000026",
168
- background: "#2563EB",
169
- borderRadius: "8px",
170
- textTransform: "unset",
171
- height: "34px",
172
- color: "#fff",
173
- fontWeight: "bold",
174
- "&.disabled": {
175
- background: "#D9D9DD !important",
176
- color: "#fff !important"
177
- }
178
- },
179
- ".generatedItem": {
180
- border: "1px solid #E4E6E9",
181
- borderRadius: "7px",
182
- padding: "14px",
183
- display: "flex",
184
- gap: "16px",
185
- position: "relative",
186
- justifyContent: "space-between",
187
- marginBottom: "12px",
188
- ".tickIcon": {
189
- visibility: "hidden",
190
- opacity: "0",
191
- position: "absolute",
192
- right: "-8px",
193
- top: "-8px"
194
- },
195
- "&.selected": {
196
- border: "1px solid #2563EB",
197
- boxShadow: " 3px 3px 8px 0px #2563EB40",
198
- ".tickIcon": {
199
- visibility: "visible",
200
- opacity: "1"
201
- }
202
- },
203
- ".colorBox": {
204
- border: "1px solid #929292",
205
- height: "28px",
206
- width: "28px",
207
- borderRadius: "5px"
208
- }
209
- },
210
- ".textArea": {
211
- background: "#F3F3F3",
212
- borderRadius: "12px",
213
- padding: "10px",
214
- height: "208px",
215
- "& textarea": {
216
- width: "100%",
217
- height: "100% !important",
218
- border: "0.79px solid #8360FD",
219
- background: "#FFFFFF",
220
- borderRadius: "8px",
221
- padding: "10px"
222
- }
223
- },
224
- ".imageUrl": {
225
- height: "auto !important",
226
- ".MuiOutlinedInput-root": {
227
- border: "0.79px solid #8360FD",
228
- background: "#FFFFFF",
229
- borderRadius: "8px",
230
- ".tickIcon": {
231
- width: "18px"
232
- }
233
- },
234
- "&.invalidUrl": {
235
- ".MuiInputAdornment-root": {
236
- ".tickIcon": {
237
- ".fillPath": {
238
- fill: "#D9D9DD!important"
239
- }
240
- }
241
- }
242
- }
243
- },
244
- ".saveThemeContainer": {
245
- ".MuiOutlinedInput-root": {
246
- borderRadius: "8px",
247
- boxShadow: "0px 4px 16px 0px #0000000D"
248
- }
249
- },
250
- ".uploadedImage": {
251
- width: "126px",
252
- height: "126px",
253
- borderRadius: "126px"
254
- },
255
- ".MuiDialog-paper": {
256
- borderRadius: "10px"
257
- }
258
- });
259
- export default style;