slicejs-cli 1.0.45 → 1.0.47

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 (76) hide show
  1. package/PROJECT_TEMPLATES/Basic/Slice/Components/Service/FetchManager/FetchManager.js +109 -37
  2. package/PROJECT_TEMPLATES/Basic/Slice/Components/Service/Translator/Translator.js +15 -15
  3. package/PROJECT_TEMPLATES/Basic/Slice/Components/Service/Translator/messages.json +50 -0
  4. package/PROJECT_TEMPLATES/Basic/Slice/Components/Structural/Controller/Controller.js +81 -83
  5. package/PROJECT_TEMPLATES/Basic/Slice/Components/Structural/Debugger/Debugger.css +47 -10
  6. package/PROJECT_TEMPLATES/Basic/Slice/Components/Structural/Debugger/Debugger.html +7 -3
  7. package/PROJECT_TEMPLATES/Basic/Slice/Components/Structural/Debugger/Debugger.js +114 -41
  8. package/PROJECT_TEMPLATES/Basic/Slice/Components/Structural/Logger/Logger.js +11 -11
  9. package/PROJECT_TEMPLATES/Basic/Slice/Components/Structural/StylesManager/StylesManager.js +32 -28
  10. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Button/Button.css +44 -0
  11. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Button/Button.html +5 -0
  12. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Button/Button.js +39 -0
  13. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Card/Card.css +63 -0
  14. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Card/Card.html +7 -0
  15. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Card/Card.js +110 -0
  16. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Checkbox/Checkbox.css +87 -0
  17. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Checkbox/Checkbox.html +8 -0
  18. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Checkbox/Checkbox.js +87 -0
  19. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/CodeValidator/CodeValidator.css +97 -0
  20. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/CodeValidator/CodeValidator.html +18 -0
  21. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/CodeValidator/CodeValidator.js +86 -0
  22. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Icon/Icon.css +505 -0
  23. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Icon/Icon.html +1 -0
  24. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Icon/Icon.js +95 -0
  25. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Icon/slc.eot +0 -0
  26. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Icon/slc.json +550 -0
  27. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Icon/slc.styl +502 -0
  28. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Icon/slc.svg +1470 -0
  29. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Icon/slc.symbol.svg +1035 -0
  30. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Icon/slc.ttf +0 -0
  31. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Icon/slc.woff +0 -0
  32. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Icon/slc.woff2 +0 -0
  33. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Input/Input.css +87 -0
  34. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Input/Input.html +4 -0
  35. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Input/Input.js +210 -0
  36. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Loading/Loading.css +56 -0
  37. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Loading/Loading.html +83 -0
  38. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Loading/Loading.js +39 -0
  39. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Navbar/Navbar.css +30 -0
  40. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Navbar/Navbar.html +6 -0
  41. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Navbar/Navbar.js +39 -0
  42. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Select/Select.css +91 -0
  43. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Select/Select.html +8 -0
  44. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Select/Select.js +210 -0
  45. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Switch/Switch.css +76 -0
  46. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Switch/Switch.html +8 -0
  47. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Switch/Switch.js +109 -0
  48. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Tester/Tester.css +34 -0
  49. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Tester/Tester.html +7 -0
  50. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Tester/Tester.js +33 -0
  51. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Tester2/Tester2.css +34 -0
  52. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Tester2/Tester2.html +43 -0
  53. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Tester2/Tester2.js +39 -0
  54. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/ToastAlert/ToastAlert.css +110 -0
  55. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/ToastAlert/ToastAlert.html +12 -0
  56. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/ToastAlert/ToastAlert.js +65 -0
  57. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/complexNavbar/complexNavbar.css +163 -0
  58. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/complexNavbar/complexNavbar.html +15 -0
  59. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/complexNavbar/complexNavbar.js +48 -0
  60. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/imageCarousel/img-carousel.css +56 -0
  61. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/imageCarousel/img-carousel.html +6 -0
  62. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/imageCarousel/img-carousel.js +119 -0
  63. package/PROJECT_TEMPLATES/Basic/Slice/Components/components.js +22 -11
  64. package/PROJECT_TEMPLATES/Basic/Slice/Slice.js +169 -147
  65. package/PROJECT_TEMPLATES/Basic/Slice/Styles/sliceStyles.css +10 -0
  66. package/PROJECT_TEMPLATES/Basic/Slice/Themes/Dark.css +33 -9
  67. package/PROJECT_TEMPLATES/Basic/Slice/Themes/Light.css +27 -10
  68. package/PROJECT_TEMPLATES/Basic/Slice/Themes/Slice.css +27 -12
  69. package/PROJECT_TEMPLATES/Basic/Slice/package.json +12 -0
  70. package/PROJECT_TEMPLATES/Basic/Slice/sliceConfig.json +9 -1
  71. package/PROJECT_TEMPLATES/Basic/src/Views/LandingPage/index.html +9 -13
  72. package/PROJECT_TEMPLATES/Basic/src/Views/LandingPage/index.js +381 -9
  73. package/commands/createComponent/createComponent.js +4 -1
  74. package/commands/deleteComponent/deleteComponent.js +7 -1
  75. package/commands/listComponents/listComponents.js +12 -3
  76. package/package.json +1 -1
