@elliemae/ds-stepper 3.22.0-next.3 → 3.22.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/DSStepperDefinitions.tsx", "../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../src/DSStepperDefinitions.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export const DSStepperName = 'DSStepper';\n\nexport const DSStepperButtonName = 'DSStepperButton';\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,gBAAgB;AAEtB,MAAM,sBAAsB;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/Stepper.tsx", "../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../src/Stepper.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import React from 'react';\nimport { uid } from 'uid';\nimport {\n describe,\n useMemoMergePropsWithDefault,\n useValidateTypescriptPropTypes,\n useGetGlobalAttributes,\n} from '@elliemae/ds-props-helpers';\nimport type { DSStepperInternalsT } from './props.js';\nimport { dsStepperProps, defaultProps } from './props.js';\nimport { Step, StepperWrapper } from './styled.js';\nimport { DSStepperName } from './DSStepperDefinitions.js';\n\nconst DSStepper = (props: DSStepperInternalsT.StepperPropsT) => {\n const propsWithDefaults = useMemoMergePropsWithDefault(props, defaultProps) as DSStepperInternalsT.StepperPropsT;\n useValidateTypescriptPropTypes(propsWithDefaults, dsStepperProps, DSStepperName);\n\n const { steps, current, visited } = propsWithDefaults;\n const stepsArray = React.useMemo(() => new Array(steps).fill(1) as number[], [steps]);\n const globalAttributes = useGetGlobalAttributes(propsWithDefaults);\n\n return (\n <StepperWrapper steps={steps} current={current} visited={visited} {...globalAttributes}>\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;\nDSStepper.displayName = DSStepperName;\nconst StepperWithSchema = describe(DSStepper);\nStepperWithSchema.propTypes = dsStepperProps;\n\nexport { DSStepper, StepperWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADwBf;AAxBR,mBAAkB;AAClB,iBAAoB;AACpB,8BAKO;AAEP,mBAA6C;AAC7C,oBAAqC;AACrC,kCAA8B;AAE9B,MAAM,YAAY,CAAC,UAA6C;AAC9D,QAAM,wBAAoB,sDAA6B,OAAO,yBAAY;AAC1E,8DAA+B,mBAAmB,6BAAgB,yCAAa;AAE/E,QAAM,EAAE,OAAO,SAAS,QAAQ,IAAI;AACpC,QAAM,aAAa,aAAAA,QAAM,QAAQ,MAAM,IAAI,MAAM,KAAK,EAAE,KAAK,CAAC,GAAe,CAAC,KAAK,CAAC;AACpF,QAAM,uBAAmB,gDAAuB,iBAAiB;AAEjE,SACE,4CAAC,gCAAe,OAAc,SAAkB,SAAmB,GAAG,kBACnE,qBAAW,IAAI,CAAC,MAAM,UACrB;AAAA,IAAC;AAAA;AAAA,MAGC,QAAQ,YAAY;AAAA,MACpB,SAAS,QAAQ,SAAS,KAAK;AAAA,MAC/B,eAAa,MAAM,aAAa,IAAI,GAAG,MAAM,aAAa,WAAqB;AAAA,MAC/E,eAAa,YAAY;AAAA,MACzB,gBAAc,QAAQ,SAAS,KAAK;AAAA;AAAA,IAL/B,OAAG,gBAAI,CAAC,aAAa;AAAA,EAM5B,CACD,GACH;AAEJ;AAEA,UAAU,YAAY;AACtB,UAAU,cAAc;AACxB,MAAM,wBAAoB,kCAAS,SAAS;AAC5C,kBAAkB,YAAY;",
6
6
  "names": ["React"]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/StepperButton.tsx", "../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../src/StepperButton.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import React from 'react';\nimport {\n describe,\n useMemoMergePropsWithDefault,\n useValidateTypescriptPropTypes,\n useGetGlobalAttributes,\n} from '@elliemae/ds-props-helpers';\nimport { BUTTON_TYPES } from '@elliemae/ds-button-v2';\nimport { ChevronLeft, ChevronRight } from '@elliemae/ds-icons';\nimport type { DSStepperInternalsT } from './props.js';\nimport { dsStepperButtonProps, defaultButtonProps } from './props.js';\nimport { StyledButton, Label } from './styled.js';\nimport { DSStepperButtonName } from './DSStepperDefinitions.js';\n\nconst DSStepperButton = (props: DSStepperInternalsT.StepperButtonPropsT) => {\n const propsWithDefaults = useMemoMergePropsWithDefault(\n props,\n defaultButtonProps,\n ) as DSStepperInternalsT.StepperButtonPropsT;\n useValidateTypescriptPropTypes(propsWithDefaults, dsStepperButtonProps, DSStepperButtonName);\n\n const { chevron, fontSize, label, disabled, onClick, innerRef } = propsWithDefaults;\n const globalAttributes = useGetGlobalAttributes(propsWithDefaults);\n\n return (\n <StyledButton\n disabled={disabled}\n onClick={onClick}\n innerRef={innerRef}\n buttonType={BUTTON_TYPES.TEXT}\n fontSize={fontSize}\n data-testid=\"ds-stepper-btn\"\n {...globalAttributes}\n >\n {chevron === 'left' ? <ChevronLeft /> : null}\n <Label value={label} />\n {chevron === 'right' ? <ChevronRight /> : null}\n </StyledButton>\n );\n};\n\nDSStepperButton.propTypes = dsStepperButtonProps;\nDSStepperButton.displayName = DSStepperButtonName;\nconst DSStepperButtonWithSchema = describe(DSStepperButton);\nDSStepperButtonWithSchema.propTypes = dsStepperButtonProps;\n\nexport { DSStepperButton, DSStepperButtonWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADyBnB;AAxBJ,8BAKO;AACP,0BAA6B;AAC7B,sBAA0C;AAE1C,mBAAyD;AACzD,oBAAoC;AACpC,kCAAoC;AAEpC,MAAM,kBAAkB,CAAC,UAAmD;AAC1E,QAAM,wBAAoB;AAAA,IACxB;AAAA,IACA;AAAA,EACF;AACA,8DAA+B,mBAAmB,mCAAsB,+CAAmB;AAE3F,QAAM,EAAE,SAAS,UAAU,OAAO,UAAU,SAAS,SAAS,IAAI;AAClE,QAAM,uBAAmB,gDAAuB,iBAAiB;AAEjE,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA,YAAY,iCAAa;AAAA,MACzB;AAAA,MACA,eAAY;AAAA,MACX,GAAG;AAAA,MAEH;AAAA,oBAAY,SAAS,4CAAC,+BAAY,IAAK;AAAA,QACxC,4CAAC,uBAAM,OAAO,OAAO;AAAA,QACpB,YAAY,UAAU,4CAAC,gCAAa,IAAK;AAAA;AAAA;AAAA,EAC5C;AAEJ;AAEA,gBAAgB,YAAY;AAC5B,gBAAgB,cAAc;AAC9B,MAAM,gCAA4B,kCAAS,eAAe;AAC1D,0BAA0B,YAAY;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../src/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export * from './Stepper.js';\nexport * from './StepperButton.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,yBAAd;AACA,wBAAc,+BADd;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/props.ts", "../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../src/props.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport { PropTypes, globalAttributesPropTypes } from '@elliemae/ds-props-helpers';\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 ...globalAttributesPropTypes,\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} as WeakValidationMap<unknown>;\n\nexport const defaultButtonProps = {\n chevron: undefined,\n fontSize: BUTTON_SIZES.normal,\n disabled: false,\n onClick: () => {},\n};\n\nexport const dsStepperButtonProps = {\n ...globalAttributesPropTypes,\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 innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description('Inner ref to button component.'),\n disabled: PropTypes.bool.description('Adds disabled state.'),\n onClick: PropTypes.func.description('OnClick callback handler.').defaultValue('()=>{}'),\n label: PropTypes.string.description('Text Label, this only accepts text, no custom JSX').isRequired,\n} as WeakValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAAqD;AAErD,MAAM,eAAe;AAAA,EACnB,QAAQ;AAAA,EACR,OAAO;AACT;AAIA,MAAM,eAAe;AAAA,EACnB,MAAM;AAAA,EACN,OAAO;AACT;AAyBO,MAAM,eAAe;AAAA,EAC1B,OAAO;AAAA,EACP,SAAS;AAAA,EACT,SAAS,CAAC;AACZ;AAEO,MAAM,iBAAiB;AAAA,EAC5B,GAAG;AAAA,EACH,OAAO,kCAAU,OAAO,YAAY,iBAAiB,EAAE;AAAA,EACvD,SAAS,kCAAU,OAAO,YAAY,sBAAsB;AAAA,EAC5D,SAAS,kCAAU,QAAQ,kCAAU,MAAM,EAAE,YAAY,wBAAwB,EAAE;AACrF;AAEO,MAAM,qBAAqB;AAAA,EAChC,SAAS;AAAA,EACT,UAAU,aAAa;AAAA,EACvB,UAAU;AAAA,EACV,SAAS,MAAM;AAAA,EAAC;AAClB;AAEO,MAAM,uBAAuB;AAAA,EAClC,GAAG;AAAA,EACH,SAAS,kCAAU,MAAM,CAAC,QAAQ,SAAS,IAAI,CAAC,EAC7C,YAAY,mEAAmE,EAC/E,aAAa,IAAI;AAAA,EACpB,UAAU,kCAAU,MAAM,CAAC,UAAU,OAAO,CAAC,EAC1C,YAAY,wCAAwC,EACpD,aAAa,QAAQ;AAAA,EACxB,UAAU,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,IAAI,CAAC,EAAE,YAAY,gCAAgC;AAAA,EAC9G,UAAU,kCAAU,KAAK,YAAY,sBAAsB;AAAA,EAC3D,SAAS,kCAAU,KAAK,YAAY,2BAA2B,EAAE,aAAa,QAAQ;AAAA,EACtF,OAAO,kCAAU,OAAO,YAAY,mDAAmD,EAAE;AAC3F;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/styled.tsx", "../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../src/styled.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { styled } from '@elliemae/ds-system';\nimport { DSButtonV2 } from '@elliemae/ds-button-v2';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport type { DSStepperInternalsT } from './props.js';\n\nexport const StepperWrapper = styled.div`\n display: grid;\n align-items: center;\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", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AACvB,0BAA2B;AAC3B,uCAA2C;AAGpC,MAAM,iBAAiB,wBAAO;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,wBAAO;AAAA;AAAA;AAAA,YAGf,CAAC,UAAW,MAAM,SAAS,QAAQ;AAAA,gBAC/B,CAAC,UAAW,MAAM,UAAU,MAAM,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG,IAAI;AAAA;AAGrF,MAAM,YAAQ,yBAAO,2DAA0B;AAAA;AAAA;AAAA;AAK/C,MAAM,mBAAe,yBAAO,8BAAU;AAAA;AAAA;AAAA;AAAA,kBAI3B,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA,mBAC5B,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA,WACrC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA,WAGvC,CAAC,UAAoD,MAAM,aAAa,UAAU,QAAQ;AAAA,iBACpF,CAAC,UAAoD,MAAM,aAAa,UAAU,SAAS;AAAA;AAAA;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSStepperDefinitions.tsx"],
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSStepperDefinitions.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const DSStepperName = 'DSStepper';\n\nexport const DSStepperButtonName = 'DSStepperButton';\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,gBAAgB;AAEtB,MAAM,sBAAsB;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/Stepper.tsx"],
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/Stepper.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { uid } from 'uid';\nimport {\n describe,\n useMemoMergePropsWithDefault,\n useValidateTypescriptPropTypes,\n useGetGlobalAttributes,\n} from '@elliemae/ds-props-helpers';\nimport type { DSStepperInternalsT } from './props.js';\nimport { dsStepperProps, defaultProps } from './props.js';\nimport { Step, StepperWrapper } from './styled.js';\nimport { DSStepperName } from './DSStepperDefinitions.js';\n\nconst DSStepper = (props: DSStepperInternalsT.StepperPropsT) => {\n const propsWithDefaults = useMemoMergePropsWithDefault(props, defaultProps) as DSStepperInternalsT.StepperPropsT;\n useValidateTypescriptPropTypes(propsWithDefaults, dsStepperProps, DSStepperName);\n\n const { steps, current, visited } = propsWithDefaults;\n const stepsArray = React.useMemo(() => new Array(steps).fill(1) as number[], [steps]);\n const globalAttributes = useGetGlobalAttributes(propsWithDefaults);\n\n return (\n <StepperWrapper steps={steps} current={current} visited={visited} {...globalAttributes}>\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;\nDSStepper.displayName = DSStepperName;\nconst StepperWithSchema = describe(DSStepper);\nStepperWithSchema.propTypes = dsStepperProps;\n\nexport { DSStepper, StepperWithSchema };\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACwBf;AAxBR,OAAOA,YAAW;AAClB,SAAS,WAAW;AACpB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,gBAAgB,oBAAoB;AAC7C,SAAS,MAAM,sBAAsB;AACrC,SAAS,qBAAqB;AAE9B,MAAM,YAAY,CAAC,UAA6C;AAC9D,QAAM,oBAAoB,6BAA6B,OAAO,YAAY;AAC1E,iCAA+B,mBAAmB,gBAAgB,aAAa;AAE/E,QAAM,EAAE,OAAO,SAAS,QAAQ,IAAI;AACpC,QAAM,aAAaA,OAAM,QAAQ,MAAM,IAAI,MAAM,KAAK,EAAE,KAAK,CAAC,GAAe,CAAC,KAAK,CAAC;AACpF,QAAM,mBAAmB,uBAAuB,iBAAiB;AAEjE,SACE,oBAAC,kBAAe,OAAc,SAAkB,SAAmB,GAAG,kBACnE,qBAAW,IAAI,CAAC,MAAM,UACrB;AAAA,IAAC;AAAA;AAAA,MAGC,QAAQ,YAAY;AAAA,MACpB,SAAS,QAAQ,SAAS,KAAK;AAAA,MAC/B,eAAa,MAAM,aAAa,IAAI,GAAG,MAAM,aAAa,WAAqB;AAAA,MAC/E,eAAa,YAAY;AAAA,MACzB,gBAAc,QAAQ,SAAS,KAAK;AAAA;AAAA,IAL/B,GAAG,IAAI,CAAC,aAAa;AAAA,EAM5B,CACD,GACH;AAEJ;AAEA,UAAU,YAAY;AACtB,UAAU,cAAc;AACxB,MAAM,oBAAoB,SAAS,SAAS;AAC5C,kBAAkB,YAAY;",
6
6
  "names": ["React"]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/StepperButton.tsx"],
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/StepperButton.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport {\n describe,\n useMemoMergePropsWithDefault,\n useValidateTypescriptPropTypes,\n useGetGlobalAttributes,\n} from '@elliemae/ds-props-helpers';\nimport { BUTTON_TYPES } from '@elliemae/ds-button-v2';\nimport { ChevronLeft, ChevronRight } from '@elliemae/ds-icons';\nimport type { DSStepperInternalsT } from './props.js';\nimport { dsStepperButtonProps, defaultButtonProps } from './props.js';\nimport { StyledButton, Label } from './styled.js';\nimport { DSStepperButtonName } from './DSStepperDefinitions.js';\n\nconst DSStepperButton = (props: DSStepperInternalsT.StepperButtonPropsT) => {\n const propsWithDefaults = useMemoMergePropsWithDefault(\n props,\n defaultButtonProps,\n ) as DSStepperInternalsT.StepperButtonPropsT;\n useValidateTypescriptPropTypes(propsWithDefaults, dsStepperButtonProps, DSStepperButtonName);\n\n const { chevron, fontSize, label, disabled, onClick, innerRef } = propsWithDefaults;\n const globalAttributes = useGetGlobalAttributes(propsWithDefaults);\n\n return (\n <StyledButton\n disabled={disabled}\n onClick={onClick}\n innerRef={innerRef}\n buttonType={BUTTON_TYPES.TEXT}\n fontSize={fontSize}\n data-testid=\"ds-stepper-btn\"\n {...globalAttributes}\n >\n {chevron === 'left' ? <ChevronLeft /> : null}\n <Label value={label} />\n {chevron === 'right' ? <ChevronRight /> : null}\n </StyledButton>\n );\n};\n\nDSStepperButton.propTypes = dsStepperButtonProps;\nDSStepperButton.displayName = DSStepperButtonName;\nconst DSStepperButtonWithSchema = describe(DSStepperButton);\nDSStepperButtonWithSchema.propTypes = dsStepperButtonProps;\n\nexport { DSStepperButton, DSStepperButtonWithSchema };\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACyBnB,SASwB,KATxB;AAxBJ;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,oBAAoB;AAC7B,SAAS,aAAa,oBAAoB;AAE1C,SAAS,sBAAsB,0BAA0B;AACzD,SAAS,cAAc,aAAa;AACpC,SAAS,2BAA2B;AAEpC,MAAM,kBAAkB,CAAC,UAAmD;AAC1E,QAAM,oBAAoB;AAAA,IACxB;AAAA,IACA;AAAA,EACF;AACA,iCAA+B,mBAAmB,sBAAsB,mBAAmB;AAE3F,QAAM,EAAE,SAAS,UAAU,OAAO,UAAU,SAAS,SAAS,IAAI;AAClE,QAAM,mBAAmB,uBAAuB,iBAAiB;AAEjE,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA,YAAY,aAAa;AAAA,MACzB;AAAA,MACA,eAAY;AAAA,MACX,GAAG;AAAA,MAEH;AAAA,oBAAY,SAAS,oBAAC,eAAY,IAAK;AAAA,QACxC,oBAAC,SAAM,OAAO,OAAO;AAAA,QACpB,YAAY,UAAU,oBAAC,gBAAa,IAAK;AAAA;AAAA;AAAA,EAC5C;AAEJ;AAEA,gBAAgB,YAAY;AAC5B,gBAAgB,cAAc;AAC9B,MAAM,4BAA4B,SAAS,eAAe;AAC1D,0BAA0B,YAAY;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './Stepper.js';\nexport * from './StepperButton.js';\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,cAAc;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/props.ts"],
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/props.ts"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { WeakValidationMap } from 'react';\nimport { PropTypes, globalAttributesPropTypes } from '@elliemae/ds-props-helpers';\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 ...globalAttributesPropTypes,\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} as WeakValidationMap<unknown>;\n\nexport const defaultButtonProps = {\n chevron: undefined,\n fontSize: BUTTON_SIZES.normal,\n disabled: false,\n onClick: () => {},\n};\n\nexport const dsStepperButtonProps = {\n ...globalAttributesPropTypes,\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 innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description('Inner ref to button component.'),\n disabled: PropTypes.bool.description('Adds disabled state.'),\n onClick: PropTypes.func.description('OnClick callback handler.').defaultValue('()=>{}'),\n label: PropTypes.string.description('Text Label, this only accepts text, no custom JSX').isRequired,\n} as WeakValidationMap<unknown>;\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,WAAW,iCAAiC;AAErD,MAAM,eAAe;AAAA,EACnB,QAAQ;AAAA,EACR,OAAO;AACT;AAIA,MAAM,eAAe;AAAA,EACnB,MAAM;AAAA,EACN,OAAO;AACT;AAyBO,MAAM,eAAe;AAAA,EAC1B,OAAO;AAAA,EACP,SAAS;AAAA,EACT,SAAS,CAAC;AACZ;AAEO,MAAM,iBAAiB;AAAA,EAC5B,GAAG;AAAA,EACH,OAAO,UAAU,OAAO,YAAY,iBAAiB,EAAE;AAAA,EACvD,SAAS,UAAU,OAAO,YAAY,sBAAsB;AAAA,EAC5D,SAAS,UAAU,QAAQ,UAAU,MAAM,EAAE,YAAY,wBAAwB,EAAE;AACrF;AAEO,MAAM,qBAAqB;AAAA,EAChC,SAAS;AAAA,EACT,UAAU,aAAa;AAAA,EACvB,UAAU;AAAA,EACV,SAAS,MAAM;AAAA,EAAC;AAClB;AAEO,MAAM,uBAAuB;AAAA,EAClC,GAAG;AAAA,EACH,SAAS,UAAU,MAAM,CAAC,QAAQ,SAAS,IAAI,CAAC,EAC7C,YAAY,mEAAmE,EAC/E,aAAa,IAAI;AAAA,EACpB,UAAU,UAAU,MAAM,CAAC,UAAU,OAAO,CAAC,EAC1C,YAAY,wCAAwC,EACpD,aAAa,QAAQ;AAAA,EACxB,UAAU,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,IAAI,CAAC,EAAE,YAAY,gCAAgC;AAAA,EAC9G,UAAU,UAAU,KAAK,YAAY,sBAAsB;AAAA,EAC3D,SAAS,UAAU,KAAK,YAAY,2BAA2B,EAAE,aAAa,QAAQ;AAAA,EACtF,OAAO,UAAU,OAAO,YAAY,mDAAmD,EAAE;AAC3F;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/styled.tsx"],
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/styled.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\nimport { DSButtonV2 } from '@elliemae/ds-button-v2';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport type { DSStepperInternalsT } from './props.js';\n\nexport const StepperWrapper = styled.div`\n display: grid;\n align-items: center;\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
5
  "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AACvB,SAAS,kBAAkB;AAC3B,SAAS,kCAAkC;AAGpC,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,GAAG,IAAI;AAAA;AAGrF,MAAM,QAAQ,OAAO,0BAA0B;AAAA;AAAA;AAAA;AAK/C,MAAM,eAAe,OAAO,UAAU;AAAA;AAAA;AAAA;AAAA,kBAI3B,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA,mBAC5B,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA,WACrC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA,WAGvC,CAAC,UAAoD,MAAM,aAAa,UAAU,QAAQ;AAAA,iBACpF,CAAC,UAAoD,MAAM,aAAa,UAAU,SAAS;AAAA;AAAA;",
6
6
  "names": []
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-stepper",
3
- "version": "3.22.0-next.3",
3
+ "version": "3.22.0-next.30",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Stepper",
6
6
  "files": [
@@ -53,18 +53,18 @@
53
53
  "dependencies": {
54
54
  "prop-types": "~15.8.1",
55
55
  "uid": "~2.0.1",
56
- "@elliemae/ds-button-v2": "3.22.0-next.3",
57
- "@elliemae/ds-icons": "3.22.0-next.3",
58
- "@elliemae/ds-props-helpers": "3.22.0-next.3",
59
- "@elliemae/ds-system": "3.22.0-next.3",
60
- "@elliemae/ds-truncated-tooltip-text": "3.22.0-next.3"
56
+ "@elliemae/ds-button-v2": "3.22.0-next.30",
57
+ "@elliemae/ds-system": "3.22.0-next.30",
58
+ "@elliemae/ds-props-helpers": "3.22.0-next.30",
59
+ "@elliemae/ds-icons": "3.22.0-next.30",
60
+ "@elliemae/ds-truncated-tooltip-text": "3.22.0-next.30"
61
61
  },
62
62
  "devDependencies": {
63
- "@elliemae/pui-cli": "~9.0.0-next.17",
63
+ "@elliemae/pui-cli": "~9.0.0-next.22",
64
64
  "@testing-library/jest-dom": "~5.16.5",
65
65
  "@testing-library/react": "~12.1.3",
66
66
  "styled-components": "~5.3.9",
67
- "@elliemae/ds-monorepo-devops": "3.22.0-next.3"
67
+ "@elliemae/ds-monorepo-devops": "3.22.0-next.30"
68
68
  },
69
69
  "peerDependencies": {
70
70
  "react": "^17.0.2",
@@ -77,14 +77,14 @@
77
77
  "typeSafety": false
78
78
  },
79
79
  "scripts": {
80
- "dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
80
+ "dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch",
81
81
  "test": "pui-cli test --passWithNoTests",
82
- "lint": "node ../../scripts/lint.mjs",
83
- "eslint:fix": "eslint --ext='.js,.jsx,.test.js,.ts,.tsx' --fix --config='../../.eslintrc.js' src/",
84
- "dts": "node ../../scripts/dts.mjs",
85
- "build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs",
82
+ "lint": "node ../../../scripts/lint.mjs",
83
+ "eslint:fix": "eslint --ext='.js,.jsx,.test.js,.ts,.tsx' --fix --config='../../../.eslintrc.js' src/",
84
+ "dts": "node ../../../scripts/dts.mjs",
85
+ "build": "cross-env NODE_ENV=production node ../../../scripts/build/build.mjs",
86
86
  "dev:build": "pnpm --filter {.}... build",
87
87
  "dev:install": "pnpm --filter {.}... i --no-lockfile && pnpm run dev:build",
88
- "checkDeps": "npm exec ../ds-codemods -- check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
88
+ "checkDeps": "npm exec ../../util/ds-codemods -- check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
89
89
  }
90
90
  }
@@ -1,30 +0,0 @@
1
- /// <reference types="react" />
2
- import type { DSStepperInternalsT } from './props.js';
3
- export declare const StepperWrapper: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, DSStepperInternalsT.StepperPropsT & import("@elliemae/ds-system").OwnerInterface, never>;
4
- interface StepProps {
5
- active: boolean;
6
- visited: boolean;
7
- }
8
- export declare const Step: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, StepProps & import("@elliemae/ds-system").OwnerInterface, never>;
9
- export declare const Label: import("styled-components").StyledComponent<{
10
- (props: any): import("react/jsx-runtime.js").JSX.Element;
11
- propTypes: {
12
- containerProps: import("prop-types").Requireable<object>;
13
- tooltipOptions: import("prop-types").Requireable<object>;
14
- textOptions: import("prop-types").Requireable<object>;
15
- value: import("prop-types").Requireable<NonNullable<import("prop-types").ReactNodeLike>>;
16
- placement: import("prop-types").Requireable<string>;
17
- tooltipDelay: import("prop-types").Requireable<number>;
18
- zIndex: import("prop-types").Requireable<number>;
19
- };
20
- defaultProps: {
21
- containerProps: {};
22
- tooltipOptions: {};
23
- textOptions: {};
24
- value: string;
25
- placement: string;
26
- tooltipDelay: number;
27
- };
28
- }, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>;
29
- export declare const StyledButton: import("styled-components").StyledComponent<import("react").ComponentType<import("@elliemae/ds-button-v2").DSButtonT.Props>, import("@elliemae/ds-system").Theme, DSStepperInternalsT.StepperButtonPropsT & import("@elliemae/ds-system").OwnerInterface, never>;
30
- export {};