@elliemae/ds-progress-indicator 3.0.0-next.7 → 3.0.0-next.72
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/dist/cjs/DSProgressIndicator.js +10 -16
- package/dist/cjs/DSProgressIndicator.js.map +2 -2
- package/dist/cjs/ProgressBar.js +9 -16
- package/dist/cjs/ProgressBar.js.map +1 -1
- package/dist/cjs/ProgressCounter.js +9 -16
- package/dist/cjs/ProgressCounter.js.map +1 -1
- package/dist/cjs/classedComponents.js +9 -16
- package/dist/cjs/classedComponents.js.map +1 -1
- package/dist/cjs/index.js +11 -17
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/utils.js +9 -16
- package/dist/cjs/utils.js.map +1 -1
- package/dist/esm/DSProgressIndicator.js +1 -0
- package/dist/esm/DSProgressIndicator.js.map +2 -2
- package/dist/esm/ProgressBar.js.map +1 -1
- package/dist/esm/ProgressCounter.js.map +1 -1
- package/dist/esm/classedComponents.js.map +1 -1
- package/dist/esm/utils.js.map +1 -1
- package/package.json +12 -12
|
@@ -21,33 +21,27 @@ var __spreadValues = (a, b) => {
|
|
|
21
21
|
return a;
|
|
22
22
|
};
|
|
23
23
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
25
24
|
var __export = (target, all) => {
|
|
26
25
|
for (var name in all)
|
|
27
26
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
28
27
|
};
|
|
29
|
-
var
|
|
30
|
-
if (
|
|
31
|
-
for (let key of __getOwnPropNames(
|
|
32
|
-
if (!__hasOwnProp.call(
|
|
33
|
-
__defProp(
|
|
28
|
+
var __copyProps = (to, from, except, desc) => {
|
|
29
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
30
|
+
for (let key of __getOwnPropNames(from))
|
|
31
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
32
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
34
33
|
}
|
|
35
|
-
return
|
|
34
|
+
return to;
|
|
36
35
|
};
|
|
37
|
-
var __toESM = (
|
|
38
|
-
|
|
39
|
-
};
|
|
40
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
41
|
-
return (module2, temp) => {
|
|
42
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
43
|
-
};
|
|
44
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
36
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
37
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
45
38
|
var DSProgressIndicator_exports = {};
|
|
46
39
|
__export(DSProgressIndicator_exports, {
|
|
47
40
|
DSProgressIndicator: () => DSProgressIndicator,
|
|
48
41
|
ProgressIndicatorWithSchema: () => ProgressIndicatorWithSchema,
|
|
49
42
|
default: () => DSProgressIndicator_default
|
|
50
43
|
});
|
|
44
|
+
module.exports = __toCommonJS(DSProgressIndicator_exports);
|
|
51
45
|
var React = __toESM(require("react"));
|
|
52
46
|
var import_react = __toESM(require("react"));
|
|
53
47
|
var import_react_desc = require("react-desc");
|
|
@@ -105,9 +99,9 @@ const progressIndicatorProps = {
|
|
|
105
99
|
style: import_react_desc.PropTypes.object.description("css inline style")
|
|
106
100
|
};
|
|
107
101
|
DSProgressIndicator.propTypes = progressIndicatorProps;
|
|
102
|
+
DSProgressIndicator.displayName = "DSProgressIndicator";
|
|
108
103
|
const ProgressIndicatorWithSchema = (0, import_react_desc.describe)(DSProgressIndicator);
|
|
109
104
|
ProgressIndicatorWithSchema.propTypes = progressIndicatorProps;
|
|
110
105
|
DSProgressIndicator.ProgressBar = import_ProgressBar.default;
|
|
111
106
|
var DSProgressIndicator_default = DSProgressIndicator;
|
|
112
|
-
module.exports = __toCommonJS(DSProgressIndicator_exports);
|
|
113
107
|
//# sourceMappingURL=DSProgressIndicator.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSProgressIndicator.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable react/no-array-index-key */\nimport React, { useMemo } from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';\nimport Counter from './ProgressCounter';\nimport ProgressBar from './ProgressBar';\nimport { Title, Wrapper } from './classedComponents';\n\nconst DSProgressIndicator = ({\n containerProps = {},\n innerRef = () => null,\n title = '',\n counterRenderer = undefined,\n now = undefined,\n min = 0,\n max = undefined,\n disabled = false,\n segments = [],\n style = {},\n}) => {\n const renderProgressBar = useMemo(\n () =>\n segments.length ? (\n <ProgressBar>\n {segments.map(\n (segmentProps, i) =>\n !(segmentProps.now < segmentProps.min) && (\n <ProgressBar.Segment key={i} {...segmentProps} />\n ),\n )}\n </ProgressBar>\n ) : (\n <ProgressBar max={max} min={min} now={now} />\n ),\n [segments, min, max, now],\n );\n\n return (\n <Wrapper\n ref={innerRef}\n aria-disabled={disabled}\n classProps={{ disabled }}\n {...containerProps}\n style={style}\n >\n <DSTruncatedTooltipText containerComponent={Title} value={title} />\n <Counter max={max} min={min} now={now} renderer={counterRenderer} />\n {renderProgressBar}\n </Wrapper>\n );\n};\n\nconst variants = ['default', 'success', 'warning', 'info', 'error'];\n\nconst progressIndicatorProps = {\n containerProps: PropTypes.object.description(\n 'Set of Properties attached to the main container',\n ),\n innerRef: PropTypes.object.description('ref to the components container'),\n title: PropTypes.string.description('components title'),\n variant: PropTypes.oneOf(variants).description('Progress intent variation'),\n now: PropTypes.number.description('Total current value'),\n min: PropTypes.number.description('min value'),\n max: PropTypes.number.description('max value'),\n disabled: PropTypes.bool\n .description('Whether the progress indicator disabled or not')\n .defaultValue(false),\n counterRenderer: PropTypes.func.description('Render a custom counter'),\n segments: PropTypes.array.description(\n 'An array of multiple progress objects',\n ),\n style: PropTypes.object.description('css inline style'),\n};\n\nDSProgressIndicator.propTypes = progressIndicatorProps;\
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["/* eslint-disable react/no-array-index-key */\nimport React, { useMemo } from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';\nimport Counter from './ProgressCounter';\nimport ProgressBar from './ProgressBar';\nimport { Title, Wrapper } from './classedComponents';\n\nconst DSProgressIndicator = ({\n containerProps = {},\n innerRef = () => null,\n title = '',\n counterRenderer = undefined,\n now = undefined,\n min = 0,\n max = undefined,\n disabled = false,\n segments = [],\n style = {},\n}) => {\n const renderProgressBar = useMemo(\n () =>\n segments.length ? (\n <ProgressBar>\n {segments.map(\n (segmentProps, i) =>\n !(segmentProps.now < segmentProps.min) && (\n <ProgressBar.Segment key={i} {...segmentProps} />\n ),\n )}\n </ProgressBar>\n ) : (\n <ProgressBar max={max} min={min} now={now} />\n ),\n [segments, min, max, now],\n );\n\n return (\n <Wrapper\n ref={innerRef}\n aria-disabled={disabled}\n classProps={{ disabled }}\n {...containerProps}\n style={style}\n >\n <DSTruncatedTooltipText containerComponent={Title} value={title} />\n <Counter max={max} min={min} now={now} renderer={counterRenderer} />\n {renderProgressBar}\n </Wrapper>\n );\n};\n\nconst variants = ['default', 'success', 'warning', 'info', 'error'];\n\nconst progressIndicatorProps = {\n containerProps: PropTypes.object.description(\n 'Set of Properties attached to the main container',\n ),\n innerRef: PropTypes.object.description('ref to the components container'),\n title: PropTypes.string.description('components title'),\n variant: PropTypes.oneOf(variants).description('Progress intent variation'),\n now: PropTypes.number.description('Total current value'),\n min: PropTypes.number.description('min value'),\n max: PropTypes.number.description('max value'),\n disabled: PropTypes.bool\n .description('Whether the progress indicator disabled or not')\n .defaultValue(false),\n counterRenderer: PropTypes.func.description('Render a custom counter'),\n segments: PropTypes.array.description(\n 'An array of multiple progress objects',\n ),\n style: PropTypes.object.description('css inline style'),\n};\n\nDSProgressIndicator.propTypes = progressIndicatorProps;\nDSProgressIndicator.displayName = 'DSProgressIndicator';\nconst ProgressIndicatorWithSchema = describe(DSProgressIndicator);\nProgressIndicatorWithSchema.propTypes = progressIndicatorProps;\n\nDSProgressIndicator.ProgressBar = ProgressBar;\n\nexport { DSProgressIndicator, ProgressIndicatorWithSchema };\nexport default DSProgressIndicator;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAA+B;AAC/B,wBAAoC;AACpC,uCAAmC;AACnC,6BAAoB;AACpB,yBAAwB;AACxB,+BAA+B;AAE/B,MAAM,sBAAsB,CAAC;AAAA,EAC3B,iBAAiB,CAAC;AAAA,EAClB,WAAW,MAAM;AAAA,EACjB,QAAQ;AAAA,EACR,kBAAkB;AAAA,EAClB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,WAAW;AAAA,EACX,WAAW,CAAC;AAAA,EACZ,QAAQ,CAAC;AAAA,MACL;AACJ,QAAM,oBAAoB,0BACxB,MACE,SAAS,SACP,mDAAC,kCACE,SAAS,IACR,CAAC,cAAc,MACb,CAAE,cAAa,MAAM,aAAa,QAChC,mDAAC,2BAAY,SAAZ;AAAA,IAAoB,KAAK;AAAA,KAAO,aAAc,CAErD,CACF,IAEA,mDAAC;AAAA,IAAY;AAAA,IAAU;AAAA,IAAU;AAAA,GAAU,GAE/C,CAAC,UAAU,KAAK,KAAK,GAAG,CAC1B;AAEA,SACE,mDAAC;AAAA,IACC,KAAK;AAAA,IACL,iBAAe;AAAA,IACf,YAAY,EAAE,SAAS;AAAA,KACnB,iBAJL;AAAA,IAKC;AAAA,MAEA,mDAAC;AAAA,IAAuB,oBAAoB;AAAA,IAAO,OAAO;AAAA,GAAO,GACjE,mDAAC;AAAA,IAAQ;AAAA,IAAU;AAAA,IAAU;AAAA,IAAU,UAAU;AAAA,GAAiB,GACjE,iBACH;AAEJ;AAEA,MAAM,WAAW,CAAC,WAAW,WAAW,WAAW,QAAQ,OAAO;AAElE,MAAM,yBAAyB;AAAA,EAC7B,gBAAgB,4BAAU,OAAO,YAC/B,kDACF;AAAA,EACA,UAAU,4BAAU,OAAO,YAAY,iCAAiC;AAAA,EACxE,OAAO,4BAAU,OAAO,YAAY,kBAAkB;AAAA,EACtD,SAAS,4BAAU,MAAM,QAAQ,EAAE,YAAY,2BAA2B;AAAA,EAC1E,KAAK,4BAAU,OAAO,YAAY,qBAAqB;AAAA,EACvD,KAAK,4BAAU,OAAO,YAAY,WAAW;AAAA,EAC7C,KAAK,4BAAU,OAAO,YAAY,WAAW;AAAA,EAC7C,UAAU,4BAAU,KACjB,YAAY,gDAAgD,EAC5D,aAAa,KAAK;AAAA,EACrB,iBAAiB,4BAAU,KAAK,YAAY,yBAAyB;AAAA,EACrE,UAAU,4BAAU,MAAM,YACxB,uCACF;AAAA,EACA,OAAO,4BAAU,OAAO,YAAY,kBAAkB;AACxD;AAEA,oBAAoB,YAAY;AAChC,oBAAoB,cAAc;AAClC,MAAM,8BAA8B,gCAAS,mBAAmB;AAChE,4BAA4B,YAAY;AAExC,oBAAoB,cAAc;AAGlC,IAAO,8BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/ProgressBar.js
CHANGED
|
@@ -18,31 +18,25 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
}
|
|
19
19
|
return a;
|
|
20
20
|
};
|
|
21
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
22
21
|
var __export = (target, all) => {
|
|
23
22
|
for (var name in all)
|
|
24
23
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
25
24
|
};
|
|
26
|
-
var
|
|
27
|
-
if (
|
|
28
|
-
for (let key of __getOwnPropNames(
|
|
29
|
-
if (!__hasOwnProp.call(
|
|
30
|
-
__defProp(
|
|
25
|
+
var __copyProps = (to, from, except, desc) => {
|
|
26
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
27
|
+
for (let key of __getOwnPropNames(from))
|
|
28
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
29
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
31
30
|
}
|
|
32
|
-
return
|
|
31
|
+
return to;
|
|
33
32
|
};
|
|
34
|
-
var __toESM = (
|
|
35
|
-
|
|
36
|
-
};
|
|
37
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
38
|
-
return (module2, temp) => {
|
|
39
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
40
|
-
};
|
|
41
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
33
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
34
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
42
35
|
var ProgressBar_exports = {};
|
|
43
36
|
__export(ProgressBar_exports, {
|
|
44
37
|
default: () => ProgressBar_default
|
|
45
38
|
});
|
|
39
|
+
module.exports = __toCommonJS(ProgressBar_exports);
|
|
46
40
|
var React = __toESM(require("react"));
|
|
47
41
|
var import_react = __toESM(require("react"));
|
|
48
42
|
var import_prop_types = __toESM(require("prop-types"));
|
|
@@ -95,5 +89,4 @@ ProgressBar.propTypes = {
|
|
|
95
89
|
max: import_prop_types.default.number
|
|
96
90
|
};
|
|
97
91
|
var ProgressBar_default = ProgressBar;
|
|
98
|
-
module.exports = __toCommonJS(ProgressBar_exports);
|
|
99
92
|
//# sourceMappingURL=ProgressBar.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/ProgressBar.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { getPercentage } from './utils';\nimport { ProgressBarProgress, ProgressBarStatusBar } from './classedComponents';\n\nfunction useProgressTrait({\n now = undefined,\n min = undefined,\n max = undefined,\n text = '',\n}) {\n const percentage = getPercentage(now, min, max);\n return {\n role: 'progressbar',\n 'aria-valuenow': now,\n 'aria-valuemin': min,\n 'aria-valuemax': max,\n 'aria-valuetext': text,\n style: {\n width: `${percentage}%`,\n },\n };\n}\n\nfunction Progress(props) {\n const { variant = 'default' } = props;\n\n const progressTraitProps = useProgressTrait(props);\n\n return (\n <ProgressBarProgress classProps={{ variant }} {...progressTraitProps} />\n );\n}\n\nfunction ProgressBar({\n variant = 'default',\n now = undefined,\n min = undefined,\n max = undefined,\n children: progressSegments,\n}) {\n return (\n <ProgressBarStatusBar>\n {progressSegments || (\n <Progress max={max} min={min} now={now} variant={variant} />\n )}\n </ProgressBarStatusBar>\n );\n}\n\nProgressBar.Segment = Progress;\n\nProgressBar.propTypes = {\n /** Progress intent variation */\n variant: PropTypes.oneOf(['default', 'success', 'warning', 'info', 'error']),\n /** Total current value */\n now: PropTypes.number,\n /** Min value */\n min: PropTypes.number,\n /** Total max */\n max: PropTypes.number,\n};\n\nexport default ProgressBar;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAsB;AACtB,mBAA8B;AAC9B,+BAA0D;AAE1D,0BAA0B;AAAA,EACxB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,GACN;AACD,QAAM,aAAa,gCAAc,KAAK,KAAK,GAAG;AAC9C,SAAO;AAAA,IACL,MAAM;AAAA,IACN,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,IACjB,kBAAkB;AAAA,IAClB,OAAO;AAAA,MACL,OAAO,GAAG;AAAA,IACZ;AAAA,EACF;AACF;AAEA,kBAAkB,OAAO;AACvB,QAAM,EAAE,UAAU,cAAc;AAEhC,QAAM,qBAAqB,iBAAiB,KAAK;AAEjD,SACE,mDAAC;AAAA,IAAoB,YAAY,EAAE,QAAQ;AAAA,KAAO,mBAAoB;AAE1E;AAEA,qBAAqB;AAAA,EACnB,UAAU;AAAA,EACV,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,UAAU;AAAA,GACT;AACD,SACE,mDAAC,qDACE,oBACC,mDAAC;AAAA,IAAS;AAAA,IAAU;AAAA,IAAU;AAAA,IAAU;AAAA,GAAkB,CAE9D;AAEJ;AAEA,YAAY,UAAU;AAEtB,YAAY,YAAY;AAAA,EAEtB,SAAS,0BAAU,MAAM,CAAC,WAAW,WAAW,WAAW,QAAQ,OAAO,CAAC;AAAA,EAE3E,KAAK,0BAAU;AAAA,EAEf,KAAK,0BAAU;AAAA,EAEf,KAAK,0BAAU;AACjB;AAEA,IAAO,sBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -4,31 +4,25 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
7
|
var __export = (target, all) => {
|
|
9
8
|
for (var name in all)
|
|
10
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
10
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
16
|
}
|
|
18
|
-
return
|
|
17
|
+
return to;
|
|
19
18
|
};
|
|
20
|
-
var __toESM = (
|
|
21
|
-
|
|
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);
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
21
|
var ProgressCounter_exports = {};
|
|
29
22
|
__export(ProgressCounter_exports, {
|
|
30
23
|
default: () => ProgressCounter_default
|
|
31
24
|
});
|
|
25
|
+
module.exports = __toCommonJS(ProgressCounter_exports);
|
|
32
26
|
var React = __toESM(require("react"));
|
|
33
27
|
var import_react = __toESM(require("react"));
|
|
34
28
|
var import_utils = require("./utils");
|
|
@@ -46,5 +40,4 @@ function ProgressCounter({ now, max, min, renderer = renderers.default }) {
|
|
|
46
40
|
return /* @__PURE__ */ import_react.default.createElement(import_classedComponents.ProgressIndicatorCounter, null, renderer({ now, max, min }));
|
|
47
41
|
}
|
|
48
42
|
var ProgressCounter_default = ProgressCounter;
|
|
49
|
-
module.exports = __toCommonJS(ProgressCounter_exports);
|
|
50
43
|
//# sourceMappingURL=ProgressCounter.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/ProgressCounter.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\nimport { getPercentage } from './utils';\nimport { ProgressIndicatorCounter } from './classedComponents';\n\nconst defaultRenderer = ({ now, max, min }) => `${min || now} of ${max}`;\nconst percentageRenderer = ({ now, max, min }) => {\n const percentage = getPercentage(now, min, max);\n return `${percentage}%`;\n};\n\nconst renderers = {\n default: defaultRenderer,\n percentage: percentageRenderer,\n};\n\nfunction ProgressCounter({ now, max, min, renderer = renderers.default }) {\n return (\n <ProgressIndicatorCounter>\n {renderer({ now, max, min })}\n </ProgressIndicatorCounter>\n );\n}\n\nexport default ProgressCounter;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,mBAA8B;AAC9B,+BAAyC;AAEzC,MAAM,kBAAkB,CAAC,EAAE,KAAK,KAAK,UAAU,GAAG,OAAO,UAAU;AACnE,MAAM,qBAAqB,CAAC,EAAE,KAAK,KAAK,UAAU;AAChD,QAAM,aAAa,gCAAc,KAAK,KAAK,GAAG;AAC9C,SAAO,GAAG;AACZ;AAEA,MAAM,YAAY;AAAA,EAChB,SAAS;AAAA,EACT,YAAY;AACd;AAEA,yBAAyB,EAAE,KAAK,KAAK,KAAK,WAAW,UAAU,WAAW;AACxE,SACE,mDAAC,yDACE,SAAS,EAAE,KAAK,KAAK,IAAI,CAAC,CAC7B;AAEJ;AAEA,IAAO,0BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -4,27 +4,20 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
7
|
var __export = (target, all) => {
|
|
9
8
|
for (var name in all)
|
|
10
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
10
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
16
|
}
|
|
18
|
-
return
|
|
17
|
+
return to;
|
|
19
18
|
};
|
|
20
|
-
var __toESM = (
|
|
21
|
-
|
|
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);
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
21
|
var classedComponents_exports = {};
|
|
29
22
|
__export(classedComponents_exports, {
|
|
30
23
|
ProgressBarProgress: () => ProgressBarProgress,
|
|
@@ -34,6 +27,7 @@ __export(classedComponents_exports, {
|
|
|
34
27
|
Wrapper: () => Wrapper,
|
|
35
28
|
blockName: () => blockName
|
|
36
29
|
});
|
|
30
|
+
module.exports = __toCommonJS(classedComponents_exports);
|
|
37
31
|
var React = __toESM(require("react"));
|
|
38
32
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
39
33
|
const blockName = "determinate-progress-indicator";
|
|
@@ -43,5 +37,4 @@ const Title = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "tit
|
|
|
43
37
|
const ProgressIndicatorCounter = (0, import_ds_classnames.aggregatedClasses)("span")(blockName, "counter");
|
|
44
38
|
const ProgressBarStatusBar = (0, import_ds_classnames.aggregatedClasses)("div")(progressBlockName);
|
|
45
39
|
const ProgressBarProgress = (0, import_ds_classnames.aggregatedClasses)("div")(progressBlockName, "progress", ({ variant }) => ({ [variant]: true }));
|
|
46
|
-
module.exports = __toCommonJS(classedComponents_exports);
|
|
47
40
|
//# sourceMappingURL=classedComponents.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/classedComponents.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { aggregatedClasses } from '@elliemae/ds-classnames';\n\nexport const blockName = 'determinate-progress-indicator';\nconst progressBlockName = 'progress-bar';\n\nexport const Wrapper = aggregatedClasses('div')(\n blockName,\n null,\n ({ disabled }) => ({ disabled }),\n);\nexport const Title = aggregatedClasses('div')(blockName, 'title');\nexport const ProgressIndicatorCounter = aggregatedClasses('span')(\n blockName,\n 'counter',\n);\nexport const ProgressBarStatusBar = aggregatedClasses('div')(progressBlockName);\nexport const ProgressBarProgress = aggregatedClasses('div')(\n progressBlockName,\n 'progress',\n ({ variant }) => ({ [variant]: true }),\n);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,2BAAkC;AAE3B,MAAM,YAAY;AACzB,MAAM,oBAAoB;AAEnB,MAAM,UAAU,4CAAkB,KAAK,EAC5C,WACA,MACA,CAAC,EAAE,eAAgB,GAAE,SAAS,EAChC;AACO,MAAM,QAAQ,4CAAkB,KAAK,EAAE,WAAW,OAAO;AACzD,MAAM,2BAA2B,4CAAkB,MAAM,EAC9D,WACA,SACF;AACO,MAAM,uBAAuB,4CAAkB,KAAK,EAAE,iBAAiB;AACvE,MAAM,sBAAsB,4CAAkB,KAAK,EACxD,mBACA,YACA,CAAC,EAAE,cAAe,IAAG,UAAU,KAAK,EACtC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -4,33 +4,27 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
7
|
var __export = (target, all) => {
|
|
9
8
|
for (var name in all)
|
|
10
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
10
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
16
|
}
|
|
18
|
-
return
|
|
17
|
+
return to;
|
|
19
18
|
};
|
|
20
|
-
var
|
|
21
|
-
|
|
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);
|
|
19
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
21
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
22
|
var src_exports = {};
|
|
29
23
|
__export(src_exports, {
|
|
30
24
|
default: () => import_DSProgressIndicator.default
|
|
31
25
|
});
|
|
26
|
+
module.exports = __toCommonJS(src_exports);
|
|
32
27
|
var React = __toESM(require("react"));
|
|
33
|
-
__reExport(src_exports, require("./DSProgressIndicator"));
|
|
28
|
+
__reExport(src_exports, require("./DSProgressIndicator"), module.exports);
|
|
34
29
|
var import_DSProgressIndicator = __toESM(require("./DSProgressIndicator"));
|
|
35
|
-
module.exports = __toCommonJS(src_exports);
|
|
36
30
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export * from './DSProgressIndicator';\nexport { default } from './DSProgressIndicator';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,kCAAd;AACA,iCAAwB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/utils.js
CHANGED
|
@@ -4,34 +4,27 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
7
|
var __export = (target, all) => {
|
|
9
8
|
for (var name in all)
|
|
10
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
10
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
16
|
}
|
|
18
|
-
return
|
|
17
|
+
return to;
|
|
19
18
|
};
|
|
20
|
-
var __toESM = (
|
|
21
|
-
|
|
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);
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
21
|
var utils_exports = {};
|
|
29
22
|
__export(utils_exports, {
|
|
30
23
|
getPercentage: () => getPercentage
|
|
31
24
|
});
|
|
25
|
+
module.exports = __toCommonJS(utils_exports);
|
|
32
26
|
var React = __toESM(require("react"));
|
|
33
27
|
function getPercentage(now, min, max) {
|
|
34
28
|
return (now || min) / max * 100;
|
|
35
29
|
}
|
|
36
|
-
module.exports = __toCommonJS(utils_exports);
|
|
37
30
|
//# sourceMappingURL=utils.js.map
|
package/dist/cjs/utils.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export function getPercentage(now, min, max) {\n return ((now || min) / max) * 100;\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,uBAAuB,KAAK,KAAK,KAAK;AAC3C,SAAS,QAAO,OAAO,MAAO;AAChC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -74,6 +74,7 @@ const progressIndicatorProps = {
|
|
|
74
74
|
style: PropTypes.object.description("css inline style")
|
|
75
75
|
};
|
|
76
76
|
DSProgressIndicator.propTypes = progressIndicatorProps;
|
|
77
|
+
DSProgressIndicator.displayName = "DSProgressIndicator";
|
|
77
78
|
const ProgressIndicatorWithSchema = describe(DSProgressIndicator);
|
|
78
79
|
ProgressIndicatorWithSchema.propTypes = progressIndicatorProps;
|
|
79
80
|
DSProgressIndicator.ProgressBar = ProgressBar;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSProgressIndicator.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/no-array-index-key */\nimport React, { useMemo } from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';\nimport Counter from './ProgressCounter';\nimport ProgressBar from './ProgressBar';\nimport { Title, Wrapper } from './classedComponents';\n\nconst DSProgressIndicator = ({\n containerProps = {},\n innerRef = () => null,\n title = '',\n counterRenderer = undefined,\n now = undefined,\n min = 0,\n max = undefined,\n disabled = false,\n segments = [],\n style = {},\n}) => {\n const renderProgressBar = useMemo(\n () =>\n segments.length ? (\n <ProgressBar>\n {segments.map(\n (segmentProps, i) =>\n !(segmentProps.now < segmentProps.min) && (\n <ProgressBar.Segment key={i} {...segmentProps} />\n ),\n )}\n </ProgressBar>\n ) : (\n <ProgressBar max={max} min={min} now={now} />\n ),\n [segments, min, max, now],\n );\n\n return (\n <Wrapper\n ref={innerRef}\n aria-disabled={disabled}\n classProps={{ disabled }}\n {...containerProps}\n style={style}\n >\n <DSTruncatedTooltipText containerComponent={Title} value={title} />\n <Counter max={max} min={min} now={now} renderer={counterRenderer} />\n {renderProgressBar}\n </Wrapper>\n );\n};\n\nconst variants = ['default', 'success', 'warning', 'info', 'error'];\n\nconst progressIndicatorProps = {\n containerProps: PropTypes.object.description(\n 'Set of Properties attached to the main container',\n ),\n innerRef: PropTypes.object.description('ref to the components container'),\n title: PropTypes.string.description('components title'),\n variant: PropTypes.oneOf(variants).description('Progress intent variation'),\n now: PropTypes.number.description('Total current value'),\n min: PropTypes.number.description('min value'),\n max: PropTypes.number.description('max value'),\n disabled: PropTypes.bool\n .description('Whether the progress indicator disabled or not')\n .defaultValue(false),\n counterRenderer: PropTypes.func.description('Render a custom counter'),\n segments: PropTypes.array.description(\n 'An array of multiple progress objects',\n ),\n style: PropTypes.object.description('css inline style'),\n};\n\nDSProgressIndicator.propTypes = progressIndicatorProps;\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,sBAAsB,CAAC;AAAA,EAC3B,iBAAiB;AAAA,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/no-array-index-key */\nimport React, { useMemo } from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';\nimport Counter from './ProgressCounter';\nimport ProgressBar from './ProgressBar';\nimport { Title, Wrapper } from './classedComponents';\n\nconst DSProgressIndicator = ({\n containerProps = {},\n innerRef = () => null,\n title = '',\n counterRenderer = undefined,\n now = undefined,\n min = 0,\n max = undefined,\n disabled = false,\n segments = [],\n style = {},\n}) => {\n const renderProgressBar = useMemo(\n () =>\n segments.length ? (\n <ProgressBar>\n {segments.map(\n (segmentProps, i) =>\n !(segmentProps.now < segmentProps.min) && (\n <ProgressBar.Segment key={i} {...segmentProps} />\n ),\n )}\n </ProgressBar>\n ) : (\n <ProgressBar max={max} min={min} now={now} />\n ),\n [segments, min, max, now],\n );\n\n return (\n <Wrapper\n ref={innerRef}\n aria-disabled={disabled}\n classProps={{ disabled }}\n {...containerProps}\n style={style}\n >\n <DSTruncatedTooltipText containerComponent={Title} value={title} />\n <Counter max={max} min={min} now={now} renderer={counterRenderer} />\n {renderProgressBar}\n </Wrapper>\n );\n};\n\nconst variants = ['default', 'success', 'warning', 'info', 'error'];\n\nconst progressIndicatorProps = {\n containerProps: PropTypes.object.description(\n 'Set of Properties attached to the main container',\n ),\n innerRef: PropTypes.object.description('ref to the components container'),\n title: PropTypes.string.description('components title'),\n variant: PropTypes.oneOf(variants).description('Progress intent variation'),\n now: PropTypes.number.description('Total current value'),\n min: PropTypes.number.description('min value'),\n max: PropTypes.number.description('max value'),\n disabled: PropTypes.bool\n .description('Whether the progress indicator disabled or not')\n .defaultValue(false),\n counterRenderer: PropTypes.func.description('Render a custom counter'),\n segments: PropTypes.array.description(\n 'An array of multiple progress objects',\n ),\n style: PropTypes.object.description('css inline style'),\n};\n\nDSProgressIndicator.propTypes = progressIndicatorProps;\nDSProgressIndicator.displayName = 'DSProgressIndicator';\nconst ProgressIndicatorWithSchema = describe(DSProgressIndicator);\nProgressIndicatorWithSchema.propTypes = progressIndicatorProps;\n\nDSProgressIndicator.ProgressBar = ProgressBar;\n\nexport { DSProgressIndicator, ProgressIndicatorWithSchema };\nexport default DSProgressIndicator;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,sBAAsB,CAAC;AAAA,EAC3B,iBAAiB,CAAC;AAAA,EAClB,WAAW,MAAM;AAAA,EACjB,QAAQ;AAAA,EACR,kBAAkB;AAAA,EAClB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,WAAW;AAAA,EACX,WAAW,CAAC;AAAA,EACZ,QAAQ,CAAC;AAAA,MACL;AACJ,QAAM,oBAAoB,QACxB,MACE,SAAS,SACP,qCAAC,mBACE,SAAS,IACR,CAAC,cAAc,MACb,CAAE,cAAa,MAAM,aAAa,QAChC,qCAAC,YAAY,SAAZ;AAAA,IAAoB,KAAK;AAAA,KAAO,aAAc,CAErD,CACF,IAEA,qCAAC;AAAA,IAAY;AAAA,IAAU;AAAA,IAAU;AAAA,GAAU,GAE/C,CAAC,UAAU,KAAK,KAAK,GAAG,CAC1B;AAEA,SACE,qCAAC;AAAA,IACC,KAAK;AAAA,IACL,iBAAe;AAAA,IACf,YAAY,EAAE,SAAS;AAAA,KACnB,iBAJL;AAAA,IAKC;AAAA,MAEA,qCAAC;AAAA,IAAuB,oBAAoB;AAAA,IAAO,OAAO;AAAA,GAAO,GACjE,qCAAC;AAAA,IAAQ;AAAA,IAAU;AAAA,IAAU;AAAA,IAAU,UAAU;AAAA,GAAiB,GACjE,iBACH;AAEJ;AAEA,MAAM,WAAW,CAAC,WAAW,WAAW,WAAW,QAAQ,OAAO;AAElE,MAAM,yBAAyB;AAAA,EAC7B,gBAAgB,UAAU,OAAO,YAC/B,kDACF;AAAA,EACA,UAAU,UAAU,OAAO,YAAY,iCAAiC;AAAA,EACxE,OAAO,UAAU,OAAO,YAAY,kBAAkB;AAAA,EACtD,SAAS,UAAU,MAAM,QAAQ,EAAE,YAAY,2BAA2B;AAAA,EAC1E,KAAK,UAAU,OAAO,YAAY,qBAAqB;AAAA,EACvD,KAAK,UAAU,OAAO,YAAY,WAAW;AAAA,EAC7C,KAAK,UAAU,OAAO,YAAY,WAAW;AAAA,EAC7C,UAAU,UAAU,KACjB,YAAY,gDAAgD,EAC5D,aAAa,KAAK;AAAA,EACrB,iBAAiB,UAAU,KAAK,YAAY,yBAAyB;AAAA,EACrE,UAAU,UAAU,MAAM,YACxB,uCACF;AAAA,EACA,OAAO,UAAU,OAAO,YAAY,kBAAkB;AACxD;AAEA,oBAAoB,YAAY;AAChC,oBAAoB,cAAc;AAClC,MAAM,8BAA8B,SAAS,mBAAmB;AAChE,4BAA4B,YAAY;AAExC,oBAAoB,cAAc;AAGlC,IAAO,8BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/ProgressBar.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { getPercentage } from './utils';\nimport { ProgressBarProgress, ProgressBarStatusBar } from './classedComponents';\n\nfunction useProgressTrait({\n now = undefined,\n min = undefined,\n max = undefined,\n text = '',\n}) {\n const percentage = getPercentage(now, min, max);\n return {\n role: 'progressbar',\n 'aria-valuenow': now,\n 'aria-valuemin': min,\n 'aria-valuemax': max,\n 'aria-valuetext': text,\n style: {\n width: `${percentage}%`,\n },\n };\n}\n\nfunction Progress(props) {\n const { variant = 'default' } = props;\n\n const progressTraitProps = useProgressTrait(props);\n\n return (\n <ProgressBarProgress classProps={{ variant }} {...progressTraitProps} />\n );\n}\n\nfunction ProgressBar({\n variant = 'default',\n now = undefined,\n min = undefined,\n max = undefined,\n children: progressSegments,\n}) {\n return (\n <ProgressBarStatusBar>\n {progressSegments || (\n <Progress max={max} min={min} now={now} variant={variant} />\n )}\n </ProgressBarStatusBar>\n );\n}\n\nProgressBar.Segment = Progress;\n\nProgressBar.propTypes = {\n /** Progress intent variation */\n variant: PropTypes.oneOf(['default', 'success', 'warning', 'info', 'error']),\n /** Total current value */\n now: PropTypes.number,\n /** Min value */\n min: PropTypes.number,\n /** Total max */\n max: PropTypes.number,\n};\n\nexport default ProgressBar;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AAEA,0BAA0B;AAAA,EACxB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,GACN;AACD,QAAM,aAAa,cAAc,KAAK,KAAK;
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AAEA,0BAA0B;AAAA,EACxB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,GACN;AACD,QAAM,aAAa,cAAc,KAAK,KAAK,GAAG;AAC9C,SAAO;AAAA,IACL,MAAM;AAAA,IACN,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,IACjB,kBAAkB;AAAA,IAClB,OAAO;AAAA,MACL,OAAO,GAAG;AAAA,IACZ;AAAA,EACF;AACF;AAEA,kBAAkB,OAAO;AACvB,QAAM,EAAE,UAAU,cAAc;AAEhC,QAAM,qBAAqB,iBAAiB,KAAK;AAEjD,SACE,qCAAC;AAAA,IAAoB,YAAY,EAAE,QAAQ;AAAA,KAAO,mBAAoB;AAE1E;AAEA,qBAAqB;AAAA,EACnB,UAAU;AAAA,EACV,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,UAAU;AAAA,GACT;AACD,SACE,qCAAC,4BACE,oBACC,qCAAC;AAAA,IAAS;AAAA,IAAU;AAAA,IAAU;AAAA,IAAU;AAAA,GAAkB,CAE9D;AAEJ;AAEA,YAAY,UAAU;AAEtB,YAAY,YAAY;AAAA,EAEtB,SAAS,UAAU,MAAM,CAAC,WAAW,WAAW,WAAW,QAAQ,OAAO,CAAC;AAAA,EAE3E,KAAK,UAAU;AAAA,EAEf,KAAK,UAAU;AAAA,EAEf,KAAK,UAAU;AACjB;AAEA,IAAO,sBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/ProgressCounter.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { getPercentage } from './utils';\nimport { ProgressIndicatorCounter } from './classedComponents';\n\nconst defaultRenderer = ({ now, max, min }) => `${min || now} of ${max}`;\nconst percentageRenderer = ({ now, max, min }) => {\n const percentage = getPercentage(now, min, max);\n return `${percentage}%`;\n};\n\nconst renderers = {\n default: defaultRenderer,\n percentage: percentageRenderer,\n};\n\nfunction ProgressCounter({ now, max, min, renderer = renderers.default }) {\n return (\n <ProgressIndicatorCounter>\n {renderer({ now, max, min })}\n </ProgressIndicatorCounter>\n );\n}\n\nexport default ProgressCounter;\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AACA;AAEA,MAAM,kBAAkB,CAAC,EAAE,KAAK,KAAK,UAAU,GAAG,OAAO,UAAU;AACnE,MAAM,qBAAqB,CAAC,EAAE,KAAK,KAAK,UAAU;AAChD,QAAM,aAAa,cAAc,KAAK,KAAK;
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AAEA,MAAM,kBAAkB,CAAC,EAAE,KAAK,KAAK,UAAU,GAAG,OAAO,UAAU;AACnE,MAAM,qBAAqB,CAAC,EAAE,KAAK,KAAK,UAAU;AAChD,QAAM,aAAa,cAAc,KAAK,KAAK,GAAG;AAC9C,SAAO,GAAG;AACZ;AAEA,MAAM,YAAY;AAAA,EAChB,SAAS;AAAA,EACT,YAAY;AACd;AAEA,yBAAyB,EAAE,KAAK,KAAK,KAAK,WAAW,UAAU,WAAW;AACxE,SACE,qCAAC,gCACE,SAAS,EAAE,KAAK,KAAK,IAAI,CAAC,CAC7B;AAEJ;AAEA,IAAO,0BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/classedComponents.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { aggregatedClasses } from '@elliemae/ds-classnames';\n\nexport const blockName = 'determinate-progress-indicator';\nconst progressBlockName = 'progress-bar';\n\nexport const Wrapper = aggregatedClasses('div')(\n blockName,\n null,\n ({ disabled }) => ({ disabled }),\n);\nexport const Title = aggregatedClasses('div')(blockName, 'title');\nexport const ProgressIndicatorCounter = aggregatedClasses('span')(\n blockName,\n 'counter',\n);\nexport const ProgressBarStatusBar = aggregatedClasses('div')(progressBlockName);\nexport const ProgressBarProgress = aggregatedClasses('div')(\n progressBlockName,\n 'progress',\n ({ variant }) => ({ [variant]: true }),\n);\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AAEO,MAAM,YAAY;AACzB,MAAM,oBAAoB;AAEnB,MAAM,UAAU,kBAAkB,
|
|
5
|
+
"mappings": "AAAA;ACAA;AAEO,MAAM,YAAY;AACzB,MAAM,oBAAoB;AAEnB,MAAM,UAAU,kBAAkB,KAAK,EAC5C,WACA,MACA,CAAC,EAAE,eAAgB,GAAE,SAAS,EAChC;AACO,MAAM,QAAQ,kBAAkB,KAAK,EAAE,WAAW,OAAO;AACzD,MAAM,2BAA2B,kBAAkB,MAAM,EAC9D,WACA,SACF;AACO,MAAM,uBAAuB,kBAAkB,KAAK,EAAE,iBAAiB;AACvE,MAAM,sBAAsB,kBAAkB,KAAK,EACxD,mBACA,YACA,CAAC,EAAE,cAAe,IAAG,UAAU,KAAK,EACtC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/utils.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/utils.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export function getPercentage(now, min, max) {\n return ((now || min) / max) * 100;\n}\n"],
|
|
5
|
-
"mappings": "AAAA;ACAO,uBAAuB,KAAK,KAAK,KAAK;AAC3C,SAAS,QAAO,OAAO,MAAO;
|
|
5
|
+
"mappings": "AAAA;ACAO,uBAAuB,KAAK,KAAK,KAAK;AAC3C,SAAS,QAAO,OAAO,MAAO;AAChC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-progress-indicator",
|
|
3
|
-
"version": "3.0.0-next.
|
|
3
|
+
"version": "3.0.0-next.72",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Progress Indicator",
|
|
6
6
|
"files": [
|
|
@@ -54,10 +54,17 @@
|
|
|
54
54
|
"reportFile": "tests.xml",
|
|
55
55
|
"indent": 4
|
|
56
56
|
},
|
|
57
|
+
"scripts": {
|
|
58
|
+
"dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
|
|
59
|
+
"test": "node ../../scripts/testing/test.mjs",
|
|
60
|
+
"lint": "node ../../scripts/lint.mjs",
|
|
61
|
+
"dts": "node ../../scripts/dts.mjs",
|
|
62
|
+
"build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
|
|
63
|
+
},
|
|
57
64
|
"dependencies": {
|
|
58
|
-
"@elliemae/ds-classnames": "
|
|
59
|
-
"@elliemae/ds-truncated-tooltip-text": "
|
|
60
|
-
"prop-types": "~15.
|
|
65
|
+
"@elliemae/ds-classnames": "workspace:*",
|
|
66
|
+
"@elliemae/ds-truncated-tooltip-text": "workspace:*",
|
|
67
|
+
"prop-types": "~15.8.1",
|
|
61
68
|
"react-desc": "~4.1.3"
|
|
62
69
|
},
|
|
63
70
|
"peerDependencies": {
|
|
@@ -67,12 +74,5 @@
|
|
|
67
74
|
"publishConfig": {
|
|
68
75
|
"access": "public",
|
|
69
76
|
"typeSafety": false
|
|
70
|
-
},
|
|
71
|
-
"scripts": {
|
|
72
|
-
"dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
|
|
73
|
-
"test": "node ../../scripts/testing/test.mjs",
|
|
74
|
-
"lint": "node ../../scripts/lint.mjs",
|
|
75
|
-
"dts": "node ../../scripts/dts.mjs",
|
|
76
|
-
"build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
|
|
77
77
|
}
|
|
78
|
-
}
|
|
78
|
+
}
|