@elliemae/ds-circular-progress-indicator 2.0.0-alpha.10 → 2.0.0-alpha.14

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.
@@ -19,13 +19,14 @@ const {
19
19
  classNameElement
20
20
  } = dsClassnames.convertPropToCssClassName('circular-progress-indicator');
21
21
 
22
- const CircularProgressIndicator = ({
23
- size,
24
- showLabel,
25
- showTooltip,
26
- waiting,
27
- loading
28
- }) => {
22
+ const CircularProgressIndicator = _ref => {
23
+ let {
24
+ size,
25
+ showLabel,
26
+ showTooltip,
27
+ waiting,
28
+ loading
29
+ } = _ref;
29
30
  const waitingLabel = 'Waiting...';
30
31
  const loadingLabel = 'Loading...';
31
32
  const currentLabel = waiting && !loading ? waitingLabel : loadingLabel;
@@ -104,7 +105,7 @@ const CircularProgressIndicator = ({
104
105
  "data-testid": "circular-indicator-label",
105
106
  className: classNameElement('label'),
106
107
  style: {
107
- fontSize: `${sizeLabel}px`
108
+ fontSize: "".concat(sizeLabel, "px")
108
109
  }
109
110
  }, void 0, currentLabel); // Only adds the tooltip if sizePx < 17 or showTooltip is true
110
111
 
@@ -126,26 +127,26 @@ const CircularProgressIndicator = ({
126
127
  cy: "50%",
127
128
  fill: "none",
128
129
  r: "28",
129
- strokeWidth: `${trackWidth}px`
130
+ strokeWidth: "".concat(trackWidth, "px")
130
131
  });
131
132
 
132
133
  const grayArc = /*#__PURE__*/_jsx__default["default"]("circle", {
133
134
  className: classNameElement('arc-gray'),
134
135
  stroke: "#E0E3E8",
135
- strokeDasharray: `${grayArcStrokeDasharray}`,
136
- strokeDashoffset: `${grayArcStrokeDashoffset}`,
136
+ strokeDasharray: "".concat(grayArcStrokeDasharray),
137
+ strokeDashoffset: "".concat(grayArcStrokeDashoffset),
137
138
  cx: "50%",
138
139
  cy: "50%",
139
140
  fill: "none",
140
141
  r: "28",
141
- strokeWidth: `${trackWidth}px`
142
+ strokeWidth: "".concat(trackWidth, "px")
142
143
  });
143
144
 
144
145
  const indicator = /*#__PURE__*/_jsx__default["default"]("svg", {
145
- height: `${sizePx}px`,
146
+ height: "".concat(sizePx, "px"),
146
147
  version: "1.1",
147
148
  viewBox: "0 0 66 66",
148
- width: `${sizePx}px`,
149
+ width: "".concat(sizePx, "px"),
149
150
  "data-testid": "circular-indicator"
150
151
  }, void 0, /*#__PURE__*/_jsx__default["default"]("defs", {}, void 0, /*#__PURE__*/_jsx__default["default"]("linearGradient", {
151
152
  id: "grad1",
@@ -199,10 +200,10 @@ const CircularProgressIndicator = ({
199
200
  id: "inverseL",
200
201
  viewBox: "0 0 5 10",
201
202
  refX: "0.5",
202
- refY: `${markerRefY}`,
203
+ refY: "".concat(markerRefY),
203
204
  markerUnits: "strokeWidth",
204
205
  markerWidth: "0.5",
205
- markerHeight: `${markerHeight}`,
206
+ markerHeight: "".concat(markerHeight),
206
207
  orient: "auto"
207
208
  }, void 0, _path || (_path = /*#__PURE__*/_jsx__default["default"]("path", {
208
209
  d: "M 0 0 L 6 0 A 5 5 0 0 0 6 10 L 0 10 z",
@@ -214,7 +215,7 @@ const CircularProgressIndicator = ({
214
215
  refY: "5",
215
216
  markerUnits: "strokeWidth",
216
217
  markerWidth: "0.7",
217
- markerHeight: `${markerHeight}`
218
+ markerHeight: "".concat(markerHeight)
218
219
  }, void 0, _path2 || (_path2 = /*#__PURE__*/_jsx__default["default"]("path", {
219
220
  d: "M 0 0 L 6 0 A 5 5 0 0 0 6 10 L 0 10 z",
220
221
  fill: "#FFF"
@@ -227,14 +228,14 @@ const CircularProgressIndicator = ({
227
228
  className: classNameElement('arc-blue'),
228
229
  d: "M30,5 C17.536025,6 6,17.536027 5,31",
229
230
  stroke: "#5594e2",
230
- strokeWidth: `${strokeWidth - 0.5}px`,
231
+ strokeWidth: "".concat(strokeWidth - 0.5, "px"),
231
232
  strokeLinecap: "round",
232
233
  "data-testid": "circular-indicator-blue-arc"
233
234
  }), /*#__PURE__*/_jsx__default["default"]("path", {
234
235
  className: classNameElement('arc-white'),
235
236
  d: "M33,5 C17.536027,5 5,17.536027 5,33",
236
237
  stroke: "#FFF",
237
- strokeWidth: `${strokeWidth + 2}px`,
238
+ strokeWidth: "".concat(strokeWidth + 2, "px"),
238
239
  markerStart: "url(#inverseR)",
239
240
  markerEnd: "url(#inverseL)"
240
241
  }), grayArc));
@@ -10,13 +10,14 @@ const {
10
10
  classNameElement
11
11
  } = convertPropToCssClassName('circular-progress-indicator');
12
12
 
13
- const CircularProgressIndicator = ({
14
- size,
15
- showLabel,
16
- showTooltip,
17
- waiting,
18
- loading
19
- }) => {
13
+ const CircularProgressIndicator = _ref => {
14
+ let {
15
+ size,
16
+ showLabel,
17
+ showTooltip,
18
+ waiting,
19
+ loading
20
+ } = _ref;
20
21
  const waitingLabel = 'Waiting...';
21
22
  const loadingLabel = 'Loading...';
22
23
  const currentLabel = waiting && !loading ? waitingLabel : loadingLabel;
@@ -95,7 +96,7 @@ const CircularProgressIndicator = ({
95
96
  "data-testid": "circular-indicator-label",
96
97
  className: classNameElement('label'),
97
98
  style: {
98
- fontSize: `${sizeLabel}px`
99
+ fontSize: "".concat(sizeLabel, "px")
99
100
  }
100
101
  }, void 0, currentLabel); // Only adds the tooltip if sizePx < 17 or showTooltip is true
101
102
 
@@ -117,26 +118,26 @@ const CircularProgressIndicator = ({
117
118
  cy: "50%",
118
119
  fill: "none",
119
120
  r: "28",
120
- strokeWidth: `${trackWidth}px`
121
+ strokeWidth: "".concat(trackWidth, "px")
121
122
  });
122
123
 
123
124
  const grayArc = /*#__PURE__*/_jsx("circle", {
124
125
  className: classNameElement('arc-gray'),
125
126
  stroke: "#E0E3E8",
126
- strokeDasharray: `${grayArcStrokeDasharray}`,
127
- strokeDashoffset: `${grayArcStrokeDashoffset}`,
127
+ strokeDasharray: "".concat(grayArcStrokeDasharray),
128
+ strokeDashoffset: "".concat(grayArcStrokeDashoffset),
128
129
  cx: "50%",
129
130
  cy: "50%",
130
131
  fill: "none",
131
132
  r: "28",
132
- strokeWidth: `${trackWidth}px`
133
+ strokeWidth: "".concat(trackWidth, "px")
133
134
  });
134
135
 
135
136
  const indicator = /*#__PURE__*/_jsx("svg", {
136
- height: `${sizePx}px`,
137
+ height: "".concat(sizePx, "px"),
137
138
  version: "1.1",
138
139
  viewBox: "0 0 66 66",
139
- width: `${sizePx}px`,
140
+ width: "".concat(sizePx, "px"),
140
141
  "data-testid": "circular-indicator"
141
142
  }, void 0, /*#__PURE__*/_jsx("defs", {}, void 0, /*#__PURE__*/_jsx("linearGradient", {
142
143
  id: "grad1",
@@ -190,10 +191,10 @@ const CircularProgressIndicator = ({
190
191
  id: "inverseL",
191
192
  viewBox: "0 0 5 10",
192
193
  refX: "0.5",
193
- refY: `${markerRefY}`,
194
+ refY: "".concat(markerRefY),
194
195
  markerUnits: "strokeWidth",
195
196
  markerWidth: "0.5",
196
- markerHeight: `${markerHeight}`,
197
+ markerHeight: "".concat(markerHeight),
197
198
  orient: "auto"
198
199
  }, void 0, _path || (_path = /*#__PURE__*/_jsx("path", {
199
200
  d: "M 0 0 L 6 0 A 5 5 0 0 0 6 10 L 0 10 z",
@@ -205,7 +206,7 @@ const CircularProgressIndicator = ({
205
206
  refY: "5",
206
207
  markerUnits: "strokeWidth",
207
208
  markerWidth: "0.7",
208
- markerHeight: `${markerHeight}`
209
+ markerHeight: "".concat(markerHeight)
209
210
  }, void 0, _path2 || (_path2 = /*#__PURE__*/_jsx("path", {
210
211
  d: "M 0 0 L 6 0 A 5 5 0 0 0 6 10 L 0 10 z",
211
212
  fill: "#FFF"
@@ -218,14 +219,14 @@ const CircularProgressIndicator = ({
218
219
  className: classNameElement('arc-blue'),
219
220
  d: "M30,5 C17.536025,6 6,17.536027 5,31",
220
221
  stroke: "#5594e2",
221
- strokeWidth: `${strokeWidth - 0.5}px`,
222
+ strokeWidth: "".concat(strokeWidth - 0.5, "px"),
222
223
  strokeLinecap: "round",
223
224
  "data-testid": "circular-indicator-blue-arc"
224
225
  }), /*#__PURE__*/_jsx("path", {
225
226
  className: classNameElement('arc-white'),
226
227
  d: "M33,5 C17.536027,5 5,17.536027 5,33",
227
228
  stroke: "#FFF",
228
- strokeWidth: `${strokeWidth + 2}px`,
229
+ strokeWidth: "".concat(strokeWidth + 2, "px"),
229
230
  markerStart: "url(#inverseR)",
230
231
  markerEnd: "url(#inverseL)"
231
232
  }), grayArc));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-circular-progress-indicator",
3
- "version": "2.0.0-alpha.10",
3
+ "version": "2.0.0-alpha.14",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Circular progress indicator",
6
6
  "module": "./esm/index.js",
@@ -36,9 +36,13 @@
36
36
  "build": "node ../../scripts/build/build.js"
37
37
  },
38
38
  "dependencies": {
39
- "@elliemae/ds-classnames": "2.0.0-alpha.10",
40
- "@elliemae/ds-tooltip": "2.0.0-alpha.10",
41
- "react-desc": "^4.1.3"
39
+ "@elliemae/ds-classnames": "2.0.0-alpha.14",
40
+ "@elliemae/ds-tooltip": "2.0.0-alpha.14",
41
+ "react-desc": "~4.1.3"
42
+ },
43
+ "devDependencies": {
44
+ "@testing-library/jest-dom": "~5.15.0",
45
+ "@testing-library/react": "~12.1.2"
42
46
  },
43
47
  "peerDependencies": {
44
48
  "react": "^17.0.2",
@@ -1,3 +1,4 @@
1
+ /// <reference path="../../../../shared/typings/react-desc.d.ts" />
1
2
  /// <reference types="react" />
2
3
  declare const CircularProgressIndicator: {
3
4
  ({ size, showLabel, showTooltip, waiting, loading }: {
@@ -15,13 +16,33 @@ declare const CircularProgressIndicator: {
15
16
  loading: boolean;
16
17
  };
17
18
  propTypes: {
19
+ size: {
20
+ deprecated: import("react-desc").PropTypesDescValidator;
21
+ };
22
+ showLabel: {
23
+ deprecated: import("react-desc").PropTypesDescValidator;
24
+ };
25
+ showTooltip: {
26
+ deprecated: import("react-desc").PropTypesDescValidator;
27
+ };
28
+ waiting: {
29
+ deprecated: import("react-desc").PropTypesDescValidator;
30
+ };
31
+ loading: {
32
+ deprecated: import("react-desc").PropTypesDescValidator;
33
+ };
34
+ };
35
+ };
36
+ declare const CircularProgressIndicatorWithSchema: {
37
+ (props?: {
18
38
  size: any;
19
39
  showLabel: any;
20
40
  showTooltip: any;
21
41
  waiting: any;
22
42
  loading: any;
23
- };
43
+ } | undefined): JSX.Element;
44
+ propTypes: unknown;
45
+ toTypescript: () => import("react-desc").TypescriptSchema;
24
46
  };
25
- declare const CircularProgressIndicatorWithSchema: any;
26
47
  export { CircularProgressIndicatorWithSchema };
27
48
  export default CircularProgressIndicator;
package/cjs/package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "type": "commonjs",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ]
7
- }
package/esm/package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "type": "module",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ]
7
- }