react-responsive-tools 2.1.3 → 2.1.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-responsive-tools",
3
- "version": "2.1.3",
3
+ "version": "2.1.5",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -11,19 +11,35 @@ const __dirname = path.dirname(__filename);
11
11
  // Функция генерации SCSS содержимого для горизонтальных брейкпоинтов
12
12
  const generateHorizontalSCSS = (breakpoints) => {
13
13
  const beforeMixins = Object.keys(breakpoints).map(bp => `
14
- // ${bp} - ${breakpoints[bp]}
15
- @mixin for-${bp}(){
16
- @include mob-first(${bp}){
14
+ /**
15
+ * @mixin for-${bp}
16
+ * @description Mixin for applying styles for screens greater than or equal to ${breakpoints[bp]}px.
17
+ * @example
18
+ * @include for-${bp} {
19
+ * // your styles here
20
+ * }
21
+ */
22
+ @mixin for-${bp}() {
23
+ @include mob-first(${bp}) {
17
24
  @content;
18
25
  }
19
26
  }`).join('\n');
27
+
20
28
  const afterMixins = Object.keys(breakpoints).map(bp => `
21
- // ${bp} - ${breakpoints[bp]}
22
- @mixin before-${bp}(){
23
- @include desk-first(${bp}){
29
+ /**
30
+ * @mixin before-${bp}
31
+ * @description Mixin for applying styles for screens less than ${breakpoints[bp]}px.
32
+ * @example
33
+ * @include before-${bp} {
34
+ * // your styles here
35
+ * }
36
+ */
37
+ @mixin before-${bp}() {
38
+ @include desk-first(${bp}) {
24
39
  @content;
25
40
  }
26
41
  }`).join('\n');
42
+
27
43
  return `
28
44
  @import "horizontal";
29
45
 
@@ -36,19 +52,35 @@ ${afterMixins}
36
52
  // Функция генерации SCSS содержимого для вертикальных брейкпоинтов
37
53
  const generateVerticalSCSS = (breakpoints) => {
38
54
  const beforeMixins = Object.keys(breakpoints).map(bp => `
39
- // ${bp} - ${breakpoints[bp]}
40
- @mixin v-for-${bp}(){
41
- @include v-mob-first(${bp}){
55
+ /**
56
+ * @mixin v-for-${bp}
57
+ * @description Mixin for applying styles for screens with height greater than or equal to ${breakpoints[bp]}px.
58
+ * @example
59
+ * @include v-for-${bp} {
60
+ * // your styles here
61
+ * }
62
+ */
63
+ @mixin v-for-${bp}() {
64
+ @include v-mob-first(${bp}) {
42
65
  @content;
43
66
  }
44
67
  }`).join('\n');
68
+
45
69
  const afterMixins = Object.keys(breakpoints).map(bp => `
46
- // ${bp} - ${breakpoints[bp]}
47
- @mixin v-before-${bp}(){
48
- @include v-desk-first(${bp}){
70
+ /**
71
+ * @mixin v-before-${bp}
72
+ * @description Mixin for applying styles for screens with height less than ${breakpoints[bp]}px.
73
+ * @example
74
+ * @include v-before-${bp} {
75
+ * // your styles here
76
+ * }
77
+ */
78
+ @mixin v-before-${bp}() {
79
+ @include v-desk-first(${bp}) {
49
80
  @content;
50
81
  }
51
82
  }`).join('\n');
83
+
52
84
  return `
53
85
  @import "vertical";
54
86
 
@@ -2,143 +2,284 @@
2
2
  @import "horizontal";
3
3
 
4
4
 
5
- // xs - 320px
6
- @mixin for-xs(){
7
- @include mob-first(xs){
5
+ /**
6
+ * @mixin for-xs
7
+ * @description Mixin for applying styles for screens greater than or equal to 320pxpx.
8
+ * @example
9
+ * @include for-xs {
10
+ * // your styles here
11
+ * }
12
+ */
13
+ @mixin for-xs() {
14
+ @include mob-first(xs) {
8
15
  @content;
9
16
  }
10
17
  }
11
18
 
12
- // sm - 576px
13
- @mixin for-sm(){
14
- @include mob-first(sm){
19
+
20
+ /**
21
+ * @mixin for-sm
22
+ * @description Mixin for applying styles for screens greater than or equal to 576pxpx.
23
+ * @example
24
+ * @include for-sm {
25
+ * // your styles here
26
+ * }
27
+ */
28
+ @mixin for-sm() {
29
+ @include mob-first(sm) {
15
30
  @content;
16
31
  }
17
32
  }
18
33
 
19
- // md - 768px
20
- @mixin for-md(){
21
- @include mob-first(md){
34
+ /**
35
+ * @mixin for-md
36
+ * @description Mixin for applying styles for screens greater than or equal to 768pxpx.
37
+ * @example
38
+ * @include for-md {
39
+ * // your styles here
40
+ * }
41
+ */
42
+ @mixin for-md() {
43
+ @include mob-first(md) {
22
44
  @content;
23
45
  }
24
46
  }
25
47
 
26
- // lg - 992px
27
- @mixin for-lg(){
28
- @include mob-first(lg){
48
+ /**
49
+ * @mixin for-lg
50
+ * @description Mixin for applying styles for screens greater than or equal to 992pxpx.
51
+ * @example
52
+ * @include for-lg {
53
+ * // your styles here
54
+ * }
55
+ */
56
+ @mixin for-lg() {
57
+ @include mob-first(lg) {
29
58
  @content;
30
59
  }
31
60
  }
32
61
 
33
- // lt - 1024px
34
- @mixin for-lt(){
35
- @include mob-first(lt){
62
+ /**
63
+ * @mixin for-lt
64
+ * @description Mixin for applying styles for screens greater than or equal to 1024pxpx.
65
+ * @example
66
+ * @include for-lt {
67
+ * // your styles here
68
+ * }
69
+ */
70
+ @mixin for-lt() {
71
+ @include mob-first(lt) {
36
72
  @content;
37
73
  }
38
74
  }
39
75
 
40
- // ltm - 1200px
41
- @mixin for-ltm(){
42
- @include mob-first(ltm){
76
+ /**
77
+ * @mixin for-ltm
78
+ * @description Mixin for applying styles for screens greater than or equal to 1200pxpx.
79
+ * @example
80
+ * @include for-ltm {
81
+ * // your styles here
82
+ * }
83
+ */
84
+ @mixin for-ltm() {
85
+ @include mob-first(ltm) {
43
86
  @content;
44
87
  }
45
88
  }
46
89
 
47
- // ltl - 1440px
48
- @mixin for-ltl(){
49
- @include mob-first(ltl){
90
+ /**
91
+ * @mixin for-ltl
92
+ * @description Mixin for applying styles for screens greater than or equal to 1440pxpx.
93
+ * @example
94
+ * @include for-ltl {
95
+ * // your styles here
96
+ * }
97
+ */
98
+ @mixin for-ltl() {
99
+ @include mob-first(ltl) {
50
100
  @content;
51
101
  }
52
102
  }
53
103
 
54
- // xl - 1920px
55
- @mixin for-xl(){
56
- @include mob-first(xl){
104
+ /**
105
+ * @mixin for-xl
106
+ * @description Mixin for applying styles for screens greater than or equal to 1920pxpx.
107
+ * @example
108
+ * @include for-xl {
109
+ * // your styles here
110
+ * }
111
+ */
112
+ @mixin for-xl() {
113
+ @include mob-first(xl) {
57
114
  @content;
58
115
  }
59
116
  }
60
117
 
61
- // xxl - 2560px
62
- @mixin for-xxl(){
63
- @include mob-first(xxl){
118
+ /**
119
+ * @mixin for-xxl
120
+ * @description Mixin for applying styles for screens greater than or equal to 2560pxpx.
121
+ * @example
122
+ * @include for-xxl {
123
+ * // your styles here
124
+ * }
125
+ */
126
+ @mixin for-xxl() {
127
+ @include mob-first(xxl) {
64
128
  @content;
65
129
  }
66
130
  }
67
131
 
68
- // qxl - 3840px
69
- @mixin for-qxl(){
70
- @include mob-first(qxl){
132
+ /**
133
+ * @mixin for-qxl
134
+ * @description Mixin for applying styles for screens greater than or equal to 3840pxpx.
135
+ * @example
136
+ * @include for-qxl {
137
+ * // your styles here
138
+ * }
139
+ */
140
+ @mixin for-qxl() {
141
+ @include mob-first(qxl) {
71
142
  @content;
72
143
  }
73
144
  }
74
145
 
75
146
 
76
- // xs - 320px
77
- @mixin before-xs(){
78
- @include desk-first(xs){
147
+ /**
148
+ * @mixin before-xs
149
+ * @description Mixin for applying styles for screens less than 320pxpx.
150
+ * @example
151
+ * @include before-xs {
152
+ * // your styles here
153
+ * }
154
+ */
155
+ @mixin before-xs() {
156
+ @include desk-first(xs) {
79
157
  @content;
80
158
  }
81
159
  }
82
160
 
83
- // sm - 576px
84
- @mixin before-sm(){
85
- @include desk-first(sm){
161
+ /**
162
+ * @mixin before-sm
163
+ * @description Mixin for applying styles for screens less than 576pxpx.
164
+ * @example
165
+ * @include before-sm {
166
+ * // your styles here
167
+ * }
168
+ */
169
+ @mixin before-sm() {
170
+ @include desk-first(sm) {
86
171
  @content;
87
172
  }
88
173
  }
89
174
 
90
- // md - 768px
91
- @mixin before-md(){
92
- @include desk-first(md){
175
+ /**
176
+ * @mixin before-md
177
+ * @description Mixin for applying styles for screens less than 768pxpx.
178
+ * @example
179
+ * @include before-md {
180
+ * // your styles here
181
+ * }
182
+ */
183
+ @mixin before-md() {
184
+ @include desk-first(md) {
93
185
  @content;
94
186
  }
95
187
  }
96
188
 
97
- // lg - 992px
98
- @mixin before-lg(){
99
- @include desk-first(lg){
189
+ /**
190
+ * @mixin before-lg
191
+ * @description Mixin for applying styles for screens less than 992pxpx.
192
+ * @example
193
+ * @include before-lg {
194
+ * // your styles here
195
+ * }
196
+ */
197
+ @mixin before-lg() {
198
+ @include desk-first(lg) {
100
199
  @content;
101
200
  }
102
201
  }
103
202
 
104
- // lt - 1024px
105
- @mixin before-lt(){
106
- @include desk-first(lt){
203
+ /**
204
+ * @mixin before-lt
205
+ * @description Mixin for applying styles for screens less than 1024pxpx.
206
+ * @example
207
+ * @include before-lt {
208
+ * // your styles here
209
+ * }
210
+ */
211
+ @mixin before-lt() {
212
+ @include desk-first(lt) {
107
213
  @content;
108
214
  }
109
215
  }
110
216
 
111
- // ltm - 1200px
112
- @mixin before-ltm(){
113
- @include desk-first(ltm){
217
+ /**
218
+ * @mixin before-ltm
219
+ * @description Mixin for applying styles for screens less than 1200pxpx.
220
+ * @example
221
+ * @include before-ltm {
222
+ * // your styles here
223
+ * }
224
+ */
225
+ @mixin before-ltm() {
226
+ @include desk-first(ltm) {
114
227
  @content;
115
228
  }
116
229
  }
117
230
 
118
- // ltl - 1440px
119
- @mixin before-ltl(){
120
- @include desk-first(ltl){
231
+ /**
232
+ * @mixin before-ltl
233
+ * @description Mixin for applying styles for screens less than 1440pxpx.
234
+ * @example
235
+ * @include before-ltl {
236
+ * // your styles here
237
+ * }
238
+ */
239
+ @mixin before-ltl() {
240
+ @include desk-first(ltl) {
121
241
  @content;
122
242
  }
123
243
  }
124
244
 
125
- // xl - 1920px
126
- @mixin before-xl(){
127
- @include desk-first(xl){
245
+ /**
246
+ * @mixin before-xl
247
+ * @description Mixin for applying styles for screens less than 1920pxpx.
248
+ * @example
249
+ * @include before-xl {
250
+ * // your styles here
251
+ * }
252
+ */
253
+ @mixin before-xl() {
254
+ @include desk-first(xl) {
128
255
  @content;
129
256
  }
130
257
  }
131
258
 
132
- // xxl - 2560px
133
- @mixin before-xxl(){
134
- @include desk-first(xxl){
259
+ /**
260
+ * @mixin before-xxl
261
+ * @description Mixin for applying styles for screens less than 2560pxpx.
262
+ * @example
263
+ * @include before-xxl {
264
+ * // your styles here
265
+ * }
266
+ */
267
+ @mixin before-xxl() {
268
+ @include desk-first(xxl) {
135
269
  @content;
136
270
  }
137
271
  }
138
272
 
139
- // qxl - 3840px
140
- @mixin before-qxl(){
141
- @include desk-first(qxl){
273
+ /**
274
+ * @mixin before-qxl
275
+ * @description Mixin for applying styles for screens less than 3840pxpx.
276
+ * @example
277
+ * @include before-qxl {
278
+ * // your styles here
279
+ * }
280
+ */
281
+ @mixin before-qxl() {
282
+ @include desk-first(qxl) {
142
283
  @content;
143
284
  }
144
285
  }
@@ -2,87 +2,171 @@
2
2
  @import "vertical";
3
3
 
4
4
 
5
- // xs - 600px
6
- @mixin v-for-xs(){
7
- @include v-mob-first(xs){
5
+ /**
6
+ * @mixin v-for-xs
7
+ * @description Mixin for applying styles for screens with height greater than or equal to 600pxpx.
8
+ * @example
9
+ * @include v-for-xs {
10
+ * // your styles here
11
+ * }
12
+ */
13
+ @mixin v-for-xs() {
14
+ @include v-mob-first(xs) {
8
15
  @content;
9
16
  }
10
17
  }
11
18
 
12
- // sm - 800px
13
- @mixin v-for-sm(){
14
- @include v-mob-first(sm){
19
+ /**
20
+ * @mixin v-for-sm
21
+ * @description Mixin for applying styles for screens with height greater than or equal to 800pxpx.
22
+ * @example
23
+ * @include v-for-sm {
24
+ * // your styles here
25
+ * }
26
+ */
27
+ @mixin v-for-sm() {
28
+ @include v-mob-first(sm) {
15
29
  @content;
16
30
  }
17
31
  }
18
32
 
19
- // md - 1000px
20
- @mixin v-for-md(){
21
- @include v-mob-first(md){
33
+ /**
34
+ * @mixin v-for-md
35
+ * @description Mixin for applying styles for screens with height greater than or equal to 1000pxpx.
36
+ * @example
37
+ * @include v-for-md {
38
+ * // your styles here
39
+ * }
40
+ */
41
+ @mixin v-for-md() {
42
+ @include v-mob-first(md) {
22
43
  @content;
23
44
  }
24
45
  }
25
46
 
26
- // lg - 1200px
27
- @mixin v-for-lg(){
28
- @include v-mob-first(lg){
47
+ /**
48
+ * @mixin v-for-lg
49
+ * @description Mixin for applying styles for screens with height greater than or equal to 1200pxpx.
50
+ * @example
51
+ * @include v-for-lg {
52
+ * // your styles here
53
+ * }
54
+ */
55
+ @mixin v-for-lg() {
56
+ @include v-mob-first(lg) {
29
57
  @content;
30
58
  }
31
59
  }
32
60
 
33
- // xl - 1600px
34
- @mixin v-for-xl(){
35
- @include v-mob-first(xl){
61
+ /**
62
+ * @mixin v-for-xl
63
+ * @description Mixin for applying styles for screens with height greater than or equal to 1600pxpx.
64
+ * @example
65
+ * @include v-for-xl {
66
+ * // your styles here
67
+ * }
68
+ */
69
+ @mixin v-for-xl() {
70
+ @include v-mob-first(xl) {
36
71
  @content;
37
72
  }
38
73
  }
39
74
 
40
- // xxl - 1601px
41
- @mixin v-for-xxl(){
42
- @include v-mob-first(xxl){
75
+ /**
76
+ * @mixin v-for-xxl
77
+ * @description Mixin for applying styles for screens with height greater than or equal to 1601pxpx.
78
+ * @example
79
+ * @include v-for-xxl {
80
+ * // your styles here
81
+ * }
82
+ */
83
+ @mixin v-for-xxl() {
84
+ @include v-mob-first(xxl) {
43
85
  @content;
44
86
  }
45
87
  }
46
88
 
47
89
 
48
- // xs - 600px
49
- @mixin v-before-xs(){
50
- @include v-desk-first(xs){
90
+ /**
91
+ * @mixin v-before-xs
92
+ * @description Mixin for applying styles for screens with height less than 600pxpx.
93
+ * @example
94
+ * @include v-before-xs {
95
+ * // your styles here
96
+ * }
97
+ */
98
+ @mixin v-before-xs() {
99
+ @include v-desk-first(xs) {
51
100
  @content;
52
101
  }
53
102
  }
54
103
 
55
- // sm - 800px
56
- @mixin v-before-sm(){
57
- @include v-desk-first(sm){
104
+ /**
105
+ * @mixin v-before-sm
106
+ * @description Mixin for applying styles for screens with height less than 800pxpx.
107
+ * @example
108
+ * @include v-before-sm {
109
+ * // your styles here
110
+ * }
111
+ */
112
+ @mixin v-before-sm() {
113
+ @include v-desk-first(sm) {
58
114
  @content;
59
115
  }
60
116
  }
61
117
 
62
- // md - 1000px
63
- @mixin v-before-md(){
64
- @include v-desk-first(md){
118
+ /**
119
+ * @mixin v-before-md
120
+ * @description Mixin for applying styles for screens with height less than 1000pxpx.
121
+ * @example
122
+ * @include v-before-md {
123
+ * // your styles here
124
+ * }
125
+ */
126
+ @mixin v-before-md() {
127
+ @include v-desk-first(md) {
65
128
  @content;
66
129
  }
67
130
  }
68
131
 
69
- // lg - 1200px
70
- @mixin v-before-lg(){
71
- @include v-desk-first(lg){
132
+ /**
133
+ * @mixin v-before-lg
134
+ * @description Mixin for applying styles for screens with height less than 1200pxpx.
135
+ * @example
136
+ * @include v-before-lg {
137
+ * // your styles here
138
+ * }
139
+ */
140
+ @mixin v-before-lg() {
141
+ @include v-desk-first(lg) {
72
142
  @content;
73
143
  }
74
144
  }
75
145
 
76
- // xl - 1600px
77
- @mixin v-before-xl(){
78
- @include v-desk-first(xl){
146
+ /**
147
+ * @mixin v-before-xl
148
+ * @description Mixin for applying styles for screens with height less than 1600pxpx.
149
+ * @example
150
+ * @include v-before-xl {
151
+ * // your styles here
152
+ * }
153
+ */
154
+ @mixin v-before-xl() {
155
+ @include v-desk-first(xl) {
79
156
  @content;
80
157
  }
81
158
  }
82
159
 
83
- // xxl - 1601px
84
- @mixin v-before-xxl(){
85
- @include v-desk-first(xxl){
160
+ /**
161
+ * @mixin v-before-xxl
162
+ * @description Mixin for applying styles for screens with height less than 1601pxpx.
163
+ * @example
164
+ * @include v-before-xxl {
165
+ * // your styles here
166
+ * }
167
+ */
168
+ @mixin v-before-xxl() {
169
+ @include v-desk-first(xxl) {
86
170
  @content;
87
171
  }
88
172
  }