@foris/avocado-core 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core.es.js +1 -0
- package/dist/core.umd.js +1 -0
- package/dist/fonts/Roboto/Roboto-Bold.ttf +0 -0
- package/dist/fonts/Roboto/Roboto-Medium.ttf +0 -0
- package/dist/fonts/Roboto/Roboto-Regular.ttf +0 -0
- package/dist/index.d.ts +1 -0
- package/dist/scss/_animation.scss +14 -0
- package/dist/scss/_fonts.scss +26 -0
- package/dist/scss/_grid.scss +181 -0
- package/dist/scss/_mixin.scss +70 -0
- package/dist/scss/_normalize.scss +488 -0
- package/dist/scss/_themes.scss +276 -0
- package/dist/scss/_variables.scss +193 -0
- package/dist/scss/avocado.scss +7 -0
- package/dist/style.css +1 -0
- package/package.json +1 -1
package/dist/core.es.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/dist/core.umd.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(n){typeof define=="function"&&define.amd?define(n):n()})(function(){"use strict"});
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/index.js'
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/* roboto-regular */
|
|
2
|
+
@font-face {
|
|
3
|
+
font-family: 'Roboto';
|
|
4
|
+
font-style: normal;
|
|
5
|
+
font-weight: 400;
|
|
6
|
+
src: local('Roboto'), local('Roboto-Regular'),
|
|
7
|
+
url('../fonts/Roboto/Roboto-Regular.ttf') format('truetype');
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/* roboto-500 */
|
|
11
|
+
@font-face {
|
|
12
|
+
font-family: 'Roboto';
|
|
13
|
+
font-style: normal;
|
|
14
|
+
font-weight: 500;
|
|
15
|
+
src: local('Roboto Medium'), local('Roboto-Medium'),
|
|
16
|
+
url('../fonts/Roboto/Roboto-Medium.ttf') format('truetype');
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* roboto-700 */
|
|
20
|
+
@font-face {
|
|
21
|
+
font-family: 'Roboto';
|
|
22
|
+
font-style: normal;
|
|
23
|
+
font-weight: 700;
|
|
24
|
+
src: local('Roboto Bold'), local('Roboto-Bold'),
|
|
25
|
+
url('../fonts/Roboto/Roboto-Bold.ttf') format('truetype');
|
|
26
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
// This grid use CSS Flexbox. To transform this grid in css use https://www.sassmeister.com/ <3
|
|
2
|
+
@import './variables';
|
|
3
|
+
|
|
4
|
+
// Quantity columns
|
|
5
|
+
$gridColumns: 12;
|
|
6
|
+
|
|
7
|
+
// Breakpoints prefix
|
|
8
|
+
$breakpointsPrefix: (
|
|
9
|
+
full: '',
|
|
10
|
+
md: '_md',
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
// Max width of content
|
|
14
|
+
$maxWidth: 1440px;
|
|
15
|
+
|
|
16
|
+
// Values for justify-content
|
|
17
|
+
$justifyContent: (
|
|
18
|
+
around: space-around,
|
|
19
|
+
between: space-between,
|
|
20
|
+
center: center,
|
|
21
|
+
end: flex-end,
|
|
22
|
+
start: flex-start,
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
// Values for align-items and align-self
|
|
26
|
+
$alignItems: (
|
|
27
|
+
baseline: baseline,
|
|
28
|
+
center: center,
|
|
29
|
+
end: flex-end,
|
|
30
|
+
start: flex-start,
|
|
31
|
+
stretch: stretch,
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
// Values for spacing
|
|
35
|
+
$gridSpacing: (
|
|
36
|
+
full: 24px,
|
|
37
|
+
md: 16px,
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
// Calculates width column
|
|
41
|
+
@function calculateWidth($columnNumber) {
|
|
42
|
+
@return unquote((100 / $gridColumns) * $columnNumber + '%');
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Generate responsive spacing
|
|
46
|
+
@mixin responsiveSpacing($colPrefix) {
|
|
47
|
+
@if $colPrefix == map-get($breakpointsPrefix, full) {
|
|
48
|
+
margin-left: -#{map-get($gridSpacing, full)};
|
|
49
|
+
width: calc(100% + #{map-get($gridSpacing, full)});
|
|
50
|
+
padding: 0 map-get($gridSpacing, full);
|
|
51
|
+
} @else if $colPrefix == map-get($breakpointsPrefix, md) {
|
|
52
|
+
margin-left: -#{map-get($gridSpacing, md)};
|
|
53
|
+
width: calc(100% + #{map-get($gridSpacing, md)});
|
|
54
|
+
padding: 0 map-get($gridSpacing, md);
|
|
55
|
+
}
|
|
56
|
+
> [class*='col_'] {
|
|
57
|
+
@if $colPrefix == map-get($breakpointsPrefix, full) {
|
|
58
|
+
padding-top: map-get($gridSpacing, full);
|
|
59
|
+
padding-left: map-get($gridSpacing, full);
|
|
60
|
+
} @else if $colPrefix == map-get($breakpointsPrefix, md) {
|
|
61
|
+
padding-top: map-get($gridSpacing, md);
|
|
62
|
+
padding-left: map-get($gridSpacing, md);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Generate offset by margin-left
|
|
68
|
+
@mixin generateOffset($columnNumber) {
|
|
69
|
+
@if $columnNumber == $gridColumns {
|
|
70
|
+
margin-left: 100%;
|
|
71
|
+
} @else if $columnNumber != $gridColumns and $columnNumber != 0 {
|
|
72
|
+
margin-left: (100 / ($gridColumns / $columnNumber)) * 1%;
|
|
73
|
+
} @else if $columnNumber == 0 {
|
|
74
|
+
margin-left: 0;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Generate classes for each breakpoints
|
|
79
|
+
@mixin contentFlexboxGrid($colPrefix) {
|
|
80
|
+
width: 100%;
|
|
81
|
+
display: flex;
|
|
82
|
+
flex-wrap: wrap;
|
|
83
|
+
box-sizing: border-box;
|
|
84
|
+
|
|
85
|
+
// Classes next to container_row. Example:
|
|
86
|
+
// <div class="container_row row__between" />
|
|
87
|
+
@each $key, $value in $justifyContent {
|
|
88
|
+
&.row#{$colPrefix}__#{$key} {
|
|
89
|
+
justify-content: $value;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// <div class="container_row row_align__center" />
|
|
94
|
+
@each $key, $value in $alignItems {
|
|
95
|
+
&.row_align#{$colPrefix}__#{$key} {
|
|
96
|
+
align-items: $value;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// <div class="container_row rowWrap" />
|
|
101
|
+
&.row_wrap#{$colPrefix} {
|
|
102
|
+
flex-wrap: wrap;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// <div class="container_row rowNoWrap" />
|
|
106
|
+
&.row_noWrap#{$colPrefix} {
|
|
107
|
+
flex-wrap: nowrap;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// <div class="container_row rowBlock" />
|
|
111
|
+
// This stop flex properties and keep the width of the columns
|
|
112
|
+
&.row_block#{$colPrefix} {
|
|
113
|
+
display: block;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// To add spacing between columns
|
|
117
|
+
// <div class="container_row rowSpacing" />
|
|
118
|
+
&.row_spacing {
|
|
119
|
+
@include responsiveSpacing($colPrefix);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Classes under container_row. Example:
|
|
123
|
+
// <div class="container_row" >
|
|
124
|
+
// <div class="col_6 col_md_12" />
|
|
125
|
+
@for $i from 1 through $gridColumns {
|
|
126
|
+
.col#{$colPrefix}_#{$i} {
|
|
127
|
+
flex: 0 0 calculateWidth($i);
|
|
128
|
+
max-width: calculateWidth($i);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// <div class="container_row" >
|
|
133
|
+
// <div class="col_offset_4" />
|
|
134
|
+
@for $i from 1 through $gridColumns {
|
|
135
|
+
.col_offset#{$colPrefix}_#{$i} {
|
|
136
|
+
@include generateOffset($i);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// <div class="container_row" >
|
|
141
|
+
// <div class="col_align__center" />
|
|
142
|
+
@each $key, $value in $alignItems {
|
|
143
|
+
.col_align#{$colPrefix}__#{$key} {
|
|
144
|
+
align-self: $value;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// <div class="container_row" >
|
|
149
|
+
// <div class="col_hidden" />
|
|
150
|
+
.col_hidden#{$colPrefix} {
|
|
151
|
+
display: none;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// <div class="container_row" >
|
|
155
|
+
// <div class="col_show" />
|
|
156
|
+
.col_show#{$colPrefix} {
|
|
157
|
+
display: flex;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// Generate all classes for container_row
|
|
162
|
+
@mixin respond-to($media) {
|
|
163
|
+
@if $media == full {
|
|
164
|
+
@include contentFlexboxGrid(map-get($breakpointsPrefix, full));
|
|
165
|
+
} @else if $media == md {
|
|
166
|
+
@media (max-width: map-get($breakpoints, md )) {
|
|
167
|
+
@include contentFlexboxGrid(map-get($breakpointsPrefix, md));
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// Main classes of grid: container and container_row
|
|
173
|
+
.container {
|
|
174
|
+
margin: 0 auto;
|
|
175
|
+
max-width: $maxWidth;
|
|
176
|
+
width: 100%;
|
|
177
|
+
&_row {
|
|
178
|
+
@include respond-to(full);
|
|
179
|
+
@include respond-to(md);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
@use './variables' as *;
|
|
2
|
+
|
|
3
|
+
@mixin flex($justify, $align: flex-start) {
|
|
4
|
+
display: flex;
|
|
5
|
+
justify-content: $justify;
|
|
6
|
+
align-items: #{$align};
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@mixin text($size, $color, $weight: regular) {
|
|
10
|
+
@warn "This text mixin is deprecated!";
|
|
11
|
+
font-family: $font-stack;
|
|
12
|
+
font-size: map-get($sizeText, $size);
|
|
13
|
+
color: map-get($colors, $color);
|
|
14
|
+
font-weight: map-get($fonts, #{$weight});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@mixin box($bg, $radius, $border: none) {
|
|
18
|
+
@warn "This box mixin is deprecated!";
|
|
19
|
+
@if ($bg == transparent) {
|
|
20
|
+
background: $bg;
|
|
21
|
+
} @else {
|
|
22
|
+
background: map-get($colors, $bg);
|
|
23
|
+
}
|
|
24
|
+
@if ($border == 'none') {
|
|
25
|
+
border: $border;
|
|
26
|
+
} @else if ($border != 'none') {
|
|
27
|
+
border: map-get($borders, md) solid map-get($colors, $border);
|
|
28
|
+
}
|
|
29
|
+
border-radius: $radius;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@mixin focusBorder() {
|
|
33
|
+
outline: none;
|
|
34
|
+
box-shadow: 0 0 0 3px map-get($colors, foris-white),
|
|
35
|
+
0 0 0 5px map-get($colors, darwined-blue-30);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Mixins using css vars
|
|
39
|
+
@mixin box-style($bg, $radius, $border: none) {
|
|
40
|
+
@if ($bg == transparent) {
|
|
41
|
+
background-color: transparent;
|
|
42
|
+
} @else {
|
|
43
|
+
background-color: var(--color-#{$bg});
|
|
44
|
+
}
|
|
45
|
+
@if ($border == 'none') {
|
|
46
|
+
border: $border;
|
|
47
|
+
} @else if ($border != 'none') {
|
|
48
|
+
border: 1px solid var(--color-#{$border});
|
|
49
|
+
}
|
|
50
|
+
border-radius: $radius;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@mixin font-style($size, $color, $weight: regular) {
|
|
54
|
+
font-family: $font-stack;
|
|
55
|
+
font-size: map-get($sizeText, $size);
|
|
56
|
+
color: var(--color-#{$color});
|
|
57
|
+
font-weight: map-get($fonts, #{$weight});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@mixin focus-style($theme: '') {
|
|
61
|
+
border-radius: 8px;
|
|
62
|
+
outline: none;
|
|
63
|
+
|
|
64
|
+
@if $theme == 'dark' {
|
|
65
|
+
box-shadow: 0 0 0 3px var(--color-gray-90), 0 0 0 5px var(--color-info-30);
|
|
66
|
+
} @else {
|
|
67
|
+
box-shadow: 0 0 0 3px var(--color-neutral-00),
|
|
68
|
+
0 0 0 5px var(--color-info-30);
|
|
69
|
+
}
|
|
70
|
+
}
|