@elliemae/ds-wizard 3.16.0 → 3.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/WizardStep.js +5 -1
- package/dist/cjs/WizardStep.js.map +2 -2
- package/dist/cjs/WizardSteps.js +6 -2
- package/dist/cjs/WizardSteps.js.map +2 -2
- package/dist/cjs/blockNames.js +4 -0
- package/dist/cjs/blockNames.js.map +1 -1
- package/dist/cjs/index.js +7 -3
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/package.json +7 -0
- package/dist/cjs/useWizard.js +4 -0
- package/dist/cjs/useWizard.js.map +1 -1
- package/dist/esm/WizardStep.js +1 -1
- package/dist/esm/WizardStep.js.map +1 -1
- package/dist/esm/WizardSteps.js +2 -2
- package/dist/esm/WizardSteps.js.map +2 -2
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/package.json +7 -0
- package/dist/types/WizardStep.d.ts +9 -8
- package/dist/types/WizardSteps.d.ts +12 -11
- package/dist/types/index.d.ts +3 -3
- package/package.json +5 -5
package/dist/cjs/WizardStep.js
CHANGED
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -35,7 +39,7 @@ var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
|
35
39
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
36
40
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
37
41
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
38
|
-
var import_blockNames = require("./blockNames");
|
|
42
|
+
var import_blockNames = require("./blockNames.js");
|
|
39
43
|
const Item = (0, import_ds_classnames.aggregatedClasses)("div")(`${import_blockNames.indicatorItemBlockName}`, null, ({ active, completed }) => ({
|
|
40
44
|
active,
|
|
41
45
|
completed
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/WizardStep.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable indent */\nimport React, { cloneElement, useMemo, isValidElement } from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { get } from '@elliemae/ds-utilities';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { Checkmark } from '@elliemae/ds-icons';\nimport { indicatorItemBlockName } from './blockNames';\n\nconst Item = aggregatedClasses('div')(`${indicatorItemBlockName}`, null, ({ active, completed }) => ({\n active,\n completed,\n}));\nconst Wrapper = aggregatedClasses('div')(`${indicatorItemBlockName}-wrapper`);\nconst Label = aggregatedClasses('span')(indicatorItemBlockName, 'label');\nconst Bullet = aggregatedClasses('div')(indicatorItemBlockName, 'bullet');\nconst BulletWrapper = aggregatedClasses('div')(indicatorItemBlockName, 'bullet-wrapper');\n\nconst WizardStep = ({\n label = '',\n icon = null,\n iconCompleted = <Checkmark />,\n iconActive = null,\n active = false,\n completed = false,\n index = 0,\n}) => {\n const currentIcon =\n useMemo(() => {\n if (active) return iconActive;\n if (completed) return iconCompleted;\n return icon;\n }, [active, completed]) || icon;\n\n const iconWithOptions = useMemo(\n () =>\n isValidElement(currentIcon)\n ? cloneElement(currentIcon, {\n color: get(currentIcon, ['props', 'color']) || ['brand-primary', completed ? 600 : 500],\n })\n : currentIcon || index + 1,\n [currentIcon],\n );\n\n return (\n <Item classProps={{ active, completed }}>\n <Wrapper>\n <BulletWrapper>\n <Bullet>{iconWithOptions}</Bullet>\n </BulletWrapper>\n <Label>{label}</Label>\n </Wrapper>\n </Item>\n );\n};\n\nconst wizzardStepProps = {\n label: PropTypes.string.description('Step label'),\n icon: PropTypes.oneOfType([PropTypes.element, PropTypes.string]).description('Default icon or number'),\n iconCompleted: PropTypes.element.description('Icon when the step is completed').defaultValue(Checkmark),\n iconActive: PropTypes.element.description('Icon when the step is active'),\n active: PropTypes.bool.description('Whether the step is active or not').defaultValue(false),\n completed: PropTypes.bool.description('Whether the step is completed or not').defaultValue(false),\n index: PropTypes.number.description('Current item index'),\n};\n\nWizardStep.propTypes = wizzardStepProps;\nWizardStep.displayName = 'WizardStep';\nconst WizzardStepWithSchema = describe(WizardStep);\nWizzardStepWithSchema.propTypes = wizzardStepProps;\n\nexport { WizzardStepWithSchema };\nexport default WizardStep;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["/* eslint-disable indent */\nimport React, { cloneElement, useMemo, isValidElement } from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { get } from '@elliemae/ds-utilities';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { Checkmark } from '@elliemae/ds-icons';\nimport { indicatorItemBlockName } from './blockNames.js';\n\nconst Item = aggregatedClasses('div')(`${indicatorItemBlockName}`, null, ({ active, completed }) => ({\n active,\n completed,\n}));\nconst Wrapper = aggregatedClasses('div')(`${indicatorItemBlockName}-wrapper`);\nconst Label = aggregatedClasses('span')(indicatorItemBlockName, 'label');\nconst Bullet = aggregatedClasses('div')(indicatorItemBlockName, 'bullet');\nconst BulletWrapper = aggregatedClasses('div')(indicatorItemBlockName, 'bullet-wrapper');\n\nconst WizardStep = ({\n label = '',\n icon = null,\n iconCompleted = <Checkmark />,\n iconActive = null,\n active = false,\n completed = false,\n index = 0,\n}) => {\n const currentIcon =\n useMemo(() => {\n if (active) return iconActive;\n if (completed) return iconCompleted;\n return icon;\n }, [active, completed]) || icon;\n\n const iconWithOptions = useMemo(\n () =>\n isValidElement(currentIcon)\n ? cloneElement(currentIcon, {\n color: get(currentIcon, ['props', 'color']) || ['brand-primary', completed ? 600 : 500],\n })\n : currentIcon || index + 1,\n [currentIcon],\n );\n\n return (\n <Item classProps={{ active, completed }}>\n <Wrapper>\n <BulletWrapper>\n <Bullet>{iconWithOptions}</Bullet>\n </BulletWrapper>\n <Label>{label}</Label>\n </Wrapper>\n </Item>\n );\n};\n\nconst wizzardStepProps = {\n label: PropTypes.string.description('Step label'),\n icon: PropTypes.oneOfType([PropTypes.element, PropTypes.string]).description('Default icon or number'),\n iconCompleted: PropTypes.element.description('Icon when the step is completed').defaultValue(Checkmark),\n iconActive: PropTypes.element.description('Icon when the step is active'),\n active: PropTypes.bool.description('Whether the step is active or not').defaultValue(false),\n completed: PropTypes.bool.description('Whether the step is completed or not').defaultValue(false),\n index: PropTypes.number.description('Current item index'),\n};\n\nWizardStep.propTypes = wizzardStepProps;\nWizardStep.displayName = 'WizardStep';\nconst WizzardStepWithSchema = describe(WizardStep);\nWizzardStepWithSchema.propTypes = wizzardStepProps;\n\nexport { WizzardStepWithSchema };\nexport default WizardStep;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADoBL;AAnBlB,mBAA6D;AAC7D,2BAAkC;AAClC,0BAAoB;AACpB,8BAAoC;AACpC,sBAA0B;AAC1B,wBAAuC;AAEvC,MAAM,WAAO,wCAAkB,KAAK,EAAE,GAAG,4CAA0B,MAAM,CAAC,EAAE,QAAQ,UAAU,OAAO;AAAA,EACnG;AAAA,EACA;AACF,EAAE;AACF,MAAM,cAAU,wCAAkB,KAAK,EAAE,GAAG,kDAAgC;AAC5E,MAAM,YAAQ,wCAAkB,MAAM,EAAE,0CAAwB,OAAO;AACvE,MAAM,aAAS,wCAAkB,KAAK,EAAE,0CAAwB,QAAQ;AACxE,MAAM,oBAAgB,wCAAkB,KAAK,EAAE,0CAAwB,gBAAgB;AAEvF,MAAM,aAAa,CAAC;AAAA,EAClB,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,gBAAgB,4CAAC,6BAAU;AAAA,EAC3B,aAAa;AAAA,EACb,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,QAAQ;AACV,MAAM;AACJ,QAAM,kBACJ,sBAAQ,MAAM;AACZ,QAAI;AAAQ,aAAO;AACnB,QAAI;AAAW,aAAO;AACtB,WAAO;AAAA,EACT,GAAG,CAAC,QAAQ,SAAS,CAAC,KAAK;AAE7B,QAAM,sBAAkB;AAAA,IACtB,UACE,6BAAe,WAAW,QACtB,2BAAa,aAAa;AAAA,MACxB,WAAO,yBAAI,aAAa,CAAC,SAAS,OAAO,CAAC,KAAK,CAAC,iBAAiB,YAAY,MAAM,GAAG;AAAA,IACxF,CAAC,IACD,eAAe,QAAQ;AAAA,IAC7B,CAAC,WAAW;AAAA,EACd;AAEA,SACE,4CAAC,QAAK,YAAY,EAAE,QAAQ,UAAU,GACpC,uDAAC,WACC;AAAA,gDAAC,iBACC,sDAAC,UAAQ,2BAAgB,GAC3B;AAAA,IACA,4CAAC,SAAO,iBAAM;AAAA,KAChB,GACF;AAEJ;AAEA,MAAM,mBAAmB;AAAA,EACvB,OAAO,kCAAU,OAAO,YAAY,YAAY;AAAA,EAChD,MAAM,kCAAU,UAAU,CAAC,kCAAU,SAAS,kCAAU,MAAM,CAAC,EAAE,YAAY,wBAAwB;AAAA,EACrG,eAAe,kCAAU,QAAQ,YAAY,iCAAiC,EAAE,aAAa,yBAAS;AAAA,EACtG,YAAY,kCAAU,QAAQ,YAAY,8BAA8B;AAAA,EACxE,QAAQ,kCAAU,KAAK,YAAY,mCAAmC,EAAE,aAAa,KAAK;AAAA,EAC1F,WAAW,kCAAU,KAAK,YAAY,sCAAsC,EAAE,aAAa,KAAK;AAAA,EAChG,OAAO,kCAAU,OAAO,YAAY,oBAAoB;AAC1D;AAEA,WAAW,YAAY;AACvB,WAAW,cAAc;AACzB,MAAM,4BAAwB,kCAAS,UAAU;AACjD,sBAAsB,YAAY;AAGlC,IAAO,qBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/WizardSteps.js
CHANGED
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -33,8 +37,8 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
33
37
|
var import_react = __toESM(require("react"));
|
|
34
38
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
35
39
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
36
|
-
var import_WizardStep = __toESM(require("./WizardStep"));
|
|
37
|
-
var import_blockNames = require("./blockNames");
|
|
40
|
+
var import_WizardStep = __toESM(require("./WizardStep.js"));
|
|
41
|
+
var import_blockNames = require("./blockNames.js");
|
|
38
42
|
const StepsWrapper = (0, import_ds_classnames.aggregatedClasses)("div")(import_blockNames.indicatorBlockName);
|
|
39
43
|
const WizardSteps = ({ current = 0, steps, children, ...otherProps }) => {
|
|
40
44
|
const items = (0, import_react.useMemo)(() => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/WizardSteps.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable indent */\n/* eslint-disable react/no-array-index-key */\nimport React, { cloneElement, useMemo } from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport WizardStep from './WizardStep';\nimport { indicatorBlockName } from './blockNames';\n\nconst StepsWrapper = aggregatedClasses('div')(indicatorBlockName);\n\nconst WizardSteps = ({ current = 0, steps, children, ...otherProps }) => {\n const items = useMemo(() => {\n const mergeStepProps = (step, index) => ({\n index,\n active: current === index,\n completed: index < current,\n });\n\n return steps\n ? steps.map((step, index) => <WizardStep key={index} {...step} {...mergeStepProps(step, index)} />)\n : React.Children.map(children, (item, index) => cloneElement(item, mergeStepProps(item, index)));\n }, [current, children]);\n\n return <StepsWrapper {...otherProps}>{items}</StepsWrapper>;\n};\n\nWizardSteps.Item = WizardStep;\n\nconst wizzardProps = {\n current: PropTypes.number.description('Current active state index').defaultValue(0),\n steps: PropTypes.arrayOf(PropTypes.shape({})).description('Array of steps objects').defaultValue([]).isRequired,\n children: PropTypes.arrayOf(PropTypes.instanceOf(WizardStep)).description('List of WizardStep components'),\n};\n\nWizardSteps.propTypes = wizzardProps;\nWizardSteps.displayName = 'WizardSteps';\nconst WizzardWithSchema = describe(WizardSteps);\nWizzardWithSchema.propTypes = wizzardProps;\n\nexport { WizzardWithSchema };\nexport default WizardSteps;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["/* eslint-disable indent */\n/* eslint-disable react/no-array-index-key */\nimport React, { cloneElement, useMemo } from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport WizardStep from './WizardStep.js';\nimport { indicatorBlockName } from './blockNames.js';\n\nconst StepsWrapper = aggregatedClasses('div')(indicatorBlockName);\n\nconst WizardSteps = ({ current = 0, steps, children, ...otherProps }) => {\n const items = useMemo(() => {\n const mergeStepProps = (step, index) => ({\n index,\n active: current === index,\n completed: index < current,\n });\n\n return steps\n ? steps.map((step, index) => <WizardStep key={index} {...step} {...mergeStepProps(step, index)} />)\n : React.Children.map(children, (item, index) => cloneElement(item, mergeStepProps(item, index)));\n }, [current, children]);\n\n return <StepsWrapper {...otherProps}>{items}</StepsWrapper>;\n};\n\nWizardSteps.Item = WizardStep;\n\nconst wizzardProps = {\n current: PropTypes.number.description('Current active state index').defaultValue(0),\n steps: PropTypes.arrayOf(PropTypes.shape({})).description('Array of steps objects').defaultValue([]).isRequired,\n children: PropTypes.arrayOf(PropTypes.instanceOf(WizardStep)).description('List of WizardStep components'),\n};\n\nWizardSteps.propTypes = wizzardProps;\nWizardSteps.displayName = 'WizardSteps';\nconst WizzardWithSchema = describe(WizardSteps);\nWizzardWithSchema.propTypes = wizzardProps;\n\nexport { WizzardWithSchema };\nexport default WizardSteps;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADmBY;AAjBnC,mBAA6C;AAC7C,8BAAoC;AACpC,2BAAkC;AAClC,wBAAuB;AACvB,wBAAmC;AAEnC,MAAM,mBAAe,wCAAkB,KAAK,EAAE,oCAAkB;AAEhE,MAAM,cAAc,CAAC,EAAE,UAAU,GAAG,OAAO,UAAU,GAAG,WAAW,MAAM;AACvE,QAAM,YAAQ,sBAAQ,MAAM;AAC1B,UAAM,iBAAiB,CAAC,MAAM,WAAW;AAAA,MACvC;AAAA,MACA,QAAQ,YAAY;AAAA,MACpB,WAAW,QAAQ;AAAA,IACrB;AAEA,WAAO,QACH,MAAM,IAAI,CAAC,MAAM,UAAU,4CAAC,kBAAAA,SAAA,EAAwB,GAAG,MAAO,GAAG,eAAe,MAAM,KAAK,KAA/C,KAAkD,CAAE,IAChG,aAAAC,QAAM,SAAS,IAAI,UAAU,CAAC,MAAM,cAAU,2BAAa,MAAM,eAAe,MAAM,KAAK,CAAC,CAAC;AAAA,EACnG,GAAG,CAAC,SAAS,QAAQ,CAAC;AAEtB,SAAO,4CAAC,gBAAc,GAAG,YAAa,iBAAM;AAC9C;AAEA,YAAY,OAAO,kBAAAD;AAEnB,MAAM,eAAe;AAAA,EACnB,SAAS,kCAAU,OAAO,YAAY,4BAA4B,EAAE,aAAa,CAAC;AAAA,EAClF,OAAO,kCAAU,QAAQ,kCAAU,MAAM,CAAC,CAAC,CAAC,EAAE,YAAY,wBAAwB,EAAE,aAAa,CAAC,CAAC,EAAE;AAAA,EACrG,UAAU,kCAAU,QAAQ,kCAAU,WAAW,kBAAAA,OAAU,CAAC,EAAE,YAAY,+BAA+B;AAC3G;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,wBAAoB,kCAAS,WAAW;AAC9C,kBAAkB,YAAY;AAG9B,IAAO,sBAAQ;",
|
|
6
6
|
"names": ["WizardStep", "React"]
|
|
7
7
|
}
|
package/dist/cjs/blockNames.js
CHANGED
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/blockNames.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export const wizardBlockName = 'wizard';\nexport const indicatorBlockName = `${wizardBlockName}-steps-indicator`;\nexport const indicatorItemBlockName = `${indicatorBlockName}-step`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,kBAAkB;AACxB,MAAM,qBAAqB,GAAG;AAC9B,MAAM,yBAAyB,GAAG;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -32,7 +36,7 @@ __export(src_exports, {
|
|
|
32
36
|
});
|
|
33
37
|
module.exports = __toCommonJS(src_exports);
|
|
34
38
|
var React = __toESM(require("react"));
|
|
35
|
-
var import_WizardSteps = __toESM(require("./WizardSteps"));
|
|
36
|
-
var import_WizardStep = __toESM(require("./WizardStep"));
|
|
37
|
-
var import_useWizard = __toESM(require("./useWizard"));
|
|
39
|
+
var import_WizardSteps = __toESM(require("./WizardSteps.js"));
|
|
40
|
+
var import_WizardStep = __toESM(require("./WizardStep.js"));
|
|
41
|
+
var import_useWizard = __toESM(require("./useWizard.js"));
|
|
38
42
|
//# 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": ["import WizardStepsIndicator, { WizzardWithSchema } from './WizardSteps';\nimport WizardStep, { WizzardStepWithSchema } from './WizardStep';\nimport useWizard from './useWizard';\n\nexport { useWizard, WizardStepsIndicator, WizardStep, WizzardWithSchema, WizzardStepWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import WizardStepsIndicator, { WizzardWithSchema } from './WizardSteps.js';\nimport WizardStep, { WizzardStepWithSchema } from './WizardStep.js';\nimport useWizard from './useWizard.js';\n\nexport { useWizard, WizardStepsIndicator, WizardStep, WizzardWithSchema, WizzardStepWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,sCAAAA;AAAA,EAAA,+CAAAC;AAAA,EAAA;AAAA;AAAA,oCAAAC;AAAA;AAAA;ACAA,YAAuB;ADAvB,yBAAwD;AACxD,wBAAkD;AAClD,uBAAsB;",
|
|
6
6
|
"names": ["WizardStep", "WizardStepsIndicator", "useWizard"]
|
|
7
7
|
}
|
package/dist/cjs/useWizard.js
CHANGED
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useWizard.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { useCallback } from 'react';\nimport { get, useDerivedStateFromProps } from '@elliemae/ds-utilities';\n\nconst checkCanNext = (prevIndex, array) => array.length > prevIndex + 1;\nconst checkCanPrevious = (prevIndex) => prevIndex - 1 >= 0;\n\nconst noop = () => null;\n\nexport default function useWizard({ steps: wizardSteps, current, onNext = noop, onPrevious = noop, initial = 0 }) {\n const [currentStep, setCurrentStep] = useDerivedStateFromProps(current || initial);\n\n const handleNext = useCallback(() => {\n if (checkCanNext(currentStep, wizardSteps)) {\n onNext(currentStep);\n setCurrentStep(currentStep + 1);\n }\n });\n\n const handlePrevious = useCallback(() => {\n if (checkCanPrevious(currentStep)) {\n onPrevious(currentStep);\n setCurrentStep(currentStep - 1);\n }\n });\n\n return {\n current: currentStep,\n next: handleNext,\n previous: handlePrevious,\n canNext: checkCanNext(currentStep, wizardSteps),\n canPrevious: checkCanPrevious(currentStep),\n WizardCurrentContent: get(wizardSteps, [currentStep, 'content'], () => null),\n };\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA4B;AAC5B,0BAA8C;AAE9C,MAAM,eAAe,CAAC,WAAW,UAAU,MAAM,SAAS,YAAY;AACtE,MAAM,mBAAmB,CAAC,cAAc,YAAY,KAAK;AAEzD,MAAM,OAAO,MAAM;AAEJ,SAAR,UAA2B,EAAE,OAAO,aAAa,SAAS,SAAS,MAAM,aAAa,MAAM,UAAU,EAAE,GAAG;AAChH,QAAM,CAAC,aAAa,cAAc,QAAI,8CAAyB,WAAW,OAAO;AAEjF,QAAM,iBAAa,0BAAY,MAAM;AACnC,QAAI,aAAa,aAAa,WAAW,GAAG;AAC1C,aAAO,WAAW;AAClB,qBAAe,cAAc,CAAC;AAAA,IAChC;AAAA,EACF,CAAC;AAED,QAAM,qBAAiB,0BAAY,MAAM;AACvC,QAAI,iBAAiB,WAAW,GAAG;AACjC,iBAAW,WAAW;AACtB,qBAAe,cAAc,CAAC;AAAA,IAChC;AAAA,EACF,CAAC;AAED,SAAO;AAAA,IACL,SAAS;AAAA,IACT,MAAM;AAAA,IACN,UAAU;AAAA,IACV,SAAS,aAAa,aAAa,WAAW;AAAA,IAC9C,aAAa,iBAAiB,WAAW;AAAA,IACzC,0BAAsB,yBAAI,aAAa,CAAC,aAAa,SAAS,GAAG,MAAM,IAAI;AAAA,EAC7E;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/WizardStep.js
CHANGED
|
@@ -5,7 +5,7 @@ import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
|
5
5
|
import { get } from "@elliemae/ds-utilities";
|
|
6
6
|
import { describe, PropTypes } from "@elliemae/ds-props-helpers";
|
|
7
7
|
import { Checkmark } from "@elliemae/ds-icons";
|
|
8
|
-
import { indicatorItemBlockName } from "./blockNames";
|
|
8
|
+
import { indicatorItemBlockName } from "./blockNames.js";
|
|
9
9
|
const Item = aggregatedClasses("div")(`${indicatorItemBlockName}`, null, ({ active, completed }) => ({
|
|
10
10
|
active,
|
|
11
11
|
completed
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/WizardStep.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\nimport React, { cloneElement, useMemo, isValidElement } from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { get } from '@elliemae/ds-utilities';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { Checkmark } from '@elliemae/ds-icons';\nimport { indicatorItemBlockName } from './blockNames';\n\nconst Item = aggregatedClasses('div')(`${indicatorItemBlockName}`, null, ({ active, completed }) => ({\n active,\n completed,\n}));\nconst Wrapper = aggregatedClasses('div')(`${indicatorItemBlockName}-wrapper`);\nconst Label = aggregatedClasses('span')(indicatorItemBlockName, 'label');\nconst Bullet = aggregatedClasses('div')(indicatorItemBlockName, 'bullet');\nconst BulletWrapper = aggregatedClasses('div')(indicatorItemBlockName, 'bullet-wrapper');\n\nconst WizardStep = ({\n label = '',\n icon = null,\n iconCompleted = <Checkmark />,\n iconActive = null,\n active = false,\n completed = false,\n index = 0,\n}) => {\n const currentIcon =\n useMemo(() => {\n if (active) return iconActive;\n if (completed) return iconCompleted;\n return icon;\n }, [active, completed]) || icon;\n\n const iconWithOptions = useMemo(\n () =>\n isValidElement(currentIcon)\n ? cloneElement(currentIcon, {\n color: get(currentIcon, ['props', 'color']) || ['brand-primary', completed ? 600 : 500],\n })\n : currentIcon || index + 1,\n [currentIcon],\n );\n\n return (\n <Item classProps={{ active, completed }}>\n <Wrapper>\n <BulletWrapper>\n <Bullet>{iconWithOptions}</Bullet>\n </BulletWrapper>\n <Label>{label}</Label>\n </Wrapper>\n </Item>\n );\n};\n\nconst wizzardStepProps = {\n label: PropTypes.string.description('Step label'),\n icon: PropTypes.oneOfType([PropTypes.element, PropTypes.string]).description('Default icon or number'),\n iconCompleted: PropTypes.element.description('Icon when the step is completed').defaultValue(Checkmark),\n iconActive: PropTypes.element.description('Icon when the step is active'),\n active: PropTypes.bool.description('Whether the step is active or not').defaultValue(false),\n completed: PropTypes.bool.description('Whether the step is completed or not').defaultValue(false),\n index: PropTypes.number.description('Current item index'),\n};\n\nWizardStep.propTypes = wizzardStepProps;\nWizardStep.displayName = 'WizardStep';\nconst WizzardStepWithSchema = describe(WizardStep);\nWizzardStepWithSchema.propTypes = wizzardStepProps;\n\nexport { WizzardStepWithSchema };\nexport default WizardStep;\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\nimport React, { cloneElement, useMemo, isValidElement } from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { get } from '@elliemae/ds-utilities';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { Checkmark } from '@elliemae/ds-icons';\nimport { indicatorItemBlockName } from './blockNames.js';\n\nconst Item = aggregatedClasses('div')(`${indicatorItemBlockName}`, null, ({ active, completed }) => ({\n active,\n completed,\n}));\nconst Wrapper = aggregatedClasses('div')(`${indicatorItemBlockName}-wrapper`);\nconst Label = aggregatedClasses('span')(indicatorItemBlockName, 'label');\nconst Bullet = aggregatedClasses('div')(indicatorItemBlockName, 'bullet');\nconst BulletWrapper = aggregatedClasses('div')(indicatorItemBlockName, 'bullet-wrapper');\n\nconst WizardStep = ({\n label = '',\n icon = null,\n iconCompleted = <Checkmark />,\n iconActive = null,\n active = false,\n completed = false,\n index = 0,\n}) => {\n const currentIcon =\n useMemo(() => {\n if (active) return iconActive;\n if (completed) return iconCompleted;\n return icon;\n }, [active, completed]) || icon;\n\n const iconWithOptions = useMemo(\n () =>\n isValidElement(currentIcon)\n ? cloneElement(currentIcon, {\n color: get(currentIcon, ['props', 'color']) || ['brand-primary', completed ? 600 : 500],\n })\n : currentIcon || index + 1,\n [currentIcon],\n );\n\n return (\n <Item classProps={{ active, completed }}>\n <Wrapper>\n <BulletWrapper>\n <Bullet>{iconWithOptions}</Bullet>\n </BulletWrapper>\n <Label>{label}</Label>\n </Wrapper>\n </Item>\n );\n};\n\nconst wizzardStepProps = {\n label: PropTypes.string.description('Step label'),\n icon: PropTypes.oneOfType([PropTypes.element, PropTypes.string]).description('Default icon or number'),\n iconCompleted: PropTypes.element.description('Icon when the step is completed').defaultValue(Checkmark),\n iconActive: PropTypes.element.description('Icon when the step is active'),\n active: PropTypes.bool.description('Whether the step is active or not').defaultValue(false),\n completed: PropTypes.bool.description('Whether the step is completed or not').defaultValue(false),\n index: PropTypes.number.description('Current item index'),\n};\n\nWizardStep.propTypes = wizzardStepProps;\nWizardStep.displayName = 'WizardStep';\nconst WizzardStepWithSchema = describe(WizardStep);\nWizzardStepWithSchema.propTypes = wizzardStepProps;\n\nexport { WizzardStepWithSchema };\nexport default WizardStep;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACoBL,cAyBZ,YAzBY;AAnBlB,SAAgB,cAAc,SAAS,sBAAsB;AAC7D,SAAS,yBAAyB;AAClC,SAAS,WAAW;AACpB,SAAS,UAAU,iBAAiB;AACpC,SAAS,iBAAiB;AAC1B,SAAS,8BAA8B;AAEvC,MAAM,OAAO,kBAAkB,KAAK,EAAE,GAAG,0BAA0B,MAAM,CAAC,EAAE,QAAQ,UAAU,OAAO;AAAA,EACnG;AAAA,EACA;AACF,EAAE;AACF,MAAM,UAAU,kBAAkB,KAAK,EAAE,GAAG,gCAAgC;AAC5E,MAAM,QAAQ,kBAAkB,MAAM,EAAE,wBAAwB,OAAO;AACvE,MAAM,SAAS,kBAAkB,KAAK,EAAE,wBAAwB,QAAQ;AACxE,MAAM,gBAAgB,kBAAkB,KAAK,EAAE,wBAAwB,gBAAgB;AAEvF,MAAM,aAAa,CAAC;AAAA,EAClB,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,gBAAgB,oBAAC,aAAU;AAAA,EAC3B,aAAa;AAAA,EACb,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,QAAQ;AACV,MAAM;AACJ,QAAM,cACJ,QAAQ,MAAM;AACZ,QAAI;AAAQ,aAAO;AACnB,QAAI;AAAW,aAAO;AACtB,WAAO;AAAA,EACT,GAAG,CAAC,QAAQ,SAAS,CAAC,KAAK;AAE7B,QAAM,kBAAkB;AAAA,IACtB,MACE,eAAe,WAAW,IACtB,aAAa,aAAa;AAAA,MACxB,OAAO,IAAI,aAAa,CAAC,SAAS,OAAO,CAAC,KAAK,CAAC,iBAAiB,YAAY,MAAM,GAAG;AAAA,IACxF,CAAC,IACD,eAAe,QAAQ;AAAA,IAC7B,CAAC,WAAW;AAAA,EACd;AAEA,SACE,oBAAC,QAAK,YAAY,EAAE,QAAQ,UAAU,GACpC,+BAAC,WACC;AAAA,wBAAC,iBACC,8BAAC,UAAQ,2BAAgB,GAC3B;AAAA,IACA,oBAAC,SAAO,iBAAM;AAAA,KAChB,GACF;AAEJ;AAEA,MAAM,mBAAmB;AAAA,EACvB,OAAO,UAAU,OAAO,YAAY,YAAY;AAAA,EAChD,MAAM,UAAU,UAAU,CAAC,UAAU,SAAS,UAAU,MAAM,CAAC,EAAE,YAAY,wBAAwB;AAAA,EACrG,eAAe,UAAU,QAAQ,YAAY,iCAAiC,EAAE,aAAa,SAAS;AAAA,EACtG,YAAY,UAAU,QAAQ,YAAY,8BAA8B;AAAA,EACxE,QAAQ,UAAU,KAAK,YAAY,mCAAmC,EAAE,aAAa,KAAK;AAAA,EAC1F,WAAW,UAAU,KAAK,YAAY,sCAAsC,EAAE,aAAa,KAAK;AAAA,EAChG,OAAO,UAAU,OAAO,YAAY,oBAAoB;AAC1D;AAEA,WAAW,YAAY;AACvB,WAAW,cAAc;AACzB,MAAM,wBAAwB,SAAS,UAAU;AACjD,sBAAsB,YAAY;AAGlC,IAAO,qBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/WizardSteps.js
CHANGED
|
@@ -3,8 +3,8 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import React2, { cloneElement, useMemo } from "react";
|
|
4
4
|
import { describe, PropTypes } from "@elliemae/ds-props-helpers";
|
|
5
5
|
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
6
|
-
import WizardStep from "./WizardStep";
|
|
7
|
-
import { indicatorBlockName } from "./blockNames";
|
|
6
|
+
import WizardStep from "./WizardStep.js";
|
|
7
|
+
import { indicatorBlockName } from "./blockNames.js";
|
|
8
8
|
const StepsWrapper = aggregatedClasses("div")(indicatorBlockName);
|
|
9
9
|
const WizardSteps = ({ current = 0, steps, children, ...otherProps }) => {
|
|
10
10
|
const items = useMemo(() => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/WizardSteps.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\n/* eslint-disable react/no-array-index-key */\nimport React, { cloneElement, useMemo } from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport WizardStep from './WizardStep';\nimport { indicatorBlockName } from './blockNames';\n\nconst StepsWrapper = aggregatedClasses('div')(indicatorBlockName);\n\nconst WizardSteps = ({ current = 0, steps, children, ...otherProps }) => {\n const items = useMemo(() => {\n const mergeStepProps = (step, index) => ({\n index,\n active: current === index,\n completed: index < current,\n });\n\n return steps\n ? steps.map((step, index) => <WizardStep key={index} {...step} {...mergeStepProps(step, index)} />)\n : React.Children.map(children, (item, index) => cloneElement(item, mergeStepProps(item, index)));\n }, [current, children]);\n\n return <StepsWrapper {...otherProps}>{items}</StepsWrapper>;\n};\n\nWizardSteps.Item = WizardStep;\n\nconst wizzardProps = {\n current: PropTypes.number.description('Current active state index').defaultValue(0),\n steps: PropTypes.arrayOf(PropTypes.shape({})).description('Array of steps objects').defaultValue([]).isRequired,\n children: PropTypes.arrayOf(PropTypes.instanceOf(WizardStep)).description('List of WizardStep components'),\n};\n\nWizardSteps.propTypes = wizzardProps;\nWizardSteps.displayName = 'WizardSteps';\nconst WizzardWithSchema = describe(WizardSteps);\nWizzardWithSchema.propTypes = wizzardProps;\n\nexport { WizzardWithSchema };\nexport default WizardSteps;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACmBY;AAjBnC,OAAOA,UAAS,cAAc,eAAe;AAC7C,SAAS,UAAU,iBAAiB;AACpC,SAAS,yBAAyB;AAClC,OAAO,gBAAgB;AACvB,SAAS,0BAA0B;AAEnC,MAAM,eAAe,kBAAkB,KAAK,EAAE,kBAAkB;AAEhE,MAAM,cAAc,CAAC,EAAE,UAAU,GAAG,OAAO,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\n/* eslint-disable react/no-array-index-key */\nimport React, { cloneElement, useMemo } from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport WizardStep from './WizardStep.js';\nimport { indicatorBlockName } from './blockNames.js';\n\nconst StepsWrapper = aggregatedClasses('div')(indicatorBlockName);\n\nconst WizardSteps = ({ current = 0, steps, children, ...otherProps }) => {\n const items = useMemo(() => {\n const mergeStepProps = (step, index) => ({\n index,\n active: current === index,\n completed: index < current,\n });\n\n return steps\n ? steps.map((step, index) => <WizardStep key={index} {...step} {...mergeStepProps(step, index)} />)\n : React.Children.map(children, (item, index) => cloneElement(item, mergeStepProps(item, index)));\n }, [current, children]);\n\n return <StepsWrapper {...otherProps}>{items}</StepsWrapper>;\n};\n\nWizardSteps.Item = WizardStep;\n\nconst wizzardProps = {\n current: PropTypes.number.description('Current active state index').defaultValue(0),\n steps: PropTypes.arrayOf(PropTypes.shape({})).description('Array of steps objects').defaultValue([]).isRequired,\n children: PropTypes.arrayOf(PropTypes.instanceOf(WizardStep)).description('List of WizardStep components'),\n};\n\nWizardSteps.propTypes = wizzardProps;\nWizardSteps.displayName = 'WizardSteps';\nconst WizzardWithSchema = describe(WizardSteps);\nWizzardWithSchema.propTypes = wizzardProps;\n\nexport { WizzardWithSchema };\nexport default WizardSteps;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACmBY;AAjBnC,OAAOA,UAAS,cAAc,eAAe;AAC7C,SAAS,UAAU,iBAAiB;AACpC,SAAS,yBAAyB;AAClC,OAAO,gBAAgB;AACvB,SAAS,0BAA0B;AAEnC,MAAM,eAAe,kBAAkB,KAAK,EAAE,kBAAkB;AAEhE,MAAM,cAAc,CAAC,EAAE,UAAU,GAAG,OAAO,UAAU,GAAG,WAAW,MAAM;AACvE,QAAM,QAAQ,QAAQ,MAAM;AAC1B,UAAM,iBAAiB,CAAC,MAAM,WAAW;AAAA,MACvC;AAAA,MACA,QAAQ,YAAY;AAAA,MACpB,WAAW,QAAQ;AAAA,IACrB;AAEA,WAAO,QACH,MAAM,IAAI,CAAC,MAAM,UAAU,oBAAC,cAAwB,GAAG,MAAO,GAAG,eAAe,MAAM,KAAK,KAA/C,KAAkD,CAAE,IAChGA,OAAM,SAAS,IAAI,UAAU,CAAC,MAAM,UAAU,aAAa,MAAM,eAAe,MAAM,KAAK,CAAC,CAAC;AAAA,EACnG,GAAG,CAAC,SAAS,QAAQ,CAAC;AAEtB,SAAO,oBAAC,gBAAc,GAAG,YAAa,iBAAM;AAC9C;AAEA,YAAY,OAAO;AAEnB,MAAM,eAAe;AAAA,EACnB,SAAS,UAAU,OAAO,YAAY,4BAA4B,EAAE,aAAa,CAAC;AAAA,EAClF,OAAO,UAAU,QAAQ,UAAU,MAAM,CAAC,CAAC,CAAC,EAAE,YAAY,wBAAwB,EAAE,aAAa,CAAC,CAAC,EAAE;AAAA,EACrG,UAAU,UAAU,QAAQ,UAAU,WAAW,UAAU,CAAC,EAAE,YAAY,+BAA+B;AAC3G;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,oBAAoB,SAAS,WAAW;AAC9C,kBAAkB,YAAY;AAG9B,IAAO,sBAAQ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import WizardStepsIndicator, { WizzardWithSchema } from "./WizardSteps";
|
|
3
|
-
import WizardStep, { WizzardStepWithSchema } from "./WizardStep";
|
|
4
|
-
import useWizard from "./useWizard";
|
|
2
|
+
import WizardStepsIndicator, { WizzardWithSchema } from "./WizardSteps.js";
|
|
3
|
+
import WizardStep, { WizzardStepWithSchema } from "./WizardStep.js";
|
|
4
|
+
import useWizard from "./useWizard.js";
|
|
5
5
|
export {
|
|
6
6
|
WizardStep,
|
|
7
7
|
WizardStepsIndicator,
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import WizardStepsIndicator, { WizzardWithSchema } from './WizardSteps';\nimport WizardStep, { WizzardStepWithSchema } from './WizardStep';\nimport useWizard from './useWizard';\n\nexport { useWizard, WizardStepsIndicator, WizardStep, WizzardWithSchema, WizzardStepWithSchema };\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import WizardStepsIndicator, { WizzardWithSchema } from './WizardSteps.js';\nimport WizardStep, { WizzardStepWithSchema } from './WizardStep.js';\nimport useWizard from './useWizard.js';\n\nexport { useWizard, WizardStepsIndicator, WizardStep, WizzardWithSchema, WizzardStepWithSchema };\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAO,wBAAwB,yBAAyB;AACxD,OAAO,cAAc,6BAA6B;AAClD,OAAO,eAAe;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
declare const WizardStep: {
|
|
2
3
|
({ label, icon, iconCompleted, iconActive, active, completed, index, }: {
|
|
3
4
|
label?: string | undefined;
|
|
@@ -9,17 +10,17 @@ declare const WizardStep: {
|
|
|
9
10
|
index?: number | undefined;
|
|
10
11
|
}): JSX.Element;
|
|
11
12
|
propTypes: {
|
|
12
|
-
label: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
13
|
-
icon: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
14
|
-
iconCompleted: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
15
|
-
iconActive: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
16
|
-
active: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
17
|
-
completed: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
18
|
-
index: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
13
|
+
label: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
14
|
+
icon: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
15
|
+
iconCompleted: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
16
|
+
iconActive: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
17
|
+
active: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
18
|
+
completed: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
19
|
+
index: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
19
20
|
};
|
|
20
21
|
displayName: string;
|
|
21
22
|
};
|
|
22
|
-
declare const WizzardStepWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").DocumentedReactComponent<{
|
|
23
|
+
declare const WizzardStepWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<{
|
|
23
24
|
label?: string | undefined;
|
|
24
25
|
icon?: null | undefined;
|
|
25
26
|
iconCompleted?: JSX.Element | undefined;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
declare const WizardSteps: {
|
|
2
3
|
({ current, steps, children, ...otherProps }: {
|
|
3
4
|
[x: string]: any;
|
|
@@ -16,24 +17,24 @@ declare const WizardSteps: {
|
|
|
16
17
|
index?: number | undefined;
|
|
17
18
|
}): JSX.Element;
|
|
18
19
|
propTypes: {
|
|
19
|
-
label: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
20
|
-
icon: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
21
|
-
iconCompleted: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
22
|
-
iconActive: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
23
|
-
active: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
24
|
-
completed: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
25
|
-
index: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
20
|
+
label: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
21
|
+
icon: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
22
|
+
iconCompleted: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
23
|
+
iconActive: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
24
|
+
active: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
25
|
+
completed: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
26
|
+
index: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
26
27
|
};
|
|
27
28
|
displayName: string;
|
|
28
29
|
};
|
|
29
30
|
propTypes: {
|
|
30
|
-
current: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
31
|
-
steps: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
32
|
-
children: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
31
|
+
current: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
32
|
+
steps: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
33
|
+
children: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
33
34
|
};
|
|
34
35
|
displayName: string;
|
|
35
36
|
};
|
|
36
|
-
declare const WizzardWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").DocumentedReactComponent<{
|
|
37
|
+
declare const WizzardWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<{
|
|
37
38
|
[x: string]: any;
|
|
38
39
|
current?: number | undefined;
|
|
39
40
|
steps: any;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import WizardStepsIndicator, { WizzardWithSchema } from './WizardSteps';
|
|
2
|
-
import WizardStep, { WizzardStepWithSchema } from './WizardStep';
|
|
3
|
-
import useWizard from './useWizard';
|
|
1
|
+
import WizardStepsIndicator, { WizzardWithSchema } from './WizardSteps.js';
|
|
2
|
+
import WizardStep, { WizzardStepWithSchema } from './WizardStep.js';
|
|
3
|
+
import useWizard from './useWizard.js';
|
|
4
4
|
export { useWizard, WizardStepsIndicator, WizardStep, WizzardWithSchema, WizzardStepWithSchema };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-wizard",
|
|
3
|
-
"version": "3.16.
|
|
3
|
+
"version": "3.16.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Wizard",
|
|
6
6
|
"files": [
|
|
@@ -55,10 +55,10 @@
|
|
|
55
55
|
"indent": 4
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@elliemae/ds-classnames": "3.16.
|
|
59
|
-
"@elliemae/ds-icons": "3.16.
|
|
60
|
-
"@elliemae/ds-props-helpers": "3.16.
|
|
61
|
-
"@elliemae/ds-utilities": "3.16.
|
|
58
|
+
"@elliemae/ds-classnames": "3.16.1",
|
|
59
|
+
"@elliemae/ds-icons": "3.16.1",
|
|
60
|
+
"@elliemae/ds-props-helpers": "3.16.1",
|
|
61
|
+
"@elliemae/ds-utilities": "3.16.1"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"lodash": "^4.17.21",
|