react-responsive-tools 2.1.2 → 2.1.4

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