@elliemae/ds-circular-progress-indicator 3.80.0-next.55 → 3.80.0-next.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/DSCircularProgressIndicator.js +60 -103
- package/dist/cjs/DSCircularProgressIndicator.js.map +2 -2
- package/dist/cjs/constants/index.js +158 -0
- package/dist/cjs/constants/index.js.map +7 -0
- package/dist/cjs/index.js +9 -6
- package/dist/cjs/index.js.map +3 -3
- package/dist/cjs/react-desc-prop-types.js +53 -0
- package/dist/cjs/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/typescript-testing/slot-props.js +43 -0
- package/dist/cjs/typescript-testing/slot-props.js.map +7 -0
- package/dist/cjs/typescript-testing/typescript-circular-indeterminate-indicator-valid.js +108 -0
- package/dist/cjs/typescript-testing/typescript-circular-indeterminate-indicator-valid.js.map +7 -0
- package/dist/cjs/typescript-testing/typescript-circular-progress-indicator-valid.js +74 -0
- package/dist/cjs/typescript-testing/typescript-circular-progress-indicator-valid.js.map +7 -0
- package/dist/cjs/v2/DSCircularIndeterminateIndicator.js +22 -7
- package/dist/cjs/v2/DSCircularIndeterminateIndicator.js.map +2 -2
- package/dist/cjs/v2/index.js +0 -2
- package/dist/cjs/v2/index.js.map +2 -2
- package/dist/cjs/v2/react-desc-prop-types.js +6 -1
- package/dist/cjs/v2/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/v2/styled.js +30 -8
- package/dist/cjs/v2/styled.js.map +2 -2
- package/dist/esm/DSCircularProgressIndicator.js +71 -104
- package/dist/esm/DSCircularProgressIndicator.js.map +2 -2
- package/dist/esm/constants/index.js +128 -0
- package/dist/esm/constants/index.js.map +7 -0
- package/dist/esm/index.js +11 -5
- package/dist/esm/index.js.map +3 -3
- package/dist/esm/react-desc-prop-types.js +23 -0
- package/dist/esm/react-desc-prop-types.js.map +7 -0
- package/dist/esm/typescript-testing/slot-props.js +20 -0
- package/dist/esm/typescript-testing/slot-props.js.map +7 -0
- package/dist/esm/typescript-testing/typescript-circular-indeterminate-indicator-valid.js +85 -0
- package/dist/esm/typescript-testing/typescript-circular-indeterminate-indicator-valid.js.map +7 -0
- package/dist/esm/typescript-testing/typescript-circular-progress-indicator-valid.js +51 -0
- package/dist/esm/typescript-testing/typescript-circular-progress-indicator-valid.js.map +7 -0
- package/dist/esm/v2/DSCircularIndeterminateIndicator.js +25 -9
- package/dist/esm/v2/DSCircularIndeterminateIndicator.js.map +2 -2
- package/dist/esm/v2/index.js +0 -1
- package/dist/esm/v2/index.js.map +2 -2
- package/dist/esm/v2/react-desc-prop-types.js +12 -2
- package/dist/esm/v2/react-desc-prop-types.js.map +2 -2
- package/dist/esm/v2/styled.js +31 -9
- package/dist/esm/v2/styled.js.map +2 -2
- package/dist/types/DSCircularProgressIndicator.d.ts +6 -26
- package/dist/types/constants/index.d.ts +83 -0
- package/dist/types/index.d.ts +5 -4
- package/dist/types/react-desc-prop-types.d.ts +22 -0
- package/dist/types/v2/index.d.ts +1 -1
- package/dist/types/v2/react-desc-prop-types.d.ts +17 -6
- package/package.json +10 -8
- package/dist/cjs/v2/constants.js +0 -80
- package/dist/cjs/v2/constants.js.map +0 -7
- package/dist/esm/v2/constants.js +0 -50
- package/dist/esm/v2/constants.js.map +0 -7
- package/dist/types/v2/constants.d.ts +0 -39
|
@@ -29,6 +29,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
var DSCircularProgressIndicator_exports = {};
|
|
30
30
|
__export(DSCircularProgressIndicator_exports, {
|
|
31
31
|
CircularProgressIndicatorWithSchema: () => CircularProgressIndicatorWithSchema,
|
|
32
|
+
DSCircularProgressIndicator: () => DSCircularProgressIndicator,
|
|
32
33
|
default: () => DSCircularProgressIndicator_default
|
|
33
34
|
});
|
|
34
35
|
module.exports = __toCommonJS(DSCircularProgressIndicator_exports);
|
|
@@ -37,100 +38,62 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
37
38
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
38
39
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
39
40
|
var import_ds_tooltip_v3 = require("@elliemae/ds-tooltip-v3");
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
var import_ds_typography = require("@elliemae/ds-typography");
|
|
42
|
+
var import_react_desc_prop_types = require("./react-desc-prop-types.js");
|
|
43
|
+
var import_constants = require("./constants/index.js");
|
|
44
|
+
const legacyClassNames = (0, import_ds_classnames.convertPropToCssClassName)("circular-progress-indicator");
|
|
45
|
+
const withLegacyDefaults = ({
|
|
46
|
+
size = import_react_desc_prop_types.defaultProps.size,
|
|
47
|
+
showLabel = import_react_desc_prop_types.defaultProps.showLabel,
|
|
48
|
+
showTooltip = import_react_desc_prop_types.defaultProps.showTooltip,
|
|
49
|
+
waiting = import_react_desc_prop_types.defaultProps.waiting,
|
|
50
|
+
loading = import_react_desc_prop_types.defaultProps.loading
|
|
51
|
+
}) => ({
|
|
52
|
+
size,
|
|
53
|
+
showLabel,
|
|
54
|
+
showTooltip,
|
|
55
|
+
waiting,
|
|
56
|
+
loading
|
|
57
|
+
});
|
|
58
|
+
const DSCircularProgressIndicator = (props) => {
|
|
42
59
|
(0, import_ds_props_helpers.useDeprecateComponent)({ componentName: "ds-circular-progress-indicator", version: "TBD Date: 2023 Q3" });
|
|
60
|
+
const { size, showLabel, showTooltip, waiting, loading } = withLegacyDefaults(props);
|
|
43
61
|
const waitingLabel = "Waiting...";
|
|
44
62
|
const loadingLabel = "Loading...";
|
|
45
63
|
const currentLabel = waiting && !loading ? waitingLabel : loadingLabel;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
sizePx = 8;
|
|
57
|
-
sizeLabel = 12;
|
|
58
|
-
strokeWidth = 10;
|
|
59
|
-
trackWidth = 3;
|
|
60
|
-
markerHeight = "1";
|
|
61
|
-
grayArcStrokeDasharray = "46 174";
|
|
62
|
-
grayArcStrokeDashoffset = "133";
|
|
63
|
-
break;
|
|
64
|
-
case "S":
|
|
65
|
-
sizePx = 16;
|
|
66
|
-
sizeLabel = 12;
|
|
67
|
-
strokeWidth = 8;
|
|
68
|
-
trackWidth = 3;
|
|
69
|
-
markerHeight = "1";
|
|
70
|
-
grayArcStrokeDasharray = "46 174";
|
|
71
|
-
grayArcStrokeDashoffset = "133";
|
|
72
|
-
break;
|
|
73
|
-
case "M":
|
|
74
|
-
sizePx = 24;
|
|
75
|
-
sizeLabel = 12;
|
|
76
|
-
strokeWidth = 7;
|
|
77
|
-
trackWidth = 3;
|
|
78
|
-
markerHeight = "1";
|
|
79
|
-
markerRefY = "5.5";
|
|
80
|
-
grayArcStrokeDasharray = "46 174";
|
|
81
|
-
grayArcStrokeDashoffset = "133";
|
|
82
|
-
break;
|
|
83
|
-
case "L":
|
|
84
|
-
sizePx = 32;
|
|
85
|
-
sizeLabel = 13;
|
|
86
|
-
strokeWidth = 6;
|
|
87
|
-
trackWidth = 3;
|
|
88
|
-
markerRefY = "5";
|
|
89
|
-
break;
|
|
90
|
-
case "XL":
|
|
91
|
-
sizePx = 48;
|
|
92
|
-
sizeLabel = 14;
|
|
93
|
-
strokeWidth = 5;
|
|
94
|
-
trackWidth = 1;
|
|
95
|
-
break;
|
|
96
|
-
case "XXL":
|
|
97
|
-
sizePx = 56;
|
|
98
|
-
sizeLabel = 16;
|
|
99
|
-
strokeWidth = 4;
|
|
100
|
-
trackWidth = 1;
|
|
101
|
-
break;
|
|
102
|
-
case "XXXL":
|
|
103
|
-
sizePx = 64;
|
|
104
|
-
sizeLabel = 16;
|
|
105
|
-
strokeWidth = 5;
|
|
106
|
-
trackWidth = 2;
|
|
107
|
-
break;
|
|
108
|
-
default:
|
|
109
|
-
break;
|
|
110
|
-
}
|
|
64
|
+
const {
|
|
65
|
+
sizePx,
|
|
66
|
+
sizeLabel,
|
|
67
|
+
strokeWidth,
|
|
68
|
+
trackWidth,
|
|
69
|
+
markerHeight,
|
|
70
|
+
markerRefY,
|
|
71
|
+
grayArcStrokeDasharray,
|
|
72
|
+
grayArcStrokeDashoffset
|
|
73
|
+
} = { ...import_constants.legacyBaseGeometry, ...import_constants.legacyGeometryBySize[size.toUpperCase()] };
|
|
111
74
|
const labelText = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
112
75
|
"p",
|
|
113
76
|
{
|
|
114
|
-
"data-testid":
|
|
115
|
-
className: classNameElement("label"),
|
|
77
|
+
"data-testid": import_constants.CIRCULAR_PROGRESS_INDICATOR_DATA_TESTID.LABEL,
|
|
78
|
+
className: legacyClassNames.classNameElement("label"),
|
|
116
79
|
style: { fontSize: `${sizeLabel}px` },
|
|
117
|
-
children: currentLabel
|
|
80
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_typography.DSTypography, { component: "span", variant: "b2", style: import_constants.legacyInheritedTypography, children: currentLabel })
|
|
118
81
|
}
|
|
119
82
|
);
|
|
120
|
-
const buildIndicator = (
|
|
83
|
+
const buildIndicator = (indicatorElement) => sizePx !== void 0 && sizePx < 17 || showTooltip ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
121
84
|
import_ds_tooltip_v3.DSTooltipV3,
|
|
122
85
|
{
|
|
123
|
-
id:
|
|
86
|
+
id: import_constants.CIRCULAR_PROGRESS_INDICATOR_TOOLTIP_ID,
|
|
124
87
|
text: currentLabel,
|
|
125
88
|
startPlacementPreference: "bottom",
|
|
126
|
-
"data-testid":
|
|
127
|
-
children:
|
|
89
|
+
"data-testid": import_constants.CIRCULAR_PROGRESS_INDICATOR_TOOLTIP_ID,
|
|
90
|
+
children: indicatorElement
|
|
128
91
|
}
|
|
129
|
-
) :
|
|
92
|
+
) : indicatorElement;
|
|
130
93
|
const grayTrack = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
131
94
|
"circle",
|
|
132
95
|
{
|
|
133
|
-
className: classNameElement("track"),
|
|
96
|
+
className: legacyClassNames.classNameElement("track"),
|
|
134
97
|
cx: "50%",
|
|
135
98
|
cy: "50%",
|
|
136
99
|
fill: "none",
|
|
@@ -141,7 +104,7 @@ const CircularProgressIndicator = ({ size, showLabel, showTooltip, waiting, load
|
|
|
141
104
|
const grayArc = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
142
105
|
"circle",
|
|
143
106
|
{
|
|
144
|
-
className: classNameElement("arc-gray"),
|
|
107
|
+
className: legacyClassNames.classNameElement("arc-gray"),
|
|
145
108
|
stroke: "#E0E3E8",
|
|
146
109
|
strokeDasharray: `${grayArcStrokeDasharray}`,
|
|
147
110
|
strokeDashoffset: `${grayArcStrokeDashoffset}`,
|
|
@@ -159,7 +122,7 @@ const CircularProgressIndicator = ({ size, showLabel, showTooltip, waiting, load
|
|
|
159
122
|
version: "1.1",
|
|
160
123
|
viewBox: "0 0 66 66",
|
|
161
124
|
width: `${sizePx}px`,
|
|
162
|
-
"data-testid":
|
|
125
|
+
"data-testid": import_constants.CIRCULAR_PROGRESS_INDICATOR_DATA_TESTID.INDICATOR,
|
|
163
126
|
"aria-label": waiting && !loading ? waitingLabel : loadingLabel,
|
|
164
127
|
children: [
|
|
165
128
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("defs", { children: [
|
|
@@ -206,18 +169,18 @@ const CircularProgressIndicator = ({ size, showLabel, showTooltip, waiting, load
|
|
|
206
169
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
207
170
|
"path",
|
|
208
171
|
{
|
|
209
|
-
className: classNameElement("arc-blue"),
|
|
172
|
+
className: legacyClassNames.classNameElement("arc-blue"),
|
|
210
173
|
d: "M30,5 C17.536025,6 6,17.536027 5,31",
|
|
211
174
|
stroke: "#5594e2",
|
|
212
175
|
strokeWidth: `${strokeWidth - 0.5}px`,
|
|
213
176
|
strokeLinecap: "round",
|
|
214
|
-
"data-testid":
|
|
177
|
+
"data-testid": import_constants.CIRCULAR_PROGRESS_INDICATOR_DATA_TESTID.BLUE_ARC
|
|
215
178
|
}
|
|
216
179
|
),
|
|
217
180
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
218
181
|
"path",
|
|
219
182
|
{
|
|
220
|
-
className: classNameElement("arc-white"),
|
|
183
|
+
className: legacyClassNames.classNameElement("arc-white"),
|
|
221
184
|
d: "M33,5 C17.536027,5 5,17.536027 5,33",
|
|
222
185
|
stroke: "#FFF",
|
|
223
186
|
strokeWidth: `${strokeWidth + 2}px`,
|
|
@@ -230,27 +193,21 @@ const CircularProgressIndicator = ({ size, showLabel, showTooltip, waiting, load
|
|
|
230
193
|
]
|
|
231
194
|
}
|
|
232
195
|
);
|
|
233
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
const circularProgressIndicatorProps = {
|
|
246
|
-
size: import_ds_props_helpers.PropTypes.oneOf(["xs", "s", "m", "l", "xl", "xxl", "xxxl"]).description("Defines the size of the indicator").defaultValue("m"),
|
|
247
|
-
showLabel: import_ds_props_helpers.PropTypes.bool.description("Wheter the indicator displays its state on a label or not").defaultValue(false),
|
|
248
|
-
showTooltip: import_ds_props_helpers.PropTypes.bool.description("Wheter the indicator displays its state on a tooltip or not").defaultValue(false),
|
|
249
|
-
waiting: import_ds_props_helpers.PropTypes.bool.description("Defines the state of the indicator as Waiting and only displays the gray track").defaultValue(false),
|
|
250
|
-
loading: import_ds_props_helpers.PropTypes.bool.description("Defines the state of the indicator as Loading and displays a blue spinner animation").defaultValue(false)
|
|
196
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
197
|
+
"div",
|
|
198
|
+
{
|
|
199
|
+
className: legacyClassNames.classNameBlock("wrapper"),
|
|
200
|
+
role: "status",
|
|
201
|
+
"aria-hidden": waiting || loading ? "false" : "true",
|
|
202
|
+
children: [
|
|
203
|
+
buildIndicator(indicator),
|
|
204
|
+
showLabel && labelText
|
|
205
|
+
]
|
|
206
|
+
}
|
|
207
|
+
);
|
|
251
208
|
};
|
|
252
|
-
|
|
253
|
-
const CircularProgressIndicatorWithSchema = (0, import_ds_props_helpers.describe)(
|
|
254
|
-
CircularProgressIndicatorWithSchema.propTypes =
|
|
255
|
-
var DSCircularProgressIndicator_default =
|
|
209
|
+
DSCircularProgressIndicator.displayName = import_constants.DSCircularProgressIndicatorName;
|
|
210
|
+
const CircularProgressIndicatorWithSchema = (0, import_ds_props_helpers.describe)(DSCircularProgressIndicator);
|
|
211
|
+
CircularProgressIndicatorWithSchema.propTypes = import_react_desc_prop_types.DSCircularProgressIndicatorPropTypesSchema;
|
|
212
|
+
var DSCircularProgressIndicator_default = DSCircularProgressIndicator;
|
|
256
213
|
//# sourceMappingURL=DSCircularProgressIndicator.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSCircularProgressIndicator.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { describe, useDeprecateComponent } from '@elliemae/ds-props-helpers';\nimport { DSTooltipV3 } from '@elliemae/ds-tooltip-v3';\nimport { DSTypography } from '@elliemae/ds-typography';\nimport {\n type DSCircularProgressIndicatorT,\n DSCircularProgressIndicatorPropTypesSchema,\n defaultProps,\n} from './react-desc-prop-types.js';\nimport {\n CIRCULAR_PROGRESS_INDICATOR_DATA_TESTID,\n CIRCULAR_PROGRESS_INDICATOR_TOOLTIP_ID,\n DSCircularProgressIndicatorName,\n legacyBaseGeometry,\n legacyGeometryBySize,\n legacyInheritedTypography,\n} from './constants/index.js';\n\nconst legacyClassNames = convertPropToCssClassName('circular-progress-indicator');\n\n// Destructuring defaults keep the semantics of the static `defaultProps` this component used to declare:\n// a prop that is missing or explicitly `undefined` gets its default, any other value (`null` included) is kept.\nconst withLegacyDefaults = ({\n size = defaultProps.size,\n showLabel = defaultProps.showLabel,\n showTooltip = defaultProps.showTooltip,\n waiting = defaultProps.waiting,\n loading = defaultProps.loading,\n}: DSCircularProgressIndicatorT.Props): DSCircularProgressIndicatorT.InternalProps => ({\n size,\n showLabel,\n showTooltip,\n waiting,\n loading,\n});\n\nconst DSCircularProgressIndicator: React.ComponentType<DSCircularProgressIndicatorT.Props> = (props) => {\n useDeprecateComponent({ componentName: 'ds-circular-progress-indicator', version: 'TBD Date: 2023 Q3' });\n\n const { size, showLabel, showTooltip, waiting, loading } = withLegacyDefaults(props);\n\n const waitingLabel = 'Waiting...';\n const loadingLabel = 'Loading...';\n const currentLabel = waiting && !loading ? waitingLabel : loadingLabel;\n // a size outside the table keeps the base values (undefined sizes, NaN stroke width), which render the same\n // attributes the switch this lookup replaced did\n const {\n sizePx,\n sizeLabel,\n strokeWidth,\n trackWidth,\n markerHeight,\n markerRefY,\n grayArcStrokeDasharray,\n grayArcStrokeDashoffset,\n } = { ...legacyBaseGeometry, ...legacyGeometryBySize[size.toUpperCase()] };\n\n const labelText = (\n <p\n data-testid={CIRCULAR_PROGRESS_INDICATOR_DATA_TESTID.LABEL}\n className={legacyClassNames.classNameElement('label')}\n style={{ fontSize: `${sizeLabel}px` }}\n >\n <DSTypography component=\"span\" variant=\"b2\" style={legacyInheritedTypography}>\n {currentLabel}\n </DSTypography>\n </p>\n );\n\n // Only adds the tooltip if sizePx < 17 or showTooltip is true\n const buildIndicator = (indicatorElement: React.JSX.Element) =>\n (sizePx !== undefined && sizePx < 17) || showTooltip ? (\n <DSTooltipV3\n id={CIRCULAR_PROGRESS_INDICATOR_TOOLTIP_ID}\n text={currentLabel}\n startPlacementPreference=\"bottom\"\n data-testid={CIRCULAR_PROGRESS_INDICATOR_TOOLTIP_ID}\n >\n {indicatorElement}\n </DSTooltipV3>\n ) : (\n indicatorElement\n );\n\n const grayTrack = (\n <circle\n className={legacyClassNames.classNameElement('track')}\n cx=\"50%\"\n cy=\"50%\"\n fill=\"none\"\n r=\"28\"\n strokeWidth={`${trackWidth}px`}\n />\n );\n\n const grayArc = (\n <circle\n className={legacyClassNames.classNameElement('arc-gray')}\n stroke=\"#E0E3E8\"\n strokeDasharray={`${grayArcStrokeDasharray}`}\n strokeDashoffset={`${grayArcStrokeDashoffset}`}\n cx=\"50%\"\n cy=\"50%\"\n fill=\"none\"\n r=\"28\"\n strokeWidth={`${trackWidth}px`}\n />\n );\n\n const indicator = (\n <svg\n height={`${sizePx}px`}\n version=\"1.1\"\n viewBox=\"0 0 66 66\"\n width={`${sizePx}px`}\n data-testid={CIRCULAR_PROGRESS_INDICATOR_DATA_TESTID.INDICATOR}\n aria-label={waiting && !loading ? waitingLabel : loadingLabel}\n >\n <defs>\n <linearGradient id=\"grad1\" x1=\"0%\" x2=\"100%\" y1=\"100%\" y2=\"0%\">\n <stop offset=\"0%\" style={{ stopColor: '#E0E3E8', stopOpacity: 1 }} />\n <stop offset=\"89%\" style={{ stopColor: '#5594e2', stopOpacity: 1 }} />\n <stop offset=\"100%\" style={{ stopColor: '#5594e2', stopOpacity: 1 }} />\n </linearGradient>\n <linearGradient id=\"grad2\" x1=\"0%\" x2=\"100%\" y1=\"100%\" y2=\"0%\">\n <stop offset=\"0%\" style={{ stopColor: '#5594e2', stopOpacity: 1 }} />\n <stop offset=\"11%\" style={{ stopColor: '#5594e2', stopOpacity: 1 }} />\n <stop offset=\"100%\" style={{ stopColor: '#E0E3E8', stopOpacity: 1 }} />\n </linearGradient>\n <marker\n id=\"inverseL\"\n viewBox=\"0 0 5 10\"\n refX=\"0.5\"\n refY={`${markerRefY}`}\n markerUnits=\"strokeWidth\"\n markerWidth=\"0.5\"\n markerHeight={`${markerHeight}`}\n orient=\"auto\"\n >\n <path d=\"M 0 0 L 6 0 A 5 5 0 0 0 6 10 L 0 10 z\" fill=\"#FFF\" />\n </marker>\n <marker\n id=\"inverseR\"\n viewBox=\"0 0 5 10\"\n refX=\"0\"\n refY=\"5\"\n markerUnits=\"strokeWidth\"\n markerWidth=\"0.7\"\n markerHeight={`${markerHeight}`}\n >\n <path d=\"M 0 0 L 6 0 A 5 5 0 0 0 6 10 L 0 10 z\" fill=\"#FFF\" />\n </marker>\n </defs>\n {grayTrack}\n {!waiting && (\n <g fill=\"none\" fillRule=\"evenodd\" stroke=\"none\" strokeWidth=\"1\">\n <path\n className={legacyClassNames.classNameElement('arc-blue')}\n d=\"M30,5 C17.536025,6 6,17.536027 5,31\"\n stroke=\"#5594e2\"\n strokeWidth={`${strokeWidth - 0.5}px`}\n strokeLinecap=\"round\"\n data-testid={CIRCULAR_PROGRESS_INDICATOR_DATA_TESTID.BLUE_ARC}\n />\n <path\n className={legacyClassNames.classNameElement('arc-white')}\n d=\"M33,5 C17.536027,5 5,17.536027 5,33\"\n stroke=\"#FFF\"\n strokeWidth={`${strokeWidth + 2}px`}\n markerStart=\"url(#inverseR)\"\n markerEnd=\"url(#inverseL)\"\n />\n {grayArc}\n </g>\n )}\n </svg>\n );\n\n return (\n <div\n className={legacyClassNames.classNameBlock('wrapper')}\n role=\"status\"\n aria-hidden={waiting || loading ? 'false' : 'true'}\n >\n {buildIndicator(indicator)}\n {showLabel && labelText}\n </div>\n );\n};\n\nDSCircularProgressIndicator.displayName = DSCircularProgressIndicatorName;\nconst CircularProgressIndicatorWithSchema = describe(DSCircularProgressIndicator);\nCircularProgressIndicatorWithSchema.propTypes = DSCircularProgressIndicatorPropTypesSchema;\n\nexport { DSCircularProgressIndicator, CircularProgressIndicatorWithSchema };\nexport default DSCircularProgressIndicator;\n", "import * as React from 'react';\nexport { React };\n"],
|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;AAAA;AAAA;AAAA,EAEJ;AAGF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,iBAAiB,eAAe,SAAS;AAAA,MACpD,MAAK;AAAA,MACL,eAAa,WAAW,UAAU,UAAU;AAAA,MAE3C;AAAA,uBAAe,SAAS;AAAA,QACxB,aAAa;AAAA;AAAA;AAAA,EAChB;AAEJ;AAEA,4BAA4B,cAAc;AAC1C,MAAM,0CAAsC,kCAAS,2BAA2B;AAChF,oCAAoC,YAAY;AAGhD,IAAO,sCAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
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.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var constants_exports = {};
|
|
30
|
+
__export(constants_exports, {
|
|
31
|
+
CIRCULAR_INDETERMINATE_INDICATOR_DATA_TESTID: () => CIRCULAR_INDETERMINATE_INDICATOR_DATA_TESTID,
|
|
32
|
+
CIRCULAR_INDETERMINATE_INDICATOR_SLOTS: () => CIRCULAR_INDETERMINATE_INDICATOR_SLOTS,
|
|
33
|
+
CIRCULAR_PROGRESS_INDICATOR_DATA_TESTID: () => CIRCULAR_PROGRESS_INDICATOR_DATA_TESTID,
|
|
34
|
+
CIRCULAR_PROGRESS_INDICATOR_TOOLTIP_ID: () => CIRCULAR_PROGRESS_INDICATOR_TOOLTIP_ID,
|
|
35
|
+
DSCircularIndeterminateIndicatorDataTestIds: () => DSCircularIndeterminateIndicatorDataTestIds,
|
|
36
|
+
DSCircularIndeterminateIndicatorName: () => DSCircularIndeterminateIndicatorName,
|
|
37
|
+
DSCircularIndeterminateIndicatorSlots: () => DSCircularIndeterminateIndicatorSlots,
|
|
38
|
+
DSCircularProgressIndicatorName: () => DSCircularProgressIndicatorName,
|
|
39
|
+
colorToHex: () => colorToHex,
|
|
40
|
+
legacyBaseGeometry: () => legacyBaseGeometry,
|
|
41
|
+
legacyGeometryBySize: () => legacyGeometryBySize,
|
|
42
|
+
legacyInheritedTypography: () => legacyInheritedTypography,
|
|
43
|
+
sizeToPx: () => sizeToPx,
|
|
44
|
+
sizeToTextSize: () => sizeToTextSize,
|
|
45
|
+
sizeToWeight: () => sizeToWeight
|
|
46
|
+
});
|
|
47
|
+
module.exports = __toCommonJS(constants_exports);
|
|
48
|
+
var React = __toESM(require("react"));
|
|
49
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
50
|
+
const DSCircularIndeterminateIndicatorName = "DSCircularindeterminateindicator";
|
|
51
|
+
const CIRCULAR_INDETERMINATE_INDICATOR_SLOTS = {
|
|
52
|
+
ROOT: "root",
|
|
53
|
+
SVG: "svg",
|
|
54
|
+
LABEL: "label",
|
|
55
|
+
CIRCLE: "circle",
|
|
56
|
+
PATH: "path",
|
|
57
|
+
RECT: "rect"
|
|
58
|
+
};
|
|
59
|
+
const CIRCULAR_INDETERMINATE_INDICATOR_DATA_TESTID = {
|
|
60
|
+
...(0, import_ds_system.slotObjectToDataTestIds)(DSCircularIndeterminateIndicatorName, CIRCULAR_INDETERMINATE_INDICATOR_SLOTS),
|
|
61
|
+
// legacy value — the root has always rendered this data-testid, breaking change if removed
|
|
62
|
+
ROOT: "ds-circular-indeterminate-indicator-root"
|
|
63
|
+
};
|
|
64
|
+
const DSCircularIndeterminateIndicatorSlots = CIRCULAR_INDETERMINATE_INDICATOR_SLOTS;
|
|
65
|
+
const DSCircularIndeterminateIndicatorDataTestIds = (0, import_ds_system.slotObjectToDataTestIds)(
|
|
66
|
+
DSCircularIndeterminateIndicatorName,
|
|
67
|
+
CIRCULAR_INDETERMINATE_INDICATOR_SLOTS
|
|
68
|
+
);
|
|
69
|
+
const sizeToPx = {
|
|
70
|
+
xs: 16,
|
|
71
|
+
s: 24,
|
|
72
|
+
m: 32,
|
|
73
|
+
l: 48,
|
|
74
|
+
xl: 56,
|
|
75
|
+
xxl: 64
|
|
76
|
+
};
|
|
77
|
+
const sizeToWeight = {
|
|
78
|
+
xs: "3px",
|
|
79
|
+
s: "3px",
|
|
80
|
+
m: "3px",
|
|
81
|
+
l: "4px",
|
|
82
|
+
xl: "5px",
|
|
83
|
+
xxl: "6px"
|
|
84
|
+
};
|
|
85
|
+
const colorToHex = {
|
|
86
|
+
light: "#EBF6FF",
|
|
87
|
+
dark: "#1394E5"
|
|
88
|
+
};
|
|
89
|
+
const sizeToTextSize = {
|
|
90
|
+
xs: "12px",
|
|
91
|
+
s: "12px",
|
|
92
|
+
m: "12px",
|
|
93
|
+
l: "13px",
|
|
94
|
+
xl: "14px",
|
|
95
|
+
xxl: "16px"
|
|
96
|
+
};
|
|
97
|
+
const DSCircularProgressIndicatorName = "CircularProgressIndicator";
|
|
98
|
+
const CIRCULAR_PROGRESS_INDICATOR_DATA_TESTID = {
|
|
99
|
+
INDICATOR: "circular-indicator",
|
|
100
|
+
LABEL: "circular-indicator-label",
|
|
101
|
+
BLUE_ARC: "circular-indicator-blue-arc"
|
|
102
|
+
};
|
|
103
|
+
const CIRCULAR_PROGRESS_INDICATOR_TOOLTIP_ID = "circular-indicator-title";
|
|
104
|
+
const legacyBaseGeometry = {
|
|
105
|
+
// the arcs derive their widths from it: NaN renders the same `NaNpx` the untyped `undefined - 0.5` used to
|
|
106
|
+
strokeWidth: NaN,
|
|
107
|
+
markerHeight: "0.7",
|
|
108
|
+
markerRefY: "4.8",
|
|
109
|
+
grayArcStrokeDasharray: "45 170",
|
|
110
|
+
grayArcStrokeDashoffset: "127.5"
|
|
111
|
+
};
|
|
112
|
+
const legacyGeometryBySize = {
|
|
113
|
+
XS: {
|
|
114
|
+
sizePx: 8,
|
|
115
|
+
sizeLabel: 12,
|
|
116
|
+
strokeWidth: 10,
|
|
117
|
+
trackWidth: 3,
|
|
118
|
+
markerHeight: "1",
|
|
119
|
+
grayArcStrokeDasharray: "46 174",
|
|
120
|
+
grayArcStrokeDashoffset: "133"
|
|
121
|
+
},
|
|
122
|
+
S: {
|
|
123
|
+
sizePx: 16,
|
|
124
|
+
sizeLabel: 12,
|
|
125
|
+
strokeWidth: 8,
|
|
126
|
+
trackWidth: 3,
|
|
127
|
+
markerHeight: "1",
|
|
128
|
+
grayArcStrokeDasharray: "46 174",
|
|
129
|
+
grayArcStrokeDashoffset: "133"
|
|
130
|
+
},
|
|
131
|
+
M: {
|
|
132
|
+
sizePx: 24,
|
|
133
|
+
sizeLabel: 12,
|
|
134
|
+
strokeWidth: 7,
|
|
135
|
+
trackWidth: 3,
|
|
136
|
+
markerHeight: "1",
|
|
137
|
+
markerRefY: "5.5",
|
|
138
|
+
grayArcStrokeDasharray: "46 174",
|
|
139
|
+
grayArcStrokeDashoffset: "133"
|
|
140
|
+
},
|
|
141
|
+
L: { sizePx: 32, sizeLabel: 13, strokeWidth: 6, trackWidth: 3, markerRefY: "5" },
|
|
142
|
+
XL: { sizePx: 48, sizeLabel: 14, strokeWidth: 5, trackWidth: 1 },
|
|
143
|
+
XXL: { sizePx: 56, sizeLabel: 16, strokeWidth: 4, trackWidth: 1 },
|
|
144
|
+
XXXL: { sizePx: 64, sizeLabel: 16, strokeWidth: 5, trackWidth: 2 }
|
|
145
|
+
};
|
|
146
|
+
const legacyInheritedTypography = {
|
|
147
|
+
fontFamily: "inherit",
|
|
148
|
+
fontSize: "inherit",
|
|
149
|
+
fontWeight: "inherit",
|
|
150
|
+
fontStyle: "inherit",
|
|
151
|
+
lineHeight: "inherit",
|
|
152
|
+
color: "inherit",
|
|
153
|
+
whiteSpace: "inherit",
|
|
154
|
+
overflowWrap: "inherit",
|
|
155
|
+
margin: 0,
|
|
156
|
+
padding: 0
|
|
157
|
+
};
|
|
158
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/constants/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import type { CSSProperties } from 'react';\nimport { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\n// ============================================================================================================\n// DSCircularIndeterminateIndicator (v2)\n// ============================================================================================================\n\nexport const DSCircularIndeterminateIndicatorName = 'DSCircularindeterminateindicator';\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const CIRCULAR_INDETERMINATE_INDICATOR_SLOTS = {\n ROOT: 'root',\n SVG: 'svg',\n LABEL: 'label',\n CIRCLE: 'circle',\n PATH: 'path',\n RECT: 'rect',\n} as const;\n\n// we are naming this with the ${component_name}_data_testid convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const CIRCULAR_INDETERMINATE_INDICATOR_DATA_TESTID = {\n ...slotObjectToDataTestIds(DSCircularIndeterminateIndicatorName, CIRCULAR_INDETERMINATE_INDICATOR_SLOTS),\n // legacy value \u2014 the root has always rendered this data-testid, breaking change if removed\n ROOT: 'ds-circular-indeterminate-indicator-root',\n} as const;\n\n// pre-convention public names, kept so existing imports keep working.\n// DSCircularIndeterminateIndicatorDataTestIds.ROOT keeps its original value ('ds-circularindeterminateindicator-root'),\n// which never matched the rendered root \u2014 use CIRCULAR_INDETERMINATE_INDICATOR_DATA_TESTID.ROOT to query the DOM.\nexport const DSCircularIndeterminateIndicatorSlots = CIRCULAR_INDETERMINATE_INDICATOR_SLOTS;\nexport const DSCircularIndeterminateIndicatorDataTestIds = slotObjectToDataTestIds(\n DSCircularIndeterminateIndicatorName,\n CIRCULAR_INDETERMINATE_INDICATOR_SLOTS,\n);\n\nexport const sizeToPx = {\n xs: 16,\n s: 24,\n m: 32,\n l: 48,\n xl: 56,\n xxl: 64,\n};\n\nexport const sizeToWeight = {\n xs: '3px',\n s: '3px',\n m: '3px',\n l: '4px',\n xl: '5px',\n xxl: '6px',\n};\n\nexport const colorToHex = {\n light: '#EBF6FF',\n dark: '#1394E5',\n};\n\nexport const sizeToTextSize = {\n xs: '12px',\n s: '12px',\n m: '12px',\n l: '13px',\n xl: '14px',\n xxl: '16px',\n};\n\n// ============================================================================================================\n// DSCircularProgressIndicator (legacy, deprecated in favour of DSCircularIndeterminateIndicator)\n// ============================================================================================================\n\nexport const DSCircularProgressIndicatorName = 'CircularProgressIndicator';\n\n// The legacy component predates the slot system and is deprecated, so it renders no slots: these are the\n// data-testid values it has always hardcoded \u2014 breaking change if any of them is removed or renamed.\nexport const CIRCULAR_PROGRESS_INDICATOR_DATA_TESTID = {\n INDICATOR: 'circular-indicator',\n LABEL: 'circular-indicator-label',\n BLUE_ARC: 'circular-indicator-blue-arc',\n} as const;\n\n// The legacy tooltip `id`. DSTooltipV3 appends it to its own trigger data-testid\n// (`ds-tooltip-v3-trigger-wrapper_circular-indicator-title`) \u2014 breaking change if renamed.\nexport const CIRCULAR_PROGRESS_INDICATOR_TOOLTIP_ID = 'circular-indicator-title';\n\ninterface LegacyGeometry {\n sizePx?: number;\n sizeLabel?: number;\n strokeWidth: number;\n trackWidth?: number;\n markerHeight: string;\n markerRefY: string;\n grayArcStrokeDasharray: string;\n grayArcStrokeDashoffset: string;\n}\n\n// Geometry of the legacy indicator per size (matched case-insensitively), applied over the base values\nexport const legacyBaseGeometry: LegacyGeometry = {\n // the arcs derive their widths from it: NaN renders the same `NaNpx` the untyped `undefined - 0.5` used to\n strokeWidth: NaN,\n markerHeight: '0.7',\n markerRefY: '4.8',\n grayArcStrokeDasharray: '45 170',\n grayArcStrokeDashoffset: '127.5',\n};\n\nexport const legacyGeometryBySize: Record<string, Partial<LegacyGeometry>> = {\n XS: {\n sizePx: 8,\n sizeLabel: 12,\n strokeWidth: 10,\n trackWidth: 3,\n markerHeight: '1',\n grayArcStrokeDasharray: '46 174',\n grayArcStrokeDashoffset: '133',\n },\n S: {\n sizePx: 16,\n sizeLabel: 12,\n strokeWidth: 8,\n trackWidth: 3,\n markerHeight: '1',\n grayArcStrokeDasharray: '46 174',\n grayArcStrokeDashoffset: '133',\n },\n M: {\n sizePx: 24,\n sizeLabel: 12,\n strokeWidth: 7,\n trackWidth: 3,\n markerHeight: '1',\n markerRefY: '5.5',\n grayArcStrokeDasharray: '46 174',\n grayArcStrokeDashoffset: '133',\n },\n L: { sizePx: 32, sizeLabel: 13, strokeWidth: 6, trackWidth: 3, markerRefY: '5' },\n XL: { sizePx: 48, sizeLabel: 14, strokeWidth: 5, trackWidth: 1 },\n XXL: { sizePx: 56, sizeLabel: 16, strokeWidth: 4, trackWidth: 1 },\n XXXL: { sizePx: 64, sizeLabel: 16, strokeWidth: 5, trackWidth: 2 },\n};\n\n// Typography (PUI-18946): the label text renders through DSTypography, nested inside the original `<p>` so its\n// data-testid, class and inline font size stay where they were. The DSTypography span inherits everything from the\n// `<p>` so nothing renders differently: inline, because this deprecated component has no styled slots to carry a rule.\n// Longhands, one per property DSTypography's b2 variant sets (the `font` shorthand would also work in browsers).\nexport const legacyInheritedTypography: CSSProperties = {\n fontFamily: 'inherit',\n fontSize: 'inherit',\n fontWeight: 'inherit',\n fontStyle: 'inherit',\n lineHeight: 'inherit',\n color: 'inherit',\n whiteSpace: 'inherit',\n overflowWrap: 'inherit',\n margin: 0,\n padding: 0,\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,uBAAwC;AAMjC,MAAM,uCAAuC;AAG7C,MAAM,yCAAyC;AAAA,EACpD,MAAM;AAAA,EACN,KAAK;AAAA,EACL,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,MAAM;AACR;AAGO,MAAM,+CAA+C;AAAA,EAC1D,OAAG,0CAAwB,sCAAsC,sCAAsC;AAAA;AAAA,EAEvG,MAAM;AACR;AAKO,MAAM,wCAAwC;AAC9C,MAAM,kDAA8C;AAAA,EACzD;AAAA,EACA;AACF;AAEO,MAAM,WAAW;AAAA,EACtB,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,KAAK;AACP;AAEO,MAAM,eAAe;AAAA,EAC1B,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,KAAK;AACP;AAEO,MAAM,aAAa;AAAA,EACxB,OAAO;AAAA,EACP,MAAM;AACR;AAEO,M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Y;AAAA,EACZ,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,SAAS;AACX;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -28,19 +28,22 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var index_exports = {};
|
|
30
30
|
__export(index_exports, {
|
|
31
|
+
CIRCULAR_INDETERMINATE_INDICATOR_DATA_TESTID: () => import_constants.CIRCULAR_INDETERMINATE_INDICATOR_DATA_TESTID,
|
|
32
|
+
CIRCULAR_INDETERMINATE_INDICATOR_SLOTS: () => import_constants.CIRCULAR_INDETERMINATE_INDICATOR_SLOTS,
|
|
31
33
|
CircularProgressIndicatorWithSchema: () => import_DSCircularProgressIndicator2.CircularProgressIndicatorWithSchema,
|
|
32
34
|
DSCircularIndeterminateIndicator: () => import_v2.DSCircularIndeterminateIndicator,
|
|
33
|
-
DSCircularIndeterminateIndicatorDataTestIds: () =>
|
|
34
|
-
DSCircularIndeterminateIndicatorName: () =>
|
|
35
|
-
DSCircularIndeterminateIndicatorSlots: () =>
|
|
35
|
+
DSCircularIndeterminateIndicatorDataTestIds: () => import_constants.DSCircularIndeterminateIndicatorDataTestIds,
|
|
36
|
+
DSCircularIndeterminateIndicatorName: () => import_constants.DSCircularIndeterminateIndicatorName,
|
|
37
|
+
DSCircularIndeterminateIndicatorSlots: () => import_constants.DSCircularIndeterminateIndicatorSlots,
|
|
36
38
|
DSCircularIndeterminateIndicatorWithSchema: () => import_v2.DSCircularIndeterminateIndicatorWithSchema,
|
|
37
|
-
DSCircularProgressIndicator: () =>
|
|
39
|
+
DSCircularProgressIndicator: () => import_DSCircularProgressIndicator2.DSCircularProgressIndicator,
|
|
38
40
|
default: () => index_default
|
|
39
41
|
});
|
|
40
42
|
module.exports = __toCommonJS(index_exports);
|
|
41
43
|
var React = __toESM(require("react"));
|
|
42
|
-
var import_DSCircularProgressIndicator =
|
|
44
|
+
var import_DSCircularProgressIndicator = require("./DSCircularProgressIndicator.js");
|
|
43
45
|
var import_DSCircularProgressIndicator2 = require("./DSCircularProgressIndicator.js");
|
|
44
46
|
var import_v2 = require("./v2/index.js");
|
|
45
|
-
var
|
|
47
|
+
var import_constants = require("./constants/index.js");
|
|
48
|
+
var index_default = import_DSCircularProgressIndicator.DSCircularProgressIndicator;
|
|
46
49
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA
|
|
6
|
-
"names": ["
|
|
4
|
+
"sourcesContent": ["import { DSCircularProgressIndicator } from './DSCircularProgressIndicator.js';\n\nexport { DSCircularProgressIndicator, CircularProgressIndicatorWithSchema } from './DSCircularProgressIndicator.js';\nexport { type DSCircularProgressIndicatorT } from './react-desc-prop-types.js';\nexport {\n DSCircularIndeterminateIndicator,\n DSCircularIndeterminateIndicatorWithSchema,\n type DSCircularIndeterminateIndicatorT,\n} from './v2/index.js';\nexport {\n DSCircularIndeterminateIndicatorName,\n CIRCULAR_INDETERMINATE_INDICATOR_SLOTS,\n CIRCULAR_INDETERMINATE_INDICATOR_DATA_TESTID,\n DSCircularIndeterminateIndicatorSlots,\n DSCircularIndeterminateIndicatorDataTestIds,\n} from './constants/index.js';\n\n// leftover default export, kept to avoid a breaking change\nexport default DSCircularProgressIndicator;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,yCAA4C;AAE5C,IAAAA,sCAAiF;AAEjF,gBAIO;AACP,uBAMO;AAGP,IAAO,gBAAQ;",
|
|
6
|
+
"names": ["import_DSCircularProgressIndicator"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
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.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var react_desc_prop_types_exports = {};
|
|
30
|
+
__export(react_desc_prop_types_exports, {
|
|
31
|
+
DSCircularProgressIndicatorPropTypes: () => DSCircularProgressIndicatorPropTypes,
|
|
32
|
+
DSCircularProgressIndicatorPropTypesSchema: () => DSCircularProgressIndicatorPropTypesSchema,
|
|
33
|
+
defaultProps: () => defaultProps
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(react_desc_prop_types_exports);
|
|
36
|
+
var React = __toESM(require("react"));
|
|
37
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
38
|
+
const defaultProps = {
|
|
39
|
+
size: "m",
|
|
40
|
+
showLabel: false,
|
|
41
|
+
showTooltip: false,
|
|
42
|
+
waiting: false,
|
|
43
|
+
loading: false
|
|
44
|
+
};
|
|
45
|
+
const DSCircularProgressIndicatorPropTypes = {
|
|
46
|
+
size: import_ds_props_helpers.PropTypes.oneOf(["xs", "s", "m", "l", "xl", "xxl", "xxxl"]).description("Defines the size of the indicator").defaultValue("m"),
|
|
47
|
+
showLabel: import_ds_props_helpers.PropTypes.bool.description("Whether the indicator displays its state on a label or not").defaultValue(false),
|
|
48
|
+
showTooltip: import_ds_props_helpers.PropTypes.bool.description("Whether the indicator displays its state on a tooltip or not").defaultValue(false),
|
|
49
|
+
waiting: import_ds_props_helpers.PropTypes.bool.description("Defines the state of the indicator as Waiting and only displays the gray track").defaultValue(false),
|
|
50
|
+
loading: import_ds_props_helpers.PropTypes.bool.description("Defines the state of the indicator as Loading and displays a blue spinner animation").defaultValue(false)
|
|
51
|
+
};
|
|
52
|
+
const DSCircularProgressIndicatorPropTypesSchema = DSCircularProgressIndicatorPropTypes;
|
|
53
|
+
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/react-desc-prop-types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import type { DSPropTypesSchema, ValidationMap } from '@elliemae/ds-props-helpers';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\n\n// Types of the legacy DSCircularProgressIndicator, deprecated in favour of DSCircularIndeterminateIndicator.\n// The component predates global attributes, xstyled props and slots, and only ever read these five props.\nexport declare namespace DSCircularProgressIndicatorT {\n type TShirtSizes = 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl';\n\n export interface DefaultProps {\n // the size is matched case-insensitively, so the uppercase spellings have always worked too\n size: TShirtSizes | Uppercase<TShirtSizes>;\n showLabel: boolean;\n showTooltip: boolean;\n waiting: boolean;\n loading: boolean;\n }\n\n export interface OptionalProps {}\n\n export interface RequiredProps {}\n\n export interface Props extends Partial<DefaultProps>, OptionalProps, RequiredProps {}\n\n export interface InternalProps extends DefaultProps, OptionalProps, RequiredProps {}\n}\n\nexport const defaultProps: DSCircularProgressIndicatorT.DefaultProps = {\n size: 'm',\n showLabel: false,\n showTooltip: false,\n waiting: false,\n loading: false,\n};\n\nexport const DSCircularProgressIndicatorPropTypes: DSPropTypesSchema<DSCircularProgressIndicatorT.Props> = {\n size: PropTypes.oneOf(['xs', 's', 'm', 'l', 'xl', 'xxl', 'xxxl'])\n .description('Defines the size of the indicator')\n .defaultValue('m'),\n showLabel: PropTypes.bool\n .description('Whether the indicator displays its state on a label or not')\n .defaultValue(false),\n showTooltip: PropTypes.bool\n .description('Whether the indicator displays its state on a tooltip or not')\n .defaultValue(false),\n waiting: PropTypes.bool\n .description('Defines the state of the indicator as Waiting and only displays the gray track')\n .defaultValue(false),\n loading: PropTypes.bool\n .description('Defines the state of the indicator as Loading and displays a blue spinner animation')\n .defaultValue(false),\n};\n\nexport const DSCircularProgressIndicatorPropTypesSchema =\n DSCircularProgressIndicatorPropTypes as unknown as ValidationMap<DSCircularProgressIndicatorT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAA0B;AAyBnB,MAAM,eAA0D;AAAA,EACrE,MAAM;AAAA,EACN,WAAW;AAAA,EACX,aAAa;AAAA,EACb,SAAS;AAAA,EACT,SAAS;AACX;AAEO,MAAM,uCAA8F;AAAA,EACzG,MAAM,kCAAU,MAAM,CAAC,MAAM,KAAK,KAAK,KAAK,MAAM,OAAO,MAAM,CAAC,EAC7D,YAAY,mCAAmC,EAC/C,aAAa,GAAG;AAAA,EACnB,WAAW,kCAAU,KAClB,YAAY,4DAA4D,EACxE,aAAa,KAAK;AAAA,EACrB,aAAa,kCAAU,KACpB,YAAY,8DAA8D,EAC1E,aAAa,KAAK;AAAA,EACrB,SAAS,kCAAU,KAChB,YAAY,gFAAgF,EAC5F,aAAa,KAAK;AAAA,EACrB,SAAS,kCAAU,KAChB,YAAY,qFAAqF,EACjG,aAAa,KAAK;AACvB;AAEO,MAAM,6CACX;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|