@elliemae/ds-square-indicator 2.2.0-next.4 → 2.2.0-next.8
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/DSSquareIndicator.js
CHANGED
|
@@ -2,19 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
|
|
5
|
+
var _jsx2 = require('@babel/runtime/helpers/jsx');
|
|
6
|
+
require('react');
|
|
7
7
|
var dsGrid = require('@elliemae/ds-grid');
|
|
8
8
|
var dsTooltip = require('@elliemae/ds-tooltip');
|
|
9
9
|
var reactDesc = require('react-desc');
|
|
10
10
|
var reactDescPropTypes = require('./react-desc-prop-types.js');
|
|
11
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
11
12
|
|
|
12
13
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
14
|
|
|
14
|
-
var
|
|
15
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
15
|
+
var _jsx2__default = /*#__PURE__*/_interopDefaultLegacy(_jsx2);
|
|
16
16
|
|
|
17
|
-
var _animate;
|
|
18
17
|
const sizeToPx = {
|
|
19
18
|
xs: '16px',
|
|
20
19
|
s: '24px',
|
|
@@ -50,39 +49,47 @@ const DSSquareIndicator = _ref => {
|
|
|
50
49
|
text = '',
|
|
51
50
|
showText = true,
|
|
52
51
|
withTooltip = false,
|
|
53
|
-
tooltipStartPlacementPreference = 'bottom'
|
|
52
|
+
tooltipStartPlacementPreference = 'bottom',
|
|
53
|
+
__duration = 2.5
|
|
54
54
|
} = _ref;
|
|
55
|
-
const Wrapper = withTooltip ? dsTooltip.DSTooltipV3 :
|
|
56
|
-
|
|
55
|
+
const Wrapper = withTooltip ? dsTooltip.DSTooltipV3 : _ref2 => {
|
|
56
|
+
let {
|
|
57
|
+
children
|
|
58
|
+
} = _ref2;
|
|
59
|
+
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
60
|
+
children: children
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
return /*#__PURE__*/_jsx2__default["default"](dsGrid.Grid, {
|
|
57
64
|
gutter: "xs",
|
|
58
65
|
justifyContent: "center",
|
|
59
66
|
role: "status"
|
|
60
|
-
}, void 0, /*#__PURE__*/
|
|
67
|
+
}, void 0, /*#__PURE__*/_jsx2__default["default"](Wrapper, {
|
|
61
68
|
text: text,
|
|
62
69
|
textAlign: "center",
|
|
63
70
|
startPlacementPreference: tooltipStartPlacementPreference
|
|
64
|
-
}, void 0, /*#__PURE__*/
|
|
71
|
+
}, void 0, /*#__PURE__*/_jsx2__default["default"]("svg", {
|
|
65
72
|
width: sizeToPx[size],
|
|
66
73
|
height: sizeToPx[size],
|
|
67
74
|
style: {
|
|
68
75
|
display: 'block',
|
|
69
76
|
margin: 'auto'
|
|
70
77
|
}
|
|
71
|
-
}, void 0, /*#__PURE__*/
|
|
78
|
+
}, void 0, /*#__PURE__*/_jsx2__default["default"]("rect", {
|
|
72
79
|
width: "100%",
|
|
73
80
|
height: "100%",
|
|
74
81
|
fill: "transparent",
|
|
75
82
|
strokeWidth: sizeToWeight[size],
|
|
76
83
|
strokeDasharray: "400% 400%",
|
|
77
84
|
stroke: colorToHex[color]
|
|
78
|
-
}, void 0,
|
|
85
|
+
}, void 0, /*#__PURE__*/_jsx2__default["default"]("animate", {
|
|
79
86
|
attributeName: "stroke-dashoffset",
|
|
80
87
|
values: "800%;0",
|
|
81
88
|
keyTimes: "0;1",
|
|
82
|
-
dur: "
|
|
89
|
+
dur: "".concat(__duration, "s"),
|
|
83
90
|
repeatCount: "indefinite",
|
|
84
91
|
restart: "always"
|
|
85
|
-
})))
|
|
92
|
+
}))), text !== '' && showText && /*#__PURE__*/_jsx2__default["default"]("span", {
|
|
86
93
|
style: {
|
|
87
94
|
color: colorToHex[color],
|
|
88
95
|
fontSize: sizeToTextSize[size]
|
package/esm/DSSquareIndicator.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import _jsx2 from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'react';
|
|
3
3
|
import { Grid } from '@elliemae/ds-grid';
|
|
4
4
|
import { DSTooltipV3 } from '@elliemae/ds-tooltip';
|
|
5
5
|
import { describe } from 'react-desc';
|
|
6
6
|
import { SquareIndicatorPropTypes } from './react-desc-prop-types.js';
|
|
7
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
7
8
|
|
|
8
|
-
var _animate;
|
|
9
9
|
const sizeToPx = {
|
|
10
10
|
xs: '16px',
|
|
11
11
|
s: '24px',
|
|
@@ -41,39 +41,47 @@ const DSSquareIndicator = _ref => {
|
|
|
41
41
|
text = '',
|
|
42
42
|
showText = true,
|
|
43
43
|
withTooltip = false,
|
|
44
|
-
tooltipStartPlacementPreference = 'bottom'
|
|
44
|
+
tooltipStartPlacementPreference = 'bottom',
|
|
45
|
+
__duration = 2.5
|
|
45
46
|
} = _ref;
|
|
46
|
-
const Wrapper = withTooltip ? DSTooltipV3 :
|
|
47
|
-
|
|
47
|
+
const Wrapper = withTooltip ? DSTooltipV3 : _ref2 => {
|
|
48
|
+
let {
|
|
49
|
+
children
|
|
50
|
+
} = _ref2;
|
|
51
|
+
return /*#__PURE__*/jsx(Fragment, {
|
|
52
|
+
children: children
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
return /*#__PURE__*/_jsx2(Grid, {
|
|
48
56
|
gutter: "xs",
|
|
49
57
|
justifyContent: "center",
|
|
50
58
|
role: "status"
|
|
51
|
-
}, void 0, /*#__PURE__*/
|
|
59
|
+
}, void 0, /*#__PURE__*/_jsx2(Wrapper, {
|
|
52
60
|
text: text,
|
|
53
61
|
textAlign: "center",
|
|
54
62
|
startPlacementPreference: tooltipStartPlacementPreference
|
|
55
|
-
}, void 0, /*#__PURE__*/
|
|
63
|
+
}, void 0, /*#__PURE__*/_jsx2("svg", {
|
|
56
64
|
width: sizeToPx[size],
|
|
57
65
|
height: sizeToPx[size],
|
|
58
66
|
style: {
|
|
59
67
|
display: 'block',
|
|
60
68
|
margin: 'auto'
|
|
61
69
|
}
|
|
62
|
-
}, void 0, /*#__PURE__*/
|
|
70
|
+
}, void 0, /*#__PURE__*/_jsx2("rect", {
|
|
63
71
|
width: "100%",
|
|
64
72
|
height: "100%",
|
|
65
73
|
fill: "transparent",
|
|
66
74
|
strokeWidth: sizeToWeight[size],
|
|
67
75
|
strokeDasharray: "400% 400%",
|
|
68
76
|
stroke: colorToHex[color]
|
|
69
|
-
}, void 0,
|
|
77
|
+
}, void 0, /*#__PURE__*/_jsx2("animate", {
|
|
70
78
|
attributeName: "stroke-dashoffset",
|
|
71
79
|
values: "800%;0",
|
|
72
80
|
keyTimes: "0;1",
|
|
73
|
-
dur: "
|
|
81
|
+
dur: "".concat(__duration, "s"),
|
|
74
82
|
repeatCount: "indefinite",
|
|
75
83
|
restart: "always"
|
|
76
|
-
})))
|
|
84
|
+
}))), text !== '' && showText && /*#__PURE__*/_jsx2("span", {
|
|
77
85
|
style: {
|
|
78
86
|
color: colorToHex[color],
|
|
79
87
|
fontSize: sizeToTextSize[size]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-square-indicator",
|
|
3
|
-
"version": "2.2.0-next.
|
|
3
|
+
"version": "2.2.0-next.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Indeterminate Progress Indicator",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"build": "node ../../scripts/build/build.js"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@elliemae/ds-grid": "2.2.0-next.
|
|
43
|
+
"@elliemae/ds-grid": "2.2.0-next.7",
|
|
44
44
|
"react-desc": "~4.1.3"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { DSSquareIndicatorT } from './react-desc-prop-types';
|
|
4
4
|
export declare const DSSquareIndicator: React.ComponentType<DSSquareIndicatorT.Props>;
|
|
5
5
|
export declare const DSSquareIndicatorWithSchema: {
|
|
6
|
-
(props?:
|
|
6
|
+
(props?: unknown): JSX.Element;
|
|
7
7
|
propTypes: unknown;
|
|
8
8
|
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
9
9
|
};
|
|
@@ -7,6 +7,7 @@ export declare namespace DSSquareIndicatorT {
|
|
|
7
7
|
showText?: boolean;
|
|
8
8
|
withTooltip: boolean;
|
|
9
9
|
tooltipStartPlacementPreference?: 'top-start' | 'top' | 'top-end' | 'right-start' | 'right' | 'right-end' | 'bottom-end' | 'bottom' | 'bottom-start' | 'left-end' | 'left' | 'left-start';
|
|
10
|
+
__duration: number;
|
|
10
11
|
}
|
|
11
12
|
}
|
|
12
13
|
export declare const SquareIndicatorPropTypes: {
|