@flozy/editor 1.3.7 → 1.4.1

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 (58) hide show
  1. package/dist/Editor/CommonEditor.js +11 -7
  2. package/dist/Editor/Editor.css +29 -17
  3. package/dist/Editor/Elements/AppHeader/AppHeader.js +48 -13
  4. package/dist/Editor/Elements/Button/ButtonPopup.js +5 -3
  5. package/dist/Editor/Elements/Button/EditorButton.js +69 -13
  6. package/dist/Editor/Elements/ChipText/ChipText.js +7 -2
  7. package/dist/Editor/Elements/Embed/Image.js +5 -21
  8. package/dist/Editor/Elements/Embed/Video.js +2 -2
  9. package/dist/Editor/Elements/Form/Form.js +38 -17
  10. package/dist/Editor/Elements/Grid/Grid.js +7 -9
  11. package/dist/Editor/Elements/Grid/GridItem.js +14 -17
  12. package/dist/Editor/Elements/Grid/GridItemPopup.js +4 -2
  13. package/dist/Editor/Elements/Grid/GridPopup.js +3 -1
  14. package/dist/Editor/Elements/Grid/templates/default_grid.js +144 -0
  15. package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +5 -1
  16. package/dist/Editor/Toolbar/FormatTools/Autocomplete.js +33 -0
  17. package/dist/Editor/Toolbar/FormatTools/Text.js +29 -0
  18. package/dist/Editor/Toolbar/FormatTools/index.js +3 -1
  19. package/dist/Editor/Toolbar/Toolbar.js +16 -9
  20. package/dist/Editor/assets/fonts/poppins/OFL.txt +93 -0
  21. package/dist/Editor/assets/fonts/poppins/Poppins-Black.ttf +0 -0
  22. package/dist/Editor/assets/fonts/poppins/Poppins-BlackItalic.ttf +0 -0
  23. package/dist/Editor/assets/fonts/poppins/Poppins-Bold.ttf +0 -0
  24. package/dist/Editor/assets/fonts/poppins/Poppins-BoldItalic.ttf +0 -0
  25. package/dist/Editor/assets/fonts/poppins/Poppins-ExtraBold.ttf +0 -0
  26. package/dist/Editor/assets/fonts/poppins/Poppins-ExtraBoldItalic.ttf +0 -0
  27. package/dist/Editor/assets/fonts/poppins/Poppins-ExtraLight.ttf +0 -0
  28. package/dist/Editor/assets/fonts/poppins/Poppins-ExtraLightItalic.ttf +0 -0
  29. package/dist/Editor/assets/fonts/poppins/Poppins-Italic.ttf +0 -0
  30. package/dist/Editor/assets/fonts/poppins/Poppins-Light.ttf +0 -0
  31. package/dist/Editor/assets/fonts/poppins/Poppins-LightItalic.ttf +0 -0
  32. package/dist/Editor/assets/fonts/poppins/Poppins-Medium.ttf +0 -0
  33. package/dist/Editor/assets/fonts/poppins/Poppins-MediumItalic.ttf +0 -0
  34. package/dist/Editor/assets/fonts/poppins/Poppins-Regular.ttf +0 -0
  35. package/dist/Editor/assets/fonts/poppins/Poppins-SemiBold.ttf +0 -0
  36. package/dist/Editor/assets/fonts/poppins/Poppins-SemiBoldItalic.ttf +0 -0
  37. package/dist/Editor/assets/fonts/poppins/Poppins-Thin.ttf +0 -0
  38. package/dist/Editor/assets/fonts/poppins/Poppins-ThinItalic.ttf +0 -0
  39. package/dist/Editor/common/StyleBuilder/appHeaderStyle.js +43 -5
  40. package/dist/Editor/common/StyleBuilder/buttonStyle.js +52 -1
  41. package/dist/Editor/common/StyleBuilder/embedImageStyle.js +12 -12
  42. package/dist/Editor/common/StyleBuilder/fieldTypes/alignment.js +1 -1
  43. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +2 -1
  44. package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +107 -0
  45. package/dist/Editor/common/StyleBuilder/fieldTypes/index.js +3 -1
  46. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +15 -9
  47. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +17 -12
  48. package/dist/Editor/common/StyleBuilder/formButtonStyle.js +93 -0
  49. package/dist/Editor/common/StyleBuilder/gridStyle.js +9 -0
  50. package/dist/Editor/common/StyleBuilder/index.js +2 -2
  51. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +2 -2
  52. package/dist/Editor/font.css +9 -0
  53. package/dist/Editor/service/formSubmit.js +2 -2
  54. package/dist/Editor/utils/SlateUtilityFunctions.js +2 -2
  55. package/dist/Editor/utils/customHooks/useFormat.js +11 -4
  56. package/dist/Editor/utils/font.js +3 -1
  57. package/dist/Editor/utils/grid.js +2 -8
  58. package/package.json +1 -1
