@elliemae/ds-progress-indicator 2.2.0-next.3 → 2.3.0-alpha.1

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.
@@ -1,92 +1,97 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var _jsx2 = require('@babel/runtime/helpers/jsx');
6
- var _defineProperty = require('@babel/runtime/helpers/defineProperty');
7
- require('core-js/modules/esnext.async-iterator.map.js');
8
- require('core-js/modules/esnext.iterator.map.js');
9
- require('core-js/modules/esnext.async-iterator.filter.js');
10
- require('core-js/modules/esnext.iterator.constructor.js');
11
- require('core-js/modules/esnext.iterator.filter.js');
12
- require('core-js/modules/esnext.async-iterator.for-each.js');
13
- require('core-js/modules/esnext.iterator.for-each.js');
14
- var react = require('react');
15
- var reactDesc = require('react-desc');
16
- var DSTruncatedTooltipText = require('@elliemae/ds-truncated-tooltip-text');
17
- var ProgressCounter = require('./ProgressCounter.js');
18
- var ProgressBar = require('./ProgressBar.js');
19
- var classedComponents = require('./classedComponents.js');
20
- var jsxRuntime = require('react/jsx-runtime');
21
-
22
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
23
-
24
- var _jsx2__default = /*#__PURE__*/_interopDefaultLegacy(_jsx2);
25
- var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
26
- var DSTruncatedTooltipText__default = /*#__PURE__*/_interopDefaultLegacy(DSTruncatedTooltipText);
27
-
28
- 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; }
29
-
30
- 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; }
31
-
32
- const DSProgressIndicator = _ref => {
33
- var _ProgressBar;
34
-
35
- let {
36
- containerProps = {},
37
- innerRef = () => null,
38
- title = '',
39
- counterRenderer = undefined,
40
- now = undefined,
41
- min = 0,
42
- max = undefined,
43
- disabled = false,
44
- segments = [],
45
- style = {}
46
- } = _ref;
47
- const renderProgressBar = react.useMemo(() => segments.length ? /*#__PURE__*/_jsx2__default["default"](ProgressBar, {}, void 0, segments.map((segmentProps, i) => !(segmentProps.now < segmentProps.min) && /*#__PURE__*/jsxRuntime.jsx(ProgressBar.Segment, _objectSpread({}, segmentProps), i))) : _ProgressBar || (_ProgressBar = /*#__PURE__*/_jsx2__default["default"](ProgressBar, {
48
- max: max,
49
- min: min,
50
- now: now
51
- })), [segments, min, max, now]);
52
- return /*#__PURE__*/jsxRuntime.jsxs(classedComponents.Wrapper, _objectSpread(_objectSpread({
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 DSProgressIndicator_exports = {};
29
+ __export(DSProgressIndicator_exports, {
30
+ DSProgressIndicator: () => DSProgressIndicator,
31
+ ProgressIndicatorWithSchema: () => ProgressIndicatorWithSchema,
32
+ default: () => DSProgressIndicator_default
33
+ });
34
+ var React = __toESM(require("react"));
35
+ var import_react = __toESM(require("react"));
36
+ var import_react_desc = require("react-desc");
37
+ var import_ds_truncated_tooltip_text = __toESM(require("@elliemae/ds-truncated-tooltip-text"));
38
+ var import_ProgressCounter = __toESM(require("./ProgressCounter"));
39
+ var import_ProgressBar = __toESM(require("./ProgressBar"));
40
+ var import_classedComponents = require("./classedComponents");
41
+ const DSProgressIndicator = ({
42
+ containerProps = {},
43
+ innerRef = () => null,
44
+ title = "",
45
+ counterRenderer = void 0,
46
+ now = void 0,
47
+ min = 0,
48
+ max = void 0,
49
+ disabled = false,
50
+ segments = [],
51
+ style = {}
52
+ }) => {
53
+ const renderProgressBar = (0, import_react.useMemo)(() => segments.length ? /* @__PURE__ */ import_react.default.createElement(import_ProgressBar.default, null, segments.map((segmentProps, i) => !(segmentProps.now < segmentProps.min) && /* @__PURE__ */ import_react.default.createElement(import_ProgressBar.default.Segment, {
54
+ key: i,
55
+ ...segmentProps
56
+ }))) : /* @__PURE__ */ import_react.default.createElement(import_ProgressBar.default, {
57
+ max,
58
+ min,
59
+ now
60
+ }), [segments, min, max, now]);
61
+ return /* @__PURE__ */ import_react.default.createElement(import_classedComponents.Wrapper, {
53
62
  ref: innerRef,
54
63
  "aria-disabled": disabled,
55
- classProps: {
56
- disabled
57
- }
58
- }, containerProps), {}, {
59
- style: style,
60
- children: [/*#__PURE__*/_jsx2__default["default"](DSTruncatedTooltipText__default["default"], {
61
- containerComponent: classedComponents.Title,
62
- value: title
63
- }), /*#__PURE__*/_jsx2__default["default"](ProgressCounter, {
64
- max: max,
65
- min: min,
66
- now: now,
67
- renderer: counterRenderer
68
- }), renderProgressBar]
69
- }));
64
+ classProps: { disabled },
65
+ ...containerProps,
66
+ style
67
+ }, /* @__PURE__ */ import_react.default.createElement(import_ds_truncated_tooltip_text.default, {
68
+ containerComponent: import_classedComponents.Title,
69
+ value: title
70
+ }), /* @__PURE__ */ import_react.default.createElement(import_ProgressCounter.default, {
71
+ max,
72
+ min,
73
+ now,
74
+ renderer: counterRenderer
75
+ }), renderProgressBar);
70
76
  };
71
-
72
- const variants = ['default', 'success', 'warning', 'info', 'error'];
77
+ const variants = ["default", "success", "warning", "info", "error"];
73
78
  const progressIndicatorProps = {
74
- containerProps: reactDesc.PropTypes.object.description('Set of Properties attached to the main container'),
75
- innerRef: reactDesc.PropTypes.object.description('ref to the components container'),
76
- title: reactDesc.PropTypes.string.description('components title'),
77
- variant: reactDesc.PropTypes.oneOf(variants).description('Progress intent variation'),
78
- now: reactDesc.PropTypes.number.description('Total current value'),
79
- min: reactDesc.PropTypes.number.description('min value'),
80
- max: reactDesc.PropTypes.number.description('max value'),
81
- disabled: reactDesc.PropTypes.bool.description('Whether the progress indicator disabled or not').defaultValue(false),
82
- counterRenderer: reactDesc.PropTypes.func.description('Render a custom counter'),
83
- segments: reactDesc.PropTypes.array.description('An array of multiple progress objects'),
84
- style: reactDesc.PropTypes.object.description('css inline style')
79
+ containerProps: import_react_desc.PropTypes.object.description("Set of Properties attached to the main container"),
80
+ innerRef: import_react_desc.PropTypes.object.description("ref to the components container"),
81
+ title: import_react_desc.PropTypes.string.description("components title"),
82
+ variant: import_react_desc.PropTypes.oneOf(variants).description("Progress intent variation"),
83
+ now: import_react_desc.PropTypes.number.description("Total current value"),
84
+ min: import_react_desc.PropTypes.number.description("min value"),
85
+ max: import_react_desc.PropTypes.number.description("max value"),
86
+ disabled: import_react_desc.PropTypes.bool.description("Whether the progress indicator disabled or not").defaultValue(false),
87
+ counterRenderer: import_react_desc.PropTypes.func.description("Render a custom counter"),
88
+ segments: import_react_desc.PropTypes.array.description("An array of multiple progress objects"),
89
+ style: import_react_desc.PropTypes.object.description("css inline style")
85
90
  };
86
- const ProgressIndicatorWithSchema = reactDesc.describe(DSProgressIndicator);
91
+ DSProgressIndicator.propTypes = progressIndicatorProps;
92
+ const ProgressIndicatorWithSchema = (0, import_react_desc.describe)(DSProgressIndicator);
87
93
  ProgressIndicatorWithSchema.propTypes = progressIndicatorProps;
88
- DSProgressIndicator.ProgressBar = ProgressBar;
89
-
90
- exports.DSProgressIndicator = DSProgressIndicator;
91
- exports.ProgressIndicatorWithSchema = ProgressIndicatorWithSchema;
92
- exports["default"] = DSProgressIndicator;
94
+ DSProgressIndicator.ProgressBar = import_ProgressBar.default;
95
+ var DSProgressIndicator_default = DSProgressIndicator;
96
+ module.exports = __toCommonJS(DSProgressIndicator_exports);
97
+ //# sourceMappingURL=DSProgressIndicator.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/DSProgressIndicator.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["/* eslint-disable react/no-array-index-key */\nimport React, { useMemo } from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';\nimport Counter from './ProgressCounter';\nimport ProgressBar from './ProgressBar';\nimport { Title, Wrapper } from './classedComponents';\n\nconst DSProgressIndicator = ({\n containerProps = {},\n innerRef = () => null,\n title = '',\n counterRenderer = undefined,\n now = undefined,\n min = 0,\n max = undefined,\n disabled = false,\n segments = [],\n style = {},\n}) => {\n const renderProgressBar = useMemo(\n () =>\n segments.length ? (\n <ProgressBar>\n {segments.map(\n (segmentProps, i) =>\n !(segmentProps.now < segmentProps.min) && (\n <ProgressBar.Segment key={i} {...segmentProps} />\n ),\n )}\n </ProgressBar>\n ) : (\n <ProgressBar max={max} min={min} now={now} />\n ),\n [segments, min, max, now],\n );\n\n return (\n <Wrapper\n ref={innerRef}\n aria-disabled={disabled}\n classProps={{ disabled }}\n {...containerProps}\n style={style}\n >\n <DSTruncatedTooltipText containerComponent={Title} value={title} />\n <Counter max={max} min={min} now={now} renderer={counterRenderer} />\n {renderProgressBar}\n </Wrapper>\n );\n};\n\nconst variants = ['default', 'success', 'warning', 'info', 'error'];\n\nconst progressIndicatorProps = {\n containerProps: PropTypes.object.description(\n 'Set of Properties attached to the main container',\n ),\n innerRef: PropTypes.object.description('ref to the components container'),\n title: PropTypes.string.description('components title'),\n variant: PropTypes.oneOf(variants).description('Progress intent variation'),\n now: PropTypes.number.description('Total current value'),\n min: PropTypes.number.description('min value'),\n max: PropTypes.number.description('max value'),\n disabled: PropTypes.bool\n .description('Whether the progress indicator disabled or not')\n .defaultValue(false),\n counterRenderer: PropTypes.func.description('Render a custom counter'),\n segments: PropTypes.array.description(\n 'An array of multiple progress objects',\n ),\n style: PropTypes.object.description('css inline style'),\n};\n\nDSProgressIndicator.propTypes = progressIndicatorProps;\n\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;ACAA,YAAuB;ADCvB,mBAA+B;AAC/B,wBAAoC;AACpC,uCAAmC;AACnC,6BAAoB;AACpB,yBAAwB;AACxB,+BAA+B;AAE/B,MAAM,sBAAsB,CAAC;AAAA,EAC3B,iBAAiB;AAAA,EACjB,WAAW,MAAM;AAAA,EACjB,QAAQ;AAAA,EACR,kBAAkB;AAAA,EAClB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,WAAW;AAAA,EACX,WAAW;AAAA,EACX,QAAQ;AAAA,MACJ;AACJ,QAAM,oBAAoB,0BACxB,MACE,SAAS,SACP,mDAAC,4BAAD,MACG,SAAS,IACR,CAAC,cAAc,MACb,CAAE,cAAa,MAAM,aAAa,QAChC,mDAAC,2BAAY,SAAb;AAAA,IAAqB,KAAK;AAAA,OAAO;AAAA,SAKzC,mDAAC,4BAAD;AAAA,IAAa;AAAA,IAAU;AAAA,IAAU;AAAA,MAErC,CAAC,UAAU,KAAK,KAAK;AAGvB,SACE,mDAAC,kCAAD;AAAA,IACE,KAAK;AAAA,IACL,iBAAe;AAAA,IACf,YAAY,EAAE;AAAA,OACV;AAAA,IACJ;AAAA,KAEA,mDAAC,0CAAD;AAAA,IAAwB,oBAAoB;AAAA,IAAO,OAAO;AAAA,MAC1D,mDAAC,gCAAD;AAAA,IAAS;AAAA,IAAU;AAAA,IAAU;AAAA,IAAU,UAAU;AAAA,MAChD;AAAA;AAKP,MAAM,WAAW,CAAC,WAAW,WAAW,WAAW,QAAQ;AAE3D,MAAM,yBAAyB;AAAA,EAC7B,gBAAgB,4BAAU,OAAO,YAC/B;AAAA,EAEF,UAAU,4BAAU,OAAO,YAAY;AAAA,EACvC,OAAO,4BAAU,OAAO,YAAY;AAAA,EACpC,SAAS,4BAAU,MAAM,UAAU,YAAY;AAAA,EAC/C,KAAK,4BAAU,OAAO,YAAY;AAAA,EAClC,KAAK,4BAAU,OAAO,YAAY;AAAA,EAClC,KAAK,4BAAU,OAAO,YAAY;AAAA,EAClC,UAAU,4BAAU,KACjB,YAAY,kDACZ,aAAa;AAAA,EAChB,iBAAiB,4BAAU,KAAK,YAAY;AAAA,EAC5C,UAAU,4BAAU,MAAM,YACxB;AAAA,EAEF,OAAO,4BAAU,OAAO,YAAY;AAAA;AAGtC,oBAAoB,YAAY;AAEhC,MAAM,8BAA8B,gCAAS;AAC7C,4BAA4B,YAAY;AAExC,oBAAoB,cAAc;AAGlC,IAAO,8BAAQ;",
6
+ "names": []
7
+ }
@@ -1,74 +1,86 @@
1
- 'use strict';
2
-
3
- require('core-js/modules/esnext.async-iterator.filter.js');
4
- require('core-js/modules/esnext.iterator.constructor.js');
5
- require('core-js/modules/esnext.iterator.filter.js');
6
- require('core-js/modules/esnext.async-iterator.for-each.js');
7
- require('core-js/modules/esnext.iterator.for-each.js');
8
- var _jsx2 = require('@babel/runtime/helpers/jsx');
9
- var _defineProperty = require('@babel/runtime/helpers/defineProperty');
10
- require('react');
11
- var utils = require('./utils.js');
12
- var classedComponents = require('./classedComponents.js');
13
- var jsxRuntime = require('react/jsx-runtime');
14
-
15
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
16
-
17
- var _jsx2__default = /*#__PURE__*/_interopDefaultLegacy(_jsx2);
18
- var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
19
-
20
- 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; }
21
-
22
- 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; }
23
-
24
- function useProgressTrait(_ref) {
25
- let {
26
- now = undefined,
27
- min = undefined,
28
- max = undefined,
29
- text = ''
30
- } = _ref;
31
- const percentage = utils.getPercentage(now, min, max);
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 ProgressBar_exports = {};
29
+ __export(ProgressBar_exports, {
30
+ default: () => ProgressBar_default
31
+ });
32
+ var React = __toESM(require("react"));
33
+ var import_react = __toESM(require("react"));
34
+ var import_prop_types = __toESM(require("prop-types"));
35
+ var import_utils = require("./utils");
36
+ var import_classedComponents = require("./classedComponents");
37
+ function useProgressTrait({
38
+ now = void 0,
39
+ min = void 0,
40
+ max = void 0,
41
+ text = ""
42
+ }) {
43
+ const percentage = (0, import_utils.getPercentage)(now, min, max);
32
44
  return {
33
- role: 'progressbar',
34
- 'aria-valuenow': now,
35
- 'aria-valuemin': min,
36
- 'aria-valuemax': max,
37
- 'aria-valuetext': text,
45
+ role: "progressbar",
46
+ "aria-valuenow": now,
47
+ "aria-valuemin": min,
48
+ "aria-valuemax": max,
49
+ "aria-valuetext": text,
38
50
  style: {
39
- width: "".concat(percentage, "%")
51
+ width: `${percentage}%`
40
52
  }
41
53
  };
42
54
  }
43
-
44
55
  function Progress(props) {
45
- const {
46
- variant = 'default'
47
- } = props;
56
+ const { variant = "default" } = props;
48
57
  const progressTraitProps = useProgressTrait(props);
49
- return /*#__PURE__*/jsxRuntime.jsx(classedComponents.ProgressBarProgress, _objectSpread({
50
- classProps: {
51
- variant
52
- }
53
- }, progressTraitProps));
58
+ return /* @__PURE__ */ import_react.default.createElement(import_classedComponents.ProgressBarProgress, {
59
+ classProps: { variant },
60
+ ...progressTraitProps
61
+ });
54
62
  }
55
-
56
- function ProgressBar(_ref2) {
57
- let {
58
- variant = 'default',
59
- now = undefined,
60
- min = undefined,
61
- max = undefined,
62
- children: progressSegments
63
- } = _ref2;
64
- return /*#__PURE__*/_jsx2__default["default"](classedComponents.ProgressBarStatusBar, {}, void 0, progressSegments || /*#__PURE__*/_jsx2__default["default"](Progress, {
65
- max: max,
66
- min: min,
67
- now: now,
68
- variant: variant
63
+ function ProgressBar({
64
+ variant = "default",
65
+ now = void 0,
66
+ min = void 0,
67
+ max = void 0,
68
+ children: progressSegments
69
+ }) {
70
+ return /* @__PURE__ */ import_react.default.createElement(import_classedComponents.ProgressBarStatusBar, null, progressSegments || /* @__PURE__ */ import_react.default.createElement(Progress, {
71
+ max,
72
+ min,
73
+ now,
74
+ variant
69
75
  }));
70
76
  }
71
-
72
77
  ProgressBar.Segment = Progress;
73
-
74
- module.exports = ProgressBar;
78
+ ProgressBar.propTypes = {
79
+ variant: import_prop_types.default.oneOf(["default", "success", "warning", "info", "error"]),
80
+ now: import_prop_types.default.number,
81
+ min: import_prop_types.default.number,
82
+ max: import_prop_types.default.number
83
+ };
84
+ var ProgressBar_default = ProgressBar;
85
+ module.exports = __toCommonJS(ProgressBar_exports);
86
+ //# sourceMappingURL=ProgressBar.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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({\n now = undefined,\n min = undefined,\n max = undefined,\n text = '',\n}) {\n const percentage = getPercentage(now, min, max);\n return {\n role: 'progressbar',\n 'aria-valuenow': now,\n 'aria-valuemin': min,\n 'aria-valuemax': max,\n 'aria-valuetext': text,\n style: {\n width: `${percentage}%`,\n },\n };\n}\n\nfunction Progress(props) {\n const { variant = 'default' } = props;\n\n const progressTraitProps = useProgressTrait(props);\n\n return (\n <ProgressBarProgress classProps={{ variant }} {...progressTraitProps} />\n );\n}\n\nfunction ProgressBar({\n variant = 'default',\n now = undefined,\n min = undefined,\n max = undefined,\n children: progressSegments,\n}) {\n return (\n <ProgressBarStatusBar>\n {progressSegments || (\n <Progress max={max} min={min} now={now} variant={variant} />\n )}\n </ProgressBarStatusBar>\n );\n}\n\nProgressBar.Segment = Progress;\n\nProgressBar.propTypes = {\n /** Progress intent variation */\n variant: PropTypes.oneOf(['default', 'success', 'warning', 'info', 'error']),\n /** Total current value */\n now: PropTypes.number,\n /** Min value */\n min: PropTypes.number,\n /** Total max */\n max: PropTypes.number,\n};\n\nexport default ProgressBar;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAsB;AACtB,mBAA8B;AAC9B,+BAA0D;AAE1D,0BAA0B;AAAA,EACxB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,GACN;AACD,QAAM,aAAa,gCAAc,KAAK,KAAK;AAC3C,SAAO;AAAA,IACL,MAAM;AAAA,IACN,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,IACjB,kBAAkB;AAAA,IAClB,OAAO;AAAA,MACL,OAAO,GAAG;AAAA;AAAA;AAAA;AAKhB,kBAAkB,OAAO;AACvB,QAAM,EAAE,UAAU,cAAc;AAEhC,QAAM,qBAAqB,iBAAiB;AAE5C,SACE,mDAAC,8CAAD;AAAA,IAAqB,YAAY,EAAE;AAAA,OAAe;AAAA;AAAA;AAItD,qBAAqB;AAAA,EACnB,UAAU;AAAA,EACV,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,UAAU;AAAA,GACT;AACD,SACE,mDAAC,+CAAD,MACG,oBACC,mDAAC,UAAD;AAAA,IAAU;AAAA,IAAU;AAAA,IAAU;AAAA,IAAU;AAAA;AAAA;AAMhD,YAAY,UAAU;AAEtB,YAAY,YAAY;AAAA,EAEtB,SAAS,0BAAU,MAAM,CAAC,WAAW,WAAW,WAAW,QAAQ;AAAA,EAEnE,KAAK,0BAAU;AAAA,EAEf,KAAK,0BAAU;AAAA,EAEf,KAAK,0BAAU;AAAA;AAGjB,IAAO,sBAAQ;",
6
+ "names": []
7
+ }
@@ -1,50 +1,50 @@
1
- 'use strict';
2
-
3
- var _jsx2 = require('@babel/runtime/helpers/jsx');
4
- require('react');
5
- var utils = require('./utils.js');
6
- var classedComponents = require('./classedComponents.js');
7
-
8
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
9
-
10
- var _jsx2__default = /*#__PURE__*/_interopDefaultLegacy(_jsx2);
11
-
12
- const defaultRenderer = _ref => {
13
- let {
14
- now,
15
- max,
16
- min
17
- } = _ref;
18
- return "".concat(min || now, " of ").concat(max);
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 });
19
11
  };
20
-
21
- const percentageRenderer = _ref2 => {
22
- let {
23
- now,
24
- max,
25
- min
26
- } = _ref2;
27
- const percentage = utils.getPercentage(now, min, max);
28
- return "".concat(percentage, "%");
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 ProgressCounter_exports = {};
29
+ __export(ProgressCounter_exports, {
30
+ default: () => ProgressCounter_default
31
+ });
32
+ var React = __toESM(require("react"));
33
+ var import_react = __toESM(require("react"));
34
+ var import_utils = require("./utils");
35
+ var import_classedComponents = require("./classedComponents");
36
+ const defaultRenderer = ({ now, max, min }) => `${min || now} of ${max}`;
37
+ const percentageRenderer = ({ now, max, min }) => {
38
+ const percentage = (0, import_utils.getPercentage)(now, min, max);
39
+ return `${percentage}%`;
29
40
  };
30
-
31
41
  const renderers = {
32
42
  default: defaultRenderer,
33
43
  percentage: percentageRenderer
34
44
  };
35
-
36
- function ProgressCounter(_ref3) {
37
- let {
38
- now,
39
- max,
40
- min,
41
- renderer = renderers.default
42
- } = _ref3;
43
- return /*#__PURE__*/_jsx2__default["default"](classedComponents.ProgressIndicatorCounter, {}, void 0, renderer({
44
- now,
45
- max,
46
- min
47
- }));
45
+ function ProgressCounter({ now, max, min, renderer = renderers.default }) {
46
+ return /* @__PURE__ */ import_react.default.createElement(import_classedComponents.ProgressIndicatorCounter, null, renderer({ now, max, min }));
48
47
  }
49
-
50
- module.exports = ProgressCounter;
48
+ var ProgressCounter_default = ProgressCounter;
49
+ module.exports = __toCommonJS(ProgressCounter_exports);
50
+ //# sourceMappingURL=ProgressCounter.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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\nfunction ProgressCounter({ now, max, min, renderer = renderers.default }) {\n return (\n <ProgressIndicatorCounter>\n {renderer({ now, max, min })}\n </ProgressIndicatorCounter>\n );\n}\n\nexport default ProgressCounter;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,mBAA8B;AAC9B,+BAAyC;AAEzC,MAAM,kBAAkB,CAAC,EAAE,KAAK,KAAK,UAAU,GAAG,OAAO,UAAU;AACnE,MAAM,qBAAqB,CAAC,EAAE,KAAK,KAAK,UAAU;AAChD,QAAM,aAAa,gCAAc,KAAK,KAAK;AAC3C,SAAO,GAAG;AAAA;AAGZ,MAAM,YAAY;AAAA,EAChB,SAAS;AAAA,EACT,YAAY;AAAA;AAGd,yBAAyB,EAAE,KAAK,KAAK,KAAK,WAAW,UAAU,WAAW;AACxE,SACE,mDAAC,mDAAD,MACG,SAAS,EAAE,KAAK,KAAK;AAAA;AAK5B,IAAO,0BAAQ;",
6
+ "names": []
7
+ }
@@ -1,34 +1,47 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var dsClassnames = require('@elliemae/ds-classnames');
6
-
7
- const blockName = 'determinate-progress-indicator';
8
- const progressBlockName = 'progress-bar';
9
- const Wrapper = dsClassnames.aggregatedClasses('div')(blockName, null, _ref => {
10
- let {
11
- disabled
12
- } = _ref;
13
- return {
14
- disabled
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);
15
26
  };
27
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
+ var classedComponents_exports = {};
29
+ __export(classedComponents_exports, {
30
+ ProgressBarProgress: () => ProgressBarProgress,
31
+ ProgressBarStatusBar: () => ProgressBarStatusBar,
32
+ ProgressIndicatorCounter: () => ProgressIndicatorCounter,
33
+ Title: () => Title,
34
+ Wrapper: () => Wrapper,
35
+ blockName: () => blockName
16
36
  });
17
- const Title = dsClassnames.aggregatedClasses('div')(blockName, 'title');
18
- const ProgressIndicatorCounter = dsClassnames.aggregatedClasses('span')(blockName, 'counter');
19
- const ProgressBarStatusBar = dsClassnames.aggregatedClasses('div')(progressBlockName);
20
- const ProgressBarProgress = dsClassnames.aggregatedClasses('div')(progressBlockName, 'progress', _ref2 => {
21
- let {
22
- variant
23
- } = _ref2;
24
- return {
25
- [variant]: true
26
- };
27
- });
28
-
29
- exports.ProgressBarProgress = ProgressBarProgress;
30
- exports.ProgressBarStatusBar = ProgressBarStatusBar;
31
- exports.ProgressIndicatorCounter = ProgressIndicatorCounter;
32
- exports.Title = Title;
33
- exports.Wrapper = Wrapper;
34
- exports.blockName = blockName;
37
+ var React = __toESM(require("react"));
38
+ var import_ds_classnames = require("@elliemae/ds-classnames");
39
+ const blockName = "determinate-progress-indicator";
40
+ const progressBlockName = "progress-bar";
41
+ const Wrapper = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, null, ({ disabled }) => ({ disabled }));
42
+ const Title = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "title");
43
+ const ProgressIndicatorCounter = (0, import_ds_classnames.aggregatedClasses)("span")(blockName, "counter");
44
+ const ProgressBarStatusBar = (0, import_ds_classnames.aggregatedClasses)("div")(progressBlockName);
45
+ const ProgressBarProgress = (0, import_ds_classnames.aggregatedClasses)("div")(progressBlockName, "progress", ({ variant }) => ({ [variant]: true }));
46
+ module.exports = __toCommonJS(classedComponents_exports);
47
+ //# sourceMappingURL=classedComponents.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/classedComponents.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import { aggregatedClasses } from '@elliemae/ds-classnames';\n\nexport const blockName = 'determinate-progress-indicator';\nconst progressBlockName = 'progress-bar';\n\nexport const Wrapper = aggregatedClasses('div')(\n blockName,\n null,\n ({ disabled }) => ({ disabled }),\n);\nexport const Title = aggregatedClasses('div')(blockName, 'title');\nexport const ProgressIndicatorCounter = aggregatedClasses('span')(\n blockName,\n 'counter',\n);\nexport const ProgressBarStatusBar = aggregatedClasses('div')(progressBlockName);\nexport const ProgressBarProgress = aggregatedClasses('div')(\n progressBlockName,\n 'progress',\n ({ variant }) => ({ [variant]: true }),\n);\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,2BAAkC;AAE3B,MAAM,YAAY;AACzB,MAAM,oBAAoB;AAEnB,MAAM,UAAU,4CAAkB,OACvC,WACA,MACA,CAAC,EAAE,eAAgB,GAAE;AAEhB,MAAM,QAAQ,4CAAkB,OAAO,WAAW;AAClD,MAAM,2BAA2B,4CAAkB,QACxD,WACA;AAEK,MAAM,uBAAuB,4CAAkB,OAAO;AACtD,MAAM,sBAAsB,4CAAkB,OACnD,mBACA,YACA,CAAC,EAAE,cAAe,IAAG,UAAU;",
6
+ "names": []
7
+ }
package/cjs/index.js CHANGED
@@ -1,11 +1,36 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var DSProgressIndicator = require('./DSProgressIndicator.js');
6
-
7
-
8
-
9
- exports.DSProgressIndicator = DSProgressIndicator.DSProgressIndicator;
10
- exports.ProgressIndicatorWithSchema = DSProgressIndicator.ProgressIndicatorWithSchema;
11
- exports["default"] = DSProgressIndicator.DSProgressIndicator;
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_DSProgressIndicator.default
31
+ });
32
+ var React = __toESM(require("react"));
33
+ __reExport(src_exports, require("./DSProgressIndicator"));
34
+ var import_DSProgressIndicator = __toESM(require("./DSProgressIndicator"));
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 './DSProgressIndicator';\nexport { default } from './DSProgressIndicator';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc;AACd,iCAAwB;",
6
+ "names": []
7
+ }
package/cjs/utils.js CHANGED
@@ -1,9 +1,37 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
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 utils_exports = {};
29
+ __export(utils_exports, {
30
+ getPercentage: () => getPercentage
31
+ });
32
+ var React = __toESM(require("react"));
5
33
  function getPercentage(now, min, max) {
6
34
  return (now || min) / max * 100;
7
35
  }
