@elliemae/ds-icons 3.9.1-rc.0 → 3.9.1-rc.10
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/utils/SvgIcon.js +2 -2
- package/dist/cjs/utils/SvgIcon.js.map +2 -2
- package/dist/cjs/utils/react-desc-prop-types.js +1 -0
- package/dist/cjs/utils/react-desc-prop-types.js.map +2 -2
- package/dist/esm/utils/SvgIcon.js +2 -2
- package/dist/esm/utils/SvgIcon.js.map +2 -2
- package/dist/esm/utils/react-desc-prop-types.js +1 -0
- package/dist/esm/utils/react-desc-prop-types.js.map +2 -2
- package/package.json +4 -4
|
@@ -43,8 +43,8 @@ const renderPaths = (paths) => paths.map((p, i) => /* @__PURE__ */ (0, import_js
|
|
|
43
43
|
const SvgIcon = (props) => {
|
|
44
44
|
const { size, innerRef, containerProps, paths, fill, viewBox, children, component } = props;
|
|
45
45
|
const { className, width, height, style, color, ...restGlobals } = (0, import_ds_utilities.useGetGlobalAttributes)(props);
|
|
46
|
-
const defaultWidth = ((width || height) && parseInt(width || height, 10)) ?? 16;
|
|
47
|
-
const defaultHeight = ((height || width) && parseInt(height || width, 10)) ?? 16;
|
|
46
|
+
const defaultWidth = ((width || height) && parseInt((width || height || "16").toString(), 10)) ?? 16;
|
|
47
|
+
const defaultHeight = ((height || width) && parseInt((height || width || "16").toString(), 10)) ?? 16;
|
|
48
48
|
const xstyledProps = (0, import_ds_utilities.useGetXstyledProps)(props);
|
|
49
49
|
const { cssClassName } = (0, import_ds_classnames.convertPropToCssClassName)("icon", className, {
|
|
50
50
|
size,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/utils/SvgIcon.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable complexity */\n/* eslint-disable react/no-array-index-key */\nimport React, { useMemo
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AAEA,
|
|
4
|
+
"sourcesContent": ["/* eslint-disable complexity */\n/* eslint-disable react/no-array-index-key */\nimport React, { useMemo } from 'react';\nimport { th } from '@elliemae/ds-system';\nimport { describe, useGetGlobalAttributes, useGetXstyledProps } from '@elliemae/ds-utilities';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { propTypes, SvgIconT } from './react-desc-prop-types';\nimport { StyledSvg, StyledWrapper } from './styled';\nconst renderPaths = (paths: string[]) => paths.map((p, i) => <path key={i} d={p} />);\n\nconst SvgIcon: React.ComponentType<SvgIconT.Props> = (props) => {\n const { size, innerRef, containerProps, paths, fill, viewBox, children, component } = props;\n\n const { className, width, height, style, color, ...restGlobals } = useGetGlobalAttributes(props);\n\n const defaultWidth = ((width || height) && parseInt((width || height || '16').toString(), 10)) ?? 16;\n const defaultHeight = ((height || width) && parseInt((height || width || '16').toString(), 10)) ?? 16;\n const xstyledProps = useGetXstyledProps(props);\n const { cssClassName } = convertPropToCssClassName('icon', className, {\n size,\n color,\n });\n\n const finalColor = useMemo(() => {\n if (!fill && !color) return undefined;\n let themeColor = '';\n if (fill) return fill;\n if (!color) return themeColor;\n if (color[0] === 'brand-primary') themeColor = `brand-${color[1]}`;\n else if (color[0] === 'neutral' && color[1].toString() === '0') themeColor = `neutral-000`;\n else if (color[0] === 'neutral' && color[1].toString() === '900') themeColor = `neutral-800`;\n else themeColor = `${color[0]}-${color[1]}`;\n\n return th.color(themeColor);\n }, [color, fill]);\n\n return (\n <StyledWrapper\n as={component}\n ref={innerRef}\n className={cssClassName}\n {...restGlobals}\n {...containerProps}\n {...xstyledProps}\n style={style}\n height={!size ? defaultHeight : undefined}\n width={!size ? defaultWidth : undefined}\n svgColor={finalColor}\n >\n <StyledSvg viewBox={viewBox} width={!size ? defaultWidth : undefined} height={!size ? defaultHeight : undefined}>\n {paths ? renderPaths(paths) : children}\n </StyledSvg>\n </StyledWrapper>\n );\n};\n\nSvgIcon.propTypes = propTypes;\nSvgIcon.displayName = 'SvgIcon';\nconst IconWithSchema = describe(SvgIcon);\nIconWithSchema.propTypes = propTypes;\n\nexport { IconWithSchema, SvgIcon };\nexport default SvgIcon;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AAEA,mBAA+B;AAC/B,uBAAmB;AACnB,0BAAqE;AACrE,2BAA0C;AAC1C,mCAAoC;AACpC,oBAAyC;AACzC,MAAM,cAAc,CAAC,UAAoB,MAAM,IAAI,CAAC,GAAG,MAAM,4CAAC;AAAA,EAAa,GAAG;AAAA,GAAN,CAAS,CAAE;AAEnF,MAAM,UAA+C,CAAC,UAAU;AAC9D,QAAM,EAAE,MAAM,UAAU,gBAAgB,OAAO,MAAM,SAAS,UAAU,UAAU,IAAI;AAEtF,QAAM,EAAE,WAAW,OAAO,QAAQ,OAAO,UAAU,YAAY,QAAI,4CAAuB,KAAK;AAE/F,QAAM,iBAAiB,SAAS,WAAW,UAAU,SAAS,UAAU,MAAM,SAAS,GAAG,EAAE,MAAM;AAClG,QAAM,kBAAkB,UAAU,UAAU,UAAU,UAAU,SAAS,MAAM,SAAS,GAAG,EAAE,MAAM;AACnG,QAAM,mBAAe,wCAAmB,KAAK;AAC7C,QAAM,EAAE,aAAa,QAAI,gDAA0B,QAAQ,WAAW;AAAA,IACpE;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,iBAAa,sBAAQ,MAAM;AAC/B,QAAI,CAAC,QAAQ,CAAC;AAAO,aAAO;AAC5B,QAAI,aAAa;AACjB,QAAI;AAAM,aAAO;AACjB,QAAI,CAAC;AAAO,aAAO;AACnB,QAAI,MAAM,OAAO;AAAiB,mBAAa,SAAS,MAAM;AAAA,aACrD,MAAM,OAAO,aAAa,MAAM,GAAG,SAAS,MAAM;AAAK,mBAAa;AAAA,aACpE,MAAM,OAAO,aAAa,MAAM,GAAG,SAAS,MAAM;AAAO,mBAAa;AAAA;AAC1E,mBAAa,GAAG,MAAM,MAAM,MAAM;AAEvC,WAAO,oBAAG,MAAM,UAAU;AAAA,EAC5B,GAAG,CAAC,OAAO,IAAI,CAAC;AAEhB,SACE,4CAAC;AAAA,IACC,IAAI;AAAA,IACJ,KAAK;AAAA,IACL,WAAW;AAAA,IACV,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACJ;AAAA,IACA,QAAQ,CAAC,OAAO,gBAAgB;AAAA,IAChC,OAAO,CAAC,OAAO,eAAe;AAAA,IAC9B,UAAU;AAAA,IAEV,sDAAC;AAAA,MAAU;AAAA,MAAkB,OAAO,CAAC,OAAO,eAAe;AAAA,MAAW,QAAQ,CAAC,OAAO,gBAAgB;AAAA,MACnG,kBAAQ,YAAY,KAAK,IAAI;AAAA,KAChC;AAAA,GACF;AAEJ;AAEA,QAAQ,YAAY;AACpB,QAAQ,cAAc;AACtB,MAAM,qBAAiB,8BAAS,OAAO;AACvC,eAAe,YAAY;AAG3B,IAAO,kBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -40,6 +40,7 @@ const propTypes = {
|
|
|
40
40
|
color: import_ds_utilities.PropTypes.oneOfType([
|
|
41
41
|
import_ds_utilities.PropTypes.tuple([import_ds_utilities.PropTypes.oneOf(["neutral"]), import_ds_utilities.PropTypes.oneOf(["900"])]),
|
|
42
42
|
import_ds_utilities.PropTypes.tuple([import_ds_utilities.PropTypes.oneOf(["neutral"]), import_ds_utilities.PropTypes.oneOf(["500"])]),
|
|
43
|
+
import_ds_utilities.PropTypes.tuple([import_ds_utilities.PropTypes.oneOf(["neutral"]), import_ds_utilities.PropTypes.oneOf(["400"])]),
|
|
43
44
|
import_ds_utilities.PropTypes.tuple([import_ds_utilities.PropTypes.oneOf(["neutral"]), import_ds_utilities.PropTypes.oneOf(["0"])]),
|
|
44
45
|
import_ds_utilities.PropTypes.tuple([import_ds_utilities.PropTypes.oneOf(["danger"]), import_ds_utilities.PropTypes.oneOf(["900"])]),
|
|
45
46
|
import_ds_utilities.PropTypes.tuple([import_ds_utilities.PropTypes.oneOf(["warning"]), import_ds_utilities.PropTypes.oneOf(["600"])]),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/utils/react-desc-prop-types.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { PropTypes } from '@elliemae/ds-utilities';\nexport declare namespace SvgIconT {\n export type SizeType = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';\n\n export type ColorType =\n | ['neutral', '900' | '500' | '400' | '0']\n | ['danger', '900']\n | ['warning', '600' | '900']\n | ['success', '900']\n | ['brand-primary', '600'];\n\n export interface Props {\n component?: React.ComponentType | 'span';\n children?: React.ReactNode;\n viewBox?: string;\n containerProps?: object;\n size?: SvgIconT.SizeType;\n color?: SvgIconT.ColorType;\n paths?: string[];\n fill?: string;\n innerRef?: React.MutableRefObject<HTMLElement>;\n width?: number | string;\n height?: number | string;\n }\n}\n\nexport const defaultProps: Partial<SvgIconT.Props> = {\n component: 'span',\n containerProps: {},\n};\n\nexport const propTypes = {\n containerProps: PropTypes.object.description('set of properties attached to the main container'),\n size: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('size of the icon'),\n color: PropTypes.oneOfType([\n PropTypes.tuple([PropTypes.oneOf(['neutral']), PropTypes.oneOf(['900'])]),\n PropTypes.tuple([PropTypes.oneOf(['neutral']), PropTypes.oneOf(['500'])]),\n PropTypes.tuple([PropTypes.oneOf(['neutral']), PropTypes.oneOf(['0'])]),\n PropTypes.tuple([PropTypes.oneOf(['danger']), PropTypes.oneOf(['900'])]),\n PropTypes.tuple([PropTypes.oneOf(['warning']), PropTypes.oneOf(['600'])]),\n PropTypes.tuple([PropTypes.oneOf(['warning']), PropTypes.oneOf(['900'])]),\n PropTypes.tuple([PropTypes.oneOf(['success']), PropTypes.oneOf(['900'])]),\n PropTypes.tuple([PropTypes.oneOf(['brand-primary']), PropTypes.oneOf(['600'])]),\n PropTypes.tuple([PropTypes.oneOf(['brand-primary']), PropTypes.oneOf(['800'])]),\n PropTypes.tuple([PropTypes.oneOf(['brand-primary']), PropTypes.oneOf(['700'])]),\n ]).description('icon color'),\n className: PropTypes.string.description('html class attribute'),\n component: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).description('containers element'),\n viewBox: PropTypes.string.description('view box'),\n paths: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]).description(''),\n fill: PropTypes.string.description('fill attribute'),\n innerRef: PropTypes.object.description('inner ref'),\n title: PropTypes.string.description('Adds a title html element to the svg.'),\n}
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAA0B;
|
|
4
|
+
"sourcesContent": ["import { PropTypes } from '@elliemae/ds-utilities';\nimport { WeakValidationMap } from 'react';\nexport declare namespace SvgIconT {\n export type SizeType = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';\n\n export type ColorType =\n | ['neutral', '900' | '500' | '400' | '0']\n | ['danger', '900']\n | ['warning', '600' | '900']\n | ['success', '900']\n | ['brand-primary', '600' | '700' | '800'];\n\n export interface Props {\n component?: React.ComponentType | 'span';\n children?: React.ReactNode;\n viewBox?: string;\n containerProps?: object;\n size?: SvgIconT.SizeType;\n color?: SvgIconT.ColorType;\n paths?: string[];\n fill?: string;\n innerRef?: React.MutableRefObject<HTMLElement>;\n width?: number | string;\n height?: number | string;\n }\n}\n\nexport const defaultProps: Partial<SvgIconT.Props> = {\n component: 'span',\n containerProps: {},\n};\n\nexport const propTypes = {\n containerProps: PropTypes.object.description('set of properties attached to the main container'),\n size: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('size of the icon'),\n color: PropTypes.oneOfType([\n PropTypes.tuple([PropTypes.oneOf(['neutral']), PropTypes.oneOf(['900'])]),\n PropTypes.tuple([PropTypes.oneOf(['neutral']), PropTypes.oneOf(['500'])]),\n PropTypes.tuple([PropTypes.oneOf(['neutral']), PropTypes.oneOf(['400'])]),\n PropTypes.tuple([PropTypes.oneOf(['neutral']), PropTypes.oneOf(['0'])]),\n PropTypes.tuple([PropTypes.oneOf(['danger']), PropTypes.oneOf(['900'])]),\n PropTypes.tuple([PropTypes.oneOf(['warning']), PropTypes.oneOf(['600'])]),\n PropTypes.tuple([PropTypes.oneOf(['warning']), PropTypes.oneOf(['900'])]),\n PropTypes.tuple([PropTypes.oneOf(['success']), PropTypes.oneOf(['900'])]),\n PropTypes.tuple([PropTypes.oneOf(['brand-primary']), PropTypes.oneOf(['600'])]),\n PropTypes.tuple([PropTypes.oneOf(['brand-primary']), PropTypes.oneOf(['800'])]),\n PropTypes.tuple([PropTypes.oneOf(['brand-primary']), PropTypes.oneOf(['700'])]),\n ]).description('icon color'),\n className: PropTypes.string.description('html class attribute'),\n component: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).description('containers element'),\n viewBox: PropTypes.string.description('view box'),\n paths: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]).description(''),\n fill: PropTypes.string.description('fill attribute'),\n innerRef: PropTypes.object.description('inner ref'),\n title: PropTypes.string.description('Adds a title html element to the svg.'),\n} as WeakValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAA0B;AA2BnB,MAAM,eAAwC;AAAA,EACnD,WAAW;AAAA,EACX,gBAAgB,CAAC;AACnB;AAEO,MA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CAAC,8BAAU,MAAM,CAAC,eAAe,CAAC,GAAG,8BAAU,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AAAA,IAC9E,8BAAU,MAAM,CAAC,8BAAU,MAAM,CAAC,eAAe,CAAC,GAAG,8BAAU,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AAAA,EAChF,CAAC,EAAE,YAAY,YAAY;AAAA,EAC3B,WAAW,8BAAU,OAAO,YAAY,sBAAsB;AAAA,EAC9D,WAAW,8BAAU,UAAU,CAAC,8BAAU,QAAQ,8BAAU,IAAI,CAAC,EAAE,YAAY,oBAAoB;AAAA,EACnG,SAAS,8BAAU,OAAO,YAAY,UAAU;AAAA,EAChD,OAAO,8BAAU,UAAU,CAAC,8BAAU,QAAQ,8BAAU,QAAQ,8BAAU,MAAM,CAAC,CAAC,EAAE,YAAY,EAAE;AAAA,EAClG,MAAM,8BAAU,OAAO,YAAY,gBAAgB;AAAA,EACnD,UAAU,8BAAU,OAAO,YAAY,WAAW;AAAA,EAClD,OAAO,8BAAU,OAAO,YAAY,uCAAuC;AAC7E;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -12,8 +12,8 @@ const renderPaths = (paths) => paths.map((p, i) => /* @__PURE__ */ jsx("path", {
|
|
|
12
12
|
const SvgIcon = (props) => {
|
|
13
13
|
const { size, innerRef, containerProps, paths, fill, viewBox, children, component } = props;
|
|
14
14
|
const { className, width, height, style, color, ...restGlobals } = useGetGlobalAttributes(props);
|
|
15
|
-
const defaultWidth = ((width || height) && parseInt(width || height, 10)) ?? 16;
|
|
16
|
-
const defaultHeight = ((height || width) && parseInt(height || width, 10)) ?? 16;
|
|
15
|
+
const defaultWidth = ((width || height) && parseInt((width || height || "16").toString(), 10)) ?? 16;
|
|
16
|
+
const defaultHeight = ((height || width) && parseInt((height || width || "16").toString(), 10)) ?? 16;
|
|
17
17
|
const xstyledProps = useGetXstyledProps(props);
|
|
18
18
|
const { cssClassName } = convertPropToCssClassName("icon", className, {
|
|
19
19
|
size,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/utils/SvgIcon.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable react/no-array-index-key */\nimport React, { useMemo
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAEA,SAAgB,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable react/no-array-index-key */\nimport React, { useMemo } from 'react';\nimport { th } from '@elliemae/ds-system';\nimport { describe, useGetGlobalAttributes, useGetXstyledProps } from '@elliemae/ds-utilities';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { propTypes, SvgIconT } from './react-desc-prop-types';\nimport { StyledSvg, StyledWrapper } from './styled';\nconst renderPaths = (paths: string[]) => paths.map((p, i) => <path key={i} d={p} />);\n\nconst SvgIcon: React.ComponentType<SvgIconT.Props> = (props) => {\n const { size, innerRef, containerProps, paths, fill, viewBox, children, component } = props;\n\n const { className, width, height, style, color, ...restGlobals } = useGetGlobalAttributes(props);\n\n const defaultWidth = ((width || height) && parseInt((width || height || '16').toString(), 10)) ?? 16;\n const defaultHeight = ((height || width) && parseInt((height || width || '16').toString(), 10)) ?? 16;\n const xstyledProps = useGetXstyledProps(props);\n const { cssClassName } = convertPropToCssClassName('icon', className, {\n size,\n color,\n });\n\n const finalColor = useMemo(() => {\n if (!fill && !color) return undefined;\n let themeColor = '';\n if (fill) return fill;\n if (!color) return themeColor;\n if (color[0] === 'brand-primary') themeColor = `brand-${color[1]}`;\n else if (color[0] === 'neutral' && color[1].toString() === '0') themeColor = `neutral-000`;\n else if (color[0] === 'neutral' && color[1].toString() === '900') themeColor = `neutral-800`;\n else themeColor = `${color[0]}-${color[1]}`;\n\n return th.color(themeColor);\n }, [color, fill]);\n\n return (\n <StyledWrapper\n as={component}\n ref={innerRef}\n className={cssClassName}\n {...restGlobals}\n {...containerProps}\n {...xstyledProps}\n style={style}\n height={!size ? defaultHeight : undefined}\n width={!size ? defaultWidth : undefined}\n svgColor={finalColor}\n >\n <StyledSvg viewBox={viewBox} width={!size ? defaultWidth : undefined} height={!size ? defaultHeight : undefined}>\n {paths ? renderPaths(paths) : children}\n </StyledSvg>\n </StyledWrapper>\n );\n};\n\nSvgIcon.propTypes = propTypes;\nSvgIcon.displayName = 'SvgIcon';\nconst IconWithSchema = describe(SvgIcon);\nIconWithSchema.propTypes = propTypes;\n\nexport { IconWithSchema, SvgIcon };\nexport default SvgIcon;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAEA,SAAgB,eAAe;AAC/B,SAAS,UAAU;AACnB,SAAS,UAAU,wBAAwB,0BAA0B;AACrE,SAAS,iCAAiC;AAC1C,SAAS,iBAA2B;AACpC,SAAS,WAAW,qBAAqB;AACzC,MAAM,cAAc,CAAC,UAAoB,MAAM,IAAI,CAAC,GAAG,MAAM,oBAAC;AAAA,EAAa,GAAG;AAAA,GAAN,CAAS,CAAE;AAEnF,MAAM,UAA+C,CAAC,UAAU;AAC9D,QAAM,EAAE,MAAM,UAAU,gBAAgB,OAAO,MAAM,SAAS,UAAU,UAAU,IAAI;AAEtF,QAAM,EAAE,WAAW,OAAO,QAAQ,OAAO,UAAU,YAAY,IAAI,uBAAuB,KAAK;AAE/F,QAAM,iBAAiB,SAAS,WAAW,UAAU,SAAS,UAAU,MAAM,SAAS,GAAG,EAAE,MAAM;AAClG,QAAM,kBAAkB,UAAU,UAAU,UAAU,UAAU,SAAS,MAAM,SAAS,GAAG,EAAE,MAAM;AACnG,QAAM,eAAe,mBAAmB,KAAK;AAC7C,QAAM,EAAE,aAAa,IAAI,0BAA0B,QAAQ,WAAW;AAAA,IACpE;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,aAAa,QAAQ,MAAM;AAC/B,QAAI,CAAC,QAAQ,CAAC;AAAO,aAAO;AAC5B,QAAI,aAAa;AACjB,QAAI;AAAM,aAAO;AACjB,QAAI,CAAC;AAAO,aAAO;AACnB,QAAI,MAAM,OAAO;AAAiB,mBAAa,SAAS,MAAM;AAAA,aACrD,MAAM,OAAO,aAAa,MAAM,GAAG,SAAS,MAAM;AAAK,mBAAa;AAAA,aACpE,MAAM,OAAO,aAAa,MAAM,GAAG,SAAS,MAAM;AAAO,mBAAa;AAAA;AAC1E,mBAAa,GAAG,MAAM,MAAM,MAAM;AAEvC,WAAO,GAAG,MAAM,UAAU;AAAA,EAC5B,GAAG,CAAC,OAAO,IAAI,CAAC;AAEhB,SACE,oBAAC;AAAA,IACC,IAAI;AAAA,IACJ,KAAK;AAAA,IACL,WAAW;AAAA,IACV,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACJ;AAAA,IACA,QAAQ,CAAC,OAAO,gBAAgB;AAAA,IAChC,OAAO,CAAC,OAAO,eAAe;AAAA,IAC9B,UAAU;AAAA,IAEV,8BAAC;AAAA,MAAU;AAAA,MAAkB,OAAO,CAAC,OAAO,eAAe;AAAA,MAAW,QAAQ,CAAC,OAAO,gBAAgB;AAAA,MACnG,kBAAQ,YAAY,KAAK,IAAI;AAAA,KAChC;AAAA,GACF;AAEJ;AAEA,QAAQ,YAAY;AACpB,QAAQ,cAAc;AACtB,MAAM,iBAAiB,SAAS,OAAO;AACvC,eAAe,YAAY;AAG3B,IAAO,kBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -10,6 +10,7 @@ const propTypes = {
|
|
|
10
10
|
color: PropTypes.oneOfType([
|
|
11
11
|
PropTypes.tuple([PropTypes.oneOf(["neutral"]), PropTypes.oneOf(["900"])]),
|
|
12
12
|
PropTypes.tuple([PropTypes.oneOf(["neutral"]), PropTypes.oneOf(["500"])]),
|
|
13
|
+
PropTypes.tuple([PropTypes.oneOf(["neutral"]), PropTypes.oneOf(["400"])]),
|
|
13
14
|
PropTypes.tuple([PropTypes.oneOf(["neutral"]), PropTypes.oneOf(["0"])]),
|
|
14
15
|
PropTypes.tuple([PropTypes.oneOf(["danger"]), PropTypes.oneOf(["900"])]),
|
|
15
16
|
PropTypes.tuple([PropTypes.oneOf(["warning"]), PropTypes.oneOf(["600"])]),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/utils/react-desc-prop-types.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-utilities';\nexport declare namespace SvgIconT {\n export type SizeType = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';\n\n export type ColorType =\n | ['neutral', '900' | '500' | '400' | '0']\n | ['danger', '900']\n | ['warning', '600' | '900']\n | ['success', '900']\n | ['brand-primary', '600'];\n\n export interface Props {\n component?: React.ComponentType | 'span';\n children?: React.ReactNode;\n viewBox?: string;\n containerProps?: object;\n size?: SvgIconT.SizeType;\n color?: SvgIconT.ColorType;\n paths?: string[];\n fill?: string;\n innerRef?: React.MutableRefObject<HTMLElement>;\n width?: number | string;\n height?: number | string;\n }\n}\n\nexport const defaultProps: Partial<SvgIconT.Props> = {\n component: 'span',\n containerProps: {},\n};\n\nexport const propTypes = {\n containerProps: PropTypes.object.description('set of properties attached to the main container'),\n size: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('size of the icon'),\n color: PropTypes.oneOfType([\n PropTypes.tuple([PropTypes.oneOf(['neutral']), PropTypes.oneOf(['900'])]),\n PropTypes.tuple([PropTypes.oneOf(['neutral']), PropTypes.oneOf(['500'])]),\n PropTypes.tuple([PropTypes.oneOf(['neutral']), PropTypes.oneOf(['0'])]),\n PropTypes.tuple([PropTypes.oneOf(['danger']), PropTypes.oneOf(['900'])]),\n PropTypes.tuple([PropTypes.oneOf(['warning']), PropTypes.oneOf(['600'])]),\n PropTypes.tuple([PropTypes.oneOf(['warning']), PropTypes.oneOf(['900'])]),\n PropTypes.tuple([PropTypes.oneOf(['success']), PropTypes.oneOf(['900'])]),\n PropTypes.tuple([PropTypes.oneOf(['brand-primary']), PropTypes.oneOf(['600'])]),\n PropTypes.tuple([PropTypes.oneOf(['brand-primary']), PropTypes.oneOf(['800'])]),\n PropTypes.tuple([PropTypes.oneOf(['brand-primary']), PropTypes.oneOf(['700'])]),\n ]).description('icon color'),\n className: PropTypes.string.description('html class attribute'),\n component: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).description('containers element'),\n viewBox: PropTypes.string.description('view box'),\n paths: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]).description(''),\n fill: PropTypes.string.description('fill attribute'),\n innerRef: PropTypes.object.description('inner ref'),\n title: PropTypes.string.description('Adds a title html element to the svg.'),\n}
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,iBAAiB;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-utilities';\nimport { WeakValidationMap } from 'react';\nexport declare namespace SvgIconT {\n export type SizeType = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';\n\n export type ColorType =\n | ['neutral', '900' | '500' | '400' | '0']\n | ['danger', '900']\n | ['warning', '600' | '900']\n | ['success', '900']\n | ['brand-primary', '600' | '700' | '800'];\n\n export interface Props {\n component?: React.ComponentType | 'span';\n children?: React.ReactNode;\n viewBox?: string;\n containerProps?: object;\n size?: SvgIconT.SizeType;\n color?: SvgIconT.ColorType;\n paths?: string[];\n fill?: string;\n innerRef?: React.MutableRefObject<HTMLElement>;\n width?: number | string;\n height?: number | string;\n }\n}\n\nexport const defaultProps: Partial<SvgIconT.Props> = {\n component: 'span',\n containerProps: {},\n};\n\nexport const propTypes = {\n containerProps: PropTypes.object.description('set of properties attached to the main container'),\n size: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('size of the icon'),\n color: PropTypes.oneOfType([\n PropTypes.tuple([PropTypes.oneOf(['neutral']), PropTypes.oneOf(['900'])]),\n PropTypes.tuple([PropTypes.oneOf(['neutral']), PropTypes.oneOf(['500'])]),\n PropTypes.tuple([PropTypes.oneOf(['neutral']), PropTypes.oneOf(['400'])]),\n PropTypes.tuple([PropTypes.oneOf(['neutral']), PropTypes.oneOf(['0'])]),\n PropTypes.tuple([PropTypes.oneOf(['danger']), PropTypes.oneOf(['900'])]),\n PropTypes.tuple([PropTypes.oneOf(['warning']), PropTypes.oneOf(['600'])]),\n PropTypes.tuple([PropTypes.oneOf(['warning']), PropTypes.oneOf(['900'])]),\n PropTypes.tuple([PropTypes.oneOf(['success']), PropTypes.oneOf(['900'])]),\n PropTypes.tuple([PropTypes.oneOf(['brand-primary']), PropTypes.oneOf(['600'])]),\n PropTypes.tuple([PropTypes.oneOf(['brand-primary']), PropTypes.oneOf(['800'])]),\n PropTypes.tuple([PropTypes.oneOf(['brand-primary']), PropTypes.oneOf(['700'])]),\n ]).description('icon color'),\n className: PropTypes.string.description('html class attribute'),\n component: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).description('containers element'),\n viewBox: PropTypes.string.description('view box'),\n paths: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]).description(''),\n fill: PropTypes.string.description('fill attribute'),\n innerRef: PropTypes.object.description('inner ref'),\n title: PropTypes.string.description('Adds a title html element to the svg.'),\n} as WeakValidationMap<unknown>;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,iBAAiB;AA2BnB,MAAM,eAAwC;AAAA,EACnD,WAAW;AAAA,EACX,gBAAgB,CAAC;AACnB;AAEO,MAAM,YAAY;AAAA,EACvB,gBAAgB,UAAU,OAAO,YAAY,kDAAkD;AAAA,EAC/F,MAAM,UAAU,MAAM,CAAC,OAAO,MA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CAAC,GAAG,UAAU,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AAAA,EAChF,CAAC,EAAE,YAAY,YAAY;AAAA,EAC3B,WAAW,UAAU,OAAO,YAAY,sBAAsB;AAAA,EAC9D,WAAW,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,IAAI,CAAC,EAAE,YAAY,oBAAoB;AAAA,EACnG,SAAS,UAAU,OAAO,YAAY,UAAU;AAAA,EAChD,OAAO,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,QAAQ,UAAU,MAAM,CAAC,CAAC,EAAE,YAAY,EAAE;AAAA,EAClG,MAAM,UAAU,OAAO,YAAY,gBAAgB;AAAA,EACnD,UAAU,UAAU,OAAO,YAAY,WAAW;AAAA,EAClD,OAAO,UAAU,OAAO,YAAY,uCAAuC;AAC7E;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-icons",
|
|
3
|
-
"version": "3.9.1-rc.
|
|
3
|
+
"version": "3.9.1-rc.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Icons",
|
|
6
6
|
"files": [
|
|
@@ -1571,9 +1571,9 @@
|
|
|
1571
1571
|
"indent": 4
|
|
1572
1572
|
},
|
|
1573
1573
|
"dependencies": {
|
|
1574
|
-
"@elliemae/ds-classnames": "3.9.1-rc.
|
|
1575
|
-
"@elliemae/ds-system": "3.9.1-rc.
|
|
1576
|
-
"@elliemae/ds-utilities": "3.9.1-rc.
|
|
1574
|
+
"@elliemae/ds-classnames": "3.9.1-rc.10",
|
|
1575
|
+
"@elliemae/ds-system": "3.9.1-rc.10",
|
|
1576
|
+
"@elliemae/ds-utilities": "3.9.1-rc.10"
|
|
1577
1577
|
},
|
|
1578
1578
|
"peerDependencies": {
|
|
1579
1579
|
"lodash": "^4.17.21",
|