@elliemae/ds-icons 3.14.0-next.10 → 3.14.0-next.12

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.
@@ -36,6 +36,7 @@ var import_ds_utilities = require("@elliemae/ds-utilities");
36
36
  var import_ds_classnames = require("@elliemae/ds-classnames");
37
37
  var import_react_desc_prop_types = require("./react-desc-prop-types");
38
38
  var import_styled = require("./styled");
39
+ var import_pixToRem = require("./pixToRem");
39
40
  const renderPaths = (paths) => paths.map((p, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: p }, i));
40
41
  const SvgIcon = (props) => {
41
42
  const { color, size, innerRef, containerProps, paths, fill, viewBox, children, component } = props;
@@ -46,10 +47,10 @@ const SvgIcon = (props) => {
46
47
  if (String(height).includes("rem"))
47
48
  return height;
48
49
  if (width)
49
- return parseInt(width.toString(), 10);
50
+ return (0, import_pixToRem.pixToRem)(parseInt(width.toString(), 10));
50
51
  if (height)
51
- return parseInt(height.toString(), 10);
52
- return 16;
52
+ return (0, import_pixToRem.pixToRem)(parseInt(height.toString(), 10));
53
+ return (0, import_pixToRem.pixToRem)(16);
53
54
  }, [width, height]);
