@elliemae/ds-spinner 2.2.0-alpha.3 → 2.2.0-next.2
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 +101 -100
- package/cjs/index.js +11 -37
- package/esm/DSSpinner.js +89 -71
- package/esm/index.js +1 -8
- package/package.json +2 -2
- package/types/index.d.ts +2 -1
- package/cjs/DSSpinner.js.map +0 -7
- package/cjs/index.js.map +0 -7
- package/esm/DSSpinner.js.map +0 -7
- package/esm/index.js.map +0 -7
package/cjs/DSSpinner.js
CHANGED
|
@@ -1,107 +1,108 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
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');
|
|
12
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
13
|
+
require('react');
|
|
14
|
+
var reactDesc = require('react-desc');
|
|
15
|
+
var dsClassnames = require('@elliemae/ds-classnames');
|
|
16
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
17
|
+
|
|
18
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
|
+
|
|
20
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
21
|
+
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
22
|
+
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
23
|
+
|
|
24
|
+
var _svg, _svg2, _svg3, _svg4;
|
|
25
|
+
|
|
26
|
+
const _excluded = ["containerProps", "innerRef", "message", "size"];
|
|
27
|
+
|
|
28
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); 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 = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : 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), {}, {
|
|
46
|
+
ref: innerRef,
|
|
47
|
+
"aria-busy": true,
|
|
48
|
+
"aria-label": message,
|
|
49
|
+
"aria-live": "polite",
|
|
50
|
+
role: "alert"
|
|
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
|
+
}));
|
|
11
90
|
};
|
|
12
|
-
|
|
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 DSSpinner_exports = {};
|
|
29
|
-
__export(DSSpinner_exports, {
|
|
30
|
-
DSSpinner: () => DSSpinner,
|
|
31
|
-
SpinnerWithSchema: () => SpinnerWithSchema,
|
|
32
|
-
default: () => DSSpinner_default
|
|
33
|
-
});
|
|
34
|
-
var React = __toESM(require("react"));
|
|
35
|
-
var import_react = __toESM(require("react"));
|
|
36
|
-
var import_react_desc = __toESM(require("react-desc"));
|
|
37
|
-
var import_ds_classnames = __toESM(require("@elliemae/ds-classnames"));
|
|
38
|
-
const blockName = "spinner";
|
|
39
|
-
const SpinnerContainer = (0, import_ds_classnames.aggregatedClasses)("div")(blockName);
|
|
40
|
-
const SpinnerMessage = (0, import_ds_classnames.aggregatedClasses)("span")(blockName, "message");
|
|
41
|
-
const Spinner = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "spinner");
|
|
42
|
-
const DSSpinner = ({
|
|
43
|
-
containerProps = {},
|
|
44
|
-
innerRef,
|
|
45
|
-
message,
|
|
46
|
-
size,
|
|
47
|
-
...otherProps
|
|
48
|
-
}) => /* @__PURE__ */ import_react.default.createElement(SpinnerContainer, {
|
|
49
|
-
...containerProps,
|
|
50
|
-
ref: innerRef,
|
|
51
|
-
"aria-busy": true,
|
|
52
|
-
"aria-label": message,
|
|
53
|
-
"aria-live": "polite",
|
|
54
|
-
role: "alert",
|
|
55
|
-
...otherProps
|
|
56
|
-
}, /* @__PURE__ */ import_react.default.createElement(Spinner, {
|
|
57
|
-
classProps: { size }
|
|
58
|
-
}, /* @__PURE__ */ import_react.default.createElement("svg", {
|
|
59
|
-
className: `${blockName}-tl`,
|
|
60
|
-
viewBox: "0 0 16.6 16.6",
|
|
61
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
62
|
-
}, /* @__PURE__ */ import_react.default.createElement("path", {
|
|
63
|
-
d: "M16.1.5A15.6,15.6,0,0,0,.5,16.1,15.6,15.6,0,0,0,16.1.5Z",
|
|
64
|
-
fill: "#408a90",
|
|
65
|
-
stroke: "#fbfbfb"
|
|
66
|
-
})), /* @__PURE__ */ import_react.default.createElement("svg", {
|
|
67
|
-
className: `${blockName}-tr`,
|
|
68
|
-
viewBox: "0 0 16.6 16.6",
|
|
69
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
70
|
-
}, /* @__PURE__ */ import_react.default.createElement("path", {
|
|
71
|
-
d: "M16.1,16.1A15.6,15.6,0,0,0,.5.5,15.6,15.6,0,0,0,16.1,16.1Z",
|
|
72
|
-
fill: "#f7901e",
|
|
73
|
-
stroke: "#fbfbfb"
|
|
74
|
-
})), /* @__PURE__ */ import_react.default.createElement("svg", {
|
|
75
|
-
className: `${blockName}-br`,
|
|
76
|
-
viewBox: "0 0 16.6 16.6",
|
|
77
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
78
|
-
}, /* @__PURE__ */ import_react.default.createElement("path", {
|
|
79
|
-
d: "M.5.5A15.6,15.6,0,0,0,16.1,16.1,15.6,15.6,0,0,0,.5.5Z",
|
|
80
|
-
fill: "#0067ab",
|
|
81
|
-
stroke: "#fbfbfb"
|
|
82
|
-
})), /* @__PURE__ */ import_react.default.createElement("svg", {
|
|
83
|
-
className: `${blockName}-bl`,
|
|
84
|
-
viewBox: "0 0 16.6 16.6",
|
|
85
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
86
|
-
}, /* @__PURE__ */ import_react.default.createElement("path", {
|
|
87
|
-
d: "M16.1.5A15.6,15.6,0,0,0,.5,16.1,15.6,15.6,0,0,0,16.1.5Z",
|
|
88
|
-
fill: "#00acdc",
|
|
89
|
-
stroke: "#fbfbfb"
|
|
90
|
-
}))), message && /* @__PURE__ */ import_react.default.createElement(SpinnerMessage, null, message));
|
|
91
|
+
|
|
91
92
|
DSSpinner.defaultProps = {
|
|
92
93
|
containerProps: {},
|
|
93
|
-
message:
|
|
94
|
-
size:
|
|
94
|
+
message: '',
|
|
95
|
+
size: 'm'
|
|
95
96
|
};
|
|
96
97
|
const spinnerProps = {
|
|
97
|
-
innerRef:
|
|
98
|
-
containerProps:
|
|
99
|
-
message:
|
|
100
|
-
size:
|
|
98
|
+
innerRef: reactDesc.PropTypes.object.description('ref to the component s container'),
|
|
99
|
+
containerProps: reactDesc.PropTypes.object.description('Set of Properties attached to the main container'),
|
|
100
|
+
message: reactDesc.PropTypes.string.description('Text below the spinner'),
|
|
101
|
+
size: reactDesc.PropTypes.oneOf(['s', 'm', 'l']).description('Spinner size').defaultValue('m')
|
|
101
102
|
};
|
|
102
|
-
|
|
103
|
-
const SpinnerWithSchema = (0, import_react_desc.describe)(DSSpinner);
|
|
103
|
+
const SpinnerWithSchema = reactDesc.describe(DSSpinner);
|
|
104
104
|
SpinnerWithSchema.propTypes = spinnerProps;
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
|
|
106
|
+
exports.DSSpinner = DSSpinner;
|
|
107
|
+
exports.SpinnerWithSchema = SpinnerWithSchema;
|
|
108
|
+
exports["default"] = DSSpinner;
|
package/cjs/index.js
CHANGED
|
@@ -1,37 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
DSSpinner: () => import_DSSpinner.DSSpinner,
|
|
31
|
-
SpinnerWithSchema: () => import_DSSpinner.SpinnerWithSchema,
|
|
32
|
-
default: () => import_DSSpinner.default
|
|
33
|
-
});
|
|
34
|
-
var React = __toESM(require("react"));
|
|
35
|
-
var import_DSSpinner = __toESM(require("./DSSpinner"));
|
|
36
|
-
module.exports = __toCommonJS(src_exports);
|
|
37
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var DSSpinner = require('./DSSpinner.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
exports.DSSpinner = DSSpinner.DSSpinner;
|
|
10
|
+
exports.SpinnerWithSchema = DSSpinner.SpinnerWithSchema;
|
|
11
|
+
exports["default"] = DSSpinner.DSSpinner;
|
package/esm/DSSpinner.js
CHANGED
|
@@ -1,78 +1,96 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
|
|
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';
|
|
8
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
9
|
+
import 'react';
|
|
10
|
+
import { PropTypes, describe } from 'react-desc';
|
|
11
|
+
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
12
|
+
import { jsxs } from 'react/jsx-runtime';
|
|
13
|
+
|
|
14
|
+
var _svg, _svg2, _svg3, _svg4;
|
|
15
|
+
|
|
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); 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 = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : 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,
|
|
33
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
34
|
+
|
|
35
|
+
return /*#__PURE__*/jsxs(SpinnerContainer, _objectSpread(_objectSpread(_objectSpread({}, containerProps), {}, {
|
|
36
|
+
ref: innerRef,
|
|
37
|
+
"aria-busy": true,
|
|
38
|
+
"aria-label": message,
|
|
39
|
+
"aria-live": "polite",
|
|
40
|
+
role: "alert"
|
|
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
|
+
}));
|
|
80
|
+
};
|
|
81
|
+
|
|
58
82
|
DSSpinner.defaultProps = {
|
|
59
83
|
containerProps: {},
|
|
60
|
-
message:
|
|
61
|
-
size:
|
|
84
|
+
message: '',
|
|
85
|
+
size: 'm'
|
|
62
86
|
};
|
|
63
87
|
const spinnerProps = {
|
|
64
|
-
innerRef: PropTypes.object.description(
|
|
65
|
-
containerProps: PropTypes.object.description(
|
|
66
|
-
message: PropTypes.string.description(
|
|
67
|
-
size: PropTypes.oneOf([
|
|
88
|
+
innerRef: PropTypes.object.description('ref to the component s container'),
|
|
89
|
+
containerProps: PropTypes.object.description('Set of Properties attached to the main container'),
|
|
90
|
+
message: PropTypes.string.description('Text below the spinner'),
|
|
91
|
+
size: PropTypes.oneOf(['s', 'm', 'l']).description('Spinner size').defaultValue('m')
|
|
68
92
|
};
|
|
69
|
-
DSSpinner.propTypes = spinnerProps;
|
|
70
93
|
const SpinnerWithSchema = describe(DSSpinner);
|
|
71
94
|
SpinnerWithSchema.propTypes = spinnerProps;
|
|
72
|
-
|
|
73
|
-
export {
|
|
74
|
-
DSSpinner,
|
|
75
|
-
SpinnerWithSchema,
|
|
76
|
-
DSSpinner_default as default
|
|
77
|
-
};
|
|
78
|
-
//# sourceMappingURL=DSSpinner.js.map
|
|
95
|
+
|
|
96
|
+
export { DSSpinner, SpinnerWithSchema, DSSpinner as default };
|
package/esm/index.js
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { DSSpinner, SpinnerWithSchema, default as default2 } from "./DSSpinner";
|
|
3
|
-
export {
|
|
4
|
-
DSSpinner,
|
|
5
|
-
SpinnerWithSchema,
|
|
6
|
-
default2 as default
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export { DSSpinner, SpinnerWithSchema, DSSpinner as default } from './DSSpinner.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-spinner",
|
|
3
|
-
"version": "2.2.0-
|
|
3
|
+
"version": "2.2.0-next.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Spinner",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"build": "node ../../scripts/build/build.js"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@elliemae/ds-classnames": "2.2.0-
|
|
39
|
+
"@elliemae/ds-classnames": "2.2.0-next.2",
|
|
40
40
|
"react-desc": "~4.1.3"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
package/types/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './DSSpinner';
|
|
2
|
+
export { default } from './DSSpinner';
|
package/cjs/DSSpinner.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/DSSpinner.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAkB;AAClB,wBAAoC;AACpC,2BAAkC;AAElC,MAAM,YAAY;AAElB,MAAM,mBAAmB,4CAAkB,OAAO;AAClD,MAAM,iBAAiB,4CAAkB,QAAQ,WAAW;AAC5D,MAAM,UAAU,4CAAkB,OAAO,WAAW;AAIpD,MAAM,YAAY,CAAC;AAAA,EACjB,iBAAiB;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,KACG;AAAA,MAEH,mDAAC,kBAAD;AAAA,KACM;AAAA,EACJ,KAAK;AAAA,EACL,aAAS;AAAA,EACT,cAAY;AAAA,EACZ,aAAU;AAAA,EACV,MAAK;AAAA,KACD;AAAA,GAEJ,mDAAC,SAAD;AAAA,EAAS,YAAY,EAAE;AAAA,GACrB,mDAAC,OAAD;AAAA,EACE,WAAW,GAAG;AAAA,EACd,SAAQ;AAAA,EACR,OAAM;AAAA,GAEN,mDAAC,QAAD;AAAA,EACE,GAAE;AAAA,EACF,MAAK;AAAA,EACL,QAAO;AAAA,KAGX,mDAAC,OAAD;AAAA,EACE,WAAW,GAAG;AAAA,EACd,SAAQ;AAAA,EACR,OAAM;AAAA,GAEN,mDAAC,QAAD;AAAA,EACE,GAAE;AAAA,EACF,MAAK;AAAA,EACL,QAAO;AAAA,KAGX,mDAAC,OAAD;AAAA,EACE,WAAW,GAAG;AAAA,EACd,SAAQ;AAAA,EACR,OAAM;AAAA,GAEN,mDAAC,QAAD;AAAA,EACE,GAAE;AAAA,EACF,MAAK;AAAA,EACL,QAAO;AAAA,KAGX,mDAAC,OAAD;AAAA,EACE,WAAW,GAAG;AAAA,EACd,SAAQ;AAAA,EACR,OAAM;AAAA,GAEN,mDAAC,QAAD;AAAA,EACE,GAAE;AAAA,EACF,MAAK;AAAA,EACL,QAAO;AAAA,MAIZ,WAAW,mDAAC,gBAAD,MAAiB;AAIjC,UAAU,eAAe;AAAA,EACvB,gBAAgB;AAAA,EAChB,SAAS;AAAA,EACT,MAAM;AAAA;AAGR,MAAM,eAAe;AAAA,EACnB,UAAU,4BAAU,OAAO,YAAY;AAAA,EACvC,gBAAgB,4BAAU,OAAO,YAC/B;AAAA,EAEF,SAAS,4BAAU,OAAO,YAAY;AAAA,EACtC,MAAM,4BAAU,MAAM,CAAC,KAAK,KAAK,MAC9B,YAAY,gBACZ,aAAa;AAAA;AAGlB,UAAU,YAAY;AAEtB,MAAM,oBAAoB,gCAAS;AACnC,kBAAkB,YAAY;AAG9B,IAAO,oBAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/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 { DSSpinner, SpinnerWithSchema, default } from './DSSpinner';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAsD;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/esm/DSSpinner.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSSpinner.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* 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"],
|
|
5
|
-
"mappings": "AAAA;ACCA;AACA;AACA;AAEA,MAAM,YAAY;AAElB,MAAM,mBAAmB,kBAAkB,OAAO;AAClD,MAAM,iBAAiB,kBAAkB,QAAQ,WAAW;AAC5D,MAAM,UAAU,kBAAkB,OAAO,WAAW;AAIpD,MAAM,YAAY,CAAC;AAAA,EACjB,iBAAiB;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,KACG;AAAA,MAEH,qCAAC,kBAAD;AAAA,KACM;AAAA,EACJ,KAAK;AAAA,EACL,aAAS;AAAA,EACT,cAAY;AAAA,EACZ,aAAU;AAAA,EACV,MAAK;AAAA,KACD;AAAA,GAEJ,qCAAC,SAAD;AAAA,EAAS,YAAY,EAAE;AAAA,GACrB,qCAAC,OAAD;AAAA,EACE,WAAW,GAAG;AAAA,EACd,SAAQ;AAAA,EACR,OAAM;AAAA,GAEN,qCAAC,QAAD;AAAA,EACE,GAAE;AAAA,EACF,MAAK;AAAA,EACL,QAAO;AAAA,KAGX,qCAAC,OAAD;AAAA,EACE,WAAW,GAAG;AAAA,EACd,SAAQ;AAAA,EACR,OAAM;AAAA,GAEN,qCAAC,QAAD;AAAA,EACE,GAAE;AAAA,EACF,MAAK;AAAA,EACL,QAAO;AAAA,KAGX,qCAAC,OAAD;AAAA,EACE,WAAW,GAAG;AAAA,EACd,SAAQ;AAAA,EACR,OAAM;AAAA,GAEN,qCAAC,QAAD;AAAA,EACE,GAAE;AAAA,EACF,MAAK;AAAA,EACL,QAAO;AAAA,KAGX,qCAAC,OAAD;AAAA,EACE,WAAW,GAAG;AAAA,EACd,SAAQ;AAAA,EACR,OAAM;AAAA,GAEN,qCAAC,QAAD;AAAA,EACE,GAAE;AAAA,EACF,MAAK;AAAA,EACL,QAAO;AAAA,MAIZ,WAAW,qCAAC,gBAAD,MAAiB;AAIjC,UAAU,eAAe;AAAA,EACvB,gBAAgB;AAAA,EAChB,SAAS;AAAA,EACT,MAAM;AAAA;AAGR,MAAM,eAAe;AAAA,EACnB,UAAU,UAAU,OAAO,YAAY;AAAA,EACvC,gBAAgB,UAAU,OAAO,YAC/B;AAAA,EAEF,SAAS,UAAU,OAAO,YAAY;AAAA,EACtC,MAAM,UAAU,MAAM,CAAC,KAAK,KAAK,MAC9B,YAAY,gBACZ,aAAa;AAAA;AAGlB,UAAU,YAAY;AAEtB,MAAM,oBAAoB,SAAS;AACnC,kBAAkB,YAAY;AAG9B,IAAO,oBAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/esm/index.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { DSSpinner, SpinnerWithSchema, default } from './DSSpinner';\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|