slicejs-cli 2.0.6 → 2.0.7
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.
- package/commands/init/init.js +15 -14
- package/package.json +1 -1
- package/ProjectTemplate/api/index.js +0 -97
- package/ProjectTemplate/src/App/index.html +0 -22
- package/ProjectTemplate/src/App/index.js +0 -63
- package/ProjectTemplate/src/App/style.css +0 -40
- package/ProjectTemplate/src/Components/AppComponents/ButtonDocumentation/ButtonDocumentation.css +0 -16
- package/ProjectTemplate/src/Components/AppComponents/ButtonDocumentation/ButtonDocumentation.html +0 -22
- package/ProjectTemplate/src/Components/AppComponents/ButtonDocumentation/ButtonDocumentation.js +0 -102
- package/ProjectTemplate/src/Components/AppComponents/CardDocumentation/CardDocumentation.css +0 -15
- package/ProjectTemplate/src/Components/AppComponents/CardDocumentation/CardDocumentation.html +0 -38
- package/ProjectTemplate/src/Components/AppComponents/CardDocumentation/CardDocumentation.js +0 -113
- package/ProjectTemplate/src/Components/AppComponents/CheckboxDocumentation/CheckboxDocumentation.css +0 -21
- package/ProjectTemplate/src/Components/AppComponents/CheckboxDocumentation/CheckboxDocumentation.html +0 -35
- package/ProjectTemplate/src/Components/AppComponents/CheckboxDocumentation/CheckboxDocumentation.js +0 -103
- package/ProjectTemplate/src/Components/AppComponents/CodeVisualizer/CodeVisualizer.css +0 -14
- package/ProjectTemplate/src/Components/AppComponents/CodeVisualizer/CodeVisualizer.html +0 -3
- package/ProjectTemplate/src/Components/AppComponents/CodeVisualizer/CodeVisualizer.js +0 -45
- package/ProjectTemplate/src/Components/AppComponents/Documentation/Documentation.css +0 -0
- package/ProjectTemplate/src/Components/AppComponents/Documentation/Documentation.html +0 -30
- package/ProjectTemplate/src/Components/AppComponents/Documentation/Documentation.js +0 -75
- package/ProjectTemplate/src/Components/AppComponents/DocumentationPage/DocumentationPage.css +0 -62
- package/ProjectTemplate/src/Components/AppComponents/DocumentationPage/DocumentationPage.html +0 -0
- package/ProjectTemplate/src/Components/AppComponents/DocumentationPage/DocumentationPage.js +0 -241
- package/ProjectTemplate/src/Components/AppComponents/InputDocumentation/InputDocumentation.css +0 -41
- package/ProjectTemplate/src/Components/AppComponents/InputDocumentation/InputDocumentation.html +0 -95
- package/ProjectTemplate/src/Components/AppComponents/InputDocumentation/InputDocumentation.js +0 -315
- package/ProjectTemplate/src/Components/AppComponents/LandingMenu/LandingMenu.css +0 -108
- package/ProjectTemplate/src/Components/AppComponents/LandingMenu/LandingMenu.html +0 -16
- package/ProjectTemplate/src/Components/AppComponents/LandingMenu/LandingMenu.js +0 -33
- package/ProjectTemplate/src/Components/AppComponents/LandingPage/LandingPage.css +0 -14
- package/ProjectTemplate/src/Components/AppComponents/LandingPage/LandingPage.html +0 -0
- package/ProjectTemplate/src/Components/AppComponents/LandingPage/LandingPage.js +0 -53
- package/ProjectTemplate/src/Components/AppComponents/MainMenu/MainMenu.css +0 -80
- package/ProjectTemplate/src/Components/AppComponents/MainMenu/MainMenu.html +0 -39
- package/ProjectTemplate/src/Components/AppComponents/MainMenu/MainMenu.js +0 -42
- package/ProjectTemplate/src/Components/AppComponents/MyLayout/MyLayout.css +0 -0
- package/ProjectTemplate/src/Components/AppComponents/MyLayout/MyLayout.html +0 -0
- package/ProjectTemplate/src/Components/AppComponents/MyLayout/MyLayout.js +0 -13
- package/ProjectTemplate/src/Components/AppComponents/MyNavigation/MyNavigation.css +0 -49
- package/ProjectTemplate/src/Components/AppComponents/MyNavigation/MyNavigation.html +0 -1
- package/ProjectTemplate/src/Components/AppComponents/MyNavigation/MyNavigation.js +0 -60
- package/ProjectTemplate/src/Components/AppComponents/Playground/Playground.css +0 -12
- package/ProjectTemplate/src/Components/AppComponents/Playground/Playground.html +0 -0
- package/ProjectTemplate/src/Components/AppComponents/Playground/Playground.js +0 -126
- package/ProjectTemplate/src/Components/AppComponents/SliceTeamCard/SliceTeamCard.css +0 -104
- package/ProjectTemplate/src/Components/AppComponents/SliceTeamCard/SliceTeamCard.html +0 -12
- package/ProjectTemplate/src/Components/AppComponents/SliceTeamCard/SliceTeamCard.js +0 -74
- package/ProjectTemplate/src/Components/AppComponents/SwitchDocumentation/SwitchDocumentation.css +0 -21
- package/ProjectTemplate/src/Components/AppComponents/SwitchDocumentation/SwitchDocumentation.html +0 -35
- package/ProjectTemplate/src/Components/AppComponents/SwitchDocumentation/SwitchDocumentation.js +0 -103
- package/ProjectTemplate/src/Components/AppComponents/TheSliceTeam/TheSliceTeam.css +0 -23
- package/ProjectTemplate/src/Components/AppComponents/TheSliceTeam/TheSliceTeam.html +0 -6
- package/ProjectTemplate/src/Components/AppComponents/TheSliceTeam/TheSliceTeam.js +0 -129
- package/ProjectTemplate/src/Components/AppComponents/WhatIsSlice/WhatIsSlice.css +0 -0
- package/ProjectTemplate/src/Components/AppComponents/WhatIsSlice/WhatIsSlice.html +0 -7
- package/ProjectTemplate/src/Components/AppComponents/WhatIsSlice/WhatIsSlice.js +0 -15
- package/ProjectTemplate/src/Components/Service/FetchManager/FetchManager.js +0 -133
- package/ProjectTemplate/src/Components/Service/IndexedDbManager/IndexedDbManager.js +0 -141
- package/ProjectTemplate/src/Components/Service/Link/Link.js +0 -26
- package/ProjectTemplate/src/Components/Visual/Button/Button.css +0 -47
- package/ProjectTemplate/src/Components/Visual/Button/Button.html +0 -5
- package/ProjectTemplate/src/Components/Visual/Button/Button.js +0 -70
- package/ProjectTemplate/src/Components/Visual/Card/Card.css +0 -68
- package/ProjectTemplate/src/Components/Visual/Card/Card.html +0 -7
- package/ProjectTemplate/src/Components/Visual/Card/Card.js +0 -107
- package/ProjectTemplate/src/Components/Visual/Checkbox/Checkbox.css +0 -87
- package/ProjectTemplate/src/Components/Visual/Checkbox/Checkbox.html +0 -8
- package/ProjectTemplate/src/Components/Visual/Checkbox/Checkbox.js +0 -86
- package/ProjectTemplate/src/Components/Visual/Details/Details.css +0 -70
- package/ProjectTemplate/src/Components/Visual/Details/Details.html +0 -9
- package/ProjectTemplate/src/Components/Visual/Details/Details.js +0 -76
- package/ProjectTemplate/src/Components/Visual/DropDown/DropDown.css +0 -60
- package/ProjectTemplate/src/Components/Visual/DropDown/DropDown.html +0 -5
- package/ProjectTemplate/src/Components/Visual/DropDown/DropDown.js +0 -63
- package/ProjectTemplate/src/Components/Visual/Grid/Grid.css +0 -7
- package/ProjectTemplate/src/Components/Visual/Grid/Grid.html +0 -1
- package/ProjectTemplate/src/Components/Visual/Grid/Grid.js +0 -57
- package/ProjectTemplate/src/Components/Visual/Icon/Icon.css +0 -510
- package/ProjectTemplate/src/Components/Visual/Icon/Icon.html +0 -1
- package/ProjectTemplate/src/Components/Visual/Icon/Icon.js +0 -89
- package/ProjectTemplate/src/Components/Visual/Icon/slc.eot +0 -0
- package/ProjectTemplate/src/Components/Visual/Icon/slc.json +0 -555
- package/ProjectTemplate/src/Components/Visual/Icon/slc.styl +0 -507
- package/ProjectTemplate/src/Components/Visual/Icon/slc.svg +0 -1485
- package/ProjectTemplate/src/Components/Visual/Icon/slc.symbol.svg +0 -1059
- package/ProjectTemplate/src/Components/Visual/Icon/slc.ttf +0 -0
- package/ProjectTemplate/src/Components/Visual/Icon/slc.woff +0 -0
- package/ProjectTemplate/src/Components/Visual/Icon/slc.woff2 +0 -0
- package/ProjectTemplate/src/Components/Visual/Input/Input.css +0 -91
- package/ProjectTemplate/src/Components/Visual/Input/Input.html +0 -4
- package/ProjectTemplate/src/Components/Visual/Input/Input.js +0 -215
- package/ProjectTemplate/src/Components/Visual/Layout/Layout.css +0 -0
- package/ProjectTemplate/src/Components/Visual/Layout/Layout.html +0 -0
- package/ProjectTemplate/src/Components/Visual/Layout/Layout.js +0 -49
- package/ProjectTemplate/src/Components/Visual/Loading/Loading.css +0 -56
- package/ProjectTemplate/src/Components/Visual/Loading/Loading.html +0 -83
- package/ProjectTemplate/src/Components/Visual/Loading/Loading.js +0 -38
- package/ProjectTemplate/src/Components/Visual/MultiRoute/MultiRoute.js +0 -93
- package/ProjectTemplate/src/Components/Visual/Navbar/Navbar.css +0 -115
- package/ProjectTemplate/src/Components/Visual/Navbar/Navbar.html +0 -44
- package/ProjectTemplate/src/Components/Visual/Navbar/Navbar.js +0 -141
- package/ProjectTemplate/src/Components/Visual/NotFound/NotFound.css +0 -117
- package/ProjectTemplate/src/Components/Visual/NotFound/NotFound.html +0 -24
- package/ProjectTemplate/src/Components/Visual/NotFound/NotFound.js +0 -16
- package/ProjectTemplate/src/Components/Visual/Route/Route.js +0 -93
- package/ProjectTemplate/src/Components/Visual/Select/Select.css +0 -84
- package/ProjectTemplate/src/Components/Visual/Select/Select.html +0 -8
- package/ProjectTemplate/src/Components/Visual/Select/Select.js +0 -195
- package/ProjectTemplate/src/Components/Visual/Switch/Switch.css +0 -76
- package/ProjectTemplate/src/Components/Visual/Switch/Switch.html +0 -8
- package/ProjectTemplate/src/Components/Visual/Switch/Switch.js +0 -102
- package/ProjectTemplate/src/Components/Visual/TreeItem/TreeItem.css +0 -36
- package/ProjectTemplate/src/Components/Visual/TreeItem/TreeItem.html +0 -1
- package/ProjectTemplate/src/Components/Visual/TreeItem/TreeItem.js +0 -126
- package/ProjectTemplate/src/Components/Visual/TreeView/TreeView.css +0 -8
- package/ProjectTemplate/src/Components/Visual/TreeView/TreeView.html +0 -1
- package/ProjectTemplate/src/Components/Visual/TreeView/TreeView.js +0 -48
- package/ProjectTemplate/src/Components/components.js +0 -42
- package/ProjectTemplate/src/Styles/sliceStyles.css +0 -34
- package/ProjectTemplate/src/Themes/Dark.css +0 -42
- package/ProjectTemplate/src/Themes/Light.css +0 -31
- package/ProjectTemplate/src/Themes/Slice.css +0 -47
- package/ProjectTemplate/src/images/Slice.js-logo.png +0 -0
- package/ProjectTemplate/src/images/favicon.ico +0 -0
- package/ProjectTemplate/src/images/im2/Slice.js-logo.png +0 -0
- package/ProjectTemplate/src/routes.js +0 -36
- package/ProjectTemplate/src/sliceConfig.json +0 -58
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
slice-mainmenu {
|
|
2
|
-
position: fixed;
|
|
3
|
-
top: 0;
|
|
4
|
-
left: 0;
|
|
5
|
-
font-family: var(--font-family);
|
|
6
|
-
background-color: var(--primary-background-color);
|
|
7
|
-
border-right: 1px solid var(--primary-color-shade);
|
|
8
|
-
display: flex;
|
|
9
|
-
align-items: flex-start;
|
|
10
|
-
height: 100%;
|
|
11
|
-
width: 17%;
|
|
12
|
-
transition: transform 0.3s ease, width 0.3s ease;
|
|
13
|
-
overflow-x: hidden;
|
|
14
|
-
}
|
|
15
|
-
.slice_menu {
|
|
16
|
-
margin-top: 175px;
|
|
17
|
-
width: 100%;
|
|
18
|
-
height: 100%;
|
|
19
|
-
overflow-y: scroll;
|
|
20
|
-
overflow-x: hidden;
|
|
21
|
-
padding: 10px;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.slice_menu_button {
|
|
25
|
-
position: fixed;
|
|
26
|
-
top: 0;
|
|
27
|
-
left: 0;
|
|
28
|
-
visibility: hidden;
|
|
29
|
-
width: min-content;
|
|
30
|
-
cursor: pointer;
|
|
31
|
-
padding: 20px;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.menu_title {
|
|
35
|
-
visibility: hidden;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.slice_close_menu {
|
|
39
|
-
visibility: hidden;
|
|
40
|
-
position: absolute;
|
|
41
|
-
padding: 20px;
|
|
42
|
-
top: 0;
|
|
43
|
-
right: 0;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
slice-treeview .simple_treeview::-webkit-scrollbar,
|
|
47
|
-
slice-mainmenu::-webkit-scrollbar {
|
|
48
|
-
width: 0px;
|
|
49
|
-
}
|
|
50
|
-
slice-treeview .simple_treeview::-webkit-scrollbar:horizontal,
|
|
51
|
-
slice-mainmenu::-webkit-scrollbar:horizontal {
|
|
52
|
-
height: 0px;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
@media only screen and (max-width: 770px) {
|
|
56
|
-
slice-mainmenu {
|
|
57
|
-
top: 0px;
|
|
58
|
-
position: fixed;
|
|
59
|
-
z-index: 100000;
|
|
60
|
-
display: flex;
|
|
61
|
-
width: 0%;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.slice_menu_button {
|
|
65
|
-
right: 100%;
|
|
66
|
-
visibility: visible;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.menu_title {
|
|
70
|
-
visibility: visible;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.slice_menu_open {
|
|
74
|
-
width: 80%;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.slice_close_menu {
|
|
78
|
-
visibility: visible;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
<div class="slice_menu_button">
|
|
2
|
-
<svg
|
|
3
|
-
class="w-6 h-6 text-gray-800 dark:text-white"
|
|
4
|
-
aria-hidden="true"
|
|
5
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
-
width="24"
|
|
7
|
-
height="24"
|
|
8
|
-
fill="none"
|
|
9
|
-
viewBox="0 0 24 24"
|
|
10
|
-
>
|
|
11
|
-
<path
|
|
12
|
-
stroke="var(--primary-color-contrast)"
|
|
13
|
-
stroke-linecap="round"
|
|
14
|
-
stroke-width="2.3"
|
|
15
|
-
d="M5 7h14M5 12h14M5 17h14"
|
|
16
|
-
/>
|
|
17
|
-
</svg>
|
|
18
|
-
</div>
|
|
19
|
-
<div class="slice_menu">
|
|
20
|
-
<div class="slice_close_menu">
|
|
21
|
-
<svg
|
|
22
|
-
class="w-6 h-6 text-gray-800 dark:text-white"
|
|
23
|
-
aria-hidden="true"
|
|
24
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
25
|
-
width="24"
|
|
26
|
-
height="24"
|
|
27
|
-
fill="none"
|
|
28
|
-
viewBox="0 0 24 24"
|
|
29
|
-
>
|
|
30
|
-
<path
|
|
31
|
-
stroke="var(--primary-color)"
|
|
32
|
-
stroke-linecap="round"
|
|
33
|
-
stroke-linejoin="round"
|
|
34
|
-
stroke-width="2"
|
|
35
|
-
d="M6 18 17.94 6M18 18 6.06 6"
|
|
36
|
-
/>
|
|
37
|
-
</svg>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export default class MainMenu extends HTMLElement {
|
|
2
|
-
constructor(props) {
|
|
3
|
-
super();
|
|
4
|
-
slice.attachTemplate(this);
|
|
5
|
-
|
|
6
|
-
this.$menuButton = this.querySelector('.slice_menu_button');
|
|
7
|
-
this.$closeButton = this.querySelector('.slice_close_menu');
|
|
8
|
-
this.$menu = this.querySelector('.slice_menu');
|
|
9
|
-
|
|
10
|
-
this.$menuButton.addEventListener('click', () => {
|
|
11
|
-
this.handleOpenMenu();
|
|
12
|
-
});
|
|
13
|
-
this.$closeButton.addEventListener('click', () => {
|
|
14
|
-
this.handleCloseMenu();
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
slice.controller.setComponentProps(this, props);
|
|
18
|
-
this.debuggerProps = [];
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
init() {
|
|
22
|
-
this.addEventListener('mouseleave', () => {
|
|
23
|
-
if (this.querySelector('.slice_menu_open')) {
|
|
24
|
-
this.handleCloseMenu();
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
add(value) {
|
|
30
|
-
this.$menu.appendChild(value);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
handleOpenMenu() {
|
|
34
|
-
this.classList.add('slice_menu_open');
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
handleCloseMenu() {
|
|
38
|
-
this.classList.remove('slice_menu_open');
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
customElements.define('slice-mainmenu', MainMenu);
|
|
File without changes
|
|
File without changes
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export default class MyLayout extends HTMLElement {
|
|
2
|
-
constructor(props) {
|
|
3
|
-
super();
|
|
4
|
-
slice.attachTemplate(this);
|
|
5
|
-
|
|
6
|
-
slice.controller.setComponentProps(this, props);
|
|
7
|
-
this.debuggerProps = [];
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
init() {}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
customElements.define('slice-mylayout', MyLayout);
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
slice-mynavigation {
|
|
2
|
-
position: fixed;
|
|
3
|
-
top: 0;
|
|
4
|
-
right: 0;
|
|
5
|
-
font-family: var(--font-family);
|
|
6
|
-
background-color: var(--primary-background-color);
|
|
7
|
-
border-left: 1px solid var(--primary-color-shade);
|
|
8
|
-
display: flex;
|
|
9
|
-
align-items: flex-start;
|
|
10
|
-
height: 100%;
|
|
11
|
-
width: 17%;
|
|
12
|
-
transition: transform 0.3s ease, width 0.3s ease;
|
|
13
|
-
overflow-x: hidden;
|
|
14
|
-
}
|
|
15
|
-
.my_navigation {
|
|
16
|
-
display: flex;
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
margin-top: 80px;
|
|
19
|
-
}
|
|
20
|
-
.my_navigation a {
|
|
21
|
-
padding: 10px;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
@media only screen and (max-width: 770px) {
|
|
25
|
-
slice-mynavigation {
|
|
26
|
-
visibility: hidden;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
a[class^="nav-"] {
|
|
30
|
-
text-decoration: none;
|
|
31
|
-
color: var(--font-primary-color);
|
|
32
|
-
}
|
|
33
|
-
a[class^="nav-"]:hover{
|
|
34
|
-
color: var(--primary-color);
|
|
35
|
-
}
|
|
36
|
-
a[class$="1"] {
|
|
37
|
-
font-weight: 700;
|
|
38
|
-
margin-left: 0%;
|
|
39
|
-
}
|
|
40
|
-
a[class$="2"] {
|
|
41
|
-
margin-left: 5%;
|
|
42
|
-
}
|
|
43
|
-
a[class$="3"] {
|
|
44
|
-
margin-left: 10%;
|
|
45
|
-
}
|
|
46
|
-
a[class$="4"] {
|
|
47
|
-
margin-left: 15%;
|
|
48
|
-
}
|
|
49
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div class="my_navigation"></div>
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
export default class MyNavigation extends HTMLElement {
|
|
2
|
-
constructor(props) {
|
|
3
|
-
super();
|
|
4
|
-
slice.attachTemplate(this);
|
|
5
|
-
|
|
6
|
-
this.$navigation = this.querySelector('.my_navigation');
|
|
7
|
-
|
|
8
|
-
slice.controller.setComponentProps(this, props);
|
|
9
|
-
this.debuggerProps = ['page'];
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
set page(value) {
|
|
13
|
-
this._page = value;
|
|
14
|
-
this.updateNavigation();
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
get page() {
|
|
18
|
-
return this._page;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
init() {
|
|
22
|
-
if (this.page) {
|
|
23
|
-
this.updateNavigation();
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
updateNavigation() {
|
|
28
|
-
this.$navigation.innerHTML = '';
|
|
29
|
-
const idElements = this.page.querySelectorAll('[id]');
|
|
30
|
-
|
|
31
|
-
idElements.forEach((element) => {
|
|
32
|
-
const a = document.createElement('a');
|
|
33
|
-
a.textContent = element.innerHTML;
|
|
34
|
-
|
|
35
|
-
// Obtener la jerarquía del elemento, por ejemplo 'h1', 'h2', etc.
|
|
36
|
-
const tagName = element.tagName.toLowerCase();
|
|
37
|
-
|
|
38
|
-
// Iterar desde h1 hasta h6 para aplicar clases basadas en la jerarquía
|
|
39
|
-
for (let i = 1; i <= 6; i++) {
|
|
40
|
-
if (tagName === `h${i}`) {
|
|
41
|
-
a.classList.add(`nav-h${i}`);
|
|
42
|
-
break; // Si ya encontró la coincidencia, no sigue iterando
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
if (element.id) {
|
|
47
|
-
a.href = `#${element.id}`;
|
|
48
|
-
a.addEventListener('click', (event) => {
|
|
49
|
-
event.preventDefault();
|
|
50
|
-
document.getElementById(element.id).scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
51
|
-
});
|
|
52
|
-
} else {
|
|
53
|
-
a.href = ``;
|
|
54
|
-
}
|
|
55
|
-
this.$navigation.appendChild(a);
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
customElements.define('slice-mynavigation', MyNavigation);
|
|
File without changes
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
export default class Playground extends HTMLElement {
|
|
2
|
-
constructor(props) {
|
|
3
|
-
super();
|
|
4
|
-
slice.attachTemplate(this);
|
|
5
|
-
|
|
6
|
-
slice.controller.setComponentProps(this, props);
|
|
7
|
-
this.debuggerProps = [];
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
async init() {
|
|
11
|
-
let theme = slice.stylesManager.themeManager.currentTheme;
|
|
12
|
-
|
|
13
|
-
const navBar = await slice.build('Navbar', {
|
|
14
|
-
// position: "fixed",
|
|
15
|
-
logo: {
|
|
16
|
-
src: '../../images/Slice.js-logo.png',
|
|
17
|
-
path: '/',
|
|
18
|
-
},
|
|
19
|
-
items: [
|
|
20
|
-
{
|
|
21
|
-
text: 'Home',
|
|
22
|
-
path: '/',
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
text: 'Documentation',
|
|
26
|
-
path: '/Documentation',
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
text: 'Playground',
|
|
30
|
-
path: '/Playground',
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
text: 'Our Team',
|
|
34
|
-
path: '/Team',
|
|
35
|
-
}
|
|
36
|
-
],
|
|
37
|
-
buttons: [
|
|
38
|
-
{
|
|
39
|
-
value: 'Change Theme',
|
|
40
|
-
// color:
|
|
41
|
-
onClickCallback: async () => {
|
|
42
|
-
if (theme === 'Slice') {
|
|
43
|
-
await slice.setTheme('Light');
|
|
44
|
-
theme = 'Light';
|
|
45
|
-
} else if (theme === 'Light') {
|
|
46
|
-
await slice.setTheme('Dark');
|
|
47
|
-
theme = 'Dark';
|
|
48
|
-
} else if (theme === 'Dark') {
|
|
49
|
-
await slice.setTheme('Slice');
|
|
50
|
-
theme = 'Slice';
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
],
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
this.appendChild(navBar);
|
|
58
|
-
|
|
59
|
-
const sliceButton = await slice.build('Button', {
|
|
60
|
-
value: 'Slice',
|
|
61
|
-
onClickCallback: () => {
|
|
62
|
-
if (slice.translator.currentLanguage == 'es') {
|
|
63
|
-
slice.translator.changeLanguage('en');
|
|
64
|
-
} else {
|
|
65
|
-
slice.translator.changeLanguage('es');
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
});
|
|
69
|
-
const sliceInput = await slice.build('Input', {
|
|
70
|
-
placeholder: 'Enter text here...',
|
|
71
|
-
});
|
|
72
|
-
const checkbox = await slice.build('Checkbox', {
|
|
73
|
-
label: 'Check',
|
|
74
|
-
position: 'top',
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
const sliceSwitch = await slice.build('Switch', {
|
|
78
|
-
label: 'Switch',
|
|
79
|
-
labelPlacement: 'left',
|
|
80
|
-
});
|
|
81
|
-
const select = await slice.build('Select', {
|
|
82
|
-
options: [
|
|
83
|
-
{ value: 'Hola', id: 0 },
|
|
84
|
-
{ value: 'Hello', id: 1 },
|
|
85
|
-
{ value: 'Hallo', id: 2 },
|
|
86
|
-
{ value: 'Hi', id: 3 },
|
|
87
|
-
{ value: 'Hola', id: 4 },
|
|
88
|
-
{ value: 'Hello', id: 5 },
|
|
89
|
-
{ value: 'Hallo', id: 6 },
|
|
90
|
-
{ value: 'Hi', id: 7 },
|
|
91
|
-
],
|
|
92
|
-
visibleProp: 'id',
|
|
93
|
-
label: 'Elige una opcion',
|
|
94
|
-
multiple: true,
|
|
95
|
-
});
|
|
96
|
-
const sliceCard = await slice.build('Card', {
|
|
97
|
-
sliceId: 'prueba',
|
|
98
|
-
});
|
|
99
|
-
const details = await slice.build('Details', {
|
|
100
|
-
title: 'Slice',
|
|
101
|
-
text: 'Slice details text',
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
const grid = document.createElement('div');
|
|
105
|
-
grid.classList.add('indexGrid');
|
|
106
|
-
|
|
107
|
-
sliceButton.classList.add('indexGridItem');
|
|
108
|
-
sliceInput.classList.add('indexGridItem');
|
|
109
|
-
sliceSwitch.classList.add('indexGridItem');
|
|
110
|
-
select.classList.add('indexGridItem');
|
|
111
|
-
checkbox.classList.add('indexGridItem');
|
|
112
|
-
details.classList.add('indexGridItem');
|
|
113
|
-
|
|
114
|
-
grid.appendChild(sliceButton);
|
|
115
|
-
grid.appendChild(sliceInput);
|
|
116
|
-
grid.appendChild(sliceSwitch);
|
|
117
|
-
grid.appendChild(select);
|
|
118
|
-
grid.appendChild(checkbox);
|
|
119
|
-
grid.appendChild(sliceCard);
|
|
120
|
-
grid.appendChild(details);
|
|
121
|
-
|
|
122
|
-
this.appendChild(grid);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
customElements.define('slice-playground', Playground);
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
slice-team-card {
|
|
2
|
-
display: block;
|
|
3
|
-
width: 100%;
|
|
4
|
-
max-width: 800px;
|
|
5
|
-
margin: 20px auto;
|
|
6
|
-
font-family: var(--font-family);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.slice_team_card {
|
|
10
|
-
display: flex;
|
|
11
|
-
align-items: center;
|
|
12
|
-
padding: 20px;
|
|
13
|
-
background: var(--primary-background-color);
|
|
14
|
-
border: 1px solid var(--medium-color);
|
|
15
|
-
border-radius: 12px;
|
|
16
|
-
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
|
|
17
|
-
transition: transform 0.3s ease-in-out;
|
|
18
|
-
width: 100%;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.slice_team_card:hover {
|
|
22
|
-
transform: scale(1.02);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/* Imagen circular */
|
|
26
|
-
.team_card_image {
|
|
27
|
-
flex: 0 0 120px;
|
|
28
|
-
height: 120px;
|
|
29
|
-
border-radius: 50%;
|
|
30
|
-
overflow: hidden;
|
|
31
|
-
margin-right: 20px;
|
|
32
|
-
display: flex;
|
|
33
|
-
justify-content: center;
|
|
34
|
-
align-items: center;
|
|
35
|
-
background: var(--light-gray);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.team_card_image img {
|
|
39
|
-
width: 100%;
|
|
40
|
-
height: 100%;
|
|
41
|
-
object-fit: cover;
|
|
42
|
-
border-radius: 50%;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/* Contenido de la tarjeta */
|
|
46
|
-
.team_card_content {
|
|
47
|
-
flex: 1;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.team_card_name {
|
|
51
|
-
margin: 0;
|
|
52
|
-
font-size: 1.5rem;
|
|
53
|
-
font-weight: bold;
|
|
54
|
-
color: var(--font-primary-color);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.team_card_role {
|
|
58
|
-
margin: 5px 0;
|
|
59
|
-
font-size: 1rem;
|
|
60
|
-
color: var(--medium-contrast);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.team_card_description {
|
|
64
|
-
font-size: 0.9rem;
|
|
65
|
-
color: var(--medium-contrast);
|
|
66
|
-
margin-top: 5px;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/* Links */
|
|
70
|
-
.team_card_links {
|
|
71
|
-
margin-top: 10px;
|
|
72
|
-
display: flex;
|
|
73
|
-
gap: 10px;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.team_card_links a {
|
|
77
|
-
display: inline-flex;
|
|
78
|
-
align-items: center;
|
|
79
|
-
justify-content: center;
|
|
80
|
-
padding: 8px 12px;
|
|
81
|
-
background: var(--primary-color);
|
|
82
|
-
color: var(--primary-color-contrast);
|
|
83
|
-
border-radius: 8px;
|
|
84
|
-
text-decoration: none;
|
|
85
|
-
transition: background 0.3s;
|
|
86
|
-
font-weight: bold;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.team_card_links a:hover {
|
|
90
|
-
background: var(--secondary-color);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/* Responsive */
|
|
94
|
-
@media (max-width: 600px) {
|
|
95
|
-
.slice_team_card {
|
|
96
|
-
flex-direction: column;
|
|
97
|
-
text-align: center;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.team_card_image {
|
|
101
|
-
margin-bottom: 15px;
|
|
102
|
-
margin-right: 0;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<div class="slice_team_card">
|
|
2
|
-
<div class="team_card_image">
|
|
3
|
-
<img src="" alt="Profile Image">
|
|
4
|
-
</div>
|
|
5
|
-
<div class="team_card_content">
|
|
6
|
-
<h3 class="team_card_name"></h3>
|
|
7
|
-
<p class="team_card_role"></p>
|
|
8
|
-
<p class="team_card_description"></p>
|
|
9
|
-
<div class="team_card_links"></div>
|
|
10
|
-
</div>
|
|
11
|
-
</div>
|
|
12
|
-
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
export default class SliceTeamCard extends HTMLElement {
|
|
2
|
-
constructor(props) {
|
|
3
|
-
super();
|
|
4
|
-
slice.attachTemplate(this);
|
|
5
|
-
|
|
6
|
-
this.$imageContainer = this.querySelector('.team_card_image img');
|
|
7
|
-
this.$name = this.querySelector('.team_card_name');
|
|
8
|
-
this.$role = this.querySelector('.team_card_role');
|
|
9
|
-
this.$description = this.querySelector('.team_card_description');
|
|
10
|
-
this.$links = this.querySelector('.team_card_links');
|
|
11
|
-
|
|
12
|
-
slice.controller.setComponentProps(this, props);
|
|
13
|
-
this.debuggerProps = ['name', 'role', 'image', 'description', 'links'];
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
get name() {
|
|
17
|
-
return this._name;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
set name(value) {
|
|
21
|
-
this._name = value;
|
|
22
|
-
if (this.$name) this.$name.textContent = value;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
get role() {
|
|
26
|
-
return this._role;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
set role(value) {
|
|
30
|
-
this._role = value;
|
|
31
|
-
if (this.$role) this.$role.textContent = value;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
get image() {
|
|
35
|
-
return this._image;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
set image(value) {
|
|
39
|
-
this._image = value;
|
|
40
|
-
if (this.$imageContainer) {
|
|
41
|
-
this.$imageContainer.src = value;
|
|
42
|
-
this.$imageContainer.alt = value ? `${this._name} profile picture` : 'Profile image';
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
get description() {
|
|
47
|
-
return this._description;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
set description(value) {
|
|
51
|
-
this._description = value;
|
|
52
|
-
if (this.$description) this.$description.textContent = value;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
get links() {
|
|
56
|
-
return this._links;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
set links(values) {
|
|
60
|
-
this._links = values;
|
|
61
|
-
if (this.$links) {
|
|
62
|
-
this.$links.innerHTML = ''; // Limpiar enlaces previos
|
|
63
|
-
values.forEach(link => {
|
|
64
|
-
const a = document.createElement('a');
|
|
65
|
-
a.href = link.href;
|
|
66
|
-
a.textContent = link.label;
|
|
67
|
-
a.target = '_blank';
|
|
68
|
-
this.$links.appendChild(a);
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
window.customElements.define('slice-team-card', SliceTeamCard);
|
package/ProjectTemplate/src/Components/AppComponents/SwitchDocumentation/SwitchDocumentation.css
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
.switchs {
|
|
2
|
-
width: 100%;
|
|
3
|
-
display: flex;
|
|
4
|
-
flex-direction: row;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
align-items: center;
|
|
7
|
-
}
|
|
8
|
-
.labelSwitch {
|
|
9
|
-
display: grid;
|
|
10
|
-
align-items: end;
|
|
11
|
-
grid-template-columns: repeat(2, 1fr);
|
|
12
|
-
grid-template-rows: repeat(1, 1fr);
|
|
13
|
-
gap: 10px;
|
|
14
|
-
margin: 0 auto;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
@media only screen and (max-width: 770px) {
|
|
18
|
-
.labelSwitch {
|
|
19
|
-
grid-template-columns: repeat(1, 1fr);
|
|
20
|
-
}
|
|
21
|
-
}
|
package/ProjectTemplate/src/Components/AppComponents/SwitchDocumentation/SwitchDocumentation.html
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
<h1 id="sliceSwitch">Slice Switch</h1>
|
|
2
|
-
<div class="mySwitch">
|
|
3
|
-
<p>This is a Slice Switch.</p>
|
|
4
|
-
</div>
|
|
5
|
-
<div class="colorSwitch">
|
|
6
|
-
<h2 id="customColor">Custom color</h2>
|
|
7
|
-
<p>
|
|
8
|
-
You cand customize your Slice Switch by changing it's color with the color
|
|
9
|
-
prop
|
|
10
|
-
</p>
|
|
11
|
-
</div>
|
|
12
|
-
<h1 id="label">Label</h1>
|
|
13
|
-
<div class="label">
|
|
14
|
-
<p>You can set a label to your switch.</p>
|
|
15
|
-
</div>
|
|
16
|
-
<h2 id="labelPlacement">Label Placement</h2>
|
|
17
|
-
<p>You can also set in wich position to put the label to.</p>
|
|
18
|
-
<div class="labelSwitch">
|
|
19
|
-
<div class="labelLeft">
|
|
20
|
-
<h2>Left</h2>
|
|
21
|
-
<p>This label is positioned at left.</p>
|
|
22
|
-
</div>
|
|
23
|
-
<div class="labelTop">
|
|
24
|
-
<h2>Top</h2>
|
|
25
|
-
<p>This label is positioned at top.</p>
|
|
26
|
-
</div>
|
|
27
|
-
<div class="labelRight">
|
|
28
|
-
<h2>Right (default)</h2>
|
|
29
|
-
<p>This label is positioned at right.</p>
|
|
30
|
-
</div>
|
|
31
|
-
<div class="labelBottom">
|
|
32
|
-
<h2>Bottom</h2>
|
|
33
|
-
<p>This label is positioned at bottom.</p>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|