react-responsive-tools 1.1.5 → 2.0.2

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,64 @@
1
+
2
+ @import "vertical";
3
+
4
+ @mixin v-for-xs(){
5
+ @include v-mob-first(xs){
6
+ @content;
7
+ }
8
+ }
9
+ @mixin v-for-sm(){
10
+ @include v-mob-first(sm){
11
+ @content;
12
+ }
13
+ }
14
+ @mixin v-for-md(){
15
+ @include v-mob-first(md){
16
+ @content;
17
+ }
18
+ }
19
+ @mixin v-for-lg(){
20
+ @include v-mob-first(lg){
21
+ @content;
22
+ }
23
+ }
24
+ @mixin v-for-xl(){
25
+ @include v-mob-first(xl){
26
+ @content;
27
+ }
28
+ }
29
+ @mixin v-for-xxl(){
30
+ @include v-mob-first(xxl){
31
+ @content;
32
+ }
33
+ }
34
+
35
+ @mixin v-before-xs(){
36
+ @include v-desk-first(xs){
37
+ @content;
38
+ }
39
+ }
40
+ @mixin v-before-sm(){
41
+ @include v-desk-first(sm){
42
+ @content;
43
+ }
44
+ }
45
+ @mixin v-before-md(){
46
+ @include v-desk-first(md){
47
+ @content;
48
+ }
49
+ }
50
+ @mixin v-before-lg(){
51
+ @include v-desk-first(lg){
52
+ @content;
53
+ }
54
+ }
55
+ @mixin v-before-xl(){
56
+ @include v-desk-first(xl){
57
+ @content;
58
+ }
59
+ }
60
+ @mixin v-before-xxl(){
61
+ @include v-desk-first(xxl){
62
+ @content;
63
+ }
64
+ }
@@ -1,73 +1,13 @@
1
+ @import "_custom-breakpoints";
2
+
1
3
  @mixin v-mob-first($breakpoint){
2
- @media (min-height: var(--bp-#{$breakpoint})) {
4
+ @media (min-height: map-get($vertical-breakpoints, $breakpoint)) {
3
5
  @content;
4
6
  }
5
7
  }
6
8
 
7
9
  @mixin v-desk-first($breakpoint){
8
- @media (max-height: var(--bp-#{$breakpoint})) {
9
- @content;
10
- }
11
- }
12
-
13
- @mixin vm-xs(){
14
- @include v-mob-first(xs){
15
- @content;
16
- }
17
- }
18
- @mixin vm-sm(){
19
- @include v-mob-first(sm){
20
- @content;
21
- }
22
- }
23
- @mixin vm-md(){
24
- @include v-mob-first(md){
25
- @content;
26
- }
27
- }
28
- @mixin vm-lg(){
29
- @include v-mob-first(lg){
30
- @content;
31
- }
32
- }
33
- @mixin vm-xl(){
34
- @include v-mob-first(xl){
35
- @content;
36
- }
37
- }
38
- @mixin vm-xxl(){
39
- @include v-mob-first(xxl){
40
- @content;
41
- }
42
- }
43
-
44
- @mixin vd-xs(){
45
- @include v-desk-first(xs){
46
- @content;
47
- }
48
- }
49
- @mixin vd-sm(){
50
- @include v-desk-first(sm){
51
- @content;
52
- }
53
- }
54
- @mixin vd-md(){
55
- @include v-desk-first(md){
56
- @content;
57
- }
58
- }
59
- @mixin vd-lg(){
60
- @include v-desk-first(lg){
61
- @content;
62
- }
63
- }
64
- @mixin vd-xl(){
65
- @include v-desk-first(xl){
66
- @content;
67
- }
68
- }
69
- @mixin vd-xxl(){
70
- @include v-desk-first(xxl){
10
+ @media (max-height: map-get($vertical-breakpoints, $breakpoint)) {
71
11
  @content;
72
12
  }
73
13
  }
@@ -1,4 +1,5 @@
1
- @import "breakpoints";
2
1
  @import "vertical";
3
2
  @import "horizontal";
3
+ @import "horizontal-breakpoints";
4
+ @import "vertical-breakpoints";
4
5
 
package/default.scss DELETED
@@ -1 +0,0 @@
1
- @import "src/scss/breakpoints";
@@ -1,16 +0,0 @@
1
- import {TBreakpoint, TVerticalBreakpoint} from "../interfaces/TBreakpoint";
2
-
3
- export function getCSSVariable(variableName: string) {
4
- const root = document.documentElement;
5
- const variableValue = getComputedStyle(root).getPropertyValue(variableName);
6
- return variableValue.trim();
7
- }
8
-
9
-
10
- export function getCSSBreakpoint(bp: TBreakpoint) {
11
- return getCSSVariable(`--bp-${bp}`)
12
- }
13
-
14
- export function getCSSVBreakpoint(bp: TVerticalBreakpoint) {
15
- return getCSSVariable(`--vbp-${bp}`)
16
- }
@@ -1,19 +0,0 @@
1
- :root {
2
- --bp-xs: 320px;
3
- --bp-sm: 576px;
4
- --bp-md: 768px;
5
- --bp-lg: 992px;
6
- --bp-lt: 1024px;
7
- --bp-ltm: 1120px;
8
- --bp-ltl: 1440px;
9
- --bp-xl: 1920px;
10
- --bp-xxl: 2560px;
11
- --bp-qxl: 3840px;
12
-
13
- --vbp-xs: 600px;
14
- --vbp-sm: 800px;
15
- --vbp-md: 1000px;
16
- --vbp-lg: 1200px;
17
- --vbp-xl: 1600px;
18
- --vbp-xxl: 1920px;
19
- }