@foris/avocado-core 0.0.1-beta.0

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.
@@ -0,0 +1 @@
1
+
@@ -0,0 +1 @@
1
+ (function(n){typeof define=="function"&&define.amd?define(n):n()})(function(){"use strict";const n=""});
@@ -0,0 +1 @@
1
+ export * from './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,183 @@
1
+ // This grid use CSS Flexbox. To transform this grid in css use https://www.sassmeister.com/ <3
2
+ @use './variables' as *;
3
+ @use 'sass:math';
4
+
5
+ // Quantity columns
6
+ $gridColumns: 12;
7
+
8
+ // Breakpoints prefix
9
+ $breakpointsPrefix: (
10
+ full: '',
11
+ md: '_md',
12
+ );
13
+
14
+ // Max width of content
15
+ $maxWidth: 1440px;
16
+
17
+ // Values for justify-content
18
+ $justifyContent: (
19
+ around: space-around,
20
+ between: space-between,
21
+ center: center,
22
+ end: flex-end,
23
+ start: flex-start,
24
+ );
25
+
26
+ // Values for align-items and align-self
27
+ $alignItems: (
28
+ baseline: baseline,
29
+ center: center,
30
+ end: flex-end,
31
+ start: flex-start,
32
+ stretch: stretch,
33
+ );
34
+
35
+ // Values for spacing
36
+ $spacing: (
37
+ full: 24px,
38
+ md: 16px,
39
+ );
40
+
41
+ // Calculates width column
42
+ @function calculateWidth($columnNumber) {
43
+ @return unquote(math.div(100, $gridColumns) * $columnNumber + '%');
44
+ }
45
+
46
+ // Generate responsive spacing
47
+ @mixin responsiveSpacing($colPrefix) {
48
+ @if $colPrefix == map-get($breakpointsPrefix, full) {
49
+ margin-left: -#{map-get($spacing, full)};
50
+ width: calc(100% + #{map-get($spacing, full)});
51
+ padding: 0 map-get($spacing, full);
52
+ } @else if $colPrefix == map-get($breakpointsPrefix, md) {
53
+ margin-left: -#{map-get($spacing, md)};
54
+ width: calc(100% + #{map-get($spacing, md)});
55
+ padding: 0 map-get($spacing, md);
56
+ }
57
+ > [class*='col_'] {
58
+ @if $colPrefix == map-get($breakpointsPrefix, full) {
59
+ padding-top: map-get($spacing, full);
60
+ padding-left: map-get($spacing, full);
61
+ } @else if $colPrefix == map-get($breakpointsPrefix, md) {
62
+ padding-top: map-get($spacing, md);
63
+ padding-left: map-get($spacing, md);
64
+ }
65
+ }
66
+ }
67
+
68
+ // Generate offset by margin-left
69
+ @mixin generateOffset($columnNumber) {
70
+ @if $columnNumber == $gridColumns {
71
+ margin-left: 100%;
72
+ } @else if $columnNumber != $gridColumns and $columnNumber != 0 {
73
+ // For sassmeister.com you can use this line:
74
+ // margin-left: (100 / ($gridColumns / $columnNumber)) * 1%;
75
+ margin-left: math.div(100, math.div($gridColumns, $columnNumber)) * 1%;
76
+ } @else if $columnNumber == 0 {
77
+ margin-left: 0;
78
+ }
79
+ }
80
+
81
+ // Generate classes for each breakpoints
82
+ @mixin contentFlexboxGrid($colPrefix) {
83
+ width: 100%;
84
+ display: flex;
85
+ flex-wrap: wrap;
86
+ box-sizing: border-box;
87
+
88
+ // Classes next to container_row. Example:
89
+ // <div class="container_row row__between" />
90
+ @each $key, $value in $justifyContent {
91
+ &.row#{$colPrefix}__#{$key} {
92
+ justify-content: $value;
93
+ }
94
+ }
95
+
96
+ // <div class="container_row row_align__center" />
97
+ @each $key, $value in $alignItems {
98
+ &.row_align#{$colPrefix}__#{$key} {
99
+ align-items: $value;
100
+ }
101
+ }
102
+
103
+ // <div class="container_row rowWrap" />
104
+ &.row_wrap#{$colPrefix} {
105
+ flex-wrap: wrap;
106
+ }
107
+
108
+ // <div class="container_row rowNoWrap" />
109
+ &.row_noWrap#{$colPrefix} {
110
+ flex-wrap: nowrap;
111
+ }
112
+
113
+ // <div class="container_row rowBlock" />
114
+ // This stop flex properties and keep the width of the columns
115
+ &.row_block#{$colPrefix} {
116
+ display: block;
117
+ }
118
+
119
+ // To add spacing between columns
120
+ // <div class="container_row rowSpacing" />
121
+ &.row_spacing {
122
+ @include responsiveSpacing($colPrefix);
123
+ }
124
+
125
+ // Classes under container_row. Example:
126
+ // <div class="container_row" >
127
+ // <div class="col_6 col_md_12" />
128
+ @for $i from 1 through $gridColumns {
129
+ .col#{$colPrefix}_#{$i} {
130
+ flex: 0 0 calculateWidth($i);
131
+ max-width: calculateWidth($i);
132
+ }
133
+ }
134
+
135
+ // <div class="container_row" >
136
+ // <div class="col_offset_4" />
137
+ @for $i from 1 through $gridColumns {
138
+ .col_offset#{$colPrefix}_#{$i} {
139
+ @include generateOffset($i);
140
+ }
141
+ }
142
+
143
+ // <div class="container_row" >
144
+ // <div class="col_align__center" />
145
+ @each $key, $value in $alignItems {
146
+ .col_align#{$colPrefix}__#{$key} {
147
+ align-self: $value;
148
+ }
149
+ }
150
+
151
+ // <div class="container_row" >
152
+ // <div class="col_hidden" />
153
+ .col_hidden#{$colPrefix} {
154
+ display: none;
155
+ }
156
+
157
+ // <div class="container_row" >
158
+ // <div class="col_show" />
159
+ .col_show#{$colPrefix} {
160
+ display: flex;
161
+ }
162
+ }
163
+
164
+ // Generate all classes for container_row
165
+ @mixin respond-to($media) {
166
+ @if $media == full {
167
+ @include contentFlexboxGrid(map-get($breakpointsPrefix, full));
168
+ } @else if $media == md {
169
+ @media (max-width: map-get($breakpoints, md )) {
170
+ @include contentFlexboxGrid(map-get($breakpointsPrefix, md));
171
+ }
172
+ }
173
+ }
174
+
175
+ // Main classes of grid: container and container_row
176
+ .container {
177
+ margin: 0 auto;
178
+ max-width: $maxWidth;
179
+ &_row {
180
+ @include respond-to(full);
181
+ @include respond-to(md);
182
+ }
183
+ }
@@ -0,0 +1,34 @@
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
+ font-family: $font-stack;
11
+ font-size: map-get($sizeText, $size);
12
+ color: map-get($colors, $color);
13
+ font-weight: map-get($fonts, #{$weight});
14
+ }
15
+
16
+ @mixin box($bg, $radius, $border: none) {
17
+ @if ($bg == transparent) {
18
+ background: $bg;
19
+ } @else {
20
+ background: map-get($colors, $bg);
21
+ }
22
+ @if ($border == 'none') {
23
+ border: $border;
24
+ } @else if ($border != 'none') {
25
+ border: map-get($borders, md) solid map-get($colors, $border);
26
+ }
27
+ border-radius: $radius;
28
+ }
29
+
30
+ @mixin focusBorder() {
31
+ outline: none;
32
+ box-shadow: 0 0 0 3px map-get($colors, foris-white),
33
+ 0 0 0 5px map-get($colors, darwined-blue-30);
34
+ }