@elliemae/ds-progress-indicator 3.16.0 → 3.16.1-rc.10

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.
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -34,9 +38,9 @@ var import_jsx_runtime = require("react/jsx-runtime");
34
38
  var import_react = require("react");
35
39
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
36
40
  var import_ds_truncated_tooltip_text = __toESM(require("@elliemae/ds-truncated-tooltip-text"));
37
- var import_ProgressCounter = __toESM(require("./ProgressCounter"));
38
- var import_ProgressBar = __toESM(require("./ProgressBar"));
39
- var import_classedComponents = require("./classedComponents");
41
+ var import_ProgressCounter = __toESM(require("./ProgressCounter.js"));
42
+ var import_ProgressBar = __toESM(require("./ProgressBar.js"));
43
+ var import_classedComponents = require("./classedComponents.js");
40
44
  const DSProgressIndicator = ({
41
45
  containerProps = {},
42
46
  innerRef = () => null,
@@ -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 '@elliemae/ds-props-helpers';\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) && <ProgressBar.Segment key={i} {...segmentProps} />,\n )}\n </ProgressBar>\n ) : (\n <ProgressBar max={max} min={min} now={now} />\n ),\n [segments, min, max, now],\n );\n\n return (\n <Wrapper ref={innerRef} aria-disabled={disabled} classProps={{ disabled }} {...containerProps} style={style}>\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('Set of Properties attached to the main container'),\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.description('Whether the progress indicator disabled or not').defaultValue(false),\n counterRenderer: PropTypes.func.description('Render a custom counter'),\n segments: PropTypes.array.description('An array of multiple progress objects'),\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;AD0BiC;AAzBxD,mBAA+B;AAC/B,8BAAoC;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;AACX,MAAM;AACJ,QAAM,wBAAoB;AAAA,IACxB,MACE,SAAS,SACP,4CAAC,mBAAAA,SAAA,EACE,mBAAS;AAAA,MACR,CAAC,cAAc,MACb,EAAE,aAAa,MAAM,aAAa,QAAQ,4CAAC,mBAAAA,QAAY,SAAZ,EAA6B,GAAG,gBAAP,CAAqB;AAAA,IAC7F,GACF,IAEA,4CAAC,mBAAAA,SAAA,EAAY,KAAU,KAAU,KAAU;AAAA,IAE/C,CAAC,UAAU,KAAK,KAAK,GAAG;AAAA,EAC1B;AAEA,SACE,6CAAC,oCAAQ,KAAK,UAAU,iBAAe,UAAU,YAAY,EAAE,SAAS,GAAI,GAAG,gBAAgB,OAC7F;AAAA,gDAAC,iCAAAC,SAAA,EAAuB,oBAAoB,gCAAO,OAAO,OAAO;AAAA,IACjE,4CAAC,uBAAAC,SAAA,EAAQ,KAAU,KAAU,KAAU,UAAU,iBAAiB;AAAA,IACjE;AAAA,KACH;AAEJ;AAEA,MAAM,WAAW,CAAC,WAAW,WAAW,WAAW,QAAQ,OAAO;AAElE,MAAM,yBAAyB;AAAA,EAC7B,gBAAgB,kCAAU,OAAO,YAAY,kDAAkD;AAAA,EAC/F,UAAU,kCAAU,OAAO,YAAY,iCAAiC;AAAA,EACxE,OAAO,kCAAU,OAAO,YAAY,kBAAkB;AAAA,EACtD,SAAS,kCAAU,MAAM,QAAQ,EAAE,YAAY,2BAA2B;AAAA,EAC1E,KAAK,kCAAU,OAAO,YAAY,qBAAqB;AAAA,EACvD,KAAK,kCAAU,OAAO,YAAY,WAAW;AAAA,EAC7C,KAAK,kCAAU,OAAO,YAAY,WAAW;AAAA,EAC7C,UAAU,kCAAU,KAAK,YAAY,gDAAgD,EAAE,aAAa,KAAK;AAAA,EACzG,iBAAiB,kCAAU,KAAK,YAAY,yBAAyB;AAAA,EACrE,UAAU,kCAAU,MAAM,YAAY,uCAAuC;AAAA,EAC7E,OAAO,kCAAU,OAAO,YAAY,kBAAkB;AACxD;AAEA,oBAAoB,YAAY;AAChC,oBAAoB,cAAc;AAClC,MAAM,kCAA8B,kCAAS,mBAAmB;AAChE,4BAA4B,YAAY;AAExC,oBAAoB,cAAc,mBAAAF;AAGlC,IAAO,8BAAQ;",
4
+ "sourcesContent": ["/* eslint-disable react/no-array-index-key */\nimport React, { useMemo } from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';\nimport Counter from './ProgressCounter.js';\nimport ProgressBar from './ProgressBar.js';\nimport { Title, Wrapper } from './classedComponents.js';\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) && <ProgressBar.Segment key={i} {...segmentProps} />,\n )}\n </ProgressBar>\n ) : (\n <ProgressBar max={max} min={min} now={now} />\n ),\n [segments, min, max, now],\n );\n\n return (\n <Wrapper ref={innerRef} aria-disabled={disabled} classProps={{ disabled }} {...containerProps} style={style}>\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('Set of Properties attached to the main container'),\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.description('Whether the progress indicator disabled or not').defaultValue(false),\n counterRenderer: PropTypes.func.description('Render a custom counter'),\n segments: PropTypes.array.description('An array of multiple progress objects'),\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;AD0BiC;AAzBxD,mBAA+B;AAC/B,8BAAoC;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;AACX,MAAM;AACJ,QAAM,wBAAoB;AAAA,IACxB,MACE,SAAS,SACP,4CAAC,mBAAAA,SAAA,EACE,mBAAS;AAAA,MACR,CAAC,cAAc,MACb,EAAE,aAAa,MAAM,aAAa,QAAQ,4CAAC,mBAAAA,QAAY,SAAZ,EAA6B,GAAG,gBAAP,CAAqB;AAAA,IAC7F,GACF,IAEA,4CAAC,mBAAAA,SAAA,EAAY,KAAU,KAAU,KAAU;AAAA,IAE/C,CAAC,UAAU,KAAK,KAAK,GAAG;AAAA,EAC1B;AAEA,SACE,6CAAC,oCAAQ,KAAK,UAAU,iBAAe,UAAU,YAAY,EAAE,SAAS,GAAI,GAAG,gBAAgB,OAC7F;AAAA,gDAAC,iCAAAC,SAAA,EAAuB,oBAAoB,gCAAO,OAAO,OAAO;AAAA,IACjE,4CAAC,uBAAAC,SAAA,EAAQ,KAAU,KAAU,KAAU,UAAU,iBAAiB;AAAA,IACjE;AAAA,KACH;AAEJ;AAEA,MAAM,WAAW,CAAC,WAAW,WAAW,WAAW,QAAQ,OAAO;AAElE,MAAM,yBAAyB;AAAA,EAC7B,gBAAgB,kCAAU,OAAO,YAAY,kDAAkD;AAAA,EAC/F,UAAU,kCAAU,OAAO,YAAY,iCAAiC;AAAA,EACxE,OAAO,kCAAU,OAAO,YAAY,kBAAkB;AAAA,EACtD,SAAS,kCAAU,MAAM,QAAQ,EAAE,YAAY,2BAA2B;AAAA,EAC1E,KAAK,kCAAU,OAAO,YAAY,qBAAqB;AAAA,EACvD,KAAK,kCAAU,OAAO,YAAY,WAAW;AAAA,EAC7C,KAAK,kCAAU,OAAO,YAAY,WAAW;AAAA,EAC7C,UAAU,kCAAU,KAAK,YAAY,gDAAgD,EAAE,aAAa,KAAK;AAAA,EACzG,iBAAiB,kCAAU,KAAK,YAAY,yBAAyB;AAAA,EACrE,UAAU,kCAAU,MAAM,YAAY,uCAAuC;AAAA,EAC7E,OAAO,kCAAU,OAAO,YAAY,kBAAkB;AACxD;AAEA,oBAAoB,YAAY;AAChC,oBAAoB,cAAc;AAClC,MAAM,kCAA8B,kCAAS,mBAAmB;AAChE,4BAA4B,YAAY;AAExC,oBAAoB,cAAc,mBAAAF;AAGlC,IAAO,8BAAQ;",
6
6
  "names": ["ProgressBar", "DSTruncatedTooltipText", "Counter"]
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -30,8 +34,8 @@ module.exports = __toCommonJS(ProgressBar_exports);
30
34
  var React = __toESM(require("react"));
31
35
  var import_jsx_runtime = require("react/jsx-runtime");
32
36
  var import_prop_types = __toESM(require("prop-types"));
33
- var import_utils = require("./utils");
34
- var import_classedComponents = require("./classedComponents");
37
+ var import_utils = require("./utils.js");
38
+ var import_classedComponents = require("./classedComponents.js");
35
39
  function useProgressTrait({ now = void 0, min = void 0, max = void 0, text = "" }) {
36
40
  const percentage = (0, import_utils.getPercentage)(now, min, max);
37
41
  return {
@@ -59,9 +63,13 @@ const ProgressBar = ({
59
63
  }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_classedComponents.ProgressBarStatusBar, { children: progressSegments || /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Progress, { max, min, now, variant }) });
60
64
  ProgressBar.Segment = Progress;
61
65
  ProgressBar.propTypes = {
66
+ /** Progress intent variation */
62
67
  variant: import_prop_types.default.oneOf(["default", "success", "warning", "info", "error"]),
68
+ /** Total current value */
63
69
  now: import_prop_types.default.number,
70
+ /** Min value */
64
71
  min: import_prop_types.default.number,
72
+ /** Total max */
65
73
  max: import_prop_types.default.number
66
74
  };
67
75
  var ProgressBar_default = ProgressBar;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/ProgressBar.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { getPercentage } from './utils';\nimport { ProgressBarProgress, ProgressBarStatusBar } from './classedComponents';\n\nfunction useProgressTrait({ now = undefined, min = undefined, max = undefined, text = '' }) {\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\nconst Progress = (props) => {\n const { variant = 'default' } = props;\n\n const progressTraitProps = useProgressTrait(props);\n\n return <ProgressBarProgress classProps={{ variant }} {...progressTraitProps} />;\n};\n\nconst ProgressBar = ({\n variant = 'default',\n now = undefined,\n min = undefined,\n max = undefined,\n children: progressSegments,\n}) => (\n <ProgressBarStatusBar>\n {progressSegments || <Progress max={max} min={min} now={now} variant={variant} />}\n </ProgressBarStatusBar>\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": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADwBd;AAvBT,wBAAsB;AACtB,mBAA8B;AAC9B,+BAA0D;AAE1D,SAAS,iBAAiB,EAAE,MAAM,QAAW,MAAM,QAAW,MAAM,QAAW,OAAO,GAAG,GAAG;AAC1F,QAAM,iBAAa,4BAAc,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,MAAM,WAAW,CAAC,UAAU;AAC1B,QAAM,EAAE,UAAU,UAAU,IAAI;AAEhC,QAAM,qBAAqB,iBAAiB,KAAK;AAEjD,SAAO,4CAAC,gDAAoB,YAAY,EAAE,QAAQ,GAAI,GAAG,oBAAoB;AAC/E;AAEA,MAAM,cAAc,CAAC;AAAA,EACnB,UAAU;AAAA,EACV,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,UAAU;AACZ,MACE,4CAAC,iDACE,8BAAoB,4CAAC,YAAS,KAAU,KAAU,KAAU,SAAkB,GACjF;AAGF,YAAY,UAAU;AAEtB,YAAY,YAAY;AAAA,EAEtB,SAAS,kBAAAA,QAAU,MAAM,CAAC,WAAW,WAAW,WAAW,QAAQ,OAAO,CAAC;AAAA,EAE3E,KAAK,kBAAAA,QAAU;AAAA,EAEf,KAAK,kBAAAA,QAAU;AAAA,EAEf,KAAK,kBAAAA,QAAU;AACjB;AAEA,IAAO,sBAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { getPercentage } from './utils.js';\nimport { ProgressBarProgress, ProgressBarStatusBar } from './classedComponents.js';\n\nfunction useProgressTrait({ now = undefined, min = undefined, max = undefined, text = '' }) {\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\nconst Progress = (props) => {\n const { variant = 'default' } = props;\n\n const progressTraitProps = useProgressTrait(props);\n\n return <ProgressBarProgress classProps={{ variant }} {...progressTraitProps} />;\n};\n\nconst ProgressBar = ({\n variant = 'default',\n now = undefined,\n min = undefined,\n max = undefined,\n children: progressSegments,\n}) => (\n <ProgressBarStatusBar>\n {progressSegments || <Progress max={max} min={min} now={now} variant={variant} />}\n </ProgressBarStatusBar>\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": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADwBd;AAvBT,wBAAsB;AACtB,mBAA8B;AAC9B,+BAA0D;AAE1D,SAAS,iBAAiB,EAAE,MAAM,QAAW,MAAM,QAAW,MAAM,QAAW,OAAO,GAAG,GAAG;AAC1F,QAAM,iBAAa,4BAAc,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,MAAM,WAAW,CAAC,UAAU;AAC1B,QAAM,EAAE,UAAU,UAAU,IAAI;AAEhC,QAAM,qBAAqB,iBAAiB,KAAK;AAEjD,SAAO,4CAAC,gDAAoB,YAAY,EAAE,QAAQ,GAAI,GAAG,oBAAoB;AAC/E;AAEA,MAAM,cAAc,CAAC;AAAA,EACnB,UAAU;AAAA,EACV,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,UAAU;AACZ,MACE,4CAAC,iDACE,8BAAoB,4CAAC,YAAS,KAAU,KAAU,KAAU,SAAkB,GACjF;AAGF,YAAY,UAAU;AAEtB,YAAY,YAAY;AAAA;AAAA,EAEtB,SAAS,kBAAAA,QAAU,MAAM,CAAC,WAAW,WAAW,WAAW,QAAQ,OAAO,CAAC;AAAA;AAAA,EAE3E,KAAK,kBAAAA,QAAU;AAAA;AAAA,EAEf,KAAK,kBAAAA,QAAU;AAAA;AAAA,EAEf,KAAK,kBAAAA,QAAU;AACjB;AAEA,IAAO,sBAAQ;",
6
6
  "names": ["PropTypes"]
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -29,8 +33,8 @@ __export(ProgressCounter_exports, {
29
33
  module.exports = __toCommonJS(ProgressCounter_exports);
30
34
  var React = __toESM(require("react"));
31
35
  var import_jsx_runtime = require("react/jsx-runtime");
32
- var import_utils = require("./utils");
33
- var import_classedComponents = require("./classedComponents");
36
+ var import_utils = require("./utils.js");
37
+ var import_classedComponents = require("./classedComponents.js");
34
38
  const defaultRenderer = ({ now, max, min }) => `${min || now} of ${max}`;
35
39
  const percentageRenderer = ({ now, max, min }) => {
36
40
  const percentage = (0, import_utils.getPercentage)(now, min, max);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/ProgressCounter.tsx", "../../../../scripts/build/transpile/react-shim.js"],
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\nconst ProgressCounter = ({ now, max, min, renderer = renderers.default }) => (\n <ProgressIndicatorCounter>{renderer({ now, max, min })}</ProgressIndicatorCounter>\n);\n\nexport default ProgressCounter;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgBrB;AAfF,mBAA8B;AAC9B,+BAAyC;AAEzC,MAAM,kBAAkB,CAAC,EAAE,KAAK,KAAK,IAAI,MAAM,GAAG,OAAO,UAAU;AACnE,MAAM,qBAAqB,CAAC,EAAE,KAAK,KAAK,IAAI,MAAM;AAChD,QAAM,iBAAa,4BAAc,KAAK,KAAK,GAAG;AAC9C,SAAO,GAAG;AACZ;AAEA,MAAM,YAAY;AAAA,EAChB,SAAS;AAAA,EACT,YAAY;AACd;AAEA,MAAM,kBAAkB,CAAC,EAAE,KAAK,KAAK,KAAK,WAAW,UAAU,QAAQ,MACrE,4CAAC,qDAA0B,mBAAS,EAAE,KAAK,KAAK,IAAI,CAAC,GAAE;AAGzD,IAAO,0BAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport { getPercentage } from './utils.js';\nimport { ProgressIndicatorCounter } from './classedComponents.js';\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\nconst ProgressCounter = ({ now, max, min, renderer = renderers.default }) => (\n <ProgressIndicatorCounter>{renderer({ now, max, min })}</ProgressIndicatorCounter>\n);\n\nexport default ProgressCounter;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgBrB;AAfF,mBAA8B;AAC9B,+BAAyC;AAEzC,MAAM,kBAAkB,CAAC,EAAE,KAAK,KAAK,IAAI,MAAM,GAAG,OAAO,UAAU;AACnE,MAAM,qBAAqB,CAAC,EAAE,KAAK,KAAK,IAAI,MAAM;AAChD,QAAM,iBAAa,4BAAc,KAAK,KAAK,GAAG;AAC9C,SAAO,GAAG;AACZ;AAEA,MAAM,YAAY;AAAA,EAChB,SAAS;AAAA,EACT,YAAY;AACd;AAEA,MAAM,kBAAkB,CAAC,EAAE,KAAK,KAAK,KAAK,WAAW,UAAU,QAAQ,MACrE,4CAAC,qDAA0B,mBAAS,EAAE,KAAK,KAAK,IAAI,CAAC,GAAE;AAGzD,IAAO,0BAAQ;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -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')(blockName, null, ({ disabled }) => ({ disabled }));\nexport const Title = aggregatedClasses('div')(blockName, 'title');\nexport const ProgressIndicatorCounter = aggregatedClasses('span')(blockName, 'counter');\nexport const ProgressBarStatusBar = aggregatedClasses('div')(progressBlockName);\nexport const ProgressBarProgress = aggregatedClasses('div')(progressBlockName, 'progress', ({ variant }) => ({\n [variant]: true,\n}));\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,2BAAkC;AAE3B,MAAM,YAAY;AACzB,MAAM,oBAAoB;AAEnB,MAAM,cAAU,wCAAkB,KAAK,EAAE,WAAW,MAAM,CAAC,EAAE,SAAS,OAAO,EAAE,SAAS,EAAE;AAC1F,MAAM,YAAQ,wCAAkB,KAAK,EAAE,WAAW,OAAO;AACzD,MAAM,+BAA2B,wCAAkB,MAAM,EAAE,WAAW,SAAS;AAC/E,MAAM,2BAAuB,wCAAkB,KAAK,EAAE,iBAAiB;AACvE,MAAM,0BAAsB,wCAAkB,KAAK,EAAE,mBAAmB,YAAY,CAAC,EAAE,QAAQ,OAAO;AAAA,EAC3G,CAAC,UAAU;AACb,EAAE;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,2BAAkC;AAE3B,MAAM,YAAY;AACzB,MAAM,oBAAoB;AAEnB,MAAM,cAAU,wCAAkB,KAAK,EAAE,WAAW,MAAM,CAAC,EAAE,SAAS,OAAO,EAAE,SAAS,EAAE;AAC1F,MAAM,YAAQ,wCAAkB,KAAK,EAAE,WAAW,OAAO;AACzD,MAAM,+BAA2B,wCAAkB,MAAM,EAAE,WAAW,SAAS;AAC/E,MAAM,2BAAuB,wCAAkB,KAAK,EAAE,iBAAiB;AACvE,MAAM,0BAAsB,wCAAkB,KAAK,EAAE,mBAAmB,YAAY,CAAC,EAAE,QAAQ,OAAO;AAAA,EAC3G,CAAC,OAAO,GAAG;AACb,EAAE;",
6
6
  "names": []
7
7
  }
package/dist/cjs/index.js CHANGED
@@ -19,6 +19,10 @@ var __copyProps = (to, from, except, desc) => {
19
19
  };
20
20
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
21
21
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
22
26
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
23
27
  mod
24
28
  ));
@@ -29,6 +33,6 @@ __export(src_exports, {
29
33
  });
30
34
  module.exports = __toCommonJS(src_exports);
31
35
  var React = __toESM(require("react"));
32
- __reExport(src_exports, require("./DSProgressIndicator"), module.exports);
33
- var import_DSProgressIndicator = __toESM(require("./DSProgressIndicator"));
36
+ __reExport(src_exports, require("./DSProgressIndicator.js"), module.exports);
37
+ var import_DSProgressIndicator = __toESM(require("./DSProgressIndicator.js"));
34
38
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export * from './DSProgressIndicator';\nexport { default } from './DSProgressIndicator';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,kCAAd;AACA,iCAAwB;",
4
+ "sourcesContent": ["export * from './DSProgressIndicator.js';\nexport { default } from './DSProgressIndicator.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,qCAAd;AACA,iCAAwB;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,7 @@
1
+ {
2
+ "type": "commonjs",
3
+ "sideEffects": [
4
+ "*.css",
5
+ "*.scss"
6
+ ]
7
+ }
package/dist/cjs/utils.js CHANGED
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -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": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,SAAS,cAAc,KAAK,KAAK,KAAK;AAC3C,UAAS,OAAO,OAAO,MAAO;AAChC;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,SAAS,cAAc,KAAK,KAAK,KAAK;AAC3C,UAAS,OAAO,OAAO,MAAO;AAChC;",
6
6
  "names": []
7
7
  }
@@ -3,9 +3,9 @@ import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { useMemo } from "react";
4
4
  import { describe, PropTypes } from "@elliemae/ds-props-helpers";
5
5
  import DSTruncatedTooltipText from "@elliemae/ds-truncated-tooltip-text";
6
- import Counter from "./ProgressCounter";
7
- import ProgressBar from "./ProgressBar";
8
- import { Title, Wrapper } from "./classedComponents";
6
+ import Counter from "./ProgressCounter.js";
7
+ import ProgressBar from "./ProgressBar.js";
8
+ import { Title, Wrapper } from "./classedComponents.js";
9
9
  const DSProgressIndicator = ({
10
10
  containerProps = {},
11
11
  innerRef = () => null,
@@ -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 '@elliemae/ds-props-helpers';\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) && <ProgressBar.Segment key={i} {...segmentProps} />,\n )}\n </ProgressBar>\n ) : (\n <ProgressBar max={max} min={min} now={now} />\n ),\n [segments, min, max, now],\n );\n\n return (\n <Wrapper ref={innerRef} aria-disabled={disabled} classProps={{ disabled }} {...containerProps} style={style}>\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('Set of Properties attached to the main container'),\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.description('Whether the progress indicator disabled or not').defaultValue(false),\n counterRenderer: PropTypes.func.description('Render a custom counter'),\n segments: PropTypes.array.description('An array of multiple progress objects'),\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"],
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 '@elliemae/ds-props-helpers';\nimport DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';\nimport Counter from './ProgressCounter.js';\nimport ProgressBar from './ProgressBar.js';\nimport { Title, Wrapper } from './classedComponents.js';\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) && <ProgressBar.Segment key={i} {...segmentProps} />,\n )}\n </ProgressBar>\n ) : (\n <ProgressBar max={max} min={min} now={now} />\n ),\n [segments, min, max, now],\n );\n\n return (\n <Wrapper ref={innerRef} aria-disabled={disabled} classProps={{ disabled }} {...containerProps} style={style}>\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('Set of Properties attached to the main container'),\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.description('Whether the progress indicator disabled or not').defaultValue(false),\n counterRenderer: PropTypes.func.description('Render a custom counter'),\n segments: PropTypes.array.description('An array of multiple progress objects'),\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
5
  "mappings": "AAAA,YAAY,WAAW;AC0BiC,cAUpD,YAVoD;AAzBxD,SAAgB,eAAe;AAC/B,SAAS,UAAU,iBAAiB;AACpC,OAAO,4BAA4B;AACnC,OAAO,aAAa;AACpB,OAAO,iBAAiB;AACxB,SAAS,OAAO,eAAe;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;AACX,MAAM;AACJ,QAAM,oBAAoB;AAAA,IACxB,MACE,SAAS,SACP,oBAAC,eACE,mBAAS;AAAA,MACR,CAAC,cAAc,MACb,EAAE,aAAa,MAAM,aAAa,QAAQ,oBAAC,YAAY,SAAZ,EAA6B,GAAG,gBAAP,CAAqB;AAAA,IAC7F,GACF,IAEA,oBAAC,eAAY,KAAU,KAAU,KAAU;AAAA,IAE/C,CAAC,UAAU,KAAK,KAAK,GAAG;AAAA,EAC1B;AAEA,SACE,qBAAC,WAAQ,KAAK,UAAU,iBAAe,UAAU,YAAY,EAAE,SAAS,GAAI,GAAG,gBAAgB,OAC7F;AAAA,wBAAC,0BAAuB,oBAAoB,OAAO,OAAO,OAAO;AAAA,IACjE,oBAAC,WAAQ,KAAU,KAAU,KAAU,UAAU,iBAAiB;AAAA,IACjE;AAAA,KACH;AAEJ;AAEA,MAAM,WAAW,CAAC,WAAW,WAAW,WAAW,QAAQ,OAAO;AAElE,MAAM,yBAAyB;AAAA,EAC7B,gBAAgB,UAAU,OAAO,YAAY,kDAAkD;AAAA,EAC/F,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,KAAK,YAAY,gDAAgD,EAAE,aAAa,KAAK;AAAA,EACzG,iBAAiB,UAAU,KAAK,YAAY,yBAAyB;AAAA,EACrE,UAAU,UAAU,MAAM,YAAY,uCAAuC;AAAA,EAC7E,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
  }
@@ -1,8 +1,8 @@
1
1
  import * as React from "react";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import PropTypes from "prop-types";
4
- import { getPercentage } from "./utils";
5
- import { ProgressBarProgress, ProgressBarStatusBar } from "./classedComponents";
4
+ import { getPercentage } from "./utils.js";
5
+ import { ProgressBarProgress, ProgressBarStatusBar } from "./classedComponents.js";
6
6
  function useProgressTrait({ now = void 0, min = void 0, max = void 0, text = "" }) {
7
7
  const percentage = getPercentage(now, min, max);
8
8
  return {
@@ -30,9 +30,13 @@ const ProgressBar = ({
30
30
  }) => /* @__PURE__ */ jsx(ProgressBarStatusBar, { children: progressSegments || /* @__PURE__ */ jsx(Progress, { max, min, now, variant }) });
31
31
  ProgressBar.Segment = Progress;
32
32
  ProgressBar.propTypes = {
33
+ /** Progress intent variation */
33
34
  variant: PropTypes.oneOf(["default", "success", "warning", "info", "error"]),
35
+ /** Total current value */
34
36
  now: PropTypes.number,
37
+ /** Min value */
35
38
  min: PropTypes.number,
39
+ /** Total max */
36
40
  max: PropTypes.number
37
41
  };
38
42
  var ProgressBar_default = ProgressBar;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/ProgressBar.tsx"],
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({ now = undefined, min = undefined, max = undefined, text = '' }) {\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\nconst Progress = (props) => {\n const { variant = 'default' } = props;\n\n const progressTraitProps = useProgressTrait(props);\n\n return <ProgressBarProgress classProps={{ variant }} {...progressTraitProps} />;\n};\n\nconst ProgressBar = ({\n variant = 'default',\n now = undefined,\n min = undefined,\n max = undefined,\n children: progressSegments,\n}) => (\n <ProgressBarStatusBar>\n {progressSegments || <Progress max={max} min={min} now={now} variant={variant} />}\n </ProgressBarStatusBar>\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,YAAY,WAAW;ACwBd;AAvBT,OAAO,eAAe;AACtB,SAAS,qBAAqB;AAC9B,SAAS,qBAAqB,4BAA4B;AAE1D,SAAS,iBAAiB,EAAE,MAAM,QAAW,MAAM,QAAW,MAAM,QAAW,OAAO,GAAG,GAAG;AAC1F,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,MAAM,WAAW,CAAC,UAAU;AAC1B,QAAM,EAAE,UAAU,UAAU,IAAI;AAEhC,QAAM,qBAAqB,iBAAiB,KAAK;AAEjD,SAAO,oBAAC,uBAAoB,YAAY,EAAE,QAAQ,GAAI,GAAG,oBAAoB;AAC/E;AAEA,MAAM,cAAc,CAAC;AAAA,EACnB,UAAU;AAAA,EACV,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,UAAU;AACZ,MACE,oBAAC,wBACE,8BAAoB,oBAAC,YAAS,KAAU,KAAU,KAAU,SAAkB,GACjF;AAGF,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;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { getPercentage } from './utils.js';\nimport { ProgressBarProgress, ProgressBarStatusBar } from './classedComponents.js';\n\nfunction useProgressTrait({ now = undefined, min = undefined, max = undefined, text = '' }) {\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\nconst Progress = (props) => {\n const { variant = 'default' } = props;\n\n const progressTraitProps = useProgressTrait(props);\n\n return <ProgressBarProgress classProps={{ variant }} {...progressTraitProps} />;\n};\n\nconst ProgressBar = ({\n variant = 'default',\n now = undefined,\n min = undefined,\n max = undefined,\n children: progressSegments,\n}) => (\n <ProgressBarStatusBar>\n {progressSegments || <Progress max={max} min={min} now={now} variant={variant} />}\n </ProgressBarStatusBar>\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,YAAY,WAAW;ACwBd;AAvBT,OAAO,eAAe;AACtB,SAAS,qBAAqB;AAC9B,SAAS,qBAAqB,4BAA4B;AAE1D,SAAS,iBAAiB,EAAE,MAAM,QAAW,MAAM,QAAW,MAAM,QAAW,OAAO,GAAG,GAAG;AAC1F,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,MAAM,WAAW,CAAC,UAAU;AAC1B,QAAM,EAAE,UAAU,UAAU,IAAI;AAEhC,QAAM,qBAAqB,iBAAiB,KAAK;AAEjD,SAAO,oBAAC,uBAAoB,YAAY,EAAE,QAAQ,GAAI,GAAG,oBAAoB;AAC/E;AAEA,MAAM,cAAc,CAAC;AAAA,EACnB,UAAU;AAAA,EACV,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,UAAU;AACZ,MACE,oBAAC,wBACE,8BAAoB,oBAAC,YAAS,KAAU,KAAU,KAAU,SAAkB,GACjF;AAGF,YAAY,UAAU;AAEtB,YAAY,YAAY;AAAA;AAAA,EAEtB,SAAS,UAAU,MAAM,CAAC,WAAW,WAAW,WAAW,QAAQ,OAAO,CAAC;AAAA;AAAA,EAE3E,KAAK,UAAU;AAAA;AAAA,EAEf,KAAK,UAAU;AAAA;AAAA,EAEf,KAAK,UAAU;AACjB;AAEA,IAAO,sBAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { jsx } from "react/jsx-runtime";
3
- import { getPercentage } from "./utils";
4
- import { ProgressIndicatorCounter } from "./classedComponents";
3
+ import { getPercentage } from "./utils.js";
4
+ import { ProgressIndicatorCounter } from "./classedComponents.js";
5
5
  const defaultRenderer = ({ now, max, min }) => `${min || now} of ${max}`;
6
6
  const percentageRenderer = ({ now, max, min }) => {
7
7
  const percentage = getPercentage(now, min, max);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/ProgressCounter.tsx"],
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\nconst ProgressCounter = ({ now, max, min, renderer = renderers.default }) => (\n <ProgressIndicatorCounter>{renderer({ now, max, min })}</ProgressIndicatorCounter>\n);\n\nexport default ProgressCounter;\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { getPercentage } from './utils.js';\nimport { ProgressIndicatorCounter } from './classedComponents.js';\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\nconst ProgressCounter = ({ now, max, min, renderer = renderers.default }) => (\n <ProgressIndicatorCounter>{renderer({ now, max, min })}</ProgressIndicatorCounter>\n);\n\nexport default ProgressCounter;\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACgBrB;AAfF,SAAS,qBAAqB;AAC9B,SAAS,gCAAgC;AAEzC,MAAM,kBAAkB,CAAC,EAAE,KAAK,KAAK,IAAI,MAAM,GAAG,OAAO,UAAU;AACnE,MAAM,qBAAqB,CAAC,EAAE,KAAK,KAAK,IAAI,MAAM;AAChD,QAAM,aAAa,cAAc,KAAK,KAAK,GAAG;AAC9C,SAAO,GAAG;AACZ;AAEA,MAAM,YAAY;AAAA,EAChB,SAAS;AAAA,EACT,YAAY;AACd;AAEA,MAAM,kBAAkB,CAAC,EAAE,KAAK,KAAK,KAAK,WAAW,UAAU,QAAQ,MACrE,oBAAC,4BAA0B,mBAAS,EAAE,KAAK,KAAK,IAAI,CAAC,GAAE;AAGzD,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')(blockName, null, ({ disabled }) => ({ disabled }));\nexport const Title = aggregatedClasses('div')(blockName, 'title');\nexport const ProgressIndicatorCounter = aggregatedClasses('span')(blockName, 'counter');\nexport const ProgressBarStatusBar = aggregatedClasses('div')(progressBlockName);\nexport const ProgressBarProgress = aggregatedClasses('div')(progressBlockName, 'progress', ({ variant }) => ({\n [variant]: true,\n}));\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,yBAAyB;AAE3B,MAAM,YAAY;AACzB,MAAM,oBAAoB;AAEnB,MAAM,UAAU,kBAAkB,KAAK,EAAE,WAAW,MAAM,CAAC,EAAE,SAAS,OAAO,EAAE,SAAS,EAAE;AAC1F,MAAM,QAAQ,kBAAkB,KAAK,EAAE,WAAW,OAAO;AACzD,MAAM,2BAA2B,kBAAkB,MAAM,EAAE,WAAW,SAAS;AAC/E,MAAM,uBAAuB,kBAAkB,KAAK,EAAE,iBAAiB;AACvE,MAAM,sBAAsB,kBAAkB,KAAK,EAAE,mBAAmB,YAAY,CAAC,EAAE,QAAQ,OAAO;AAAA,EAC3G,CAAC,UAAU;AACb,EAAE;",
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,yBAAyB;AAE3B,MAAM,YAAY;AACzB,MAAM,oBAAoB;AAEnB,MAAM,UAAU,kBAAkB,KAAK,EAAE,WAAW,MAAM,CAAC,EAAE,SAAS,OAAO,EAAE,SAAS,EAAE;AAC1F,MAAM,QAAQ,kBAAkB,KAAK,EAAE,WAAW,OAAO;AACzD,MAAM,2BAA2B,kBAAkB,MAAM,EAAE,WAAW,SAAS;AAC/E,MAAM,uBAAuB,kBAAkB,KAAK,EAAE,iBAAiB;AACvE,MAAM,sBAAsB,kBAAkB,KAAK,EAAE,mBAAmB,YAAY,CAAC,EAAE,QAAQ,OAAO;AAAA,EAC3G,CAAC,OAAO,GAAG;AACb,EAAE;",
6
6
  "names": []
7
7
  }
package/dist/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
- export * from "./DSProgressIndicator";
3
- import { default as default2 } from "./DSProgressIndicator";
2
+ export * from "./DSProgressIndicator.js";
3
+ import { default as default2 } from "./DSProgressIndicator.js";
4
4
  export {
5
5
  default2 as default
6
6
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSProgressIndicator';\nexport { default } from './DSProgressIndicator';\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSProgressIndicator.js';\nexport { default } from './DSProgressIndicator.js';\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,SAAS,WAAAA,gBAAe;",
6
6
  "names": ["default"]
7
7
  }
@@ -0,0 +1,7 @@
1
+ {
2
+ "type": "module",
3
+ "sideEffects": [
4
+ "*.css",
5
+ "*.scss"
6
+ ]
7
+ }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const DSProgressIndicator: {
2
3
  ({ containerProps, innerRef, title, counterRenderer, now, min, max, disabled, segments, style, }: {
3
4
  containerProps?: {} | undefined;
@@ -12,17 +13,17 @@ declare const DSProgressIndicator: {
12
13
  style?: {} | undefined;
13
14
  }): JSX.Element;
14
15
  propTypes: {
15
- containerProps: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
16
- innerRef: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
17
- title: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
18
- variant: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
19
- now: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
20
- min: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
21
- max: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
22
- disabled: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
23
- counterRenderer: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
24
- segments: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
25
- style: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
16
+ containerProps: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
17
+ innerRef: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
18
+ title: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
19
+ variant: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
20
+ now: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
21
+ min: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
22
+ max: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
23
+ disabled: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
24
+ counterRenderer: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
25
+ segments: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
26
+ style: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
26
27
  };
27
28
  displayName: string;
28
29
  ProgressBar: {
@@ -42,7 +43,7 @@ declare const DSProgressIndicator: {
42
43
  };
43
44
  };
44
45
  };
45
- declare const ProgressIndicatorWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").DocumentedReactComponent<{
46
+ declare const ProgressIndicatorWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<{
46
47
  containerProps?: {} | undefined;
47
48
  innerRef?: (() => null) | undefined;
48
49
  title?: string | undefined;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import PropTypes from 'prop-types';
2
3
  declare const ProgressBar: {
3
4
  ({ variant, now, min, max, children: progressSegments, }: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const ProgressCounter: ({ now, max, min, renderer }: {
2
3
  now: any;
3
4
  max: any;
@@ -1,2 +1,2 @@
1
- export * from './DSProgressIndicator';
2
- export { default } from './DSProgressIndicator';
1
+ export * from './DSProgressIndicator.js';
2
+ export { default } from './DSProgressIndicator.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-progress-indicator",
3
- "version": "3.16.0",
3
+ "version": "3.16.1-rc.10",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Progress Indicator",
6
6
  "files": [
@@ -56,10 +56,10 @@
56
56
  },
57
57
  "dependencies": {
58
58
  "prop-types": "~15.8.1",
59
- "@elliemae/ds-classnames": "3.16.0",
60
- "@elliemae/ds-props-helpers": "3.16.0",
61
- "@elliemae/ds-truncated-tooltip-text": "3.16.0",
62
- "@elliemae/ds-utilities": "3.16.0"
59
+ "@elliemae/ds-classnames": "3.16.1-rc.10",
60
+ "@elliemae/ds-props-helpers": "3.16.1-rc.10",
61
+ "@elliemae/ds-truncated-tooltip-text": "3.16.1-rc.10",
62
+ "@elliemae/ds-utilities": "3.16.1-rc.10"
63
63
  },
64
64
  "peerDependencies": {
65
65
  "react": "^17.0.2",