@jobber/hooks 2.4.0 → 2.5.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.
- package/dist/useBreakpoints/index.d.ts +2 -0
- package/dist/useBreakpoints/index.js +20 -0
- package/dist/useBreakpoints/mockViewportWidth/index.d.ts +1 -0
- package/dist/useBreakpoints/mockViewportWidth/index.js +17 -0
- package/dist/useBreakpoints/mockViewportWidth/mockViewportWidth.d.ts +8 -0
- package/dist/useBreakpoints/mockViewportWidth/mockViewportWidth.js +70 -0
- package/dist/useBreakpoints/mockViewportWidth/mockViewportWidth.test.d.ts +1 -0
- package/dist/useBreakpoints/mockViewportWidth/mockViewportWidth.test.js +17 -0
- package/dist/useBreakpoints/useBreakpoints.d.ts +20 -0
- package/dist/useBreakpoints/useBreakpoints.js +27 -0
- package/dist/useBreakpoints/useBreakpoints.test.d.ts +1 -0
- package/dist/useBreakpoints/useBreakpoints.test.js +138 -0
- package/dist/useBreakpoints/useMediaQuery.d.ts +4 -0
- package/dist/useBreakpoints/useMediaQuery.js +21 -0
- package/package.json +2 -2
- package/useBreakpoints.d.ts +1 -0
- package/useBreakpoints.js +17 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.mockViewportWidth = void 0;
|
|
18
|
+
__exportStar(require("./useBreakpoints"), exports);
|
|
19
|
+
var mockViewportWidth_1 = require("./mockViewportWidth");
|
|
20
|
+
Object.defineProperty(exports, "mockViewportWidth", { enumerable: true, get: function () { return mockViewportWidth_1.mockViewportWidth; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./mockViewportWidth";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./mockViewportWidth"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function mockViewportWidth(): {
|
|
2
|
+
cleanup: typeof cleanup;
|
|
3
|
+
setViewportWidth: typeof setViewportWidth;
|
|
4
|
+
};
|
|
5
|
+
declare function setViewportWidth(newWidth: number): void;
|
|
6
|
+
declare function cleanup(): void;
|
|
7
|
+
export declare function isQueryMatching(query: string): boolean | undefined;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isQueryMatching = exports.mockViewportWidth = void 0;
|
|
4
|
+
const defaultMatchMedia = window.matchMedia;
|
|
5
|
+
const defaultResizeTo = window.resizeTo;
|
|
6
|
+
const defaultInnerWidth = window.innerWidth;
|
|
7
|
+
function mockViewportWidth() {
|
|
8
|
+
return { cleanup, setViewportWidth };
|
|
9
|
+
}
|
|
10
|
+
exports.mockViewportWidth = mockViewportWidth;
|
|
11
|
+
function setViewportWidth(newWidth) {
|
|
12
|
+
Object.defineProperty(window, "matchMedia", {
|
|
13
|
+
writable: true,
|
|
14
|
+
value: jest.fn().mockImplementation((query) => {
|
|
15
|
+
const matches = isQueryMatching(query);
|
|
16
|
+
const instance = {
|
|
17
|
+
matches: matches,
|
|
18
|
+
media: query,
|
|
19
|
+
onchange: null,
|
|
20
|
+
addEventListener: jest.fn(),
|
|
21
|
+
removeEventListener: jest.fn(),
|
|
22
|
+
dispatchEvent: jest.fn(),
|
|
23
|
+
};
|
|
24
|
+
window.addEventListener("resize", () => {
|
|
25
|
+
if (matches != instance.matches) {
|
|
26
|
+
instance.matches = matches;
|
|
27
|
+
instance.dispatchEvent("change");
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
return instance;
|
|
31
|
+
}),
|
|
32
|
+
});
|
|
33
|
+
Object.defineProperty(window, "resizeTo", {
|
|
34
|
+
value: (width) => {
|
|
35
|
+
Object.defineProperty(window, "innerWidth", {
|
|
36
|
+
configurable: true,
|
|
37
|
+
writable: true,
|
|
38
|
+
value: width,
|
|
39
|
+
});
|
|
40
|
+
window.dispatchEvent(new Event("resize"));
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
window.resizeTo(newWidth, window.innerHeight);
|
|
44
|
+
}
|
|
45
|
+
function cleanup() {
|
|
46
|
+
window.matchMedia = defaultMatchMedia;
|
|
47
|
+
window.resizeTo = defaultResizeTo;
|
|
48
|
+
window.innerWidth = defaultInnerWidth;
|
|
49
|
+
}
|
|
50
|
+
function isQueryMatching(query) {
|
|
51
|
+
const match = query.match(/(\w+)\s*(<|<=|>|>=|=)\s*(\d+)/);
|
|
52
|
+
if (!match)
|
|
53
|
+
return false;
|
|
54
|
+
const { innerWidth } = window;
|
|
55
|
+
const [, , operator, value] = match;
|
|
56
|
+
const breakpoint = parseInt(value, 10);
|
|
57
|
+
switch (operator) {
|
|
58
|
+
case "<":
|
|
59
|
+
return innerWidth < breakpoint;
|
|
60
|
+
case "<=":
|
|
61
|
+
return innerWidth <= breakpoint;
|
|
62
|
+
case ">":
|
|
63
|
+
return innerWidth > breakpoint;
|
|
64
|
+
case ">=":
|
|
65
|
+
return innerWidth >= breakpoint;
|
|
66
|
+
case "=":
|
|
67
|
+
return innerWidth === breakpoint;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.isQueryMatching = isQueryMatching;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mockViewportWidth_1 = require("./mockViewportWidth");
|
|
4
|
+
describe("isQueryMatching", () => {
|
|
5
|
+
it.each([["<"], [">"]])("should return false on %s", operator => {
|
|
6
|
+
const result = (0, mockViewportWidth_1.isQueryMatching)(`width ${operator} ${window.innerWidth}`);
|
|
7
|
+
expect(result).toBe(false);
|
|
8
|
+
});
|
|
9
|
+
it.each([["<="], [">="], ["="]])("should return true on %s", operator => {
|
|
10
|
+
const result = (0, mockViewportWidth_1.isQueryMatching)(`width ${operator} ${window.innerWidth}`);
|
|
11
|
+
expect(result).toBe(true);
|
|
12
|
+
});
|
|
13
|
+
it("should return false when the width is not a number", () => {
|
|
14
|
+
const result = (0, mockViewportWidth_1.isQueryMatching)(`width = not-a-number`);
|
|
15
|
+
expect(result).toBe(false);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const BREAKPOINT_SIZES: {
|
|
2
|
+
sm: number;
|
|
3
|
+
md: number;
|
|
4
|
+
lg: number;
|
|
5
|
+
xl: number;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Hook equivalent of CSS media queries with our
|
|
9
|
+
* [supported breakpoints](https://atlantis.getjobber.com/?path=/docs/design-breakpoints--page).
|
|
10
|
+
*/
|
|
11
|
+
export declare function useBreakpoints(): {
|
|
12
|
+
smallAndUp: boolean;
|
|
13
|
+
mediumAndUp: boolean;
|
|
14
|
+
largeAndUp: boolean;
|
|
15
|
+
extraLargeAndUp: boolean;
|
|
16
|
+
extraSmallOnly: boolean;
|
|
17
|
+
smallOnly: boolean;
|
|
18
|
+
mediumOnly: boolean;
|
|
19
|
+
largeOnly: boolean;
|
|
20
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useBreakpoints = exports.BREAKPOINT_SIZES = void 0;
|
|
4
|
+
const useMediaQuery_1 = require("./useMediaQuery");
|
|
5
|
+
exports.BREAKPOINT_SIZES = { sm: 490, md: 768, lg: 1080, xl: 1440 };
|
|
6
|
+
/**
|
|
7
|
+
* Hook equivalent of CSS media queries with our
|
|
8
|
+
* [supported breakpoints](https://atlantis.getjobber.com/?path=/docs/design-breakpoints--page).
|
|
9
|
+
*/
|
|
10
|
+
function useBreakpoints() {
|
|
11
|
+
const extraSmallOnly = (0, useMediaQuery_1.useMediaQuery)(`(width < ${exports.BREAKPOINT_SIZES.sm}px)`);
|
|
12
|
+
const smallAndUp = (0, useMediaQuery_1.useMediaQuery)(`(width >= ${exports.BREAKPOINT_SIZES.sm}px)`);
|
|
13
|
+
const mediumAndUp = (0, useMediaQuery_1.useMediaQuery)(`(width >= ${exports.BREAKPOINT_SIZES.md}px)`);
|
|
14
|
+
const largeAndUp = (0, useMediaQuery_1.useMediaQuery)(`(width >= ${exports.BREAKPOINT_SIZES.lg}px)`);
|
|
15
|
+
const extraLargeAndUp = (0, useMediaQuery_1.useMediaQuery)(`(width >= ${exports.BREAKPOINT_SIZES.xl}px)`);
|
|
16
|
+
return {
|
|
17
|
+
smallAndUp,
|
|
18
|
+
mediumAndUp,
|
|
19
|
+
largeAndUp,
|
|
20
|
+
extraLargeAndUp,
|
|
21
|
+
extraSmallOnly,
|
|
22
|
+
smallOnly: smallAndUp && !mediumAndUp,
|
|
23
|
+
mediumOnly: mediumAndUp && !largeAndUp,
|
|
24
|
+
largeOnly: largeAndUp && !extraLargeAndUp,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
exports.useBreakpoints = useBreakpoints;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const react_1 = require("@testing-library/react");
|
|
4
|
+
const mockViewportWidth_1 = require("./mockViewportWidth");
|
|
5
|
+
const useBreakpoints_1 = require("./useBreakpoints");
|
|
6
|
+
const { cleanup, setViewportWidth } = (0, mockViewportWidth_1.mockViewportWidth)();
|
|
7
|
+
afterEach(cleanup);
|
|
8
|
+
describe("useBreakpoints", () => {
|
|
9
|
+
describe("and up", () => {
|
|
10
|
+
it("should have the correct breakpoint values on xl size screens", () => {
|
|
11
|
+
setViewportWidth(useBreakpoints_1.BREAKPOINT_SIZES.xl);
|
|
12
|
+
const { result } = (0, react_1.renderHook)(useBreakpoints_1.useBreakpoints);
|
|
13
|
+
expect(result.current).toMatchObject({
|
|
14
|
+
smallAndUp: true,
|
|
15
|
+
mediumAndUp: true,
|
|
16
|
+
largeAndUp: true,
|
|
17
|
+
extraLargeAndUp: true,
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
it("should have the correct breakpoint values on lg size screens", () => {
|
|
21
|
+
setViewportWidth(useBreakpoints_1.BREAKPOINT_SIZES.lg);
|
|
22
|
+
const { result } = (0, react_1.renderHook)(useBreakpoints_1.useBreakpoints);
|
|
23
|
+
expect(result.current).toMatchObject({
|
|
24
|
+
smallAndUp: true,
|
|
25
|
+
mediumAndUp: true,
|
|
26
|
+
largeAndUp: true,
|
|
27
|
+
extraLargeAndUp: false,
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
it("should have the correct breakpoint values on md size screens", () => {
|
|
31
|
+
setViewportWidth(useBreakpoints_1.BREAKPOINT_SIZES.md);
|
|
32
|
+
const { result } = (0, react_1.renderHook)(useBreakpoints_1.useBreakpoints);
|
|
33
|
+
expect(result.current).toMatchObject({
|
|
34
|
+
smallAndUp: true,
|
|
35
|
+
mediumAndUp: true,
|
|
36
|
+
largeAndUp: false,
|
|
37
|
+
extraLargeAndUp: false,
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
it("should have the correct breakpoint values on sm size screens", () => {
|
|
41
|
+
setViewportWidth(useBreakpoints_1.BREAKPOINT_SIZES.sm);
|
|
42
|
+
const { result } = (0, react_1.renderHook)(useBreakpoints_1.useBreakpoints);
|
|
43
|
+
expect(result.current).toMatchObject({
|
|
44
|
+
smallAndUp: true,
|
|
45
|
+
mediumAndUp: false,
|
|
46
|
+
largeAndUp: false,
|
|
47
|
+
extraLargeAndUp: false,
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
describe("only", () => {
|
|
52
|
+
it("should only set the extraSmallOnly to true on smaller than sm", () => {
|
|
53
|
+
setViewportWidth(useBreakpoints_1.BREAKPOINT_SIZES.sm - 1);
|
|
54
|
+
const { result } = (0, react_1.renderHook)(useBreakpoints_1.useBreakpoints);
|
|
55
|
+
expect(result.current).toMatchObject({
|
|
56
|
+
extraSmallOnly: true,
|
|
57
|
+
smallOnly: false,
|
|
58
|
+
mediumOnly: false,
|
|
59
|
+
largeOnly: false,
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
it("should only set the smallOnly to true on sm", () => {
|
|
63
|
+
setViewportWidth(useBreakpoints_1.BREAKPOINT_SIZES.sm);
|
|
64
|
+
const { result } = (0, react_1.renderHook)(useBreakpoints_1.useBreakpoints);
|
|
65
|
+
expect(result.current).toMatchObject({
|
|
66
|
+
extraSmallOnly: false,
|
|
67
|
+
smallOnly: true,
|
|
68
|
+
mediumOnly: false,
|
|
69
|
+
largeOnly: false,
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
it("should only set the mediumOnly to true on md", () => {
|
|
73
|
+
setViewportWidth(useBreakpoints_1.BREAKPOINT_SIZES.md);
|
|
74
|
+
const { result } = (0, react_1.renderHook)(useBreakpoints_1.useBreakpoints);
|
|
75
|
+
expect(result.current).toMatchObject({
|
|
76
|
+
extraSmallOnly: false,
|
|
77
|
+
smallOnly: false,
|
|
78
|
+
mediumOnly: true,
|
|
79
|
+
largeOnly: false,
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
it("should only set the largeOnly to true on lg", () => {
|
|
83
|
+
setViewportWidth(useBreakpoints_1.BREAKPOINT_SIZES.lg);
|
|
84
|
+
const { result } = (0, react_1.renderHook)(useBreakpoints_1.useBreakpoints);
|
|
85
|
+
expect(result.current).toMatchObject({
|
|
86
|
+
extraSmallOnly: false,
|
|
87
|
+
smallOnly: false,
|
|
88
|
+
mediumOnly: false,
|
|
89
|
+
largeOnly: true,
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
describe("in between values", () => {
|
|
94
|
+
function randomBreakpoint(min, max) {
|
|
95
|
+
return Math.floor(min + Math.random() * (max - min + 1));
|
|
96
|
+
}
|
|
97
|
+
it("should have the correct breakpoint values on higher than xl size screens", () => {
|
|
98
|
+
setViewportWidth(randomBreakpoint(useBreakpoints_1.BREAKPOINT_SIZES.xl, 10000));
|
|
99
|
+
const { result } = (0, react_1.renderHook)(useBreakpoints_1.useBreakpoints);
|
|
100
|
+
expect(result.current).toMatchObject({
|
|
101
|
+
smallAndUp: true,
|
|
102
|
+
mediumAndUp: true,
|
|
103
|
+
largeAndUp: true,
|
|
104
|
+
extraLargeAndUp: true,
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
it("should have the correct breakpoint values on lg size screens", () => {
|
|
108
|
+
setViewportWidth(randomBreakpoint(useBreakpoints_1.BREAKPOINT_SIZES.lg, useBreakpoints_1.BREAKPOINT_SIZES.xl));
|
|
109
|
+
const { result } = (0, react_1.renderHook)(useBreakpoints_1.useBreakpoints);
|
|
110
|
+
expect(result.current).toMatchObject({
|
|
111
|
+
smallAndUp: true,
|
|
112
|
+
mediumAndUp: true,
|
|
113
|
+
largeAndUp: true,
|
|
114
|
+
extraLargeAndUp: false,
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
it("should have the correct breakpoint values on md size screens", () => {
|
|
118
|
+
setViewportWidth(randomBreakpoint(useBreakpoints_1.BREAKPOINT_SIZES.md, useBreakpoints_1.BREAKPOINT_SIZES.lg));
|
|
119
|
+
const { result } = (0, react_1.renderHook)(useBreakpoints_1.useBreakpoints);
|
|
120
|
+
expect(result.current).toMatchObject({
|
|
121
|
+
smallAndUp: true,
|
|
122
|
+
mediumAndUp: true,
|
|
123
|
+
largeAndUp: false,
|
|
124
|
+
extraLargeAndUp: false,
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
it("should have the correct breakpoint values on sm size screens", () => {
|
|
128
|
+
setViewportWidth(randomBreakpoint(useBreakpoints_1.BREAKPOINT_SIZES.sm, useBreakpoints_1.BREAKPOINT_SIZES.md));
|
|
129
|
+
const { result } = (0, react_1.renderHook)(useBreakpoints_1.useBreakpoints);
|
|
130
|
+
expect(result.current).toMatchObject({
|
|
131
|
+
smallAndUp: true,
|
|
132
|
+
mediumAndUp: false,
|
|
133
|
+
largeAndUp: false,
|
|
134
|
+
extraLargeAndUp: false,
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useMediaQuery = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
/**
|
|
6
|
+
* Sets the JS media query listener. Internal use only.
|
|
7
|
+
*/
|
|
8
|
+
function useMediaQuery(CSSMediaQuery) {
|
|
9
|
+
const [matches, setMatches] = (0, react_1.useState)(window.matchMedia(CSSMediaQuery).matches);
|
|
10
|
+
(0, react_1.useEffect)(() => {
|
|
11
|
+
const media = window.matchMedia(CSSMediaQuery);
|
|
12
|
+
if (media.matches !== matches) {
|
|
13
|
+
setMatches(media.matches);
|
|
14
|
+
}
|
|
15
|
+
const listener = () => setMatches(media.matches);
|
|
16
|
+
media.addEventListener("change", listener);
|
|
17
|
+
return () => media.removeEventListener("change", listener);
|
|
18
|
+
}, [CSSMediaQuery]);
|
|
19
|
+
return matches;
|
|
20
|
+
}
|
|
21
|
+
exports.useMediaQuery = useMediaQuery;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/hooks",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.js",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"@apollo/client": "^3.0.0",
|
|
46
46
|
"react": "^18"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "550bbd65bfd7e7b9c9994a4cd05f3df3619d49ec"
|
|
49
49
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./dist/useBreakpoints";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true,
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var useBreakpoints = require("./dist/useBreakpoints");
|
|
8
|
+
|
|
9
|
+
Object.keys(useBreakpoints).forEach(function(key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
Object.defineProperty(exports, key, {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function get() {
|
|
14
|
+
return useBreakpoints[key];
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
});
|