@elliemae/ds-stepper 2.2.0-next.6 → 2.3.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/esm/Stepper.js CHANGED
@@ -1,51 +1,40 @@
1
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
- import _jsx from '@babel/runtime/helpers/esm/jsx';
3
- import 'core-js/modules/esnext.async-iterator.map.js';
4
- import 'core-js/modules/esnext.iterator.map.js';
5
- import 'core-js/modules/esnext.async-iterator.filter.js';
6
- import 'core-js/modules/esnext.iterator.constructor.js';
7
- import 'core-js/modules/esnext.iterator.filter.js';
8
- import 'core-js/modules/esnext.async-iterator.for-each.js';
9
- import 'core-js/modules/esnext.iterator.for-each.js';
10
- import React from 'react';
11
- import { uid } from 'uid';
12
- import { describe } from 'react-desc';
13
- import { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes, useGetGlobalAttributes } from '@elliemae/ds-props-helpers';
14
- import { dsStepperProps, defaultProps } from './props.js';
15
- import { StepperWrapper, Step } from './styled.js';
16
- import { jsx } from 'react/jsx-runtime';
17
-
18
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
19
-
20
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
21
-
22
- const DSStepper = props => {
1
+ import * as React from "react";
2
+ import React2 from "react";
3
+ import { uid } from "uid";
4
+ import { describe } from "react-desc";
5
+ import {
6
+ useMemoMergePropsWithDefault,
7
+ useValidateTypescriptPropTypes,
8
+ getAriaProps,
9
+ getDataProps
10
+ } from "@elliemae/ds-props-helpers";
11
+ import { dsStepperProps, defaultProps } from "./props";
12
+ import { Step, StepperWrapper } from "./styled";
13
+ const DSStepper = (props) => {
23
14
  const propsWithDefaults = useMemoMergePropsWithDefault(props, defaultProps);
24
15
  useValidateTypescriptPropTypes(propsWithDefaults, dsStepperProps);
25
- const {
16
+ const { steps, current, visited } = propsWithDefaults;
17
+ const stepsArray = React2.useMemo(() => new Array(steps).fill(1), [steps]);
18
+ return /* @__PURE__ */ React2.createElement(StepperWrapper, {
26
19
  steps,
27
20
  current,
28
- visited
29
- } = propsWithDefaults;
30
- const stepsArray = React.useMemo(() => new Array(steps).fill(1), [steps]);
31
- const globalAttributes = useGetGlobalAttributes(propsWithDefaults);
32
- return /*#__PURE__*/jsx(StepperWrapper, _objectSpread(_objectSpread({
33
- steps: steps,
34
- current: current,
35
- visited: visited
36
- }, globalAttributes), {}, {
37
- children: stepsArray.map((item, index) => /*#__PURE__*/_jsx(Step // eslint-disable-next-line react/no-array-index-key
38
- , {
39
- active: current === index,
40
- visited: visited.includes(index),
41
- "data-testid": props['data-testid'] ? "".concat(props['data-testid'], "-step") : undefined,
42
- "data-active": current === index,
43
- "data-visited": visited.includes(index)
44
- }, "".concat(uid(4), "step-key-").concat(index)))
45
- }));
21
+ visited,
22
+ ...getAriaProps(props),
23
+ ...getDataProps(props)
24
+ }, stepsArray.map((item, index) => /* @__PURE__ */ React2.createElement(Step, {
25
+ key: `${uid(4)}step-key-${index}`,
26
+ active: current === index,
27
+ visited: visited.includes(index),
28
+ "data-testid": props["data-testid"] ? `${props["data-testid"]}-step` : void 0,
29
+ "data-active": current === index,
30
+ "data-visited": visited.includes(index)
31
+ })));
46
32
  };
47
-
33
+ DSStepper.propTypes = dsStepperProps;
48
34
  const StepperWithSchema = describe(DSStepper);
49
35
  StepperWithSchema.propTypes = dsStepperProps;
50
-
51
- export { DSStepper, StepperWithSchema };
36
+ export {
37
+ DSStepper,
38
+ StepperWithSchema
39
+ };
40
+ //# sourceMappingURL=Stepper.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/Stepper.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { uid } from 'uid';\nimport { describe } from 'react-desc';\nimport {\n useMemoMergePropsWithDefault,\n useValidateTypescriptPropTypes,\n getAriaProps,\n getDataProps,\n} from '@elliemae/ds-props-helpers';\nimport { dsStepperProps, defaultProps, DSStepperInternalsT } from './props';\nimport { Step, StepperWrapper } from './styled';\n\nconst DSStepper = (props: DSStepperInternalsT.StepperPropsT) => {\n const propsWithDefaults = useMemoMergePropsWithDefault(props, defaultProps) as DSStepperInternalsT.StepperPropsT;\n useValidateTypescriptPropTypes(propsWithDefaults, dsStepperProps);\n\n const { steps, current, visited } = propsWithDefaults;\n const stepsArray = React.useMemo(() => new Array(steps).fill(1) as number[], [steps]);\n return (\n <StepperWrapper steps={steps} current={current} visited={visited} {...getAriaProps(props)} {...getDataProps(props)}>\n {stepsArray.map((item, index) => (\n <Step\n // eslint-disable-next-line react/no-array-index-key\n key={`${uid(4)}step-key-${index}`}\n active={current === index}\n visited={visited.includes(index)}\n data-testid={props['data-testid'] ? `${props['data-testid'] as string}-step` : undefined}\n data-active={current === index}\n data-visited={visited.includes(index)}\n />\n ))}\n </StepperWrapper>\n );\n};\n\nDSStepper.propTypes = dsStepperProps;\n\nconst StepperWithSchema = describe(DSStepper);\nStepperWithSchema.propTypes = dsStepperProps;\n\nexport { DSStepper, StepperWithSchema };\n"],
5
+ "mappings": "AAAA;ACAA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA;AACA;AAEA,MAAM,YAAY,CAAC,UAA6C;AAC9D,QAAM,oBAAoB,6BAA6B,OAAO;AAC9D,iCAA+B,mBAAmB;AAElD,QAAM,EAAE,OAAO,SAAS,YAAY;AACpC,QAAM,aAAa,OAAM,QAAQ,MAAM,IAAI,MAAM,OAAO,KAAK,IAAgB,CAAC;AAC9E,SACE,qCAAC,gBAAD;AAAA,IAAgB;AAAA,IAAc;AAAA,IAAkB;AAAA,OAAsB,aAAa;AAAA,OAAY,aAAa;AAAA,KACzG,WAAW,IAAI,CAAC,MAAM,UACrB,qCAAC,MAAD;AAAA,IAEE,KAAK,GAAG,IAAI,cAAc;AAAA,IAC1B,QAAQ,YAAY;AAAA,IACpB,SAAS,QAAQ,SAAS;AAAA,IAC1B,eAAa,MAAM,iBAAiB,GAAG,MAAM,wBAAkC;AAAA,IAC/E,eAAa,YAAY;AAAA,IACzB,gBAAc,QAAQ,SAAS;AAAA;AAAA;AAOzC,UAAU,YAAY;AAEtB,MAAM,oBAAoB,SAAS;AACnC,kBAAkB,YAAY;",
6
+ "names": []
7
+ }
@@ -1,51 +1,37 @@
1
- import 'core-js/modules/esnext.async-iterator.filter.js';
2
- import 'core-js/modules/esnext.iterator.constructor.js';
3
- import 'core-js/modules/esnext.iterator.filter.js';
4
- import 'core-js/modules/esnext.async-iterator.for-each.js';
5
- import 'core-js/modules/esnext.iterator.for-each.js';
6
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
7
- import _jsx from '@babel/runtime/helpers/esm/jsx';
8
- import 'react';
9
- import { describe } from 'react-desc';
10
- import { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes, useGetGlobalAttributes } from '@elliemae/ds-props-helpers';
11
- import { BUTTON_TYPES } from '@elliemae/ds-button';
12
- import { ChevronLeft, ChevronRight } from '@elliemae/ds-icons';
13
- import { dsStepperButtonProps, defaultButtonProps } from './props.js';
14
- import { StyledButton, Label } from './styled.js';
15
- import { jsxs } from 'react/jsx-runtime';
16
-
17
- var _ChevronLeft, _ChevronRight;
18
-
19
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
20
-
21
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
22
-
23
- const DSStepperButton = props => {
1
+ import * as React from "react";
2
+ import React2 from "react";
3
+ import { describe } from "react-desc";
4
+ import {
5
+ useMemoMergePropsWithDefault,
6
+ useValidateTypescriptPropTypes,
7
+ getAriaProps,
8
+ getDataProps
9
+ } from "@elliemae/ds-props-helpers";
10
+ import { BUTTON_TYPES } from "@elliemae/ds-button";
11
+ import { ChevronLeft, ChevronRight } from "@elliemae/ds-icons";
12
+ import { dsStepperButtonProps, defaultButtonProps } from "./props";
13
+ import { StyledButton, Label } from "./styled";
14
+ const DSStepperButton = (props) => {
24
15
  const propsWithDefaults = useMemoMergePropsWithDefault(props, defaultButtonProps);
25
16
  useValidateTypescriptPropTypes(propsWithDefaults, dsStepperButtonProps);
26
- const {
27
- chevron,
28
- fontSize,
29
- label,
17
+ const { chevron, fontSize, label, disabled, onClick, innerRef } = propsWithDefaults;
18
+ return /* @__PURE__ */ React2.createElement(StyledButton, {
30
19
  disabled,
31
20
  onClick,
32
- innerRef
33
- } = propsWithDefaults;
34
- const globalAttributes = useGetGlobalAttributes(propsWithDefaults);
35
- return /*#__PURE__*/jsxs(StyledButton, _objectSpread(_objectSpread({
36
- disabled: disabled,
37
- onClick: onClick,
38
- innerRef: innerRef,
21
+ innerRef,
39
22
  buttonType: BUTTON_TYPES.TEXT,
40
- fontSize: fontSize
41
- }, globalAttributes), {}, {
42
- children: [chevron === 'left' ? _ChevronLeft || (_ChevronLeft = /*#__PURE__*/_jsx(ChevronLeft, {})) : null, /*#__PURE__*/_jsx(Label, {
43
- value: label
44
- }), chevron === 'right' ? _ChevronRight || (_ChevronRight = /*#__PURE__*/_jsx(ChevronRight, {})) : null]
45
- }));
23
+ fontSize,
24
+ ...getAriaProps(props),
25
+ ...getDataProps(props)
26
+ }, chevron === "left" ? /* @__PURE__ */ React2.createElement(ChevronLeft, null) : null, /* @__PURE__ */ React2.createElement(Label, {
27
+ value: label
28
+ }), chevron === "right" ? /* @__PURE__ */ React2.createElement(ChevronRight, null) : null);
46
29
  };
47
-
30
+ DSStepperButton.propTypes = dsStepperButtonProps;
48
31
  const DSStepperButtonWithSchema = describe(DSStepperButton);
49
32
  DSStepperButtonWithSchema.propTypes = dsStepperButtonProps;
50
-
51
- export { DSStepperButton, DSStepperButtonWithSchema };
33
+ export {
34
+ DSStepperButton,
35
+ DSStepperButtonWithSchema
36
+ };
37
+ //# sourceMappingURL=StepperButton.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/StepperButton.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe } from 'react-desc';\nimport {\n useMemoMergePropsWithDefault,\n useValidateTypescriptPropTypes,\n getAriaProps,\n getDataProps,\n} from '@elliemae/ds-props-helpers';\nimport { BUTTON_TYPES } from '@elliemae/ds-button';\nimport { ChevronLeft, ChevronRight } from '@elliemae/ds-icons';\nimport { dsStepperButtonProps, defaultButtonProps, DSStepperInternalsT } from './props';\nimport { StyledButton, Label } from './styled';\n\nconst DSStepperButton = (props: DSStepperInternalsT.StepperButtonPropsT) => {\n const propsWithDefaults = useMemoMergePropsWithDefault(\n props,\n defaultButtonProps,\n ) as DSStepperInternalsT.StepperButtonPropsT;\n useValidateTypescriptPropTypes(propsWithDefaults, dsStepperButtonProps);\n\n const { chevron, fontSize, label, disabled, onClick, innerRef } = propsWithDefaults;\n\n return (\n <StyledButton\n disabled={disabled}\n onClick={onClick}\n innerRef={innerRef}\n buttonType={BUTTON_TYPES.TEXT}\n fontSize={fontSize}\n {...getAriaProps(props)}\n {...getDataProps(props)}\n >\n {chevron === 'left' ? <ChevronLeft /> : null}\n <Label value={label} />\n {chevron === 'right' ? <ChevronRight /> : null}\n </StyledButton>\n );\n};\n\nDSStepperButton.propTypes = dsStepperButtonProps;\n\nconst DSStepperButtonWithSchema = describe(DSStepperButton);\nDSStepperButtonWithSchema.propTypes = dsStepperButtonProps;\n\nexport { DSStepperButton, DSStepperButtonWithSchema };\n"],
5
+ "mappings": "AAAA;ACAA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA;AACA;AACA;AACA;AAEA,MAAM,kBAAkB,CAAC,UAAmD;AAC1E,QAAM,oBAAoB,6BACxB,OACA;AAEF,iCAA+B,mBAAmB;AAElD,QAAM,EAAE,SAAS,UAAU,OAAO,UAAU,SAAS,aAAa;AAElE,SACE,qCAAC,cAAD;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY,aAAa;AAAA,IACzB;AAAA,OACI,aAAa;AAAA,OACb,aAAa;AAAA,KAEhB,YAAY,SAAS,qCAAC,aAAD,QAAkB,MACxC,qCAAC,OAAD;AAAA,IAAO,OAAO;AAAA,MACb,YAAY,UAAU,qCAAC,cAAD,QAAmB;AAAA;AAKhD,gBAAgB,YAAY;AAE5B,MAAM,4BAA4B,SAAS;AAC3C,0BAA0B,YAAY;",
6
+ "names": []
7
+ }
package/esm/index.js CHANGED
@@ -1,2 +1,4 @@
1
- export { DSStepper, StepperWithSchema } from './Stepper.js';
2
- export { DSStepperButton, DSStepperButtonWithSchema } from './StepperButton.js';
1
+ import * as React from "react";
2
+ export * from "./Stepper";
3
+ export * from "./StepperButton";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './Stepper';\nexport * from './StepperButton';\n"],
5
+ "mappings": "AAAA;ACAA;AACA;",
6
+ "names": []
7
+ }
package/esm/props.js CHANGED
@@ -1,44 +1,44 @@
1
- import 'core-js/modules/esnext.async-iterator.filter.js';
2
- import 'core-js/modules/esnext.iterator.constructor.js';
3
- import 'core-js/modules/esnext.iterator.filter.js';
4
- import 'core-js/modules/esnext.async-iterator.for-each.js';
5
- import 'core-js/modules/esnext.iterator.for-each.js';
6
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
7
- import { noop } from 'lodash';
8
- import { PropTypes } from 'react-desc';
9
- import { globalAttributesPropTypes } from '@elliemae/ds-props-helpers';
10
-
11
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
12
-
13
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1
+ import * as React from "react";
2
+ import { noop } from "lodash";
3
+ import { PropTypes } from "react-desc";
14
4
  const BUTTON_SIZES = {
15
- normal: 'normal',
16
- large: 'large'
5
+ normal: "normal",
6
+ large: "large"
7
+ };
8
+ const CHEVRON_TYPE = {
9
+ left: "left",
10
+ right: "right"
17
11
  };
