@spothero/ui 15.0.0-beta.3 → 15.0.0-beta.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/README.md +2 -2
- package/backlog/Chart/Chart.js +1 -1
- package/backlog/DateTime/DatePicker.js +1 -1
- package/backlog/DateTime/DatePickerCalendar.js +1 -1
- package/backlog/DateTime/DatePickerCalendarWithRange.js +1 -1
- package/backlog/DateTime/DateTimeRangePicker.js +2 -2
- package/backlog/DateTime/TimePicker.js +1 -1
- package/backlog/ErrorBoundary/ErrorBoundary.js +9 -7
- package/backlog/Flyout/Flyout.js +1 -1
- package/backlog/Form/Form.js +2 -2
- package/backlog/GooglePlacesSearchInput/GooglePlacesSearchInput.js +4 -1
- package/backlog/Notification/Notification.js +1 -1
- package/backlog/Portal/Portal.js +1 -1
- package/backlog/RenderInBody/RenderInBody.js +1 -1
- package/backlog/Select/Select.js +1 -1
- package/backlog/SelectControlled/SelectControlled.js +1 -1
- package/backlog/Tooltip/Tooltip.js +1 -1
- package/backlog/v1/components/Image/Image.js +1 -1
- package/backlog/v1/components/Modal/Modal.js +1 -1
- package/backlog/v1/components/Modal/ModalContent.js +1 -1
- package/package.json +21 -11
- package/styles/Chart/Chart.jsx +1 -1
- package/styles/DateTime/DatePicker.jsx +1 -1
- package/styles/DateTime/DatePickerCalendar.jsx +1 -1
- package/styles/DateTime/DatePickerCalendarWithRange.jsx +1 -1
- package/styles/DateTime/DateTimeRangePicker.jsx +2 -2
- package/styles/DateTime/TimePicker.jsx +1 -1
- package/styles/ErrorBoundary/ErrorBoundary.jsx +6 -7
- package/styles/Flyout/Flyout.jsx +1 -1
- package/styles/Form/Form.jsx +2 -2
- package/styles/GooglePlacesSearchInput/GooglePlacesSearchInput.jsx +2 -2
- package/styles/Notification/Notification.jsx +1 -1
- package/styles/Portal/Portal.jsx +1 -1
- package/styles/RenderInBody/RenderInBody.jsx +1 -1
- package/styles/Select/Select.jsx +1 -1
- package/styles/SelectControlled/SelectControlled.jsx +1 -1
- package/styles/Tooltip/Tooltip.jsx +1 -1
- package/styles/v1/components/Image/Image.jsx +1 -1
- package/styles/v1/components/Modal/Modal.jsx +1 -1
- package/styles/v1/components/Modal/ModalContent.jsx +1 -1
- package/styles/v1/components/Modal/stories/Content.stories.js +1 -1
- package/styles/v2/components/Image/Image.jsx +1 -1
- package/styles/v2/components/Modal/Modal.jsx +2 -2
- package/styles/v2/components/Modal/Modal.stories.js +4 -7
- package/v1/index.js +1 -1
- package/v1/index.js.map +1 -1
- package/v2/index.js +1 -1
- package/v2/index.js.map +1 -1
- package/backlog/utils/animation.js +0 -84
- package/backlog/utils/date.js +0 -233
- package/backlog/utils/dom.js +0 -441
- package/backlog/utils/environment.js +0 -422
- package/backlog/utils/number.js +0 -43
- package/backlog/utils/time.js +0 -282
- package/styles/utils/animation.js +0 -75
- package/styles/utils/date.js +0 -226
- package/styles/utils/dom.js +0 -428
- package/styles/utils/environment.js +0 -425
- package/styles/utils/number.js +0 -33
- package/styles/utils/time.js +0 -268
package/README.md
CHANGED
|
@@ -65,7 +65,7 @@ This will spin up a Storybook instance as well as open the Cypress app. The reas
|
|
|
65
65
|
1. Create a directory in `src` with the same name as the component.
|
|
66
66
|
1. Create the properly named component `.jsx` and `.scss` files for the component. Ensure that the Sass file is a partial (starts with `_`, i.e. `_Foo.scss`) so that it doesn't get compiled separately.
|
|
67
67
|
1. Add the Sass partial import to `src/_index.scss`.
|
|
68
|
-
1. Add the React component export to `src/index.js
|
|
68
|
+
1. Add the React component export to `src/index.js`.
|
|
69
69
|
1. Document all PropTypes and public methods accordingly so that they show up in the Storybook documentation properly.
|
|
70
70
|
1. Add a `/stories` directory that has any/all usage examples for the component functionality. Follow the conventions outlined in the other components to do this.
|
|
71
71
|
1. Submit a pull request with your changes.
|
|
@@ -94,7 +94,7 @@ File changes should mimic the following:
|
|
|
94
94
|
...
|
|
95
95
|
```
|
|
96
96
|
|
|
97
|
-
*fe-ui/src/index.js
|
|
97
|
+
*fe-ui/src/index.js*
|
|
98
98
|
```javascript
|
|
99
99
|
...
|
|
100
100
|
import Foo from './Foo/Foo';
|
package/backlog/Chart/Chart.js
CHANGED
|
@@ -47,7 +47,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
47
47
|
|
|
48
48
|
var _chartist = _interopRequireDefault(require("chartist"));
|
|
49
49
|
|
|
50
|
-
var _dom = _interopRequireDefault(require("
|
|
50
|
+
var _dom = _interopRequireDefault(require("@spothero/utils/dom"));
|
|
51
51
|
|
|
52
52
|
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
53
53
|
|
|
@@ -47,7 +47,7 @@ var _omit = _interopRequireDefault(require("lodash/omit"));
|
|
|
47
47
|
|
|
48
48
|
var _calendar = _interopRequireDefault(require("@spothero/icons/calendar"));
|
|
49
49
|
|
|
50
|
-
var _dom = _interopRequireDefault(require("
|
|
50
|
+
var _dom = _interopRequireDefault(require("@spothero/utils/dom"));
|
|
51
51
|
|
|
52
52
|
var _DatePickerCalendar = _interopRequireDefault(require("./DatePickerCalendar"));
|
|
53
53
|
|
|
@@ -41,7 +41,7 @@ var _moment = _interopRequireDefault(require("moment"));
|
|
|
41
41
|
|
|
42
42
|
var _reactDayPicker = _interopRequireWildcard(require("react-day-picker"));
|
|
43
43
|
|
|
44
|
-
var _date = _interopRequireDefault(require("
|
|
44
|
+
var _date = _interopRequireDefault(require("@spothero/utils/date"));
|
|
45
45
|
|
|
46
46
|
var _DatePickerCalendarNavigation = _interopRequireDefault(require("./DatePickerCalendarNavigation"));
|
|
47
47
|
|
|
@@ -47,7 +47,7 @@ var _moment = _interopRequireDefault(require("moment"));
|
|
|
47
47
|
|
|
48
48
|
var _reactDayPicker = _interopRequireWildcard(require("react-day-picker"));
|
|
49
49
|
|
|
50
|
-
var _date = _interopRequireDefault(require("
|
|
50
|
+
var _date = _interopRequireDefault(require("@spothero/utils/date"));
|
|
51
51
|
|
|
52
52
|
var _DatePickerCalendarNavigation = _interopRequireDefault(require("./DatePickerCalendarNavigation"));
|
|
53
53
|
|
|
@@ -43,9 +43,9 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
43
43
|
|
|
44
44
|
var _v = _interopRequireDefault(require("uuid/v4"));
|
|
45
45
|
|
|
46
|
-
var _date = _interopRequireDefault(require("
|
|
46
|
+
var _date = _interopRequireDefault(require("@spothero/utils/date"));
|
|
47
47
|
|
|
48
|
-
var _time = _interopRequireDefault(require("
|
|
48
|
+
var _time = _interopRequireDefault(require("@spothero/utils/time"));
|
|
49
49
|
|
|
50
50
|
var _DateTimePicker = _interopRequireDefault(require("./DateTimePicker"));
|
|
51
51
|
|
|
@@ -45,7 +45,7 @@ var _omit = _interopRequireDefault(require("lodash/omit"));
|
|
|
45
45
|
|
|
46
46
|
var _clock = _interopRequireDefault(require("@spothero/icons/clock"));
|
|
47
47
|
|
|
48
|
-
var _time = _interopRequireDefault(require("
|
|
48
|
+
var _time = _interopRequireDefault(require("@spothero/utils/time"));
|
|
49
49
|
|
|
50
50
|
var _Select = _interopRequireDefault(require("../Select/Select"));
|
|
51
51
|
|
|
@@ -35,6 +35,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
35
35
|
|
|
36
36
|
var _react = _interopRequireWildcard(require("react"));
|
|
37
37
|
|
|
38
|
+
var _sentry = _interopRequireDefault(require("@spothero/utils/sentry"));
|
|
39
|
+
|
|
38
40
|
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
39
41
|
|
|
40
42
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -43,7 +45,6 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
43
45
|
|
|
44
46
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
45
47
|
|
|
46
|
-
// import SentryUtils from '@spothero/utils/sentry';
|
|
47
48
|
var ErrorBoundary = /*#__PURE__*/function (_Component) {
|
|
48
49
|
(0, _inherits2.default)(ErrorBoundary, _Component);
|
|
49
50
|
|
|
@@ -81,12 +82,13 @@ var ErrorBoundary = /*#__PURE__*/function (_Component) {
|
|
|
81
82
|
onError(error, info);
|
|
82
83
|
}
|
|
83
84
|
|
|
84
|
-
if (reportToSentry) {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
85
|
+
if (reportToSentry) {
|
|
86
|
+
_sentry.default.addData(info);
|
|
87
|
+
|
|
88
|
+
_sentry.default.sendMessage({
|
|
89
|
+
message: error.message,
|
|
90
|
+
level: 'error'
|
|
91
|
+
});
|
|
90
92
|
}
|
|
91
93
|
}
|
|
92
94
|
}, {
|
package/backlog/Flyout/Flyout.js
CHANGED
|
@@ -43,7 +43,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
43
43
|
|
|
44
44
|
var _times = _interopRequireDefault(require("@spothero/icons/times"));
|
|
45
45
|
|
|
46
|
-
var _dom = _interopRequireDefault(require("
|
|
46
|
+
var _dom = _interopRequireDefault(require("@spothero/utils/dom"));
|
|
47
47
|
|
|
48
48
|
var _Button = _interopRequireDefault(require("../v1/components/Button/Button"));
|
|
49
49
|
|
package/backlog/Form/Form.js
CHANGED
|
@@ -35,9 +35,9 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
35
35
|
|
|
36
36
|
var _formSerialize = _interopRequireDefault(require("form-serialize"));
|
|
37
37
|
|
|
38
|
-
var _animation = _interopRequireDefault(require("
|
|
38
|
+
var _animation = _interopRequireDefault(require("@spothero/utils/animation"));
|
|
39
39
|
|
|
40
|
-
var _dom = _interopRequireDefault(require("
|
|
40
|
+
var _dom = _interopRequireDefault(require("@spothero/utils/dom"));
|
|
41
41
|
|
|
42
42
|
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
43
43
|
|
|
@@ -51,6 +51,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
51
51
|
|
|
52
52
|
var _search = _interopRequireDefault(require("@spothero/icons/search"));
|
|
53
53
|
|
|
54
|
+
var _environment = _interopRequireDefault(require("@spothero/utils/environment"));
|
|
55
|
+
|
|
54
56
|
var _AutoSuggestInput = _interopRequireDefault(require("../AutoSuggestInput/AutoSuggestInput"));
|
|
55
57
|
|
|
56
58
|
var _TextInputPropTypes = _interopRequireDefault(require("../TextInput/TextInputPropTypes"));
|
|
@@ -182,7 +184,8 @@ var GooglePlacesSearchInput = /*#__PURE__*/function (_Component) {
|
|
|
182
184
|
});
|
|
183
185
|
});
|
|
184
186
|
var googleMaps = props.googleMaps;
|
|
185
|
-
|
|
187
|
+
|
|
188
|
+
var isBrowser = _environment.default.isBrowser();
|
|
186
189
|
|
|
187
190
|
_this._suggestionFetch = (0, _throttle.default)(_this._searchSuggestions, 500);
|
|
188
191
|
_this._gmaps = googleMaps;
|
|
@@ -47,7 +47,7 @@ var _heroCar = _interopRequireDefault(require("@spothero/icons/hero-car"));
|
|
|
47
47
|
|
|
48
48
|
var _times = _interopRequireDefault(require("@spothero/icons/times"));
|
|
49
49
|
|
|
50
|
-
var _dom = _interopRequireDefault(require("
|
|
50
|
+
var _dom = _interopRequireDefault(require("@spothero/utils/dom"));
|
|
51
51
|
|
|
52
52
|
var _Button = _interopRequireDefault(require("../v1/components/Button/Button"));
|
|
53
53
|
|
package/backlog/Portal/Portal.js
CHANGED
|
@@ -39,7 +39,7 @@ var _reactRedux = require("react-redux");
|
|
|
39
39
|
|
|
40
40
|
var _ssrWindow = require("ssr-window");
|
|
41
41
|
|
|
42
|
-
var _dom = _interopRequireDefault(require("
|
|
42
|
+
var _dom = _interopRequireDefault(require("@spothero/utils/dom"));
|
|
43
43
|
|
|
44
44
|
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
45
45
|
|
|
@@ -31,7 +31,7 @@ var _reactDom = require("react-dom");
|
|
|
31
31
|
|
|
32
32
|
var _reactRedux = require("react-redux");
|
|
33
33
|
|
|
34
|
-
var _dom = _interopRequireDefault(require("
|
|
34
|
+
var _dom = _interopRequireDefault(require("@spothero/utils/dom"));
|
|
35
35
|
|
|
36
36
|
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
37
37
|
|
package/backlog/Select/Select.js
CHANGED
|
@@ -49,7 +49,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
49
49
|
|
|
50
50
|
var _chevronDown = _interopRequireDefault(require("@spothero/icons/chevron-down"));
|
|
51
51
|
|
|
52
|
-
var _dom = _interopRequireDefault(require("
|
|
52
|
+
var _dom = _interopRequireDefault(require("@spothero/utils/dom"));
|
|
53
53
|
|
|
54
54
|
var _Loader = _interopRequireDefault(require("../v1/components/Loader/Loader"));
|
|
55
55
|
|
|
@@ -47,7 +47,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
47
47
|
|
|
48
48
|
var _chevronDown = _interopRequireDefault(require("@spothero/icons/chevron-down"));
|
|
49
49
|
|
|
50
|
-
var _dom = _interopRequireDefault(require("
|
|
50
|
+
var _dom = _interopRequireDefault(require("@spothero/utils/dom"));
|
|
51
51
|
|
|
52
52
|
var _Loader = _interopRequireDefault(require("../v1/components/Loader/Loader"));
|
|
53
53
|
|
|
@@ -37,7 +37,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
37
37
|
|
|
38
38
|
var _times = _interopRequireDefault(require("@spothero/icons/times"));
|
|
39
39
|
|
|
40
|
-
var _dom = _interopRequireDefault(require("
|
|
40
|
+
var _dom = _interopRequireDefault(require("@spothero/utils/dom"));
|
|
41
41
|
|
|
42
42
|
var _Button = _interopRequireDefault(require("../v1/components/Button/Button"));
|
|
43
43
|
|
|
@@ -43,7 +43,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
43
43
|
|
|
44
44
|
var _reactLazyLoad = _interopRequireDefault(require("react-lazy-load"));
|
|
45
45
|
|
|
46
|
-
var _environment = _interopRequireDefault(require("
|
|
46
|
+
var _environment = _interopRequireDefault(require("@spothero/utils/environment"));
|
|
47
47
|
|
|
48
48
|
var _PulseLoader = _interopRequireDefault(require("../../../PulseLoader/PulseLoader"));
|
|
49
49
|
|
|
@@ -41,7 +41,7 @@ var _chevronLeft = _interopRequireDefault(require("@spothero/icons/chevron-left"
|
|
|
41
41
|
|
|
42
42
|
var _times = _interopRequireDefault(require("@spothero/icons/times"));
|
|
43
43
|
|
|
44
|
-
var _dom = _interopRequireDefault(require("
|
|
44
|
+
var _dom = _interopRequireDefault(require("@spothero/utils/dom"));
|
|
45
45
|
|
|
46
46
|
var _Button = _interopRequireDefault(require("../Button/Button"));
|
|
47
47
|
|
|
@@ -41,7 +41,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
41
41
|
|
|
42
42
|
var _ssrWindow = require("ssr-window");
|
|
43
43
|
|
|
44
|
-
var _dom = _interopRequireDefault(require("
|
|
44
|
+
var _dom = _interopRequireDefault(require("@spothero/utils/dom"));
|
|
45
45
|
|
|
46
46
|
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
47
47
|
|
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spothero/ui",
|
|
3
|
-
"version": "15.0.0-beta.
|
|
3
|
+
"version": "15.0.0-beta.4",
|
|
4
4
|
"description": "SpotHero's React component UI library.",
|
|
5
5
|
"main": "v2/index.js",
|
|
6
|
-
"module": "v2/index.js",
|
|
7
6
|
"repository": "https://github.com/spothero/fe-monorepo",
|
|
8
7
|
"babel": {
|
|
9
8
|
"presets": [
|
|
@@ -81,15 +80,15 @@
|
|
|
81
80
|
"@babel/runtime-corejs3": "7.14.7",
|
|
82
81
|
"@cypress/browserify-preprocessor": "3.0.1",
|
|
83
82
|
"@jackfranklin/test-data-bot": "1.3.0",
|
|
84
|
-
"@spothero/babel-preset-spothero": "
|
|
85
|
-
"@spothero/browserslist-config": "
|
|
86
|
-
"@spothero/core": "
|
|
87
|
-
"@spothero/dex": "
|
|
88
|
-
"@spothero/eslint-config": "
|
|
89
|
-
"@spothero/icons": "
|
|
90
|
-
"@spothero/npm-publisher": "
|
|
91
|
-
"@spothero/prettier-config": "
|
|
92
|
-
"@spothero/stylelint-config": "
|
|
83
|
+
"@spothero/babel-preset-spothero": "*",
|
|
84
|
+
"@spothero/browserslist-config": "*",
|
|
85
|
+
"@spothero/core": "*",
|
|
86
|
+
"@spothero/dex": "*",
|
|
87
|
+
"@spothero/eslint-config": "*",
|
|
88
|
+
"@spothero/icons": "*",
|
|
89
|
+
"@spothero/npm-publisher": "*",
|
|
90
|
+
"@spothero/prettier-config": "*",
|
|
91
|
+
"@spothero/stylelint-config": "*",
|
|
93
92
|
"@storybook/addon-actions": "6.3.13",
|
|
94
93
|
"@storybook/addon-essentials": "6.3.13",
|
|
95
94
|
"@storybook/addon-links": "6.3.13",
|
|
@@ -133,6 +132,7 @@
|
|
|
133
132
|
"@chakra-ui/theme-tools": "1.3.6",
|
|
134
133
|
"@emotion/react": "11.1.5",
|
|
135
134
|
"@emotion/styled": "11.1.5",
|
|
135
|
+
"@spothero/utils": "*",
|
|
136
136
|
"@storybook/addon-a11y": "6.3.4",
|
|
137
137
|
"axe-core": "4.1.3",
|
|
138
138
|
"chartist": "0.11.4",
|
|
@@ -153,5 +153,15 @@
|
|
|
153
153
|
"ssr-window": "1.0.1",
|
|
154
154
|
"transitionEnd": "1.0.2",
|
|
155
155
|
"uuid": "3.3.3"
|
|
156
|
+
},
|
|
157
|
+
"peerDependencies": {
|
|
158
|
+
"classnames": "^2.2.6",
|
|
159
|
+
"lodash": "4.17.21",
|
|
160
|
+
"moment": "^2.27.0",
|
|
161
|
+
"prop-types": "^15.7.2",
|
|
162
|
+
"react": ">=16.0.0",
|
|
163
|
+
"react-dom": ">=16.0.0",
|
|
164
|
+
"react-redux": ">=7.0.0",
|
|
165
|
+
"redux": ">=4.0.0"
|
|
156
166
|
}
|
|
157
167
|
}
|
package/styles/Chart/Chart.jsx
CHANGED
|
@@ -4,7 +4,7 @@ import React, {Component} from 'react';
|
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
6
|
import Chartist from 'chartist';
|
|
7
|
-
import DOMUtils from '
|
|
7
|
+
import DOMUtils from '@spothero/utils/dom';
|
|
8
8
|
|
|
9
9
|
export default class Chart extends Component {
|
|
10
10
|
static propTypes = {
|
|
@@ -6,7 +6,7 @@ import {document} from 'ssr-window';
|
|
|
6
6
|
import TetherComponent from 'react-tether';
|
|
7
7
|
import omit from 'lodash/omit';
|
|
8
8
|
import IconCalendar from '@spothero/icons/calendar';
|
|
9
|
-
import DOMUtils from '
|
|
9
|
+
import DOMUtils from '@spothero/utils/dom';
|
|
10
10
|
import DatePickerCalendar from './DatePickerCalendar';
|
|
11
11
|
import TextInput from '../TextInput/TextInput';
|
|
12
12
|
import Portal from '../Portal/Portal';
|
|
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
import moment from 'moment';
|
|
6
6
|
import DayPicker, {DateUtils as DayPickerDateUtils} from 'react-day-picker';
|
|
7
|
-
import DateUtils from '
|
|
7
|
+
import DateUtils from '@spothero/utils/date';
|
|
8
8
|
import DatePickerCalendarNavigation from './DatePickerCalendarNavigation';
|
|
9
9
|
|
|
10
10
|
const DATE = new Date();
|
|
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import moment from 'moment';
|
|
5
5
|
import DayPicker, {DateUtils as DayPickerDateUtils} from 'react-day-picker';
|
|
6
|
-
import DateUtils from '
|
|
6
|
+
import DateUtils from '@spothero/utils/date';
|
|
7
7
|
import DatePickerCalendarNavigation from './DatePickerCalendarNavigation';
|
|
8
8
|
|
|
9
9
|
const DATE = new Date();
|
|
@@ -2,8 +2,8 @@ import React, {Component} from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import uuidV4 from 'uuid/v4';
|
|
5
|
-
import DateUtils from '
|
|
6
|
-
import TimeUtils from '
|
|
5
|
+
import DateUtils from '@spothero/utils/date';
|
|
6
|
+
import TimeUtils from '@spothero/utils/time';
|
|
7
7
|
import DateTimePicker from './DateTimePicker';
|
|
8
8
|
|
|
9
9
|
const TOOLTIP_TYPES = ['date', 'time', 'none'];
|
|
@@ -4,7 +4,7 @@ import classNames from 'classnames';
|
|
|
4
4
|
import moment from 'moment';
|
|
5
5
|
import omit from 'lodash/omit';
|
|
6
6
|
import IconClock from '@spothero/icons/clock';
|
|
7
|
-
import TimeUtils from '
|
|
7
|
+
import TimeUtils from '@spothero/utils/time';
|
|
8
8
|
import Select from '../Select/Select';
|
|
9
9
|
|
|
10
10
|
export default class TimePicker extends Component {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import React, {Component} from 'react';
|
|
4
|
-
|
|
4
|
+
import SentryUtils from '@spothero/utils/sentry';
|
|
5
5
|
|
|
6
6
|
export default class ErrorBoundary extends Component {
|
|
7
7
|
static propTypes = {
|
|
@@ -40,12 +40,11 @@ export default class ErrorBoundary extends Component {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
if (reportToSentry) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
// });
|
|
43
|
+
SentryUtils.addData(info);
|
|
44
|
+
SentryUtils.sendMessage({
|
|
45
|
+
message: error.message,
|
|
46
|
+
level: 'error',
|
|
47
|
+
});
|
|
49
48
|
}
|
|
50
49
|
}
|
|
51
50
|
|
package/styles/Flyout/Flyout.jsx
CHANGED
|
@@ -3,7 +3,7 @@ import React, {Component} from 'react';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
import IconTimes from '@spothero/icons/times';
|
|
6
|
-
import DOMUtils from '
|
|
6
|
+
import DOMUtils from '@spothero/utils/dom';
|
|
7
7
|
import Button from 'v1/components/Button/Button';
|
|
8
8
|
import Portal from '../Portal/Portal';
|
|
9
9
|
|
package/styles/Form/Form.jsx
CHANGED
|
@@ -2,8 +2,8 @@ import React, {Component} from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import serialize from 'form-serialize';
|
|
5
|
-
import AnimationUtils from '
|
|
6
|
-
import DOMUtils from '
|
|
5
|
+
import AnimationUtils from '@spothero/utils/animation';
|
|
6
|
+
import DOMUtils from '@spothero/utils/dom';
|
|
7
7
|
|
|
8
8
|
export default class Form extends Component {
|
|
9
9
|
static propTypes = {
|
|
@@ -3,7 +3,7 @@ import React, {Component} from 'react';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
import IconSearch from '@spothero/icons/search';
|
|
6
|
-
|
|
6
|
+
import EnvironmentUtils from '@spothero/utils/environment';
|
|
7
7
|
import AutoSuggestInput from '../AutoSuggestInput/AutoSuggestInput';
|
|
8
8
|
import TextInputPropTypes from '../TextInput/TextInputPropTypes';
|
|
9
9
|
|
|
@@ -50,7 +50,7 @@ export default class GooglePlacesSearchInput extends Component {
|
|
|
50
50
|
super(props);
|
|
51
51
|
|
|
52
52
|
const {googleMaps} = props;
|
|
53
|
-
const isBrowser =
|
|
53
|
+
const isBrowser = EnvironmentUtils.isBrowser();
|
|
54
54
|
|
|
55
55
|
this._suggestionFetch = throttle(this._searchSuggestions, 500);
|
|
56
56
|
this._gmaps = googleMaps;
|
|
@@ -8,7 +8,7 @@ import IconExclamationCircle from '@spothero/icons/exclamation-circle';
|
|
|
8
8
|
import IconExclamationTriangle from '@spothero/icons/exclamation-triangle';
|
|
9
9
|
import IconHeroCar from '@spothero/icons/hero-car';
|
|
10
10
|
import IconTimes from '@spothero/icons/times';
|
|
11
|
-
import DOMUtils from '
|
|
11
|
+
import DOMUtils from '@spothero/utils/dom';
|
|
12
12
|
import Button from 'v1/components/Button/Button';
|
|
13
13
|
import NotificationPropTypes from './NotificationPropTypes';
|
|
14
14
|
|
package/styles/Portal/Portal.jsx
CHANGED
|
@@ -5,7 +5,7 @@ import {createPortal} from 'react-dom';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import {Provider} from 'react-redux';
|
|
7
7
|
import {document} from 'ssr-window';
|
|
8
|
-
import DOMUtils from '
|
|
8
|
+
import DOMUtils from '@spothero/utils/dom';
|
|
9
9
|
|
|
10
10
|
export default class Portal extends PureComponent {
|
|
11
11
|
static propTypes = {
|
|
@@ -2,7 +2,7 @@ import React, {Component} from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import {unmountComponentAtNode, render as renderDOM} from 'react-dom';
|
|
4
4
|
import {Provider} from 'react-redux';
|
|
5
|
-
import DOMUtils from '
|
|
5
|
+
import DOMUtils from '@spothero/utils/dom';
|
|
6
6
|
|
|
7
7
|
export default class RenderInBody extends Component {
|
|
8
8
|
static propTypes = {
|
package/styles/Select/Select.jsx
CHANGED
|
@@ -3,7 +3,7 @@ import React, {Component, cloneElement} from 'react';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import cn from 'classnames';
|
|
5
5
|
import IconChevronDown from '@spothero/icons/chevron-down';
|
|
6
|
-
import DOMUtils from '
|
|
6
|
+
import DOMUtils from '@spothero/utils/dom';
|
|
7
7
|
import Loader from 'v1/components/Loader/Loader';
|
|
8
8
|
import omit from 'lodash/omit';
|
|
9
9
|
// import {
|
|
@@ -3,7 +3,7 @@ import React, {Component, cloneElement} from 'react';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import cn from 'classnames';
|
|
5
5
|
import IconChevronDown from '@spothero/icons/chevron-down';
|
|
6
|
-
import DOMUtils from '
|
|
6
|
+
import DOMUtils from '@spothero/utils/dom';
|
|
7
7
|
import Loader from 'v1/components/Loader/Loader';
|
|
8
8
|
// import {
|
|
9
9
|
// SelectItemPropTypes,
|
|
@@ -3,7 +3,7 @@ import React, {Component} from 'react';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
import IconTimes from '@spothero/icons/times';
|
|
6
|
-
import DOMUtils from '
|
|
6
|
+
import DOMUtils from '@spothero/utils/dom';
|
|
7
7
|
import Button from 'v1/components/Button/Button';
|
|
8
8
|
import Portal from '../Portal/Portal';
|
|
9
9
|
|
|
@@ -4,7 +4,7 @@ import React, {Component} from 'react';
|
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
6
|
import LazyLoad from 'react-lazy-load';
|
|
7
|
-
import EnvironmentUtils from '
|
|
7
|
+
import EnvironmentUtils from '@spothero/utils/environment';
|
|
8
8
|
import PulseLoader from '../../../PulseLoader/PulseLoader';
|
|
9
9
|
|
|
10
10
|
export default class Image extends Component {
|
|
@@ -5,7 +5,7 @@ import PropTypes from 'prop-types';
|
|
|
5
5
|
import classNames from 'classnames';
|
|
6
6
|
import IconChevronLeft from '@spothero/icons/chevron-left';
|
|
7
7
|
import IconTimes from '@spothero/icons/times';
|
|
8
|
-
import DOMUtils from '
|
|
8
|
+
import DOMUtils from '@spothero/utils/dom';
|
|
9
9
|
import Button from 'v1/components/Button/Button';
|
|
10
10
|
import Portal from '../../../Portal/Portal';
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@ import React, {Component} from 'react';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import classNames from 'classnames';
|
|
7
7
|
import {document, window} from 'ssr-window';
|
|
8
|
-
import DOMUtils from '
|
|
8
|
+
import DOMUtils from '@spothero/utils/dom';
|
|
9
9
|
|
|
10
10
|
export default class ModalContent extends Component {
|
|
11
11
|
static propTypes = {
|
|
@@ -3,7 +3,7 @@ import Button from 'v1/components/Button/Button';
|
|
|
3
3
|
import Modal from '../Modal';
|
|
4
4
|
import ModalContent from '../ModalContent';
|
|
5
5
|
import ErrorBoundary from '../../../../ErrorBoundary/ErrorBoundary';
|
|
6
|
-
import DOMUtils from '
|
|
6
|
+
import DOMUtils from '@spothero/utils/dom';
|
|
7
7
|
|
|
8
8
|
export default {
|
|
9
9
|
component: Modal,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import {Image as ChakraImage, Img as ChakraImg} from '@chakra-ui/react';
|
|
4
|
-
import EnvironmentUtils from '
|
|
4
|
+
import EnvironmentUtils from '@spothero/utils/environment';
|
|
5
5
|
import template from 'lodash/template';
|
|
6
6
|
|
|
7
7
|
const buildCloudinarySrc = ({
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
import headerStyles from './styles/header';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
* @param {boolean} isMobile - Whether or not the
|
|
17
|
+
* @param {boolean} isMobile - Whether or not the Modal is opened in a mobile viewport
|
|
18
18
|
* @param {boolean} isOpen - Whether or not the Modal is open
|
|
19
19
|
* @param {React.ReactNode} children - The header text of the modal
|
|
20
20
|
* @param {()=>void} [onClose] - Callback invoked to close the Modal. Not required, but strongly suggested.
|
|
@@ -52,7 +52,7 @@ const Modal = forwardRef((props, ref) => {
|
|
|
52
52
|
export default Modal;
|
|
53
53
|
|
|
54
54
|
Modal.propTypes = {
|
|
55
|
-
/** Whether or not the
|
|
55
|
+
/** Whether or not the Modal is opened in a mobile viewport */
|
|
56
56
|
isMobile: PropTypes.bool.isRequired,
|
|
57
57
|
/** Whether or not the Modal is open */
|
|
58
58
|
isOpen: PropTypes.bool.isRequired,
|
|
@@ -45,8 +45,7 @@ export default {
|
|
|
45
45
|
|
|
46
46
|
export const Transactional = props => {
|
|
47
47
|
const [open, setOpen] = useState(false);
|
|
48
|
-
const
|
|
49
|
-
const isMobile = breakpoint?.includes('base');
|
|
48
|
+
const isMobile = useBreakpointValue({base: true, tablet: false});
|
|
50
49
|
|
|
51
50
|
return (
|
|
52
51
|
<Box>
|
|
@@ -58,7 +57,6 @@ export const Transactional = props => {
|
|
|
58
57
|
|
|
59
58
|
<Modal
|
|
60
59
|
{...props}
|
|
61
|
-
isMobile={isMobile}
|
|
62
60
|
footer={
|
|
63
61
|
<>
|
|
64
62
|
<Button
|
|
@@ -76,6 +74,7 @@ export const Transactional = props => {
|
|
|
76
74
|
</Button>
|
|
77
75
|
</>
|
|
78
76
|
}
|
|
77
|
+
isMobile={isMobile}
|
|
79
78
|
isOpen={open}
|
|
80
79
|
onClose={() => setOpen(false)}
|
|
81
80
|
>
|
|
@@ -97,8 +96,7 @@ Transactional.args = {
|
|
|
97
96
|
|
|
98
97
|
export const Passive = props => {
|
|
99
98
|
const [open, setOpen] = useState(false);
|
|
100
|
-
const
|
|
101
|
-
const isMobile = breakpoint?.includes('base');
|
|
99
|
+
const isMobile = useBreakpointValue({base: true, tablet: false});
|
|
102
100
|
|
|
103
101
|
return (
|
|
104
102
|
<Box>
|
|
@@ -128,8 +126,7 @@ Passive.args = {
|
|
|
128
126
|
export const TransactionalWithExpandingContent = props => {
|
|
129
127
|
const [open, setOpen] = useState(false);
|
|
130
128
|
const accordionRefs = [React.createRef(), React.createRef()];
|
|
131
|
-
const
|
|
132
|
-
const isMobile = breakpoint?.includes('base');
|
|
129
|
+
const isMobile = useBreakpointValue({base: true, tablet: false});
|
|
133
130
|
|
|
134
131
|
const handleAccordionChange = index => {
|
|
135
132
|
if (accordionRefs[index]) {
|