@elliemae/ds-image 3.22.0-next.8 → 3.22.0-rc.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/DSImage.js.map +1 -1
- package/dist/cjs/config/useImage.js.map +1 -1
- package/dist/cjs/config/useValidateProps.js.map +1 -1
- package/dist/cjs/constants/index.js.map +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/react-desc-prop-types.js.map +1 -1
- package/dist/cjs/styled.js.map +1 -1
- package/dist/esm/DSImage.js.map +1 -1
- package/dist/esm/config/useImage.js.map +1 -1
- package/dist/esm/config/useValidateProps.js.map +1 -1
- package/dist/esm/constants/index.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/react-desc-prop-types.js.map +1 -1
- package/dist/esm/styled.js.map +1 -1
- package/package.json +11 -11
package/dist/cjs/DSImage.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/DSImage.tsx", "
|
|
3
|
+
"sources": ["../../src/DSImage.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { type DSImageT, DSImagePropTypes } from './react-desc-prop-types.js';\nimport { useImage } from './config/useImage.js';\nimport { DSImageName } from './constants/index.js';\nimport { StyledWrapper } from './styled.js';\n\nconst DSImage: React.ComponentType<DSImageT.Props> = (props) => {\n const {\n globalProps,\n xstyledProps,\n propsWithDefault: { size },\n } = useImage(props);\n\n return <StyledWrapper {...globalProps} {...xstyledProps} size={size} />;\n};\n\nDSImage.displayName = DSImageName;\nconst DSImageWithSchema = describe(DSImage);\nDSImageWithSchema.propTypes = DSImagePropTypes as unknown as React.WeakValidationMap<DSImageT.Props>;\n\nexport { DSImage, DSImageWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADcd;AAbT,8BAAyB;AACzB,mCAAgD;AAChD,sBAAyB;AACzB,uBAA4B;AAC5B,oBAA8B;AAE9B,MAAM,UAA+C,CAAC,UAAU;AAC9D,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,kBAAkB,EAAE,KAAK;AAAA,EAC3B,QAAI,0BAAS,KAAK;AAElB,SAAO,4CAAC,+BAAe,GAAG,aAAc,GAAG,cAAc,MAAY;AACvE;AAEA,QAAQ,cAAc;AACtB,MAAM,wBAAoB,kCAAS,OAAO;AAC1C,kBAAkB,YAAY;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/config/useImage.ts", "
|
|
3
|
+
"sources": ["../../../src/config/useImage.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\nimport { useGetGlobalAttributes, useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { type DSImageT, DSImagePropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport interface ImageCTX {\n propsWithDefault: DSImageT.InternalProps;\n globalProps: ReturnType<typeof useGetGlobalAttributes>;\n xstyledProps: ReturnType<typeof useGetXstyledProps>;\n instanceUid: string;\n}\n\nexport const useImage = (propsFromUser: DSImageT.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSImageT.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSImagePropTypes);\n // =============================================================================\n // GLOBAL ATTRIBUTES & XSTYLED PROPS\n // =============================================================================\n const globalProps = useGetGlobalAttributes<DSImageT.InternalProps>(propsWithDefault);\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n globalProps,\n xstyledProps,\n }),\n [propsWithDefault, globalProps, xstyledProps],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,8BAAyF;AACzF,mCAA8D;AAC9D,8BAAiC;AAS1B,MAAM,WAAW,CAAC,kBAAkC;AAIzD,QAAM,uBAAmB,sDAAqD,eAAe,yCAAY;AACzG,gDAAiB,kBAAkB,6CAAgB;AAInD,QAAM,kBAAc,gDAA+C,gBAAgB;AACnF,QAAM,mBAAe,4CAAmB,gBAAgB;AAExD,SAAO,aAAAA,QAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,kBAAkB,aAAa,YAAY;AAAA,EAC9C;AACF;",
|
|
6
6
|
"names": ["React"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/config/useValidateProps.ts", "
|
|
3
|
+
"sources": ["../../../src/config/useValidateProps.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { type DSPropTypesSchema, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { type DSImageT } from '../react-desc-prop-types.js';\nimport { DSImageName } from '../constants/index.js';\n\nexport const useValidateProps = (props: DSImageT.InternalProps, propTypes: DSPropTypesSchema<DSImageT.Props>): void => {\n useValidateTypescriptPropTypes(props, propTypes, DSImageName);\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAAuE;AAEvE,uBAA4B;AAErB,MAAM,mBAAmB,CAAC,OAA+B,cAAuD;AACrH,8DAA+B,OAAO,WAAW,4BAAW;AAC9D;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/constants/index.ts", "
|
|
3
|
+
"sources": ["../../../src/constants/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export const DSImageName = 'DSImage';\n\n// we are giving \"component_name_slots\" to avoid errors on duplicate exports variables in aggregators\nexport const IMAGE_SLOTS = {\n ROOT: 'wrapper',\n} as const;\n\n// we are giving \"component_name_data_testid\" to avoid errors on duplicate exports variables in aggregators\nexport const IMAGE_DATA_TESTID = {\n ROOT: `ds-image-${IMAGE_SLOTS.ROOT}`,\n} as const;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,cAAc;AAGpB,MAAM,cAAc;AAAA,EACzB,MAAM;AACR;AAGO,MAAM,oBAAoB;AAAA,EAC/B,MAAM,YAAY,YAAY;AAChC;",
|
|
6
6
|
"names": []
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/index.ts", "
|
|
3
|
+
"sources": ["../../src/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["// this is a workaround to typescript error TS2742\n// https://github.com/microsoft/TypeScript/issues/47663\nimport type {} from '@xstyled/system';\nexport { DSImage, DSImageWithSchema } from './DSImage.js';\nexport { type DSImageT } from './react-desc-prop-types.js';\nexport { IMAGE_DATA_TESTID } from './constants/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,qBAA2C;AAC3C,mCAA8B;AAC9B,uBAAkC;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/react-desc-prop-types.ts", "
|
|
3
|
+
"sources": ["../../src/react-desc-prop-types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\n\nexport declare namespace DSImageT {\n export type SizeType = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';\n\n export interface RequiredProps {\n src: string;\n alt: string;\n }\n\n export interface DefaultProps {}\n\n export interface OptionalProps {\n size?: SizeType;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLImageElement>,\n keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | keyof XstyledProps\n >,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLImageElement>,\n keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | keyof XstyledProps\n >,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSImageT.DefaultProps = {};\n\nexport const DSImagePropTypes: DSPropTypesSchema<DSImageT.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n size: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('size of the image'),\n src: PropTypes.string.isRequired.description('source of the image'),\n alt: PropTypes.string.isRequired.description('alt text of the image'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAAuE;AAqChE,MAAM,eAAsC,CAAC;AAE7C,MAAM,mBAAsD;AAAA,EACjE,GAAG;AAAA,EACH,GAAG;AAAA,EACH,MAAM,kCAAU,MAAM,CAAC,OAAO,MAAM,KAAK,KAAK,KAAK,MAAM,KAAK,CAAC,EAAE,YAAY,mBAAmB;AAAA,EAChG,KAAK,kCAAU,OAAO,WAAW,YAAY,qBAAqB;AAAA,EAClE,KAAK,kCAAU,OAAO,WAAW,YAAY,uBAAuB;AACtE;",
|
|
6
6
|
"names": []
|
package/dist/cjs/styled.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/styled.tsx", "
|
|
3
|
+
"sources": ["../../src/styled.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import type { FlattenInterpolation, Theme } from '@elliemae/ds-system';\nimport { xStyledCommonProps, css, styled, th } from '@elliemae/ds-system';\nimport type { DSImageT } from './react-desc-prop-types.js';\nimport { DSImageName, IMAGE_SLOTS } from './constants/index.js';\nimport type { XstyledProps } from '@elliemae/ds-props-helpers';\n\nconst xxlSizes = css`\n width: 4rem;\n height: 4rem;\n @media (min-width: ${th.breakpoint('small')}) {\n width: 4.923rem;\n height: 4.923rem;\n }\n`;\n\nconst xlSizes = css`\n width: 3rem;\n height: 3rem;\n @media (min-width: ${th.breakpoint('small')}) {\n width: 3.692rem;\n height: 3.692rem;\n }\n`;\n\nconst lSizes = css`\n width: 2rem;\n height: 2rem;\n @media (min-width: ${th.breakpoint('small')}) {\n width: 2.462rem;\n height: 2.462rem;\n }\n`;\n\nconst mSizes = css`\n width: 1.5rem;\n height: 1.5rem;\n @media (min-width: ${th.breakpoint('small')}) {\n width: 1.846rem;\n height: 1.846rem;\n }\n`;\n\nconst sSizes = css`\n width: 1rem;\n height: 1rem;\n @media (min-width: ${th.breakpoint('small')}) {\n width: 1.231rem;\n height: 1.231rem;\n }\n`;\n\nconst xsSizes = css`\n width: 0.5rem;\n height: 0.5rem;\n @media (min-width: ${th.breakpoint('small')}) {\n width: 0.615rem;\n height: 0.615rem;\n }\n`;\n\nconst xxsSizes = css`\n width: 0.25rem;\n height: 0.25rem;\n @media (min-width: ${th.breakpoint('small')}) {\n width: 0.308rem;\n height: 0.308rem;\n }\n`;\n\nconst standarSizes = css`\n ${sSizes}\n`;\n\nconst getSize = (\n size: DSImageT.SizeType | undefined,\n): FlattenInterpolation<{\n theme: Theme;\n}> => {\n if (size === 'xxl') return xxlSizes;\n if (size === 'xl') return xlSizes;\n if (size === 'l') return lSizes;\n if (size === 'm') return mSizes;\n if (size === 's') return sSizes;\n if (size === 'xs') return xsSizes;\n if (size === 'xxs') return xxsSizes;\n return standarSizes;\n};\n\nexport const StyledWrapper = styled('img', { name: DSImageName, slot: IMAGE_SLOTS.ROOT })<\n { size?: DSImageT.SizeType } & XstyledProps\n>`\n ${xStyledCommonProps}\n\n ${({ size }) => {\n if (size) return getSize(size);\n }};\n\n ${({ width, theme }) => {\n if (typeof width === 'string') {\n return `\n width: ${width};\n `;\n } else if (typeof width === 'number') {\n return `\n width: ${width / 16}rem;\n @media (min-width: ${theme.breakpoints?.small}) {\n width: ${width / 13}rem;\n }\n `;\n }\n }}\n\n ${({ height, theme }) => {\n if (typeof height === 'string') {\n return `\n height: ${height};\n `;\n } else if (typeof height === 'number') {\n return `\n height: ${height / 16}rem;\n @media (min-width: ${theme.breakpoints?.small}) {\n height: ${height / 13}rem;\n }\n `;\n }\n }}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,uBAAoD;AAE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W,OAAO,UAAU,UAAU;AACpC,WAAO;AAAA,iBACI,QAAQ;AAAA,6BACI,MAAM,aAAa;AAAA,mBAC7B,QAAQ;AAAA;AAAA;AAAA,EAGvB;AACF;AAAA;AAAA,IAEE,CAAC,EAAE,QAAQ,MAAM,MAAM;AACvB,MAAI,OAAO,WAAW,UAAU;AAC9B,WAAO;AAAA,kBACK;AAAA;AAAA,EAEd,WAAW,OAAO,WAAW,UAAU;AACrC,WAAO;AAAA,kBACK,SAAS;AAAA,6BACE,MAAM,aAAa;AAAA,oBAC5B,SAAS;AAAA;AAAA;AAAA,EAGzB;AACF;AAAA;",
|
|
6
6
|
"names": []
|
package/dist/esm/DSImage.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSImage.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { type DSImageT, DSImagePropTypes } from './react-desc-prop-types.js';\nimport { useImage } from './config/useImage.js';\nimport { DSImageName } from './constants/index.js';\nimport { StyledWrapper } from './styled.js';\n\nconst DSImage: React.ComponentType<DSImageT.Props> = (props) => {\n const {\n globalProps,\n xstyledProps,\n propsWithDefault: { size },\n } = useImage(props);\n\n return <StyledWrapper {...globalProps} {...xstyledProps} size={size} />;\n};\n\nDSImage.displayName = DSImageName;\nconst DSImageWithSchema = describe(DSImage);\nDSImageWithSchema.propTypes = DSImagePropTypes as unknown as React.WeakValidationMap<DSImageT.Props>;\n\nexport { DSImage, DSImageWithSchema };\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACcd;AAbT,SAAS,gBAAgB;AACzB,SAAwB,wBAAwB;AAChD,SAAS,gBAAgB;AACzB,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAE9B,MAAM,UAA+C,CAAC,UAAU;AAC9D,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,kBAAkB,EAAE,KAAK;AAAA,EAC3B,IAAI,SAAS,KAAK;AAElB,SAAO,oBAAC,iBAAe,GAAG,aAAc,GAAG,cAAc,MAAY;AACvE;AAEA,QAAQ,cAAc;AACtB,MAAM,oBAAoB,SAAS,OAAO;AAC1C,kBAAkB,YAAY;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useImage.ts"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { useGetGlobalAttributes, useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { type DSImageT, DSImagePropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport interface ImageCTX {\n propsWithDefault: DSImageT.InternalProps;\n globalProps: ReturnType<typeof useGetGlobalAttributes>;\n xstyledProps: ReturnType<typeof useGetXstyledProps>;\n instanceUid: string;\n}\n\nexport const useImage = (propsFromUser: DSImageT.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSImageT.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSImagePropTypes);\n // =============================================================================\n // GLOBAL ATTRIBUTES & XSTYLED PROPS\n // =============================================================================\n const globalProps = useGetGlobalAttributes<DSImageT.InternalProps>(propsWithDefault);\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n globalProps,\n xstyledProps,\n }),\n [propsWithDefault, globalProps, xstyledProps],\n );\n};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAClB,SAAS,wBAAwB,oBAAoB,oCAAoC;AACzF,SAAwB,kBAAkB,oBAAoB;AAC9D,SAAS,wBAAwB;AAS1B,MAAM,WAAW,CAAC,kBAAkC;AAIzD,QAAM,mBAAmB,6BAAqD,eAAe,YAAY;AACzG,mBAAiB,kBAAkB,gBAAgB;AAInD,QAAM,cAAc,uBAA+C,gBAAgB;AACnF,QAAM,eAAe,mBAAmB,gBAAgB;AAExD,SAAOA,OAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,kBAAkB,aAAa,YAAY;AAAA,EAC9C;AACF;",
|
|
6
6
|
"names": ["React"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useValidateProps.ts"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { type DSPropTypesSchema, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { type DSImageT } from '../react-desc-prop-types.js';\nimport { DSImageName } from '../constants/index.js';\n\nexport const useValidateProps = (props: DSImageT.InternalProps, propTypes: DSPropTypesSchema<DSImageT.Props>): void => {\n useValidateTypescriptPropTypes(props, propTypes, DSImageName);\n};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAiC,sCAAsC;AAEvE,SAAS,mBAAmB;AAErB,MAAM,mBAAmB,CAAC,OAA+B,cAAuD;AACrH,iCAA+B,OAAO,WAAW,WAAW;AAC9D;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/constants/index.ts"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const DSImageName = 'DSImage';\n\n// we are giving \"component_name_slots\" to avoid errors on duplicate exports variables in aggregators\nexport const IMAGE_SLOTS = {\n ROOT: 'wrapper',\n} as const;\n\n// we are giving \"component_name_data_testid\" to avoid errors on duplicate exports variables in aggregators\nexport const IMAGE_DATA_TESTID = {\n ROOT: `ds-image-${IMAGE_SLOTS.ROOT}`,\n} as const;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,cAAc;AAGpB,MAAM,cAAc;AAAA,EACzB,MAAM;AACR;AAGO,MAAM,oBAAoB;AAAA,EAC/B,MAAM,YAAY,YAAY;AAChC;",
|
|
6
6
|
"names": []
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.ts"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "// this is a workaround to typescript error TS2742\n// https://github.com/microsoft/TypeScript/issues/47663\nimport type {} from '@xstyled/system';\nexport { DSImage, DSImageWithSchema } from './DSImage.js';\nexport { type DSImageT } from './react-desc-prop-types.js';\nexport { IMAGE_DATA_TESTID } from './constants/index.js';\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACGvB,SAAS,SAAS,yBAAyB;AAC3C,eAA8B;AAC9B,SAAS,yBAAyB;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.ts"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\n\nexport declare namespace DSImageT {\n export type SizeType = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';\n\n export interface RequiredProps {\n src: string;\n alt: string;\n }\n\n export interface DefaultProps {}\n\n export interface OptionalProps {\n size?: SizeType;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLImageElement>,\n keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | keyof XstyledProps\n >,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLImageElement>,\n keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | keyof XstyledProps\n >,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSImageT.DefaultProps = {};\n\nexport const DSImagePropTypes: DSPropTypesSchema<DSImageT.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n size: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('size of the image'),\n src: PropTypes.string.isRequired.description('source of the image'),\n alt: PropTypes.string.isRequired.description('alt text of the image'),\n};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,WAAW,2BAA2B,wBAAwB;AAqChE,MAAM,eAAsC,CAAC;AAE7C,MAAM,mBAAsD;AAAA,EACjE,GAAG;AAAA,EACH,GAAG;AAAA,EACH,MAAM,UAAU,MAAM,CAAC,OAAO,MAAM,KAAK,KAAK,KAAK,MAAM,KAAK,CAAC,EAAE,YAAY,mBAAmB;AAAA,EAChG,KAAK,UAAU,OAAO,WAAW,YAAY,qBAAqB;AAAA,EAClE,KAAK,UAAU,OAAO,WAAW,YAAY,uBAAuB;AACtE;",
|
|
6
6
|
"names": []
|
package/dist/esm/styled.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/styled.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { FlattenInterpolation, Theme } from '@elliemae/ds-system';\nimport { xStyledCommonProps, css, styled, th } from '@elliemae/ds-system';\nimport type { DSImageT } from './react-desc-prop-types.js';\nimport { DSImageName, IMAGE_SLOTS } from './constants/index.js';\nimport type { XstyledProps } from '@elliemae/ds-props-helpers';\n\nconst xxlSizes = css`\n width: 4rem;\n height: 4rem;\n @media (min-width: ${th.breakpoint('small')}) {\n width: 4.923rem;\n height: 4.923rem;\n }\n`;\n\nconst xlSizes = css`\n width: 3rem;\n height: 3rem;\n @media (min-width: ${th.breakpoint('small')}) {\n width: 3.692rem;\n height: 3.692rem;\n }\n`;\n\nconst lSizes = css`\n width: 2rem;\n height: 2rem;\n @media (min-width: ${th.breakpoint('small')}) {\n width: 2.462rem;\n height: 2.462rem;\n }\n`;\n\nconst mSizes = css`\n width: 1.5rem;\n height: 1.5rem;\n @media (min-width: ${th.breakpoint('small')}) {\n width: 1.846rem;\n height: 1.846rem;\n }\n`;\n\nconst sSizes = css`\n width: 1rem;\n height: 1rem;\n @media (min-width: ${th.breakpoint('small')}) {\n width: 1.231rem;\n height: 1.231rem;\n }\n`;\n\nconst xsSizes = css`\n width: 0.5rem;\n height: 0.5rem;\n @media (min-width: ${th.breakpoint('small')}) {\n width: 0.615rem;\n height: 0.615rem;\n }\n`;\n\nconst xxsSizes = css`\n width: 0.25rem;\n height: 0.25rem;\n @media (min-width: ${th.breakpoint('small')}) {\n width: 0.308rem;\n height: 0.308rem;\n }\n`;\n\nconst standarSizes = css`\n ${sSizes}\n`;\n\nconst getSize = (\n size: DSImageT.SizeType | undefined,\n): FlattenInterpolation<{\n theme: Theme;\n}> => {\n if (size === 'xxl') return xxlSizes;\n if (size === 'xl') return xlSizes;\n if (size === 'l') return lSizes;\n if (size === 'm') return mSizes;\n if (size === 's') return sSizes;\n if (size === 'xs') return xsSizes;\n if (size === 'xxs') return xxsSizes;\n return standarSizes;\n};\n\nexport const StyledWrapper = styled('img', { name: DSImageName, slot: IMAGE_SLOTS.ROOT })<\n { size?: DSImageT.SizeType } & XstyledProps\n>`\n ${xStyledCommonProps}\n\n ${({ size }) => {\n if (size) return getSize(size);\n }};\n\n ${({ width, theme }) => {\n if (typeof width === 'string') {\n return `\n width: ${width};\n `;\n } else if (typeof width === 'number') {\n return `\n width: ${width / 16}rem;\n @media (min-width: ${theme.breakpoints?.small}) {\n width: ${width / 13}rem;\n }\n `;\n }\n }}\n\n ${({ height, theme }) => {\n if (typeof height === 'string') {\n return `\n height: ${height};\n `;\n } else if (typeof height === 'number') {\n return `\n height: ${height / 16}rem;\n @media (min-width: ${theme.breakpoints?.small}) {\n height: ${height / 13}rem;\n }\n `;\n }\n }}\n`;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,oBAAoB,KAAK,QAAQ,UAAU;AAEpD,SAAS,aAAa,mBAAmB;AAGzC,MAAM,WAAW;AAAA;AAAA;AAAA,uBAGM,GAAG,WAAW,OAAO;AAAA;AAAA;AAAA;AAAA;AAM5C,MAAM,UAAU;AAAA;AAAA;AAAA,uBAGO,GAAG,WAAW,OAAO;AAAA;AAAA;AAAA;AAAA;AAM5C,MAAM,SAAS;AAAA;AAAA;AAAA,uBAGQ,GAAG,WAAW,OAAO;AAAA;AAAA;AAAA;AAAA;AAM5C,MAAM,SAAS;AAAA;AAAA;AAAA,uBAGQ,GAAG,WAAW,OAAO;AAAA;AAAA;AAAA;AAAA;AAM5C,MAAM,SAAS;AAAA;AAAA;AAAA,uBAGQ,GAAG,WAAW,OAAO;AAAA;AAAA;AAAA;AAAA;AAM5C,MAAM,UAAU;AAAA;AAAA;AAAA,uBAGO,GAAG,WAAW,OAAO;AAAA;AAAA;AAAA;AAAA;AAM5C,MAAM,WAAW;AAAA;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
|
5
5
|
"description": "ICE MT - Dimsum - Image",
|
|
6
6
|
"files": [
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@xstyled/system": "~3.6.0",
|
|
39
|
-
"@elliemae/ds-props-helpers": "3.22.0-
|
|
40
|
-
"@elliemae/ds-system": "3.22.0-
|
|
39
|
+
"@elliemae/ds-props-helpers": "3.22.0-rc.1",
|
|
40
|
+
"@elliemae/ds-system": "3.22.0-rc.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@elliemae/pui-cli": "~9.0.0-next.
|
|
43
|
+
"@elliemae/pui-cli": "~9.0.0-next.22",
|
|
44
44
|
"@testing-library/jest-dom": "~5.16.5",
|
|
45
45
|
"@testing-library/react": "~12.1.3",
|
|
46
46
|
"jest-axe": "^7.0.1",
|
|
47
|
-
"@elliemae/ds-monorepo-devops": "3.22.0-
|
|
47
|
+
"@elliemae/ds-monorepo-devops": "3.22.0-rc.1"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"react": "^17.0.2",
|
|
@@ -56,15 +56,15 @@
|
|
|
56
56
|
"typeSafety": false
|
|
57
57
|
},
|
|
58
58
|
"scripts": {
|
|
59
|
-
"dev": "cross-env NODE_ENV=development node
|
|
59
|
+
"dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch",
|
|
60
60
|
"test": "pui-cli test --passWithNoTests",
|
|
61
|
-
"lint": "node
|
|
62
|
-
"eslint:fix": "eslint --ext='.js,.jsx,.test.js,.ts,.tsx' --fix --config='
|
|
63
|
-
"dts": "node
|
|
61
|
+
"lint": "node ../../../scripts/lint.mjs --fix",
|
|
62
|
+
"eslint:fix": "eslint --ext='.js,.jsx,.test.js,.ts,.tsx' --fix --config='../../../.eslintrc.js' src/",
|
|
63
|
+
"dts": "node ../../../scripts/dts.mjs",
|
|
64
64
|
"dts:withdeps": "pnpm --filter {.}... dts",
|
|
65
|
-
"build": "cross-env NODE_ENV=production node
|
|
65
|
+
"build": "cross-env NODE_ENV=production node ../../../scripts/build/build.mjs",
|
|
66
66
|
"dev:build": "pnpm --filter {.}... build",
|
|
67
67
|
"dev:install": "pnpm --filter {.}... i --no-lockfile && pnpm run dev:build",
|
|
68
|
-
"checkDeps": "npm exec
|
|
68
|
+
"checkDeps": "npm exec ../../util/ds-codemods -- check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
69
69
|
}
|
|
70
70
|
}
|