@@ -1,172 +1,194 @@
1
1
  import Logger from "./Components/Structural/Logger/Logger.js";
2
2
  import Controller from "./Components/Structural/Controller/Controller.js";
3
3
  import StylesManager from "./Components/Structural/StylesManager/StylesManager.js";
4
- import Debugger from "./Components/Structural/Debugger/Debugger.js";
5
4
  import sliceConfig from "./sliceConfig.json" assert { type: "json" };
6
5
 
7
-
8
6
  export default class Slice {
7
+ constructor() {
8
+ this.logger = new Logger();
9
+ this.controller = new Controller();
10
+ this.stylesManager = new StylesManager();
11
+ this.paths = sliceConfig.paths;
12
+ }
13
+
14
+ async getClass(module) {
15
+ try {
16
+ const { default: myClass } = await import(module);
17
+ return await myClass;
18
+ } catch (error) {
19
+ this.logger.logError("Slice", `Error loading class ${module}`, error);
20
+ }
21
+ }
22
+
23
+ async build(componentName, props = {}) {
24
+ if (!componentName) {
25
+ this.logger.logError(
26
+ "Slice",
27
+ null,
28
+ `Component name is required to build a component`
29
+ );
30
+ return null;
31
+ }
9
32
 
10
- constructor() {
11
- this.logger = new Logger();
12
- this.controller = new Controller();
13
- this.stylesManager = new StylesManager();
14
- this.paths = {
15
- components: "../../../../Slice/Components",
16
- themes: "../../../../Slice/Themes"
17
- };
18
-
19
-
20
- this.getClass = async function getClass(module) {
21
- try {
22
- const { default: myClass } = await import(module);
23
- return await myClass;
24
- } catch (error) {
25
- this.logger.logError("Slice", `Error loading class ${module}`, error);
26
- }
27
- }
28
-
33
+ if (!this.controller.componentCategories.has(componentName)) {
34
+ this.logger.logError(
35
+ "Slice",
36
+ null,
37
+ `Component ${componentName} not found in components.js file`
38
+ );
39
+ return null;
29
40
  }
30
41
 
42
+ let compontentCategory =
43
+ this.controller.componentCategories.get(componentName);
31
44
 
32
- async build(componentName, props = {}) {
33
-
34
- if(!componentName) {
35
- this.logger.logError("Slice", null, `Component name is required to build a component`);
36
- return null;
37
- }
38
-
39
- if(!this.controller.componentCategories.has(componentName)) {
40
- this.logger.logError("Slice", null, `Component ${componentName} not found in components.js file`);
41
- return null;
42
- }
43
-
44
- let compontentCategory = this.controller.componentCategories.get(componentName);
45
-
46
- //Pregunta para la posteridad: ¿Deberíamos dejar que el usuario pueda crear componentes de categoría Structural?
47
- //Por ahora no lo permitimos, pero si en el futuro se decide que sí, se debe cambiar el código de abajo para que funcione
48
- //con componentes de categoría Structural
49
-
50
- if(compontentCategory === "Structural") {
51
- this.logger.logError("Slice", null, `Component ${componentName} is a Structural component and cannot be built`);
52
- return null;
53
- }
54
-
55
-
56
- const isVisual = compontentCategory === "Visual";
57
-
58
- let modulePath = `${this.paths.components}/${compontentCategory}/${componentName}/${componentName}.js`;
59
-
60
-
61
- // Load template if not loaded previously and component category is Visual
62
- if (!this.controller.templates.has(componentName) && isVisual ) {
63
- try {
64
- const html = await this.controller.fetchText(componentName, "html");
65
- const template = document.createElement("template");
66
- template.innerHTML = html;
67
- this.controller.templates.set(componentName, template);
68
- this.logger.logInfo("Slice", `Template ${componentName} loaded`)
69
- } catch (error) {
70
- console.log(error)
71
- this.logger.logError("Slice", `Error loading template ${componentName}`, error);
72
- }
73
- }
74
-
75
-
76
- //Load class if not loaded previously
77
- if (!this.controller.classes.has(componentName)) {
78
- try {
79
- const ComponentClass = await this.getClass(modulePath);
80
- this.controller.classes.set(componentName, ComponentClass);
81
- this.logger.logInfo("Slice", `Class ${componentName} loaded`)
82
- } catch (error) {
83
- console.log(error)
84
- this.logger.logError("Slice", `Error loading class ${modulePath}`, error);
85
- }
86
- }
87
-
88
- //Load css if not loaded previously and component category is Visual
89
- if (!this.controller.requestedStyles.has(componentName) && isVisual) {
90
- try {
91
- const css = await this.controller.fetchText(componentName, "css");
92
- this.stylesManager.registerComponentStyles(componentName, css);
93
- this.logger.logInfo("Slice", `CSS ${componentName} loaded`)
94
- } catch (error) {
95
- console.log(error)
96
- this.logger.logError("Slice", `Error loading css ${componentName}`, error);
97
- }
98
- }
99
-
100
-
101
- //Create instance
102
- try {
103
- let componentIds = {};
104
- if(props.id) componentIds.id = props.id;
105
- if(props.sliceId) componentIds.sliceId = props.sliceId;
106
-
107
- delete props.id;
108
- delete props.sliceId;
109
-
110
- const ComponentClass = this.controller.classes.get(componentName);
111
- const componentInstance = new ComponentClass(props);
112
-
113
- if(componentIds.id) componentInstance.id = componentIds.id;
114
- if(componentIds.sliceId) componentInstance.sliceId = componentIds.sliceId;
115
-
116
- this.stylesManager.handleInstanceStyles(componentInstance,props);
117
-
118
- if(!this.controller.registerComponent(componentInstance)) {
119
- this.logger.logError("Slice", `Error registering instance ${componentName} ${componentInstance.sliceId}`);
120
- return null;
121
- }
122
-
123
- if(this.debugger.enabled && compontentCategory === "Visual"){
124
- this.debugger.attachDebugMode(componentInstance);
125
- }
126
-
127
- //if the component has a method called init, call it
128
- if(componentInstance.init ) await componentInstance.init();
129
-
130
- this.logger.logInfo("Slice", `Instance ${componentInstance.sliceId} created`)
131
- return componentInstance;
132
-
133
- } catch (error) {
134
- console.log(error)
135
- this.logger.logError("Slice", `Error creating instance ${componentName}`, error);
136
- }
137
-
138
-
45
+ //Pregunta para la posteridad: ¿Deberíamos dejar que el usuario pueda crear componentes de categoría Structural?
46
+ //Por ahora no lo permitimos, pero si en el futuro se decide que sí, se debe cambiar el código de abajo para que funcione
47
+ //con componentes de categoría Structural
48
+
49
+ if (compontentCategory === "Structural") {
50
+ this.logger.logError(
51
+ "Slice",
52
+ null,
53
+ `Component ${componentName} is a Structural component and cannot be built`
54
+ );
55
+ return null;
139
56
  }
140
57
 
141
- setPaths(paths) {
142
- this.paths = paths;
58
+ const isVisual = compontentCategory === "Visual";
59
+
60
+ let modulePath = `${this.paths.components}/${compontentCategory}/${componentName}/${componentName}.js`;
61
+
62
+ // Load template if not loaded previously and component category is Visual
63
+ if (!this.controller.templates.has(componentName) && isVisual) {
64
+ try {
65
+ const html = await this.controller.fetchText(componentName, "html");
66
+ const template = document.createElement("template");
67
+ template.innerHTML = html;
68
+ this.controller.templates.set(componentName, template);
69
+ this.logger.logInfo("Slice", `Template ${componentName} loaded`);
70
+ } catch (error) {
71
+ console.log(error);
72
+ this.logger.logError(
73
+ "Slice",
74
+ `Error loading template ${componentName}`,
75
+ error
76
+ );
77
+ }
143
78
  }
144
79
 
145
- setTheme(themeName) {
146
- this.stylesManager.setTheme(themeName);
80
+ //Load class if not loaded previously
81
+ if (!this.controller.classes.has(componentName)) {
82
+ try {
83
+ const ComponentClass = await this.getClass(modulePath);
84
+ this.controller.classes.set(componentName, ComponentClass);
85
+ this.logger.logInfo("Slice", `Class ${componentName} loaded`);
86
+ } catch (error) {
87
+ console.log(error);
88
+ this.logger.logError(
89
+ "Slice",
90
+ `Error loading class ${modulePath}`,
91
+ error
92
+ );
93
+ }
147
94
  }
148
95
 
149
- attachTemplate(componentInstance) {
150
- this.controller.loadTemplateToComponent(componentInstance);
96
+ //Load css if not loaded previously and component category is Visual
97
+ if (!this.controller.requestedStyles.has(componentName) && isVisual) {
98
+ try {
99
+ const css = await this.controller.fetchText(componentName, "css");
100
+ this.stylesManager.registerComponentStyles(componentName, css);
101
+ this.logger.logInfo("Slice", `CSS ${componentName} loaded`);
102
+ } catch (error) {
103
+ console.log(error);
104
+ this.logger.logError(
105
+ "Slice",
106
+ `Error loading css ${componentName}`,
107
+ error
108
+ );
109
+ }
151
110
  }
152
111
 
153
-
112
+ //Create instance
113
+ try {
114
+ let componentIds = {};
115
+ if (props.id) componentIds.id = props.id;
116
+ if (props.sliceId) componentIds.sliceId = props.sliceId;
117
+
118
+ delete props.id;
119
+ delete props.sliceId;
120
+
121
+ const ComponentClass = this.controller.classes.get(componentName);
122
+ const componentInstance = new ComponentClass(props);
123
+
124
+ if (componentIds.id) componentInstance.id = componentIds.id;
125
+ if (componentIds.sliceId)
126
+ componentInstance.sliceId = componentIds.sliceId;
127
+
128
+ this.stylesManager.handleInstanceStyles(componentInstance, props);
129
+
130
+ if (!this.controller.registerComponent(componentInstance)) {
131
+ this.logger.logError(
132
+ "Slice",
133
+ `Error registering instance ${componentName} ${componentInstance.sliceId}`
134
+ );
135
+ return null;
136
+ }
137
+
138
+ if (sliceConfig.debugger.enabled && compontentCategory === "Visual") {
139
+ this.debugger.attachDebugMode(componentInstance);
140
+ }
141
+
142
+ //if the component has a method called init, call it
143
+ if (componentInstance.init) await componentInstance.init();
144
+
145
+ this.logger.logInfo(
146
+ "Slice",
147
+ `Instance ${componentInstance.sliceId} created`
148
+ );
149
+ return componentInstance;
150
+ } catch (error) {
151
+ console.log(error);
152
+ this.logger.logError(
153
+ "Slice",
154
+ `Error creating instance ${componentName}`,
155
+ error
156
+ );
157
+ }
158
+ }
154
159
 
155
-
160
+ setTheme(themeName) {
161
+ this.stylesManager.setTheme(themeName);
162
+ }
156
163
 
164
+ attachTemplate(componentInstance) {
165
+ this.controller.loadTemplateToComponent(componentInstance);
166
+ }
157
167
  }
158
168
 
159
169
  async function init() {
160
- window.slice = new Slice();
161
- window.slice.debugger = new Debugger();
162
-
163
- if(window.slice.debugger.enabled){
164
- await window.slice.debugger.enableDebugMode();
165
- document.body.appendChild(window.slice.debugger);
166
- }
167
-
168
- await window.slice.stylesManager.setTheme(sliceConfig.stylesManager.defaultTheme);
169
-
170
+ window.slice = new Slice();
171
+
172
+ if (sliceConfig.debugger.enabled) {
173
+ const DebuggerModule = await window.slice.getClass(
174
+ `${sliceConfig.paths.components}/Structural/Debugger/Debugger.js`
175
+ );
176
+ window.slice.debugger = new DebuggerModule();
177
+ await window.slice.debugger.enableDebugMode();
178
+ document.body.appendChild(window.slice.debugger);
179
+ }
180
+
181
+ if (sliceConfig.translator.enabled) {
182
+ const translator = await window.slice.build("Translator");
183
+ window.slice.translator = translator;
184
+ window.slice.logger.logInfo("Slice", "Translator succesfuly enabled");
185
+ }
186
+
187
+ await window.slice.stylesManager.init();
188
+
189
+ await window.slice.stylesManager.setTheme(
190
+ sliceConfig.stylesManager.defaultTheme
191
+ );
170
192
  }
171
193
 
172
- init();
194
+ await init();
@@ -0,0 +1,10 @@
1
+ @import url("https://fonts.googleapis.com/css2?family=Montserrat&family=Poppins&family=Roboto&display=swap");
2
+
3
+ :root {
4
+ --font-family: "Roboto", sans-serif;
5
+ --border-radius-slice: 5px;
6
+ --slice-border: 1px;
7
+ }
8
+ body {
9
+ background-color: var(--primary-background-color);
10
+ }
@@ -1,14 +1,38 @@
1
- @import url("https://fonts.googleapis.com/css2?family=Montserrat&family=Poppins&family=Roboto&display=swap");
1
+ :root {
2
+ --font-primary-color: #fff;
2
3
 
3
- * {
4
- font-family: "Roboto", sans-serif;
5
- }
4
+ /** primary **/
5
+ --primary-color: #0066ff;
6
+ --primary-color-rgb: rgb(0, 102, 255);
7
+ --primary-background-color: #000;
8
+ --primary-color-contrast: #000;
9
+ --primary-color-shade: #222;
6
10
 
7
- :root {
8
- --primary-color: #cecece;
9
- --primary-color-border: rgb(206, 206, 206, 0.5);
10
- --primary-background-color: #191919;
11
- --secundary-background-color: #292929;
11
+ /** secondary **/
12
+ --secondary-color: #63ccfd;
13
+ --secondary-color-rgb: rgb(99, 204, 253);
14
+ --secondary-background-color: #222;
15
+ --secondary-color-contrast: #fff;
16
+
17
+ /** tertiary **/
18
+ --tertiary-background-color: #444;
12
19
 
20
+ /** success **/
21
+ --success-color: #00ff40;
22
+ --success-contrast: #000;
23
+
24
+ /** warning **/
25
+ --warning-color: #ffff40;
26
+ --warning-contrast: #000;
27
+
28
+ /** danger **/
13
29
  --danger-color: #ff0000;
30
+ --danger-contrast: #000;
31
+
32
+ /** medium **/
33
+ --medium-color: #92949c;
34
+ --medium-contrast: #fff;
35
+
36
+ /* Disabled color */
37
+ --disabled-color: #7f7f7f;
14
38
  }
@@ -1,14 +1,31 @@
1
- @import url("https://fonts.googleapis.com/css2?family=Montserrat&family=Poppins&family=Roboto&display=swap");
2
-
3
- * {
4
- font-family: "Roboto", sans-serif;
5
- }
6
-
7
1
  :root {
8
- --primary-color: #000;
9
- --primary-color-border: rgb(0, 0, 0, 0.5);
2
+ --font-primary-color: #000;
3
+ --font-secondary-color: #474747;
4
+ /** primary **/
5
+ --primary-color: #0066ff;
6
+ --primary-color-rgb: rgb(0, 102, 255);
10
7
  --primary-background-color: #fff;
11
- --secundary-background-color: #dddddd;
12
-
8
+ --primary-color-contrast: #fff;
9
+ --primary-color-shade: #ddd;
10
+ /** secondary **/
11
+ --secondary-color: #63ccfd;
12
+ --secondary-color-rgb: rgb(99, 204, 253);
13
+ --secondary-background-color: #ddd;
14
+ --secondary-color-contrast: #fff;
15
+ /** tertiary **/
16
+ --tertiary-background-color: #c4c4c4;
17
+ /** success **/
18
+ --success-color: #00ff40;
19
+ --success-contrast: #fff;
20
+ /** warning **/
21
+ --warning-color: #ffff40;
22
+ --warning-contrast: #000;
23
+ /** danger **/
13
24
  --danger-color: #ff0000;
25
+ --danger-contrast: #fff;
26
+ /** medium **/
27
+ --medium-color: #92949c;
28
+ --medium--contrast: #000;
29
+
30
+ --disabled-color: #7f7f7f;
14
31
  }
@@ -1,15 +1,30 @@
1
- @import url("https://fonts.googleapis.com/css2?family=Montserrat&family=Poppins&family=Roboto&display=swap");
2
-
3
- * {
4
- font-family: "Roboto", sans-serif;
5
- }
6
-
7
1
  :root {
8
- --primary-color: rgba(67, 83, 52);
9
- --primary-color-border: rgba(67, 83, 52);
10
- --primary-background-color: rgba(158, 179, 132);
11
- --secundary-background-color: rgba(250, 241, 228);
12
- --secondary-color: rgba(250, 241, 228)
2
+ --font-primary-color: #2f1335;
3
+ /** primary **/
4
+ --primary-color: #8e44ad; /* Morado oscuro */
5
+ --primary-color-rgb: rgb(142, 68, 173);
6
+ --primary-background-color: #fff;
7
+ --primary-color-contrast: #fff;
8
+ --primary-color-shade: #ddd;
9
+ /** secondary **/
10
+ --secondary-color: #9b59b6; /* Morado */
11
+ --secondary-color-rgb: rgb(155, 89, 182);
12
+ --secondary-background-color: #ddd;
13
+ --secondary-color-contrast: #fff;
14
+ /** tertiary **/
15
+ --tertiary-background-color: #3498db; /* Azul */
16
+ /** success **/
17
+ --success-color: #27ae60; /* Verde */
18
+ --success-contrast: #fff;
19
+ /** warning **/
20
+ --warning-color: #f39c12; /* Naranja */
21
+ --warning-contrast: #000;
22
+ /** danger **/
23
+ --danger-color: #e74c3c; /* Rojo */
24
+ --danger-contrast: #fff;
25
+ /** medium **/
26
+ --medium-color: #bdc3c7; /* Plata */
27
+ --medium--contrast: #000;
13
28
 
14
- --danger-color: #b31313;
29
+ --disabled-color: #7f7f7f;
15
30
  }
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "slice",
3
+ "version": "1.0.0",
4
+ "description": "Framework with frontend and backend components",
5
+ "main": "Slice.js",
6
+ "type": "module",
7
+ "scripts": {
8
+ "test": "echo \"Error: no test specified\" && exit 1"
9
+ },
10
+ "author": "",
11
+ "license": "ISC"
12
+ }
@@ -4,7 +4,7 @@
4
4
  "click": "right"
5
5
  },
6
6
  "stylesManager": {
7
- "defaultTheme": "Slice"
7
+ "defaultTheme": "Light"
8
8
  },
9
9
  "logger": {
10
10
  "enabled": true,
@@ -20,5 +20,13 @@
20
20
  "info": true
21
21
  }
22
22
  }
23
+ },
24
+ "translator": {
25
+ "enabled": true
26
+ },
27
+ "paths": {
28
+ "components": "./Components",
29
+ "themes": "./Themes",
30
+ "styles": "./Styles"
23
31
  }
24
32
  }
@@ -1,18 +1,14 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en">
3
-
4
- <head>
5
- <meta charset="UTF-8">
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
6
  <title>Document</title>
8
- <link rel="stylesheet" href="style.css">
9
- </head>
7
+ </head>
10
8
 
11
- <body>
12
- <div>Slice web Framework</div>
13
- <button id="boton"></button>
14
- <script src="../../../Slice/Slice.js" type="module"></script>
9
+ <body>
10
+ <script src="/Slice/Slice.js" type="module"></script>
15
11
  <script src="index.js" type="module"></script>
16
- </body>
17
-
18
- </html>
12
+ <div style="width: 300px" id="form"></div>
13
+ </body>
14
+ </html>