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
package/ProjectTemplate/src/Components/AppComponents/InputDocumentation/InputDocumentation.html
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
<h1 id="sliceInput">Slice Input</h1>
|
|
2
|
-
<div class="myInput">
|
|
3
|
-
<p>
|
|
4
|
-
A Slice Input is build with a type default prop of text, that can be used by
|
|
5
|
-
to enter any data the user wants to.
|
|
6
|
-
</p>
|
|
7
|
-
</div>
|
|
8
|
-
<h1 id="props">Props</h1>
|
|
9
|
-
<div class="inputPlaceholder">
|
|
10
|
-
<h2 id="placeholder">Placeholder</h2>
|
|
11
|
-
<p></p>
|
|
12
|
-
</div>
|
|
13
|
-
<div class="requiredProp">
|
|
14
|
-
<h2 id="required">Required Prop</h2>
|
|
15
|
-
<p>The required prop triggers error if there is no value.</p>
|
|
16
|
-
</div>
|
|
17
|
-
<div class="disabledProp">
|
|
18
|
-
<h2 id="disabled">Disabled Prop</h2>
|
|
19
|
-
<p>The disabled prop cancels all kind of interaction with the input.</p>
|
|
20
|
-
</div>
|
|
21
|
-
<h1 id="types">Types</h1>
|
|
22
|
-
<div class="inputTypes">
|
|
23
|
-
<div class="typeText">
|
|
24
|
-
<h2 id="typeText">Text</h2>
|
|
25
|
-
<p>
|
|
26
|
-
As said before, the text type is the default type to a Slice Input. can be
|
|
27
|
-
field with text, numbers, and symbols.
|
|
28
|
-
</p>
|
|
29
|
-
</div>
|
|
30
|
-
<div class="typeNumber">
|
|
31
|
-
<h2 id="typeText">Number</h2>
|
|
32
|
-
<p>
|
|
33
|
-
In text type an user can enter as much of text as numbers, but with number
|
|
34
|
-
type it can only be enter numbers.
|
|
35
|
-
</p>
|
|
36
|
-
</div>
|
|
37
|
-
<div class="password">
|
|
38
|
-
<h2 id="password">Password & Secret Prop</h2>
|
|
39
|
-
<p>
|
|
40
|
-
The password type for a Slice Input automatically sets all the information
|
|
41
|
-
into secret. With secret prop being true the data entered can be revealed
|
|
42
|
-
at will by the user.
|
|
43
|
-
</p>
|
|
44
|
-
<div class="inputGrid">
|
|
45
|
-
<div class="typePassword"></div>
|
|
46
|
-
<div class="secretProp"></div>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
<div class="emailType">
|
|
51
|
-
<h2 id="typeEmail">Email</h2>
|
|
52
|
-
<p>
|
|
53
|
-
The very own HTML Input tag can verify if the data entered is a valid email.
|
|
54
|
-
</p>
|
|
55
|
-
</div>
|
|
56
|
-
<div class="dateType">
|
|
57
|
-
<h2 id="typeDate">Date</h2>
|
|
58
|
-
<p>This type allows the user to enter a specific date of the calendar.</p>
|
|
59
|
-
</div>
|
|
60
|
-
<h1 id="conditions">Slice Input Conditions</h1>
|
|
61
|
-
<div class="conditions">
|
|
62
|
-
<p>
|
|
63
|
-
The Slice Input cand have conditions set up by the developers. This is highly recomended for emails and passwords, but also can by used in the default text type.
|
|
64
|
-
<ul>
|
|
65
|
-
<li>regex <span>=</span> string <span>(optional)</span></li>
|
|
66
|
-
<li>minLength <span>=</span> number <span>(optional)</span></li>
|
|
67
|
-
<li>maxLength <span>=</span> number</li>
|
|
68
|
-
<li>minMinusc <span>=</span> number <span>(optional)</span></li>
|
|
69
|
-
<li>maxMinusc <span>=</span> number</li>
|
|
70
|
-
<li>minMayusc <span>=</span> number <span>(optional)</span></li>
|
|
71
|
-
<li>maxMayusc <span>=</span> number</li>
|
|
72
|
-
<li>minNumber <span>=</span> number <span>(optional)</span></li>
|
|
73
|
-
<li>maxNumber <span>=</span> number</li>
|
|
74
|
-
<li>minSymbol <span>=</span> number <span>(optional)</span></li>
|
|
75
|
-
<li>maxSymbol <span>=</span> number</li>
|
|
76
|
-
</ul>
|
|
77
|
-
The usage of "regex" makes the rest of conditions useless because it has to specify all conditions. Regex is only recomended for those who have the proper knowledge.
|
|
78
|
-
</p>
|
|
79
|
-
<div class="validateConditions"></div>
|
|
80
|
-
<!-- <div class="inputGrid"> -->
|
|
81
|
-
<div class="inputConditions"></div>
|
|
82
|
-
<div class="inputRegex"></div>
|
|
83
|
-
<!-- </div> -->
|
|
84
|
-
</div>
|
|
85
|
-
<h1 id="methods">Methods</h1>
|
|
86
|
-
<div class="inputMethods">
|
|
87
|
-
<p>The Slice Input has it's own methods to validate if the entered data match the conditions, to trigger error (and success), and to clear the input.
|
|
88
|
-
<ul>
|
|
89
|
-
<li>validateValue();</li>
|
|
90
|
-
<li>clear();</li>
|
|
91
|
-
<li>triggerError();</li>
|
|
92
|
-
<li>triggerSuccess();</li>
|
|
93
|
-
</ul>
|
|
94
|
-
</p>
|
|
95
|
-
</div>
|
package/ProjectTemplate/src/Components/AppComponents/InputDocumentation/InputDocumentation.js
DELETED
|
@@ -1,315 +0,0 @@
|
|
|
1
|
-
export default class InputDocumentation 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
|
-
await this.createInput(this.querySelector('.myInput'), {});
|
|
12
|
-
//Props
|
|
13
|
-
await this.createInput(
|
|
14
|
-
this.querySelector('.inputPlaceholder'),
|
|
15
|
-
{ placeholder: 'Enter text here' },
|
|
16
|
-
`{
|
|
17
|
-
placeholder: "Enter text here"
|
|
18
|
-
}`
|
|
19
|
-
);
|
|
20
|
-
await this.createInput(
|
|
21
|
-
this.querySelector('.requiredProp'),
|
|
22
|
-
{
|
|
23
|
-
placeholder: 'Enter text here',
|
|
24
|
-
required: true,
|
|
25
|
-
},
|
|
26
|
-
`{
|
|
27
|
-
placeholder: "Enter text here",
|
|
28
|
-
required: true
|
|
29
|
-
}`
|
|
30
|
-
);
|
|
31
|
-
await this.createInput(
|
|
32
|
-
this.querySelector('.disabledProp'),
|
|
33
|
-
{
|
|
34
|
-
placeholder: 'Enter text here',
|
|
35
|
-
disabled: true,
|
|
36
|
-
},
|
|
37
|
-
`{
|
|
38
|
-
placeholder: "Enter text here",
|
|
39
|
-
disabled: true
|
|
40
|
-
}`
|
|
41
|
-
);
|
|
42
|
-
//Types
|
|
43
|
-
await this.createInput(
|
|
44
|
-
this.querySelector('.typeText'),
|
|
45
|
-
{
|
|
46
|
-
placeholder: 'Enter text here',
|
|
47
|
-
type: 'text',
|
|
48
|
-
},
|
|
49
|
-
`{
|
|
50
|
-
placeholder: "Enter text here",
|
|
51
|
-
type: "text"
|
|
52
|
-
}`
|
|
53
|
-
);
|
|
54
|
-
await this.createInput(
|
|
55
|
-
this.querySelector('.typeNumber'),
|
|
56
|
-
{
|
|
57
|
-
placeholder: 'Enter numbers here',
|
|
58
|
-
type: 'number',
|
|
59
|
-
},
|
|
60
|
-
`{
|
|
61
|
-
placeholder: "Enter numbers here",
|
|
62
|
-
type: "number"
|
|
63
|
-
}`
|
|
64
|
-
);
|
|
65
|
-
await this.createInput(
|
|
66
|
-
this.querySelector('.typePassword'),
|
|
67
|
-
{
|
|
68
|
-
placeholder: 'Password',
|
|
69
|
-
type: 'password',
|
|
70
|
-
},
|
|
71
|
-
`{
|
|
72
|
-
placeholder: "Password",
|
|
73
|
-
type: "password"
|
|
74
|
-
}`
|
|
75
|
-
);
|
|
76
|
-
await this.createInput(
|
|
77
|
-
this.querySelector('.secretProp'),
|
|
78
|
-
{
|
|
79
|
-
placeholder: 'Password',
|
|
80
|
-
type: 'password',
|
|
81
|
-
secret: true,
|
|
82
|
-
},
|
|
83
|
-
`{
|
|
84
|
-
placeholder: "Password",
|
|
85
|
-
type: "password",
|
|
86
|
-
secret: true
|
|
87
|
-
}`
|
|
88
|
-
);
|
|
89
|
-
await this.createInput(
|
|
90
|
-
this.querySelector('.emailType'),
|
|
91
|
-
{ placeholder: 'Email', type: 'email' },
|
|
92
|
-
`{
|
|
93
|
-
placeholder: "Email",
|
|
94
|
-
type: "email"
|
|
95
|
-
}`
|
|
96
|
-
);
|
|
97
|
-
await this.createInput(
|
|
98
|
-
this.querySelector('.dateType'),
|
|
99
|
-
{ placeholder: 'Date', type: 'date' },
|
|
100
|
-
`{
|
|
101
|
-
placeholder: "Date",
|
|
102
|
-
type: "date"
|
|
103
|
-
}`
|
|
104
|
-
);
|
|
105
|
-
const conditionsInput = await this.createInput(
|
|
106
|
-
this.querySelector('.inputConditions'),
|
|
107
|
-
{
|
|
108
|
-
placeholder: 'Password',
|
|
109
|
-
type: 'password',
|
|
110
|
-
secret: true,
|
|
111
|
-
conditions: {
|
|
112
|
-
// regex: "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[\\W_]).{8,}$",
|
|
113
|
-
minLength: 8,
|
|
114
|
-
maxLength: 10,
|
|
115
|
-
minMinusc: 1,
|
|
116
|
-
maxMinusc: 4,
|
|
117
|
-
minMayusc: 1,
|
|
118
|
-
maxMayusc: 6,
|
|
119
|
-
minNumber: 1,
|
|
120
|
-
maxNumber: 6,
|
|
121
|
-
minSymbol: 1,
|
|
122
|
-
maxSymbol: 10,
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
`{
|
|
126
|
-
placeholder: "Password",
|
|
127
|
-
type: "password",
|
|
128
|
-
secret: true,
|
|
129
|
-
conditions: {
|
|
130
|
-
// regex: "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[\\W_]).{8,}$",
|
|
131
|
-
minLength: 8,
|
|
132
|
-
maxLength: 10,
|
|
133
|
-
minMinusc: 1,
|
|
134
|
-
maxMinusc: 4,
|
|
135
|
-
minMayusc: 1,
|
|
136
|
-
maxMayusc: 6,
|
|
137
|
-
minNumber: 1,
|
|
138
|
-
maxNumber: 6,
|
|
139
|
-
minSymbol: 1,
|
|
140
|
-
maxSymbol: 10,
|
|
141
|
-
},
|
|
142
|
-
}`,
|
|
143
|
-
'Validate Conditions'
|
|
144
|
-
);
|
|
145
|
-
const regexInput = await this.createInput(
|
|
146
|
-
this.querySelector('.inputRegex'),
|
|
147
|
-
{
|
|
148
|
-
placeholder: 'Password with regex',
|
|
149
|
-
type: 'password',
|
|
150
|
-
secret: true,
|
|
151
|
-
conditions: {
|
|
152
|
-
// regex: "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[\\W_]).{8,}$",
|
|
153
|
-
minLength: 8,
|
|
154
|
-
maxLength: 10,
|
|
155
|
-
minMinusc: 1,
|
|
156
|
-
maxMinusc: 4,
|
|
157
|
-
minMayusc: 1,
|
|
158
|
-
maxMayusc: 6,
|
|
159
|
-
minNumber: 1,
|
|
160
|
-
maxNumber: 6,
|
|
161
|
-
minSymbol: 1,
|
|
162
|
-
maxSymbol: 10,
|
|
163
|
-
},
|
|
164
|
-
},
|
|
165
|
-
`{
|
|
166
|
-
placeholder: "Password with regex",
|
|
167
|
-
type: "password",
|
|
168
|
-
secret: true,
|
|
169
|
-
conditions: {
|
|
170
|
-
regex: "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[\\W_]).{8,}$",
|
|
171
|
-
// minLength: 8,
|
|
172
|
-
// maxLength: 10,
|
|
173
|
-
// minMinusc: 1,
|
|
174
|
-
// maxMinusc: 4,
|
|
175
|
-
// minMayusc: 1,
|
|
176
|
-
// maxMayusc: 6,
|
|
177
|
-
// minNumber: 1,
|
|
178
|
-
// maxNumber: 6,
|
|
179
|
-
// minSymbol: 1,
|
|
180
|
-
// maxSymbol: 10,
|
|
181
|
-
},
|
|
182
|
-
}`,
|
|
183
|
-
'Validate Regex'
|
|
184
|
-
);
|
|
185
|
-
await this.inputMethos(
|
|
186
|
-
this.querySelector('.inputMethods'),
|
|
187
|
-
{
|
|
188
|
-
placeholder: 'Methods',
|
|
189
|
-
conditions: {
|
|
190
|
-
minLength: 8,
|
|
191
|
-
minNumber: 1,
|
|
192
|
-
minSymbol: 1,
|
|
193
|
-
},
|
|
194
|
-
},
|
|
195
|
-
`{
|
|
196
|
-
placeholder: "Methods",
|
|
197
|
-
conditions: {
|
|
198
|
-
minLength: 8,
|
|
199
|
-
minNumber: 1,
|
|
200
|
-
minSymbol: 1,
|
|
201
|
-
}
|
|
202
|
-
}`
|
|
203
|
-
);
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
async createInput(appendTo, inputProps, codeProps, validate) {
|
|
207
|
-
if (!codeProps) {
|
|
208
|
-
codeProps = '{}';
|
|
209
|
-
}
|
|
210
|
-
const myInput = await slice.build('Input', inputProps);
|
|
211
|
-
|
|
212
|
-
const componentCode = await slice.build('CodeVisualizer', {
|
|
213
|
-
value: `const myInput = await slice.build("Input", ${codeProps});
|
|
214
|
-
|
|
215
|
-
`,
|
|
216
|
-
language: 'javascript',
|
|
217
|
-
});
|
|
218
|
-
|
|
219
|
-
const div = document.createElement('div');
|
|
220
|
-
const inputDiv = document.createElement('div');
|
|
221
|
-
inputDiv.classList.add('inputs');
|
|
222
|
-
inputDiv.appendChild(myInput);
|
|
223
|
-
|
|
224
|
-
div.classList.add('inputsContainer');
|
|
225
|
-
div.appendChild(inputDiv);
|
|
226
|
-
if (validate) {
|
|
227
|
-
const validateButton = await slice.build('Button', {
|
|
228
|
-
value: validate,
|
|
229
|
-
onClickCallback: () => {
|
|
230
|
-
myInput.validateValue();
|
|
231
|
-
},
|
|
232
|
-
});
|
|
233
|
-
div.appendChild(validateButton);
|
|
234
|
-
}
|
|
235
|
-
div.appendChild(componentCode);
|
|
236
|
-
|
|
237
|
-
appendTo.appendChild(div);
|
|
238
|
-
|
|
239
|
-
return myInput;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
async inputMethos(appendTo, inputProps, codeProps) {
|
|
243
|
-
if (!codeProps) {
|
|
244
|
-
codeProps = '{}';
|
|
245
|
-
}
|
|
246
|
-
const myInput = await slice.build('Input', inputProps);
|
|
247
|
-
|
|
248
|
-
const componentCode = await slice.build('CodeVisualizer', {
|
|
249
|
-
value: `const myInput = await slice.build("Input", ${codeProps});
|
|
250
|
-
|
|
251
|
-
myInput.validateValue();
|
|
252
|
-
myInput.clear();
|
|
253
|
-
myInput.triggerError();
|
|
254
|
-
myInput.triggerSuccess();
|
|
255
|
-
|
|
256
|
-
`,
|
|
257
|
-
language: 'javascript',
|
|
258
|
-
});
|
|
259
|
-
|
|
260
|
-
const div = document.createElement('div');
|
|
261
|
-
const inputDiv = document.createElement('div');
|
|
262
|
-
inputDiv.classList.add('inputs');
|
|
263
|
-
inputDiv.appendChild(myInput);
|
|
264
|
-
|
|
265
|
-
div.classList.add('inputsContainer');
|
|
266
|
-
div.appendChild(inputDiv);
|
|
267
|
-
const buttons = document.createElement('div');
|
|
268
|
-
buttons.classList.add('inputButtons');
|
|
269
|
-
const validateButton = await slice.build('Button', {
|
|
270
|
-
value: 'Validate',
|
|
271
|
-
onClickCallback: () => {
|
|
272
|
-
myInput.validateValue();
|
|
273
|
-
},
|
|
274
|
-
});
|
|
275
|
-
const clearButton = await slice.build('Button', {
|
|
276
|
-
value: 'Clear',
|
|
277
|
-
customColor: {
|
|
278
|
-
button: 'var(--medium-color)',
|
|
279
|
-
},
|
|
280
|
-
onClickCallback: () => {
|
|
281
|
-
myInput.clear();
|
|
282
|
-
},
|
|
283
|
-
});
|
|
284
|
-
const errorButton = await slice.build('Button', {
|
|
285
|
-
value: 'Error',
|
|
286
|
-
customColor: {
|
|
287
|
-
button: 'var(--danger-color)',
|
|
288
|
-
},
|
|
289
|
-
onClickCallback: () => {
|
|
290
|
-
myInput.triggerError();
|
|
291
|
-
},
|
|
292
|
-
});
|
|
293
|
-
const successButton = await slice.build('Button', {
|
|
294
|
-
value: 'Success',
|
|
295
|
-
customColor: {
|
|
296
|
-
button: 'var(--success-color)',
|
|
297
|
-
},
|
|
298
|
-
onClickCallback: () => {
|
|
299
|
-
myInput.triggerSuccess();
|
|
300
|
-
},
|
|
301
|
-
});
|
|
302
|
-
buttons.appendChild(validateButton);
|
|
303
|
-
buttons.appendChild(clearButton);
|
|
304
|
-
buttons.appendChild(errorButton);
|
|
305
|
-
buttons.appendChild(successButton);
|
|
306
|
-
div.appendChild(buttons);
|
|
307
|
-
div.appendChild(componentCode);
|
|
308
|
-
|
|
309
|
-
appendTo.appendChild(div);
|
|
310
|
-
|
|
311
|
-
return myInput;
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
customElements.define('slice-inputdocumentation', InputDocumentation);
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
slice-landing-menu {
|
|
2
|
-
h1 {
|
|
3
|
-
z-index: 0;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
h2{
|
|
7
|
-
color: var(--font-primary-color);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.sliceLogo {
|
|
11
|
-
position: absolute;
|
|
12
|
-
z-index: -1;
|
|
13
|
-
}
|
|
14
|
-
.intro {
|
|
15
|
-
height: 85vh;
|
|
16
|
-
position: relative;
|
|
17
|
-
display: flex;
|
|
18
|
-
align-items: center;
|
|
19
|
-
justify-content: center;
|
|
20
|
-
}
|
|
21
|
-
.intro h1 {
|
|
22
|
-
/* font-family: "Ubuntu", sans-serif; */
|
|
23
|
-
font-weight: bold;
|
|
24
|
-
font-style: normal;
|
|
25
|
-
color: var(--font-primary-color);
|
|
26
|
-
animation: fade-in 3s ease;
|
|
27
|
-
text-shadow: black 1px 0 100px;
|
|
28
|
-
}
|
|
29
|
-
.intro .sliceLogo {
|
|
30
|
-
opacity: 0.75;
|
|
31
|
-
color: var(--primary-color);
|
|
32
|
-
animation: fade-in-logo 5s ease, beat 10s ease infinite 5s;
|
|
33
|
-
}
|
|
34
|
-
.info {
|
|
35
|
-
bottom: 0;
|
|
36
|
-
position: absolute;
|
|
37
|
-
display: flex;
|
|
38
|
-
flex-direction: column;
|
|
39
|
-
align-items: center;
|
|
40
|
-
}
|
|
41
|
-
.info p a {
|
|
42
|
-
color: var(--primary-color);
|
|
43
|
-
text-decoration: none;
|
|
44
|
-
transition: all 0.3s ease;
|
|
45
|
-
}
|
|
46
|
-
.info p a:hover {
|
|
47
|
-
text-shadow: white 1px 0 10px;
|
|
48
|
-
text-decoration: underline;
|
|
49
|
-
}
|
|
50
|
-
.goToDocs {
|
|
51
|
-
margin-top: 50px;
|
|
52
|
-
color: var(--font-primary-color);
|
|
53
|
-
}
|
|
54
|
-
.goToDocs p {
|
|
55
|
-
text-align: justify;
|
|
56
|
-
}
|
|
57
|
-
@media screen and (min-width: 770px) {
|
|
58
|
-
.goToDocs {
|
|
59
|
-
padding-left: 30%;
|
|
60
|
-
padding-right: 30%;
|
|
61
|
-
}
|
|
62
|
-
h1 {
|
|
63
|
-
font-size: 100px;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
@media screen and (max-width: 770px) {
|
|
68
|
-
.goToDocs {
|
|
69
|
-
padding: 10px;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.info {
|
|
73
|
-
bottom: 20;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
@keyframes fade-in {
|
|
79
|
-
0% {
|
|
80
|
-
opacity: 0;
|
|
81
|
-
scale: 0.5;
|
|
82
|
-
}
|
|
83
|
-
100% {
|
|
84
|
-
opacity: 1;
|
|
85
|
-
scale: 1;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
@keyframes fade-in-logo {
|
|
89
|
-
0% {
|
|
90
|
-
opacity: 0;
|
|
91
|
-
scale: 0.5;
|
|
92
|
-
}
|
|
93
|
-
100% {
|
|
94
|
-
opacity: 0.75;
|
|
95
|
-
scale: 1;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
@keyframes beat {
|
|
99
|
-
0% {
|
|
100
|
-
scale: 1;
|
|
101
|
-
}
|
|
102
|
-
50% {
|
|
103
|
-
scale: 0.9;
|
|
104
|
-
}
|
|
105
|
-
100% {
|
|
106
|
-
scale: 1;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<div class="intro">
|
|
2
|
-
<h1>Slice Framework</h1>
|
|
3
|
-
<div class="info">
|
|
4
|
-
<h2 style="text-align: center; padding-top: 10px;">Slice.js: Build Your Web App One Slice at a Time.</h2>
|
|
5
|
-
</div>
|
|
6
|
-
</div>
|
|
7
|
-
<div class="goToDocs">
|
|
8
|
-
<p>
|
|
9
|
-
Introducing Slice.js, a revolutionary frontend framework built on modern web standards and powered by the simplicity of vanilla JavaScript.
|
|
10
|
-
With its modular, component-based architecture, Slice.js streamlines web development, enabling developers who know the core technologies—HTML, CSS, and JavaScript—to build robust, well-organized web applications with ease.
|
|
11
|
-
</p>
|
|
12
|
-
<p>
|
|
13
|
-
Dive into our comprehensive documentation to learn how Slice.js leverages native web components and a clean,
|
|
14
|
-
standards-based syntax to simplify your workflow.
|
|
15
|
-
</p>
|
|
16
|
-
</div>
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export default class LandingMenu 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 logoSize = '500px';
|
|
12
|
-
if (window.screen.width <= 770) {
|
|
13
|
-
logoSize = '300px';
|
|
14
|
-
}
|
|
15
|
-
const sliceLogo = await slice.build('Icon', {
|
|
16
|
-
name: 'sliceJs',
|
|
17
|
-
size: logoSize,
|
|
18
|
-
color: 'var(--font-primary-color)',
|
|
19
|
-
iconStyle: 'filled',
|
|
20
|
-
});
|
|
21
|
-
sliceLogo.classList.add('sliceLogo');
|
|
22
|
-
this.querySelector('.intro').appendChild(sliceLogo);
|
|
23
|
-
const goToDocs = await slice.build('Button', {
|
|
24
|
-
value: 'Go to Documentation',
|
|
25
|
-
onClickCallback: async () => {
|
|
26
|
-
await slice.router.navigate('/Documentation');
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
this.querySelector('.goToDocs').appendChild(goToDocs);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
customElements.define('slice-landing-menu', LandingMenu);
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
slice-landingpage slice-layout {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
justify-content: center;
|
|
5
|
-
}
|
|
6
|
-
.landing_page {
|
|
7
|
-
font-family: var(--font-family);
|
|
8
|
-
color: var(--font-primary-color);
|
|
9
|
-
overflow-y: scroll;
|
|
10
|
-
overflow-x: hidden;
|
|
11
|
-
padding-left: 10px;
|
|
12
|
-
padding-right: 10px;
|
|
13
|
-
padding-bottom: 25px;
|
|
14
|
-
}
|
|
File without changes
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
export default class LandingPage 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
|
-
const div = document.createElement('div');
|
|
12
|
-
let theme = slice.stylesManager.themeManager.currentTheme;
|
|
13
|
-
|
|
14
|
-
const navBar = await slice.build('Navbar', {
|
|
15
|
-
logo: {
|
|
16
|
-
src: '../../images/Slice.js-logo.png',
|
|
17
|
-
path: '',
|
|
18
|
-
},
|
|
19
|
-
buttons: [
|
|
20
|
-
{
|
|
21
|
-
value: 'Change Theme',
|
|
22
|
-
onClickCallback: async () => {
|
|
23
|
-
if (theme === 'Slice') {
|
|
24
|
-
await slice.setTheme('Light');
|
|
25
|
-
theme = 'Light';
|
|
26
|
-
} else if (theme === 'Light') {
|
|
27
|
-
await slice.setTheme('Dark');
|
|
28
|
-
theme = 'Dark';
|
|
29
|
-
} else if (theme === 'Dark') {
|
|
30
|
-
await slice.setTheme('Slice');
|
|
31
|
-
theme = 'Slice';
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
],
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
div.appendChild(navBar);
|
|
39
|
-
const divView = document.createElement('div');
|
|
40
|
-
divView.classList.add('landing_page');
|
|
41
|
-
|
|
42
|
-
const landingMenu = await slice.build('LandingMenu', {});
|
|
43
|
-
divView.appendChild(landingMenu);
|
|
44
|
-
const layOut = await slice.build('Layout', {
|
|
45
|
-
layout: div,
|
|
46
|
-
view: divView,
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
this.appendChild(layOut);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
customElements.define('slice-landingpage', LandingPage);
|