@elliemae/ds-separator 3.56.0-rc.1 → 3.57.0-next.2

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.
@@ -30,15 +30,13 @@ var DSSeparator_exports = {};
30
30
  __export(DSSeparator_exports, {
31
31
  DSSeparator: () => DSSeparator,
32
32
  DSSeparatorWithSchema: () => DSSeparatorWithSchema,
33
- default: () => DSSeparator_default,
34
- useDeprecateComponent: () => useDeprecateComponent
33
+ default: () => DSSeparator_default
35
34
  });
36
35
  module.exports = __toCommonJS(DSSeparator_exports);
37
36
  var React = __toESM(require("react"));
38
37
  var import_jsx_runtime = require("react/jsx-runtime");
39
- var import_react = require("react");
40
- var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
41
38
  var import_ds_classnames = require("@elliemae/ds-classnames");
39
+ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
42
40
  const blockName = "separator";
43
41
  const MARGIN_SIZE = {
44
42
  S: "s",
@@ -81,12 +79,6 @@ const Separator = (0, import_ds_classnames.aggregatedClasses)("div")(
81
79
  [type]: type
82
80
  })
83
81
  );
84
- const useDeprecateComponent = ({ componentName, version }) => {
85
- (0, import_react.useEffect)(() => {
86
- if (true)
87
- console.warn(`Warning: ${componentName}:: this component will be deprecated in version: ${version}.`);
88
- }, [componentName, version]);
89
- };
90
82
  const types = ["category-level", "group-level", "non-form"];
