@elliemae/ds-props-helpers 3.55.1 → 3.57.0-next.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/index.js CHANGED
@@ -36,6 +36,7 @@ __export(index_exports, {
36
36
  getPropsPerDatatestIdPropTypes: () => import_propsPerDataTestId.getPropsPerDatatestIdPropTypes,
37
37
  getPropsPerDatatestid: () => import_propsPerDataTestId.getPropsPerDatatestid,
38
38
  getPropsPerSlotPropTypes: () => import_propsPerSlot.getPropsPerSlotPropTypes,
39
+ getXstyledProps: () => import_xstyledProps.getXstyledProps,
39
40
  globalAttributesPropTypes: () => import_globalProps.globalAttributesPropTypes,
40
41
  throwRequiredError: () => import_validation.throwRequiredError,
41
42
  throwTypeError: () => import_validation.throwTypeError,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export { useMemoMergePropsWithDefault } from './defaultProps/index.js';\nexport { getAriaProps, getDataProps } from './getProps/index.js';\nexport {\n getGlobalAttributes,\n useGetGlobalAttributes,\n globalAttributesPropTypes,\n type GlobalAttributesT,\n} from './globalProps/index.js';\nexport { describe, PropTypes, type DSPropTypesSchema } from './propTypes/index.js';\nexport type { ValidationMap } from 'prop-types';\nexport {\n throwTypeError,\n throwRequiredError,\n useValidateTypescriptPropTypes,\n validateTypescriptPropTypesImplementation,\n} from './validation/index.js';\nexport { type XstyledProps, useGetXstyledProps, xstyledPropTypes } from './xstyledProps/index.js';\nexport { useDeprecateComponent } from './useDeprecateComponent/index.js';\n\nexport { getPropsPerDatatestid, getPropsPerDatatestIdPropTypes } from './propsPerDataTestId/index.js';\nexport { getPropsPerSlotPropTypes } from './propsPerSlot/index.js';\nexport { useOwnerProps } from './useOwnerProps/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAA6C;AAC7C,sBAA2C;AAC3C,yBAKO;AACP,uBAA4D;AAE5D,wBAKO;AACP,0BAAwE;AACxE,mCAAsC;AAEtC,gCAAsE;AACtE,0BAAyC;AACzC,2BAA8B;",
4
+ "sourcesContent": ["export { useMemoMergePropsWithDefault } from './defaultProps/index.js';\nexport { getAriaProps, getDataProps } from './getProps/index.js';\nexport {\n getGlobalAttributes,\n useGetGlobalAttributes,\n globalAttributesPropTypes,\n type GlobalAttributesT,\n} from './globalProps/index.js';\nexport { describe, PropTypes, type DSPropTypesSchema } from './propTypes/index.js';\nexport type { ValidationMap } from 'prop-types';\nexport {\n throwTypeError,\n throwRequiredError,\n useValidateTypescriptPropTypes,\n validateTypescriptPropTypesImplementation,\n} from './validation/index.js';\nexport { type XstyledProps, useGetXstyledProps, xstyledPropTypes, getXstyledProps } from './xstyledProps/index.js';\nexport { useDeprecateComponent } from './useDeprecateComponent/index.js';\n\nexport { getPropsPerDatatestid, getPropsPerDatatestIdPropTypes } from './propsPerDataTestId/index.js';\nexport { getPropsPerSlotPropTypes } from './propsPerSlot/index.js';\nexport { useOwnerProps } from './useOwnerProps/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAA6C;AAC7C,sBAA2C;AAC3C,yBAKO;AACP,uBAA4D;AAE5D,wBAKO;AACP,0BAAyF;AACzF,mCAAsC;AAEtC,gCAAsE;AACtE,0BAAyC;AACzC,2BAA8B;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/useDeprecateComponent/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable no-console */\nimport { useEffect } from 'react';\n\ninterface Props {\n componentName: string;\n version: string;\n}\n\nexport const useDeprecateComponent = ({ componentName, version }: Props) => {\n useEffect(() => {\n if (process.env.NODE_ENV !== 'production')\n console.warn(`Warning: ${componentName}:: this component will be deprecated in version: ${version}.`);\n }, [componentName, version]);\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAA0B;AAOnB,MAAM,wBAAwB,CAAC,EAAE,eAAe,QAAQ,MAAa;AAC1E,8BAAU,MAAM;AACd,QAAI;AACF,cAAQ,KAAK,YAAY,aAAa,oDAAoD,OAAO,GAAG;AAAA,EACxG,GAAG,CAAC,eAAe,OAAO,CAAC;AAC7B;",
4
+ "sourcesContent": ["/* eslint-disable no-console */\nimport { useEffect } from 'react';\n\ninterface Props {\n componentName: string;\n version: string;\n}\n\nexport const useDeprecateComponent = ({ componentName, version }: Props) => {\n useEffect(() => {\n /*\n https://esbuild.github.io/api/#platform\n When using the build API, all process.env.NODE_ENV expressions are automatically defined to \"production\" if all minification options are enabled and \"development\" otherwise.\n This only happens if process, process.env, and process.env.NODE_ENV are not already defined.\n This substitution is necessary to avoid React-based code crashing instantly (since process is a node API, not a web API).\n */\n if (process.env.NODE_ENV !== 'production')\n console.warn(`Warning: ${componentName}:: this component will be deprecated in version: ${version}.`);\n }, [componentName, version]);\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAA0B;AAOnB,MAAM,wBAAwB,CAAC,EAAE,eAAe,QAAQ,MAAa;AAC1E,8BAAU,MAAM;AAOd,QAAI;AACF,cAAQ,KAAK,YAAY,aAAa,oDAAoD,OAAO,GAAG;AAAA,EACxG,GAAG,CAAC,eAAe,OAAO,CAAC;AAC7B;",
6
6
  "names": []
7
7
  }
@@ -28,6 +28,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
  var xstyledProps_exports = {};
30
30
  __export(xstyledProps_exports, {
31
+ getXstyledProps: () => import_useGetXstyledProps.getXstyledProps,
31
32
  useGetXstyledProps: () => import_useGetXstyledProps.useGetXstyledProps,
32
33
  xstyledPropTypes: () => import_xstyledPropTypes.xstyledPropTypes
33
34
  });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/xstyledProps/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export { type XstyledProps, useGetXstyledProps } from './useGetXstyledProps.js';\nexport { xstyledPropTypes } from './xstyledPropTypes.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,gCAAsD;AACtD,8BAAiC;",
4
+ "sourcesContent": ["export { type XstyledProps, useGetXstyledProps, getXstyledProps } from './useGetXstyledProps.js';\nexport { xstyledPropTypes } from './xstyledPropTypes.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,gCAAuE;AACvE,8BAAiC;",
6
6
  "names": []
7
7
  }
@@ -28,22 +28,21 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
  var useGetXstyledProps_exports = {};
30
30
  __export(useGetXstyledProps_exports, {
31
+ getXstyledProps: () => getXstyledProps,
31
32
  useGetXstyledProps: () => useGetXstyledProps
32
33
  });
33
34
  module.exports = __toCommonJS(useGetXstyledProps_exports);
34
35
  var React = __toESM(require("react"));
35
36
  var import_react = require("react");
36
37
  var import_constants = require("./constants.js");
37
- const useGetXstyledProps = (props) => {
38
- const componentXstyledProps = (0, import_react.useMemo)(() => {
39
- const xstyledPropsObject = {};
40
- Object.entries(props).forEach(([key, value]) => {
41
- if (key in import_constants.xstyledKeys) {
42
- xstyledPropsObject[key] = value;
43
- }
44
- });
45
- return xstyledPropsObject;
46
- }, [props]);
47
- return componentXstyledProps;
38
+ const getXstyledProps = (props) => {
39
+ const xstyledPropsObject = {};
40
+ Object.entries(props).forEach(([key, value]) => {
41
+ if (key in import_constants.xstyledKeys) {
42
+ xstyledPropsObject[key] = value;
43
+ }
44
+ });
45
+ return xstyledPropsObject;
48
46
  };
47
+ const useGetXstyledProps = (props) => (0, import_react.useMemo)(() => getXstyledProps(props), [props]);
49
48
  //# sourceMappingURL=useGetXstyledProps.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/xstyledProps/useGetXstyledProps.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { useMemo } from 'react';\nimport type {\n SizingProps,\n SpaceProps,\n LayoutProps,\n BoxShadowProps,\n BorderProps,\n BackgroundProps,\n FontWeightProps,\n TextAlignProps,\n} from '@elliemae/ds-system';\nimport { xstyledKeys } from './constants.js';\n\nexport interface XstyledProps\n extends SpaceProps,\n SizingProps,\n LayoutProps,\n BoxShadowProps,\n BorderProps,\n BackgroundProps,\n FontWeightProps,\n TextAlignProps {}\n\ntype PropsWithXstyled<T> = T & XstyledProps;\n\nexport const useGetXstyledProps = <T,>(props: PropsWithXstyled<T>): XstyledProps => {\n const componentXstyledProps = useMemo(() => {\n const xstyledPropsObject: Record<string, unknown> = {};\n Object.entries(props).forEach(([key, value]) => {\n if (key in xstyledKeys) {\n xstyledPropsObject[key] = value;\n }\n });\n return xstyledPropsObject;\n }, [props]);\n\n return componentXstyledProps as XstyledProps;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAwB;AAWxB,uBAA4B;AAcrB,MAAM,qBAAqB,CAAK,UAA6C;AAClF,QAAM,4BAAwB,sBAAQ,MAAM;AAC1C,UAAM,qBAA8C,CAAC;AACrD,WAAO,QAAQ,KAAK,EAAE,QAAQ,CAAC,CAAC,KAAK,KAAK,MAAM;AAC9C,UAAI,OAAO,8BAAa;AACtB,2BAAmB,GAAG,IAAI;AAAA,MAC5B;AAAA,IACF,CAAC;AACD,WAAO;AAAA,EACT,GAAG,CAAC,KAAK,CAAC;AAEV,SAAO;AACT;",
4
+ "sourcesContent": ["import { useMemo } from 'react';\nimport type {\n SizingProps,\n SpaceProps,\n LayoutProps,\n BoxShadowProps,\n BorderProps,\n BackgroundProps,\n FontWeightProps,\n TextAlignProps,\n} from '@elliemae/ds-system';\nimport { xstyledKeys } from './constants.js';\n\nexport interface XstyledProps\n extends SpaceProps,\n SizingProps,\n LayoutProps,\n BoxShadowProps,\n BorderProps,\n BackgroundProps,\n FontWeightProps,\n TextAlignProps {}\n\ntype PropsWithXstyled<T> = T & XstyledProps;\n\nexport const getXstyledProps = <T,>(props: PropsWithXstyled<T>): XstyledProps => {\n const xstyledPropsObject: Record<string, unknown> = {};\n Object.entries(props).forEach(([key, value]) => {\n if (key in xstyledKeys) {\n xstyledPropsObject[key] = value;\n }\n });\n return xstyledPropsObject;\n};\n\nexport const useGetXstyledProps = <T,>(props: PropsWithXstyled<T>): XstyledProps =>\n useMemo(() => getXstyledProps(props), [props]);\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAwB;AAWxB,uBAA4B;AAcrB,MAAM,kBAAkB,CAAK,UAA6C;AAC/E,QAAM,qBAA8C,CAAC;AACrD,SAAO,QAAQ,KAAK,EAAE,QAAQ,CAAC,CAAC,KAAK,KAAK,MAAM;AAC9C,QAAI,OAAO,8BAAa;AACtB,yBAAmB,GAAG,IAAI;AAAA,IAC5B;AAAA,EACF,CAAC;AACD,SAAO;AACT;AAEO,MAAM,qBAAqB,CAAK,cACrC,sBAAQ,MAAM,gBAAgB,KAAK,GAAG,CAAC,KAAK,CAAC;",
6
6
  "names": []
7
7
  }
package/dist/esm/index.js CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  useValidateTypescriptPropTypes,
14
14
  validateTypescriptPropTypesImplementation
15
15
  } from "./validation/index.js";
16
- import { useGetXstyledProps, xstyledPropTypes } from "./xstyledProps/index.js";
16
+ import { useGetXstyledProps, xstyledPropTypes, getXstyledProps } from "./xstyledProps/index.js";
17
17
  import { useDeprecateComponent } from "./useDeprecateComponent/index.js";
18
18
  import { getPropsPerDatatestid, getPropsPerDatatestIdPropTypes } from "./propsPerDataTestId/index.js";
19
19
  import { getPropsPerSlotPropTypes } from "./propsPerSlot/index.js";
@@ -27,6 +27,7 @@ export {
27
27
  getPropsPerDatatestIdPropTypes,
28
28
  getPropsPerDatatestid,
29
29
  getPropsPerSlotPropTypes,
30
+ getXstyledProps,
30
31
  globalAttributesPropTypes,
31
32
  throwRequiredError,
32
33
  throwTypeError,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { useMemoMergePropsWithDefault } from './defaultProps/index.js';\nexport { getAriaProps, getDataProps } from './getProps/index.js';\nexport {\n getGlobalAttributes,\n useGetGlobalAttributes,\n globalAttributesPropTypes,\n type GlobalAttributesT,\n} from './globalProps/index.js';\nexport { describe, PropTypes, type DSPropTypesSchema } from './propTypes/index.js';\nexport type { ValidationMap } from 'prop-types';\nexport {\n throwTypeError,\n throwRequiredError,\n useValidateTypescriptPropTypes,\n validateTypescriptPropTypesImplementation,\n} from './validation/index.js';\nexport { type XstyledProps, useGetXstyledProps, xstyledPropTypes } from './xstyledProps/index.js';\nexport { useDeprecateComponent } from './useDeprecateComponent/index.js';\n\nexport { getPropsPerDatatestid, getPropsPerDatatestIdPropTypes } from './propsPerDataTestId/index.js';\nexport { getPropsPerSlotPropTypes } from './propsPerSlot/index.js';\nexport { useOwnerProps } from './useOwnerProps/index.js';\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,oCAAoC;AAC7C,SAAS,cAAc,oBAAoB;AAC3C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,UAAU,iBAAyC;AAE5D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAA4B,oBAAoB,wBAAwB;AACxE,SAAS,6BAA6B;AAEtC,SAAS,uBAAuB,sCAAsC;AACtE,SAAS,gCAAgC;AACzC,SAAS,qBAAqB;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { useMemoMergePropsWithDefault } from './defaultProps/index.js';\nexport { getAriaProps, getDataProps } from './getProps/index.js';\nexport {\n getGlobalAttributes,\n useGetGlobalAttributes,\n globalAttributesPropTypes,\n type GlobalAttributesT,\n} from './globalProps/index.js';\nexport { describe, PropTypes, type DSPropTypesSchema } from './propTypes/index.js';\nexport type { ValidationMap } from 'prop-types';\nexport {\n throwTypeError,\n throwRequiredError,\n useValidateTypescriptPropTypes,\n validateTypescriptPropTypesImplementation,\n} from './validation/index.js';\nexport { type XstyledProps, useGetXstyledProps, xstyledPropTypes, getXstyledProps } from './xstyledProps/index.js';\nexport { useDeprecateComponent } from './useDeprecateComponent/index.js';\n\nexport { getPropsPerDatatestid, getPropsPerDatatestIdPropTypes } from './propsPerDataTestId/index.js';\nexport { getPropsPerSlotPropTypes } from './propsPerSlot/index.js';\nexport { useOwnerProps } from './useOwnerProps/index.js';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,oCAAoC;AAC7C,SAAS,cAAc,oBAAoB;AAC3C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,UAAU,iBAAyC;AAE5D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAA4B,oBAAoB,kBAAkB,uBAAuB;AACzF,SAAS,6BAA6B;AAEtC,SAAS,uBAAuB,sCAAsC;AACtE,SAAS,gCAAgC;AACzC,SAAS,qBAAqB;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/useDeprecateComponent/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-console */\nimport { useEffect } from 'react';\n\ninterface Props {\n componentName: string;\n version: string;\n}\n\nexport const useDeprecateComponent = ({ componentName, version }: Props) => {\n useEffect(() => {\n if (process.env.NODE_ENV !== 'production')\n console.warn(`Warning: ${componentName}:: this component will be deprecated in version: ${version}.`);\n }, [componentName, version]);\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,iBAAiB;AAOnB,MAAM,wBAAwB,CAAC,EAAE,eAAe,QAAQ,MAAa;AAC1E,YAAU,MAAM;AACd,QAAI;AACF,cAAQ,KAAK,YAAY,aAAa,oDAAoD,OAAO,GAAG;AAAA,EACxG,GAAG,CAAC,eAAe,OAAO,CAAC;AAC7B;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-console */\nimport { useEffect } from 'react';\n\ninterface Props {\n componentName: string;\n version: string;\n}\n\nexport const useDeprecateComponent = ({ componentName, version }: Props) => {\n useEffect(() => {\n /*\n https://esbuild.github.io/api/#platform\n When using the build API, all process.env.NODE_ENV expressions are automatically defined to \"production\" if all minification options are enabled and \"development\" otherwise.\n This only happens if process, process.env, and process.env.NODE_ENV are not already defined.\n This substitution is necessary to avoid React-based code crashing instantly (since process is a node API, not a web API).\n */\n if (process.env.NODE_ENV !== 'production')\n console.warn(`Warning: ${componentName}:: this component will be deprecated in version: ${version}.`);\n }, [componentName, version]);\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,iBAAiB;AAOnB,MAAM,wBAAwB,CAAC,EAAE,eAAe,QAAQ,MAAa;AAC1E,YAAU,MAAM;AAOd,QAAI;AACF,cAAQ,KAAK,YAAY,aAAa,oDAAoD,OAAO,GAAG;AAAA,EACxG,GAAG,CAAC,eAAe,OAAO,CAAC;AAC7B;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,8 @@
1
1
  import * as React from "react";
2
- import { useGetXstyledProps } from "./useGetXstyledProps.js";
2
+ import { useGetXstyledProps, getXstyledProps } from "./useGetXstyledProps.js";
3
3
  import { xstyledPropTypes } from "./xstyledPropTypes.js";
4
4
  export {
5
+ getXstyledProps,
5
6
  useGetXstyledProps,
6
7
  xstyledPropTypes
7
8
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/xstyledProps/index.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { type XstyledProps, useGetXstyledProps } from './useGetXstyledProps.js';\nexport { xstyledPropTypes } from './xstyledPropTypes.js';\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAA4B,0BAA0B;AACtD,SAAS,wBAAwB;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { type XstyledProps, useGetXstyledProps, getXstyledProps } from './useGetXstyledProps.js';\nexport { xstyledPropTypes } from './xstyledPropTypes.js';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAA4B,oBAAoB,uBAAuB;AACvE,SAAS,wBAAwB;",
6
6
  "names": []
7
7
  }
@@ -1,19 +1,18 @@
1
1
  import * as React from "react";
2
2
  import { useMemo } from "react";
3
3
  import { xstyledKeys } from "./constants.js";
4
- const useGetXstyledProps = (props) => {
5
- const componentXstyledProps = useMemo(() => {
6
- const xstyledPropsObject = {};
7
- Object.entries(props).forEach(([key, value]) => {
8
- if (key in xstyledKeys) {
9
- xstyledPropsObject[key] = value;
10
- }
11
- });
12
- return xstyledPropsObject;
13
- }, [props]);
14
- return componentXstyledProps;
4
+ const getXstyledProps = (props) => {
5
+ const xstyledPropsObject = {};
6
+ Object.entries(props).forEach(([key, value]) => {
7
+ if (key in xstyledKeys) {
8
+ xstyledPropsObject[key] = value;
9
+ }
10
+ });
11
+ return xstyledPropsObject;
15
12
  };
13
+ const useGetXstyledProps = (props) => useMemo(() => getXstyledProps(props), [props]);
16
14
  export {
15
+ getXstyledProps,
17
16
  useGetXstyledProps
18
17
  };
19
18
  //# sourceMappingURL=useGetXstyledProps.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/xstyledProps/useGetXstyledProps.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useMemo } from 'react';\nimport type {\n SizingProps,\n SpaceProps,\n LayoutProps,\n BoxShadowProps,\n BorderProps,\n BackgroundProps,\n FontWeightProps,\n TextAlignProps,\n} from '@elliemae/ds-system';\nimport { xstyledKeys } from './constants.js';\n\nexport interface XstyledProps\n extends SpaceProps,\n SizingProps,\n LayoutProps,\n BoxShadowProps,\n BorderProps,\n BackgroundProps,\n FontWeightProps,\n TextAlignProps {}\n\ntype PropsWithXstyled<T> = T & XstyledProps;\n\nexport const useGetXstyledProps = <T,>(props: PropsWithXstyled<T>): XstyledProps => {\n const componentXstyledProps = useMemo(() => {\n const xstyledPropsObject: Record<string, unknown> = {};\n Object.entries(props).forEach(([key, value]) => {\n if (key in xstyledKeys) {\n xstyledPropsObject[key] = value;\n }\n });\n return xstyledPropsObject;\n }, [props]);\n\n return componentXstyledProps as XstyledProps;\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,eAAe;AAWxB,SAAS,mBAAmB;AAcrB,MAAM,qBAAqB,CAAK,UAA6C;AAClF,QAAM,wBAAwB,QAAQ,MAAM;AAC1C,UAAM,qBAA8C,CAAC;AACrD,WAAO,QAAQ,KAAK,EAAE,QAAQ,CAAC,CAAC,KAAK,KAAK,MAAM;AAC9C,UAAI,OAAO,aAAa;AACtB,2BAAmB,GAAG,IAAI;AAAA,MAC5B;AAAA,IACF,CAAC;AACD,WAAO;AAAA,EACT,GAAG,CAAC,KAAK,CAAC;AAEV,SAAO;AACT;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useMemo } from 'react';\nimport type {\n SizingProps,\n SpaceProps,\n LayoutProps,\n BoxShadowProps,\n BorderProps,\n BackgroundProps,\n FontWeightProps,\n TextAlignProps,\n} from '@elliemae/ds-system';\nimport { xstyledKeys } from './constants.js';\n\nexport interface XstyledProps\n extends SpaceProps,\n SizingProps,\n LayoutProps,\n BoxShadowProps,\n BorderProps,\n BackgroundProps,\n FontWeightProps,\n TextAlignProps {}\n\ntype PropsWithXstyled<T> = T & XstyledProps;\n\nexport const getXstyledProps = <T,>(props: PropsWithXstyled<T>): XstyledProps => {\n const xstyledPropsObject: Record<string, unknown> = {};\n Object.entries(props).forEach(([key, value]) => {\n if (key in xstyledKeys) {\n xstyledPropsObject[key] = value;\n }\n });\n return xstyledPropsObject;\n};\n\nexport const useGetXstyledProps = <T,>(props: PropsWithXstyled<T>): XstyledProps =>\n useMemo(() => getXstyledProps(props), [props]);\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,eAAe;AAWxB,SAAS,mBAAmB;AAcrB,MAAM,kBAAkB,CAAK,UAA6C;AAC/E,QAAM,qBAA8C,CAAC;AACrD,SAAO,QAAQ,KAAK,EAAE,QAAQ,CAAC,CAAC,KAAK,KAAK,MAAM;AAC9C,QAAI,OAAO,aAAa;AACtB,yBAAmB,GAAG,IAAI;AAAA,IAC5B;AAAA,EACF,CAAC;AACD,SAAO;AACT;AAEO,MAAM,qBAAqB,CAAK,UACrC,QAAQ,MAAM,gBAAgB,KAAK,GAAG,CAAC,KAAK,CAAC;",
6
6
  "names": []
7
7
  }
@@ -4,7 +4,7 @@ export { getGlobalAttributes, useGetGlobalAttributes, globalAttributesPropTypes,
4
4
  export { describe, PropTypes, type DSPropTypesSchema } from './propTypes/index.js';
5
5
  export type { ValidationMap } from 'prop-types';
6
6
  export { throwTypeError, throwRequiredError, useValidateTypescriptPropTypes, validateTypescriptPropTypesImplementation, } from './validation/index.js';
7
- export { type XstyledProps, useGetXstyledProps, xstyledPropTypes } from './xstyledProps/index.js';
7
+ export { type XstyledProps, useGetXstyledProps, xstyledPropTypes, getXstyledProps } from './xstyledProps/index.js';
8
8
  export { useDeprecateComponent } from './useDeprecateComponent/index.js';
9
9
  export { getPropsPerDatatestid, getPropsPerDatatestIdPropTypes } from './propsPerDataTestId/index.js';
10
10
  export { getPropsPerSlotPropTypes } from './propsPerSlot/index.js';
@@ -1,2 +1,2 @@
1
- export { type XstyledProps, useGetXstyledProps } from './useGetXstyledProps.js';
1
+ export { type XstyledProps, useGetXstyledProps, getXstyledProps } from './useGetXstyledProps.js';
2
2
  export { xstyledPropTypes } from './xstyledPropTypes.js';
@@ -2,5 +2,6 @@ import type { SizingProps, SpaceProps, LayoutProps, BoxShadowProps, BorderProps,
2
2
  export interface XstyledProps extends SpaceProps, SizingProps, LayoutProps, BoxShadowProps, BorderProps, BackgroundProps, FontWeightProps, TextAlignProps {
3
3
  }
4
4
  type PropsWithXstyled<T> = T & XstyledProps;
5
+ export declare const getXstyledProps: <T>(props: PropsWithXstyled<T>) => XstyledProps;
5
6
  export declare const useGetXstyledProps: <T>(props: PropsWithXstyled<T>) => XstyledProps;
6
7
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-props-helpers",
3
- "version": "3.55.1",
3
+ "version": "3.57.0-next.1",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Props Helpers",
6
6
  "files": [
@@ -35,14 +35,14 @@
35
35
  "dependencies": {
36
36
  "fast-deep-equal": "~3.1.3",
37
37
  "prop-types": "~15.8.1",
38
- "@elliemae/ds-system": "3.55.1",
39
- "@elliemae/ds-typescript-helpers": "3.55.1"
38
+ "@elliemae/ds-system": "3.57.0-next.1",
39
+ "@elliemae/ds-typescript-helpers": "3.57.0-next.1"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@elliemae/pui-cli": "9.0.0-next.65",
43
43
  "jest": "~29.7.0",
44
44
  "jest-cli": "~29.7.0",
45
- "@elliemae/ds-monorepo-devops": "3.55.1"
45
+ "@elliemae/ds-monorepo-devops": "3.57.0-next.1"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "lodash-es": "^4.17.21",