@elliemae/ds-progress-indicator 3.80.0-next.3 → 3.80.0-next.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/DSProgressIndicator.js +73 -37
- package/dist/cjs/DSProgressIndicator.js.map +2 -2
- package/dist/cjs/ProgressBar.js +62 -10
- package/dist/cjs/ProgressBar.js.map +2 -2
- package/dist/cjs/ProgressCounter.js +18 -8
- package/dist/cjs/ProgressCounter.js.map +2 -2
- package/dist/cjs/config/useProgressIndicator.js +67 -0
- package/dist/cjs/config/useProgressIndicator.js.map +7 -0
- package/dist/cjs/{classedComponents.js → config/useValidateProps.js} +10 -20
- package/dist/cjs/config/useValidateProps.js.map +7 -0
- package/dist/cjs/constants/index.js +50 -0
- package/dist/cjs/constants/index.js.map +7 -0
- package/dist/cjs/index.js +13 -2
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +52 -0
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/styled.js +75 -2
- package/dist/cjs/styled.js.map +2 -2
- package/dist/cjs/typescript-testing/slot-props.js +40 -0
- package/dist/cjs/typescript-testing/slot-props.js.map +7 -0
- package/dist/cjs/typescript-testing/typescript-progress-indicator-valid.js +4 -2
- package/dist/cjs/typescript-testing/typescript-progress-indicator-valid.js.map +2 -2
- package/dist/cjs/utils.js +14 -2
- package/dist/cjs/utils.js.map +2 -2
- package/dist/esm/DSProgressIndicator.js +75 -39
- package/dist/esm/DSProgressIndicator.js.map +2 -2
- package/dist/esm/ProgressBar.js +63 -11
- package/dist/esm/ProgressBar.js.map +2 -2
- package/dist/esm/ProgressCounter.js +19 -9
- package/dist/esm/ProgressCounter.js.map +2 -2
- package/dist/esm/config/useProgressIndicator.js +37 -0
- package/dist/esm/config/useProgressIndicator.js.map +7 -0
- package/dist/esm/config/useValidateProps.js +10 -0
- package/dist/esm/config/useValidateProps.js.map +7 -0
- package/dist/esm/constants/index.js +20 -0
- package/dist/esm/constants/index.js.map +7 -0
- package/dist/esm/index.js +13 -1
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js +48 -0
- package/dist/esm/react-desc-prop-types.js.map +3 -3
- package/dist/esm/styled.js +76 -3
- package/dist/esm/styled.js.map +2 -2
- package/dist/esm/typescript-testing/slot-props.js +17 -0
- package/dist/esm/typescript-testing/slot-props.js.map +7 -0
- package/dist/esm/typescript-testing/typescript-progress-indicator-valid.js +4 -2
- package/dist/esm/typescript-testing/typescript-progress-indicator-valid.js.map +2 -2
- package/dist/esm/utils.js +14 -2
- package/dist/esm/utils.js.map +2 -2
- package/dist/types/DSProgressIndicator.d.ts +14 -3
- package/dist/types/ProgressBar.d.ts +13 -3
- package/dist/types/ProgressCounter.d.ts +3 -1
- package/dist/types/config/useProgressIndicator.d.ts +8 -0
- package/dist/types/config/useValidateProps.d.ts +3 -0
- package/dist/types/constants/index.d.ts +15 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/react-desc-prop-types.d.ts +35 -3
- package/dist/types/styled.d.ts +24 -1
- package/dist/types/utils.d.ts +10 -0
- package/package.json +8 -7
- package/dist/cjs/classedComponents.js.map +0 -7
- package/dist/esm/classedComponents.js +0 -20
- package/dist/esm/classedComponents.js.map +0 -7
- package/dist/types/classedComponents.d.ts +0 -15
|
@@ -5,6 +5,10 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
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
|
+
};
|
|
8
12
|
var __copyProps = (to, from, except, desc) => {
|
|
9
13
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
14
|
for (let key of __getOwnPropNames(from))
|
|
@@ -23,6 +27,54 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
23
27
|
));
|
|
24
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
29
|
var react_desc_prop_types_exports = {};
|
|
30
|
+
__export(react_desc_prop_types_exports, {
|
|
31
|
+
DSProgressIndicatorPropTypes: () => DSProgressIndicatorPropTypes,
|
|
32
|
+
DSProgressIndicatorPropTypesSchema: () => DSProgressIndicatorPropTypesSchema,
|
|
33
|
+
defaultProps: () => defaultProps
|
|
34
|
+
});
|
|
26
35
|
module.exports = __toCommonJS(react_desc_prop_types_exports);
|
|
27
36
|
var React = __toESM(require("react"));
|
|
37
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
38
|
+
var import_constants = require("./constants/index.js");
|
|
39
|
+
const defaultProps = {
|
|
40
|
+
containerProps: {},
|
|
41
|
+
title: "",
|
|
42
|
+
now: 0,
|
|
43
|
+
min: 0,
|
|
44
|
+
max: 0,
|
|
45
|
+
disabled: false,
|
|
46
|
+
segments: [],
|
|
47
|
+
style: {}
|
|
48
|
+
};
|
|
49
|
+
const variants = ["default", "success", "warning", "info", "error"];
|
|
50
|
+
const DSProgressIndicatorPropTypes = {
|
|
51
|
+
...(0, import_ds_props_helpers.getPropsPerSlotPropTypes)(import_constants.DSProgressIndicatorName, import_constants.PROGRESS_INDICATOR_SLOTS),
|
|
52
|
+
...import_ds_props_helpers.globalAttributesPropTypes,
|
|
53
|
+
containerProps: import_ds_props_helpers.PropTypes.object.description("Set of Properties attached to the main container"),
|
|
54
|
+
innerRef: import_ds_props_helpers.PropTypes.object.description("ref to the components container"),
|
|
55
|
+
title: import_ds_props_helpers.PropTypes.string.description("components title"),
|
|
56
|
+
variant: import_ds_props_helpers.PropTypes.oneOf(variants).description(
|
|
57
|
+
"Progress intent variation of the fill in single-bar mode. Ignored when segments are given; each segment sets its own variant."
|
|
58
|
+
),
|
|
59
|
+
now: import_ds_props_helpers.PropTypes.number.description("Total current value"),
|
|
60
|
+
min: import_ds_props_helpers.PropTypes.number.description("min value"),
|
|
61
|
+
max: import_ds_props_helpers.PropTypes.number.description(
|
|
62
|
+
'max value. Functionally required for a determinate progress: it must be a finite number greater than "min". Without it the progressbar renders as indeterminate and a dev-only warning is logged.'
|
|
63
|
+
),
|
|
64
|
+
disabled: import_ds_props_helpers.PropTypes.bool.description("Whether the progress indicator disabled or not").defaultValue(false),
|
|
65
|
+
counterRenderer: import_ds_props_helpers.PropTypes.func.description("Render a custom counter"),
|
|
66
|
+
segments: import_ds_props_helpers.PropTypes.arrayOf(
|
|
67
|
+
import_ds_props_helpers.PropTypes.shape({
|
|
68
|
+
min: import_ds_props_helpers.PropTypes.number,
|
|
69
|
+
max: import_ds_props_helpers.PropTypes.number,
|
|
70
|
+
now: import_ds_props_helpers.PropTypes.number,
|
|
71
|
+
variant: import_ds_props_helpers.PropTypes.oneOf(variants),
|
|
72
|
+
label: import_ds_props_helpers.PropTypes.string
|
|
73
|
+
})
|
|
74
|
+
).description(
|
|
75
|
+
'An array of multiple progress objects. Give each segment a "label" when its "variant" colour carries meaning \u2014 without one every segment reports the same accessible name and can only be told apart by colour.'
|
|
76
|
+
),
|
|
77
|
+
style: import_ds_props_helpers.PropTypes.object.description("css inline style")
|
|
78
|
+
};
|
|
79
|
+
const DSProgressIndicatorPropTypesSchema = DSProgressIndicatorPropTypes;
|
|
28
80
|
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/react-desc-prop-types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import type { DSPropTypesSchema, GlobalAttributesT, ValidationMap } from '@elliemae/ds-props-helpers';\nimport { PropTypes, getPropsPerSlotPropTypes, globalAttributesPropTypes } from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSProgressIndicatorName, PROGRESS_INDICATOR_SLOTS } from './constants/index.js';\n\nexport declare namespace DSProgressIndicatorT {\n export type PercentageT = {\n min: number;\n max: number;\n now: number;\n };\n\n export type DefaultRendererT = ({ now, max, min }: DSProgressIndicatorT.PercentageT) => string;\n\n export type VariantT = 'default' | 'success' | 'warning' | 'info' | 'error';\n\n export type SegmentsT = {\n length?: number;\n min: number;\n max: number;\n now: number;\n variant: VariantT;\n /**\n * Accessible name for this specific segment. Without it every segment inherits the same name from the\n * indicator title, so segments are told apart only by their variant colour. See PUI-18942.\n */\n label?: string;\n };\n\n export type SlotFunctionArguments = {\n dsProgressindicatorRoot: () => object;\n dsProgressindicatorTitle: () => object;\n dsProgressindicatorCounter: () => object;\n dsProgressindicatorProgressBar: () => object;\n dsProgressindicatorProgress: () => object;\n };\n\n export interface DefaultProps {\n title: string;\n innerRef: React.MutableRefObject<unknown>;\n counterRenderer: DefaultRendererT;\n min: number;\n disabled: boolean;\n segments: SegmentsT[] | readonly SegmentsT[];\n style: object;\n }\n\n export interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSProgressIndicatorName,\n typeof PROGRESS_INDICATOR_SLOTS\n > {\n // deliberately wide: this has accepted arbitrary keys since PUI-12598 and consumers pass data-* through\n // it. Narrowing it to React.HTMLAttributes rejects data-* in object position \u2014 a breaking type change.\n containerProps?: { [key: string]: string };\n now?: number;\n max?: number;\n /**\n * Colour intent of the fill in single-bar mode. Ignored when `segments` are given \u2014 each segment carries its\n * own `variant`. Colour alone does not convey the intent to every user; say it in `title` or the counter too.\n */\n variant?: VariantT;\n }\n\n export interface Props\n extends\n Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof OptionalProps> {}\n\n export interface InternalProps\n extends\n DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof OptionalProps> {}\n}\n\nexport const defaultProps = {\n containerProps: {},\n title: '',\n now: 0,\n min: 0,\n max: 0,\n disabled: false,\n segments: [],\n style: {},\n};\n\nconst variants: DSProgressIndicatorT.VariantT[] = ['default', 'success', 'warning', 'info', 'error'];\n\nexport const DSProgressIndicatorPropTypes: DSPropTypesSchema<DSProgressIndicatorT.Props> = {\n ...getPropsPerSlotPropTypes(DSProgressIndicatorName, PROGRESS_INDICATOR_SLOTS),\n ...globalAttributesPropTypes,\n\n containerProps: PropTypes.object.description('Set of Properties attached to the main container'),\n innerRef: PropTypes.object.description('ref to the components container'),\n title: PropTypes.string.description('components title'),\n variant: PropTypes.oneOf(variants).description(\n 'Progress intent variation of the fill in single-bar mode. Ignored when segments are given; each segment sets its own variant.',\n ),\n now: PropTypes.number.description('Total current value'),\n min: PropTypes.number.description('min value'),\n max: PropTypes.number.description(\n 'max value. Functionally required for a determinate progress: it must be a finite number greater than \"min\". Without it the progressbar renders as indeterminate and a dev-only warning is logged.',\n ),\n disabled: PropTypes.bool.description('Whether the progress indicator disabled or not').defaultValue(false),\n counterRenderer: PropTypes.func.description('Render a custom counter'),\n segments: PropTypes.arrayOf(\n PropTypes.shape({\n min: PropTypes.number,\n max: PropTypes.number,\n now: PropTypes.number,\n variant: PropTypes.oneOf(variants),\n label: PropTypes.string,\n }),\n ).description(\n 'An array of multiple progress objects. Give each segment a \"label\" when its \"variant\" colour carries meaning \u2014 without one every segment reports the same accessible name and can only be told apart by colour.',\n ),\n style: PropTypes.object.description('css inline style'),\n};\n\nexport const DSProgressIndicatorPropTypesSchema =\n DSProgressIndicatorPropTypes as unknown as ValidationMap<DSProgressIndicatorT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAA+E;AAE/E,uBAAkE;AAyE3D,MAAM,eAAe;AAAA,EAC1B,gBAAgB,CAAC;AAAA,EACjB,OAAO;AAAA,EACP,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,UAAU;AAAA,EACV,UAAU,CAAC;AAAA,EACX,OAAO,CAAC;AACV;AAEA,MAAM,WAA4C,CAAC,WAAW,WAAW,WAAW,QAAQ,OAAO;AAE5F,MAAM,+BAA8E;AAAA,EACzF,OAAG,kDAAyB,0CAAyB,yCAAwB;AAAA,EAC7E,GAAG;AAAA,EAEH,gBAAgB,kCAAU,OAAO,YAAY,kDAAkD;AAAA,EAC/F,UAAU,kCAAU,OAAO,YAAY,iCAAiC;AAAA,EACxE,OAAO,kCAAU,OAAO,YAAY,kBAAkB;AAAA,EACtD,SAAS,kCAAU,MAAM,QAAQ,EAAE;AAAA,IACjC;AAAA,EACF;AAAA,EACA,KAAK,kCAAU,OAAO,YAAY,qBAAqB;AAAA,EACvD,KAAK,kCAAU,OAAO,YAAY,WAAW;AAAA,EAC7C,KAAK,kCAAU,OAAO;AAAA,IACpB;AAAA,EACF;AAAA,EACA,UAAU,kCAAU,KAAK,YAAY,gDAAgD,EAAE,aAAa,KAAK;AAAA,EACzG,iBAAiB,kCAAU,KAAK,YAAY,yBAAyB;AAAA,EACrE,UAAU,kCAAU;AAAA,IAClB,kCAAU,MAAM;AAAA,MACd,KAAK,kCAAU;AAAA,MACf,KAAK,kCAAU;AAAA,MACf,KAAK,kCAAU;AAAA,MACf,SAAS,kCAAU,MAAM,QAAQ;AAAA,MACjC,OAAO,kCAAU;AAAA,IACnB,CAAC;AAAA,EACH,EAAE;AAAA,IACA;AAAA,EACF;AAAA,EACA,OAAO,kCAAU,OAAO,YAAY,kBAAkB;AACxD;AAEO,MAAM,qCACX;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/styled.js
CHANGED
|
@@ -28,12 +28,85 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var styled_exports = {};
|
|
30
30
|
__export(styled_exports, {
|
|
31
|
-
|
|
31
|
+
StyledProgress: () => StyledProgress,
|
|
32
|
+
StyledProgressBar: () => StyledProgressBar,
|
|
33
|
+
StyledProgressIndicatorCounter: () => StyledProgressIndicatorCounter,
|
|
34
|
+
StyledProgressIndicatorRoot: () => StyledProgressIndicatorRoot,
|
|
35
|
+
Title: () => Title,
|
|
36
|
+
legacyBarClassName: () => legacyBarClassName,
|
|
37
|
+
legacyCounterClassName: () => legacyCounterClassName,
|
|
38
|
+
legacyProgressClassName: () => legacyProgressClassName,
|
|
39
|
+
legacyRootClassName: () => legacyRootClassName
|
|
32
40
|
});
|
|
33
41
|
module.exports = __toCommonJS(styled_exports);
|
|
34
42
|
var React = __toESM(require("react"));
|
|
35
43
|
var import_ds_system = require("@elliemae/ds-system");
|
|
36
|
-
|
|
44
|
+
var import_constants = require("./constants/index.js");
|
|
45
|
+
const LEGACY_ROOT_BLOCK = "em-ds-determinate-progress-indicator";
|
|
46
|
+
const LEGACY_BAR_BLOCK = "em-ds-progress-bar";
|
|
47
|
+
const joinClasses = (...classes) => [...new Set(classes.filter(Boolean))].join(" ");
|
|
48
|
+
const legacyRootClassName = (disabled, ...consumerClasses) => joinClasses(
|
|
49
|
+
LEGACY_ROOT_BLOCK,
|
|
50
|
+
`${LEGACY_ROOT_BLOCK}--default`,
|
|
51
|
+
disabled && `${LEGACY_ROOT_BLOCK}--disabled`,
|
|
52
|
+
...consumerClasses
|
|
53
|
+
);
|
|
54
|
+
const legacyCounterClassName = (...consumerClasses) => joinClasses(`${LEGACY_ROOT_BLOCK}__counter`, ...consumerClasses);
|
|
55
|
+
const legacyBarClassName = (...consumerClasses) => joinClasses(LEGACY_BAR_BLOCK, ...consumerClasses);
|
|
56
|
+
const legacyProgressClassName = (variant, ...consumerClasses) => joinClasses(
|
|
57
|
+
`${LEGACY_BAR_BLOCK}__progress`,
|
|
58
|
+
`${LEGACY_BAR_BLOCK}__progress--default`,
|
|
59
|
+
variant && `${LEGACY_BAR_BLOCK}__progress--${variant}`,
|
|
60
|
+
...consumerClasses
|
|
61
|
+
);
|
|
62
|
+
const legacyProofStyleOverrides = (slot) => ({ theme }) => {
|
|
63
|
+
const overrides = theme?.components?.[import_constants.DSProgressIndicatorName]?.styleOverrides?.[slot];
|
|
64
|
+
return overrides ? import_ds_system.css`
|
|
65
|
+
&&& {
|
|
66
|
+
${overrides}
|
|
67
|
+
}
|
|
68
|
+
` : "";
|
|
69
|
+
};
|
|
70
|
+
const inheritTypographyFromSlot = import_ds_system.css`
|
|
71
|
+
&& > * {
|
|
72
|
+
font: inherit;
|
|
73
|
+
line-height: inherit;
|
|
74
|
+
color: inherit;
|
|
75
|
+
white-space: inherit;
|
|
76
|
+
overflow-wrap: inherit;
|
|
77
|
+
margin: 0;
|
|
78
|
+
padding: 0;
|
|
79
|
+
}
|
|
80
|
+
`;
|
|
81
|
+
const StyledProgressIndicatorRoot = (0, import_ds_system.styled)("div", {
|
|
82
|
+
name: import_constants.DSProgressIndicatorName,
|
|
83
|
+
slot: import_constants.PROGRESS_INDICATOR_SLOTS.ROOT
|
|
84
|
+
})``;
|
|
85
|
+
const Title = (0, import_ds_system.styled)("span", {
|
|
86
|
+
name: import_constants.DSProgressIndicatorName,
|
|
87
|
+
slot: import_constants.PROGRESS_INDICATOR_SLOTS.TITLE
|
|
88
|
+
})`
|
|
37
89
|
grid-area: title;
|
|
90
|
+
${inheritTypographyFromSlot}
|
|
91
|
+
${legacyProofStyleOverrides(import_constants.PROGRESS_INDICATOR_SLOTS.TITLE)}
|
|
92
|
+
`;
|
|
93
|
+
const StyledProgressIndicatorCounter = (0, import_ds_system.styled)("span", {
|
|
94
|
+
name: import_constants.DSProgressIndicatorName,
|
|
95
|
+
slot: import_constants.PROGRESS_INDICATOR_SLOTS.COUNTER
|
|
96
|
+
})`
|
|
97
|
+
${inheritTypographyFromSlot}
|
|
98
|
+
${legacyProofStyleOverrides(import_constants.PROGRESS_INDICATOR_SLOTS.COUNTER)}
|
|
99
|
+
`;
|
|
100
|
+
const StyledProgressBar = (0, import_ds_system.styled)("div", {
|
|
101
|
+
name: import_constants.DSProgressIndicatorName,
|
|
102
|
+
slot: import_constants.PROGRESS_INDICATOR_SLOTS.PROGRESS_BAR
|
|
103
|
+
})`
|
|
104
|
+
${legacyProofStyleOverrides(import_constants.PROGRESS_INDICATOR_SLOTS.PROGRESS_BAR)}
|
|
105
|
+
`;
|
|
106
|
+
const StyledProgress = (0, import_ds_system.styled)("div", {
|
|
107
|
+
name: import_constants.DSProgressIndicatorName,
|
|
108
|
+
slot: import_constants.PROGRESS_INDICATOR_SLOTS.PROGRESS
|
|
109
|
+
})`
|
|
110
|
+
${legacyProofStyleOverrides(import_constants.PROGRESS_INDICATOR_SLOTS.PROGRESS)}
|
|
38
111
|
`;
|
|
39
112
|
//# sourceMappingURL=styled.js.map
|
package/dist/cjs/styled.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/styled.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { styled } from '@elliemae/ds-system';\n\nexport const Title = styled.
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,
|
|
4
|
+
"sourcesContent": ["import { css, styled } from '@elliemae/ds-system';\nimport type { CSSObject, DefaultTheme } from 'styled-components';\nimport { DSProgressIndicatorName, PROGRESS_INDICATOR_SLOTS } from './constants/index.js';\n\n// ============================================================================================================\n// Legacy BEM class contract\n// ============================================================================================================\n// This component carries no CSS of its own: its entire visual layer is the\n// `em-ds-determinate-progress-indicator` / `em-ds-progress-bar` SCSS compiled into `@elliemae/ds-basic`'s\n// dimsum.css, which is frozen. Consumers may also hold stylesheet overrides and QA selectors against these\n// exact names, so the class strings are a compatibility contract, not an implementation detail.\n//\n// They used to be produced by `aggregatedClasses` from the sunsetted `@elliemae/ds-classnames`. They are\n// reproduced verbatim here so that dependency could be dropped and the slot system put in its place without\n// a visual or breaking change. `DSProgressIndicator.api.test.js` locks the resulting class set per state.\n//\n// `--default` is reproduced deliberately and is not a typo: the legacy layout modifier pipeline emitted a\n// `--default` modifier unconditionally on every element that received `classProps`, which is why the root and\n// the progress fill carry it while the counter and the bar (which received none) do not.\n//\n// These are applied as an explicit `className` prop rather than through `.attrs()`, because `.attrs()` on\n// ds-system's `styled` is silently a no-op \u2014 it calls styled-components' immutable `.attrs()` and discards\n// the new resolver it returns (`styledFunction.tsx:173`). Do not \"simplify\" this back to `.attrs()`.\nconst LEGACY_ROOT_BLOCK = 'em-ds-determinate-progress-indicator';\nconst LEGACY_BAR_BLOCK = 'em-ds-progress-bar';\n\n// `aggregatedClasses` appended any consumer-supplied className after its own, so a className arriving through\n// containerProps adds to the contract rather than replacing it. That ordering is preserved.\nconst joinClasses = (...classes: (string | false | undefined)[]) =>\n [...new Set(classes.filter(Boolean) as string[])].join(' ');\n\nexport const legacyRootClassName = (disabled?: boolean, ...consumerClasses: (string | undefined)[]) =>\n joinClasses(\n LEGACY_ROOT_BLOCK,\n `${LEGACY_ROOT_BLOCK}--default`,\n disabled && `${LEGACY_ROOT_BLOCK}--disabled`,\n ...consumerClasses,\n );\n\nexport const legacyCounterClassName = (...consumerClasses: (string | undefined)[]) =>\n joinClasses(`${LEGACY_ROOT_BLOCK}__counter`, ...consumerClasses);\n\nexport const legacyBarClassName = (...consumerClasses: (string | undefined)[]) =>\n joinClasses(LEGACY_BAR_BLOCK, ...consumerClasses);\n\nexport const legacyProgressClassName = (variant?: string, ...consumerClasses: (string | undefined)[]) =>\n joinClasses(\n `${LEGACY_BAR_BLOCK}__progress`,\n `${LEGACY_BAR_BLOCK}__progress--default`,\n variant && `${LEGACY_BAR_BLOCK}__progress--${variant}`,\n ...consumerClasses,\n );\n\n// ============================================================================================================\n// styleOverrides vs the legacy cascade\n// ============================================================================================================\n// ds-system emits `theme.components.DSProgressindicator.styleOverrides[slot]` inside the slot's own generated\n// class \u2014 specificity 0-1-0. Four of the retained legacy rules are descendant selectors:\n//\n// .em-ds-determinate-progress-indicator .em-ds-progress-bar 0-2-0 (track)\n// .em-ds-determinate-progress-indicator .em-ds-progress-bar__progress 0-2-0 (fill)\n// .em-ds-determinate-progress-indicator .em-ds-progress-bar__progress:not(:first-child) 0-3-0\n// .em-ds-determinate-progress-indicator--disabled .em-ds-\u2026__title / __counter / __progress 0-2-0\n//\n// so any property they set (the track's background most visibly \u2014 found by QA while writing SlotsTest) beats\n// the consumer's override. Re-emitting the same override under `&&&` gives it 0-3-0: it ties the strongest\n// legacy rule and wins on source order, because styled-components injects after dimsum.css. The root slot is\n// left alone \u2014 its legacy rules are single-class and already lose to the override on that same source order.\n//\n// This is a consequence of deviation 1 (the legacy SCSS is frozen and still ships) and goes away with it.\ntype ThemeWithComponents = DefaultTheme & {\n components?: Record<string, { styleOverrides?: Record<string, CSSObject> }>;\n};\n\nconst legacyProofStyleOverrides =\n (slot: (typeof PROGRESS_INDICATOR_SLOTS)[keyof typeof PROGRESS_INDICATOR_SLOTS]) =>\n ({ theme }: { theme: ThemeWithComponents }) => {\n const overrides = theme?.components?.[DSProgressIndicatorName]?.styleOverrides?.[slot];\n return overrides\n ? css`\n &&& {\n ${overrides}\n }\n `\n : '';\n };\n\n// ============================================================================================================\n// Text slots carry a DSTypography child\n// ============================================================================================================\n// The title and counter text render through DSTypography (typography remediation, PUI-18942), nested inside the\n// slot element rather than being the slot element. Making DSTypography the slot itself would let the nested-slot\n// mechanism rewrite `data-dimsum-slot` to `dsTypographyRoot` and demote ours to `data-dimsum-parent-slot` \u2014\n// verified by probe \u2014 breaking a slot value that shipped in 3.80 and the E2E `getSlot()` lookups against it.\n//\n// DSTypography brings its own metrics (B4: 0.85rem / 1rem line-height, `white-space: pre-wrap`, font-family,\n// margin/padding). Today the counter takes its metrics from the frozen legacy SCSS and the title inherits the\n// body's, so those must win for the render to stay identical: the child inherits everything from its slot. That\n// keeps consumer `styleOverrides` on the slot flowing into the text too. `&& > *` is 0-2-0, so it beats\n// DSTypography's single class regardless of which rule styled-components happens to inject first.\n//\n// Deliberately neutral: whether the title should finally adopt the counter's micro-text metrics (the SCSS\n// always intended both to share them \u2014 deviation 4) is a UX decision, not a side effect of this change. When\n// it is taken, drop `font` / `line-height` from this block and let the variant apply.\nconst inheritTypographyFromSlot = css`\n && > * {\n font: inherit;\n line-height: inherit;\n color: inherit;\n white-space: inherit;\n overflow-wrap: inherit;\n margin: 0;\n padding: 0;\n }\n`;\n\n// ============================================================================================================\n// Slots\n// ============================================================================================================\n\nexport const StyledProgressIndicatorRoot = styled('div', {\n name: DSProgressIndicatorName,\n slot: PROGRESS_INDICATOR_SLOTS.ROOT,\n})``;\n\nexport const Title = styled('span', {\n name: DSProgressIndicatorName,\n slot: PROGRESS_INDICATOR_SLOTS.TITLE,\n})`\n grid-area: title;\n ${inheritTypographyFromSlot}\n ${legacyProofStyleOverrides(PROGRESS_INDICATOR_SLOTS.TITLE)}\n`;\n\nexport const StyledProgressIndicatorCounter = styled('span', {\n name: DSProgressIndicatorName,\n slot: PROGRESS_INDICATOR_SLOTS.COUNTER,\n})`\n ${inheritTypographyFromSlot}\n ${legacyProofStyleOverrides(PROGRESS_INDICATOR_SLOTS.COUNTER)}\n`;\n\nexport const StyledProgressBar = styled('div', {\n name: DSProgressIndicatorName,\n slot: PROGRESS_INDICATOR_SLOTS.PROGRESS_BAR,\n})`\n ${legacyProofStyleOverrides(PROGRESS_INDICATOR_SLOTS.PROGRESS_BAR)}\n`;\n\nexport const StyledProgress = styled('div', {\n name: DSProgressIndicatorName,\n slot: PROGRESS_INDICATOR_SLOTS.PROGRESS,\n})`\n ${legacyProofStyleOverrides(PROGRESS_INDICATOR_SLOTS.PROGRESS)}\n`;\n", "import * as React from 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yBAAyB;AAAA,IACzB,0BAA0B,0CAAyB,KAAK,CAAC;AAAA;AAGtD,MAAM,qCAAiC,yBAAO,QAAQ;AAAA,EAC3D,MAAM;AAAA,EACN,MAAM,0CAAyB;AACjC,CAAC;AAAA,IACG,yBAAyB;AAAA,IACzB,0BAA0B,0CAAyB,OAAO,CAAC;AAAA;AAGxD,MAAM,wBAAoB,yBAAO,OAAO;AAAA,EAC7C,MAAM;AAAA,EACN,MAAM,0CAAyB;AACjC,CAAC;AAAA,IACG,0BAA0B,0CAAyB,YAAY,CAAC;AAAA;AAG7D,MAAM,qBAAiB,yBAAO,OAAO;AAAA,EAC1C,MAAM;AAAA,EACN,MAAM,0CAAyB;AACjC,CAAC;AAAA,IACG,0BAA0B,0CAAyB,QAAQ,CAAC;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var React = __toESM(require("react"));
|
|
25
|
+
const SlotPropsAsObject = {
|
|
26
|
+
dsProgressindicatorRoot: { "aria-label": "just a typescript test" },
|
|
27
|
+
dsProgressindicatorTitle: { "aria-label": "just a typescript test" },
|
|
28
|
+
dsProgressindicatorCounter: { "aria-label": "just a typescript test" },
|
|
29
|
+
dsProgressindicatorProgressBar: { "aria-label": "just a typescript test" },
|
|
30
|
+
dsProgressindicatorProgress: { "aria-label": "just a typescript test" }
|
|
31
|
+
};
|
|
32
|
+
const SlotPropsAsFunctions = {
|
|
33
|
+
dsProgressindicatorRoot: () => ({ "aria-label": "just a typescript test" }),
|
|
34
|
+
dsProgressindicatorTitle: () => ({ "aria-label": "just a typescript test" }),
|
|
35
|
+
dsProgressindicatorCounter: () => ({ "aria-label": "just a typescript test" }),
|
|
36
|
+
dsProgressindicatorProgressBar: () => ({ "aria-label": "just a typescript test" }),
|
|
37
|
+
dsProgressindicatorProgress: () => ({ "aria-label": "just a typescript test" })
|
|
38
|
+
};
|
|
39
|
+
const EnsureAllSlotsExistInSlotFunctionArguments = SlotPropsAsFunctions;
|
|
40
|
+
//# sourceMappingURL=slot-props.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/slot-props.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { DSProgressIndicatorName, PROGRESS_INDICATOR_SLOTS } from '../constants/index.js';\nimport type { DSProgressIndicatorT } from '../react-desc-prop-types.js';\n\nconst SlotPropsAsObject: Partial<DSProgressIndicatorT.Props> = {\n dsProgressindicatorRoot: { 'aria-label': 'just a typescript test' },\n dsProgressindicatorTitle: { 'aria-label': 'just a typescript test' },\n dsProgressindicatorCounter: { 'aria-label': 'just a typescript test' },\n dsProgressindicatorProgressBar: { 'aria-label': 'just a typescript test' },\n dsProgressindicatorProgress: { 'aria-label': 'just a typescript test' },\n};\n\nconst SlotPropsAsFunctions: DSProgressIndicatorT.SlotFunctionArguments = {\n dsProgressindicatorRoot: () => ({ 'aria-label': 'just a typescript test' }),\n dsProgressindicatorTitle: () => ({ 'aria-label': 'just a typescript test' }),\n dsProgressindicatorCounter: () => ({ 'aria-label': 'just a typescript test' }),\n dsProgressindicatorProgressBar: () => ({ 'aria-label': 'just a typescript test' }),\n dsProgressindicatorProgress: () => ({ 'aria-label': 'just a typescript test' }),\n};\n\n// Exhaustiveness check \u2014 fails compilation if a slot is missing from SlotFunctionArguments\nconst EnsureAllSlotsExistInSlotFunctionArguments: Required<\n TypescriptHelpersT.PropsForSlots<typeof DSProgressIndicatorName, typeof PROGRESS_INDICATOR_SLOTS>\n> = SlotPropsAsFunctions;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACKvB,MAAM,oBAAyD;AAAA,EAC7D,yBAAyB,EAAE,cAAc,yBAAyB;AAAA,EAClE,0BAA0B,EAAE,cAAc,yBAAyB;AAAA,EACnE,4BAA4B,EAAE,cAAc,yBAAyB;AAAA,EACrE,gCAAgC,EAAE,cAAc,yBAAyB;AAAA,EACzE,6BAA6B,EAAE,cAAc,yBAAyB;AACxE;AAEA,MAAM,uBAAmE;AAAA,EACvE,yBAAyB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACzE,0BAA0B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC1E,4BAA4B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC5E,gCAAgC,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAChF,6BAA6B,OAAO,EAAE,cAAc,yBAAyB;AAC/E;AAGA,MAAM,6CAEF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -28,7 +28,8 @@ var import__ = require("../index.js");
|
|
|
28
28
|
const testOptionalProps = {
|
|
29
29
|
containerProps: { "data-testid": "" },
|
|
30
30
|
max: 100,
|
|
31
|
-
now: 10
|
|
31
|
+
now: 10,
|
|
32
|
+
variant: "success"
|
|
32
33
|
};
|
|
33
34
|
const ref = import_react.default.createRef();
|
|
34
35
|
const testPartialDefaults = {
|
|
@@ -113,7 +114,8 @@ const ExampleUsageComponent = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)
|
|
|
113
114
|
title: "",
|
|
114
115
|
containerProps: {},
|
|
115
116
|
max: 100,
|
|
116
|
-
now: 20
|
|
117
|
+
now: 20,
|
|
118
|
+
variant: "success"
|
|
117
119
|
}
|
|
118
120
|
)
|
|
119
121
|
] });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-progress-indicator-valid.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport React from 'react';\nimport { DSProgressIndicator } from '../index.js';\nimport type { DSProgressIndicatorT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSProgressIndicatorT.Props;\ntype ComponentPropsInternals = DSProgressIndicatorT.InternalProps;\ntype ComponentPropsDefaultProps = DSProgressIndicatorT.DefaultProps;\ntype ComponentPropsOptionalProps = DSProgressIndicatorT.OptionalProps;\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n containerProps: { 'data-testid': '' },\n max: 100,\n now: 10,\n};\n\nconst ref = React.createRef();\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n disabled: false,\n min: 0,\n style: { border: '1px solid red' },\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n counterRenderer: () => '',\n disabled: false,\n innerRef: ref,\n min: 0,\n segments: [],\n style: {},\n title: '',\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n counterRenderer: () => '',\n disabled: false,\n innerRef: ref,\n min: 0,\n segments: [],\n style: {},\n title: '',\n containerProps: {},\n max: 100,\n now: 20,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n counterRenderer: () => '',\n disabled: false,\n innerRef: ref,\n min: 0,\n segments: [],\n style: {},\n title: '',\n containerProps: {},\n max: 100,\n now: 20,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n counterRenderer: () => '',\n disabled: false,\n innerRef: ref,\n min: 0,\n segments: [],\n style: {},\n title: '',\n containerProps: {},\n max: 100,\n now: 20,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSProgressIndicator {...testExplicitDefinition} />\n <DSProgressIndicator {...testInferedTypeCompatibility} />\n <DSProgressIndicator {...testDefinitionAsConst} />\n {/* works with inline values */}\n <DSProgressIndicator\n counterRenderer={() => ''}\n disabled\n innerRef={ref}\n min={0}\n segments={[]}\n style={{}}\n title=\"\"\n containerProps={{}}\n max={100}\n now={20}\n />\n </>\n);\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport React from 'react';\nimport { DSProgressIndicator } from '../index.js';\nimport type { DSProgressIndicatorT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSProgressIndicatorT.Props;\ntype ComponentPropsInternals = DSProgressIndicatorT.InternalProps;\ntype ComponentPropsDefaultProps = DSProgressIndicatorT.DefaultProps;\ntype ComponentPropsOptionalProps = DSProgressIndicatorT.OptionalProps;\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n containerProps: { 'data-testid': '' },\n max: 100,\n now: 10,\n variant: 'success',\n};\n\nconst ref = React.createRef();\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n disabled: false,\n min: 0,\n style: { border: '1px solid red' },\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n counterRenderer: () => '',\n disabled: false,\n innerRef: ref,\n min: 0,\n segments: [],\n style: {},\n title: '',\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n counterRenderer: () => '',\n disabled: false,\n innerRef: ref,\n min: 0,\n segments: [],\n style: {},\n title: '',\n containerProps: {},\n max: 100,\n now: 20,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n counterRenderer: () => '',\n disabled: false,\n innerRef: ref,\n min: 0,\n segments: [],\n style: {},\n title: '',\n containerProps: {},\n max: 100,\n now: 20,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n counterRenderer: () => '',\n disabled: false,\n innerRef: ref,\n min: 0,\n segments: [],\n style: {},\n title: '',\n containerProps: {},\n max: 100,\n now: 20,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSProgressIndicator {...testExplicitDefinition} />\n <DSProgressIndicator {...testInferedTypeCompatibility} />\n <DSProgressIndicator {...testDefinitionAsConst} />\n {/* works with inline values */}\n <DSProgressIndicator\n counterRenderer={() => ''}\n disabled\n innerRef={ref}\n min={0}\n segments={[]}\n style={{}}\n title=\"\"\n containerProps={{}}\n max={100}\n now={20}\n variant=\"success\"\n />\n </>\n);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACqGrB;AApGF,mBAAkB;AAClB,eAAoC;AASpC,MAAM,oBAAiD;AAAA,EACrD,gBAAgB,EAAE,eAAe,GAAG;AAAA,EACpC,KAAK;AAAA,EACL,KAAK;AAAA,EACL,SAAS;AACX;AAEA,MAAM,MAAM,aAAAA,QAAM,UAAU;AAI5B,MAAM,sBAA2D;AAAA,EAC/D,UAAU;AAAA,EACV,KAAK;AAAA,EACL,OAAO,EAAE,QAAQ,gBAAgB;AACnC;AAEA,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,uBAA6D;AAAA,EACjE,iBAAiB,MAAM;AAAA,E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,OAAM;AAAA,MACN,gBAAgB,CAAC;AAAA,MACjB,KAAK;AAAA,MACL,KAAK;AAAA,MACL,SAAQ;AAAA;AAAA,EACV;AAAA,GACF;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
package/dist/cjs/utils.js
CHANGED
|
@@ -28,11 +28,23 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var utils_exports = {};
|
|
30
30
|
__export(utils_exports, {
|
|
31
|
-
|
|
31
|
+
clamp: () => clamp,
|
|
32
|
+
defaultCounterRenderer: () => defaultCounterRenderer,
|
|
33
|
+
getPercentage: () => getPercentage,
|
|
34
|
+
hasValidRange: () => hasValidRange
|
|
32
35
|
});
|
|
33
36
|
module.exports = __toCommonJS(utils_exports);
|
|
34
37
|
var React = __toESM(require("react"));
|
|
38
|
+
function hasValidRange(min, max) {
|
|
39
|
+
return typeof min === "number" && typeof max === "number" && Number.isFinite(min) && Number.isFinite(max) && max > min;
|
|
40
|
+
}
|
|
41
|
+
function clamp(value, lower, upper) {
|
|
42
|
+
if (!Number.isFinite(value)) return lower;
|
|
43
|
+
return Math.min(upper, Math.max(lower, value));
|
|
44
|
+
}
|
|
35
45
|
function getPercentage(now, min, max) {
|
|
36
|
-
|
|
46
|
+
if (!hasValidRange(min, max)) return 0;
|
|
47
|
+
return clamp((now || min) / max * 100, 0, 100);
|
|
37
48
|
}
|
|
49
|
+
const defaultCounterRenderer = ({ now, max, min }) => `${min || now} of ${max}`;
|
|
38
50
|
//# sourceMappingURL=utils.js.map
|
package/dist/cjs/utils.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import type { DSProgressIndicatorT } from './react-desc-prop-types.js';\n\n/**\n * A determinate progress is only meaningful over a real range: `max` must be finite and greater than `min`.\n * The default `max` is `0`, so a consumer who omits it lands here \u2014 as does a legitimately dynamic `max` that\n * starts at zero while data loads. Both used to produce `width: NaN%` and an invalid ARIA range\n * (aria-valuemax equal to aria-valuemin). Callers treat an invalid range as an indeterminate progress. PUI-18672.\n */\nexport function hasValidRange(min: unknown, max: unknown): boolean {\n // `unknown` on purpose: `max` is optional in the public contract, and a JS consumer can pass anything.\n return (\n typeof min === 'number' && typeof max === 'number' && Number.isFinite(min) && Number.isFinite(max) && max > min\n );\n}\n\nexport function clamp(value: number, lower: number, upper: number): number {\n if (!Number.isFinite(value)) return lower;\n return Math.min(upper, Math.max(lower, value));\n}\n\n// The `(now || min) / max` formula is legacy and deliberately untouched: it renders exactly what a valid range\n// always rendered, `min` offsets included. Only two things are new \u2014 an invalid range yields 0 instead of NaN,\n// and the result is clamped so `now > max` can no longer push the fill past 100% of its track.\nexport function getPercentage(now: number, min: number, max: number): number {\n if (!hasValidRange(min, max)) return 0;\n return clamp(((now || min) / max) * 100, 0, 100);\n}\n\n// Single source of truth for the counter text. The visible counter renders it, and every progressbar mirrors\n// it through aria-valuetext, so the two can never drift apart. Note `min || now` reads min where it should\n// read now \u2014 a pre-existing defect tracked in KNOWN_INTENTIONAL_DEVIATIONS.md (deviation 4). It is kept here\n// deliberately: aria-valuetext must match what sighted users see, so when the renderer is fixed both update.\nexport const defaultCounterRenderer: DSProgressIndicatorT.DefaultRendererT = ({ now, max, min }) =>\n `${min || now} of ${max}`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADQhB,SAAS,cAAc,KAAc,KAAuB;AAEjE,SACE,OAAO,QAAQ,YAAY,OAAO,QAAQ,YAAY,OAAO,SAAS,GAAG,KAAK,OAAO,SAAS,GAAG,KAAK,MAAM;AAEhH;AAEO,SAAS,MAAM,OAAe,OAAe,OAAuB;AACzE,MAAI,CAAC,OAAO,SAAS,KAAK,EAAG,QAAO;AACpC,SAAO,KAAK,IAAI,OAAO,KAAK,IAAI,OAAO,KAAK,CAAC;AAC/C;AAKO,SAAS,cAAc,KAAa,KAAa,KAAqB;AAC3E,MAAI,CAAC,cAAc,KAAK,GAAG,EAAG,QAAO;AACrC,SAAO,OAAQ,OAAO,OAAO,MAAO,KAAK,GAAG,GAAG;AACjD;AAMO,MAAM,yBAAgE,CAAC,EAAE,KAAK,KAAK,IAAI,MAC5F,GAAG,OAAO,GAAG,OAAO,GAAG;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,52 +1,88 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
|
-
import { describe,
|
|
4
|
+
import { describe, useOwnerProps } from "@elliemae/ds-props-helpers";
|
|
5
|
+
import { DSTypography, TYPOGRAPHY_VARIANTS } from "@elliemae/ds-typography";
|
|
5
6
|
import Counter from "./ProgressCounter.js";
|
|
6
7
|
import ProgressBar from "./ProgressBar.js";
|
|
7
|
-
import {
|
|
8
|
-
import { Title } from "./styled.js";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
counterRenderer,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
disabled = false,
|
|
18
|
-
segments = [],
|
|
19
|
-
style = {}
|
|
20
|
-
}) => {
|
|
8
|
+
import { useProgressIndicator } from "./config/useProgressIndicator.js";
|
|
9
|
+
import { legacyRootClassName, StyledProgressIndicatorRoot, Title } from "./styled.js";
|
|
10
|
+
import { defaultCounterRenderer } from "./utils.js";
|
|
11
|
+
import { DSProgressIndicatorPropTypesSchema } from "./react-desc-prop-types.js";
|
|
12
|
+
const DSProgressIndicator = (props) => {
|
|
13
|
+
const { propsWithDefault, globalProps, titleId } = useProgressIndicator(props);
|
|
14
|
+
const { containerProps, innerRef, title, counterRenderer, now, min, max, disabled, segments, style, variant } = propsWithDefault;
|
|
15
|
+
const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps(propsWithDefault);
|
|
16
|
+
const labelledBy = title ? titleId : void 0;
|
|
17
|
+
const valueRenderer = counterRenderer ?? defaultCounterRenderer;
|
|
21
18
|
const renderProgressBar = useMemo(
|
|
22
|
-
() => segments.length ? /* @__PURE__ */ jsx(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
() => segments.length ? /* @__PURE__ */ jsx(
|
|
20
|
+
ProgressBar,
|
|
21
|
+
{
|
|
22
|
+
valueTextRenderer: valueRenderer,
|
|
23
|
+
getOwnerProps,
|
|
24
|
+
getOwnerPropsArguments,
|
|
25
|
+
children: segments.map(
|
|
26
|
+
(segmentProps, i) => !(segmentProps.now < segmentProps.min) && /* @__PURE__ */ jsx(
|
|
27
|
+
ProgressBar.Segment,
|
|
28
|
+
{
|
|
29
|
+
...segmentProps,
|
|
30
|
+
labelledBy,
|
|
31
|
+
valueTextRenderer: valueRenderer,
|
|
32
|
+
getOwnerProps,
|
|
33
|
+
getOwnerPropsArguments
|
|
34
|
+
},
|
|
35
|
+
i
|
|
36
|
+
)
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
) : /* @__PURE__ */ jsx(
|
|
40
|
+
ProgressBar,
|
|
41
|
+
{
|
|
42
|
+
max,
|
|
43
|
+
min,
|
|
44
|
+
now,
|
|
45
|
+
variant,
|
|
46
|
+
labelledBy,
|
|
47
|
+
valueTextRenderer: valueRenderer,
|
|
48
|
+
getOwnerProps,
|
|
49
|
+
getOwnerPropsArguments
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
[segments, min, max, now, variant, labelledBy, valueRenderer, getOwnerProps, getOwnerPropsArguments]
|
|
53
|
+
);
|
|
54
|
+
return /* @__PURE__ */ jsxs(
|
|
55
|
+
StyledProgressIndicatorRoot,
|
|
56
|
+
{
|
|
57
|
+
...globalProps,
|
|
58
|
+
innerRef,
|
|
59
|
+
"aria-disabled": disabled,
|
|
60
|
+
...containerProps,
|
|
61
|
+
className: legacyRootClassName(disabled, globalProps.className, containerProps?.className),
|
|
62
|
+
style,
|
|
63
|
+
getOwnerProps,
|
|
64
|
+
getOwnerPropsArguments,
|
|
65
|
+
children: [
|
|
66
|
+
/* @__PURE__ */ jsx(Title, { id: titleId, getOwnerProps, getOwnerPropsArguments, children: /* @__PURE__ */ jsx(DSTypography, { component: "span", variant: TYPOGRAPHY_VARIANTS.B4, children: title }) }),
|
|
67
|
+
/* @__PURE__ */ jsx(
|
|
68
|
+
Counter,
|
|
69
|
+
{
|
|
70
|
+
max,
|
|
71
|
+
min,
|
|
72
|
+
now,
|
|
73
|
+
renderer: valueRenderer,
|
|
74
|
+
getOwnerProps,
|
|
75
|
+
getOwnerPropsArguments
|
|
76
|
+
}
|
|
77
|
+
),
|
|
78
|
+
renderProgressBar
|
|
79
|
+
]
|
|
80
|
+
}
|
|
26
81
|
);
|
|
27
|
-
return /* @__PURE__ */ jsxs(Wrapper, { ref: innerRef, "aria-disabled": disabled, classProps: { disabled }, ...containerProps, style, children: [
|
|
28
|
-
/* @__PURE__ */ jsx(Title, { children: title }),
|
|
29
|
-
/* @__PURE__ */ jsx(Counter, { max, min, now, renderer: counterRenderer }),
|
|
30
|
-
renderProgressBar
|
|
31
|
-
] });
|
|
32
|
-
};
|
|
33
|
-
const variants = ["default", "success", "warning", "info", "error"];
|
|
34
|
-
const progressIndicatorProps = {
|
|
35
|
-
containerProps: PropTypes.object.description("Set of Properties attached to the main container"),
|
|
36
|
-
innerRef: PropTypes.object.description("ref to the components container"),
|
|
37
|
-
title: PropTypes.string.description("components title"),
|
|
38
|
-
variant: PropTypes.oneOf(variants).description("Progress intent variation"),
|
|
39
|
-
now: PropTypes.number.description("Total current value"),
|
|
40
|
-
min: PropTypes.number.description("min value"),
|
|
41
|
-
max: PropTypes.number.description("max value"),
|
|
42
|
-
disabled: PropTypes.bool.description("Whether the progress indicator disabled or not").defaultValue(false),
|
|
43
|
-
counterRenderer: PropTypes.func.description("Render a custom counter"),
|
|
44
|
-
segments: PropTypes.array.description("An array of multiple progress objects"),
|
|
45
|
-
style: PropTypes.object.description("css inline style")
|
|
46
82
|
};
|
|
47
83
|
DSProgressIndicator.displayName = "DSProgressIndicator";
|
|
48
84
|
const ProgressIndicatorWithSchema = describe(DSProgressIndicator);
|
|
49
|
-
ProgressIndicatorWithSchema.propTypes =
|
|
85
|
+
ProgressIndicatorWithSchema.propTypes = DSProgressIndicatorPropTypesSchema;
|
|
50
86
|
DSProgressIndicator.ProgressBar = ProgressBar;
|
|
51
87
|
var DSProgressIndicator_default = DSProgressIndicator;
|
|
52
88
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSProgressIndicator.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/no-array-index-key */\nimport React, { useMemo
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/no-array-index-key */\nimport React, { useMemo } from 'react';\nimport { describe, useOwnerProps } from '@elliemae/ds-props-helpers';\nimport { DSTypography, TYPOGRAPHY_VARIANTS } from '@elliemae/ds-typography';\nimport Counter from './ProgressCounter.js';\nimport ProgressBar from './ProgressBar.js';\nimport { useProgressIndicator } from './config/useProgressIndicator.js';\nimport { legacyRootClassName, StyledProgressIndicatorRoot, Title } from './styled.js';\nimport { defaultCounterRenderer } from './utils.js';\nimport { type DSProgressIndicatorT, DSProgressIndicatorPropTypesSchema } from './react-desc-prop-types.js';\n\nconst DSProgressIndicator = (props: DSProgressIndicatorT.Props) => {\n const { propsWithDefault, globalProps, titleId } = useProgressIndicator(props);\n const { containerProps, innerRef, title, counterRenderer, now, min, max, disabled, segments, style, variant } =\n propsWithDefault;\n\n const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps<DSProgressIndicatorT.Props>(propsWithDefault);\n\n // A titleless progress indicator has nothing to be labelled by, so the fallback aria-label is kept instead.\n const labelledBy = title ? titleId : undefined;\n // Resolved once so the visible counter and every progressbar's aria-valuetext share the exact same text.\n const valueRenderer = counterRenderer ?? defaultCounterRenderer;\n\n const renderProgressBar = useMemo(\n () =>\n segments.length ? (\n <ProgressBar\n valueTextRenderer={valueRenderer}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {segments.map(\n (segmentProps, i) =>\n !(segmentProps.now < segmentProps.min) && (\n <ProgressBar.Segment\n key={i}\n {...segmentProps}\n labelledBy={labelledBy}\n valueTextRenderer={valueRenderer}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n ),\n )}\n </ProgressBar>\n ) : (\n <ProgressBar\n max={max}\n min={min}\n now={now}\n // PUI-18677: documented since the props table existed, but was never forwarded. Undefined falls back to\n // ProgressBar's own 'default', so an indicator without the prop renders exactly as before.\n variant={variant}\n labelledBy={labelledBy}\n valueTextRenderer={valueRenderer}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n ),\n [segments, min, max, now, variant, labelledBy, valueRenderer, getOwnerProps, getOwnerPropsArguments],\n );\n\n return (\n <StyledProgressIndicatorRoot\n {...globalProps}\n // the public innerRef contract is MutableRefObject<unknown>; the styled root is a div. Casting here\n // keeps the published prop type unchanged rather than narrowing it on consumers.\n innerRef={innerRef as React.RefObject<HTMLDivElement>}\n // Inert for assistive technology: ARIA 1.2 supports aria-disabled on neither a roleless div nor a\n // progressbar. Kept only because it is observable DOM that QA and consumer tests assert on \u2014 the disabled\n // state reaches AT through text the consumer renders, see KNOWN_INTENTIONAL_DEVIATIONS.md #8 (PUI-18676).\n aria-disabled={disabled}\n {...containerProps}\n // after the spreads on purpose: aggregatedClasses used to append a consumer className to the legacy\n // contract rather than let it replace them, and that ordering is part of the compatibility surface\n className={legacyRootClassName(disabled, globalProps.className, containerProps?.className)}\n style={style}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <Title id={titleId} getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n {/* span, not the variant's default <p>: this sits inside an inline slot and must stay phrasing content */}\n <DSTypography component=\"span\" variant={TYPOGRAPHY_VARIANTS.B4}>\n {title}\n </DSTypography>\n </Title>\n <Counter\n max={max}\n min={min}\n now={now}\n renderer={valueRenderer}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n {renderProgressBar}\n </StyledProgressIndicatorRoot>\n );\n};\n\nDSProgressIndicator.displayName = 'DSProgressIndicator';\nconst ProgressIndicatorWithSchema = describe(DSProgressIndicator);\nProgressIndicatorWithSchema.propTypes = DSProgressIndicatorPropTypesSchema;\n\nDSProgressIndicator.ProgressBar = ProgressBar;\n\nexport { DSProgressIndicator, ProgressIndicatorWithSchema };\nexport default DSProgressIndicator;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACkCP,cA6BZ,YA7BY;AAjChB,SAAgB,eAAe;AAC/B,SAAS,UAAU,qBAAqB;AACxC,SAAS,cAAc,2BAA2B;AAClD,OAAO,aAAa;AACpB,OAAO,iBAAiB;AACxB,SAAS,4BAA4B;AACrC,SAAS,qBAAqB,6BAA6B,aAAa;AACxE,SAAS,8BAA8B;AACvC,SAAoC,0CAA0C;AAE9E,MAAM,sBAAsB,CAAC,UAAsC;AACjE,QAAM,EAAE,kBAAkB,aAAa,QAAQ,IAAI,qBAAqB,KA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