@elliemae/ds-system 2.3.0-alpha.8 → 2.3.0-next.10
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/cjs/arithmetic.js +43 -0
- package/cjs/constants.js +19 -0
- package/cjs/globalStyles.js +25 -0
- package/cjs/index.js +84 -0
- package/cjs/mobileUtilities.js +41 -0
- package/cjs/spaceUtilities.js +68 -0
- package/cjs/styled/index.d.js +2 -0
- package/cjs/styled/index.js +124 -0
- package/cjs/styled/styleGetters.js +44 -0
- package/cjs/styled/types.js +12 -0
- package/cjs/styled/utils.js +24 -0
- package/cjs/th.js +43 -0
- package/cjs/theme.js +9 -0
- package/cjs/themeProviderHOC.js +29 -0
- package/cjs/utils.js +184 -0
- package/{dist/esm → esm}/arithmetic.js +25 -13
- package/esm/constants.js +13 -0
- package/esm/globalStyles.js +17 -0
- package/esm/index.js +11 -0
- package/esm/mobileUtilities.js +34 -0
- package/esm/spaceUtilities.js +57 -0
- package/esm/styled/index.d.js +1 -0
- package/esm/styled/index.js +115 -0
- package/esm/styled/styleGetters.js +38 -0
- package/esm/styled/types.js +1 -0
- package/esm/styled/utils.js +18 -0
- package/esm/th.js +39 -0
- package/esm/theme.js +5 -0
- package/esm/themeProviderHOC.js +20 -0
- package/esm/utils.js +136 -0
- package/package.json +45 -47
- package/dist/cjs/arithmetic.js +0 -55
- package/dist/cjs/arithmetic.js.map +0 -7
- package/dist/cjs/constants.js +0 -47
- package/dist/cjs/constants.js.map +0 -7
- package/dist/cjs/globalStyles.js +0 -47
- package/dist/cjs/globalStyles.js.map +0 -7
- package/dist/cjs/index.js +0 -43
- package/dist/cjs/index.js.map +0 -7
- package/dist/cjs/mobileUtilities.js +0 -72
- package/dist/cjs/mobileUtilities.js.map +0 -7
- package/dist/cjs/spaceUtilities.js +0 -94
- package/dist/cjs/spaceUtilities.js.map +0 -7
- package/dist/cjs/styled/index.d.js +0 -27
- package/dist/cjs/styled/index.d.js.map +0 -7
- package/dist/cjs/styled/index.js +0 -89
- package/dist/cjs/styled/index.js.map +0 -7
- package/dist/cjs/styled/styleGetters.js +0 -56
- package/dist/cjs/styled/styleGetters.js.map +0 -7
- package/dist/cjs/styled/types.js +0 -35
- package/dist/cjs/styled/types.js.map +0 -7
- package/dist/cjs/styled/utils.js +0 -47
- package/dist/cjs/styled/utils.js.map +0 -7
- package/dist/cjs/th.js +0 -58
- package/dist/cjs/th.js.map +0 -7
- package/dist/cjs/theme.js +0 -36
- package/dist/cjs/theme.js.map +0 -7
- package/dist/cjs/themeProviderHOC.js +0 -42
- package/dist/cjs/themeProviderHOC.js.map +0 -7
- package/dist/cjs/utils.js +0 -294
- package/dist/cjs/utils.js.map +0 -7
- package/dist/esm/arithmetic.js.map +0 -7
- package/dist/esm/constants.js +0 -18
- package/dist/esm/constants.js.map +0 -7
- package/dist/esm/globalStyles.js +0 -18
- package/dist/esm/globalStyles.js.map +0 -7
- package/dist/esm/index.js +0 -14
- package/dist/esm/index.js.map +0 -7
- package/dist/esm/mobileUtilities.js +0 -43
- package/dist/esm/mobileUtilities.js.map +0 -7
- package/dist/esm/spaceUtilities.js +0 -65
- package/dist/esm/spaceUtilities.js.map +0 -7
- package/dist/esm/styled/index.d.js +0 -2
- package/dist/esm/styled/index.d.js.map +0 -7
- package/dist/esm/styled/index.js +0 -60
- package/dist/esm/styled/index.js.map +0 -7
- package/dist/esm/styled/styleGetters.js +0 -27
- package/dist/esm/styled/styleGetters.js.map +0 -7
- package/dist/esm/styled/types.js +0 -6
- package/dist/esm/styled/types.js.map +0 -7
- package/dist/esm/styled/utils.js +0 -18
- package/dist/esm/styled/utils.js.map +0 -7
- package/dist/esm/th.js +0 -29
- package/dist/esm/th.js.map +0 -7
- package/dist/esm/theme.js +0 -7
- package/dist/esm/theme.js.map +0 -7
- package/dist/esm/themeProviderHOC.js +0 -13
- package/dist/esm/themeProviderHOC.js.map +0 -7
- package/dist/esm/utils.js +0 -265
- package/dist/esm/utils.js.map +0 -7
package/esm/utils.js
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { lighten } from 'polished';
|
|
2
|
+
export { rgba } from 'polished';
|
|
3
|
+
import { reduce } from 'lodash';
|
|
4
|
+
import { theme } from './theme.js';
|
|
5
|
+
import { toMobile } from './mobileUtilities.js';
|
|
6
|
+
import { css, keyframes as keyframes$1 } from 'styled-components';
|
|
7
|
+
export { createGlobalStyle, css, keyframes as kfrm, useTheme, withTheme } from 'styled-components';
|
|
8
|
+
|
|
9
|
+
/* eslint-disable no-shadow */
|
|
10
|
+
function truncate(width) {
|
|
11
|
+
return props => css(["", " white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"], !!width || props.width ? "width: ".concat(props.width || width, ";") : '');
|
|
12
|
+
}
|
|
13
|
+
function flexCenter() {
|
|
14
|
+
return "\n display: flex;\n justify-content: center;\n align-items: center;\n ";
|
|
15
|
+
}
|
|
16
|
+
function disabled() {
|
|
17
|
+
return "\n cursor: not-allowed;\n pointer-events: none;\n ";
|
|
18
|
+
}
|
|
19
|
+
function keyframes(obj) {
|
|
20
|
+
return keyframes$1(["", ""], reduce(obj, (result, value, key) => "\n ".concat(result, "\n ").concat(key, "% {\n ").concat(value, "\n }\n "), ''));
|
|
21
|
+
} // eslint-disable-next-line max-params
|
|
22
|
+
|
|
23
|
+
function boxShadow(top, left, blur, color) {
|
|
24
|
+
let inset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
25
|
+
return "box-shadow: ".concat(inset ? 'inset' : '', " ").concat(top, " ").concat(left, " ").concat(blur, " ").concat(color, ";");
|
|
26
|
+
}
|
|
27
|
+
function color() {
|
|
28
|
+
let variant = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'neutral';
|
|
29
|
+
let type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 400;
|
|
30
|
+
return css(["color:", ";"], props => props.theme.colors[variant][type]);
|
|
31
|
+
}
|
|
32
|
+
function border() {
|
|
33
|
+
let color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : theme.colors.brand[600];
|
|
34
|
+
let size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '1px';
|
|
35
|
+
let type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'solid';
|
|
36
|
+
return "".concat(size, " ").concat(type, " ").concat(color);
|
|
37
|
+
}
|
|
38
|
+
function animation(animationKeyframes, animationLength, animationTimingFn) {
|
|
39
|
+
return props => css(["animation:", " ", " ", ";"], props.animationKeyframes || animationKeyframes, props.animationLength || animationLength, props.animationTimingFn || animationTimingFn);
|
|
40
|
+
} // 0.0769
|
|
41
|
+
|
|
42
|
+
function focus() {
|
|
43
|
+
let color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : theme.colors.brand[600];
|
|
44
|
+
return () => css(["outline:none;border:1px solid ", ";box-shadow:inset 0 0 0 1px ", ";border-radius:2px;"], color, lighten(0.3, color));
|
|
45
|
+
}
|
|
46
|
+
function focusAfter(color) {
|
|
47
|
+
return css(["outline:none;position:relative;&:after{content:'';z-index:10;position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;", "}"], focus(color));
|
|
48
|
+
}
|
|
49
|
+
function active() {
|
|
50
|
+
return props => css(["outline:none;border:1px solid ", ";border-radius:2px;"], props.theme.colors.brand[700]);
|
|
51
|
+
}
|
|
52
|
+
function hover() {
|
|
53
|
+
return props => css(["outline:1px solid ", ";outline-offset:-1px;"], props.theme.colors.brand[600]);
|
|
54
|
+
}
|
|
55
|
+
function textStyle(type) {
|
|
56
|
+
let weight = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'regular';
|
|
57
|
+
// eslint-disable-next-line complexity
|
|
58
|
+
return props => {
|
|
59
|
+
let cssVar = "font-weight: ".concat(props.theme.fontWeights[weight], ";"); // eslint-disable-next-line default-case
|
|
60
|
+
|
|
61
|
+
switch (type) {
|
|
62
|
+
case 'h1':
|
|
63
|
+
cssVar += "\n font-size: ".concat(toMobile('2.7692rem'), ";\n line-height: normal;\n ");
|
|
64
|
+
break;
|
|
65
|
+
|
|
66
|
+
case 'h2':
|
|
67
|
+
cssVar += "\n font-size: ".concat(toMobile(props.theme.fontSizes.title[800]), ";\n line-height: normal;\n ");
|
|
68
|
+
break;
|
|
69
|
+
|
|
70
|
+
case 'h3':
|
|
71
|
+
cssVar += "\n font-size: ".concat(toMobile(props.theme.fontSizes.title[700]), ";\n line-height: 1.2;\n ");
|
|
72
|
+
break;
|
|
73
|
+
|
|
74
|
+
case 'h4':
|
|
75
|
+
cssVar += "\n font-size: ".concat(toMobile(props.theme.fontSizes.title[600]), ";\n line-height: normal;\n ");
|
|
76
|
+
break;
|
|
77
|
+
|
|
78
|
+
case 'h5':
|
|
79
|
+
cssVar += "\n font-size: ".concat(toMobile(props.theme.fontSizes.title[500]), ";\n line-height: normal;\n ");
|
|
80
|
+
break;
|
|
81
|
+
|
|
82
|
+
case 'section-header':
|
|
83
|
+
cssVar += "\n font-size: ".concat(toMobile(props.theme.fontSizes.title[500]), ";\n line-height: normal;\n text-transform: uppercase;\n ");
|
|
84
|
+
break;
|
|
85
|
+
|
|
86
|
+
case 'body':
|
|
87
|
+
cssVar += "\n font-size: ".concat(toMobile(props.theme.fontSizes.value[400]), ";\n line-height: normal;\n ");
|
|
88
|
+
break;
|
|
89
|
+
|
|
90
|
+
case 'body-small':
|
|
91
|
+
cssVar += "\n font-size: ".concat(toMobile(props.theme.fontSizes.value[300]), ";\n line-height: normal;\n ");
|
|
92
|
+
break;
|
|
93
|
+
|
|
94
|
+
case 'body-micro':
|
|
95
|
+
cssVar += "\n font-size: ".concat(toMobile(props.theme.fontSizes.microText[200]), ";\n line-height: normal;\n ");
|
|
96
|
+
break;
|
|
97
|
+
|
|
98
|
+
case 'list':
|
|
99
|
+
cssVar += "\n font-size: ".concat(toMobile(props.theme.fontSizes.value[400]), ";\n line-height: normal;\n ");
|
|
100
|
+
break;
|
|
101
|
+
|
|
102
|
+
case 'link':
|
|
103
|
+
cssVar += "\n line-height: ".concat(props.theme.xl, ";\n color: ").concat(props.theme.colors.brand[600], ";\n cursor: pointer;\n ");
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return cssVar;
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
function iconColor() {
|
|
111
|
+
let variant = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'neutral';
|
|
112
|
+
let type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 400;
|
|
113
|
+
return css(["fill:", ";"], props => props.theme.colors[variant][type]);
|
|
114
|
+
}
|
|
115
|
+
function fakeBorder() {
|
|
116
|
+
return css(["box-shadow:inset 0 0 0 1px ", ";border-radius:2px;"], props => props.theme.colors.neutral[200]);
|
|
117
|
+
}
|
|
118
|
+
function fakeActive() {
|
|
119
|
+
return css(["outline:none;box-shadow:inset 0 0 0 1px ", ";border-radius:2px;"], props => props.theme.colors.brand[700]);
|
|
120
|
+
}
|
|
121
|
+
function clearFocus() {
|
|
122
|
+
return "\n border: none;\n box-shadow: none;\n ";
|
|
123
|
+
}
|
|
124
|
+
function buttonLink() {
|
|
125
|
+
return "\n background-color: transparent;\n border: 1px solid transparent;\n cursor: pointer;\n ";
|
|
126
|
+
}
|
|
127
|
+
function transition() {
|
|
128
|
+
let t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'all 1s ease';
|
|
129
|
+
return "\n transition: ".concat(t, ";\n ");
|
|
130
|
+
}
|
|
131
|
+
const onlySafariAndFirefox = styles => css(["@media not all and (min-resolution:0.001dpcm){", "}@media screen and (min--moz-device-pixel-ratio:0){", "}"], styles, styles);
|
|
132
|
+
const onlySafari = styles => "\n @media not all and (min-resolution: 0.001dpcm) {\n ".concat(styles, "\n }\n ");
|
|
133
|
+
const onlyFirefox = styles => "\n @media screen and (min--moz-device-pixel-ratio: 0) {\n ".concat(styles, "\n }\n ");
|
|
134
|
+
const safariAndFirefoxBold = color => "\n @media not all and (min-resolution: 0.001dpcm) {\n font-weight: 400;\n -webkit-font-smoothing: subpixel-antialiased;\n -webkit-text-stroke: 0.4px ".concat(color, ";\n }\n @media screen and (min--moz-device-pixel-ratio: 0) {\n font-weight: 400;\n -webkit-font-smoothing: subpixel-antialiased;\n -webkit-text-stroke: 0.4px ").concat(color, ";\n }\n");
|
|
135
|
+
|
|
136
|
+
export { active, animation, border, boxShadow, buttonLink, clearFocus, color, disabled, fakeActive, fakeBorder, flexCenter, focus, focusAfter, hover, iconColor, keyframes, onlyFirefox, onlySafari, onlySafariAndFirefox, safariAndFirefoxBold, textStyle, transition, truncate };
|
package/package.json
CHANGED
|
@@ -1,70 +1,67 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-system",
|
|
3
|
-
"version": "2.3.0-
|
|
3
|
+
"version": "2.3.0-next.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - System",
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"module": "./dist/esm/index.js",
|
|
10
|
-
"main": "./dist/cjs/index.js",
|
|
11
|
-
"types": "./dist/types/index.d.ts",
|
|
6
|
+
"module": "./esm/index.js",
|
|
7
|
+
"main": "./cjs/index.js",
|
|
8
|
+
"types": "./types/index.d.ts",
|
|
12
9
|
"exports": {
|
|
13
10
|
".": {
|
|
14
|
-
"import": "./
|
|
15
|
-
"require": "./
|
|
11
|
+
"import": "./esm/index.js",
|
|
12
|
+
"require": "./cjs/index.js"
|
|
16
13
|
},
|
|
17
14
|
"./utils": {
|
|
18
|
-
"import": "./
|
|
19
|
-
"require": "./
|
|
15
|
+
"import": "./esm/utils.js",
|
|
16
|
+
"require": "./cjs/utils.js"
|
|
20
17
|
},
|
|
21
18
|
"./themeProviderHOC": {
|
|
22
|
-
"import": "./
|
|
23
|
-
"require": "./
|
|
19
|
+
"import": "./esm/themeProviderHOC.js",
|
|
20
|
+
"require": "./cjs/themeProviderHOC.js"
|
|
24
21
|
},
|
|
25
22
|
"./theme": {
|
|
26
|
-
"import": "./
|
|
27
|
-
"require": "./
|
|
23
|
+
"import": "./esm/theme.js",
|
|
24
|
+
"require": "./cjs/theme.js"
|
|
28
25
|
},
|
|
29
26
|
"./th": {
|
|
30
|
-
"import": "./
|
|
31
|
-
"require": "./
|
|
27
|
+
"import": "./esm/th.js",
|
|
28
|
+
"require": "./cjs/th.js"
|
|
32
29
|
},
|
|
33
30
|
"./styled/utils": {
|
|
34
|
-
"import": "./
|
|
35
|
-
"require": "./
|
|
31
|
+
"import": "./esm/styled/utils.js",
|
|
32
|
+
"require": "./cjs/styled/utils.js"
|
|
36
33
|
},
|
|
37
34
|
"./styled/types": {
|
|
38
|
-
"import": "./
|
|
39
|
-
"require": "./
|
|
35
|
+
"import": "./esm/styled/types.js",
|
|
36
|
+
"require": "./cjs/styled/types.js"
|
|
40
37
|
},
|
|
41
38
|
"./styled/styleGetters": {
|
|
42
|
-
"import": "./
|
|
43
|
-
"require": "./
|
|
39
|
+
"import": "./esm/styled/styleGetters.js",
|
|
40
|
+
"require": "./cjs/styled/styleGetters.js"
|
|
44
41
|
},
|
|
45
42
|
"./styled": {
|
|
46
|
-
"import": "./
|
|
47
|
-
"require": "./
|
|
43
|
+
"import": "./esm/styled/index.js",
|
|
44
|
+
"require": "./cjs/styled/index.js"
|
|
48
45
|
},
|
|
49
46
|
"./spaceUtilities": {
|
|
50
|
-
"import": "./
|
|
51
|
-
"require": "./
|
|
47
|
+
"import": "./esm/spaceUtilities.js",
|
|
48
|
+
"require": "./cjs/spaceUtilities.js"
|
|
52
49
|
},
|
|
53
50
|
"./mobileUtilities": {
|
|
54
|
-
"import": "./
|
|
55
|
-
"require": "./
|
|
51
|
+
"import": "./esm/mobileUtilities.js",
|
|
52
|
+
"require": "./cjs/mobileUtilities.js"
|
|
56
53
|
},
|
|
57
54
|
"./globalStyles": {
|
|
58
|
-
"import": "./
|
|
59
|
-
"require": "./
|
|
55
|
+
"import": "./esm/globalStyles.js",
|
|
56
|
+
"require": "./cjs/globalStyles.js"
|
|
60
57
|
},
|
|
61
58
|
"./constants": {
|
|
62
|
-
"import": "./
|
|
63
|
-
"require": "./
|
|
59
|
+
"import": "./esm/constants.js",
|
|
60
|
+
"require": "./cjs/constants.js"
|
|
64
61
|
},
|
|
65
62
|
"./arithmetic": {
|
|
66
|
-
"import": "./
|
|
67
|
-
"require": "./
|
|
63
|
+
"import": "./esm/arithmetic.js",
|
|
64
|
+
"require": "./cjs/arithmetic.js"
|
|
68
65
|
}
|
|
69
66
|
},
|
|
70
67
|
"sideEffects": [
|
|
@@ -76,34 +73,35 @@
|
|
|
76
73
|
"url": "https://git.elliemae.io/platform-ui/dimsum.git"
|
|
77
74
|
},
|
|
78
75
|
"engines": {
|
|
79
|
-
"
|
|
80
|
-
"node": ">=
|
|
76
|
+
"npm": ">=7",
|
|
77
|
+
"node": ">=14"
|
|
81
78
|
},
|
|
82
79
|
"author": "ICE MT",
|
|
80
|
+
"scripts": {
|
|
81
|
+
"prebuild": "exit 0",
|
|
82
|
+
"predev": "exit 0",
|
|
83
|
+
"build": "node ../../scripts/build/build.js",
|
|
84
|
+
"dev": "cross-env NODE_ENV=development && node ../../scripts/build/build.js -w"
|
|
85
|
+
},
|
|
83
86
|
"publishConfig": {
|
|
84
87
|
"access": "public",
|
|
85
|
-
"
|
|
88
|
+
"directory": "dist",
|
|
89
|
+
"generateSubmodules": true
|
|
86
90
|
},
|
|
87
91
|
"dependencies": {
|
|
88
|
-
"@elliemae/ds-utilities": "2.3.0-
|
|
92
|
+
"@elliemae/ds-utilities": "2.3.0-next.10",
|
|
89
93
|
"polished": "~3.6.7"
|
|
90
94
|
},
|
|
91
95
|
"devDependencies": {
|
|
92
96
|
"@elliemae/pui-theme": "~2.3.0",
|
|
93
|
-
"@testing-library/jest-dom": "~5.15.
|
|
97
|
+
"@testing-library/jest-dom": "~5.15.0",
|
|
94
98
|
"styled-components": "~5.3.3"
|
|
95
99
|
},
|
|
96
100
|
"peerDependencies": {
|
|
97
|
-
"@elliemae/pui-theme": "
|
|
101
|
+
"@elliemae/pui-theme": "~2.3.0",
|
|
98
102
|
"lodash": "^4.17.21",
|
|
99
103
|
"react": "~17.0.2",
|
|
100
104
|
"react-dom": "^17.0.2",
|
|
101
105
|
"styled-components": "^5.3.3"
|
|
102
|
-
},
|
|
103
|
-
"scripts": {
|
|
104
|
-
"prebuild": "exit 0",
|
|
105
|
-
"predev": "exit 0",
|
|
106
|
-
"build": "node ../../scripts/build/build.js",
|
|
107
|
-
"dev": "cross-env NODE_ENV=development && node ../../scripts/build/build.js -w"
|
|
108
106
|
}
|
|
109
107
|
}
|
package/dist/cjs/arithmetic.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(module2))
|
|
15
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (module2, isNodeMode) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
-
var arithmetic_exports = {};
|
|
29
|
-
__export(arithmetic_exports, {
|
|
30
|
-
getNumberAndUnit: () => getNumberAndUnit,
|
|
31
|
-
op: () => op
|
|
32
|
-
});
|
|
33
|
-
var React = __toESM(require("react"));
|
|
34
|
-
function getNumberAndUnit(numberStrWithUnit) {
|
|
35
|
-
const [number, unit] = String(numberStrWithUnit).match(/[a-z]+|[(/^\-?\d*.\d+|\d+),?]+/gi);
|
|
36
|
-
return { number, unit };
|
|
37
|
-
}
|
|
38
|
-
function op(operator, n1, n2) {
|
|
39
|
-
const { number, unit } = getNumberAndUnit(n1);
|
|
40
|
-
const { number: number2, unit: unit2 } = getNumberAndUnit(n2);
|
|
41
|
-
switch (operator) {
|
|
42
|
-
case "*":
|
|
43
|
-
return Number(number) * Number(number2) + (unit || unit2);
|
|
44
|
-
case "+":
|
|
45
|
-
return Number(number) + Number(number2) + (unit || unit2);
|
|
46
|
-
case "-":
|
|
47
|
-
return Number(number) - Number(number2) + (unit || unit2);
|
|
48
|
-
case "/":
|
|
49
|
-
return Number(number) / Number(number2) + (unit || unit2);
|
|
50
|
-
default:
|
|
51
|
-
return Number(number) + Number(number2) + (unit || unit2);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
module.exports = __toCommonJS(arithmetic_exports);
|
|
55
|
-
//# sourceMappingURL=arithmetic.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/arithmetic.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export function getNumberAndUnit(\n numberStrWithUnit: string | number,\n): { number: string; unit: string } {\n const [number, unit] = String(numberStrWithUnit).match(\n /[a-z]+|[(/^\\-?\\d*.\\d+|\\d+),?]+/gi,\n );\n return { number, unit };\n}\n\nexport function op(operator: string, n1: string, n2: string | number): string {\n const { number, unit } = getNumberAndUnit(n1);\n const { number: number2, unit: unit2 } = getNumberAndUnit(n2);\n switch (operator) {\n case '*':\n return Number(number) * Number(number2) + (unit || unit2);\n case '+':\n return Number(number) + Number(number2) + (unit || unit2);\n case '-':\n return Number(number) - Number(number2) + (unit || unit2);\n case '/':\n return Number(number) / Number(number2) + (unit || unit2);\n default:\n return Number(number) + Number(number2) + (unit || unit2);\n }\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,0BACL,mBACkC;AAClC,QAAM,CAAC,QAAQ,QAAQ,OAAO,mBAAmB,MAC/C;AAEF,SAAO,EAAE,QAAQ;AAAA;AAGZ,YAAY,UAAkB,IAAY,IAA6B;AAC5E,QAAM,EAAE,QAAQ,SAAS,iBAAiB;AAC1C,QAAM,EAAE,QAAQ,SAAS,MAAM,UAAU,iBAAiB;AAC1D,UAAQ;AAAA,SACD;AACH,aAAO,OAAO,UAAU,OAAO,WAAY,SAAQ;AAAA,SAChD;AACH,aAAO,OAAO,UAAU,OAAO,WAAY,SAAQ;AAAA,SAChD;AACH,aAAO,OAAO,UAAU,OAAO,WAAY,SAAQ;AAAA,SAChD;AACH,aAAO,OAAO,UAAU,OAAO,WAAY,SAAQ;AAAA;AAEnD,aAAO,OAAO,UAAU,OAAO,WAAY,SAAQ;AAAA;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/cjs/constants.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(module2))
|
|
15
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (module2, isNodeMode) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
-
var constants_exports = {};
|
|
29
|
-
__export(constants_exports, {
|
|
30
|
-
desktopBaseFont: () => desktopBaseFont,
|
|
31
|
-
mobileBaseFont: () => mobileBaseFont,
|
|
32
|
-
translateUnits: () => translateUnits
|
|
33
|
-
});
|
|
34
|
-
var React = __toESM(require("react"));
|
|
35
|
-
const desktopBaseFont = 13;
|
|
36
|
-
const mobileBaseFont = 16;
|
|
37
|
-
const translateUnits = {
|
|
38
|
-
"8px": "4px",
|
|
39
|
-
"16px": "8px",
|
|
40
|
-
"32px": "16px",
|
|
41
|
-
"48px": "24px",
|
|
42
|
-
"56px": "32px",
|
|
43
|
-
"64px": "48px",
|
|
44
|
-
"72px": "64px"
|
|
45
|
-
};
|
|
46
|
-
module.exports = __toCommonJS(constants_exports);
|
|
47
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/constants.ts", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export const desktopBaseFont = 13;\n\nexport const mobileBaseFont = 16;\n\nexport const translateUnits = {\n '8px': '4px',\n '16px': '8px',\n '32px': '16px',\n '48px': '24px',\n '56px': '32px',\n '64px': '48px',\n '72px': '64px',\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,kBAAkB;AAExB,MAAM,iBAAiB;AAEvB,MAAM,iBAAiB;AAAA,EAC5B,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/cjs/globalStyles.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(module2))
|
|
15
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (module2, isNodeMode) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
-
var globalStyles_exports = {};
|
|
29
|
-
__export(globalStyles_exports, {
|
|
30
|
-
GlobalStyles: () => GlobalStyles
|
|
31
|
-
});
|
|
32
|
-
var React = __toESM(require("react"));
|
|
33
|
-
var import_utils = require("./utils");
|
|
34
|
-
const GlobalStyles = import_utils.createGlobalStyle`
|
|
35
|
-
:root, body {
|
|
36
|
-
overscroll-behavior-y: none;
|
|
37
|
-
|
|
38
|
-
font-size: ${(props) => props.device === "desktop" ? "13px" : "16px"};
|
|
39
|
-
|
|
40
|
-
@media(min-width: ${({ theme }) => theme.breakpoints.small}) {
|
|
41
|
-
font-size: ${(props) => props.device === "mobile" ? "16px" : "13px"};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
`;
|
|
46
|
-
module.exports = __toCommonJS(globalStyles_exports);
|
|
47
|
-
//# sourceMappingURL=globalStyles.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/globalStyles.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { createGlobalStyle } from './utils';\n\nexport const GlobalStyles = createGlobalStyle`\n :root, body {\n overscroll-behavior-y: none;\n\n font-size: ${(props) => (props.device === 'desktop' ? '13px' : '16px')};\n\n @media(min-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: ${(props) => (props.device === 'mobile' ? '16px' : '13px')};\n }\n\n }\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkC;AAE3B,MAAM,eAAe;AAAA;AAAA;AAAA;AAAA,iBAIX,CAAC,UAAW,MAAM,WAAW,YAAY,SAAS;AAAA;AAAA,wBAE3C,CAAC,EAAE,YAAY,MAAM,YAAY;AAAA,mBACtC,CAAC,UAAW,MAAM,WAAW,WAAW,SAAS;AAAA;AAAA;AAAA;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/cjs/index.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(module2))
|
|
15
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (module2, isNodeMode) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
-
var src_exports = {};
|
|
29
|
-
__export(src_exports, {
|
|
30
|
-
themeProviderHOC: () => import_themeProviderHOC.themeProviderHOC
|
|
31
|
-
});
|
|
32
|
-
var React = __toESM(require("react"));
|
|
33
|
-
__reExport(src_exports, require("./globalStyles"));
|
|
34
|
-
__reExport(src_exports, require("./spaceUtilities"));
|
|
35
|
-
__reExport(src_exports, require("./mobileUtilities"));
|
|
36
|
-
__reExport(src_exports, require("./utils"));
|
|
37
|
-
__reExport(src_exports, require("./arithmetic"));
|
|
38
|
-
__reExport(src_exports, require("./th"));
|
|
39
|
-
__reExport(src_exports, require("./theme"));
|
|
40
|
-
__reExport(src_exports, require("./styled"));
|
|
41
|
-
var import_themeProviderHOC = require("./themeProviderHOC");
|
|
42
|
-
module.exports = __toCommonJS(src_exports);
|
|
43
|
-
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export * from './globalStyles';\nexport * from './spaceUtilities';\nexport * from './mobileUtilities';\nexport * from './utils';\nexport * from './arithmetic';\nexport * from './th';\nexport * from './theme';\nexport * from './styled';\nexport { themeProviderHOC } from './themeProviderHOC';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc;AACd,wBAAc;AACd,wBAAc;AACd,wBAAc;AACd,wBAAc;AACd,wBAAc;AACd,wBAAc;AACd,wBAAc;AACd,8BAAiC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(module2))
|
|
15
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (module2, isNodeMode) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
-
var mobileUtilities_exports = {};
|
|
29
|
-
__export(mobileUtilities_exports, {
|
|
30
|
-
__UNSAFE_SPACE_TO_DIMSUM: () => __UNSAFE_SPACE_TO_DIMSUM,
|
|
31
|
-
isMobile: () => isMobile,
|
|
32
|
-
toMobile: () => toMobile,
|
|
33
|
-
useIsMobile: () => useIsMobile
|
|
34
|
-
});
|
|
35
|
-
var React = __toESM(require("react"));
|
|
36
|
-
var import_react = require("react");
|
|
37
|
-
var import_theme = require("./theme");
|
|
38
|
-
var import_constants = require("./constants");
|
|
39
|
-
function __UNSAFE_SPACE_TO_DIMSUM(unit) {
|
|
40
|
-
if (import_constants.translateUnits[unit])
|
|
41
|
-
return import_constants.translateUnits[unit];
|
|
42
|
-
return `${parseFloat(unit) * (import_constants.mobileBaseFont / import_constants.desktopBaseFont) / 2}px`;
|
|
43
|
-
}
|
|
44
|
-
function toMobile(unit) {
|
|
45
|
-
if (!isMobile())
|
|
46
|
-
return unit;
|
|
47
|
-
return `${parseFloat(unit) * (import_constants.desktopBaseFont / import_constants.mobileBaseFont)}rem`;
|
|
48
|
-
}
|
|
49
|
-
const useIsMobile = () => {
|
|
50
|
-
const [mobile, setMobile] = (0, import_react.useState)(isMobile());
|
|
51
|
-
(0, import_react.useEffect)(() => {
|
|
52
|
-
function handleResize() {
|
|
53
|
-
setMobile(isMobile());
|
|
54
|
-
}
|
|
55
|
-
if (window)
|
|
56
|
-
window.addEventListener("resize", handleResize);
|
|
57
|
-
return () => {
|
|
58
|
-
if (window)
|
|
59
|
-
window.removeEventListener("resize", handleResize);
|
|
60
|
-
};
|
|
61
|
-
}, []);
|
|
62
|
-
if (!window)
|
|
63
|
-
return false;
|
|
64
|
-
return mobile;
|
|
65
|
-
};
|
|
66
|
-
const isMobile = () => {
|
|
67
|
-
if (!window)
|
|
68
|
-
return false;
|
|
69
|
-
return Number(import_theme.theme.breakpoints.medium.split("px")[0]) - window.innerWidth >= 0;
|
|
70
|
-
};
|
|
71
|
-
module.exports = __toCommonJS(mobileUtilities_exports);
|
|
72
|
-
//# sourceMappingURL=mobileUtilities.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/mobileUtilities.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { useState, useEffect } from 'react';\nimport { theme } from './theme';\nimport { desktopBaseFont, mobileBaseFont, translateUnits } from './constants';\n\n// eslint-disable-next-line no-underscore-dangle\nexport function __UNSAFE_SPACE_TO_DIMSUM(unit: string): string {\n if (translateUnits[unit]) return translateUnits[unit];\n return `${(parseFloat(unit) * (mobileBaseFont / desktopBaseFont)) / 2}px`;\n}\n\nexport function toMobile(unit: string): string {\n if (!isMobile()) return unit;\n return `${parseFloat(unit) * (desktopBaseFont / mobileBaseFont)}rem`;\n}\n\nexport const useIsMobile = (): boolean => {\n const [mobile, setMobile] = useState<boolean>(isMobile());\n useEffect(() => {\n function handleResize() {\n setMobile(isMobile());\n }\n if (window) window.addEventListener('resize', handleResize);\n return () => {\n if (window) window.removeEventListener('resize', handleResize);\n };\n }, []);\n if (!window) return false;\n return mobile;\n};\n\nexport const isMobile = (): boolean => {\n if (!window) return false;\n return (\n Number(theme.breakpoints.medium.split('px')[0]) - window.innerWidth >= 0\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAoC;AACpC,mBAAsB;AACtB,uBAAgE;AAGzD,kCAAkC,MAAsB;AAC7D,MAAI,gCAAe;AAAO,WAAO,gCAAe;AAChD,SAAO,GAAI,WAAW,QAAS,mCAAiB,oCAAoB;AAAA;AAG/D,kBAAkB,MAAsB;AAC7C,MAAI,CAAC;AAAY,WAAO;AACxB,SAAO,GAAG,WAAW,QAAS,oCAAkB;AAAA;AAG3C,MAAM,cAAc,MAAe;AACxC,QAAM,CAAC,QAAQ,aAAa,2BAAkB;AAC9C,8BAAU,MAAM;AACd,4BAAwB;AACtB,gBAAU;AAAA;AAEZ,QAAI;AAAQ,aAAO,iBAAiB,UAAU;AAC9C,WAAO,MAAM;AACX,UAAI;AAAQ,eAAO,oBAAoB,UAAU;AAAA;AAAA,KAElD;AACH,MAAI,CAAC;AAAQ,WAAO;AACpB,SAAO;AAAA;AAGF,MAAM,WAAW,MAAe;AACrC,MAAI,CAAC;AAAQ,WAAO;AACpB,SACE,OAAO,mBAAM,YAAY,OAAO,MAAM,MAAM,MAAM,OAAO,cAAc;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|