@@ -3,7 +3,6 @@ import { Transforms } from "slate";
3
3
  import { useSelected, useSlateStatic, ReactEditor } from "slate-react";
4
4
  import GridItemPopup from "./GridItemPopup";
5
5
  import { IconButton, Tooltip } from "@mui/material";
6
- import DeleteIcon from "@mui/icons-material/Delete";
7
6
  import SettingsIcon from "@mui/icons-material/Settings";
8
7
  import { jsx as _jsx } from "react/jsx-runtime";
9
8
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -32,35 +31,29 @@ const GridItem = props => {
32
31
  } = bannerSpacing || {};
33
32
  const {
34
33
  vertical,
35
- horizantal
34
+ horizantal,
35
+ flexDirection
36
36
  } = alignment || {};
37
37
  const editor = useSlateStatic();
38
38
  const selected = useSelected();
39
39
  const itemWidth = (grid || 6) / 12 * 100;
40
40
  const path = ReactEditor.findPath(editor, element);
41
41
  const GridItemToolbar = () => {
42
- return selected ? /*#__PURE__*/_jsxs("div", {
42
+ return selected ? /*#__PURE__*/_jsx("div", {
43
43
  contentEditable: false,
44
44
  className: "grid-item-toolbar",
45
45
  style: {
46
46
  top: "0px"
47
47
  },
48
- children: [/*#__PURE__*/_jsx(Tooltip, {
49
- title: "Grid Settings",
48
+ children: /*#__PURE__*/_jsx(Tooltip, {
49
+ title: "Grid Item Settings",
50
50
  arrow: true,
51
51
  children: /*#__PURE__*/_jsx(IconButton, {
52
52
  size: "small",
53
53
  onClick: onSettings,
54
54
  children: /*#__PURE__*/_jsx(SettingsIcon, {})
55
55
  })
56
- }), /*#__PURE__*/_jsx(Tooltip, {
57
- title: "Delete Grid",
58
- arrow: true,
59
- children: /*#__PURE__*/_jsx(IconButton, {
60
- onClick: onDelete,
61
- children: /*#__PURE__*/_jsx(DeleteIcon, {})
62
- })
63
- })]
56
+ })
64
57
  }) : null;
65
58
  };
66
59
  const onSettings = () => {
@@ -70,6 +63,7 @@ const GridItem = props => {
70
63
  const updateData = {
71
64
  ...data
72
65
  };
66
+ console.log(updateData);
73
67
  delete updateData.children;
74
68
  Transforms.setNodes(editor, {
75
69
  ...updateData
@@ -93,7 +87,7 @@ const GridItem = props => {
93
87
  ...attributes,
94
88
  style: {
95
89
  display: "flex",
96
- flexDirection: "column",
90
+ flexDirection: flexDirection || "column",
97
91
  backgroundColor: bgColor,
98
92
  alignItems: horizantal,
99
93
  justifyContent: vertical,
@@ -105,20 +99,23 @@ const GridItem = props => {
105
99
  contentEditable: false,
106
100
  children: /*#__PURE__*/_jsx(GridItemToolbar, {})
107
101
  }), /*#__PURE__*/_jsx("div", {
102
+ className: "gi-inner-cw",
108
103
  style: {
109
104
  display: "flex",
110
- flexDirection: "column",
105
+ flexDirection: flexDirection || "column",
111
106
  width: "100%",
112
107
  paddingLeft: `${left}px`,
113
108
  paddingRight: `${right}px`,
114
109
  paddingTop: `${top}px`,
115
- paddingBottom: `${bottom}px`
110
+ paddingBottom: `${bottom}px`,
111
+ justifyContent: vertical
116
112
  },
117
113
  children: children
118
114
  }), openSetttings ? /*#__PURE__*/_jsx(GridItemPopup, {
119
115
  element: element,
120
116
  onSave: onSave,
121
- onClose: onClose
117
+ onClose: onClose,
118
+ onDelete: onDelete
122
119
  }) : null]
123
120
  });
124
121
  };
@@ -6,7 +6,8 @@ const GridItemPopup = props => {
6
6
  const {
7
7
  element,
8
8
  onSave,
9
- onClose
9
+ onClose,
10
+ onDelete
10
11
  } = props;
11
12
  return /*#__PURE__*/_jsx(StyleBuilder, {
12
13
  title: "Grid Item",
@@ -14,7 +15,8 @@ const GridItemPopup = props => {
14
15
  element: element,
15
16
  onSave: onSave,
16
17
  onClose: onClose,
17
- renderTabs: gridItemStyle
18
+ renderTabs: gridItemStyle,
19
+ onDelete: onDelete
18
20
  });
19
21
  };
20
22
  export default GridItemPopup;
@@ -7,6 +7,7 @@ const GridPopup = props => {
7
7
  element,
8
8
  onSave,
9
9
  onClose,
10
+ onDelete,
10
11
  customProps
11
12
  } = props;
12
13
  return /*#__PURE__*/_jsx(StyleBuilder, {
@@ -16,7 +17,8 @@ const GridPopup = props => {
16
17
  onSave: onSave,
17
18
  onClose: onClose,
18
19
  renderTabs: gridStyle,
19
- customProps: customProps
20
+ customProps: customProps,
21
+ onDelete: onDelete
20
22
  });
21
23
  };
22
24
  export default GridPopup;
@@ -0,0 +1,144 @@
1
+ const default_grid = {
2
+ type: "grid",
3
+ grid: "container",
4
+ children: [{
5
+ type: "grid-item",
6
+ grid: 12,
7
+ children: [{
8
+ type: "alignCenter",
9
+ children: [{
10
+ type: "paragraph",
11
+ children: [{
12
+ text: "Ship Sites with Style.",
13
+ fontSize: "huge",
14
+ fontFamily: "PoppinsBold"
15
+ }]
16
+ }]
17
+ }],
18
+ bgColor: "rgba(255, 255, 255, 0)",
19
+ lockSpacing: true,
20
+ bannerSpacing: {
21
+ top: "16",
22
+ left: "16",
23
+ right: "16",
24
+ bottom: "16"
25
+ },
26
+ alignment: {
27
+ horizantal: "center"
28
+ }
29
+ }, {
30
+ type: "grid-item",
31
+ grid: 12,
32
+ children: [{
33
+ type: "alignCenter",
34
+ children: [{
35
+ type: "paragraph",
36
+ children: [{
37
+ text: "Lorem Ipsum je fiktívny text, používaný pri návrhu tlačovín a typografie. Lorem Ipsum je štandardným výplňovým textom už od 16. storočia, keď neznámy tlačiar zobral sadzobnicu plnú tlačových znakov a pomiešal ich, aby tak vytvoril vzorkovú knihu. Prežil nielen päť storočí, ale aj skok do elektronickej sadzby, a pritom zostal v podstate nezmenený. Spopularizovaný bol v 60-tych rokoch 20.storočia, vydaním hárkov Letraset, ktoré obsahovali pasáže Lorem Ipsum, a neskôr aj softvérom ako Aldus PageMaker, ktorý obsahoval verzie Lorem Ipsum."
38
+ }]
39
+ }]
40
+ }],
41
+ bgColor: "rgba(255, 255, 255, 0)",
42
+ lockSpacing: true,
43
+ bannerSpacing: {
44
+ top: "16",
45
+ left: "16",
46
+ right: "16",
47
+ bottom: "16"
48
+ }
49
+ }, {
50
+ type: "grid-item",
51
+ grid: 12,
52
+ children: [{
53
+ type: "paragraph",
54
+ children: [{
55
+ text: ""
56
+ }]
57
+ }, {
58
+ type: "paragraph",
59
+ children: [{
60
+ text: ""
61
+ }]
62
+ }, {
63
+ type: "button",
64
+ children: [{
65
+ text: " "
66
+ }],
67
+ buttonLink: {
68
+ linkType: "webAddress"
69
+ },
70
+ label: "Gettings Started",
71
+ bgColor: "rgba(192,192,192, 1)",
72
+ textColor: "rgba(0,0,0,1)",
73
+ lockSpacing: true,
74
+ bannerSpacing: {
75
+ top: "16",
76
+ left: "16",
77
+ right: "16",
78
+ bottom: "16"
79
+ },
80
+ lockRadius: true,
81
+ borderRadius: {
82
+ topLeft: "12",
83
+ topRight: "12",
84
+ bottomLeft: "12",
85
+ bottomRight: "12"
86
+ },
87
+ bgColorHover: "rgba(0, 0, 0, 1)",
88
+ textColorHover: "rgba(255, 255, 255, 1)",
89
+ borderColor: "rgba(175, 51, 242, 0)"
90
+ }, {
91
+ type: "button",
92
+ children: [{
93
+ text: ""
94
+ }],
95
+ buttonLink: {
96
+ linkType: "webAddress"
97
+ },
98
+ label: "Learn More",
99
+ bgColor: "rgba(192,192,192, 1)",
100
+ textColor: "rgba(0,0,0,1)",
101
+ lockSpacing: false,
102
+ bannerSpacing: {
103
+ top: "16",
104
+ left: "32",
105
+ right: "32",
106
+ bottom: "16"
107
+ },
108
+ lockRadius: true,
109
+ borderRadius: {
110
+ topLeft: "12",
111
+ topRight: "12",
112
+ bottomLeft: "12",
113
+ bottomRight: "12"
114
+ },
115
+ borderColor: "rgba(175, 51, 242, 0)",
116
+ bgColorHover: "rgba(0,0,0,1)",
117
+ textColorHover: "rgba(255,255,255, 1)"
118
+ }],
119
+ bgColor: "rgba(255, 255, 255, 0)",
120
+ alignment: {
121
+ flexDirection: "row",
122
+ vertical: "center",
123
+ horizantal: "center"
124
+ },
125
+ lockSpacing: true,
126
+ bannerSpacing: {
127
+ top: "16",
128
+ left: "16",
129
+ right: "16",
130
+ bottom: "16"
131
+ }
132
+ }],
133
+ alignment: {
134
+ flexDirection: "column"
135
+ },
136
+ lockSpacing: true,
137
+ bannerSpacing: {
138
+ top: "16",
139
+ left: "16",
140
+ right: "16",
141
+ bottom: "16"
142
+ }
143
+ };
144
+ export default JSON.stringify(default_grid);
@@ -54,6 +54,7 @@ const PageSettingsButton = props => {
54
54
  ...data
55
55
  };
56
56
  delete updateData.children;
57
+ console.log(openSetttings);
57
58
  if (openSetttings?.path) {
58
59
  Transforms.setNodes(editor, {
59
60
  pageProps: {
@@ -63,6 +64,7 @@ const PageSettingsButton = props => {
63
64
  at: openSetttings?.path
64
65
  });
65
66
  } else {
67
+ console.log(editor.children.length);
66
68
  Transforms.insertNodes(editor, [{
67
69
  type: "page-settings",
68
70
  pageProps: {
@@ -71,7 +73,9 @@ const PageSettingsButton = props => {
71
73
  children: [{
72
74
  text: ""
73
75
  }]
74
- }]);
76
+ }], {
77
+ at: [editor.children.length]
78
+ });
75
79
  }
76
80
  onClose();
77
81
  };
@@ -0,0 +1,33 @@
1
+ import React from "react";
2
+ import { Autocomplete, TextField } from "@mui/material";
3
+ import { activeMark } from "../../utils/SlateUtilityFunctions.js";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ const SelectFreeSolo = ({
6
+ editor,
7
+ format,
8
+ options
9
+ }) => {
10
+ const value = activeMark(editor, format);
11
+ console.log(options);
12
+ const changeMarkData = (event, format) => {
13
+ event.preventDefault();
14
+ console.log(event.target.value, format);
15
+ // const value = event.target.value;
16
+ // addMarkData(editor, { format, value });
17
+ };
18
+
19
+ return /*#__PURE__*/_jsx(Autocomplete, {
20
+ size: "small",
21
+ style: {},
22
+ value: value?.value,
23
+ className: "editor-dd",
24
+ onChange: e => changeMarkData(e, format),
25
+ getOptionLabel: option => option.text,
26
+ options: options,
27
+ freeSolo: true,
28
+ renderInput: params => /*#__PURE__*/_jsx(TextField, {
29
+ ...params
30
+ })
31
+ });
32
+ };
33
+ export default SelectFreeSolo;
@@ -0,0 +1,29 @@
1
+ import React from "react";
2
+ import { TextField } from "@mui/material";
3
+ import { addMarkData, activeMark } from "../../utils/SlateUtilityFunctions.js";
4
+ import { sizeMap } from "../../utils/font.js";
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ const Text = ({
7
+ editor,
8
+ format,
9
+ options,
10
+ style = {}
11
+ }) => {
12
+ const value = activeMark(editor, format);
13
+ const changeMarkData = (event, format) => {
14
+ event.preventDefault();
15
+ const value = event.target.value;
16
+ addMarkData(editor, {
17
+ format,
18
+ value
19
+ });
20
+ };
21
+ return /*#__PURE__*/_jsx(TextField, {
22
+ size: "small",
23
+ style: style,
24
+ value: sizeMap[value],
25
+ className: "editor-text",
26
+ onChange: e => changeMarkData(e, format)
27
+ });
28
+ };
29
+ export default Text;
@@ -1,4 +1,6 @@
1
1
  import BlockButton from "./BlockButton";
2
2
  import Dropdown from "./Dropdown";
3
3
  import MarkButton from "./MarkButton";
4
- export { BlockButton, Dropdown, MarkButton };
4
+ import Autocomplete from "./Autocomplete";
5
+ import Text from "./Text";
6
+ export { BlockButton, Dropdown, MarkButton, Autocomplete, Text };
@@ -20,8 +20,10 @@ import ButtonToolIcon from "../Elements/Button/ButtonToolIcon";
20
20
  import PageSettingsButton from "../Elements/PageSettings/PageSettingsButton";
21
21
  import CarouselButton from "../Elements/Carousel/CarouselButton";
22
22
  import AppHeaderButton from "../Elements/AppHeader/AppHeaderButton";
23
- import "./styles.css";
24
23
  import FormButton from "../Elements/Form/FormButton.js";
24
+ import Text from "./FormatTools/Text";
25
+ import ChipTextButton from "../Elements/ChipText/ChipTextButton";
26
+ import "./styles.css";
25
27
  import { jsx as _jsx } from "react/jsx-runtime";
26
28
  import { jsxs as _jsxs } from "react/jsx-runtime";
27
29
  const Toolbar = props => {
@@ -65,6 +67,14 @@ const Toolbar = props => {
65
67
  ...element,
66
68
  editor: editor
67
69
  }, element.id);
70
+ case "text":
71
+ return /*#__PURE__*/_jsx(Text, {
72
+ ...element,
73
+ editor: editor,
74
+ style: {
75
+ width: "80px"
76
+ }
77
+ }, element.id);
68
78
  case "link":
69
79
  return /*#__PURE__*/_jsx(LinkButton, {
70
80
  active: isBlockActive(editor, "link"),
@@ -128,14 +138,11 @@ const Toolbar = props => {
128
138
  return /*#__PURE__*/_jsx(CarouselButton, {
129
139
  editor: editor
130
140
  }, element.id);
131
- // case "chip-text":
132
- // return (
133
- // <ChipTextButton
134
- // key={element.id}
135
- // editor={editor}
136
- // customProps={customProps}
137
- // />
138
- // );
141
+ case "chip-text":
142
+ return /*#__PURE__*/_jsx(ChipTextButton, {
143
+ editor: editor,
144
+ customProps: customProps
145
+ }, element.id);
139
146
  // case "drawer":
140
147
  // return (
141
148
  // <DrawerMenuButton
@@ -0,0 +1,93 @@
1
+ Copyright 2020 The Poppins Project Authors (https://github.com/itfoundry/Poppins)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -1,7 +1,14 @@
1
+ import { fontOptions } from "../../utils/font";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
1
3
  const appHeaderStyle = [{
2
4
  tab: "Logo",
3
5
  value: "appLogo",
4
6
  fields: [{
7
+ label: "App Title",
8
+ key: "appTitle",
9
+ type: "text",
10
+ placeholder: "Leave Empty, If only Logo"
11
+ }, {
5
12
  label: "App Logo URL",
6
13
  key: "appLogo",
7
14
  type: "text"
@@ -11,12 +18,26 @@ const appHeaderStyle = [{
11
18
  type: "backgroundImage"
12
19
  }]
13
20
  }, {
14
- tab: "Title",
15
- value: "appTitle",
21
+ tab: "General",
22
+ value: "general",
16
23
  fields: [{
17
- label: "App Title",
18
- key: "appTitle",
19
- type: "text"
24
+ label: "Menu Font Size",
25
+ key: "fontSize",
26
+ type: "text",
27
+ placeholder: "16px"
28
+ }, {
29
+ label: "Menu Font Family",
30
+ key: "fontFamily",
31
+ type: "textOptions",
32
+ options: fontOptions,
33
+ renderOption: option => {
34
+ return /*#__PURE__*/_jsx("span", {
35
+ style: {
36
+ fontFamily: option.value
37
+ },
38
+ children: option.text
39
+ });
40
+ }
20
41
  }]
21
42
  }, {
22
43
  tab: "Menus",
@@ -59,5 +80,22 @@ const appHeaderStyle = [{
59
80
  key: "borderColor",
60
81
  type: "color"
61
82
  }]
83
+ }, {
84
+ tab: "Hover Colors",
85
+ value: "hoverColors",
86
+ fields: [{
87
+ label: "Text",
88
+ key: "textColorHover",
89
+ type: "color",
90
+ needPreview: true
91
+ }, {
92
+ label: "Background",
93
+ key: "bgColorHover",
94
+ type: "color"
95
+ }, {
96
+ label: "Border",
97
+ key: "borderColorHover",
98
+ type: "color"
99
+ }]
62
100
  }];
63
101
  export default appHeaderStyle;