react-native-unistyles 1.0.0-beta.6 → 1.0.0-rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. package/README.md +6 -588
  2. package/lib/commonjs/createUnistyles.js +0 -9
  3. package/lib/commonjs/createUnistyles.js.map +1 -1
  4. package/lib/commonjs/utils/index.js +43 -0
  5. package/lib/commonjs/utils/index.js.map +1 -1
  6. package/lib/module/createUnistyles.js +0 -9
  7. package/lib/module/createUnistyles.js.map +1 -1
  8. package/lib/module/utils/index.js +2 -1
  9. package/lib/module/utils/index.js.map +1 -1
  10. package/lib/typescript/src/createUnistyles.d.ts +1 -5
  11. package/lib/typescript/src/createUnistyles.d.ts.map +1 -1
  12. package/lib/typescript/src/utils/index.d.ts +2 -1
  13. package/lib/typescript/src/utils/index.d.ts.map +1 -1
  14. package/package.json +13 -10
  15. package/src/__tests__/createUnistyles.spec.tsx +158 -0
  16. package/src/createUnistyles.ts +0 -10
  17. package/src/utils/index.ts +9 -1
  18. package/lib/commonjs/utils/breakpoints.spec.js +0 -154
  19. package/lib/commonjs/utils/breakpoints.spec.js.map +0 -1
  20. package/lib/commonjs/utils/mediaQueries.spec.js +0 -220
  21. package/lib/commonjs/utils/mediaQueries.spec.js.map +0 -1
  22. package/lib/commonjs/utils/styles.spec.js +0 -174
  23. package/lib/commonjs/utils/styles.spec.js.map +0 -1
  24. package/lib/module/utils/breakpoints.spec.js +0 -152
  25. package/lib/module/utils/breakpoints.spec.js.map +0 -1
  26. package/lib/module/utils/mediaQueries.spec.js +0 -218
  27. package/lib/module/utils/mediaQueries.spec.js.map +0 -1
  28. package/lib/module/utils/styles.spec.js +0 -172
  29. package/lib/module/utils/styles.spec.js.map +0 -1
  30. package/lib/typescript/src/utils/breakpoints.spec.d.ts +0 -2
  31. package/lib/typescript/src/utils/breakpoints.spec.d.ts.map +0 -1
  32. package/lib/typescript/src/utils/mediaQueries.spec.d.ts +0 -2
  33. package/lib/typescript/src/utils/mediaQueries.spec.d.ts.map +0 -1
  34. package/lib/typescript/src/utils/styles.spec.d.ts +0 -2
  35. package/lib/typescript/src/utils/styles.spec.d.ts.map +0 -1
