@elliemae/ds-spinner 1.60.0 → 2.0.0-alpha.12
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/DSSpinner.js +73 -59
- package/cjs/index.js +1 -7
- package/esm/DSSpinner.js +69 -55
- package/esm/index.js +0 -6
- package/package.json +31 -10
- package/types/DSSpinner.d.ts +52 -0
- package/types/index.d.ts +2 -0
- package/DSSpinner/package.json +0 -10
- package/cjs/DSSpinner.js.map +0 -1
- package/cjs/index.js.map +0 -1
- package/esm/DSSpinner.js.map +0 -1
- package/esm/index.js.map +0 -1
package/cjs/DSSpinner.js
CHANGED
|
@@ -2,75 +2,91 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
6
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
7
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
8
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
10
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
11
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
12
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
7
|
-
|
|
13
|
+
require('react');
|
|
8
14
|
var reactDesc = require('react-desc');
|
|
9
15
|
var dsClassnames = require('@elliemae/ds-classnames');
|
|
16
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
10
17
|
|
|
11
18
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
19
|
|
|
13
|
-
var
|
|
20
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
21
|
+
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
14
22
|
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
15
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
16
23
|
|
|
17
|
-
var
|
|
18
|
-
var blockName = 'spinner';
|
|
19
|
-
var SpinnerContainer = dsClassnames.aggregatedClasses('div')(blockName);
|
|
20
|
-
var SpinnerMessage = dsClassnames.aggregatedClasses('span')(blockName, 'message');
|
|
21
|
-
var Spinner = dsClassnames.aggregatedClasses('div')(blockName, 'spinner'); // TODO: do we want dynamic position of the text (top, right, bottom, left)?
|
|
24
|
+
var _svg, _svg2, _svg3, _svg4;
|
|
22
25
|
|
|
23
|
-
|
|
24
|
-
var _ref$containerProps = _ref.containerProps,
|
|
25
|
-
containerProps = _ref$containerProps === void 0 ? {} : _ref$containerProps,
|
|
26
|
-
innerRef = _ref.innerRef,
|
|
27
|
-
message = _ref.message,
|
|
28
|
-
size = _ref.size,
|
|
29
|
-
otherProps = _objectWithoutProperties__default['default'](_ref, _excluded);
|
|
26
|
+
const _excluded = ["containerProps", "innerRef", "message", "size"];
|
|
30
27
|
|
|
31
|
-
|
|
28
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
29
|
+
|
|
30
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
31
|
+
const blockName = 'spinner';
|
|
32
|
+
const SpinnerContainer = dsClassnames.aggregatedClasses('div')(blockName);
|
|
33
|
+
const SpinnerMessage = dsClassnames.aggregatedClasses('span')(blockName, 'message');
|
|
34
|
+
const Spinner = dsClassnames.aggregatedClasses('div')(blockName, 'spinner'); // TODO: do we want dynamic position of the text (top, right, bottom, left)?
|
|
35
|
+
|
|
36
|
+
const DSSpinner = _ref => {
|
|
37
|
+
let {
|
|
38
|
+
containerProps = {},
|
|
39
|
+
innerRef,
|
|
40
|
+
message,
|
|
41
|
+
size
|
|
42
|
+
} = _ref,
|
|
43
|
+
otherProps = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
44
|
+
|
|
45
|
+
return /*#__PURE__*/jsxRuntime.jsxs(SpinnerContainer, _objectSpread(_objectSpread(_objectSpread({}, containerProps), {}, {
|
|
32
46
|
ref: innerRef,
|
|
33
47
|
"aria-busy": true,
|
|
34
48
|
"aria-label": message,
|
|
35
49
|
"aria-live": "polite",
|
|
36
50
|
role: "alert"
|
|
37
|
-
}, otherProps),
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
51
|
+
}, otherProps), {}, {
|
|
52
|
+
children: [/*#__PURE__*/_jsx__default["default"](Spinner, {
|
|
53
|
+
classProps: {
|
|
54
|
+
size
|
|
55
|
+
}
|
|
56
|
+
}, void 0, _svg || (_svg = /*#__PURE__*/_jsx__default["default"]("svg", {
|
|
57
|
+
className: "".concat(blockName, "-tl"),
|
|
58
|
+
viewBox: "0 0 16.6 16.6",
|
|
59
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
60
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"]("path", {
|
|
61
|
+
d: "M16.1.5A15.6,15.6,0,0,0,.5,16.1,15.6,15.6,0,0,0,16.1.5Z",
|
|
62
|
+
fill: "#408a90",
|
|
63
|
+
stroke: "#fbfbfb"
|
|
64
|
+
}))), _svg2 || (_svg2 = /*#__PURE__*/_jsx__default["default"]("svg", {
|
|
65
|
+
className: "".concat(blockName, "-tr"),
|
|
66
|
+
viewBox: "0 0 16.6 16.6",
|
|
67
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
68
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"]("path", {
|
|
69
|
+
d: "M16.1,16.1A15.6,15.6,0,0,0,.5.5,15.6,15.6,0,0,0,16.1,16.1Z",
|
|
70
|
+
fill: "#f7901e",
|
|
71
|
+
stroke: "#fbfbfb"
|
|
72
|
+
}))), _svg3 || (_svg3 = /*#__PURE__*/_jsx__default["default"]("svg", {
|
|
73
|
+
className: "".concat(blockName, "-br"),
|
|
74
|
+
viewBox: "0 0 16.6 16.6",
|
|
75
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
76
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"]("path", {
|
|
77
|
+
d: "M.5.5A15.6,15.6,0,0,0,16.1,16.1,15.6,15.6,0,0,0,.5.5Z",
|
|
78
|
+
fill: "#0067ab",
|
|
79
|
+
stroke: "#fbfbfb"
|
|
80
|
+
}))), _svg4 || (_svg4 = /*#__PURE__*/_jsx__default["default"]("svg", {
|
|
81
|
+
className: "".concat(blockName, "-bl"),
|
|
82
|
+
viewBox: "0 0 16.6 16.6",
|
|
83
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
84
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"]("path", {
|
|
85
|
+
d: "M16.1.5A15.6,15.6,0,0,0,.5,16.1,15.6,15.6,0,0,0,16.1.5Z",
|
|
86
|
+
fill: "#00acdc",
|
|
87
|
+
stroke: "#fbfbfb"
|
|
88
|
+
})))), message && /*#__PURE__*/_jsx__default["default"](SpinnerMessage, {}, void 0, message)]
|
|
89
|
+
}));
|
|
74
90
|
};
|
|
75
91
|
|
|
76
92
|
DSSpinner.defaultProps = {
|
|
@@ -78,17 +94,15 @@ DSSpinner.defaultProps = {
|
|
|
78
94
|
message: '',
|
|
79
95
|
size: 'm'
|
|
80
96
|
};
|
|
81
|
-
|
|
97
|
+
const spinnerProps = {
|
|
82
98
|
innerRef: reactDesc.PropTypes.object.description('ref to the component s container'),
|
|
83
99
|
containerProps: reactDesc.PropTypes.object.description('Set of Properties attached to the main container'),
|
|
84
100
|
message: reactDesc.PropTypes.string.description('Text below the spinner'),
|
|
85
101
|
size: reactDesc.PropTypes.oneOf(['s', 'm', 'l']).description('Spinner size').defaultValue('m')
|
|
86
102
|
};
|
|
87
|
-
|
|
88
|
-
var SpinnerWithSchema = reactDesc.describe(DSSpinner);
|
|
103
|
+
const SpinnerWithSchema = reactDesc.describe(DSSpinner);
|
|
89
104
|
SpinnerWithSchema.propTypes = spinnerProps;
|
|
90
105
|
|
|
91
106
|
exports.DSSpinner = DSSpinner;
|
|
92
107
|
exports.SpinnerWithSchema = SpinnerWithSchema;
|
|
93
|
-
exports[
|
|
94
|
-
//# sourceMappingURL=DSSpinner.js.map
|
|
108
|
+
exports["default"] = DSSpinner;
|
package/cjs/index.js
CHANGED
|
@@ -3,15 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var DSSpinner = require('./DSSpinner.js');
|
|
6
|
-
require('@babel/runtime/helpers/extends');
|
|
7
|
-
require('@babel/runtime/helpers/objectWithoutProperties');
|
|
8
|
-
require('react');
|
|
9
|
-
require('react-desc');
|
|
10
|
-
require('@elliemae/ds-classnames');
|
|
11
6
|
|
|
12
7
|
|
|
13
8
|
|
|
14
9
|
exports.DSSpinner = DSSpinner.DSSpinner;
|
|
15
10
|
exports.SpinnerWithSchema = DSSpinner.SpinnerWithSchema;
|
|
16
|
-
exports
|
|
17
|
-
//# sourceMappingURL=index.js.map
|
|
11
|
+
exports["default"] = DSSpinner.DSSpinner;
|
package/esm/DSSpinner.js
CHANGED
|
@@ -1,66 +1,82 @@
|
|
|
1
|
-
import
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
7
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
8
|
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
3
|
-
import
|
|
9
|
+
import 'react';
|
|
4
10
|
import { PropTypes, describe } from 'react-desc';
|
|
5
11
|
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
12
|
+
import { jsxs } from 'react/jsx-runtime';
|
|
6
13
|
|
|
7
|
-
var
|
|
8
|
-
var blockName = 'spinner';
|
|
9
|
-
var SpinnerContainer = aggregatedClasses('div')(blockName);
|
|
10
|
-
var SpinnerMessage = aggregatedClasses('span')(blockName, 'message');
|
|
11
|
-
var Spinner = aggregatedClasses('div')(blockName, 'spinner'); // TODO: do we want dynamic position of the text (top, right, bottom, left)?
|
|
14
|
+
var _svg, _svg2, _svg3, _svg4;
|
|
12
15
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
const _excluded = ["containerProps", "innerRef", "message", "size"];
|
|
17
|
+
|
|
18
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
19
|
+
|
|
20
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
21
|
+
const blockName = 'spinner';
|
|
22
|
+
const SpinnerContainer = aggregatedClasses('div')(blockName);
|
|
23
|
+
const SpinnerMessage = aggregatedClasses('span')(blockName, 'message');
|
|
24
|
+
const Spinner = aggregatedClasses('div')(blockName, 'spinner'); // TODO: do we want dynamic position of the text (top, right, bottom, left)?
|
|
25
|
+
|
|
26
|
+
const DSSpinner = _ref => {
|
|
27
|
+
let {
|
|
28
|
+
containerProps = {},
|
|
29
|
+
innerRef,
|
|
30
|
+
message,
|
|
31
|
+
size
|
|
32
|
+
} = _ref,
|
|
19
33
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
20
34
|
|
|
21
|
-
return /*#__PURE__*/
|
|
35
|
+
return /*#__PURE__*/jsxs(SpinnerContainer, _objectSpread(_objectSpread(_objectSpread({}, containerProps), {}, {
|
|
22
36
|
ref: innerRef,
|
|
23
37
|
"aria-busy": true,
|
|
24
38
|
"aria-label": message,
|
|
25
39
|
"aria-live": "polite",
|
|
26
40
|
role: "alert"
|
|
27
|
-
}, otherProps),
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
41
|
+
}, otherProps), {}, {
|
|
42
|
+
children: [/*#__PURE__*/_jsx(Spinner, {
|
|
43
|
+
classProps: {
|
|
44
|
+
size
|
|
45
|
+
}
|
|
46
|
+
}, void 0, _svg || (_svg = /*#__PURE__*/_jsx("svg", {
|
|
47
|
+
className: "".concat(blockName, "-tl"),
|
|
48
|
+
viewBox: "0 0 16.6 16.6",
|
|
49
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
50
|
+
}, void 0, /*#__PURE__*/_jsx("path", {
|
|
51
|
+
d: "M16.1.5A15.6,15.6,0,0,0,.5,16.1,15.6,15.6,0,0,0,16.1.5Z",
|
|
52
|
+
fill: "#408a90",
|
|
53
|
+
stroke: "#fbfbfb"
|
|
54
|
+
}))), _svg2 || (_svg2 = /*#__PURE__*/_jsx("svg", {
|
|
55
|
+
className: "".concat(blockName, "-tr"),
|
|
56
|
+
viewBox: "0 0 16.6 16.6",
|
|
57
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
58
|
+
}, void 0, /*#__PURE__*/_jsx("path", {
|
|
59
|
+
d: "M16.1,16.1A15.6,15.6,0,0,0,.5.5,15.6,15.6,0,0,0,16.1,16.1Z",
|
|
60
|
+
fill: "#f7901e",
|
|
61
|
+
stroke: "#fbfbfb"
|
|
62
|
+
}))), _svg3 || (_svg3 = /*#__PURE__*/_jsx("svg", {
|
|
63
|
+
className: "".concat(blockName, "-br"),
|
|
64
|
+
viewBox: "0 0 16.6 16.6",
|
|
65
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
66
|
+
}, void 0, /*#__PURE__*/_jsx("path", {
|
|
67
|
+
d: "M.5.5A15.6,15.6,0,0,0,16.1,16.1,15.6,15.6,0,0,0,.5.5Z",
|
|
68
|
+
fill: "#0067ab",
|
|
69
|
+
stroke: "#fbfbfb"
|
|
70
|
+
}))), _svg4 || (_svg4 = /*#__PURE__*/_jsx("svg", {
|
|
71
|
+
className: "".concat(blockName, "-bl"),
|
|
72
|
+
viewBox: "0 0 16.6 16.6",
|
|
73
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
74
|
+
}, void 0, /*#__PURE__*/_jsx("path", {
|
|
75
|
+
d: "M16.1.5A15.6,15.6,0,0,0,.5,16.1,15.6,15.6,0,0,0,16.1.5Z",
|
|
76
|
+
fill: "#00acdc",
|
|
77
|
+
stroke: "#fbfbfb"
|
|
78
|
+
})))), message && /*#__PURE__*/_jsx(SpinnerMessage, {}, void 0, message)]
|
|
79
|
+
}));
|
|
64
80
|
};
|
|
65
81
|
|
|
66
82
|
DSSpinner.defaultProps = {
|
|
@@ -68,15 +84,13 @@ DSSpinner.defaultProps = {
|
|
|
68
84
|
message: '',
|
|
69
85
|
size: 'm'
|
|
70
86
|
};
|
|
71
|
-
|
|
87
|
+
const spinnerProps = {
|
|
72
88
|
innerRef: PropTypes.object.description('ref to the component s container'),
|
|
73
89
|
containerProps: PropTypes.object.description('Set of Properties attached to the main container'),
|
|
74
90
|
message: PropTypes.string.description('Text below the spinner'),
|
|
75
91
|
size: PropTypes.oneOf(['s', 'm', 'l']).description('Spinner size').defaultValue('m')
|
|
76
92
|
};
|
|
77
|
-
|
|
78
|
-
var SpinnerWithSchema = describe(DSSpinner);
|
|
93
|
+
const SpinnerWithSchema = describe(DSSpinner);
|
|
79
94
|
SpinnerWithSchema.propTypes = spinnerProps;
|
|
80
95
|
|
|
81
96
|
export { DSSpinner, SpinnerWithSchema, DSSpinner as default };
|
|
82
|
-
//# sourceMappingURL=DSSpinner.js.map
|
package/esm/index.js
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
1
|
export { DSSpinner, SpinnerWithSchema, DSSpinner as default } from './DSSpinner.js';
|
|
2
|
-
import '@babel/runtime/helpers/esm/extends';
|
|
3
|
-
import '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
4
|
-
import 'react';
|
|
5
|
-
import 'react-desc';
|
|
6
|
-
import '@elliemae/ds-classnames';
|
|
7
|
-
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,14 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-spinner",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.12",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"description": "
|
|
6
|
-
"module": "esm/index.js",
|
|
7
|
-
"main": "cjs/index.js",
|
|
5
|
+
"description": "ICE MT - Dimsum - Spinner",
|
|
6
|
+
"module": "./esm/index.js",
|
|
7
|
+
"main": "./cjs/index.js",
|
|
8
|
+
"types": "./types/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./esm/index.js",
|
|
12
|
+
"require": "./cjs/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./DSSpinner": {
|
|
15
|
+
"import": "./esm/DSSpinner.js",
|
|
16
|
+
"require": "./cjs/DSSpinner.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
8
19
|
"sideEffects": [
|
|
9
20
|
"*.css",
|
|
10
21
|
"*.scss"
|
|
11
22
|
],
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "https://git.elliemae.io/platform-ui/dimsum.git"
|
|
26
|
+
},
|
|
27
|
+
"engines": {
|
|
28
|
+
"npm": ">=7",
|
|
29
|
+
"node": ">=14"
|
|
30
|
+
},
|
|
31
|
+
"author": "ICE MT",
|
|
12
32
|
"scripts": {
|
|
13
33
|
"dev": "cross-env NODE_ENV=development && node ../../scripts/build/build.js -w",
|
|
14
34
|
"prebuild": "exit 0",
|
|
@@ -16,16 +36,17 @@
|
|
|
16
36
|
"build": "node ../../scripts/build/build.js"
|
|
17
37
|
},
|
|
18
38
|
"dependencies": {
|
|
19
|
-
"@elliemae/ds-classnames": "
|
|
20
|
-
"react-desc": "
|
|
39
|
+
"@elliemae/ds-classnames": "2.0.0-alpha.12",
|
|
40
|
+
"react-desc": "~4.1.3"
|
|
21
41
|
},
|
|
22
42
|
"peerDependencies": {
|
|
23
|
-
"lodash": "^4.17.
|
|
24
|
-
"react": "^17.0.
|
|
25
|
-
"react-dom": "^17.0.
|
|
43
|
+
"lodash": "^4.17.21",
|
|
44
|
+
"react": "^17.0.2",
|
|
45
|
+
"react-dom": "^17.0.2"
|
|
26
46
|
},
|
|
27
47
|
"publishConfig": {
|
|
28
48
|
"access": "public",
|
|
29
|
-
"directory": "dist"
|
|
49
|
+
"directory": "dist",
|
|
50
|
+
"generateSubmodules": true
|
|
30
51
|
}
|
|
31
52
|
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/// <reference path="../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
declare const DSSpinner: {
|
|
4
|
+
({ containerProps, innerRef, message, size, ...otherProps }: {
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
containerProps?: {} | undefined;
|
|
7
|
+
innerRef: any;
|
|
8
|
+
message: any;
|
|
9
|
+
size: any;
|
|
10
|
+
}): JSX.Element;
|
|
11
|
+
defaultProps: {
|
|
12
|
+
containerProps: {};
|
|
13
|
+
message: string;
|
|
14
|
+
size: string;
|
|
15
|
+
};
|
|
16
|
+
propTypes: {
|
|
17
|
+
innerRef: {
|
|
18
|
+
defaultValue<T = unknown>(arg: T): {
|
|
19
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
20
|
+
};
|
|
21
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
22
|
+
};
|
|
23
|
+
containerProps: {
|
|
24
|
+
defaultValue<T = unknown>(arg: T): {
|
|
25
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
26
|
+
};
|
|
27
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
28
|
+
};
|
|
29
|
+
message: {
|
|
30
|
+
defaultValue<T = unknown>(arg: T): {
|
|
31
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
32
|
+
};
|
|
33
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
34
|
+
};
|
|
35
|
+
size: {
|
|
36
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
declare const SpinnerWithSchema: {
|
|
41
|
+
(props?: {
|
|
42
|
+
[x: string]: any;
|
|
43
|
+
containerProps?: {} | undefined;
|
|
44
|
+
innerRef: any;
|
|
45
|
+
message: any;
|
|
46
|
+
size: any;
|
|
47
|
+
} | undefined): JSX.Element;
|
|
48
|
+
propTypes: unknown;
|
|
49
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
50
|
+
};
|
|
51
|
+
export { DSSpinner, SpinnerWithSchema };
|
|
52
|
+
export default DSSpinner;
|
package/types/index.d.ts
ADDED
package/DSSpinner/package.json
DELETED
package/cjs/DSSpinner.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DSSpinner.js","sources":["../../src/DSSpinner.tsx"],"sourcesContent":["/* eslint-disable import/no-unresolved */\nimport React from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\n\nconst blockName = 'spinner';\n\nconst SpinnerContainer = aggregatedClasses('div')(blockName);\nconst SpinnerMessage = aggregatedClasses('span')(blockName, 'message');\nconst Spinner = aggregatedClasses('div')(blockName, 'spinner');\n\n// TODO: do we want dynamic position of the text (top, right, bottom, left)?\n\nconst DSSpinner = ({\n containerProps = {},\n innerRef,\n message,\n size,\n ...otherProps\n}) => (\n <SpinnerContainer\n {...containerProps}\n ref={innerRef}\n aria-busy\n aria-label={message}\n aria-live=\"polite\"\n role=\"alert\"\n {...otherProps}\n >\n <Spinner classProps={{ size }}>\n <svg\n className={`${blockName}-tl`}\n viewBox=\"0 0 16.6 16.6\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M16.1.5A15.6,15.6,0,0,0,.5,16.1,15.6,15.6,0,0,0,16.1.5Z\"\n fill=\"#408a90\"\n stroke=\"#fbfbfb\"\n />\n </svg>\n <svg\n className={`${blockName}-tr`}\n viewBox=\"0 0 16.6 16.6\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M16.1,16.1A15.6,15.6,0,0,0,.5.5,15.6,15.6,0,0,0,16.1,16.1Z\"\n fill=\"#f7901e\"\n stroke=\"#fbfbfb\"\n />\n </svg>\n <svg\n className={`${blockName}-br`}\n viewBox=\"0 0 16.6 16.6\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M.5.5A15.6,15.6,0,0,0,16.1,16.1,15.6,15.6,0,0,0,.5.5Z\"\n fill=\"#0067ab\"\n stroke=\"#fbfbfb\"\n />\n </svg>\n <svg\n className={`${blockName}-bl`}\n viewBox=\"0 0 16.6 16.6\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M16.1.5A15.6,15.6,0,0,0,.5,16.1,15.6,15.6,0,0,0,16.1.5Z\"\n fill=\"#00acdc\"\n stroke=\"#fbfbfb\"\n />\n </svg>\n </Spinner>\n {message && <SpinnerMessage>{message}</SpinnerMessage>}\n </SpinnerContainer>\n);\n\nDSSpinner.defaultProps = {\n containerProps: {},\n message: '',\n size: 'm',\n};\n\nconst spinnerProps = {\n innerRef: PropTypes.object.description('ref to the component s container'),\n containerProps: PropTypes.object.description(\n 'Set of Properties attached to the main container',\n ),\n message: PropTypes.string.description('Text below the spinner'),\n size: PropTypes.oneOf(['s', 'm', 'l'])\n .description('Spinner size')\n .defaultValue('m'),\n};\n\nDSSpinner.propTypes = spinnerProps;\n\nconst SpinnerWithSchema = describe(DSSpinner);\nSpinnerWithSchema.propTypes = spinnerProps;\n\nexport { DSSpinner, SpinnerWithSchema };\nexport default DSSpinner;\n"],"names":["blockName","SpinnerContainer","aggregatedClasses","SpinnerMessage","Spinner","DSSpinner","containerProps","innerRef","message","size","otherProps","React","defaultProps","spinnerProps","PropTypes","object","description","string","oneOf","defaultValue","propTypes","SpinnerWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;AAKA,IAAMA,SAAS,GAAG,SAAlB;AAEA,IAAMC,gBAAgB,GAAGC,8BAAiB,CAAC,KAAD,CAAjB,CAAyBF,SAAzB,CAAzB;AACA,IAAMG,cAAc,GAAGD,8BAAiB,CAAC,MAAD,CAAjB,CAA0BF,SAA1B,EAAqC,SAArC,CAAvB;AACA,IAAMI,OAAO,GAAGF,8BAAiB,CAAC,KAAD,CAAjB,CAAyBF,SAAzB,EAAoC,SAApC,CAAhB;;IAIMK,SAAS,GAAG,SAAZA,SAAY;AAAA,iCAChBC,cADgB;AAAA,MAChBA,cADgB,oCACC,EADD;AAAA,MAEhBC,QAFgB,QAEhBA,QAFgB;AAAA,MAGhBC,OAHgB,QAGhBA,OAHgB;AAAA,MAIhBC,IAJgB,QAIhBA,IAJgB;AAAA,MAKbC,UALa;;AAAA,sBAOhBC,wCAAC,gBAAD,mCACML,cADN;AAEE,IAAA,GAAG,EAAEC,QAFP;AAGE,qBAHF;AAIE,kBAAYC,OAJd;AAKE,iBAAU,QALZ;AAME,IAAA,IAAI,EAAC;AANP,KAOME,UAPN,gBASEC,wCAAC,OAAD;AAAS,IAAA,UAAU,EAAE;AAAEF,MAAAA,IAAI,EAAJA;AAAF;AAArB,kBACEE;AACE,IAAA,SAAS,YAAKX,SAAL,QADX;AAEE,IAAA,OAAO,EAAC,eAFV;AAGE,IAAA,KAAK,EAAC;AAHR,kBAKEW;AACE,IAAA,CAAC,EAAC,yDADJ;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,mBAAS,CAACI,KAAV,CAAgB,CAAC,GAAD,EAAM,GAAN,EAAW,GAAX,CAAhB,EACHF,WADG,CACS,cADT,EAEHG,YAFG,CAEU,GAFV;AANa,CAArB;AAWAd,SAAS,CAACe,SAAV,GAAsBP,YAAtB;IAEMQ,iBAAiB,GAAGC,kBAAQ,CAACjB,SAAD;AAClCgB,iBAAiB,CAACD,SAAlB,GAA8BP,YAA9B;;;;;;"}
|
package/cjs/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
|
package/esm/DSSpinner.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DSSpinner.js","sources":["../../src/DSSpinner.tsx"],"sourcesContent":["/* eslint-disable import/no-unresolved */\nimport React from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\n\nconst blockName = 'spinner';\n\nconst SpinnerContainer = aggregatedClasses('div')(blockName);\nconst SpinnerMessage = aggregatedClasses('span')(blockName, 'message');\nconst Spinner = aggregatedClasses('div')(blockName, 'spinner');\n\n// TODO: do we want dynamic position of the text (top, right, bottom, left)?\n\nconst DSSpinner = ({\n containerProps = {},\n innerRef,\n message,\n size,\n ...otherProps\n}) => (\n <SpinnerContainer\n {...containerProps}\n ref={innerRef}\n aria-busy\n aria-label={message}\n aria-live=\"polite\"\n role=\"alert\"\n {...otherProps}\n >\n <Spinner classProps={{ size }}>\n <svg\n className={`${blockName}-tl`}\n viewBox=\"0 0 16.6 16.6\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M16.1.5A15.6,15.6,0,0,0,.5,16.1,15.6,15.6,0,0,0,16.1.5Z\"\n fill=\"#408a90\"\n stroke=\"#fbfbfb\"\n />\n </svg>\n <svg\n className={`${blockName}-tr`}\n viewBox=\"0 0 16.6 16.6\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M16.1,16.1A15.6,15.6,0,0,0,.5.5,15.6,15.6,0,0,0,16.1,16.1Z\"\n fill=\"#f7901e\"\n stroke=\"#fbfbfb\"\n />\n </svg>\n <svg\n className={`${blockName}-br`}\n viewBox=\"0 0 16.6 16.6\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M.5.5A15.6,15.6,0,0,0,16.1,16.1,15.6,15.6,0,0,0,.5.5Z\"\n fill=\"#0067ab\"\n stroke=\"#fbfbfb\"\n />\n </svg>\n <svg\n className={`${blockName}-bl`}\n viewBox=\"0 0 16.6 16.6\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M16.1.5A15.6,15.6,0,0,0,.5,16.1,15.6,15.6,0,0,0,16.1.5Z\"\n fill=\"#00acdc\"\n stroke=\"#fbfbfb\"\n />\n </svg>\n </Spinner>\n {message && <SpinnerMessage>{message}</SpinnerMessage>}\n </SpinnerContainer>\n);\n\nDSSpinner.defaultProps = {\n containerProps: {},\n message: '',\n size: 'm',\n};\n\nconst spinnerProps = {\n innerRef: PropTypes.object.description('ref to the component s container'),\n containerProps: PropTypes.object.description(\n 'Set of Properties attached to the main container',\n ),\n message: PropTypes.string.description('Text below the spinner'),\n size: PropTypes.oneOf(['s', 'm', 'l'])\n .description('Spinner size')\n .defaultValue('m'),\n};\n\nDSSpinner.propTypes = spinnerProps;\n\nconst SpinnerWithSchema = describe(DSSpinner);\nSpinnerWithSchema.propTypes = spinnerProps;\n\nexport { DSSpinner, SpinnerWithSchema };\nexport default DSSpinner;\n"],"names":["blockName","SpinnerContainer","aggregatedClasses","SpinnerMessage","Spinner","DSSpinner","containerProps","innerRef","message","size","otherProps","defaultProps","spinnerProps","PropTypes","object","description","string","oneOf","defaultValue","propTypes","SpinnerWithSchema","describe"],"mappings":";;;;;;;AAKA,IAAMA,SAAS,GAAG,SAAlB;AAEA,IAAMC,gBAAgB,GAAGC,iBAAiB,CAAC,KAA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