54
55
  const defaultHeight = (0, import_react.useMemo)(() => {
55
56
  if (String(height).includes("rem"))
@@ -57,10 +58,10 @@ const SvgIcon = (props) => {
57
58
  if (String(width).includes("rem"))
58
59
  return width;
59
60
  if (height)
60
- return parseInt(height.toString(), 10);
61
+ return (0, import_pixToRem.pixToRem)(parseInt(height.toString(), 10));
61
62
  if (width)
62
- return parseInt(width.toString(), 10);
63
- return 16;
63
+ return (0, import_pixToRem.pixToRem)(parseInt(width.toString(), 10));
64
+ return (0, import_pixToRem.pixToRem)(16);
64
65
  }, [width, height]);
65
66
  const xstyledProps = (0, import_ds_utilities.useGetXstyledProps)(props);
66
67
  const { cssClassName } = (0, import_ds_classnames.convertPropToCssClassName)("icon", className, {
@@ -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 react/no-array-index-key */\nimport React, { useMemo } from 'react';\nimport { describe, useGetGlobalAttributes, useGetXstyledProps } from '@elliemae/ds-utilities';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport type { SvgIconT } from './react-desc-prop-types';\nimport { propTypes } from './react-desc-prop-types';\nimport { StyledSvg, StyledWrapper } from './styled';\n\nconst renderPaths = (paths: string[]) => paths.map((p, i) => <path key={i} d={p} />);\n\nconst SvgIcon: React.ComponentType<SvgIconT.Props> = (props) => {\n const { color, size, innerRef, containerProps, paths, fill, viewBox, children, component } = props;\n\n const { className, width, height, style, title, ...restGlobals } = useGetGlobalAttributes(props);\n\n const defaultWidth = useMemo(() => {\n if (String(width).includes('rem')) return width;\n if (String(height).includes('rem')) return height;\n if (width) return parseInt(width.toString(), 10);\n if (height) return parseInt(height.toString(), 10);\n return 16;\n }, [width, height]);\n\n const defaultHeight = useMemo(() => {\n if (String(height).includes('rem')) return height;\n if (String(width).includes('rem')) return width;\n if (height) return parseInt(height.toString(), 10);\n if (width) return parseInt(width.toString(), 10);\n return 16;\n }, [width, height]);\n\n const xstyledProps = useGetXstyledProps(props);\n\n const { cssClassName } = convertPropToCssClassName('icon', className, {\n size,\n color,\n });\n\n const finalColor = useMemo(() => {\n if (fill) return fill;\n if (!color) return undefined;\n if (color[0] === 'brand-primary') return `brand-${color[1]}`;\n if (color[0] === 'neutral' && color[1].toString() === '0') return `neutral-000`;\n if (color[0] === 'neutral' && color[1].toString() === '900') return `neutral-800`;\n return `${color[0]}-${color[1]}`;\n }, [color, fill]);\n\n return (\n <StyledWrapper\n as={component}\n ref={innerRef}\n className={cssClassName}\n aria-hidden={title !== undefined ? false : true}\n title={title}\n {...restGlobals}\n {...containerProps}\n {...xstyledProps}\n style={style}\n height={!size ? defaultHeight : undefined}\n width={!size ? defaultWidth : undefined}\n size={size}\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;ADQsC;AAP7D,mBAA+B;AAC/B,0BAAqE;AACrE,2BAA0C;AAE1C,mCAA0B;AAC1B,oBAAyC;AAEzC,MAAM,cAAc,CAAC,UAAoB,MAAM,IAAI,CAAC,GAAG,MAAM,4CAAC,UAAa,GAAG,KAAN,CAAS,CAAE;AAEnF,MAAM,UAA+C,CAAC,UAAU;AAC9D,QAAM,EAAE,OAAO,MAAM,UAAU,gBAAgB,OAAO,MAAM,SAAS,UAAU,UAAU,IAAI;AAE7F,QAAM,EAAE,WAAW,OAAO,QAAQ,OAAO,UAAU,YAAY,QAAI,4CAAuB,KAAK;AAE/F,QAAM,mBAAe,sBAAQ,MAAM;AACjC,QAAI,OAAO,KAAK,EAAE,SAAS,KAAK;AAAG,aAAO;AAC1C,QAAI,OAAO,MAAM,EAAE,SAAS,KAAK;AAAG,aAAO;AAC3C,QAAI;AAAO,aAAO,SAAS,MAAM,SAAS,GAAG,EAAE;AAC/C,QAAI;AAAQ,aAAO,SAAS,OAAO,SAAS,GAAG,EAAE;AACjD,WAAO;AAAA,EACT,GAAG,CAAC,OAAO,MAAM,CAAC;AAElB,QAAM,oBAAgB,sBAAQ,MAAM;AAClC,QAAI,OAAO,MAAM,EAAE,SAAS,KAAK;AAAG,aAAO;AAC3C,QAAI,OAAO,KAAK,EAAE,SAAS,KAAK;AAAG,aAAO;A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react/no-array-index-key */\nimport React, { useMemo } from 'react';\nimport { describe, useGetGlobalAttributes, useGetXstyledProps } from '@elliemae/ds-utilities';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport type { SvgIconT } from './react-desc-prop-types';\nimport { propTypes } from './react-desc-prop-types';\nimport { StyledSvg, StyledWrapper } from './styled';\nimport { pixToRem } from './pixToRem';\n\nconst renderPaths = (paths: string[]) => paths.map((p, i) => <path key={i} d={p} />);\n\nconst SvgIcon: React.ComponentType<SvgIconT.Props> = (props) => {\n const { color, size, innerRef, containerProps, paths, fill, viewBox, children, component } = props;\n\n const { className, width, height, style, title, ...restGlobals } = useGetGlobalAttributes(props);\n\n const defaultWidth = useMemo(() => {\n if (String(width).includes('rem')) return width;\n if (String(height).includes('rem')) return height;\n if (width) return pixToRem(parseInt(width.toString(), 10));\n if (height) return pixToRem(parseInt(height.toString(), 10));\n return pixToRem(16);\n }, [width, height]);\n\n const defaultHeight = useMemo(() => {\n if (String(height).includes('rem')) return height;\n if (String(width).includes('rem')) return width;\n if (height) return pixToRem(parseInt(height.toString(), 10));\n if (width) return pixToRem(parseInt(width.toString(), 10));\n return pixToRem(16);\n }, [width, height]);\n\n const xstyledProps = useGetXstyledProps(props);\n\n const { cssClassName } = convertPropToCssClassName('icon', className, {\n size,\n color,\n });\n\n const finalColor = useMemo(() => {\n if (fill) return fill;\n if (!color) return undefined;\n if (color[0] === 'brand-primary') return `brand-${color[1]}`;\n if (color[0] === 'neutral' && color[1].toString() === '0') return `neutral-000`;\n if (color[0] === 'neutral' && color[1].toString() === '900') return `neutral-800`;\n return `${color[0]}-${color[1]}`;\n }, [color, fill]);\n\n return (\n <StyledWrapper\n as={component}\n ref={innerRef}\n className={cssClassName}\n aria-hidden={title !== undefined ? false : true}\n title={title}\n {...restGlobals}\n {...containerProps}\n {...xstyledProps}\n style={style}\n height={!size ? defaultHeight : undefined}\n width={!size ? defaultWidth : undefined}\n size={size}\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;ADSsC;AAR7D,mBAA+B;AAC/B,0BAAqE;AACrE,2BAA0C;AAE1C,mCAA0B;AAC1B,oBAAyC;AACzC,sBAAyB;AAEzB,MAAM,cAAc,CAAC,UAAoB,MAAM,IAAI,CAAC,GAAG,MAAM,4CAAC,UAAa,GAAG,KAAN,CAAS,CAAE;AAEnF,MAAM,UAA+C,CAAC,UAAU;AAC9D,QAAM,EAAE,OAAO,MAAM,UAAU,gBAAgB,OAAO,MAAM,SAAS,UAAU,UAAU,IAAI;AAE7F,QAAM,EAAE,WAAW,OAAO,QAAQ,OAAO,UAAU,YAAY,QAAI,4CAAuB,KAAK;AAE/F,QAAM,mBAAe,sBAAQ,MAAM;AACjC,QAAI,OAAO,KAAK,EAAE,SAAS,KAAK;AAAG,aAAO;AAC1C,QAAI,OAAO,MAAM,EAAE,SAAS,KAAK;AAAG,aAAO;AAC3C,QAAI;AAAO,iBAAO,0BAAS,SAAS,MAAM,SAAS,GAAG,EAAE,CAAC;AACzD,QAAI;AAAQ,iBAAO,0BAAS,SAAS,OAAO,SAAS,GAAG,EAAE,CAAC;AAC3D,eAAO,0BAAS,EAAE;AAAA,EACpB,GAAG,CAAC,OAAO,MAAM,CAAC;AAElB,QAAM,oBAAgB,sBAAQ,MAAM;AAClC,QAAI,OAAO,MAAM,EAAE,SAAS,KAAK;AAAG,aAAO;AAC3C,QAAI,OAAO,KAAK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,OAAO;AACvC,eAAe,YAAY;AAG3B,IAAO,kBAAQ;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
+ var pixToRem_exports = {};
26
+ __export(pixToRem_exports, {
27
+ pixToRem: () => pixToRem
28
+ });
29
+ module.exports = __toCommonJS(pixToRem_exports);
30
+ var React = __toESM(require("react"));
31
+ const pixToRem = (size) => `${size / 16}rem`;
32
+ //# sourceMappingURL=pixToRem.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/utils/pixToRem.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["export const pixToRem = (size: number) => `${size / 16}rem`;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,WAAW,CAAC,SAAiB,GAAG,OAAO;",
6
+ "names": []
7
+ }
@@ -36,32 +36,32 @@ const displaySizes = import_ds_system.css`
36
36
  vertical-align: middle;
37
37
  `;
38
38
  const xxlSizes = import_ds_system.css`
39
- width: 64px;
40
- height: 64px;
39
+ width: 4.923rem;
40
+ height: 4.923rem;
41
41
  `;
42
42
  const xlSizes = import_ds_system.css`
43
- width: 48px;
44
- height: 48px;
43
+ width: 3.692rem;
44
+ height: 3.692rem;
45
45
  `;
46
46
  const lSizes = import_ds_system.css`
47
- width: 32px;
48
- height: 32px;
47
+ width: 2.462rem;
48
+ height: 2.462rem;
49
49
  `;
50
50
  const mSizes = import_ds_system.css`
51
- width: 24px;
52
- height: 24px;
51
+ width: 1.846rem;
52
+ height: 1.846rem;
53
53
  `;
54
54
  const sSizes = import_ds_system.css`
55
- width: 16px;
56
- height: 16px;
55
+ width: 1.231rem;
56
+ height: 1.231rem;
57
57
  `;
58
58
  const xsSizes = import_ds_system.css`
59
- width: 8px;
60
- height: 8px;
59
+ width: 0.615rem;
60
+ height: 0.615rem;
61
61
  `;
62
62
  const xxsSizes = import_ds_system.css`
63
- width: 4px;
64
- height: 4px;
63
+ width: 0.308rem;
64
+ height: 0.308rem;
65
65
  `;
66
66
  const standarSizes = import_ds_system.css`
67
67
  ${sSizes}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/utils/styled.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import {\n styled,\n css,\n background,\n borders,\n sizing,\n space,\n boxShadows,\n flexboxes,\n layout,\n th,\n} from '@elliemae/ds-system';\nimport type { SvgIconT } from './react-desc-prop-types';\nimport { DSIconName, DSIconSlots } from './theming';\n\ninterface StyledWrapperPropsT {\n size: SvgIconT.SizeType | undefined;\n svgColor: string | undefined;\n width: number | undefined;\n height: number | undefined;\n}\n\nconst displaySizes = css`\n display: inline-flex;\n vertical-align: middle;\n`;\nconst xxlSizes = css`\n width: 64px;\n height: 64px;\n`;\n\nconst xlSizes = css`\n width: 48px;\n height: 48px;\n`;\n\nconst lSizes = css`\n width: 32px;\n height: 32px;\n`;\n\nconst mSizes = css`\n width: 24px;\n height: 24px;\n`;\n\nconst sSizes = css`\n width: 16px;\n height: 16px;\n`;\n\nconst xsSizes = css`\n width: 8px;\n height: 8px;\n`;\n\nconst xxsSizes = css`\n width: 4px;\n height: 4px;\n`;\n\nconst standarSizes = css`\n ${sSizes}\n`;\n\nconst getSize = (size: SvgIconT.SizeType | undefined) => {\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 StyledSvg = styled('svg', {\n name: DSIconName,\n slot: DSIconSlots.SVG,\n})``;\n\nexport const StyledWrapper = styled('span', {\n name: DSIconName,\n slot: DSIconSlots.ICON_WRAPPER,\n})<StyledWrapperPropsT>`\n ${({ size, width, height }) => !width && !height && getSize(size)}\n ${({ width }) => {\n if (String(width).includes('rem')) return `width: ${width};`;\n if (width) return `width: ${width}px;`;\n }}\n ${({ height }) => {\n if (String(height).includes('rem')) return `height: ${height};`;\n if (height) return `height: ${height}px;`;\n }}\n ${displaySizes}\n\n &.em-ds-icon svg {\n ${({ size, width, height }) => !width && !height && getSize(size)}\n ${({ width }) => {\n if (String(width).includes('rem')) return `width: ${width};`;\n if (width) return `width: ${width}px;`;\n }}\n ${({ height }) => {\n if (String(height).includes('rem')) return `height: ${height};`;\n if (height) return `height: ${height}px;`;\n }}\n ${({ svgColor, theme }) => {\n if (svgColor) return `fill: ${th.color(svgColor, svgColor)({ theme })};`;\n }}\n }\n ${layout}\n ${space}\n ${sizing}\n ${background}\n ${borders}\n ${boxShadows}\n ${flexboxes}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
4
+ "sourcesContent": ["import {\n styled,\n css,\n background,\n borders,\n sizing,\n space,\n boxShadows,\n flexboxes,\n layout,\n th,\n} from '@elliemae/ds-system';\nimport type { SvgIconT } from './react-desc-prop-types';\nimport { DSIconName, DSIconSlots } from './theming';\n\ninterface StyledWrapperPropsT {\n size: SvgIconT.SizeType | undefined;\n svgColor: string | undefined;\n width: number | undefined;\n height: number | undefined;\n}\n\nconst displaySizes = css`\n display: inline-flex;\n vertical-align: middle;\n`;\nconst xxlSizes = css`\n width: 4.923rem;\n height: 4.923rem;\n`;\n\nconst xlSizes = css`\n width: 3.692rem;\n height: 3.692rem;\n`;\n\nconst lSizes = css`\n width: 2.462rem;\n height: 2.462rem;\n`;\n\nconst mSizes = css`\n width: 1.846rem;\n height: 1.846rem;\n`;\n\nconst sSizes = css`\n width: 1.231rem;\n height: 1.231rem;\n`;\n\nconst xsSizes = css`\n width: 0.615rem;\n height: 0.615rem;\n`;\n\nconst xxsSizes = css`\n width: 0.308rem;\n height: 0.308rem;\n`;\n\nconst standarSizes = css`\n ${sSizes}\n`;\n\nconst getSize = (size: SvgIconT.SizeType | undefined) => {\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 StyledSvg = styled('svg', {\n name: DSIconName,\n slot: DSIconSlots.SVG,\n})``;\n\nexport const StyledWrapper = styled('span', {\n name: DSIconName,\n slot: DSIconSlots.ICON_WRAPPER,\n})<StyledWrapperPropsT>`\n ${({ size, width, height }) => !width && !height && getSize(size)}\n ${({ width }) => {\n if (String(width).includes('rem')) return `width: ${width};`;\n if (width) return `width: ${width}px;`;\n }}\n ${({ height }) => {\n if (String(height).includes('rem')) return `height: ${height};`;\n if (height) return `height: ${height}px;`;\n }}\n ${displaySizes}\n\n &.em-ds-icon svg {\n ${({ size, width, height }) => !width && !height && getSize(size)}\n ${({ width }) => {\n if (String(width).includes('rem')) return `width: ${width};`;\n if (width) return `width: ${width}px;`;\n }}\n ${({ height }) => {\n if (String(height).includes('rem')) return `height: ${height};`;\n if (height) return `height: ${height}px;`;\n }}\n ${({ svgColor, theme }) => {\n if (svgColor) return `fill: ${th.color(svgColor, svgColor)({ theme })};`;\n }}\n }\n ${layout}\n ${space}\n ${sizing}\n ${background}\n ${borders}\n ${boxShadows}\n ${flexboxes}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAWO;AAEP,qBAAwC;AASxC,MAAM,eAAe;AAAA;AAAA;AAAA;AAIrB,MAAM,WAAW;AAAA;AAAA;AAAA;AAKjB,MAAM,UAAU;AAAA;AAAA;AAAA;AAKhB,MAAM,SAAS;AAAA;AAAA;AAAA;AAKf,MAAM,SAAS;AAAA;AAAA;AAAA;AAKf,MAAM,SAAS;AAAA;AAAA;AAAA;AAKf,MAAM,UAAU;AAAA;AAAA;AAAA;AAKhB,MAAM,WAAW;AAAA;AAAA;AAAA;AAKjB,MAAM,eAAe;AAAA,IACjB;AAAA;AAGJ,MAAM,UAAU,CAAC,SAAwC;AACvD,MAAI,SAAS;AAAO,WAAO;AAC3B,MAAI,SAAS;AAAM,WAAO;AAC1B,MAAI,SAAS;AAAK,WAAO;AACzB,MAAI,SAAS;AAAK,WAAO;AACzB,MAAI,SAAS;AAAK,WAAO;AACzB,MAAI,SAAS;AAAM,WAAO;AAC1B,MAAI,SAAS;AAAO,WAAO;AAC3B,SAAO;AACT;AAEO,MAAM,gBAAY,yBAAO,OAAO;AAAA,EACrC,MAAM;AAAA,EACN,MAAM,2BAAY;AACpB,CAAC;AAEM,MAAM,oBAAgB,yBAAO,QAAQ;AAAA,EAC1C,MAAM;AAAA,EACN,MAAM,2BAAY;AACpB,CAAC;AAAA,IACG,CAAC,EAAE,MAAM,OAAO,OAAO,MAAM,CAAC,SAAS,CAAC,UAAU,QAAQ,IAAI;AAAA,IAC9D,CAAC,EAAE,MAAM,MAAM;AACf,MAAI,OAAO,KAAK,EAAE,SAAS,KAAK;AAAG,WAAO,UAAU;AACpD,MAAI;AAAO,WAAO,UAAU;AAC9B;AAAA,IACE,CAAC,EAAE,OAAO,MAAM;AAChB,MAAI,OAAO,MAAM,EAAE,SAAS,KAAK;AAAG,WAAO,WAAW;AACtD,MAAI;AAAQ,WAAO,WAAW;AAChC;AAAA,IACE;AAAA;AAAA;AAAA,MAGE,CAAC,EAAE,MAAM,OAAO,OAAO,MAAM,CAAC,SAAS,CAAC,UAAU,QAAQ,IAAI;AAAA,MAC9D,CAAC,EAAE,MAAM,MAAM;AACf,MAAI,OAAO,KAAK,EAAE,SAAS,KAAK;AAAG,WAAO,UAAU;AACpD,MAAI;AAAO,WAAO,UAAU;AAC9B;AAAA,MACE,CAAC,EAAE,OAAO,MAAM;AAChB,MAAI,OAAO,MAAM,EAAE,SAAS,KAAK;AAAG,WAAO,WAAW;AACtD,MAAI;AAAQ,WAAO,WAAW;AAChC;AAAA,MACE,CAAC,EAAE,UAAU,MAAM,MAAM;AACzB,MAAI;AAAU,WAAO,SAAS,oBAAG,MAAM,UAAU,QAAQ,EAAE,EAAE,MAAM,CAAC;AACtE;AAAA;AAAA,IAEA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -5,6 +5,7 @@ import { describe, useGetGlobalAttributes, useGetXstyledProps } from "@elliemae/
5
5
  import { convertPropToCssClassName } from "@elliemae/ds-classnames";
6
6
  import { propTypes } from "./react-desc-prop-types";
7
7
  import { StyledSvg, StyledWrapper } from "./styled";
8
+ import { pixToRem } from "./pixToRem";
8
9
  const renderPaths = (paths) => paths.map((p, i) => /* @__PURE__ */ jsx("path", { d: p }, i));
9
10
  const SvgIcon = (props) => {
10
11
  const { color, size, innerRef, containerProps, paths, fill, viewBox, children, component } = props;
@@ -15,10 +16,10 @@ const SvgIcon = (props) => {
15
16
  if (String(height).includes("rem"))
16
17
  return height;
17
18
  if (width)
18
- return parseInt(width.toString(), 10);
19
+ return pixToRem(parseInt(width.toString(), 10));
19
20
  if (height)
20
- return parseInt(height.toString(), 10);
21
- return 16;
21
+ return pixToRem(parseInt(height.toString(), 10));
22
+ return pixToRem(16);
22
23
  }, [width, height]);
23
24
  const defaultHeight = useMemo(() => {
24
25
  if (String(height).includes("rem"))
@@ -26,10 +27,10 @@ const SvgIcon = (props) => {
26
27
  if (String(width).includes("rem"))
27
28
  return width;
28
29
  if (height)
29
- return parseInt(height.toString(), 10);
30
+ return pixToRem(parseInt(height.toString(), 10));
30
31
  if (width)
31
- return parseInt(width.toString(), 10);
32
- return 16;
32
+ return pixToRem(parseInt(width.toString(), 10));
33
+ return pixToRem(16);
33
34
  }, [width, height]);
34
35
  const xstyledProps = useGetXstyledProps(props);
35
36
  const { cssClassName } = convertPropToCssClassName("icon", className, {
@@ -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 react/no-array-index-key */\nimport React, { useMemo } from 'react';\nimport { describe, useGetGlobalAttributes, useGetXstyledProps } from '@elliemae/ds-utilities';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport type { SvgIconT } from './react-desc-prop-types';\nimport { propTypes } from './react-desc-prop-types';\nimport { StyledSvg, StyledWrapper } from './styled';\n\nconst renderPaths = (paths: string[]) => paths.map((p, i) => <path key={i} d={p} />);\n\nconst SvgIcon: React.ComponentType<SvgIconT.Props> = (props) => {\n const { color, size, innerRef, containerProps, paths, fill, viewBox, children, component } = props;\n\n const { className, width, height, style, title, ...restGlobals } = useGetGlobalAttributes(props);\n\n const defaultWidth = useMemo(() => {\n if (String(width).includes('rem')) return width;\n if (String(height).includes('rem')) return height;\n if (width) return parseInt(width.toString(), 10);\n if (height) return parseInt(height.toString(), 10);\n return 16;\n }, [width, height]);\n\n const defaultHeight = useMemo(() => {\n if (String(height).includes('rem')) return height;\n if (String(width).includes('rem')) return width;\n if (height) return parseInt(height.toString(), 10);\n if (width) return parseInt(width.toString(), 10);\n return 16;\n }, [width, height]);\n\n const xstyledProps = useGetXstyledProps(props);\n\n const { cssClassName } = convertPropToCssClassName('icon', className, {\n size,\n color,\n });\n\n const finalColor = useMemo(() => {\n if (fill) return fill;\n if (!color) return undefined;\n if (color[0] === 'brand-primary') return `brand-${color[1]}`;\n if (color[0] === 'neutral' && color[1].toString() === '0') return `neutral-000`;\n if (color[0] === 'neutral' && color[1].toString() === '900') return `neutral-800`;\n return `${color[0]}-${color[1]}`;\n }, [color, fill]);\n\n return (\n <StyledWrapper\n as={component}\n ref={innerRef}\n className={cssClassName}\n aria-hidden={title !== undefined ? false : true}\n title={title}\n {...restGlobals}\n {...containerProps}\n {...xstyledProps}\n style={style}\n height={!size ? defaultHeight : undefined}\n width={!size ? defaultWidth : undefined}\n size={size}\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;ACQsC;AAP7D,SAAgB,eAAe;AAC/B,SAAS,UAAU,wBAAwB,0BAA0B;AACrE,SAAS,iCAAiC;AAE1C,SAAS,iBAAiB;AAC1B,SAAS,WAAW,qBAAqB;AAEzC,MAAM,cAAc,CAAC,UAAoB,MAAM,IAAI,CAAC,GAAG,MAAM,oB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;AACpE,WAAO,GAAG,MAAM,MAAM,MAAM;AAAA,EAC9B,GAAG,CAAC,OAAO,IAAI,CAAC;AAEhB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAI;AAAA,MACJ,KAAK;AAAA,MACL,WAAW;AAAA,MACX,eAAa,UAAU,SAAY,QAAQ;AAAA,MAC3C;AAAA,MACC,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACJ;AAAA,MACA,QAAQ,CAAC,OAAO,gBAAgB;AAAA,MAChC,OAAO,CAAC,OAAO,eAAe;AAAA,MAC9B;AAAA,MACA,UAAU;AAAA,MAEV,8BAAC,aAAU,SAAkB,OAAO,CAAC,OAAO,eAAe,QAAW,QAAQ,CAAC,OAAO,gBAAgB,QACnG,kBAAQ,YAAY,KAAK,IAAI,UAChC;AAAA;AAAA,EACF;AAEJ;AAEA,QAAQ,YAAY;AACpB,QAAQ,cAAc;AACtB,MAAM,iBAAiB,SAAS,OAAO;AACvC,eAAe,YAAY;AAG3B,IAAO,kBAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/no-array-index-key */\nimport React, { useMemo } from 'react';\nimport { describe, useGetGlobalAttributes, useGetXstyledProps } from '@elliemae/ds-utilities';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport type { SvgIconT } from './react-desc-prop-types';\nimport { propTypes } from './react-desc-prop-types';\nimport { StyledSvg, StyledWrapper } from './styled';\nimport { pixToRem } from './pixToRem';\n\nconst renderPaths = (paths: string[]) => paths.map((p, i) => <path key={i} d={p} />);\n\nconst SvgIcon: React.ComponentType<SvgIconT.Props> = (props) => {\n const { color, size, innerRef, containerProps, paths, fill, viewBox, children, component } = props;\n\n const { className, width, height, style, title, ...restGlobals } = useGetGlobalAttributes(props);\n\n const defaultWidth = useMemo(() => {\n if (String(width).includes('rem')) return width;\n if (String(height).includes('rem')) return height;\n if (width) return pixToRem(parseInt(width.toString(), 10));\n if (height) return pixToRem(parseInt(height.toString(), 10));\n return pixToRem(16);\n }, [width, height]);\n\n const defaultHeight = useMemo(() => {\n if (String(height).includes('rem')) return height;\n if (String(width).includes('rem')) return width;\n if (height) return pixToRem(parseInt(height.toString(), 10));\n if (width) return pixToRem(parseInt(width.toString(), 10));\n return pixToRem(16);\n }, [width, height]);\n\n const xstyledProps = useGetXstyledProps(props);\n\n const { cssClassName } = convertPropToCssClassName('icon', className, {\n size,\n color,\n });\n\n const finalColor = useMemo(() => {\n if (fill) return fill;\n if (!color) return undefined;\n if (color[0] === 'brand-primary') return `brand-${color[1]}`;\n if (color[0] === 'neutral' && color[1].toString() === '0') return `neutral-000`;\n if (color[0] === 'neutral' && color[1].toString() === '900') return `neutral-800`;\n return `${color[0]}-${color[1]}`;\n }, [color, fill]);\n\n return (\n <StyledWrapper\n as={component}\n ref={innerRef}\n className={cssClassName}\n aria-hidden={title !== undefined ? false : true}\n title={title}\n {...restGlobals}\n {...containerProps}\n {...xstyledProps}\n style={style}\n height={!size ? defaultHeight : undefined}\n width={!size ? defaultWidth : undefined}\n size={size}\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;ACSsC;AAR7D,SAAgB,eAAe;AAC/B,SAAS,UAAU,wBAAwB,0BAA0B;AACrE,SAAS,iCAAiC;AAE1C,SAAS,iBAAiB;AAC1B,SAAS,WAAW,qBAAqB;AACzC,SAAS,gBAAgB;AAEzB,MAAM,cAAc,CAAC,UAAoB,MAAM,IAAI,CAAC,GAAG,MAAM,oBAAC,UAAa,GAAG,KAAN,CAAS,CA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O,aAAa,MAAM,GAAG,SAAS,MAAM;AAAO,aAAO;AACpE,WAAO,GAAG,MAAM,MAAM,MAAM;AAAA,EAC9B,GAAG,CAAC,OAAO,IAAI,CAAC;AAEhB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAI;AAAA,MACJ,KAAK;AAAA,MACL,WAAW;AAAA,MACX,eAAa,UAAU,SAAY,QAAQ;AAAA,MAC3C;AAAA,MACC,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACJ;AAAA,MACA,QAAQ,CAAC,OAAO,gBAAgB;AAAA,MAChC,OAAO,CAAC,OAAO,eAAe;AAAA,MAC9B;AAAA,MACA,UAAU;AAAA,MAEV,8BAAC,aAAU,SAAkB,OAAO,CAAC,OAAO,eAAe,QAAW,QAAQ,CAAC,OAAO,gBAAgB,QACnG,kBAAQ,YAAY,KAAK,IAAI,UAChC;AAAA;AAAA,EACF;AAEJ;AAEA,QAAQ,YAAY;AACpB,QAAQ,cAAc;AACtB,MAAM,iBAAiB,SAAS,OAAO;AACvC,eAAe,YAAY;AAG3B,IAAO,kBAAQ;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ const pixToRem = (size) => `${size / 16}rem`;
3
+ export {
4
+ pixToRem
5
+ };
6
+ //# sourceMappingURL=pixToRem.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/utils/pixToRem.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const pixToRem = (size: number) => `${size / 16}rem`;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,WAAW,CAAC,SAAiB,GAAG,OAAO;",
6
+ "names": []
7
+ }
@@ -17,32 +17,32 @@ const displaySizes = css`
17
17
  vertical-align: middle;
18
18
  `;
19
19
  const xxlSizes = css`
20
- width: 64px;
21
- height: 64px;
20
+ width: 4.923rem;
21
+ height: 4.923rem;
22
22
  `;
23
23
  const xlSizes = css`
24
- width: 48px;
25
- height: 48px;
24
+ width: 3.692rem;
25
+ height: 3.692rem;
26
26
  `;
27
27
  const lSizes = css`
28
- width: 32px;
29
- height: 32px;
28
+ width: 2.462rem;
29
+ height: 2.462rem;
30
30
  `;
31
31
  const mSizes = css`
32
- width: 24px;
33
- height: 24px;
32
+ width: 1.846rem;
33
+ height: 1.846rem;
34
34
  `;
35
35
  const sSizes = css`
36
- width: 16px;
37
- height: 16px;
36
+ width: 1.231rem;
37
+ height: 1.231rem;
38
38
  `;
39
39
  const xsSizes = css`
40
- width: 8px;
41
- height: 8px;
40
+ width: 0.615rem;
41
+ height: 0.615rem;
42
42
  `;
43
43
  const xxsSizes = css`
44
- width: 4px;
45
- height: 4px;
44
+ width: 0.308rem;
45
+ height: 0.308rem;
46
46
  `;
47
47
  const standarSizes = css`
48
48
  ${sSizes}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/utils/styled.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import {\n styled,\n css,\n background,\n borders,\n sizing,\n space,\n boxShadows,\n flexboxes,\n layout,\n th,\n} from '@elliemae/ds-system';\nimport type { SvgIconT } from './react-desc-prop-types';\nimport { DSIconName, DSIconSlots } from './theming';\n\ninterface StyledWrapperPropsT {\n size: SvgIconT.SizeType | undefined;\n svgColor: string | undefined;\n width: number | undefined;\n height: number | undefined;\n}\n\nconst displaySizes = css`\n display: inline-flex;\n vertical-align: middle;\n`;\nconst xxlSizes = css`\n width: 64px;\n height: 64px;\n`;\n\nconst xlSizes = css`\n width: 48px;\n height: 48px;\n`;\n\nconst lSizes = css`\n width: 32px;\n height: 32px;\n`;\n\nconst mSizes = css`\n width: 24px;\n height: 24px;\n`;\n\nconst sSizes = css`\n width: 16px;\n height: 16px;\n`;\n\nconst xsSizes = css`\n width: 8px;\n height: 8px;\n`;\n\nconst xxsSizes = css`\n width: 4px;\n height: 4px;\n`;\n\nconst standarSizes = css`\n ${sSizes}\n`;\n\nconst getSize = (size: SvgIconT.SizeType | undefined) => {\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 StyledSvg = styled('svg', {\n name: DSIconName,\n slot: DSIconSlots.SVG,\n})``;\n\nexport const StyledWrapper = styled('span', {\n name: DSIconName,\n slot: DSIconSlots.ICON_WRAPPER,\n})<StyledWrapperPropsT>`\n ${({ size, width, height }) => !width && !height && getSize(size)}\n ${({ width }) => {\n if (String(width).includes('rem')) return `width: ${width};`;\n if (width) return `width: ${width}px;`;\n }}\n ${({ height }) => {\n if (String(height).includes('rem')) return `height: ${height};`;\n if (height) return `height: ${height}px;`;\n }}\n ${displaySizes}\n\n &.em-ds-icon svg {\n ${({ size, width, height }) => !width && !height && getSize(size)}\n ${({ width }) => {\n if (String(width).includes('rem')) return `width: ${width};`;\n if (width) return `width: ${width}px;`;\n }}\n ${({ height }) => {\n if (String(height).includes('rem')) return `height: ${height};`;\n if (height) return `height: ${height}px;`;\n }}\n ${({ svgColor, theme }) => {\n if (svgColor) return `fill: ${th.color(svgColor, svgColor)({ theme })};`;\n }}\n }\n ${layout}\n ${space}\n ${sizing}\n ${background}\n ${borders}\n ${boxShadows}\n ${flexboxes}\n`;\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import {\n styled,\n css,\n background,\n borders,\n sizing,\n space,\n boxShadows,\n flexboxes,\n layout,\n th,\n} from '@elliemae/ds-system';\nimport type { SvgIconT } from './react-desc-prop-types';\nimport { DSIconName, DSIconSlots } from './theming';\n\ninterface StyledWrapperPropsT {\n size: SvgIconT.SizeType | undefined;\n svgColor: string | undefined;\n width: number | undefined;\n height: number | undefined;\n}\n\nconst displaySizes = css`\n display: inline-flex;\n vertical-align: middle;\n`;\nconst xxlSizes = css`\n width: 4.923rem;\n height: 4.923rem;\n`;\n\nconst xlSizes = css`\n width: 3.692rem;\n height: 3.692rem;\n`;\n\nconst lSizes = css`\n width: 2.462rem;\n height: 2.462rem;\n`;\n\nconst mSizes = css`\n width: 1.846rem;\n height: 1.846rem;\n`;\n\nconst sSizes = css`\n width: 1.231rem;\n height: 1.231rem;\n`;\n\nconst xsSizes = css`\n width: 0.615rem;\n height: 0.615rem;\n`;\n\nconst xxsSizes = css`\n width: 0.308rem;\n height: 0.308rem;\n`;\n\nconst standarSizes = css`\n ${sSizes}\n`;\n\nconst getSize = (size: SvgIconT.SizeType | undefined) => {\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 StyledSvg = styled('svg', {\n name: DSIconName,\n slot: DSIconSlots.SVG,\n})``;\n\nexport const StyledWrapper = styled('span', {\n name: DSIconName,\n slot: DSIconSlots.ICON_WRAPPER,\n})<StyledWrapperPropsT>`\n ${({ size, width, height }) => !width && !height && getSize(size)}\n ${({ width }) => {\n if (String(width).includes('rem')) return `width: ${width};`;\n if (width) return `width: ${width}px;`;\n }}\n ${({ height }) => {\n if (String(height).includes('rem')) return `height: ${height};`;\n if (height) return `height: ${height}px;`;\n }}\n ${displaySizes}\n\n &.em-ds-icon svg {\n ${({ size, width, height }) => !width && !height && getSize(size)}\n ${({ width }) => {\n if (String(width).includes('rem')) return `width: ${width};`;\n if (width) return `width: ${width}px;`;\n }}\n ${({ height }) => {\n if (String(height).includes('rem')) return `height: ${height};`;\n if (height) return `height: ${height}px;`;\n }}\n ${({ svgColor, theme }) => {\n if (svgColor) return `fill: ${th.color(svgColor, svgColor)({ theme })};`;\n }}\n }\n ${layout}\n ${space}\n ${sizing}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AC,EAAE,OAAO,MAAM;AAChB,MAAI,OAAO,MAAM,EAAE,SAAS,KAAK;AAAG,WAAO,WAAW;AACtD,MAAI;AAAQ,WAAO,WAAW;AAChC;AAAA,IACE;AAAA;AAAA;AAAA,MAGE,CAAC,EAAE,MAAM,OAAO,OAAO,MAAM,CAAC,SAAS,CAAC,UAAU,QAAQ,IAAI;AAAA,MAC9D,CAAC,EAAE,MAAM,MAAM;AACf,MAAI,OAAO,KAAK,EAAE,SAAS,KAAK;AAAG,WAAO,UAAU;AACpD,MAAI;AAAO,WAAO,UAAU;AAC9B;AAAA,MACE,CAAC,EAAE,OAAO,MAAM;AAChB,MAAI,OAAO,MAAM,EAAE,SAAS,KAAK;AAAG,WAAO,WAAW;AACtD,MAAI;AAAQ,WAAO,WAAW;AAChC;AAAA,MACE,CAAC,EAAE,UAAU,MAAM,MAAM;AACzB,MAAI;AAAU,WAAO,SAAS,GAAG,MAAM,UAAU,QAAQ,EAAE,EAAE,MAAM,CAAC;AACtE;AAAA;AAAA,IAEA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-icons",
3
- "version": "3.14.0-next.10",
3
+ "version": "3.14.0-next.12",
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.14.0-next.10",
1575
- "@elliemae/ds-system": "3.14.0-next.10",
1576
- "@elliemae/ds-utilities": "3.14.0-next.10"
1574
+ "@elliemae/ds-classnames": "3.14.0-next.12",
1575
+ "@elliemae/ds-utilities": "3.14.0-next.12",
1576
+ "@elliemae/ds-system": "3.14.0-next.12"
1577
1577
  },
1578
1578
  "devDependencies": {
1579
1579
  "styled-components": "~5.3.6"