@@ -1,220 +0,0 @@
1
- "use strict";
2
-
3
- var _mediaQueries = require("./mediaQueries");
4
- describe('utils', () => {
5
- describe('extractValues', () => {
6
- it('should correctly extract a width with both bounds', () => {
7
- const mediaQuery = 'w[100, 600]';
8
- expect((0, _mediaQueries.extractValues)(mediaQuery)).toEqual([100, 600]);
9
- });
10
- it('should correctly extract a width with lower bound equal to 0', () => {
11
- const mediaQuery = 'w[0, 400]';
12
- expect((0, _mediaQueries.extractValues)(mediaQuery)).toEqual([0, 400]);
13
- });
14
- it('should correctly extract a height with single value', () => {
15
- const mediaQuery = 'h[700]';
16
- expect((0, _mediaQueries.extractValues)(mediaQuery)).toEqual([700]);
17
- });
18
- it('should correctly extract a height with lower bound equal to 0', () => {
19
- const mediaQuery = 'h[0,]';
20
- expect((0, _mediaQueries.extractValues)(mediaQuery)).toEqual([0]);
21
- });
22
- it('should correctly extract a width with no lower bound', () => {
23
- const mediaQuery = 'w[,100]';
24
- expect((0, _mediaQueries.extractValues)(mediaQuery)).toEqual([0, 100]);
25
- });
26
- });
27
- describe('isWithinTheWidth', () => {
28
- it('should return true if the screen width is within the media query', () => {
29
- const pairs = [{
30
- width: 200,
31
- query: 'w[120]'
32
- }, {
33
- width: 100,
34
- query: 'w[,500]'
35
- }, {
36
- width: 0,
37
- query: 'w[,500]'
38
- }, {
39
- width: 300,
40
- query: 'w[300,500]'
41
- }];
42
- pairs.forEach(_ref => {
43
- let {
44
- width,
45
- query
46
- } = _ref;
47
- expect((0, _mediaQueries.isWithinTheWidth)(query, width)).toEqual(true);
48
- });
49
- });
50
- it('should return false if the screen width is outside the media query', () => {
51
- const pairs = [{
52
- width: 120,
53
- query: 'w[200]'
54
- }, {
55
- width: 501,
56
- query: 'w[,500]'
57
- }, {
58
- width: 700,
59
- query: 'w[200,500]'
60
- }];
61
- pairs.forEach(_ref2 => {
62
- let {
63
- width,
64
- query
65
- } = _ref2;
66
- expect((0, _mediaQueries.isWithinTheWidth)(query, width)).toEqual(false);
67
- });
68
- });
69
- });
70
- describe('isWithinTheHeight', () => {
71
- it('should return true if the screen height is within the media query', () => {
72
- const pairs = [{
73
- height: 200,
74
- query: 'h[120]'
75
- }, {
76
- height: 100,
77
- query: 'h[,500]'
78
- }, {
79
- height: 0,
80
- query: 'h[,500]'
81
- }, {
82
- height: 300,
83
- query: 'h[300,500]'
84
- }];
85
- pairs.forEach(_ref3 => {
86
- let {
87
- height,
88
- query
89
- } = _ref3;
90
- expect((0, _mediaQueries.isWithinTheHeight)(query, height)).toEqual(true);
91
- });
92
- });
93
- it('should return false if the screen height is outside the media query', () => {
94
- const pairs = [{
95
- height: 120,
96
- query: 'h[200]'
97
- }, {
98
- height: 501,
99
- query: 'h[,500]'
100
- }, {
101
- height: 700,
102
- query: 'h[200,500]'
103
- }];
104
- pairs.forEach(_ref4 => {
105
- let {
106
- height,
107
- query
108
- } = _ref4;
109
- expect((0, _mediaQueries.isWithinTheHeight)(query, height)).toEqual(false);
110
- });
111
- });
112
- });
113
- describe('isWithinTheWidthAndHeight', () => {
114
- it('should return true if the screen width and height are within the media query', () => {
115
- const pairs = [{
116
- screenSize: {
117
- width: 200,
118
- height: 600
119
- },
120
- query: 'w[, 200]:h[600]'
121
- }, {
122
- screenSize: {
123
- width: 200,
124
- height: 600
125
- },
126
- query: 'w[110]:h[400]'
127
- }, {
128
- screenSize: {
129
- width: 400,
130
- height: 800
131
- },
132
- query: 'w[400, 800]:h[400, 800]'
133
- }];
134
- pairs.forEach(_ref5 => {
135
- let {
136
- screenSize,
137
- query
138
- } = _ref5;
139
- expect((0, _mediaQueries.isWithinTheWidthAndHeight)(query, screenSize)).toEqual(true);
140
- });
141
- });
142
- it('should return false if the screen width and height are outside the media query', () => {
143
- const pairs = [{
144
- screenSize: {
145
- width: 200,
146
- height: 600
147
- },
148
- query: 'w[, 220]:h[620]'
149
- }, {
150
- screenSize: {
151
- width: 200,
152
- height: 600
153
- },
154
- query: 'w[290]:h[400]'
155
- }, {
156
- screenSize: {
157
- width: 400,
158
- height: 800
159
- },
160
- query: 'w[, 800]:h[, 700]'
161
- }];
162
- pairs.forEach(_ref6 => {
163
- let {
164
- screenSize,
165
- query
166
- } = _ref6;
167
- expect((0, _mediaQueries.isWithinTheWidthAndHeight)(query, screenSize)).toEqual(false);
168
- });
169
- });
170
- });
171
- describe('isMediaQuery', () => {
172
- it('should detect correct media queries', () => {
173
- const correctMediaQueries = [':w[100]', ':w[100, 200]', ':w[, 300]', ':h[200]', ':h[0, 500]', ':h[, 750]', ':w[100]:h[200]', ':h[100]:w[200]', ':h[100, 200]:w[,400]', ':w[200]:h[200, 400]'];
174
- correctMediaQueries.forEach(query => {
175
- expect((0, _mediaQueries.isMediaQuery)(query)).toEqual(true);
176
- });
177
- });
178
- it('should detect incorrect media queries', () => {
179
- const incorrectMediaQueries = [':w100]', ':w[100, 200', ':p[, 300]', ':&[200]', ':h[0 500]', ':h[p, 750]', ':w[0]:l[200]', ':[100]:w[200]', ':h(100, 200):w[400]', ':w[2OO]:h[200, 400]', '', 'x', '>300', ']]w200[[', ':w[ 100]', ':w[ , 300]', ':w[ , 200]:h[ 200 , 400]'];
180
- incorrectMediaQueries.forEach(query => {
181
- expect((0, _mediaQueries.isMediaQuery)(query)).toEqual(false);
182
- });
183
- });
184
- });
185
- describe('getKeyForCustomMediaQuery', () => {
186
- it('should return a key for string value based on media query', () => {
187
- const mediaQueries = [['w[,200]', 'orange'], ['w[300, 400]', 'pink'], ['w[500, 600]', 'red']];
188
- const screenSize = {
189
- width: 300,
190
- height: 700
191
- };
192
- expect((0, _mediaQueries.getKeyForCustomMediaQuery)(mediaQueries, screenSize)).toEqual('w[300, 400]');
193
- });
194
- it('should return a key for number value based on media query', () => {
195
- const mediaQueries = [['w[,200]', 200], ['w[250]', 300]];
196
- const screenSize = {
197
- width: 300,
198
- height: 700
199
- };
200
- expect((0, _mediaQueries.getKeyForCustomMediaQuery)(mediaQueries, screenSize)).toEqual('w[250]');
201
- });
202
- it('should return undefined for no match', () => {
203
- const mediaQueries = [['w[,400]', 'green'], ['w[500, 999]', 'olive'], ['w[1000]', 'red']];
204
- const screenSize = {
205
- width: 450,
206
- height: 1000
207
- };
208
- expect((0, _mediaQueries.getKeyForCustomMediaQuery)(mediaQueries, screenSize)).toEqual(undefined);
209
- });
210
- it('should handle correctly complex media queries', () => {
211
- const mediaQueries = [['w[,300]:h[200,700]', 200], ['w[250]:h[701]', 300], ['w[200]', 500]];
212
- const screenSize = {
213
- width: 300,
214
- height: 700
215
- };
216
- expect((0, _mediaQueries.getKeyForCustomMediaQuery)(mediaQueries, screenSize)).toEqual('w[,300]:h[200,700]');
217
- });
218
- });
219
- });
220
- //# sourceMappingURL=mediaQueries.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_mediaQueries","require","describe","it","mediaQuery","expect","extractValues","toEqual","pairs","width","query","forEach","_ref","isWithinTheWidth","_ref2","height","_ref3","isWithinTheHeight","_ref4","screenSize","_ref5","isWithinTheWidthAndHeight","_ref6","correctMediaQueries","isMediaQuery","incorrectMediaQueries","mediaQueries","getKeyForCustomMediaQuery","undefined"],"sourceRoot":"../../../src","sources":["utils/mediaQueries.spec.ts"],"mappings":";;AAAA,IAAAA,aAAA,GAAAC,OAAA;AAUAC,QAAQ,CAAC,OAAO,EAAE,MAAM;EACpBA,QAAQ,CAAC,eAAe,EAAE,MAAM;IAC5BC,EAAE,CAAC,mDAAmD,EAAE,MAAM;MAC1D,MAAMC,UAAU,GAAG,aAAa;MAEhCC,MAAM,CAAC,IAAAC,2BAAa,EAACF,UAAU,CAAC,CAAC,CAACG,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACzD,CAAC,CAAC;IAEFJ,EAAE,CAAC,8DAA8D,EAAE,MAAM;MACrE,MAAMC,UAAU,GAAG,WAAW;MAE9BC,MAAM,CAAC,IAAAC,2BAAa,EAACF,UAAU,CAA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AAU,CAAC,CAAC,CAACZ,OAAO,CAACqB,SAAS,CAAC;IAClF,CAAC,CAAC;IAEFzB,EAAE,CAAC,+CAA+C,EAAE,MAAM;MACtD,MAAMuB,YAAY,GAAG,CACjB,CAAC,oBAAoB,EAAE,GAAG,CAAC,EAC3B,CAAC,eAAe,EAAE,GAAG,CAAC,EACtB,CAAC,QAAQ,EAAE,GAAG,CAAC,CACkB;MACrC,MAAMP,UAAsB,GAAG;QAC3BV,KAAK,EAAE,GAAG;QACVM,MAAM,EAAE;MACZ,CAAC;MAEDV,MAAM,CAAC,IAAAsB,uCAAyB,EAACD,YAAY,EAAEP,UAAU,CAAC,CAAC,CAACZ,OAAO,CAAC,oBAAoB,CAAC;IAC7F,CAAC,CAAC;EACN,CAAC,CAAC;AACN,CAAC,CAAC"}
@@ -1,174 +0,0 @@
1
- "use strict";
2
-
3
- var _styles = require("./styles");
4
- describe('styles', () => {
5
- describe('proxifyFunction', () => {
6
- it('should parse style for dynamic function', () => {
7
- const screenSize = {
8
- width: 400,
9
- height: 800
10
- };
11
- const breakpoint = 'sm';
12
- const breakpoints = {
13
- xs: 0,
14
- sm: 400,
15
- md: 800
16
- };
17
- const breakpointPairs = Object.entries(breakpoints);
18
- const dynamicFunction = isEven => ({
19
- backgroundColor: {
20
- sm: isEven ? 'green' : 'red',
21
- md: isEven ? 'orange' : 'pink'
22
- }
23
- });
24
- expect((0, _styles.proxifyFunction)(dynamicFunction, breakpoint, screenSize, breakpointPairs)(true)).toEqual({
25
- backgroundColor: 'green'
26
- });
27
- });
28
- it('should return proxified function for custom media query', () => {
29
- const screenSize = {
30
- width: 400,
31
- height: 800
32
- };
33
- const breakpoint = 'sm';
34
- const breakpoints = {
35
- xs: 0,
36
- sm: 400,
37
- md: 800
38
- };
39
- const breakpointPairs = Object.entries(breakpoints);
40
- const dynamicFunction = isEven => ({
41
- backgroundColor: {
42
- ':w[,399]': isEven ? 'green' : 'red',
43
- ':w[400]': isEven ? 'orange' : 'pink'
44
- }
45
- });
46
- expect((0, _styles.proxifyFunction)(dynamicFunction, breakpoint, screenSize, breakpointPairs)(false)).toEqual({
47
- backgroundColor: 'pink'
48
- });
49
- });
50
- it('should return same function for no breakpoints nor media queries', () => {
51
- const screenSize = {
52
- width: 400,
53
- height: 800
54
- };
55
- const breakpoint = 'sm';
56
- const breakpoints = {
57
- xs: 0,
58
- sm: 400,
59
- md: 800
60
- };
61
- const breakpointPairs = Object.entries(breakpoints);
62
- const dynamicFunction = isEven => ({
63
- backgroundColor: isEven ? 'pink' : 'purple'
64
- });
65
- expect((0, _styles.proxifyFunction)(dynamicFunction, breakpoint, screenSize, breakpointPairs)(false)).toEqual({
66
- backgroundColor: 'purple'
67
- });
68
- });
69
- });
70
- describe('parseStyle', () => {
71
- it('should correctly parse styles', () => {
72
- const screenSize = {
73
- width: 400,
74
- height: 800
75
- };
76
- const breakpoint = 'sm';
77
- const breakpoints = {
78
- xs: 0,
79
- sm: 400,
80
- md: 800
81
- };
82
- const breakpointPairs = Object.entries(breakpoints);
83
- const style = {
84
- fontSize: {
85
- sm: 12,
86
- md: 20
87
- },
88
- backgroundColor: {
89
- xs: 'pink',
90
- md: 'orange'
91
- },
92
- fontWeight: 'bold'
93
- };
94
- const parsedStyles = (0, _styles.parseStyle)(style, breakpoint, screenSize, breakpointPairs);
95
- expect(parsedStyles).toEqual({
96
- fontSize: 12,
97
- backgroundColor: 'pink',
98
- fontWeight: 'bold'
99
- });
100
- });
101
- it('should correctly parse transform styles', () => {
102
- const screenSize = {
103
- width: 400,
104
- height: 800
105
- };
106
- const breakpoint = 'sm';
107
- const breakpoints = {
108
- xs: 0,
109
- sm: 400,
110
- md: 800
111
- };
112
- const breakpointPairs = Object.entries(breakpoints);
113
- const style = {
114
- transform: [{
115
- translateX: {
116
- sm: 120,
117
- md: 200
118
- },
119
- translateY: 200
120
- }]
121
- };
122
- const parsedStyles = (0, _styles.parseStyle)(style, breakpoint, screenSize, breakpointPairs);
123
- expect(parsedStyles).toEqual({
124
- transform: [{
125
- translateX: 120,
126
- translateY: 200
127
- }]
128
- });
129
- });
130
- it('should correctly parse shadowOffset styles', () => {
131
- const screenSize = {
132
- width: 400,
133
- height: 800
134
- };
135
- const breakpoint = 'sm';
136
- const breakpoints = {
137
- xs: 0,
138
- sm: 400,
139
- md: 800
140
- };
141
- const breakpointPairs = Object.entries(breakpoints);
142
- const style = {
143
- shadowOffset: {
144
- width: 0,
145
- height: 4
146
- }
147
- };
148
- const styleWithBreakpoints = {
149
- shadowOffset: {
150
- width: 0,
151
- height: {
152
- sm: 10,
153
- md: 20
154
- }
155
- }
156
- };
157
- const parsedStyles = (0, _styles.parseStyle)(style, breakpoint, screenSize, breakpointPairs);
158
- const parsedStylesWithBreakpoints = (0, _styles.parseStyle)(styleWithBreakpoints, breakpoint, screenSize, breakpointPairs);
159
- expect(parsedStyles).toEqual({
160
- shadowOffset: {
161
- width: 0,
162
- height: 4
163
- }
164
- });
165
- expect(parsedStylesWithBreakpoints).toEqual({
166
- shadowOffset: {
167
- width: 0,
168
- height: 10
169
- }
170
- });
171
- });
172
- });
173
- });
174
- //# sourceMappingURL=styles.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_styles","require","describe","it","screenSize","width","height","breakpoint","breakpoints","xs","sm","md","breakpointPairs","Object","entries","dynamicFunction","isEven","backgroundColor","expect","proxifyFunction","toEqual","style","fontSize","fontWeight","parsedStyles","parseStyle","transform","translateX","translateY","shadowOffset","styleWithBreakpoints","parsedStylesWithBreakpoints"],"sourceRoot":"../../../src","sources":["utils/styles.spec.ts"],"mappings":";;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAIAC,QAAQ,CAAC,QAAQ,EAAE,MAAM;EACrBA,QAAQ,CAAC,iBAAiB,EAAE,MAAM;IAC9BC,EAAE,CAAC,yCAAyC,EAAE,MAAM;MAChD,MAAMC,UAAsB,GAAG;QAC3BC,KAAK,EAAE,GAAG;QACVC,MAAM,EAAE;MACZ,CAAC;MACD,MAAMC,UAAU,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ACzBC,OAAO,CAACN,WAAW,CAAgD;MACxE,MAAMa,KAAK,GAAG;QACVQ,YAAY,EAAE;UACVxB,KAAK,EAAE,CAAC;UACRC,MAAM,EAAE;QACZ;MACJ,CAAC;MACD,MAAMwB,oBAAoB,GAAG;QACzBD,YAAY,EAAE;UACVxB,KAAK,EAAE,CAAC;UACRC,MAAM,EAAE;YACJI,EAAE,EAAE,EAAE;YACNC,EAAE,EAAE;UACR;QACJ;MACJ,CAAC;MAED,MAAMa,YAAY,GAAG,IAAAC,kBAAU,EAC3BJ,KAAK,EACLd,UAAU,EACVH,UAAU,EACVQ,eACJ,CAAC;MACD,MAAMmB,2BAA2B,GAAG,IAAAN,kBAAU,EAC1CK,oBAAoB,EACpBvB,UAAU,EACVH,UAAU,EACVQ,eACJ,CAAC;MAEDM,MAAM,CAACM,YAAY,CAAC,CAACJ,OAAO,CAAC;QACzBS,YAAY,EAAE;UACVxB,KAAK,EAAE,CAAC;UACRC,MAAM,EAAE;QACZ;MACJ,CAAC,CAAC;MACFY,MAAM,CAACa,2BAA2B,CAAC,CAACX,OAAO,CAAC;QACxCS,YAAY,EAAE;UACVxB,KAAK,EAAE,CAAC;UACRC,MAAM,EAAE;QACZ;MACJ,CAAC,CAAC;IACN,CAAC,CAAC;EACN,CAAC,CAAC;AACN,CAAC,CAAC"}
@@ -1,152 +0,0 @@
1
- import { getBreakpointFromScreenWidth, getValueForBreakpoint, sortAndValidateBreakpoints } from './breakpoints';
2
- describe('breakpoints', () => {
3
- describe('sortAndValidateBreakpoints', () => {
4
- it('should throw error for empty breakpoints', () => {
5
- const breakpoints = {};
6
- expect(() => sortAndValidateBreakpoints(breakpoints)).toThrow();
7
- });
8
- it('should throw error for breakpoints that don\'t start with 0', () => {
9
- const breakpoints = {
10
- sm: -1
11
- };
12
- expect(() => sortAndValidateBreakpoints(breakpoints)).toThrow();
13
- });
14
- it('should return same order for sorted elements', () => {
15
- const breakpoints = {
16
- sm: 0,
17
- md: 200,
18
- lg: 300,
19
- xl: 500
20
- };
21
- expect(sortAndValidateBreakpoints(breakpoints)).toEqual(breakpoints);
22
- });
23
- it('should sort the order of breakpoints', () => {
24
- const breakpoints = {
25
- md: 200,
26
- sm: 0,
27
- lg: 300,
28
- xl: 500
29
- };
30
- expect(sortAndValidateBreakpoints(breakpoints)).toEqual({
31
- sm: 0,
32
- md: 200,
33
- lg: 300,
34
- xl: 500
35
- });
36
- });
37
- it('should throw errors for duplicated values', () => {
38
- const breakpoints = {
39
- md: 200,
40
- sm: 0,
41
- lg: 300,
42
- xl: 300
43
- };
44
- expect(() => sortAndValidateBreakpoints(breakpoints)).toThrow();
45
- });
46
- });
47
- describe('getBreakpointFromScreenWidth', () => {
48
- it('should return correct breakpoints based on screen width', () => {
49
- const breakpoints = {
50
- xs: 0,
51
- sm: 300,
52
- md: 500,
53
- xl: 1200
54
- };
55
- const breakpointPairs = Object.entries(breakpoints);
56
- expect(getBreakpointFromScreenWidth(0, breakpointPairs)).toEqual('xs');
57
- expect(getBreakpointFromScreenWidth(20, breakpointPairs)).toEqual('xs');
58
- expect(getBreakpointFromScreenWidth(100, breakpointPairs)).toEqual('xs');
59
- expect(getBreakpointFromScreenWidth(101, breakpointPairs)).toEqual('xs');
60
- expect(getBreakpointFromScreenWidth(250, breakpointPairs)).toEqual('xs');
61
- expect(getBreakpointFromScreenWidth(300, breakpointPairs)).toEqual('sm');
62
- expect(getBreakpointFromScreenWidth(499, breakpointPairs)).toEqual('sm');
63
- expect(getBreakpointFromScreenWidth(500, breakpointPairs)).toEqual('md');
64
- expect(getBreakpointFromScreenWidth(799, breakpointPairs)).toEqual('md');
65
- expect(getBreakpointFromScreenWidth(1200, breakpointPairs)).toEqual('xl');
66
- expect(getBreakpointFromScreenWidth(2000, breakpointPairs)).toEqual('xl');
67
- });
68
- });
69
- describe('getValueForBreakpoint', () => {
70
- it('should prioritize custom media query', () => {
71
- const breakpoint = 'sm';
72
- const breakpoints = {
73
- xs: 0,
74
- sm: 200,
75
- md: 500
76
- };
77
- const breakpointPairs = Object.entries(breakpoints);
78
- const style = {
79
- ':w[, 200]': 'green',
80
- ':w[201]': 'orange',
81
- sm: 'pink'
82
- };
83
- const screenSize = {
84
- width: 200,
85
- height: 800
86
- };
87
- expect(getValueForBreakpoint(style, breakpoint, screenSize, breakpointPairs)).toEqual('green');
88
- });
89
- });
90
- it('should match breakpoint if media query doesnt exist', () => {
91
- const breakpoint = 'md';
92
- const breakpoints = {
93
- xs: 0,
94
- sm: 200,
95
- md: 500
96
- };
97
- const breakpointPairs = Object.entries(breakpoints);
98
- const style = {
99
- ':w[, 200]': 'green',
100
- ':w[201, 499]': 'orange',
101
- sm: 'pink',
102
- md: 'red'
103
- };
104
- const screenSize = {
105
- width: 500,
106
- height: 1200
107
- };
108
- expect(getValueForBreakpoint(style, breakpoint, screenSize, breakpointPairs)).toEqual('red');
109
- });
110
- it('should match breakpoint even if value is undefined', () => {
111
- const breakpoint = 'md';
112
- const breakpoints = {
113
- xs: 0,
114
- sm: 200,
115
- md: 500
116
- };
117
- const breakpointPairs = Object.entries(breakpoints);
118
- const style = {
119
- ':w[, 200]': 'green',
120
- ':w[201, 499]': 'orange',
121
- sm: 'pink',
122
- md: undefined
123
- };
124
- const screenSize = {
125
- width: 500,
126
- height: 1200
127
- };
128
- expect(getValueForBreakpoint(style, breakpoint, screenSize, breakpointPairs)).toEqual(undefined);
129
- });
130
- it('should match lower breakpoint to match css cascading', () => {
131
- const breakpoint = 'xl';
132
- const breakpoints = {
133
- xs: 0,
134
- sm: 200,
135
- md: 500,
136
- xl: 600
137
- };
138
- const breakpointPairs = Object.entries(breakpoints);
139
- const style = {
140
- ':w[, 200]': 'green',
141
- ':w[201, 499]': 'orange',
142
- sm: 'pink',
143
- md: 'red'
144
- };
145
- const screenSize = {
146
- width: 500,
147
- height: 1200
148
- };
149
- expect(getValueForBreakpoint(style, breakpoint, screenSize, breakpointPairs)).toEqual('red');
150
- });
151
- });
152
- //# sourceMappingURL=breakpoints.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["getBreakpointFromScreenWidth","getValueForBreakpoint","sortAndValidateBreakpoints","describe","it","breakpoints","expect","toThrow","sm","md","lg","xl","toEqual","xs","breakpointPairs","Object","entries","breakpoint","style","screenSize","width","height","undefined"],"sourceRoot":"../../../src","sources":["utils/breakpoints.spec.ts"],"mappings":"AAAA,SAASA,4BAA4B,EAAEC,qBAAqB,EAAEC,0BAA0B,QAAQ,eAAe;AAG/GC,QAAQ,CAAC,aAAa,EAAE,MAAM;EAC1BA,QAAQ,CAAC,4BAA4B,EAAE,MAAM;IACzCC,EAAE,CAAC,0CAA0C,EAAE,MAAM;MACjD,MAAMC,WAAW,GAAG,CAAC,CAAC;MAEtBC,MAAM,CAAC,MAAMJ,0BAA0B,CAACG,WAAW,CAAC,CAAC,CAACE,OAAO,CAAC,CAAC;IACnE,CAAC,CAAC;IAEFH,EAAE,CAAC,6DAA6D,EAAE,MAAM;MACpE,MAAMC,WAAW,GAAG;QAChBG,EAAE,EAAE,CAAC;MACT,CAAC;MAEDF,MAAM,CAAC,MAAMJ,0BAA0B,CAACG,WAAW,CAAC,CAAC,CAACE,OAAO,CAAC,CAAC;IACnE,CAAC,CAAC;IAEFH,EAAE,CAAC,8CAA8C,EAAE,MAAM;MACrD,MAAMC,WAAW,GAAG;QAChBG,EAAE,EAAE,CAAC;QACLC,EAAE,EAAE,GAAG;QACPC,EAAE,EAAE,GAAG;QACPC,EAAE,EAAE;MACR,CAAC;MAEDL,MAAM,CAACJ,0BAA0B,CAACG,WAAW,CAAC,CAAC,CAACO,OAAO,CAACP,WAAW,CAAC;IACxE,CAAC,CAAC;IAEFD,EAAE,CAAC,sCAAsC,EAAE,MAAM;MAC7C,MAAMC,WAAW,GAAG;QAChBI,EAAE,EAAE,GAAG;QACPD,EAAE,EAAE,CAAC;QACLE,EAAE,EAAE,GAAG;QACPC,EAAE,EAAE;MACR,CAAC;MAEDL,MAAM,CAACJ,0BAA0B,CAACG,WAAW,CAAC,CA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