8
-
9
- exports.getPercentage = getPercentage;
36
+ module.exports = __toCommonJS(utils_exports);
37
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/utils.tsx", "../../../../scripts/build/transpile/react-shim.js"],
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;ACAA,YAAuB;ADAhB,uBAAuB,KAAK,KAAK,KAAK;AAC3C,SAAS,QAAO,OAAO,MAAO;AAAA;",
6
+ "names": []
7
+ }
@@ -1,80 +1,68 @@
1
- import _jsx2 from '@babel/runtime/helpers/esm/jsx';
2
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
3
- import 'core-js/modules/esnext.async-iterator.map.js';
4
- import 'core-js/modules/esnext.iterator.map.js';
5
- import 'core-js/modules/esnext.async-iterator.filter.js';
6
- import 'core-js/modules/esnext.iterator.constructor.js';
7
- import 'core-js/modules/esnext.iterator.filter.js';
8
- import 'core-js/modules/esnext.async-iterator.for-each.js';
9
- import 'core-js/modules/esnext.iterator.for-each.js';
10
- import { useMemo } from 'react';
11
- import { PropTypes, describe } from 'react-desc';
12
- import DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';
13
- import ProgressCounter from './ProgressCounter.js';
14
- import ProgressBar from './ProgressBar.js';
15
- import { Wrapper, Title } from './classedComponents.js';
16
- import { jsx, jsxs } from 'react/jsx-runtime';
17
-
18
- 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; }
19
-
20
- 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; }
21
-
22
- const DSProgressIndicator = _ref => {
23
- var _ProgressBar;
24
-
25
- let {
26
- containerProps = {},
27
- innerRef = () => null,
28
- title = '',
29
- counterRenderer = undefined,
30
- now = undefined,
31
- min = 0,
32
- max = undefined,
33
- disabled = false,
34
- segments = [],
35
- style = {}
36
- } = _ref;
37
- const renderProgressBar = useMemo(() => segments.length ? /*#__PURE__*/_jsx2(ProgressBar, {}, void 0, segments.map((segmentProps, i) => !(segmentProps.now < segmentProps.min) && /*#__PURE__*/jsx(ProgressBar.Segment, _objectSpread({}, segmentProps), i))) : _ProgressBar || (_ProgressBar = /*#__PURE__*/_jsx2(ProgressBar, {
38
- max: max,
39
- min: min,
40
- now: now
41
- })), [segments, min, max, now]);
42
- return /*#__PURE__*/jsxs(Wrapper, _objectSpread(_objectSpread({
1
+ import * as React from "react";
2
+ import React2, { useMemo } from "react";
3
+ import { describe, PropTypes } from "react-desc";
4
+ import DSTruncatedTooltipText from "@elliemae/ds-truncated-tooltip-text";
5
+ import Counter from "./ProgressCounter";
6
+ import ProgressBar from "./ProgressBar";
7
+ import { Title, Wrapper } from "./classedComponents";
8
+ const DSProgressIndicator = ({
9
+ containerProps = {},
10
+ innerRef = () => null,
11
+ title = "",
12
+ counterRenderer = void 0,
13
+ now = void 0,
14
+ min = 0,
15
+ max = void 0,
16
+ disabled = false,
17
+ segments = [],
18
+ style = {}
19
+ }) => {
20
+ const renderProgressBar = useMemo(() => segments.length ? /* @__PURE__ */ React2.createElement(ProgressBar, null, segments.map((segmentProps, i) => !(segmentProps.now < segmentProps.min) && /* @__PURE__ */ React2.createElement(ProgressBar.Segment, {
21
+ key: i,
22
+ ...segmentProps
23
+ }))) : /* @__PURE__ */ React2.createElement(ProgressBar, {
24
+ max,
25
+ min,
26
+ now
27
+ }), [segments, min, max, now]);
28
+ return /* @__PURE__ */ React2.createElement(Wrapper, {
43
29
  ref: innerRef,
44
30
  "aria-disabled": disabled,
45
- classProps: {
46
- disabled
47
- }
48
- }, containerProps), {}, {
49
- style: style,
50
- children: [/*#__PURE__*/_jsx2(DSTruncatedTooltipText, {
51
- containerComponent: Title,
52
- value: title
53
- }), /*#__PURE__*/_jsx2(ProgressCounter, {
54
- max: max,
55
- min: min,
56
- now: now,
57
- renderer: counterRenderer
58
- }), renderProgressBar]
59
- }));
31
+ classProps: { disabled },
32
+ ...containerProps,
33
+ style
34
+ }, /* @__PURE__ */ React2.createElement(DSTruncatedTooltipText, {
35
+ containerComponent: Title,
36
+ value: title
37
+ }), /* @__PURE__ */ React2.createElement(Counter, {
38
+ max,
39
+ min,
40
+ now,
41
+ renderer: counterRenderer
42
+ }), renderProgressBar);
60
43
  };
61
-
62
- const variants = ['default', 'success', 'warning', 'info', 'error'];
44
+ const variants = ["default", "success", "warning", "info", "error"];
63
45
  const progressIndicatorProps = {
64
- containerProps: PropTypes.object.description('Set of Properties attached to the main container'),
65
- innerRef: PropTypes.object.description('ref to the components container'),
66
- title: PropTypes.string.description('components title'),
67
- variant: PropTypes.oneOf(variants).description('Progress intent variation'),
68
- now: PropTypes.number.description('Total current value'),
69
- min: PropTypes.number.description('min value'),
70
- max: PropTypes.number.description('max value'),
71
- disabled: PropTypes.bool.description('Whether the progress indicator disabled or not').defaultValue(false),
72
- counterRenderer: PropTypes.func.description('Render a custom counter'),
73
- segments: PropTypes.array.description('An array of multiple progress objects'),
74
- style: PropTypes.object.description('css inline style')
46
+ containerProps: PropTypes.object.description("Set of Properties attached to the main container"),
47
+ innerRef: PropTypes.object.description("ref to the components container"),
48
+ title: PropTypes.string.description("components title"),
49
+ variant: PropTypes.oneOf(variants).description("Progress intent variation"),
50
+ now: PropTypes.number.description("Total current value"),
51
+ min: PropTypes.number.description("min value"),
52
+ max: PropTypes.number.description("max value"),
53
+ disabled: PropTypes.bool.description("Whether the progress indicator disabled or not").defaultValue(false),
54
+ counterRenderer: PropTypes.func.description("Render a custom counter"),
55
+ segments: PropTypes.array.description("An array of multiple progress objects"),
56
+ style: PropTypes.object.description("css inline style")
75
57
  };
58
+ DSProgressIndicator.propTypes = progressIndicatorProps;
76
59
  const ProgressIndicatorWithSchema = describe(DSProgressIndicator);
77
60
  ProgressIndicatorWithSchema.propTypes = progressIndicatorProps;
78
61
  DSProgressIndicator.ProgressBar = ProgressBar;
79
-
80
- export { DSProgressIndicator, ProgressIndicatorWithSchema, DSProgressIndicator as default };
62
+ var DSProgressIndicator_default = DSProgressIndicator;
63
+ export {
64
+ DSProgressIndicator,
65
+ ProgressIndicatorWithSchema,
66
+ DSProgressIndicator_default as default
67
+ };
68
+ //# sourceMappingURL=DSProgressIndicator.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSProgressIndicator.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/no-array-index-key */\nimport React, { useMemo } from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';\nimport Counter from './ProgressCounter';\nimport ProgressBar from './ProgressBar';\nimport { Title, Wrapper } from './classedComponents';\n\nconst DSProgressIndicator = ({\n containerProps = {},\n innerRef = () => null,\n title = '',\n counterRenderer = undefined,\n now = undefined,\n min = 0,\n max = undefined,\n disabled = false,\n segments = [],\n style = {},\n}) => {\n const renderProgressBar = useMemo(\n () =>\n segments.length ? (\n <ProgressBar>\n {segments.map(\n (segmentProps, i) =>\n !(segmentProps.now < segmentProps.min) && (\n <ProgressBar.Segment key={i} {...segmentProps} />\n ),\n )}\n </ProgressBar>\n ) : (\n <ProgressBar max={max} min={min} now={now} />\n ),\n [segments, min, max, now],\n );\n\n return (\n <Wrapper\n ref={innerRef}\n aria-disabled={disabled}\n classProps={{ disabled }}\n {...containerProps}\n style={style}\n >\n <DSTruncatedTooltipText containerComponent={Title} value={title} />\n <Counter max={max} min={min} now={now} renderer={counterRenderer} />\n {renderProgressBar}\n </Wrapper>\n );\n};\n\nconst variants = ['default', 'success', 'warning', 'info', 'error'];\n\nconst progressIndicatorProps = {\n containerProps: PropTypes.object.description(\n 'Set of Properties attached to the main container',\n ),\n innerRef: PropTypes.object.description('ref to the components container'),\n title: PropTypes.string.description('components title'),\n variant: PropTypes.oneOf(variants).description('Progress intent variation'),\n now: PropTypes.number.description('Total current value'),\n min: PropTypes.number.description('min value'),\n max: PropTypes.number.description('max value'),\n disabled: PropTypes.bool\n .description('Whether the progress indicator disabled or not')\n .defaultValue(false),\n counterRenderer: PropTypes.func.description('Render a custom counter'),\n segments: PropTypes.array.description(\n 'An array of multiple progress objects',\n ),\n style: PropTypes.object.description('css inline style'),\n};\n\nDSProgressIndicator.propTypes = progressIndicatorProps;\n\nconst ProgressIndicatorWithSchema = describe(DSProgressIndicator);\nProgressIndicatorWithSchema.propTypes = progressIndicatorProps;\n\nDSProgressIndicator.ProgressBar = ProgressBar;\n\nexport { DSProgressIndicator, ProgressIndicatorWithSchema };\nexport default DSProgressIndicator;\n"],
5
+ "mappings": "AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,sBAAsB,CAAC;AAAA,EAC3B,iBAAiB;AAAA,EACjB,WAAW,MAAM;AAAA,EACjB,QAAQ;AAAA,EACR,kBAAkB;AAAA,EAClB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,WAAW;AAAA,EACX,WAAW;AAAA,EACX,QAAQ;AAAA,MACJ;AACJ,QAAM,oBAAoB,QACxB,MACE,SAAS,SACP,qCAAC,aAAD,MACG,SAAS,IACR,CAAC,cAAc,MACb,CAAE,cAAa,MAAM,aAAa,QAChC,qCAAC,YAAY,SAAb;AAAA,IAAqB,KAAK;AAAA,OAAO;AAAA,SAKzC,qCAAC,aAAD;AAAA,IAAa;AAAA,IAAU;AAAA,IAAU;AAAA,MAErC,CAAC,UAAU,KAAK,KAAK;AAGvB,SACE,qCAAC,SAAD;AAAA,IACE,KAAK;AAAA,IACL,iBAAe;AAAA,IACf,YAAY,EAAE;AAAA,OACV;AAAA,IACJ;AAAA,KAEA,qCAAC,wBAAD;AAAA,IAAwB,oBAAoB;AAAA,IAAO,OAAO;AAAA,MAC1D,qCAAC,SAAD;AAAA,IAAS;AAAA,IAAU;AAAA,IAAU;AAAA,IAAU,UAAU;AAAA,MAChD;AAAA;AAKP,MAAM,WAAW,CAAC,WAAW,WAAW,WAAW,QAAQ;AAE3D,MAAM,yBAAyB;AAAA,EAC7B,gBAAgB,UAAU,OAAO,YAC/B;AAAA,EAEF,UAAU,UAAU,OAAO,YAAY;AAAA,EACvC,OAAO,UAAU,OAAO,YAAY;AAAA,EACpC,SAAS,UAAU,MAAM,UAAU,YAAY;AAAA,EAC/C,KAAK,UAAU,OAAO,YAAY;AAAA,EAClC,KAAK,UAAU,OAAO,YAAY;AAAA,EAClC,KAAK,UAAU,OAAO,YAAY;AAAA,EAClC,UAAU,UAAU,KACjB,YAAY,kDACZ,aAAa;AAAA,EAChB,iBAAiB,UAAU,KAAK,YAAY;AAAA,EAC5C,UAAU,UAAU,MAAM,YACxB;AAAA,EAEF,OAAO,UAAU,OAAO,YAAY;AAAA;AAGtC,oBAAoB,YAAY;AAEhC,MAAM,8BAA8B,SAAS;AAC7C,4BAA4B,YAAY;AAExC,oBAAoB,cAAc;AAGlC,IAAO,8BAAQ;",
6
+ "names": []
7
+ }
@@ -1,67 +1,57 @@
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 _jsx2 from '@babel/runtime/helpers/esm/jsx';
7
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
8
- import 'react';
9
- import { getPercentage } from './utils.js';
10
- import { ProgressBarStatusBar, ProgressBarProgress } from './classedComponents.js';
11
- import { jsx } from 'react/jsx-runtime';
12
-
13
- 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; }
14
-
15
- 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; }
16
-
17
- function useProgressTrait(_ref) {
18
- let {
19
- now = undefined,
20
- min = undefined,
21
- max = undefined,
22
- text = ''
23
- } = _ref;
1
+ import * as React from "react";
2
+ import React2 from "react";
3
+ import PropTypes from "prop-types";
4
+ import { getPercentage } from "./utils";
5
+ import { ProgressBarProgress, ProgressBarStatusBar } from "./classedComponents";
6
+ function useProgressTrait({
7
+ now = void 0,
8
+ min = void 0,
9
+ max = void 0,
10
+ text = ""
11
+ }) {
24
12
  const percentage = getPercentage(now, min, max);
25
13
  return {
26
- role: 'progressbar',
27
- 'aria-valuenow': now,
28
- 'aria-valuemin': min,
29
- 'aria-valuemax': max,
30
- 'aria-valuetext': text,
14
+ role: "progressbar",
15
+ "aria-valuenow": now,
16
+ "aria-valuemin": min,
17
+ "aria-valuemax": max,
18
+ "aria-valuetext": text,
31
19
  style: {
32
- width: "".concat(percentage, "%")
20
+ width: `${percentage}%`
33
21
  }
34
22
  };
35
23
  }
36
-
37
24
  function Progress(props) {
38
- const {
39
- variant = 'default'
40
- } = props;
25
+ const { variant = "default" } = props;
41
26
  const progressTraitProps = useProgressTrait(props);
42
- return /*#__PURE__*/jsx(ProgressBarProgress, _objectSpread({
43
- classProps: {
44
- variant
45
- }
46
- }, progressTraitProps));
27
+ return /* @__PURE__ */ React2.createElement(ProgressBarProgress, {
28
+ classProps: { variant },
29
+ ...progressTraitProps
30
+ });
47
31
  }
48
-
49
- function ProgressBar(_ref2) {
50
- let {
51
- variant = 'default',
52
- now = undefined,
53
- min = undefined,
54
- max = undefined,
55
- children: progressSegments
56
- } = _ref2;
57
- return /*#__PURE__*/_jsx2(ProgressBarStatusBar, {}, void 0, progressSegments || /*#__PURE__*/_jsx2(Progress, {
58
- max: max,
59
- min: min,
60
- now: now,
61
- variant: variant
32
+ function ProgressBar({
33
+ variant = "default",
34
+ now = void 0,
35
+ min = void 0,
36
+ max = void 0,
37
+ children: progressSegments
38
+ }) {
39
+ return /* @__PURE__ */ React2.createElement(ProgressBarStatusBar, null, progressSegments || /* @__PURE__ */ React2.createElement(Progress, {
40
+ max,
41
+ min,
42
+ now,
43
+ variant
62
44
  }));
63
45
  }
64
-
65
46
  ProgressBar.Segment = Progress;
66
-
67
- export { ProgressBar as default };
47
+ ProgressBar.propTypes = {
48
+ variant: PropTypes.oneOf(["default", "success", "warning", "info", "error"]),
49
+ now: PropTypes.number,
50
+ min: PropTypes.number,
51
+ max: PropTypes.number
52
+ };
53
+ var ProgressBar_default = ProgressBar;
54
+ export {
55
+ ProgressBar_default as default
56
+ };
57
+ //# sourceMappingURL=ProgressBar.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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({\n now = undefined,\n min = undefined,\n max = undefined,\n text = '',\n}) {\n const percentage = getPercentage(now, min, max);\n return {\n role: 'progressbar',\n 'aria-valuenow': now,\n 'aria-valuemin': min,\n 'aria-valuemax': max,\n 'aria-valuetext': text,\n style: {\n width: `${percentage}%`,\n },\n };\n}\n\nfunction Progress(props) {\n const { variant = 'default' } = props;\n\n const progressTraitProps = useProgressTrait(props);\n\n return (\n <ProgressBarProgress classProps={{ variant }} {...progressTraitProps} />\n );\n}\n\nfunction ProgressBar({\n variant = 'default',\n now = undefined,\n min = undefined,\n max = undefined,\n children: progressSegments,\n}) {\n return (\n <ProgressBarStatusBar>\n {progressSegments || (\n <Progress max={max} min={min} now={now} variant={variant} />\n )}\n </ProgressBarStatusBar>\n );\n}\n\nProgressBar.Segment = Progress;\n\nProgressBar.propTypes = {\n /** Progress intent variation */\n variant: PropTypes.oneOf(['default', 'success', 'warning', 'info', 'error']),\n /** Total current value */\n now: PropTypes.number,\n /** Min value */\n min: PropTypes.number,\n /** Total max */\n max: PropTypes.number,\n};\n\nexport default ProgressBar;\n"],
5
+ "mappings": "AAAA;ACAA;AACA;AACA;AACA;AAEA,0BAA0B;AAAA,EACxB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,GACN;AACD,QAAM,aAAa,cAAc,KAAK,KAAK;AAC3C,SAAO;AAAA,IACL,MAAM;AAAA,IACN,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,IACjB,kBAAkB;AAAA,IAClB,OAAO;AAAA,MACL,OAAO,GAAG;AAAA;AAAA;AAAA;AAKhB,kBAAkB,OAAO;AACvB,QAAM,EAAE,UAAU,cAAc;AAEhC,QAAM,qBAAqB,iBAAiB;AAE5C,SACE,qCAAC,qBAAD;AAAA,IAAqB,YAAY,EAAE;AAAA,OAAe;AAAA;AAAA;AAItD,qBAAqB;AAAA,EACnB,UAAU;AAAA,EACV,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,UAAU;AAAA,GACT;AACD,SACE,qCAAC,sBAAD,MACG,oBACC,qCAAC,UAAD;AAAA,IAAU;AAAA,IAAU;AAAA,IAAU;AAAA,IAAU;AAAA;AAAA;AAMhD,YAAY,UAAU;AAEtB,YAAY,YAAY;AAAA,EAEtB,SAAS,UAAU,MAAM,CAAC,WAAW,WAAW,WAAW,QAAQ;AAAA,EAEnE,KAAK,UAAU;AAAA,EAEf,KAAK,UAAU;AAAA,EAEf,KAAK,UAAU;AAAA;AAGjB,IAAO,sBAAQ;",
6
+ "names": []
7
+ }
@@ -1,44 +1,21 @@
1
- import _jsx2 from '@babel/runtime/helpers/esm/jsx';
2
- import 'react';
3
- import { getPercentage } from './utils.js';
4
- import { ProgressIndicatorCounter } from './classedComponents.js';
5
-
6
- const defaultRenderer = _ref => {
7
- let {
8
- now,
9
- max,
10
- min
11
- } = _ref;
12
- return "".concat(min || now, " of ").concat(max);
13
- };
14
-
15
- const percentageRenderer = _ref2 => {
16
- let {
17
- now,
18
- max,
19
- min
20
- } = _ref2;
1
+ import * as React from "react";
2
+ import React2 from "react";
3
+ import { getPercentage } from "./utils";
4
+ import { ProgressIndicatorCounter } from "./classedComponents";
5
+ const defaultRenderer = ({ now, max, min }) => `${min || now} of ${max}`;
6
+ const percentageRenderer = ({ now, max, min }) => {
21
7
  const percentage = getPercentage(now, min, max);
22
- return "".concat(percentage, "%");
8
+ return `${percentage}%`;
23
9
  };
24
-
25
10
  const renderers = {
26
11
  default: defaultRenderer,
27
12
  percentage: percentageRenderer
28
13
  };
29
-
30
- function ProgressCounter(_ref3) {
31
- let {
32
- now,
33
- max,
34
- min,
35
- renderer = renderers.default
36
- } = _ref3;
37
- return /*#__PURE__*/_jsx2(ProgressIndicatorCounter, {}, void 0, renderer({
38
- now,
39
- max,
40
- min
41
- }));
14
+ function ProgressCounter({ now, max, min, renderer = renderers.default }) {
15
+ return /* @__PURE__ */ React2.createElement(ProgressIndicatorCounter, null, renderer({ now, max, min }));
42
16
  }
43
-
44
- export { ProgressCounter as default };
17
+ var ProgressCounter_default = ProgressCounter;
18
+ export {
19
+ ProgressCounter_default as default
20
+ };
21
+ //# sourceMappingURL=ProgressCounter.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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\nfunction ProgressCounter({ now, max, min, renderer = renderers.default }) {\n return (\n <ProgressIndicatorCounter>\n {renderer({ now, max, min })}\n </ProgressIndicatorCounter>\n );\n}\n\nexport default ProgressCounter;\n"],
5
+ "mappings": "AAAA;ACAA;AACA;AACA;AAEA,MAAM,kBAAkB,CAAC,EAAE,KAAK,KAAK,UAAU,GAAG,OAAO,UAAU;AACnE,MAAM,qBAAqB,CAAC,EAAE,KAAK,KAAK,UAAU;AAChD,QAAM,aAAa,cAAc,KAAK,KAAK;AAC3C,SAAO,GAAG;AAAA;AAGZ,MAAM,YAAY;AAAA,EAChB,SAAS;AAAA,EACT,YAAY;AAAA;AAGd,yBAAyB,EAAE,KAAK,KAAK,KAAK,WAAW,UAAU,WAAW;AACxE,SACE,qCAAC,0BAAD,MACG,SAAS,EAAE,KAAK,KAAK;AAAA;AAK5B,IAAO,0BAAQ;",
6
+ "names": []
7
+ }
@@ -1,25 +1,18 @@
1
- import { aggregatedClasses } from '@elliemae/ds-classnames';
2
-
3
- const blockName = 'determinate-progress-indicator';
4
- const progressBlockName = 'progress-bar';
5
- const Wrapper = aggregatedClasses('div')(blockName, null, _ref => {
6
- let {
7
- disabled
8
- } = _ref;
9
- return {
10
- disabled
11
- };
12
- });
13
- const Title = aggregatedClasses('div')(blockName, 'title');
14
- const ProgressIndicatorCounter = aggregatedClasses('span')(blockName, 'counter');
15
- const ProgressBarStatusBar = aggregatedClasses('div')(progressBlockName);
16
- const ProgressBarProgress = aggregatedClasses('div')(progressBlockName, 'progress', _ref2 => {
17
- let {
18
- variant
19
- } = _ref2;
20
- return {
21
- [variant]: true
22
- };
23
- });
24
-
25
- export { ProgressBarProgress, ProgressBarStatusBar, ProgressIndicatorCounter, Title, Wrapper, blockName };
1
+ import * as React from "react";
2
+ import { aggregatedClasses } from "@elliemae/ds-classnames";
3
+ const blockName = "determinate-progress-indicator";
4
+ const progressBlockName = "progress-bar";
5
+ const Wrapper = aggregatedClasses("div")(blockName, null, ({ disabled }) => ({ disabled }));
6
+ const Title = aggregatedClasses("div")(blockName, "title");
7
+ const ProgressIndicatorCounter = aggregatedClasses("span")(blockName, "counter");
8
+ const ProgressBarStatusBar = aggregatedClasses("div")(progressBlockName);
9
+ const ProgressBarProgress = aggregatedClasses("div")(progressBlockName, "progress", ({ variant }) => ({ [variant]: true }));
10
+ export {
11
+ ProgressBarProgress,
12
+ ProgressBarStatusBar,
13
+ ProgressIndicatorCounter,
14
+ Title,
15
+ Wrapper,
16
+ blockName
17
+ };
18
+ //# sourceMappingURL=classedComponents.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/classedComponents.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { aggregatedClasses } from '@elliemae/ds-classnames';\n\nexport const blockName = 'determinate-progress-indicator';\nconst progressBlockName = 'progress-bar';\n\nexport const Wrapper = aggregatedClasses('div')(\n blockName,\n null,\n ({ disabled }) => ({ disabled }),\n);\nexport const Title = aggregatedClasses('div')(blockName, 'title');\nexport const ProgressIndicatorCounter = aggregatedClasses('span')(\n blockName,\n 'counter',\n);\nexport const ProgressBarStatusBar = aggregatedClasses('div')(progressBlockName);\nexport const ProgressBarProgress = aggregatedClasses('div')(\n progressBlockName,\n 'progress',\n ({ variant }) => ({ [variant]: true }),\n);\n"],
5
+ "mappings": "AAAA;ACAA;AAEO,MAAM,YAAY;AACzB,MAAM,oBAAoB;AAEnB,MAAM,UAAU,kBAAkB,OACvC,WACA,MACA,CAAC,EAAE,eAAgB,GAAE;AAEhB,MAAM,QAAQ,kBAAkB,OAAO,WAAW;AAClD,MAAM,2BAA2B,kBAAkB,QACxD,WACA;AAEK,MAAM,uBAAuB,kBAAkB,OAAO;AACtD,MAAM,sBAAsB,kBAAkB,OACnD,mBACA,YACA,CAAC,EAAE,cAAe,IAAG,UAAU;",
6
+ "names": []
7
+ }
package/esm/index.js CHANGED
@@ -1 +1,7 @@
1
- export { DSProgressIndicator, ProgressIndicatorWithSchema, DSProgressIndicator as default } from './DSProgressIndicator.js';
1
+ import * as React from "react";
2
+ export * from "./DSProgressIndicator";
3
+ import { default as default2 } from "./DSProgressIndicator";
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 './DSProgressIndicator';\nexport { default } from './DSProgressIndicator';\n"],
5
+ "mappings": "AAAA;ACAA;AACA;",
6
+ "names": []
7
+ }
package/esm/utils.js CHANGED
@@ -1,5 +1,8 @@
1
+ import * as React from "react";
1
2
  function getPercentage(now, min, max) {
2
3
  return (now || min) / max * 100;
3
4
  }
4
-
5
- export { getPercentage };
5
+ export {
6
+ getPercentage
7
+ };
8
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/utils.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export function getPercentage(now, min, max) {\n return ((now || min) / max) * 100;\n}\n"],
5
+ "mappings": "AAAA;ACAO,uBAAuB,KAAK,KAAK,KAAK;AAC3C,SAAS,QAAO,OAAO,MAAO;AAAA;",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-progress-indicator",
3
- "version": "2.2.0-next.3",
3
+ "version": "2.3.0-alpha.1",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Progress Indicator",
6
6
  "module": "./esm/index.js",
@@ -52,8 +52,8 @@
52
52
  "build": "node ../../scripts/build/build.js"
53
53
  },
54
54
  "dependencies": {
55
- "@elliemae/ds-classnames": "2.2.0-next.3",
56
- "@elliemae/ds-truncated-tooltip-text": "2.2.0-next.3",
55
+ "@elliemae/ds-classnames": "2.3.0-alpha.1",
56
+ "@elliemae/ds-truncated-tooltip-text": "2.3.0-alpha.1",
57
57
  "prop-types": "~15.7.2",
58
58
  "react-desc": "~4.1.3"
59
59
  },
@@ -82,18 +82,7 @@ declare const DSProgressIndicator: {
82
82
  ProgressBar: typeof ProgressBar;
83
83
  };
84
84
  declare const ProgressIndicatorWithSchema: {
85
- (props?: {
86
- containerProps?: {} | undefined;
87
- innerRef?: (() => null) | undefined;
88
- title?: string | undefined;
89
- counterRenderer?: undefined;
90
- now?: undefined;
91
- min?: number | undefined;
92
- max?: undefined;
93
- disabled?: boolean | undefined;
94
- segments?: never[] | undefined;
95
- style?: {} | undefined;
96
- } | undefined): JSX.Element;
85
+ (props?: unknown): JSX.Element;
97
86
  propTypes: unknown;
98
87
  toTypescript: () => import("react-desc").TypescriptSchema;
99
88
  };