18
12
  const defaultProps = {
19
13
  steps: 5,
20
- current: undefined,
14
+ current: void 0,
21
15
  visited: []
22
16
  };
23
- const dsStepperProps = _objectSpread({
24
- steps: PropTypes.number.description('Number of steps').isRequired,
25
- current: PropTypes.number.description('Index of active step'),
26
- visited: PropTypes.arrayOf(PropTypes.number).description('Array of visited steps').isRequired
27
- }, globalAttributesPropTypes);
17
+ const dsStepperProps = {
18
+ steps: PropTypes.number.description("Number of steps").isRequired,
19
+ current: PropTypes.number.description("Index of active step"),
20
+ visited: PropTypes.arrayOf(PropTypes.number).description("Array of visited steps").isRequired
21
+ };
28
22
  const defaultButtonProps = {
29
- chevron: undefined,
23
+ chevron: void 0,
30
24
  fontSize: BUTTON_SIZES.normal,
31
25
  disabled: false,
32
26
  onClick: noop
33
27
  };
34
- const dsStepperButtonProps = _objectSpread(_objectSpread({
35
- chevron: PropTypes.oneOf(['left', 'right', null]).description('Chevron icon position, if null/undefined no chevron will be shown').defaultValue(null),
36
- fontSize: PropTypes.oneOf(['normal', 'large']).description('Label size, used for marking last step').defaultValue('normal'),
37
- innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description('Inner ref to button component.')
38
- }, globalAttributesPropTypes), {}, {
39
- disabled: PropTypes.bool.description('Adds disabled state.'),
40
- onClick: PropTypes.func.description('OnClick callback handler.').defaultValue('()=>{}'),
41
- label: PropTypes.string.description('Text Label, this only accepts text, no custom JSX').isRequired
42
- });
43
-
44
- export { defaultButtonProps, defaultProps, dsStepperButtonProps, dsStepperProps };
28
+ const dsStepperButtonProps = {
29
+ chevron: PropTypes.oneOf(["left", "right", null]).description("Chevron icon position, if null/undefined no chevron will be shown").defaultValue(null),
30
+ fontSize: PropTypes.oneOf(["normal", "large"]).description("Label size, used for marking last step").defaultValue("normal"),
31
+ label: PropTypes.string.description("Text Label, this only accepts text, no custom JSX").isRequired,
32
+ disabled: PropTypes.bool.description("Adds disabled state."),
33
+ onClick: PropTypes.func.description("OnClick callback handler.").defaultValue("()=>{}"),
34
+ innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description("Inner ref to button component."),
35
+ "aria-": PropTypes.oneOfType([PropTypes.string, PropTypes.bool]).description("accept all the aria-* props, MUST receive aria-label"),
36
+ "data-": PropTypes.oneOfType([PropTypes.string, PropTypes.bool]).description("accept all the data-* props")
37
+ };
38
+ export {
39
+ defaultButtonProps,
40
+ defaultProps,
41
+ dsStepperButtonProps,
42
+ dsStepperProps
43
+ };
44
+ //# sourceMappingURL=props.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/props.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { noop } from 'lodash';\nimport { PropTypes } from 'react-desc';\n\nconst BUTTON_SIZES = {\n normal: 'normal',\n large: 'large',\n} as const;\n\ntype ButtonSizesT = typeof BUTTON_SIZES[keyof typeof BUTTON_SIZES];\n\nconst CHEVRON_TYPE = {\n left: 'left',\n right: 'right',\n} as const;\n\ntype ChevronT = typeof CHEVRON_TYPE[keyof typeof CHEVRON_TYPE];\n\nexport declare namespace DSStepperInternalsT {\n export interface StepperPropsT {\n [property: string]: unknown;\n steps: number;\n current: number | null;\n visited: number[];\n }\n\n export interface StepperButtonPropsT {\n [property: string]: unknown;\n chevron?: ChevronT;\n fontSize?: ButtonSizesT;\n label: string;\n disabled?: boolean;\n onClick: VoidFunction;\n innerRef?: React.MutableRefObject<HTMLButtonElement> | ((_ref: HTMLButtonElement) => void);\n 'aria-label'?: string;\n 'aria-pressed'?: boolean;\n 'data-testid'?: string;\n }\n}\nexport const defaultProps = {\n steps: 5,\n current: undefined,\n visited: [],\n};\n\nexport const dsStepperProps = {\n steps: PropTypes.number.description('Number of steps').isRequired,\n current: PropTypes.number.description('Index of active step'),\n visited: PropTypes.arrayOf(PropTypes.number).description('Array of visited steps').isRequired,\n};\n\nexport const defaultButtonProps = {\n chevron: undefined,\n fontSize: BUTTON_SIZES.normal,\n disabled: false,\n onClick: noop,\n};\n\nexport const dsStepperButtonProps = {\n chevron: PropTypes.oneOf(['left', 'right', null])\n .description('Chevron icon position, if null/undefined no chevron will be shown')\n .defaultValue(null),\n fontSize: PropTypes.oneOf(['normal', 'large'])\n .description('Label size, used for marking last step')\n .defaultValue('normal'),\n label: PropTypes.string.description('Text Label, this only accepts text, no custom JSX').isRequired,\n disabled: PropTypes.bool.description('Adds disabled state.'),\n onClick: PropTypes.func.description('OnClick callback handler.').defaultValue('()=>{}'),\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description('Inner ref to button component.'),\n 'aria-': PropTypes.oneOfType([PropTypes.string, PropTypes.bool]).description(\n 'accept all the aria-* props, MUST receive aria-label',\n ),\n 'data-': PropTypes.oneOfType([PropTypes.string, PropTypes.bool]).description('accept all the data-* props'),\n};\n"],
5
+ "mappings": "AAAA;ACAA;AACA;AAEA,MAAM,eAAe;AAAA,EACnB,QAAQ;AAAA,EACR,OAAO;AAAA;AAKT,MAAM,eAAe;AAAA,EACnB,MAAM;AAAA,EACN,OAAO;AAAA;AA0BF,MAAM,eAAe;AAAA,EAC1B,OAAO;AAAA,EACP,SAAS;AAAA,EACT,SAAS;AAAA;AAGJ,MAAM,iBAAiB;AAAA,EAC5B,OAAO,UAAU,OAAO,YAAY,mBAAmB;AAAA,EACvD,SAAS,UAAU,OAAO,YAAY;AAAA,EACtC,SAAS,UAAU,QAAQ,UAAU,QAAQ,YAAY,0BAA0B;AAAA;AAG9E,MAAM,qBAAqB;AAAA,EAChC,SAAS;AAAA,EACT,UAAU,aAAa;AAAA,EACvB,UAAU;AAAA,EACV,SAAS;AAAA;AAGJ,MAAM,uBAAuB;AAAA,EAClC,SAAS,UAAU,MAAM,CAAC,QAAQ,SAAS,OACxC,YAAY,qEACZ,aAAa;AAAA,EAChB,UAAU,UAAU,MAAM,CAAC,UAAU,UAClC,YAAY,0CACZ,aAAa;AAAA,EAChB,OAAO,UAAU,OAAO,YAAY,qDAAqD;AAAA,EACzF,UAAU,UAAU,KAAK,YAAY;AAAA,EACrC,SAAS,UAAU,KAAK,YAAY,6BAA6B,aAAa;AAAA,EAC9E,UAAU,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,OAAO,YAAY;AAAA,EAC9E,SAAS,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,OAAO,YAC/D;AAAA,EAEF,SAAS,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,OAAO,YAAY;AAAA;",
6
+ "names": []
7
+ }
package/esm/styled.js CHANGED
@@ -1,18 +1,40 @@
1
- import styled from 'styled-components';
2
- import { DSButtonV2 } from '@elliemae/ds-button';
3
- import { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';
4
-
5
- const StepperWrapper = /*#__PURE__*/styled.div.withConfig({
6
- componentId: "sc-fgtqnq-0"
7
- })(["display:grid;align-items:center;grid-template-columns repeat(", ",1fr);column-gap:", ";"], props => props.steps, props => props.steps >= 8 ? props.theme.space.xxxs : props.theme.space.xxs);
8
- const Step = /*#__PURE__*/styled.div.withConfig({
9
- componentId: "sc-fgtqnq-1"
10
- })(["display:grid;border-radius:1px;height:", ";background:", ";"], props => props.active ? '5px' : '3px', props => props.active || props.visited ? props.theme.colors.brand[700] : '#A9B1BE');
11
- const Label = /*#__PURE__*/styled(SimpleTruncatedTooltipText).withConfig({
12
- componentId: "sc-fgtqnq-2"
13
- })(["position:relative;top:1px;"]);
14
- const StyledButton = /*#__PURE__*/styled(DSButtonV2).withConfig({
15
- componentId: "sc-fgtqnq-3"
16
- })(["white-space:nowrap;overflow:hidden;max-width:100%;padding-left:", ";padding-right:", ";color:", ";& > span:not(.em-ds-icon){position:relative;top:", ";font-size:", ";}"], props => props.theme.space.xxs, props => props.theme.space.xxs, props => props.theme.colors.brand[600], props => props.fontSize === 'large' ? '2px' : '1px', props => props.fontSize === 'large' ? '22px' : '18px');
17
-
18
- export { Label, Step, StepperWrapper, StyledButton };
1
+ import * as React from "react";
2
+ import styled from "styled-components";
3
+ import { DSButtonV2 } from "@elliemae/ds-button";
4
+ import { SimpleTruncatedTooltipText } from "@elliemae/ds-truncated-tooltip-text";
5
+ const StepperWrapper = styled.div`
6
+ display: grid;
7
+ align-items: flex-end;
8
+ grid-template-columns repeat(${(props) => props.steps}, 1fr);
9
+ column-gap: ${(props) => props.steps >= 8 ? props.theme.space.xxxs : props.theme.space.xxs};
10
+ `;
11
+ const Step = styled.div`
12
+ display: grid;
13
+ border-radius: 1px;
14
+ height: ${(props) => props.active ? "5px" : "3px"};
15
+ background: ${(props) => props.active || props.visited ? props.theme.colors.brand[700] : "#A9B1BE"};
16
+ `;
17
+ const Label = styled(SimpleTruncatedTooltipText)`
18
+ position: relative;
19
+ top: 1px;
20
+ `;
21
+ const StyledButton = styled(DSButtonV2)`
22
+ white-space: nowrap;
23
+ overflow: hidden;
24
+ max-width: 100%;
25
+ padding-left: ${(props) => props.theme.space.xxs};
26
+ padding-right: ${(props) => props.theme.space.xxs};
27
+ color: ${(props) => props.theme.colors.brand[600]};
28
+ & > span:not(.em-ds-icon) {
29
+ position: relative;
30
+ top: ${(props) => props.fontSize === "large" ? "2px" : "1px"};
31
+ font-size: ${(props) => props.fontSize === "large" ? "22px" : "18px"};
32
+ }
33
+ `;
34
+ export {
35
+ Label,
36
+ Step,
37
+ StepperWrapper,
38
+ StyledButton
39
+ };
40
+ //# sourceMappingURL=styled.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/styled.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import styled from 'styled-components';\nimport { DSButtonV2 } from '@elliemae/ds-button';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { DSStepperInternalsT } from './props';\n\nexport const StepperWrapper = styled.div`\n display: grid;\n align-items: flex-end;\n grid-template-columns repeat(${(props: DSStepperInternalsT.StepperPropsT) => props.steps}, 1fr);\n column-gap: ${(props) => (props.steps >= 8 ? props.theme.space.xxxs : props.theme.space.xxs)};\n`;\n\ninterface StepProps {\n active: boolean;\n visited: boolean;\n}\n\nexport const Step = styled.div<StepProps>`\n display: grid;\n border-radius: 1px;\n height: ${(props) => (props.active ? '5px' : '3px')};\n background: ${(props) => (props.active || props.visited ? props.theme.colors.brand[700] : '#A9B1BE')};\n`;\n\nexport const Label = styled(SimpleTruncatedTooltipText)`\n position: relative;\n top: 1px;\n`;\n\nexport const StyledButton = styled(DSButtonV2)`\n white-space: nowrap;\n overflow: hidden;\n max-width: 100%;\n padding-left: ${(props) => props.theme.space.xxs};\n padding-right: ${(props) => props.theme.space.xxs};\n color: ${(props) => props.theme.colors.brand[600]};\n & > span:not(.em-ds-icon) {\n position: relative;\n top: ${(props: DSStepperInternalsT.StepperButtonPropsT) => (props.fontSize === 'large' ? '2px' : '1px')};\n font-size: ${(props: DSStepperInternalsT.StepperButtonPropsT) => (props.fontSize === 'large' ? '22px' : '18px')};\n }\n`;\n"],
5
+ "mappings": "AAAA;ACAA;AACA;AACA;AAGO,MAAM,iBAAiB,OAAO;AAAA;AAAA;AAAA,mCAGF,CAAC,UAA6C,MAAM;AAAA,kBACrE,CAAC,UAAW,MAAM,SAAS,IAAI,MAAM,MAAM,MAAM,OAAO,MAAM,MAAM,MAAM;AAAA;AAQrF,MAAM,OAAO,OAAO;AAAA;AAAA;AAAA,YAGf,CAAC,UAAW,MAAM,SAAS,QAAQ;AAAA,gBAC/B,CAAC,UAAW,MAAM,UAAU,MAAM,UAAU,MAAM,MAAM,OAAO,MAAM,OAAO;AAAA;AAGrF,MAAM,QAAQ,OAAO;AAAA;AAAA;AAAA;AAKrB,MAAM,eAAe,OAAO;AAAA;AAAA;AAAA;AAAA,kBAIjB,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA,mBAC5B,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA,WACrC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA,WAGpC,CAAC,UAAoD,MAAM,aAAa,UAAU,QAAQ;AAAA,iBACpF,CAAC,UAAoD,MAAM,aAAa,UAAU,SAAS;AAAA;AAAA;",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-stepper",
3
- "version": "2.2.0-next.6",
3
+ "version": "2.3.0-alpha.1",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Stepper",
6
6
  "module": "./esm/index.js",
@@ -48,10 +48,10 @@
48
48
  "build": "node ../../scripts/build/build.js"
49
49
  },
50
50
  "dependencies": {
51
- "@elliemae/ds-button": "2.2.0-next.6",
52
- "@elliemae/ds-icons": "2.2.0-next.6",
53
- "@elliemae/ds-props-helpers": "2.2.0-next.6",
54
- "@elliemae/ds-truncated-tooltip-text": "2.2.0-next.6",
51
+ "@elliemae/ds-button": "2.3.0-alpha.1",
52
+ "@elliemae/ds-icons": "2.3.0-alpha.1",
53
+ "@elliemae/ds-props-helpers": "2.3.0-alpha.1",
54
+ "@elliemae/ds-truncated-tooltip-text": "2.3.0-alpha.1",
55
55
  "react-desc": "~4.1.3",
56
56
  "uid": "~2.0.0"
57
57
  },