@elliemae/ds-indeterminate-progress-indicator 3.0.0-next.1 → 3.0.0-next.5

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.
@@ -0,0 +1,130 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
9
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
+ var __spreadValues = (a, b) => {
11
+ for (var prop in b || (b = {}))
12
+ if (__hasOwnProp.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ if (__getOwnPropSymbols)
15
+ for (var prop of __getOwnPropSymbols(b)) {
16
+ if (__propIsEnum.call(b, prop))
17
+ __defNormalProp(a, prop, b[prop]);
18
+ }
19
+ return a;
20
+ };
21
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
22
+ var __export = (target, all) => {
23
+ for (var name in all)
24
+ __defProp(target, name, { get: all[name], enumerable: true });
25
+ };
26
+ var __reExport = (target, module2, copyDefault, desc) => {
27
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
28
+ for (let key of __getOwnPropNames(module2))
29
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
30
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
31
+ }
32
+ return target;
33
+ };
34
+ var __toESM = (module2, isNodeMode) => {
35
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
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);
42
+ var DSIndeterminateProgressIndicator_exports = {};
43
+ __export(DSIndeterminateProgressIndicator_exports, {
44
+ DSIndeterminateProgressIndicator: () => DSIndeterminateProgressIndicator,
45
+ IndeterminateProgressIndicatorWithSchema: () => IndeterminateProgressIndicatorWithSchema,
46
+ default: () => DSIndeterminateProgressIndicator_default
47
+ });
48
+ var React = __toESM(require("react"));
49
+ var import_react = __toESM(require("react"));
50
+ var import_react_desc = require("react-desc");
51
+ var import_ds_classnames = require("@elliemae/ds-classnames");
52
+ var import_ds_truncated_tooltip_text = __toESM(require("@elliemae/ds-truncated-tooltip-text"));
53
+ const { cssClassName, classNameBlock, classNameElement } = (0, import_ds_classnames.convertPropToCssClassName)("indeterminate-progress-indicator");
54
+ function DSIndeterminateProgressIndicator({
55
+ containerProps,
56
+ title,
57
+ complete,
58
+ failed,
59
+ processing,
60
+ processingComplete,
61
+ processingCompleteTitle,
62
+ processingFail,
63
+ processingFailTitle,
64
+ animated,
65
+ percent,
66
+ lineOnly
67
+ }) {
68
+ const [label, setLabel] = (0, import_react.useState)(title);
69
+ (0, import_react.useEffect)(() => {
70
+ if ((processingComplete || processingFail || processing) && (complete || failed)) {
71
+ setLabel(complete ? processingCompleteTitle : processingFailTitle);
72
+ }
73
+ }, [failed, complete, processingComplete, processingFail, processing]);
74
+ return /* @__PURE__ */ import_react.default.createElement("div", __spreadValues({
75
+ "aria-busy": processing,
76
+ "aria-label": label,
77
+ "aria-live": "polite",
78
+ className: `${cssClassName} ${!complete && !failed && !processing ? classNameBlock("default") : ""} ${complete ? classNameBlock("complete") : ""} ${failed ? classNameBlock("failed") : ""} ${processing ? classNameBlock("processing") : ""} ${animated && processing ? "animated" : ""}
79
+ ${processingComplete ? classNameBlock("processing-complete") : ""}
80
+ ${processingFail ? classNameBlock("processing-fail") : ""}
81
+ ${lineOnly ? "line-only" : null}
82
+ `,
83
+ role: "alert"
84
+ }, containerProps), !lineOnly ? /* @__PURE__ */ import_react.default.createElement(import_ds_truncated_tooltip_text.default, {
85
+ className: classNameBlock("tooltip-text"),
86
+ containerComponent: /* @__PURE__ */ import_react.default.createElement("div", null),
87
+ value: label
88
+ }) : null, /* @__PURE__ */ import_react.default.createElement("div", {
89
+ className: `${classNameElement("bar")}`
90
+ }, /* @__PURE__ */ import_react.default.createElement("div", {
91
+ className: `${classNameElement("bar-indicator")}`,
92
+ style: {
93
+ width: `${!complete && !failed && !animated && processing ? percent : 100}%`
94
+ }
95
+ })));
96
+ }
97
+ DSIndeterminateProgressIndicator.defaultProps = {
98
+ containerProps: {},
99
+ title: "",
100
+ complete: false,
101
+ failed: false,
102
+ processing: false,
103
+ processingComplete: false,
104
+ processingCompleteTitle: "Complete",
105
+ processingFail: false,
106
+ processingFailTitle: "Fail",
107
+ animated: true,
108
+ percent: 50,
109
+ lineOnly: false
110
+ };
111
+ const indeterminateProgressIndicatorProps = {
112
+ containerProps: import_react_desc.PropTypes.object.description("Set of Properties attached to the main container"),
113
+ title: import_react_desc.PropTypes.string.description("component s label"),
114
+ processingCompleteTitle: import_react_desc.PropTypes.string.description("label to display when the process is completed"),
115
+ processingFailTitle: import_react_desc.PropTypes.string.description("label to display when the process has failed"),
116
+ complete: import_react_desc.PropTypes.bool.description("Sets the process state to completed").defaultValue(false),
117
+ failed: import_react_desc.PropTypes.bool.description("Sets the process state to failed").defaultValue(false),
118
+ processing: import_react_desc.PropTypes.bool.description("Sets the process state to processing").defaultValue(false),
119
+ processingComplete: import_react_desc.PropTypes.bool.description("Sets the process state to processing and then completed").defaultValue(false),
120
+ processingFail: import_react_desc.PropTypes.bool.description("Sets the process state to processing and then failed").defaultValue(false),
121
+ animated: import_react_desc.PropTypes.bool.description("animate or not").defaultValue(true),
122
+ percent: import_react_desc.PropTypes.number.description("completion percentage").defaultValue(50),
123
+ lineOnly: import_react_desc.PropTypes.bool.description("hide the label from rendering")
124
+ };
125
+ DSIndeterminateProgressIndicator.propTypes = indeterminateProgressIndicatorProps;
126
+ const IndeterminateProgressIndicatorWithSchema = (0, import_react_desc.describe)(DSIndeterminateProgressIndicator);
127
+ IndeterminateProgressIndicatorWithSchema.propTypes = indeterminateProgressIndicatorProps;
128
+ var DSIndeterminateProgressIndicator_default = DSIndeterminateProgressIndicator;
129
+ module.exports = __toCommonJS(DSIndeterminateProgressIndicator_exports);
130
+ //# sourceMappingURL=DSIndeterminateProgressIndicator.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/DSIndeterminateProgressIndicator.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable complexity */\n/* eslint-disable react/require-default-props */\nimport React, { useEffect, useState } from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';\n\nconst { cssClassName, classNameBlock, classNameElement } = convertPropToCssClassName(\n 'indeterminate-progress-indicator',\n);\n\nfunction DSIndeterminateProgressIndicator({\n containerProps,\n title,\n complete,\n failed,\n processing,\n processingComplete,\n processingCompleteTitle,\n processingFail,\n processingFailTitle,\n animated,\n percent,\n lineOnly,\n}) {\n const [label, setLabel] = useState(title);\n useEffect(() => {\n if ((processingComplete || processingFail || processing) && (complete || failed)) {\n setLabel(complete ? processingCompleteTitle : processingFailTitle);\n }\n }, [failed, complete, processingComplete, processingFail, processing]);\n return (\n <div\n aria-busy={processing}\n aria-label={label}\n aria-live=\"polite\"\n className={`${cssClassName} ${!complete && !failed && !processing ? classNameBlock('default') : ''} ${\n complete ? classNameBlock('complete') : ''\n } ${\n // eslint-disable-next-line max-len\n failed ? classNameBlock('failed') : ''\n } ${processing ? classNameBlock('processing') : ''} ${animated && processing ? 'animated' : ''} \n ${processingComplete ? classNameBlock('processing-complete') : ''} \n ${processingFail ? classNameBlock('processing-fail') : ''} \n ${lineOnly ? 'line-only' : null}\n `}\n role=\"alert\"\n {...containerProps}\n >\n {!lineOnly ? (\n <DSTruncatedTooltipText className={classNameBlock('tooltip-text')} containerComponent={<div />} value={label} />\n ) : null}\n <div className={`${classNameElement('bar')}`}>\n <div\n className={`${classNameElement('bar-indicator')}`}\n style={{\n width: `${!complete && !failed && !animated && processing ? percent : 100}%`,\n }}\n />\n </div>\n </div>\n );\n}\n\nDSIndeterminateProgressIndicator.defaultProps = {\n containerProps: {},\n title: '',\n complete: false,\n failed: false,\n processing: false,\n processingComplete: false,\n processingCompleteTitle: 'Complete',\n processingFail: false,\n processingFailTitle: 'Fail',\n animated: true,\n percent: 50,\n lineOnly: false,\n};\n\nconst indeterminateProgressIndicatorProps = {\n containerProps: PropTypes.object.description('Set of Properties attached to the main container'),\n title: PropTypes.string.description('component s label'),\n processingCompleteTitle: PropTypes.string.description('label to display when the process is completed'),\n processingFailTitle: PropTypes.string.description('label to display when the process has failed'),\n complete: PropTypes.bool.description('Sets the process state to completed').defaultValue(false),\n failed: PropTypes.bool.description('Sets the process state to failed').defaultValue(false),\n processing: PropTypes.bool.description('Sets the process state to processing').defaultValue(false),\n processingComplete: PropTypes.bool\n .description('Sets the process state to processing and then completed')\n .defaultValue(false),\n processingFail: PropTypes.bool\n .description('Sets the process state to processing and then failed')\n .defaultValue(false),\n animated: PropTypes.bool.description('animate or not').defaultValue(true),\n percent: PropTypes.number.description('completion percentage').defaultValue(50),\n lineOnly: PropTypes.bool.description('hide the label from rendering'),\n};\n\nDSIndeterminateProgressIndicator.propTypes = indeterminateProgressIndicatorProps;\n\nconst IndeterminateProgressIndicatorWithSchema = describe(DSIndeterminateProgressIndicator);\n\nIndeterminateProgressIndicatorWithSchema.propTypes = indeterminateProgressIndicatorProps;\n\nexport { DSIndeterminateProgressIndicator, IndeterminateProgressIndicatorWithSchema };\nexport default DSIndeterminateProgressIndicator;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,mBAA2C;AAC3C,wBAAoC;AACpC,2BAA0C;AAC1C,uCAAmC;AAEnC,MAAM,EAAE,cAAc,gBAAgB,qBAAqB,oDACzD;AAGF,0CAA0C;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,GACC;AACD,QAAM,CAAC,OAAO,YAAY,2BAAS;AACnC,8BAAU,MAAM;AACd,QAAK,uBAAsB,kBAAkB,eAAgB,aAAY,SAAS;AAChF,eAAS,WAAW,0BAA0B;AAAA;AAAA,KAE/C,CAAC,QAAQ,UAAU,oBAAoB,gBAAgB;AAC1D,SACE,mDAAC,OAAD;AAAA,IACE,aAAW;AAAA,IACX,cAAY;AAAA,IACZ,aAAU;AAAA,IACV,WAAW,GAAG,gBAAgB,CAAC,YAAY,CAAC,UAAU,CAAC,aAAa,eAAe,aAAa,MAC9F,WAAW,eAAe,cAAc,OAGxC,SAAS,eAAe,YAAY,MAClC,aAAa,eAAe,gBAAgB,MAAM,YAAY,aAAa,aAAa;AAAA,WACvF,qBAAqB,eAAe,yBAAyB;AAAA,WAC7D,iBAAiB,eAAe,qBAAqB;AAAA,WACrD,WAAW,cAAc;AAAA;AAAA,IAE9B,MAAK;AAAA,KACD,iBAEH,CAAC,WACA,mDAAC,0CAAD;AAAA,IAAwB,WAAW,eAAe;AAAA,IAAiB,oBAAoB,mDAAC,OAAD;AAAA,IAAS,OAAO;AAAA,OACrG,MACJ,mDAAC,OAAD;AAAA,IAAK,WAAW,GAAG,iBAAiB;AAAA,KAClC,mDAAC,OAAD;AAAA,IACE,WAAW,GAAG,iBAAiB;AAAA,IAC/B,OAAO;AAAA,MACL,OAAO,GAAG,CAAC,YAAY,CAAC,UAAU,CAAC,YAAY,aAAa,UAAU;AAAA;AAAA;AAAA;AAQlF,iCAAiC,eAAe;AAAA,EAC9C,gBAAgB;AAAA,EAChB,OAAO;AAAA,EACP,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,oBAAoB;AAAA,EACpB,yBAAyB;AAAA,EACzB,gBAAgB;AAAA,EAChB,qBAAqB;AAAA,EACrB,UAAU;AAAA,EACV,SAAS;AAAA,EACT,UAAU;AAAA;AAGZ,MAAM,sCAAsC;AAAA,EAC1C,gBAAgB,4BAAU,OAAO,YAAY;AAAA,EAC7C,OAAO,4BAAU,OAAO,YAAY;AAAA,EACpC,yBAAyB,4BAAU,OAAO,YAAY;AAAA,EACtD,qBAAqB,4BAAU,OAAO,YAAY;AAAA,EAClD,UAAU,4BAAU,KAAK,YAAY,uCAAuC,aAAa;AAAA,EACzF,QAAQ,4BAAU,KAAK,YAAY,oCAAoC,aAAa;AAAA,EACpF,YAAY,4BAAU,KAAK,YAAY,wCAAwC,aAAa;AAAA,EAC5F,oBAAoB,4BAAU,KAC3B,YAAY,2DACZ,aAAa;AAAA,EAChB,gBAAgB,4BAAU,KACvB,YAAY,wDACZ,aAAa;AAAA,EAChB,UAAU,4BAAU,KAAK,YAAY,kBAAkB,aAAa;AAAA,EACpE,SAAS,4BAAU,OAAO,YAAY,yBAAyB,aAAa;AAAA,EAC5E,UAAU,4BAAU,KAAK,YAAY;AAAA;AAGvC,iCAAiC,YAAY;AAE7C,MAAM,2CAA2C,gCAAS;AAE1D,yCAAyC,YAAY;AAGrD,IAAO,2CAAQ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,36 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
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
+ default: () => import_DSIndeterminateProgressIndicator.default
31
+ });
32
+ var React = __toESM(require("react"));
33
+ __reExport(src_exports, require("./DSIndeterminateProgressIndicator"));
34
+ var import_DSIndeterminateProgressIndicator = __toESM(require("./DSIndeterminateProgressIndicator"));
35
+ module.exports = __toCommonJS(src_exports);
36
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["export * from './DSIndeterminateProgressIndicator';\nexport { default } from './DSIndeterminateProgressIndicator';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc;AACd,8CAAwB;",
6
+ "names": []
7
+ }
@@ -0,0 +1,103 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
4
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
+ var __spreadValues = (a, b) => {
7
+ for (var prop in b || (b = {}))
8
+ if (__hasOwnProp.call(b, prop))
9
+ __defNormalProp(a, prop, b[prop]);
10
+ if (__getOwnPropSymbols)
11
+ for (var prop of __getOwnPropSymbols(b)) {
12
+ if (__propIsEnum.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ }
15
+ return a;
16
+ };
17
+ import * as React from "react";
18
+ import React2, { useEffect, useState } from "react";
19
+ import { describe, PropTypes } from "react-desc";
20
+ import { convertPropToCssClassName } from "@elliemae/ds-classnames";
21
+ import DSTruncatedTooltipText from "@elliemae/ds-truncated-tooltip-text";
22
+ const { cssClassName, classNameBlock, classNameElement } = convertPropToCssClassName("indeterminate-progress-indicator");
23
+ function DSIndeterminateProgressIndicator({
24
+ containerProps,
25
+ title,
26
+ complete,
27
+ failed,
28
+ processing,
29
+ processingComplete,
30
+ processingCompleteTitle,
31
+ processingFail,
32
+ processingFailTitle,
33
+ animated,
34
+ percent,
35
+ lineOnly
36
+ }) {
37
+ const [label, setLabel] = useState(title);
38
+ useEffect(() => {
39
+ if ((processingComplete || processingFail || processing) && (complete || failed)) {
40
+ setLabel(complete ? processingCompleteTitle : processingFailTitle);
41
+ }
42
+ }, [failed, complete, processingComplete, processingFail, processing]);
43
+ return /* @__PURE__ */ React2.createElement("div", __spreadValues({
44
+ "aria-busy": processing,
45
+ "aria-label": label,
46
+ "aria-live": "polite",
47
+ className: `${cssClassName} ${!complete && !failed && !processing ? classNameBlock("default") : ""} ${complete ? classNameBlock("complete") : ""} ${failed ? classNameBlock("failed") : ""} ${processing ? classNameBlock("processing") : ""} ${animated && processing ? "animated" : ""}
48
+ ${processingComplete ? classNameBlock("processing-complete") : ""}
49
+ ${processingFail ? classNameBlock("processing-fail") : ""}
50
+ ${lineOnly ? "line-only" : null}
51
+ `,
52
+ role: "alert"
53
+ }, containerProps), !lineOnly ? /* @__PURE__ */ React2.createElement(DSTruncatedTooltipText, {
54
+ className: classNameBlock("tooltip-text"),
55
+ containerComponent: /* @__PURE__ */ React2.createElement("div", null),
56
+ value: label
57
+ }) : null, /* @__PURE__ */ React2.createElement("div", {
58
+ className: `${classNameElement("bar")}`
59
+ }, /* @__PURE__ */ React2.createElement("div", {
60
+ className: `${classNameElement("bar-indicator")}`,
61
+ style: {
62
+ width: `${!complete && !failed && !animated && processing ? percent : 100}%`
63
+ }
64
+ })));
65
+ }
66
+ DSIndeterminateProgressIndicator.defaultProps = {
67
+ containerProps: {},
68
+ title: "",
69
+ complete: false,
70
+ failed: false,
71
+ processing: false,
72
+ processingComplete: false,
73
+ processingCompleteTitle: "Complete",
74
+ processingFail: false,
75
+ processingFailTitle: "Fail",
76
+ animated: true,
77
+ percent: 50,
78
+ lineOnly: false
79
+ };
80
+ const indeterminateProgressIndicatorProps = {
81
+ containerProps: PropTypes.object.description("Set of Properties attached to the main container"),
82
+ title: PropTypes.string.description("component s label"),
83
+ processingCompleteTitle: PropTypes.string.description("label to display when the process is completed"),
84
+ processingFailTitle: PropTypes.string.description("label to display when the process has failed"),
85
+ complete: PropTypes.bool.description("Sets the process state to completed").defaultValue(false),
86
+ failed: PropTypes.bool.description("Sets the process state to failed").defaultValue(false),
87
+ processing: PropTypes.bool.description("Sets the process state to processing").defaultValue(false),
88
+ processingComplete: PropTypes.bool.description("Sets the process state to processing and then completed").defaultValue(false),
89
+ processingFail: PropTypes.bool.description("Sets the process state to processing and then failed").defaultValue(false),
90
+ animated: PropTypes.bool.description("animate or not").defaultValue(true),
91
+ percent: PropTypes.number.description("completion percentage").defaultValue(50),
92
+ lineOnly: PropTypes.bool.description("hide the label from rendering")
93
+ };
94
+ DSIndeterminateProgressIndicator.propTypes = indeterminateProgressIndicatorProps;
95
+ const IndeterminateProgressIndicatorWithSchema = describe(DSIndeterminateProgressIndicator);
96
+ IndeterminateProgressIndicatorWithSchema.propTypes = indeterminateProgressIndicatorProps;
97
+ var DSIndeterminateProgressIndicator_default = DSIndeterminateProgressIndicator;
98
+ export {
99
+ DSIndeterminateProgressIndicator,
100
+ IndeterminateProgressIndicatorWithSchema,
101
+ DSIndeterminateProgressIndicator_default as default
102
+ };
103
+ //# sourceMappingURL=DSIndeterminateProgressIndicator.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSIndeterminateProgressIndicator.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable complexity */\n/* eslint-disable react/require-default-props */\nimport React, { useEffect, useState } from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';\n\nconst { cssClassName, classNameBlock, classNameElement } = convertPropToCssClassName(\n 'indeterminate-progress-indicator',\n);\n\nfunction DSIndeterminateProgressIndicator({\n containerProps,\n title,\n complete,\n failed,\n processing,\n processingComplete,\n processingCompleteTitle,\n processingFail,\n processingFailTitle,\n animated,\n percent,\n lineOnly,\n}) {\n const [label, setLabel] = useState(title);\n useEffect(() => {\n if ((processingComplete || processingFail || processing) && (complete || failed)) {\n setLabel(complete ? processingCompleteTitle : processingFailTitle);\n }\n }, [failed, complete, processingComplete, processingFail, processing]);\n return (\n <div\n aria-busy={processing}\n aria-label={label}\n aria-live=\"polite\"\n className={`${cssClassName} ${!complete && !failed && !processing ? classNameBlock('default') : ''} ${\n complete ? classNameBlock('complete') : ''\n } ${\n // eslint-disable-next-line max-len\n failed ? classNameBlock('failed') : ''\n } ${processing ? classNameBlock('processing') : ''} ${animated && processing ? 'animated' : ''} \n ${processingComplete ? classNameBlock('processing-complete') : ''} \n ${processingFail ? classNameBlock('processing-fail') : ''} \n ${lineOnly ? 'line-only' : null}\n `}\n role=\"alert\"\n {...containerProps}\n >\n {!lineOnly ? (\n <DSTruncatedTooltipText className={classNameBlock('tooltip-text')} containerComponent={<div />} value={label} />\n ) : null}\n <div className={`${classNameElement('bar')}`}>\n <div\n className={`${classNameElement('bar-indicator')}`}\n style={{\n width: `${!complete && !failed && !animated && processing ? percent : 100}%`,\n }}\n />\n </div>\n </div>\n );\n}\n\nDSIndeterminateProgressIndicator.defaultProps = {\n containerProps: {},\n title: '',\n complete: false,\n failed: false,\n processing: false,\n processingComplete: false,\n processingCompleteTitle: 'Complete',\n processingFail: false,\n processingFailTitle: 'Fail',\n animated: true,\n percent: 50,\n lineOnly: false,\n};\n\nconst indeterminateProgressIndicatorProps = {\n containerProps: PropTypes.object.description('Set of Properties attached to the main container'),\n title: PropTypes.string.description('component s label'),\n processingCompleteTitle: PropTypes.string.description('label to display when the process is completed'),\n processingFailTitle: PropTypes.string.description('label to display when the process has failed'),\n complete: PropTypes.bool.description('Sets the process state to completed').defaultValue(false),\n failed: PropTypes.bool.description('Sets the process state to failed').defaultValue(false),\n processing: PropTypes.bool.description('Sets the process state to processing').defaultValue(false),\n processingComplete: PropTypes.bool\n .description('Sets the process state to processing and then completed')\n .defaultValue(false),\n processingFail: PropTypes.bool\n .description('Sets the process state to processing and then failed')\n .defaultValue(false),\n animated: PropTypes.bool.description('animate or not').defaultValue(true),\n percent: PropTypes.number.description('completion percentage').defaultValue(50),\n lineOnly: PropTypes.bool.description('hide the label from rendering'),\n};\n\nDSIndeterminateProgressIndicator.propTypes = indeterminateProgressIndicatorProps;\n\nconst IndeterminateProgressIndicatorWithSchema = describe(DSIndeterminateProgressIndicator);\n\nIndeterminateProgressIndicatorWithSchema.propTypes = indeterminateProgressIndicatorProps;\n\nexport { DSIndeterminateProgressIndicator, IndeterminateProgressIndicatorWithSchema };\nexport default DSIndeterminateProgressIndicator;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;AAAA;ACGA;AACA;AACA;AACA;AAEA,MAAM,EAAE,cAAc,gBAAgB,qBAAqB,0BACzD;AAGF,0CAA0C;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,GACC;AACD,QAAM,CAAC,OAAO,YAAY,SAAS;AACnC,YAAU,MAAM;AACd,QAAK,uBAAsB,kBAAkB,eAAgB,aAAY,SAAS;AAChF,eAAS,WAAW,0BAA0B;AAAA;AAAA,KAE/C,CAAC,QAAQ,UAAU,oBAAoB,gBAAgB;AAC1D,SACE,qCAAC,OAAD;AAAA,IACE,aAAW;AAAA,IACX,cAAY;AAAA,IACZ,aAAU;AAAA,IACV,WAAW,GAAG,gBAAgB,CAAC,YAAY,CAAC,UAAU,CAAC,aAAa,eAAe,aAAa,MAC9F,WAAW,eAAe,cAAc,OAGxC,SAAS,eAAe,YAAY,MAClC,aAAa,eAAe,gBAAgB,MAAM,YAAY,aAAa,aAAa;AAAA,WACvF,qBAAqB,eAAe,yBAAyB;AAAA,WAC7D,iBAAiB,eAAe,qBAAqB;AAAA,WACrD,WAAW,cAAc;AAAA;AAAA,IAE9B,MAAK;AAAA,KACD,iBAEH,CAAC,WACA,qCAAC,wBAAD;AAAA,IAAwB,WAAW,eAAe;AAAA,IAAiB,oBAAoB,qCAAC,OAAD;AAAA,IAAS,OAAO;AAAA,OACrG,MACJ,qCAAC,OAAD;AAAA,IAAK,WAAW,GAAG,iBAAiB;AAAA,KAClC,qCAAC,OAAD;AAAA,IACE,WAAW,GAAG,iBAAiB;AAAA,IAC/B,OAAO;AAAA,MACL,OAAO,GAAG,CAAC,YAAY,CAAC,UAAU,CAAC,YAAY,aAAa,UAAU;AAAA;AAAA;AAAA;AAQlF,iCAAiC,eAAe;AAAA,EAC9C,gBAAgB;AAAA,EAChB,OAAO;AAAA,EACP,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,oBAAoB;AAAA,EACpB,yBAAyB;AAAA,EACzB,gBAAgB;AAAA,EAChB,qBAAqB;AAAA,EACrB,UAAU;AAAA,EACV,SAAS;AAAA,EACT,UAAU;AAAA;AAGZ,MAAM,sCAAsC;AAAA,EAC1C,gBAAgB,UAAU,OAAO,YAAY;AAAA,EAC7C,OAAO,UAAU,OAAO,YAAY;AAAA,EACpC,yBAAyB,UAAU,OAAO,YAAY;AAAA,EACtD,qBAAqB,UAAU,OAAO,YAAY;AAAA,EAClD,UAAU,UAAU,KAAK,YAAY,uCAAuC,aAAa;AAAA,EACzF,QAAQ,UAAU,KAAK,YAAY,oCAAoC,aAAa;AAAA,EACpF,YAAY,UAAU,KAAK,YAAY,wCAAwC,aAAa;AAAA,EAC5F,oBAAoB,UAAU,KAC3B,YAAY,2DACZ,aAAa;AAAA,EAChB,gBAAgB,UAAU,KACvB,YAAY,wDACZ,aAAa;AAAA,EAChB,UAAU,UAAU,KAAK,YAAY,kBAAkB,aAAa;AAAA,EACpE,SAAS,UAAU,OAAO,YAAY,yBAAyB,aAAa;AAAA,EAC5E,UAAU,UAAU,KAAK,YAAY;AAAA;AAGvC,iCAAiC,YAAY;AAE7C,MAAM,2CAA2C,SAAS;AAE1D,yCAAyC,YAAY;AAGrD,IAAO,2CAAQ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ export * from "./DSIndeterminateProgressIndicator";
3
+ import { default as default2 } from "./DSIndeterminateProgressIndicator";
4
+ export {
5
+ default2 as default
6
+ };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
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 * from './DSIndeterminateProgressIndicator';\nexport { default } from './DSIndeterminateProgressIndicator';\n"],
5
+ "mappings": "AAAA;ACAA;AACA;",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -1,19 +1,22 @@
1
1
  {
2
2
  "name": "@elliemae/ds-indeterminate-progress-indicator",
3
- "version": "3.0.0-next.1",
3
+ "version": "3.0.0-next.5",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Indeterminate Progress Indicator",
6
- "module": "./esm/index.js",
7
- "main": "./cjs/index.js",
8
- "types": "./types/index.d.ts",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "module": "./dist/esm/index.js",
10
+ "main": "./dist/cjs/index.js",
11
+ "types": "./dist/types/index.d.ts",
9
12
  "exports": {
10
13
  ".": {
11
- "import": "./esm/index.js",
12
- "require": "./cjs/index.js"
14
+ "import": "./dist/esm/index.js",
15
+ "require": "./dist/cjs/index.js"
13
16
  },
14
17
  "./DSIndeterminateProgressIndicator": {
15
- "import": "./esm/DSIndeterminateProgressIndicator.js",
16
- "require": "./cjs/DSIndeterminateProgressIndicator.js"
18
+ "import": "./dist/esm/DSIndeterminateProgressIndicator.js",
19
+ "require": "./dist/cjs/DSIndeterminateProgressIndicator.js"
17
20
  }
18
21
  },
19
22
  "sideEffects": [
@@ -25,19 +28,19 @@
25
28
  "url": "https://git.elliemae.io/platform-ui/dimsum.git"
26
29
  },
27
30
  "engines": {
28
- "npm": ">=7",
29
- "node": ">=14"
31
+ "pnpm": ">=6",
32
+ "node": ">=16"
30
33
  },
31
34
  "author": "ICE MT",
32
- "scripts": {
33
- "dev": "cross-env NODE_ENV=development && node ../../scripts/build/build.js -w",
34
- "prebuild": "exit 0",
35
- "predev": "exit 0",
36
- "build": "node ../../scripts/build/build.js"
35
+ "jestSonar": {
36
+ "sonar56x": true,
37
+ "reportPath": "reports",
38
+ "reportFile": "tests.xml",
39
+ "indent": 4
37
40
  },
38
41
  "dependencies": {
39
- "@elliemae/ds-classnames": "3.0.0-next.1",
40
- "@elliemae/ds-truncated-tooltip-text": "3.0.0-next.1",
42
+ "@elliemae/ds-classnames": "3.0.0-next.5",
43
+ "@elliemae/ds-truncated-tooltip-text": "3.0.0-next.5",
41
44
  "react-desc": "~4.1.3"
42
45
  },
43
46
  "peerDependencies": {
@@ -46,7 +49,13 @@
46
49
  },
47
50
  "publishConfig": {
48
51
  "access": "public",
49
- "directory": "dist",
50
- "generateSubmodules": true
52
+ "typeSafety": false
53
+ },
54
+ "scripts": {
55
+ "dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
56
+ "test": "node ../../scripts/testing/test.mjs",
57
+ "lint": "node ../../scripts/lint.mjs",
58
+ "dts": "node ../../scripts/dts.mjs",
59
+ "build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
51
60
  }
52
61
  }
@@ -1,113 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var _defineProperty = require('@babel/runtime/helpers/defineProperty');
6
- var _jsx = require('@babel/runtime/helpers/jsx');
7
- require('core-js/modules/web.dom-collections.iterator.js');
8
- require('core-js/modules/esnext.async-iterator.filter.js');
9
- require('core-js/modules/esnext.iterator.constructor.js');
10
- require('core-js/modules/esnext.iterator.filter.js');
11
- require('core-js/modules/esnext.async-iterator.for-each.js');
12
- require('core-js/modules/esnext.iterator.for-each.js');
13
- var react = require('react');
14
- var reactDesc = require('react-desc');
15
- var dsClassnames = require('@elliemae/ds-classnames');
16
- var DSTruncatedTooltipText = require('@elliemae/ds-truncated-tooltip-text');
17
- var jsxRuntime = require('react/jsx-runtime');
18
-
19
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
20
-
21
- var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
22
- var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
23
- var DSTruncatedTooltipText__default = /*#__PURE__*/_interopDefaultLegacy(DSTruncatedTooltipText);
24
-
25
- var _div;
26
-
27
- 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; }
28
-
29
- 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; }
30
- const {
31
- cssClassName,
32
- classNameBlock,
33
- classNameElement
34
- } = dsClassnames.convertPropToCssClassName('indeterminate-progress-indicator');
35
-
36
- function DSIndeterminateProgressIndicator(_ref) {
37
- let {
38
- containerProps,
39
- title,
40
- complete,
41
- failed,
42
- processing,
43
- processingComplete,
44
- processingCompleteTitle,
45
- processingFail,
46
- processingFailTitle,
47
- animated,
48
- percent,
49
- lineOnly
50
- } = _ref;
51
- const [label, setLabel] = react.useState(title);
52
- react.useEffect(() => {
53
- if ((processingComplete || processingFail || processing) && (complete || failed)) {
54
- setLabel(complete ? processingCompleteTitle : processingFailTitle);
55
- }
56
- }, [failed, complete, processingComplete, processingFail, processing]);
57
- return /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread(_objectSpread({
58
- "aria-busy": processing,
59
- "aria-label": label,
60
- "aria-live": "polite",
61
- className: "".concat(cssClassName, " ").concat(!complete && !failed && !processing ? classNameBlock('default') : '', " ").concat(complete ? classNameBlock('complete') : '', " ").concat( // eslint-disable-next-line max-len
62
- failed ? classNameBlock('failed') : '', " ").concat(processing ? classNameBlock('processing') : '', " ").concat(animated && processing ? 'animated' : '', " \n ").concat(processingComplete ? classNameBlock('processing-complete') : '', " \n ").concat(processingFail ? classNameBlock('processing-fail') : '', " \n ").concat(lineOnly ? 'line-only' : null, "\n "),
63
- role: "alert"
64
- }, containerProps), {}, {
65
- children: [!lineOnly ? /*#__PURE__*/_jsx__default["default"](DSTruncatedTooltipText__default["default"], {
66
- className: classNameBlock('tooltip-text'),
67
- containerComponent: _div || (_div = /*#__PURE__*/_jsx__default["default"]("div", {})),
68
- value: label
69
- }) : null, /*#__PURE__*/_jsx__default["default"]("div", {
70
- className: "".concat(classNameElement('bar'))
71
- }, void 0, /*#__PURE__*/_jsx__default["default"]("div", {
72
- className: "".concat(classNameElement('bar-indicator')),
73
- style: {
74
- width: "".concat(!complete && !failed && !animated && processing ? percent : 100, "%")
75
- }
76
- }))]
77
- }));
78
- }
79
-
80
- DSIndeterminateProgressIndicator.defaultProps = {
81
- containerProps: {},
82
- title: '',
83
- complete: false,
84
- failed: false,
85
- processing: false,
86
- processingComplete: false,
87
- processingCompleteTitle: 'Complete',
88
- processingFail: false,
89
- processingFailTitle: 'Fail',
90
- animated: true,
91
- percent: 50,
92
- lineOnly: false
93
- };
94
- const indeterminateProgressIndicatorProps = {
95
- containerProps: reactDesc.PropTypes.object.description('Set of Properties attached to the main container'),
96
- title: reactDesc.PropTypes.string.description('component s label'),
97
- processingCompleteTitle: reactDesc.PropTypes.string.description('label to display when the process is completed'),
98
- processingFailTitle: reactDesc.PropTypes.string.description('label to display when the process has failed'),
99
- complete: reactDesc.PropTypes.bool.description('Sets the process state to completed').defaultValue(false),
100
- failed: reactDesc.PropTypes.bool.description('Sets the process state to failed').defaultValue(false),
101
- processing: reactDesc.PropTypes.bool.description('Sets the process state to processing').defaultValue(false),
102
- processingComplete: reactDesc.PropTypes.bool.description('Sets the process state to processing and then completed').defaultValue(false),
103
- processingFail: reactDesc.PropTypes.bool.description('Sets the process state to processing and then failed').defaultValue(false),
104
- animated: reactDesc.PropTypes.bool.description('animate or not').defaultValue(true),
105
- percent: reactDesc.PropTypes.number.description('completion percentage').defaultValue(50),
106
- lineOnly: reactDesc.PropTypes.bool.description('hide the label from rendering')
107
- };
108
- const IndeterminateProgressIndicatorWithSchema = reactDesc.describe(DSIndeterminateProgressIndicator);
109
- IndeterminateProgressIndicatorWithSchema.propTypes = indeterminateProgressIndicatorProps;
110
-
111
- exports.DSIndeterminateProgressIndicator = DSIndeterminateProgressIndicator;
112
- exports.IndeterminateProgressIndicatorWithSchema = IndeterminateProgressIndicatorWithSchema;
113
- exports["default"] = DSIndeterminateProgressIndicator;
package/cjs/index.js DELETED
@@ -1,11 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var DSIndeterminateProgressIndicator = require('./DSIndeterminateProgressIndicator.js');
6
-
7
-
8
-
9
- exports.DSIndeterminateProgressIndicator = DSIndeterminateProgressIndicator.DSIndeterminateProgressIndicator;
10
- exports.IndeterminateProgressIndicatorWithSchema = DSIndeterminateProgressIndicator.IndeterminateProgressIndicatorWithSchema;
11
- exports["default"] = DSIndeterminateProgressIndicator.DSIndeterminateProgressIndicator;
@@ -1,101 +0,0 @@
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 'core-js/modules/web.dom-collections.iterator.js';
9
- import { useState, useEffect } from 'react';
10
- import { PropTypes, describe } from 'react-desc';
11
- import { convertPropToCssClassName } from '@elliemae/ds-classnames';
12
- import DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';
13
- import { jsxs } from 'react/jsx-runtime';
14
-
15
- var _div;
16
-
17
- 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; }
18
-
19
- 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; }
20
- const {
21
- cssClassName,
22
- classNameBlock,
23
- classNameElement
24
- } = convertPropToCssClassName('indeterminate-progress-indicator');
25
-
26
- function DSIndeterminateProgressIndicator(_ref) {
27
- let {
28
- containerProps,
29
- title,
30
- complete,
31
- failed,
32
- processing,
33
- processingComplete,
34
- processingCompleteTitle,
35
- processingFail,
36
- processingFailTitle,
37
- animated,
38
- percent,
39
- lineOnly
40
- } = _ref;
41
- const [label, setLabel] = useState(title);
42
- useEffect(() => {
43
- if ((processingComplete || processingFail || processing) && (complete || failed)) {
44
- setLabel(complete ? processingCompleteTitle : processingFailTitle);
45
- }
46
- }, [failed, complete, processingComplete, processingFail, processing]);
47
- return /*#__PURE__*/jsxs("div", _objectSpread(_objectSpread({
48
- "aria-busy": processing,
49
- "aria-label": label,
50
- "aria-live": "polite",
51
- className: "".concat(cssClassName, " ").concat(!complete && !failed && !processing ? classNameBlock('default') : '', " ").concat(complete ? classNameBlock('complete') : '', " ").concat( // eslint-disable-next-line max-len
52
- failed ? classNameBlock('failed') : '', " ").concat(processing ? classNameBlock('processing') : '', " ").concat(animated && processing ? 'animated' : '', " \n ").concat(processingComplete ? classNameBlock('processing-complete') : '', " \n ").concat(processingFail ? classNameBlock('processing-fail') : '', " \n ").concat(lineOnly ? 'line-only' : null, "\n "),
53
- role: "alert"
54
- }, containerProps), {}, {
55
- children: [!lineOnly ? /*#__PURE__*/_jsx(DSTruncatedTooltipText, {
56
- className: classNameBlock('tooltip-text'),
57
- containerComponent: _div || (_div = /*#__PURE__*/_jsx("div", {})),
58
- value: label
59
- }) : null, /*#__PURE__*/_jsx("div", {
60
- className: "".concat(classNameElement('bar'))
61
- }, void 0, /*#__PURE__*/_jsx("div", {
62
- className: "".concat(classNameElement('bar-indicator')),
63
- style: {
64
- width: "".concat(!complete && !failed && !animated && processing ? percent : 100, "%")
65
- }
66
- }))]
67
- }));
68
- }
69
-
70
- DSIndeterminateProgressIndicator.defaultProps = {
71
- containerProps: {},
72
- title: '',
73
- complete: false,
74
- failed: false,
75
- processing: false,
76
- processingComplete: false,
77
- processingCompleteTitle: 'Complete',
78
- processingFail: false,
79
- processingFailTitle: 'Fail',
80
- animated: true,
81
- percent: 50,
82
- lineOnly: false
83
- };
84
- const indeterminateProgressIndicatorProps = {
85
- containerProps: PropTypes.object.description('Set of Properties attached to the main container'),
86
- title: PropTypes.string.description('component s label'),
87
- processingCompleteTitle: PropTypes.string.description('label to display when the process is completed'),
88
- processingFailTitle: PropTypes.string.description('label to display when the process has failed'),
89
- complete: PropTypes.bool.description('Sets the process state to completed').defaultValue(false),
90
- failed: PropTypes.bool.description('Sets the process state to failed').defaultValue(false),
91
- processing: PropTypes.bool.description('Sets the process state to processing').defaultValue(false),
92
- processingComplete: PropTypes.bool.description('Sets the process state to processing and then completed').defaultValue(false),
93
- processingFail: PropTypes.bool.description('Sets the process state to processing and then failed').defaultValue(false),
94
- animated: PropTypes.bool.description('animate or not').defaultValue(true),
95
- percent: PropTypes.number.description('completion percentage').defaultValue(50),
96
- lineOnly: PropTypes.bool.description('hide the label from rendering')
97
- };
98
- const IndeterminateProgressIndicatorWithSchema = describe(DSIndeterminateProgressIndicator);
99
- IndeterminateProgressIndicatorWithSchema.propTypes = indeterminateProgressIndicatorProps;
100
-
101
- export { DSIndeterminateProgressIndicator, IndeterminateProgressIndicatorWithSchema, DSIndeterminateProgressIndicator as default };
package/esm/index.js DELETED
@@ -1 +0,0 @@
1
- export { DSIndeterminateProgressIndicator, IndeterminateProgressIndicatorWithSchema, DSIndeterminateProgressIndicator as default } from './DSIndeterminateProgressIndicator.js';
@@ -1,105 +0,0 @@
1
- /// <reference path="../../../../shared/typings/react-desc.d.ts" />
2
- /// <reference types="react" />
3
- declare function DSIndeterminateProgressIndicator({ containerProps, title, complete, failed, processing, processingComplete, processingCompleteTitle, processingFail, processingFailTitle, animated, percent, lineOnly, }: {
4
- containerProps: any;
5
- title: any;
6
- complete: any;
7
- failed: any;
8
- processing: any;
9
- processingComplete: any;
10
- processingCompleteTitle: any;
11
- processingFail: any;
12
- processingFailTitle: any;
13
- animated: any;
14
- percent: any;
15
- lineOnly: any;
16
- }): JSX.Element;
17
- declare namespace DSIndeterminateProgressIndicator {
18
- var defaultProps: {
19
- containerProps: {};
20
- title: string;
21
- complete: boolean;
22
- failed: boolean;
23
- processing: boolean;
24
- processingComplete: boolean;
25
- processingCompleteTitle: string;
26
- processingFail: boolean;
27
- processingFailTitle: string;
28
- animated: boolean;
29
- percent: number;
30
- lineOnly: boolean;
31
- };
32
- var propTypes: {
33
- containerProps: {
34
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
35
- deprecated: import("react-desc").PropTypesDescValidator;
36
- };
37
- isRequired: import("react-desc").PropTypesDescValue;
38
- };
39
- title: {
40
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
41
- deprecated: import("react-desc").PropTypesDescValidator;
42
- };
43
- isRequired: import("react-desc").PropTypesDescValue;
44
- };
45
- processingCompleteTitle: {
46
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
47
- deprecated: import("react-desc").PropTypesDescValidator;
48
- };
49
- isRequired: import("react-desc").PropTypesDescValue;
50
- };
51
- processingFailTitle: {
52
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
53
- deprecated: import("react-desc").PropTypesDescValidator;
54
- };
55
- isRequired: import("react-desc").PropTypesDescValue;
56
- };
57
- complete: {
58
- deprecated: import("react-desc").PropTypesDescValidator;
59
- };
60
- failed: {
61
- deprecated: import("react-desc").PropTypesDescValidator;
62
- };
63
- processing: {
64
- deprecated: import("react-desc").PropTypesDescValidator;
65
- };
66
- processingComplete: {
67
- deprecated: import("react-desc").PropTypesDescValidator;
68
- };
69
- processingFail: {
70
- deprecated: import("react-desc").PropTypesDescValidator;
71
- };
72
- animated: {
73
- deprecated: import("react-desc").PropTypesDescValidator;
74
- };
75
- percent: {
76
- deprecated: import("react-desc").PropTypesDescValidator;
77
- };
78
- lineOnly: {
79
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
80
- deprecated: import("react-desc").PropTypesDescValidator;
81
- };
82
- isRequired: import("react-desc").PropTypesDescValue;
83
- };
84
- };
85
- }
86
- declare const IndeterminateProgressIndicatorWithSchema: {
87
- (props?: {
88
- containerProps: any;
89
- title: any;
90
- complete: any;
91
- failed: any;
92
- processing: any;
93
- processingComplete: any;
94
- processingCompleteTitle: any;
95
- processingFail: any;
96
- processingFailTitle: any;
97
- animated: any;
98
- percent: any;
99
- lineOnly: any;
100
- } | undefined): JSX.Element;
101
- propTypes: unknown;
102
- toTypescript: () => import("react-desc").TypescriptSchema;
103
- };
104
- export { DSIndeterminateProgressIndicator, IndeterminateProgressIndicatorWithSchema };
105
- export default DSIndeterminateProgressIndicator;
package/types/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './DSIndeterminateProgressIndicator';
2
- export { default } from './DSIndeterminateProgressIndicator';