@fishawack/lab-velocity 0.3.1 → 0.3.3
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/_defaults.scss +4 -8
- package/components/_breadcrumbs.scss +3 -3
- package/components/_button.scss +14 -15
- package/components/_checkbox.scss +1 -1
- package/components/_footer.scss +5 -5
- package/components/_header.scss +6 -6
- package/components/_link.scss +4 -4
- package/components/_navigation.scss +6 -6
- package/components/_pageTitle.scss +4 -5
- package/components/_sidebar.scss +6 -6
- package/components/_typography.scss +18 -18
- package/form/input.vue +32 -2
- package/package.json +1 -1
package/_defaults.scss
CHANGED
|
@@ -5,20 +5,16 @@
|
|
|
5
5
|
$colors: variables.dynamic('color', module-variables("variables"));
|
|
6
6
|
|
|
7
7
|
// Override lab-ui defaults here, e.g $button: $color6;
|
|
8
|
-
$spacing:
|
|
9
|
-
|
|
10
|
-
html {
|
|
11
|
-
font-size: 10px;
|
|
12
|
-
}
|
|
8
|
+
$spacing: get-ratio(8px);
|
|
13
9
|
|
|
14
10
|
body {
|
|
15
11
|
font-family: $primaryFont, sans-serif;
|
|
16
|
-
font-size:
|
|
12
|
+
font-size: get-ratio(16px);
|
|
17
13
|
line-height: 1.5;
|
|
18
14
|
color: $color1;
|
|
19
15
|
background-color: $color3;
|
|
20
16
|
}
|
|
21
17
|
.container {
|
|
22
18
|
margin-left: 0;
|
|
23
|
-
padding: 0px
|
|
24
|
-
}
|
|
19
|
+
padding: 0px 5 * $spacing;
|
|
20
|
+
}
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
|
|
4
4
|
.el-breadcrumb__separator {
|
|
5
5
|
display: none;
|
|
6
|
-
margin:0px
|
|
6
|
+
margin:0px $spacing;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
.el-breadcrumb__separator,
|
|
10
10
|
.el-breadcrumb__inner {
|
|
11
|
-
font-size:
|
|
12
|
-
line-height:
|
|
11
|
+
font-size: get-ratio(16px);
|
|
12
|
+
line-height: get-ratio(24px);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.el-breadcrumb__inner {
|
package/components/_button.scss
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
.el-button--default {
|
|
5
|
-
border: solid 1px $color5;
|
|
5
|
+
border: solid get-ratio(1px) $color5;
|
|
6
6
|
&:hover {
|
|
7
7
|
background-color: #AFAFAF;
|
|
8
8
|
color: $color1;
|
|
9
9
|
}
|
|
10
10
|
&:active {
|
|
11
11
|
background-color: #F2F2F2;
|
|
12
|
-
border: solid 1px #2D2D2D;
|
|
12
|
+
border: solid get-ratio(1px) #2D2D2D;
|
|
13
13
|
color: $color1;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
&.is-plain {
|
|
30
|
-
padding: .
|
|
30
|
+
padding: .5 * $spacing 2 * $spacing;
|
|
31
31
|
background-color: #F2F2F2;
|
|
32
32
|
color: #2D2D2D;
|
|
33
33
|
|
|
@@ -103,18 +103,18 @@
|
|
|
103
103
|
|
|
104
104
|
// sizes
|
|
105
105
|
.el-button--default {
|
|
106
|
-
font-size:
|
|
107
|
-
line-height:
|
|
108
|
-
padding:
|
|
106
|
+
font-size: get-ratio(16px);
|
|
107
|
+
line-height: get-ratio(24px);
|
|
108
|
+
padding: $spacing 2 * $spacing;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
.el-button--large {
|
|
112
|
-
padding: 1.
|
|
112
|
+
padding: 1.5 * $spacing 2.5 * $spacing;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
.el-button--small {
|
|
116
|
-
font-size:
|
|
117
|
-
line-height:
|
|
116
|
+
font-size: get-ratio(12px);
|
|
117
|
+
line-height: get-ratio(18px);
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
.el-button {
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
|
|
124
124
|
&.is-circle {
|
|
125
125
|
width: auto;
|
|
126
|
-
padding: 1.
|
|
126
|
+
padding: 1.5 * $spacing;
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
|
|
@@ -143,14 +143,13 @@
|
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
&--iconOnly {
|
|
146
|
-
// padding: 1.5rem;
|
|
147
146
|
|
|
148
147
|
> span {
|
|
149
148
|
margin: 0;
|
|
150
149
|
}
|
|
151
150
|
.vel-icon{
|
|
152
|
-
width: 1.
|
|
153
|
-
height: 1.
|
|
151
|
+
width: 1.5 * $spacing;
|
|
152
|
+
height: 1.5 * $spacing;
|
|
154
153
|
}
|
|
155
154
|
svg {
|
|
156
155
|
width: 100%;
|
|
@@ -158,11 +157,11 @@
|
|
|
158
157
|
}
|
|
159
158
|
|
|
160
159
|
&.el-button--small {
|
|
161
|
-
padding:
|
|
160
|
+
padding: $spacing $spacing * 2;
|
|
162
161
|
}
|
|
163
162
|
|
|
164
163
|
&.el-button--large {
|
|
165
|
-
padding:
|
|
164
|
+
padding: 2 * $spacing 2.5 * $spacing;
|
|
166
165
|
}
|
|
167
166
|
}
|
|
168
167
|
}
|
package/components/_footer.scss
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
footer {
|
|
2
2
|
background-color: $color1;
|
|
3
3
|
// width: 100%;
|
|
4
|
-
min-height:
|
|
5
|
-
padding:
|
|
4
|
+
min-height: $spacing * 20.5;
|
|
5
|
+
padding: $spacing * 5 $spacing * 3;
|
|
6
6
|
box-sizing: border-box;
|
|
7
7
|
width: 100%;
|
|
8
8
|
|
|
9
9
|
svg {
|
|
10
|
-
width:
|
|
11
|
-
max-width:
|
|
12
|
-
height:
|
|
10
|
+
width: 3 * $spacing;
|
|
11
|
+
max-width: 3 * $spacing;
|
|
12
|
+
height: 3 * $spacing;
|
|
13
13
|
display: inline-block;
|
|
14
14
|
margin-right: $spacing;
|
|
15
15
|
}
|
package/components/_header.scss
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
header {
|
|
2
|
-
border-bottom: solid 1px $color4;
|
|
2
|
+
border-bottom: solid get-ratio(1px) $color4;
|
|
3
3
|
background-color: $color0;
|
|
4
4
|
width: 100%;
|
|
5
5
|
box-sizing: border-box;
|
|
6
6
|
|
|
7
7
|
.icon {
|
|
8
|
-
min-width:
|
|
9
|
-
max-width:
|
|
10
|
-
width:
|
|
11
|
-
height:
|
|
8
|
+
min-width: $spacing * 2.5;
|
|
9
|
+
max-width: $spacing * 2.5;
|
|
10
|
+
width: $spacing * 2.5;
|
|
11
|
+
height: $spacing * 2.5;
|
|
12
12
|
margin-right: .5 * $spacing;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -21,7 +21,7 @@ header {
|
|
|
21
21
|
&::after {
|
|
22
22
|
position: absolute;
|
|
23
23
|
content:"";
|
|
24
|
-
border-right: solid 1px $color4;
|
|
24
|
+
border-right: solid get-ratio(1px) $color4;
|
|
25
25
|
height: 75%;
|
|
26
26
|
transform: translateY(-50%);
|
|
27
27
|
top: 50%;
|
package/components/_link.scss
CHANGED
|
@@ -16,17 +16,17 @@
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
.vel-link--default {
|
|
19
|
-
font-size:
|
|
19
|
+
font-size: get-ratio(16px);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
.vel-link--large {
|
|
23
|
-
font-size:
|
|
23
|
+
font-size: get-ratio(18px);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.vel-link--small {
|
|
27
|
-
font-size:
|
|
27
|
+
font-size: get-ratio(14px);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.vel-link--xsmall {
|
|
31
|
-
font-size:
|
|
31
|
+
font-size: get-ratio(12px);
|
|
32
32
|
}
|
|
@@ -8,24 +8,24 @@ ul.el-menu--vertical {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
a {
|
|
11
|
-
padding: 1.
|
|
11
|
+
padding: 1.5* $spacing 2.5 $spacing;
|
|
12
12
|
height: 100%;
|
|
13
13
|
width: 100%;
|
|
14
|
-
border-left: solid .
|
|
14
|
+
border-left: solid .5 * $spacing $color8;
|
|
15
15
|
box-sizing: border-box;
|
|
16
16
|
display: flex;
|
|
17
17
|
align-items: center;
|
|
18
18
|
overflow: hidden;
|
|
19
|
-
font-size:
|
|
19
|
+
font-size: get-ratio(18px);
|
|
20
20
|
|
|
21
21
|
&.active{
|
|
22
22
|
border-left-color: $color1;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.icon {
|
|
26
|
-
width:
|
|
27
|
-
max-width:
|
|
28
|
-
min-width:
|
|
26
|
+
width: 2.5 * $spacing;
|
|
27
|
+
max-width: 2.5 * $spacing;
|
|
28
|
+
min-width: 2.5 * $spacing;
|
|
29
29
|
padding-bottom: 0px;
|
|
30
30
|
* {
|
|
31
31
|
vertical-align: middle;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
.page-title {
|
|
2
|
-
padding: 2.
|
|
2
|
+
padding: 2.5 * $spacing 3 * $spacing;
|
|
3
3
|
background-color: $color0;
|
|
4
|
-
border-bottom:
|
|
4
|
+
border-bottom: .5 * $spacing solid;
|
|
5
5
|
border-image: linear-gradient(90deg, #FF558F 0%, #856DF6 100%) 1;
|
|
6
|
-
box-shadow:
|
|
7
|
-
|
|
8
|
-
margin-bottom: 2.2rem;
|
|
6
|
+
box-shadow: .5 * $spacing .5 * $spacing $spacing 0px #00000040;
|
|
7
|
+
margin-bottom: 2.5 * $spacing;
|
|
9
8
|
}
|
package/components/_sidebar.scss
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
.side-bar {
|
|
2
|
-
flex-basis:
|
|
2
|
+
flex-basis: $spacing * 7.5;
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
5
|
-
box-shadow: 0px
|
|
5
|
+
box-shadow: 0px $spacing * .5 $spacing * .5 0px hsla(0, 0%, 0%, 0.251);
|
|
6
6
|
min-height: 94.5vh;
|
|
7
7
|
max-height: 100vh;
|
|
8
8
|
overflow: hidden;
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
&.active {
|
|
25
|
-
flex-basis:
|
|
25
|
+
flex-basis: 31.5 * $spacing;
|
|
26
26
|
|
|
27
27
|
.side-bar__button {
|
|
28
28
|
transform: rotateY(180deg);
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
border: none;
|
|
37
37
|
cursor: pointer;
|
|
38
38
|
.icon {
|
|
39
|
-
width:
|
|
40
|
-
min-width:
|
|
41
|
-
padding-bottom:
|
|
39
|
+
width: 2.5 * $spacing;
|
|
40
|
+
min-width: 2.5 * $spacing;
|
|
41
|
+
padding-bottom: 2.5 * $spacing;
|
|
42
42
|
fill: currentColor;
|
|
43
43
|
}
|
|
44
44
|
&:focus {
|
|
@@ -83,32 +83,32 @@
|
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
h1,.h1 {
|
|
86
|
-
font-size:
|
|
87
|
-
line-height:
|
|
86
|
+
font-size: get-ratio(48px);
|
|
87
|
+
line-height: get-ratio(56px);
|
|
88
88
|
font-family: $secondaryFont;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
h2, .h2 {
|
|
92
|
-
font-size:
|
|
93
|
-
line-height:
|
|
92
|
+
font-size: get-ratio(36px);
|
|
93
|
+
line-height: get-ratio(48px);
|
|
94
94
|
font-family : $primaryFont;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
h3, .h3 {
|
|
98
|
-
font-size:
|
|
99
|
-
line-height:
|
|
98
|
+
font-size: get-ratio(32px);
|
|
99
|
+
line-height: get-ratio(42px);
|
|
100
100
|
font-family : $primaryFont;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
h4, .h4 {
|
|
104
|
-
font-size:
|
|
105
|
-
line-height:
|
|
104
|
+
font-size: get-ratio(24px);
|
|
105
|
+
line-height: get-ratio(32px);
|
|
106
106
|
font-family : $primaryFont;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
h5, .h5 {
|
|
110
|
-
font-size:
|
|
111
|
-
line-height:
|
|
110
|
+
font-size: get-ratio(20px);
|
|
111
|
+
line-height: get-ratio(24px);
|
|
112
112
|
font-weight: 700;
|
|
113
113
|
font-family : $primaryFont;
|
|
114
114
|
}
|
|
@@ -119,21 +119,21 @@ h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5 {
|
|
|
119
119
|
|
|
120
120
|
// may be project specific
|
|
121
121
|
.text-10 {
|
|
122
|
-
font-size: 10px;
|
|
123
|
-
line-height:
|
|
122
|
+
font-size: get-ratio(10px);
|
|
123
|
+
line-height: get-ratio(16px);
|
|
124
124
|
}
|
|
125
125
|
.text-12 {
|
|
126
|
-
font-size: 12px;
|
|
127
|
-
line-height: 18px;
|
|
126
|
+
font-size: get-ratio(12px);
|
|
127
|
+
line-height: get-ratio(18px);
|
|
128
128
|
}
|
|
129
129
|
.text-14 {
|
|
130
|
-
font-size: 14px;
|
|
131
|
-
line-height:
|
|
130
|
+
font-size: get-ratio(14px);
|
|
131
|
+
line-height: get-ratio(20px);
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
.text-60 {
|
|
135
|
-
font-size:
|
|
136
|
-
line-height:
|
|
135
|
+
font-size: get-ratio(60px);
|
|
136
|
+
line-height: get-ratio(68px);
|
|
137
137
|
font-weight: 500;
|
|
138
138
|
font-family : $primaryFont;
|
|
139
139
|
}
|
package/form/input.vue
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
|
|
10
10
|
<slot />
|
|
11
11
|
|
|
12
|
-
<div v-if="
|
|
13
|
-
<small v-
|
|
12
|
+
<div v-if="hasError(name)" class="form__error" :class="{ [baseClass + '__error']: baseClass }">
|
|
13
|
+
<small v-html="first(name)" />
|
|
14
14
|
</div>
|
|
15
15
|
</div>
|
|
16
16
|
</template>
|
|
@@ -47,5 +47,35 @@ export default {
|
|
|
47
47
|
default: "text",
|
|
48
48
|
},
|
|
49
49
|
},
|
|
50
|
+
|
|
51
|
+
methods: {
|
|
52
|
+
hasError(field) {
|
|
53
|
+
if(!this.$props?.error?.errors) {
|
|
54
|
+
if(typeof this.$props?.error === 'string') {
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
let hasError = this.$props.error.errors.hasOwnProperty(field);
|
|
60
|
+
|
|
61
|
+
if (!hasError) {
|
|
62
|
+
const errors = Object.keys(this.$props.error.errors).filter(
|
|
63
|
+
e => e.startsWith(`${field}.`) || e.startsWith(`${field}[`)
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
hasError = errors.length > 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return hasError;
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
first(field) {
|
|
73
|
+
return this.get(field)[0];
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
get(field) {
|
|
77
|
+
return this.$props.error?.errors?.[field] || ( typeof this.$props.error === 'string' ? [this.$props.error] : []);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
50
80
|
};
|
|
51
81
|
</script>
|