91
83
  const DSSeparator = ({
92
84
  containerProps,
@@ -98,7 +90,7 @@ const DSSeparator = ({
98
90
  className,
99
91
  style
100
92
  }) => {
101
- useDeprecateComponent({ componentName: "ds-separator", version: "TBD Date: 2023 Q3" });
93
+ (0, import_ds_props_helpers.useDeprecateComponent)({ componentName: "ds-separator", version: "TBD Date: 2023 Q3" });
102
94
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
103
95
  SeparatorWrapper,
104
96
  {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/DSSeparator.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable no-console */\nimport React, { useEffect, type WeakValidationMap } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\n\ntype MarginT = 's' | 'm' | 'l' | 'none';\n\ntype OrientationT = 'horizontal' | 'vertical';\n\ntype TypeT = 'category-level' | 'group-level' | 'non-form';\n\ntype PositionT = 'initial' | 'center' | 'end';\n\ninterface DSSeparatorPropsT {\n containerProps: object;\n dashed: boolean;\n margin: MarginT;\n orientation: OrientationT;\n type: TypeT;\n position: PositionT;\n className?: string;\n style?: object;\n}\n\nconst blockName = 'separator';\n\nconst MARGIN_SIZE = {\n S: 's',\n M: 'm',\n L: 'l',\n none: 'none',\n};\n\nconst POSITION = {\n INITIAL: 'initial',\n CENTER: 'center',\n END: 'end',\n};\n\nconst SeparatorWrapper: React.ForwardRefExoticComponent<\n React.RefAttributes<unknown> & {\n children: React.ReactNode;\n className?: string;\n classProps: Pick<DSSeparatorPropsT, 'margin' | 'orientation' | 'dashed' | 'position'>;\n style?: object;\n }\n> = aggregatedClasses('div')(\n 'separator-wrapper',\n null,\n ({\n margin,\n orientation,\n dashed,\n position,\n }: {\n margin: MarginT;\n orientation: OrientationT;\n dashed: boolean;\n position: PositionT;\n }) => ({\n dashed,\n [margin]: margin,\n [orientation]: orientation,\n [position]: position,\n }),\n);\n\nconst Separator: React.ForwardRefExoticComponent<\n React.RefAttributes<unknown> & { classProps: Pick<DSSeparatorPropsT, 'margin' | 'orientation' | 'dashed' | 'type'> }\n> = aggregatedClasses('div')(\n blockName,\n null,\n ({\n dashed,\n margin,\n orientation,\n type,\n }: {\n dashed: boolean;\n margin: MarginT;\n orientation: OrientationT;\n type: TypeT;\n }) => ({\n dashed,\n [margin]: margin,\n [orientation]: orientation,\n [type]: type,\n }),\n);\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\nconst types = ['category-level', 'group-level', 'non-form'];\n\nconst DSSeparator = ({\n containerProps,\n dashed,\n margin,\n orientation,\n type,\n position,\n className,\n style,\n}: DSSeparatorPropsT) => {\n useDeprecateComponent({ componentName: 'ds-separator', version: 'TBD Date: 2023 Q3' });\n\n return (\n <SeparatorWrapper\n {...containerProps}\n className={className}\n classProps={{\n margin,\n orientation,\n dashed,\n position,\n }}\n style={style}\n >\n <Separator\n classProps={{\n dashed,\n margin,\n orientation,\n type,\n }}\n />\n </SeparatorWrapper>\n );\n};\n\nDSSeparator.defaultProps = {\n containerProps: {},\n dashed: false,\n margin: MARGIN_SIZE.S,\n orientation: 'horizontal',\n type: 'category-level',\n position: POSITION.INITIAL,\n};\n\nconst props = {\n /** class for separator */\n className: PropTypes.string.description('class for separator'),\n /** style object for separator */\n style: PropTypes.object.description('style object for separator'),\n /** Injected props to wrapper element of component */\n containerProps: PropTypes.object.description('Injected props to wrapper element of component'),\n /**\n * If the separator has to be dashed or solid\n */\n dashed: PropTypes.bool.description('If the separator has to be dashed or solid'),\n /**\n * Amount of margin to be added to the separator\n */\n margin: PropTypes.oneOf(['s', 'm', 'l', 'none']).description('Amount of margin to be added to the separator'),\n /**\n * Orientation 'horizontal' or 'vertical'\n */\n orientation: PropTypes.string.description(\"Orientation 'horizontal' or 'vertical'\"),\n /**\n * ['category-level', 'group-level', 'non-form']\n */\n type: PropTypes.oneOf(types).description(\"['category-level', 'group-level', 'non-form']\"),\n /**\n * ['initial', 'center', 'end']\n */\n position: PropTypes.oneOf(['initial', 'center', 'end']).description(\"['initial', 'center', 'end']\"),\n};\n\nDSSeparator.displayName = 'DSSeparator';\nconst DSSeparatorWithSchema = describe(DSSeparator);\n\nDSSeparatorWithSchema.propTypes = props as WeakValidationMap<unknown>;\n\nexport { DSSeparator, DSSeparatorWithSchema };\nexport default DSSeparator;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgIjB;AA/HN,mBAAyD;AACzD,8BAAoC;AACpC,2BAAkC;AAqBlC,MAAM,YAAY;AAElB,MAAM,cAAc;AAAA,EAClB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,MAAM;AACR;AAEA,MAAM,WAAW;AAAA,EACf,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,KAAK;AACP;AAEA,MAAM,uBAOF,wCAAkB,KAAK;AAAA,EACzB;AAAA,EACA;AAAA,EACA,CAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,OAKO;AAAA,IACL;AAAA,IACA,CAAC,MAAM,GAAG;AAAA,IACV,CAAC,WAAW,GAAG;AAAA,IACf,CAAC,QAAQ,GAAG;AAAA,EACd;AACF;AAEA,MAAM,gBAEF,wCAAkB,KAAK;AAAA,EACzB;AAAA,EACA;AAAA,EACA,CAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,OAKO;AAAA,IACL;AAAA,IACA,CAAC,MAAM,GAAG;AAAA,IACV,CAAC,WAAW,GAAG;AAAA,IACf,CAAC,IAAI,GAAG;AAAA,EACV;AACF;AAOO,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;AAEA,MAAM,QAAQ,CAAC,kBAAkB,eAAe,UAAU;AAE1D,MAAM,cAAc,CAAC;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAC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/default-props-match-prop-types */\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { PropTypes, describe, useDeprecateComponent } from '@elliemae/ds-props-helpers';\nimport React, { type WeakValidationMap } from 'react';\n\ntype MarginT = 's' | 'm' | 'l' | 'none';\n\ntype OrientationT = 'horizontal' | 'vertical';\n\ntype TypeT = 'category-level' | 'group-level' | 'non-form';\n\ntype PositionT = 'initial' | 'center' | 'end';\n\ninterface DSSeparatorPropsT {\n containerProps: object;\n dashed: boolean;\n margin: MarginT;\n orientation: OrientationT;\n type: TypeT;\n position: PositionT;\n className?: string;\n style?: object;\n}\n\nconst blockName = 'separator';\n\nconst MARGIN_SIZE = {\n S: 's',\n M: 'm',\n L: 'l',\n none: 'none',\n};\n\nconst POSITION = {\n INITIAL: 'initial',\n CENTER: 'center',\n END: 'end',\n};\n\nconst SeparatorWrapper: React.ForwardRefExoticComponent<\n React.RefAttributes<unknown> & {\n children: React.ReactNode;\n className?: string;\n classProps: Pick<DSSeparatorPropsT, 'margin' | 'orientation' | 'dashed' | 'position'>;\n style?: object;\n }\n> = aggregatedClasses('div')(\n 'separator-wrapper',\n null,\n ({\n margin,\n orientation,\n dashed,\n position,\n }: {\n margin: MarginT;\n orientation: OrientationT;\n dashed: boolean;\n position: PositionT;\n }) => ({\n dashed,\n [margin]: margin,\n [orientation]: orientation,\n [position]: position,\n }),\n);\n\nconst Separator: React.ForwardRefExoticComponent<\n React.RefAttributes<unknown> & { classProps: Pick<DSSeparatorPropsT, 'margin' | 'orientation' | 'dashed' | 'type'> }\n> = aggregatedClasses('div')(\n blockName,\n null,\n ({\n dashed,\n margin,\n orientation,\n type,\n }: {\n dashed: boolean;\n margin: MarginT;\n orientation: OrientationT;\n type: TypeT;\n }) => ({\n dashed,\n [margin]: margin,\n [orientation]: orientation,\n [type]: type,\n }),\n);\n\nconst types = ['category-level', 'group-level', 'non-form'];\n\nconst DSSeparator = ({\n containerProps,\n dashed,\n margin,\n orientation,\n type,\n position,\n className,\n style,\n}: DSSeparatorPropsT) => {\n useDeprecateComponent({ componentName: 'ds-separator', version: 'TBD Date: 2023 Q3' });\n\n return (\n <SeparatorWrapper\n {...containerProps}\n className={className}\n classProps={{\n margin,\n orientation,\n dashed,\n position,\n }}\n style={style}\n >\n <Separator\n classProps={{\n dashed,\n margin,\n orientation,\n type,\n }}\n />\n </SeparatorWrapper>\n );\n};\n\nDSSeparator.defaultProps = {\n containerProps: {},\n dashed: false,\n margin: MARGIN_SIZE.S,\n orientation: 'horizontal',\n type: 'category-level',\n position: POSITION.INITIAL,\n};\n\nconst props = {\n /** class for separator */\n className: PropTypes.string.description('class for separator'),\n /** style object for separator */\n style: PropTypes.object.description('style object for separator'),\n /** Injected props to wrapper element of component */\n containerProps: PropTypes.object.description('Injected props to wrapper element of component'),\n /**\n * If the separator has to be dashed or solid\n */\n dashed: PropTypes.bool.description('If the separator has to be dashed or solid'),\n /**\n * Amount of margin to be added to the separator\n */\n margin: PropTypes.oneOf(['s', 'm', 'l', 'none']).description('Amount of margin to be added to the separator'),\n /**\n * Orientation 'horizontal' or 'vertical'\n */\n orientation: PropTypes.string.description(\"Orientation 'horizontal' or 'vertical'\"),\n /**\n * ['category-level', 'group-level', 'non-form']\n */\n type: PropTypes.oneOf(types).description(\"['category-level', 'group-level', 'non-form']\"),\n /**\n * ['initial', 'center', 'end']\n */\n position: PropTypes.oneOf(['initial', 'center', 'end']).description(\"['initial', 'center', 'end']\"),\n};\n\nDSSeparator.displayName = 'DSSeparator';\nconst DSSeparatorWithSchema = describe(DSSeparator);\n\nDSSeparatorWithSchema.propTypes = props as WeakValidationMap<unknown>;\n\nexport { DSSeparator, DSSeparatorWithSchema };\nexport default DSSeparator;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADoHjB;AAnHN,2BAAkC;AAClC,8BAA2D;AAsB3D,MAAM,YAAY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;AAAA,EACR,QAAQ,YAAY;AAAA,EACpB,aAAa;AAAA,EACb,MAAM;AAAA,EACN,UAAU,SAAS;AACrB;AAEA,MAAM,QAAQ;AAAA;AAAA,EAEZ,WAAW,kCAAU,OAAO,YAAY,qBAAqB;AAAA;AAAA,EAE7D,OAAO,kCAAU,OAAO,YAAY,4BAA4B;AAAA;AAAA,EAEhE,gBAAgB,kCAAU,OAAO,YAAY,gDAAgD;AAAA;AAAA;AAAA;AAAA,EAI7F,QAAQ,kCAAU,KAAK,YAAY,4CAA4C;AAAA;AAAA;AAAA;AAAA,EAI/E,QAAQ,kCAAU,MAAM,CAAC,KAAK,KAAK,KAAK,MAAM,CAAC,EAAE,YAAY,+CAA+C;AAAA;AAAA;AAAA;AAAA,EAI5G,aAAa,kCAAU,OAAO,YAAY,wCAAwC;AAAA;AAAA;AAAA;AAAA,EAIlF,MAAM,kCAAU,MAAM,KAAK,EAAE,YAAY,+CAA+C;AAAA;AAAA;AAAA;AAAA,EAIxF,UAAU,kCAAU,MAAM,CAAC,WAAW,UAAU,KAAK,CAAC,EAAE,YAAY,8BAA8B;AACpG;AAEA,YAAY,cAAc;AAC1B,MAAM,4BAAwB,kCAAS,WAAW;AAElD,sBAAsB,YAAY;AAGlC,IAAO,sBAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,8 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { jsx } from "react/jsx-runtime";
3
- import { useEffect } from "react";
4
- import { PropTypes, describe } from "@elliemae/ds-props-helpers";
5
3
  import { aggregatedClasses } from "@elliemae/ds-classnames";
4
+ import { PropTypes, describe, useDeprecateComponent } from "@elliemae/ds-props-helpers";
6
5
  const blockName = "separator";
7
6
  const MARGIN_SIZE = {
8
7
  S: "s",
@@ -45,12 +44,6 @@ const Separator = aggregatedClasses("div")(
45
44
  [type]: type
46
45
  })
47
46
  );
48
- const useDeprecateComponent = ({ componentName, version }) => {
49
- useEffect(() => {
50
- if (true)
51
- console.warn(`Warning: ${componentName}:: this component will be deprecated in version: ${version}.`);
52
- }, [componentName, version]);
53
- };
54
47
  const types = ["category-level", "group-level", "non-form"];
55
48
  const DSSeparator = ({
56
49
  containerProps,
@@ -132,7 +125,6 @@ var DSSeparator_default = DSSeparator;
132
125
  export {
133
126
  DSSeparator,
134
127
  DSSeparatorWithSchema,
135
- DSSeparator_default as default,
136
- useDeprecateComponent
128
+ DSSeparator_default as default
137
129
  };
138
130
  //# sourceMappingURL=DSSeparator.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSSeparator.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-console */\nimport React, { useEffect, type WeakValidationMap } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\n\ntype MarginT = 's' | 'm' | 'l' | 'none';\n\ntype OrientationT = 'horizontal' | 'vertical';\n\ntype TypeT = 'category-level' | 'group-level' | 'non-form';\n\ntype PositionT = 'initial' | 'center' | 'end';\n\ninterface DSSeparatorPropsT {\n containerProps: object;\n dashed: boolean;\n margin: MarginT;\n orientation: OrientationT;\n type: TypeT;\n position: PositionT;\n className?: string;\n style?: object;\n}\n\nconst blockName = 'separator';\n\nconst MARGIN_SIZE = {\n S: 's',\n M: 'm',\n L: 'l',\n none: 'none',\n};\n\nconst POSITION = {\n INITIAL: 'initial',\n CENTER: 'center',\n END: 'end',\n};\n\nconst SeparatorWrapper: React.ForwardRefExoticComponent<\n React.RefAttributes<unknown> & {\n children: React.ReactNode;\n className?: string;\n classProps: Pick<DSSeparatorPropsT, 'margin' | 'orientation' | 'dashed' | 'position'>;\n style?: object;\n }\n> = aggregatedClasses('div')(\n 'separator-wrapper',\n null,\n ({\n margin,\n orientation,\n dashed,\n position,\n }: {\n margin: MarginT;\n orientation: OrientationT;\n dashed: boolean;\n position: PositionT;\n }) => ({\n dashed,\n [margin]: margin,\n [orientation]: orientation,\n [position]: position,\n }),\n);\n\nconst Separator: React.ForwardRefExoticComponent<\n React.RefAttributes<unknown> & { classProps: Pick<DSSeparatorPropsT, 'margin' | 'orientation' | 'dashed' | 'type'> }\n> = aggregatedClasses('div')(\n blockName,\n null,\n ({\n dashed,\n margin,\n orientation,\n type,\n }: {\n dashed: boolean;\n margin: MarginT;\n orientation: OrientationT;\n type: TypeT;\n }) => ({\n dashed,\n [margin]: margin,\n [orientation]: orientation,\n [type]: type,\n }),\n);\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\nconst types = ['category-level', 'group-level', 'non-form'];\n\nconst DSSeparator = ({\n containerProps,\n dashed,\n margin,\n orientation,\n type,\n position,\n className,\n style,\n}: DSSeparatorPropsT) => {\n useDeprecateComponent({ componentName: 'ds-separator', version: 'TBD Date: 2023 Q3' });\n\n return (\n <SeparatorWrapper\n {...containerProps}\n className={className}\n classProps={{\n margin,\n orientation,\n dashed,\n position,\n }}\n style={style}\n >\n <Separator\n classProps={{\n dashed,\n margin,\n orientation,\n type,\n }}\n />\n </SeparatorWrapper>\n );\n};\n\nDSSeparator.defaultProps = {\n containerProps: {},\n dashed: false,\n margin: MARGIN_SIZE.S,\n orientation: 'horizontal',\n type: 'category-level',\n position: POSITION.INITIAL,\n};\n\nconst props = {\n /** class for separator */\n className: PropTypes.string.description('class for separator'),\n /** style object for separator */\n style: PropTypes.object.description('style object for separator'),\n /** Injected props to wrapper element of component */\n containerProps: PropTypes.object.description('Injected props to wrapper element of component'),\n /**\n * If the separator has to be dashed or solid\n */\n dashed: PropTypes.bool.description('If the separator has to be dashed or solid'),\n /**\n * Amount of margin to be added to the separator\n */\n margin: PropTypes.oneOf(['s', 'm', 'l', 'none']).description('Amount of margin to be added to the separator'),\n /**\n * Orientation 'horizontal' or 'vertical'\n */\n orientation: PropTypes.string.description(\"Orientation 'horizontal' or 'vertical'\"),\n /**\n * ['category-level', 'group-level', 'non-form']\n */\n type: PropTypes.oneOf(types).description(\"['category-level', 'group-level', 'non-form']\"),\n /**\n * ['initial', 'center', 'end']\n */\n position: PropTypes.oneOf(['initial', 'center', 'end']).description(\"['initial', 'center', 'end']\"),\n};\n\nDSSeparator.displayName = 'DSSeparator';\nconst DSSeparatorWithSchema = describe(DSSeparator);\n\nDSSeparatorWithSchema.propTypes = props as WeakValidationMap<unknown>;\n\nexport { DSSeparator, DSSeparatorWithSchema };\nexport default DSSeparator;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACgIjB;AA/HN,SAAgB,iBAAyC;AACzD,SAAS,WAAW,gBAAgB;AACpC,SAAS,yBAAyB;AAqBlC,MAAM,YAAY;AAElB,MAAM,cAAc;AAAA,EAClB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,MAAM;AACR;AAEA,MAAM,WAAW;AAAA,EACf,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,KAAK;AACP;AAEA,MAAM,mBAOF,kBAAkB,KAAK;AAAA,EACzB;AAAA,EACA;AAAA,EACA,CAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,OAKO;AAAA,IACL;AAAA,IACA,CAAC,MAAM,GAAG;AAAA,IACV,CAAC,WAAW,GAAG;AAAA,IACf,CAAC,QAAQ,GAAG;AAAA,EACd;AACF;AAEA,MAAM,YAEF,kBAAkB,KAAK;AAAA,EACzB;AAAA,EACA;AAAA,EACA,CAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,OAKO;AAAA,IACL;AAAA,IACA,CAAC,MAAM,GAAG;AAAA,IACV,CAAC,WAAW,GAAG;AAAA,IACf,CAAC,IAAI,GAAG;AAAA,EACV;AACF;AAOO,MAAM,wBAAwB,CAAC,EAA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AA;AAAA;AAAA,EAIlF,MAAM,UAAU,MAAM,KAAK,EAAE,YAAY,+CAA+C;AAAA;AAAA;AAAA;AAAA,EAIxF,UAAU,UAAU,MAAM,CAAC,WAAW,UAAU,KAAK,CAAC,EAAE,YAAY,8BAA8B;AACpG;AAEA,YAAY,cAAc;AAC1B,MAAM,wBAAwB,SAAS,WAAW;AAElD,sBAAsB,YAAY;AAGlC,IAAO,sBAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/default-props-match-prop-types */\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { PropTypes, describe, useDeprecateComponent } from '@elliemae/ds-props-helpers';\nimport React, { type WeakValidationMap } from 'react';\n\ntype MarginT = 's' | 'm' | 'l' | 'none';\n\ntype OrientationT = 'horizontal' | 'vertical';\n\ntype TypeT = 'category-level' | 'group-level' | 'non-form';\n\ntype PositionT = 'initial' | 'center' | 'end';\n\ninterface DSSeparatorPropsT {\n containerProps: object;\n dashed: boolean;\n margin: MarginT;\n orientation: OrientationT;\n type: TypeT;\n position: PositionT;\n className?: string;\n style?: object;\n}\n\nconst blockName = 'separator';\n\nconst MARGIN_SIZE = {\n S: 's',\n M: 'm',\n L: 'l',\n none: 'none',\n};\n\nconst POSITION = {\n INITIAL: 'initial',\n CENTER: 'center',\n END: 'end',\n};\n\nconst SeparatorWrapper: React.ForwardRefExoticComponent<\n React.RefAttributes<unknown> & {\n children: React.ReactNode;\n className?: string;\n classProps: Pick<DSSeparatorPropsT, 'margin' | 'orientation' | 'dashed' | 'position'>;\n style?: object;\n }\n> = aggregatedClasses('div')(\n 'separator-wrapper',\n null,\n ({\n margin,\n orientation,\n dashed,\n position,\n }: {\n margin: MarginT;\n orientation: OrientationT;\n dashed: boolean;\n position: PositionT;\n }) => ({\n dashed,\n [margin]: margin,\n [orientation]: orientation,\n [position]: position,\n }),\n);\n\nconst Separator: React.ForwardRefExoticComponent<\n React.RefAttributes<unknown> & { classProps: Pick<DSSeparatorPropsT, 'margin' | 'orientation' | 'dashed' | 'type'> }\n> = aggregatedClasses('div')(\n blockName,\n null,\n ({\n dashed,\n margin,\n orientation,\n type,\n }: {\n dashed: boolean;\n margin: MarginT;\n orientation: OrientationT;\n type: TypeT;\n }) => ({\n dashed,\n [margin]: margin,\n [orientation]: orientation,\n [type]: type,\n }),\n);\n\nconst types = ['category-level', 'group-level', 'non-form'];\n\nconst DSSeparator = ({\n containerProps,\n dashed,\n margin,\n orientation,\n type,\n position,\n className,\n style,\n}: DSSeparatorPropsT) => {\n useDeprecateComponent({ componentName: 'ds-separator', version: 'TBD Date: 2023 Q3' });\n\n return (\n <SeparatorWrapper\n {...containerProps}\n className={className}\n classProps={{\n margin,\n orientation,\n dashed,\n position,\n }}\n style={style}\n >\n <Separator\n classProps={{\n dashed,\n margin,\n orientation,\n type,\n }}\n />\n </SeparatorWrapper>\n );\n};\n\nDSSeparator.defaultProps = {\n containerProps: {},\n dashed: false,\n margin: MARGIN_SIZE.S,\n orientation: 'horizontal',\n type: 'category-level',\n position: POSITION.INITIAL,\n};\n\nconst props = {\n /** class for separator */\n className: PropTypes.string.description('class for separator'),\n /** style object for separator */\n style: PropTypes.object.description('style object for separator'),\n /** Injected props to wrapper element of component */\n containerProps: PropTypes.object.description('Injected props to wrapper element of component'),\n /**\n * If the separator has to be dashed or solid\n */\n dashed: PropTypes.bool.description('If the separator has to be dashed or solid'),\n /**\n * Amount of margin to be added to the separator\n */\n margin: PropTypes.oneOf(['s', 'm', 'l', 'none']).description('Amount of margin to be added to the separator'),\n /**\n * Orientation 'horizontal' or 'vertical'\n */\n orientation: PropTypes.string.description(\"Orientation 'horizontal' or 'vertical'\"),\n /**\n * ['category-level', 'group-level', 'non-form']\n */\n type: PropTypes.oneOf(types).description(\"['category-level', 'group-level', 'non-form']\"),\n /**\n * ['initial', 'center', 'end']\n */\n position: PropTypes.oneOf(['initial', 'center', 'end']).description(\"['initial', 'center', 'end']\"),\n};\n\nDSSeparator.displayName = 'DSSeparator';\nconst DSSeparatorWithSchema = describe(DSSeparator);\n\nDSSeparatorWithSchema.propTypes = props as WeakValidationMap<unknown>;\n\nexport { DSSeparator, DSSeparatorWithSchema };\nexport default DSSeparator;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACoHjB;AAnHN,SAAS,yBAAyB;AAClC,SAAS,WAAW,UAAU,6BAA6B;AAsB3D,MAAM,YAAY;AAElB,MAAM,cAAc;AAAA,EAClB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,MAAM;AACR;AAEA,MAAM,WAAW;AAAA,EACf,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,KAAK;AACP;AAEA,MAAM,mBAOF,kBAAkB,KAAK;AAAA,EACzB;AAAA,EACA;AAAA,EACA,CAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,OAKO;AAAA,IACL;AAAA,IACA,CAAC,MAAM,GAAG;AAAA,IACV,CAAC,WAAW,GAAG;AAAA,IACf,CAAC,QAAQ,GAAG;AAAA,EACd;AACF;AAEA,MAAM,YAEF,kBAAkB,KAAK;AAAA,EACzB;AAAA,EACA;AAAA,EACA,CAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,OAKO;AAAA,IACL;AAAA,IACA,CAAC,MAAM,GAAG;AAAA,IACV,CAAC,WAAW,GAAG;AAAA,IACf,CAAC,IAAI,GAAG;AAAA,EACV;AACF;AAEA,MAAM,QAAQ,CAAC,kBAAkB,eAAe,UAAU;AAE1D,MAAM,cAAc,CAAC;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAyB;AACvB,wBAAsB,EAAE,eAAe,gBAAgB,SAAS,oBAAoB,CAAC;AAErF,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA,YAAY;AAAA,QACV;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MACA;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC,YAAY;AAAA,YACV;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,UACF;AAAA;AAAA,MACF;AAAA;AAAA,EACF;AAEJ;AAEA,YAAY,eAAe;AAAA,EACzB,gBAAgB,CAAC;AAAA,EACjB,QAAQ;AAAA,EACR,QAAQ,YAAY;AAAA,EACpB,aAAa;AAAA,EACb,MAAM;AAAA,EACN,UAAU,SAAS;AACrB;AAEA,MAAM,QAAQ;AAAA;AAAA,EAEZ,WAAW,UAAU,OAAO,YAAY,qBAAqB;AAAA;AAAA,EAE7D,OAAO,UAAU,OAAO,YAAY,4BAA4B;AAAA;AAAA,EAEhE,gBAAgB,UAAU,OAAO,YAAY,gDAAgD;AAAA;AAAA;AAAA;AAAA,EAI7F,QAAQ,UAAU,KAAK,YAAY,4CAA4C;AAAA;AAAA;AAAA;AAAA,EAI/E,QAAQ,UAAU,MAAM,CAAC,KAAK,KAAK,KAAK,MAAM,CAAC,EAAE,YAAY,+CAA+C;AAAA;AAAA;AAAA;AAAA,EAI5G,aAAa,UAAU,OAAO,YAAY,wCAAwC;AAAA;AAAA;AAAA;AAAA,EAIlF,MAAM,UAAU,MAAM,KAAK,EAAE,YAAY,+CAA+C;AAAA;AAAA;AAAA;AAAA,EAIxF,UAAU,UAAU,MAAM,CAAC,WAAW,UAAU,KAAK,CAAC,EAAE,YAAY,8BAA8B;AACpG;AAEA,YAAY,cAAc;AAC1B,MAAM,wBAAwB,SAAS,WAAW;AAElD,sBAAsB,YAAY;AAGlC,IAAO,sBAAQ;",
6
6
  "names": []
7
7
  }
@@ -12,11 +12,6 @@ interface DSSeparatorPropsT {
12
12
  className?: string;
13
13
  style?: object;
14
14
  }
15
- interface Props {
16
- componentName: string;
17
- version: string;
18
- }
19
- export declare const useDeprecateComponent: ({ componentName, version }: Props) => void;
20
15
  declare const DSSeparator: {
21
16
  ({ containerProps, dashed, margin, orientation, type, position, className, style, }: DSSeparatorPropsT): import("react/jsx-runtime").JSX.Element;
22
17
  defaultProps: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-separator",
3
- "version": "3.56.0-rc.1",
3
+ "version": "3.57.0-next.2",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Separator",
6
6
  "files": [
@@ -36,16 +36,16 @@
36
36
  "indent": 4
37
37
  },
38
38
  "dependencies": {
39
- "@elliemae/ds-classnames": "3.56.0-rc.1",
40
- "@elliemae/ds-system": "3.56.0-rc.1",
41
- "@elliemae/ds-props-helpers": "3.56.0-rc.1"
39
+ "@elliemae/ds-classnames": "3.57.0-next.2",
40
+ "@elliemae/ds-props-helpers": "3.57.0-next.2",
41
+ "@elliemae/ds-system": "3.57.0-next.2"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@elliemae/pui-cli": "9.0.0-next.65",
45
45
  "jest": "~29.7.0",
46
46
  "styled-components": "~5.3.9",
47
- "@elliemae/ds-monorepo-devops": "3.56.0-rc.1",
48
- "@elliemae/ds-test-utils": "3.56.0-rc.1"
47
+ "@elliemae/ds-monorepo-devops": "3.57.0-next.2",
48
+ "@elliemae/ds-test-utils": "3.57.0-next.2"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "react": "^18.3.1",