@elliemae/ds-separator 3.28.1-rc.2 → 3.29.0-next.0

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.
@@ -53,21 +53,44 @@ const POSITION = {
53
53
  const SeparatorWrapper = (0, import_ds_classnames.aggregatedClasses)("div")(
54
54
  "separator-wrapper",
55
55
  null,
56
- ({ margin, orientation, dashed, position }) => ({
56
+ ({
57
+ margin,
58
+ orientation,
59
+ dashed,
60
+ position
61
+ }) => ({
57
62
  dashed,
58
63
  [margin]: margin,
59
64
  [orientation]: orientation,
60
65
  [position]: position
61
66
  })
62
67
  );
63
- const Separator = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, null, ({ dashed, margin, orientation, type }) => ({
64
- dashed,
65
- [margin]: margin,
66
- [orientation]: orientation,
67
- [type]: type
68
- }));
68
+ const Separator = (0, import_ds_classnames.aggregatedClasses)("div")(
69
+ blockName,
70
+ null,
71
+ ({
72
+ dashed,
73
+ margin,
74
+ orientation,
75
+ type
76
+ }) => ({
77
+ dashed,
78
+ [margin]: margin,
79
+ [orientation]: orientation,
80
+ [type]: type
81
+ })
82
+ );
69
83
  const types = ["category-level", "group-level", "non-form"];
70
- const DSSeparator = ({ containerProps, dashed, margin, orientation, type, position, className, style }) => {
84
+ const DSSeparator = ({
85
+ containerProps,
86
+ dashed,
87
+ margin,
88
+ orientation,
89
+ type,
90
+ position,
91
+ className,
92
+ style
93
+ }) => {
71
94
  (0, import_ds_utilities.useDeprecateComponent)({ componentName: "ds-separator", version: "TBD Date: 2023 Q3" });
72
95
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
73
96
  SeparatorWrapper,
@@ -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 eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React from 'react';\nimport { useDeprecateComponent } from '@elliemae/ds-utilities';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\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 = aggregatedClasses('div')(\n 'separator-wrapper',\n null,\n ({ margin, orientation, dashed, position }) => ({\n dashed,\n [margin]: margin,\n [orientation]: orientation,\n [position]: position,\n }),\n);\n\nconst Separator = aggregatedClasses('div')(blockName, null, ({ dashed, margin, orientation, type }) => ({\n dashed,\n [margin]: margin,\n [orientation]: orientation,\n [type]: type,\n}));\n\nconst types = ['category-level', 'group-level', 'non-form'];\n\nconst DSSeparator = ({ containerProps, dashed, margin, orientation, type, position, className, style }) => {\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.propTypes = props;\nDSSeparator.displayName = 'DSSeparator';\nconst DSSeparatorWithSchema = describe(DSSeparator);\n\nDSSeparatorWithSchema.propTypes = props;\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;AD2DjB;AAtDN,0BAAsC;AACtC,8BAAoC;AACpC,2BAAkC;AAElC,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,uBAAmB,wCAAkB,KAAK;AAAA,EAC9C;AAAA,EACA;AAAA,EACA,CAAC,EAAE,QAAQ,aAAa,QAAQ,SAAS,OAAO;AAAA,IAC9C;AAAA,IACA,CAAC,MAAM,GAAG;AAAA,IACV,CAAC,WAAW,GAAG;AAAA,IACf,CAAC,QAAQ,GAAG;AAAA,EACd;AACF;AAEA,MAAM,gBAAY,wCAAkB,KAAK,EAAE,WAAW,MAAM,CAAC,EAAE,QAAQ,QAAQ,aAAa,KAAK,OAAO;AAAA,EACtG;AAAA,EACA,CAAC,MAAM,GAAG;AAAA,EACV,CAAC,WAAW,GAAG;AAAA,EACf,CAAC,IAAI,GAAG;AACV,EAAE;AAEF,MAAM,QAAQ,CAAC,kBAAkB,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AC1B,MAAM,4BAAwB,kCAAS,WAAW;AAElD,sBAAsB,YAAY;AAGlC,IAAO,sBAAQ;",
4
+ "sourcesContent": ["import React, { type WeakValidationMap } from 'react';\nimport { useDeprecateComponent } from '@elliemae/ds-utilities';\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\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.propTypes = props;\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": ";;;;;;;;;;;;;;;;;;;;;;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AAA,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,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,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,4BAAwB,kCAAS,WAAW;AAElD,sBAAsB,YAAY;AAGlC,IAAO,sBAAQ;",
6
6
  "names": []
7
7
  }
@@ -26,6 +26,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
26
26
  var v2_exports = {};
27
27
  module.exports = __toCommonJS(v2_exports);
28
28
  var React = __toESM(require("react"));
29
+ var import_react_desc_prop_types = require("./react-desc-prop-types.js");
29
30
  __reExport(v2_exports, require("./DSSeparatorV2.js"), module.exports);
30
31
  __reExport(v2_exports, require("./exported-related/DSSeparatorV2Datatestid.js"), module.exports);
31
32
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/v2/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export * from './DSSeparatorV2.js';\nexport * from './exported-related/DSSeparatorV2Datatestid.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAc,+BAAd;AACA,uBAAc,0DADd;",
4
+ "sourcesContent": ["export { type DSSeparatorV2T } from './react-desc-prop-types.js';\nexport * from './DSSeparatorV2.js';\nexport * from './exported-related/DSSeparatorV2Datatestid.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,mCAAoC;AACpC,uBAAc,+BADd;AAEA,uBAAc,0DAFd;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/v2/react-desc-prop-types.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import {\n PropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n type GlobalAttributesT,\n type XstyledProps,\n} from '@elliemae/ds-props-helpers';\n\nexport const defaultProps: DSSeparatorV2T.DefaultProps = {\n isVertical: false,\n isDotted: false,\n colorType: 'dark',\n};\n\nexport const propTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n isVertical: PropTypes.bool.description('Set vertical orientation.').defaultValue(false),\n isDotted: PropTypes.bool.description('Set dashed style.').defaultValue(false),\n colorType: PropTypes.oneOf(['dark', 'light'])\n .description('Set dark or light color types. Using color property will override this one.')\n .defaultValue('dark'),\n color: PropTypes.string.description('Set a custom color.'),\n};\n\nexport declare namespace DSSeparatorV2T {\n export interface DefaultProps {\n isVertical: boolean;\n isDotted: boolean;\n colorType: 'dark' | 'light';\n }\n\n export interface PropsOptional {\n color?: string;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n PropsOptional,\n Omit<GlobalAttributesT, keyof DefaultProps | keyof PropsOptional>,\n Omit<XstyledProps, keyof PropsOptional> {}\n}\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAMO;AAEA,MAAM,eAA4C;AAAA,EACvD,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,WAAW;AACb;AAEO,MAAM,YAAY;AAAA,EACvB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,YAAY,kCAAU,KAAK,YAAY,2BAA2B,EAAE,aAAa,KAAK;AAAA,EACtF,UAAU,kCAAU,KAAK,YAAY,mBAAmB,EAAE,aAAa,KAAK;AAAA,EAC5E,WAAW,kCAAU,MAAM,CAAC,QAAQ,OAAO,CAAC,EACzC,YAAY,6EAA6E,EACzF,aAAa,MAAM;AAAA,EACtB,OAAO,kCAAU,OAAO,YAAY,qBAAqB;AAC3D;",
4
+ "sourcesContent": ["import {\n PropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n type GlobalAttributesT,\n type XstyledProps,\n} from '@elliemae/ds-props-helpers';\n\nexport declare namespace DSSeparatorV2T {\n export interface DefaultProps {\n isVertical: boolean;\n isDotted: boolean;\n colorType: 'dark' | 'light';\n }\n\n export interface OptionalProps {\n color?: string;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT, keyof DefaultProps | keyof OptionalProps>,\n Omit<XstyledProps, keyof OptionalProps> {}\n}\n\nexport const defaultProps: DSSeparatorV2T.DefaultProps = {\n isVertical: false,\n isDotted: false,\n colorType: 'dark',\n};\n\nexport const propTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n isVertical: PropTypes.bool.description('Set vertical orientation.').defaultValue(false),\n isDotted: PropTypes.bool.description('Set dashed style.').defaultValue(false),\n colorType: PropTypes.oneOf(['dark', 'light'])\n .description('Set dark or light color types. Using color property will override this one.')\n .defaultValue('dark'),\n color: PropTypes.string.description('Set a custom color.'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAMO;AAoBA,MAAM,eAA4C;AAAA,EACvD,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,WAAW;AACb;AAEO,MAAM,YAAY;AAAA,EACvB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,YAAY,kCAAU,KAAK,YAAY,2BAA2B,EAAE,aAAa,KAAK;AAAA,EACtF,UAAU,kCAAU,KAAK,YAAY,mBAAmB,EAAE,aAAa,KAAK;AAAA,EAC5E,WAAW,kCAAU,MAAM,CAAC,QAAQ,OAAO,CAAC,EACzC,YAAY,6EAA6E,EACzF,aAAa,MAAM;AAAA,EACtB,OAAO,kCAAU,OAAO,YAAY,qBAAqB;AAC3D;",
6
6
  "names": []
7
7
  }
@@ -33,18 +33,15 @@ __export(styles_exports, {
33
33
  module.exports = __toCommonJS(styles_exports);
34
34
  var React = __toESM(require("react"));
35
35
  var import_ds_system = require("@elliemae/ds-system");
36
- const defaultColorTypes = {
37
- dark: "700",
38
- light: "400"
39
- };
36
+ const getDefaultColorType = ({ colorType }) => colorType === "light" ? "400" : "700";
40
37
  const directionStyles = import_ds_system.css`
41
38
  ${({ isVertical }) => isVertical ? `height: 100%; width: 1px;` : `height: 1px; width: 100%;`}
42
39
  `;
43
- ``;
44
40
  const dottedBorder = import_ds_system.css`
45
41
  background-image: linear-gradient(
46
42
  to ${({ isVertical }) => !isVertical ? "right" : "bottom"},
47
- ${({ theme, color, colorType }) => color || theme.colors.neutral[defaultColorTypes[colorType]]} 25%,
43
+ ${({ theme, color, colorType }) => color || theme.colors.neutral[getDefaultColorType({ colorType })]}
44
+ 25%,
48
45
  rgba(255, 255, 255, 0) 0%
49
46
  );
50
47
  background-position: bottom;
@@ -52,7 +49,7 @@ const dottedBorder = import_ds_system.css`
52
49
  background-repeat: ${({ isVertical }) => isVertical ? "repeat-y" : "repeat-x"};
53
50
  `;
54
51
  const solidBorder = import_ds_system.css`
55
- background: ${({ theme, color, colorType }) => color || theme.colors.neutral[defaultColorTypes[colorType]]};
52
+ background: ${({ theme, color, colorType }) => color || theme.colors.neutral[getDefaultColorType({ colorType })]};
56
53
  `;
57
54
  const StyledSeparator = (0, import_ds_system.styled)("div", { name: "DSSeparator", slot: "root" })`
58
55
  ${directionStyles}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/v2/styles.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { styled, css, xStyledCommonProps } from '@elliemae/ds-system';\n\ninterface StyledSeparatorT {\n isVertical: boolean;\n isDotted: boolean;\n color: string;\n colorType: 'dark' | 'light';\n}\n\nconst defaultColorTypes = {\n dark: '700',\n light: '400',\n};\n\nconst directionStyles = css`\n ${({ isVertical }) => (isVertical ? `height: 100%; width: 1px;` : `height: 1px; width: 100%;`)}\n`;\n``;\nconst dottedBorder = css`\n background-image: linear-gradient(\n to ${({ isVertical }) => (!isVertical ? 'right' : 'bottom')},\n ${({ theme, color, colorType }) => color || theme.colors.neutral[defaultColorTypes[colorType]]} 25%,\n rgba(255, 255, 255, 0) 0%\n );\n background-position: bottom;\n background-size: ${({ isVertical }) => (isVertical ? '1px 4px' : '4px 1px')};\n background-repeat: ${({ isVertical }) => (isVertical ? 'repeat-y' : 'repeat-x')};\n`;\n\nconst solidBorder = css`\n background: ${({ theme, color, colorType }) => color || theme.colors.neutral[defaultColorTypes[colorType]]};\n`;\n\nexport const StyledSeparator = styled('div', { name: 'DSSeparator', slot: 'root' })<StyledSeparatorT>`\n ${directionStyles}\n ${({ isDotted }) => (isDotted ? dottedBorder : solidBorder)}\n ${xStyledCommonProps}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAgD;AAShD,MAAM,oBAAoB;AAAA,EACxB,MAAM;AAAA,EACN,OAAO;AACT;AAEA,MAAM,kBAAkB;AAAA,IACpB,CAAC,EAAE,WAAW,MAAO,aAAa,8BAA8B;AAAA;AAEpE;AACA,MAAM,eAAe;AAAA;AAAA,SAEZ,CAAC,EAAE,WAAW,MAAO,CAAC,aAAa,UAAU;AAAA,MAChD,CAAC,EAAE,OAAO,OAAO,UAAU,MAAM,SAAS,MAAM,OAAO,QAAQ,kBAAkB,SAAS,CAAC;AAAA;AAAA;AAAA;AAAA,qBAI5E,CAAC,EAAE,WAAW,MAAO,aAAa,YAAY;AAAA,uBAC5C,CAAC,EAAE,WAAW,MAAO,aAAa,aAAa;AAAA;AAGtE,MAAM,cAAc;AAAA,gBACJ,CAAC,EAAE,OAAO,OAAO,UAAU,MAAM,SAAS,MAAM,OAAO,QAAQ,kBAAkB,SAAS,CAAC;AAAA;AAGpG,MAAM,sBAAkB,yBAAO,OAAO,EAAE,MAAM,eAAe,MAAM,OAAO,CAAC;AAAA,IAC9E;AAAA,IACA,CAAC,EAAE,SAAS,MAAO,WAAW,eAAe;AAAA,IAC7C;AAAA;",
4
+ "sourcesContent": ["import type { Theme } from '@elliemae/ds-system';\nimport { styled, css, xStyledCommonProps } from '@elliemae/ds-system';\nimport type { ThemeProps } from 'styled-components';\nimport type { DSSeparatorV2T } from './react-desc-prop-types.js';\n\nconst getDefaultColorType = ({ colorType }: DSSeparatorV2T.Props) => (colorType === 'light' ? '400' : '700');\n\nconst directionStyles = css`\n ${({ isVertical }: DSSeparatorV2T.Props) => (isVertical ? `height: 100%; width: 1px;` : `height: 1px; width: 100%;`)}\n`;\n\nconst dottedBorder = css`\n background-image: linear-gradient(\n to ${({ isVertical }: DSSeparatorV2T.Props) => (!isVertical ? 'right' : 'bottom')},\n ${({ theme, color, colorType }: ThemeProps<Theme> & DSSeparatorV2T.Props) =>\n color || theme.colors.neutral[getDefaultColorType({ colorType })]}\n 25%,\n rgba(255, 255, 255, 0) 0%\n );\n background-position: bottom;\n background-size: ${({ isVertical }) => (isVertical ? '1px 4px' : '4px 1px')};\n background-repeat: ${({ isVertical }) => (isVertical ? 'repeat-y' : 'repeat-x')};\n`;\n\nconst solidBorder = css`\n background: ${({ theme, color, colorType }: ThemeProps<Theme> & DSSeparatorV2T.Props) =>\n color || theme.colors.neutral[getDefaultColorType({ colorType })]};\n`;\n\nexport const StyledSeparator = styled('div', { name: 'DSSeparator', slot: 'root' })<DSSeparatorV2T.Props>`\n ${directionStyles}\n ${({ isDotted }) => (isDotted ? dottedBorder : solidBorder)}\n ${xStyledCommonProps}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,uBAAgD;AAIhD,MAAM,sBAAsB,CAAC,EAAE,UAAU,MAA6B,cAAc,UAAU,QAAQ;AAEtG,MAAM,kBAAkB;AAAA,IACpB,CAAC,EAAE,WAAW,MAA6B,aAAa,8BAA8B;AAAA;AAG1F,MAAM,eAAe;AAAA;AAAA,SAEZ,CAAC,EAAE,WAAW,MAA6B,CAAC,aAAa,UAAU;AAAA,MACtE,CAAC,EAAE,OAAO,OAAO,UAAU,MACzB,SAAS,MAAM,OAAO,QAAQ,oBAAoB,EAAE,UAAU,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,qBAKnD,CAAC,EAAE,WAAW,MAAO,aAAa,YAAY;AAAA,uBAC5C,CAAC,EAAE,WAAW,MAAO,aAAa,aAAa;AAAA;AAGtE,MAAM,cAAc;AAAA,gBACJ,CAAC,EAAE,OAAO,OAAO,UAAU,MACvC,SAAS,MAAM,OAAO,QAAQ,oBAAoB,EAAE,UAAU,CAAC,CAAC;AAAA;AAG7D,MAAM,sBAAkB,yBAAO,OAAO,EAAE,MAAM,eAAe,MAAM,OAAO,CAAC;AAAA,IAC9E;AAAA,IACA,CAAC,EAAE,SAAS,MAAO,WAAW,eAAe;AAAA,IAC7C;AAAA;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,72 @@
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 __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from))
11
+ if (!__hasOwnProp.call(to, key) && key !== except)
12
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ }
14
+ return to;
15
+ };
16
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var React = __toESM(require("react"));
25
+ var import_jsx_runtime = require("react/jsx-runtime");
26
+ var import__ = require("../index.js");
27
+ const testOptionalProps = {
28
+ color: "#FF0000"
29
+ };
30
+ const testPartialDefaults = {
31
+ isVertical: true,
32
+ isDotted: false,
33
+ colorType: "dark"
34
+ };
35
+ const testProps = {
36
+ ...testOptionalProps,
37
+ ...testPartialDefaults
38
+ };
39
+ const testPropsAsSyntax = {
40
+ ...testOptionalProps,
41
+ ...testPartialDefaults
42
+ };
43
+ const testCompleteDefaults = {
44
+ isVertical: true,
45
+ isDotted: false,
46
+ colorType: "dark"
47
+ };
48
+ const testExplicitDefinition = {
49
+ isVertical: true,
50
+ isDotted: true,
51
+ colorType: "dark",
52
+ color: "#FF0000"
53
+ };
54
+ const testInferedTypeCompatibility = {
55
+ isVertical: true,
56
+ isDotted: false,
57
+ colorType: "light",
58
+ color: "green"
59
+ };
60
+ const testDefinitionAsConst = {
61
+ isVertical: true,
62
+ isDotted: false,
63
+ colorType: "dark",
64
+ color: "#2565AE"
65
+ };
66
+ const ExampleUsageComponent = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
67
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSSeparatorV2, { ...testExplicitDefinition }),
68
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSSeparatorV2, { ...testInferedTypeCompatibility }),
69
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSSeparatorV2, { ...testDefinitionAsConst }),
70
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSSeparatorV2, { isVertical: false, isDotted: false, colorType: "light", color: "#000000" })
71
+ ] });
72
+ //# sourceMappingURL=typescript-separator-v2-valid.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/v2/typescript-testing/typescript-separator-v2-valid.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { DSSeparatorV2 } from '../index.js';\nimport { type DSSeparatorV2T } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSSeparatorV2T.Props;\ntype ComponentPropsDefaultProps = DSSeparatorV2T.DefaultProps;\ntype ComponentPropsOptionalProps = DSSeparatorV2T.OptionalProps;\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n color: '#FF0000',\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n isVertical: true,\n isDotted: false,\n colorType: 'dark',\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n isVertical: true,\n isDotted: false,\n colorType: 'dark',\n};\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n isVertical: true,\n isDotted: true,\n colorType: 'dark',\n color: '#FF0000',\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n isVertical: true,\n isDotted: false,\n colorType: 'light',\n color: 'green',\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n isVertical: true,\n isDotted: false,\n colorType: 'dark',\n color: '#2565AE',\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSSeparatorV2 {...testExplicitDefinition} />\n <DSSeparatorV2 {...testInferedTypeCompatibility} />\n <DSSeparatorV2 {...testDefinitionAsConst} />\n {/* works with inline values */}\n <DSSeparatorV2 isVertical={false} isDotted={false} colorType=\"light\" color=\"#000000\" />\n </>\n);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;AC8DrB;AA7DF,eAA8B;AAQ9B,MAAM,oBAAiD;AAAA,EACrD,OAAO;AACT;AAIA,MAAM,sBAA2D;AAAA,EAC/D,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,WAAW;AACb;AAEA,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,uBAA6D;AAAA,EACjE,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,WAAW;AACb;AAGA,MAAM,yBAA+C;AAAA,EACnD,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,WAAW;AAAA,EACX,OAAO;AACT;AAGA,MAAM,+BAA+B;AAAA,EACnC,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,WAAW;AAAA,EACX,OAAO;AACT;AAEA,MAAM,wBAAwB;AAAA,EAC5B,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,WAAW;AAAA,EACX,OAAO;AACT;AAEA,MAAM,wBAAwB,MAC5B,4EAEE;AAAA,8CAAC,0BAAe,GAAG,wBAAwB;AAAA,EAC3C,4CAAC,0BAAe,GAAG,8BAA8B;AAAA,EACjD,4CAAC,0BAAe,GAAG,uBAAuB;AAAA,EAE1C,4CAAC,0BAAc,YAAY,OAAO,UAAU,OAAO,WAAU,SAAQ,OAAM,WAAU;AAAA,GACvF;",
6
+ "names": []
7
+ }
@@ -18,21 +18,44 @@ const POSITION = {
18
18
  const SeparatorWrapper = aggregatedClasses("div")(
19
19
  "separator-wrapper",
20
20
  null,
21
- ({ margin, orientation, dashed, position }) => ({
21
+ ({
22
+ margin,
23
+ orientation,
24
+ dashed,
25
+ position
26
+ }) => ({
22
27
  dashed,
23
28
  [margin]: margin,
24
29
  [orientation]: orientation,
25
30
  [position]: position
26
31
  })
27
32
  );
28
- const Separator = aggregatedClasses("div")(blockName, null, ({ dashed, margin, orientation, type }) => ({
29
- dashed,
30
- [margin]: margin,
31
- [orientation]: orientation,
32
- [type]: type
33
- }));
33
+ const Separator = aggregatedClasses("div")(
34
+ blockName,
35
+ null,
36
+ ({
37
+ dashed,
38
+ margin,
39
+ orientation,
40
+ type
41
+ }) => ({
42
+ dashed,
43
+ [margin]: margin,
44
+ [orientation]: orientation,
45
+ [type]: type
46
+ })
47
+ );
34
48
  const types = ["category-level", "group-level", "non-form"];
35
- const DSSeparator = ({ containerProps, dashed, margin, orientation, type, position, className, style }) => {
49
+ const DSSeparator = ({
50
+ containerProps,
51
+ dashed,
52
+ margin,
53
+ orientation,
54
+ type,
55
+ position,
56
+ className,
57
+ style
58
+ }) => {
36
59
  useDeprecateComponent({ componentName: "ds-separator", version: "TBD Date: 2023 Q3" });
37
60
  return /* @__PURE__ */ jsx(
38
61
  SeparatorWrapper,
@@ -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 eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React from 'react';\nimport { useDeprecateComponent } from '@elliemae/ds-utilities';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\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 = aggregatedClasses('div')(\n 'separator-wrapper',\n null,\n ({ margin, orientation, dashed, position }) => ({\n dashed,\n [margin]: margin,\n [orientation]: orientation,\n [position]: position,\n }),\n);\n\nconst Separator = aggregatedClasses('div')(blockName, null, ({ dashed, margin, orientation, type }) => ({\n dashed,\n [margin]: margin,\n [orientation]: orientation,\n [type]: type,\n}));\n\nconst types = ['category-level', 'group-level', 'non-form'];\n\nconst DSSeparator = ({ containerProps, dashed, margin, orientation, type, position, className, style }) => {\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.propTypes = props;\nDSSeparator.displayName = 'DSSeparator';\nconst DSSeparatorWithSchema = describe(DSSeparator);\n\nDSSeparatorWithSchema.propTypes = props;\n\nexport { DSSeparator, DSSeparatorWithSchema };\nexport default DSSeparator;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;AC2DjB;AAtDN,SAAS,6BAA6B;AACtC,SAAS,WAAW,gBAAgB;AACpC,SAAS,yBAAyB;AAElC,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,M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AA;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,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,wBAAwB,SAAS,WAAW;AAElD,sBAAsB,YAAY;AAGlC,IAAO,sBAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { type WeakValidationMap } from 'react';\nimport { useDeprecateComponent } from '@elliemae/ds-utilities';\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\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.propTypes = props;\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,6BAA6B;AACtC,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;AAEA,MAAM,QAAQ,CAAC,kBAAkB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,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,wBAAwB,SAAS,WAAW;AAElD,sBAAsB,YAAY;AAGlC,IAAO,sBAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,5 @@
1
1
  import * as React from "react";
2
+ import {} from "./react-desc-prop-types.js";
2
3
  export * from "./DSSeparatorV2.js";
3
4
  export * from "./exported-related/DSSeparatorV2Datatestid.js";
4
5
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/v2/index.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSSeparatorV2.js';\nexport * from './exported-related/DSSeparatorV2Datatestid.js';\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,cAAc;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { type DSSeparatorV2T } from './react-desc-prop-types.js';\nexport * from './DSSeparatorV2.js';\nexport * from './exported-related/DSSeparatorV2Datatestid.js';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,eAAoC;AACpC,cAAc;AACd,cAAc;",
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/v2/react-desc-prop-types.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import {\n PropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n type GlobalAttributesT,\n type XstyledProps,\n} from '@elliemae/ds-props-helpers';\n\nexport const defaultProps: DSSeparatorV2T.DefaultProps = {\n isVertical: false,\n isDotted: false,\n colorType: 'dark',\n};\n\nexport const propTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n isVertical: PropTypes.bool.description('Set vertical orientation.').defaultValue(false),\n isDotted: PropTypes.bool.description('Set dashed style.').defaultValue(false),\n colorType: PropTypes.oneOf(['dark', 'light'])\n .description('Set dark or light color types. Using color property will override this one.')\n .defaultValue('dark'),\n color: PropTypes.string.description('Set a custom color.'),\n};\n\nexport declare namespace DSSeparatorV2T {\n export interface DefaultProps {\n isVertical: boolean;\n isDotted: boolean;\n colorType: 'dark' | 'light';\n }\n\n export interface PropsOptional {\n color?: string;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n PropsOptional,\n Omit<GlobalAttributesT, keyof DefaultProps | keyof PropsOptional>,\n Omit<XstyledProps, keyof PropsOptional> {}\n}\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AAEA,MAAM,eAA4C;AAAA,EACvD,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,WAAW;AACb;AAEO,MAAM,YAAY;AAAA,EACvB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,YAAY,UAAU,KAAK,YAAY,2BAA2B,EAAE,aAAa,KAAK;AAAA,EACtF,UAAU,UAAU,KAAK,YAAY,mBAAmB,EAAE,aAAa,KAAK;AAAA,EAC5E,WAAW,UAAU,MAAM,CAAC,QAAQ,OAAO,CAAC,EACzC,YAAY,6EAA6E,EACzF,aAAa,MAAM;AAAA,EACtB,OAAO,UAAU,OAAO,YAAY,qBAAqB;AAC3D;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import {\n PropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n type GlobalAttributesT,\n type XstyledProps,\n} from '@elliemae/ds-props-helpers';\n\nexport declare namespace DSSeparatorV2T {\n export interface DefaultProps {\n isVertical: boolean;\n isDotted: boolean;\n colorType: 'dark' | 'light';\n }\n\n export interface OptionalProps {\n color?: string;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT, keyof DefaultProps | keyof OptionalProps>,\n Omit<XstyledProps, keyof OptionalProps> {}\n}\n\nexport const defaultProps: DSSeparatorV2T.DefaultProps = {\n isVertical: false,\n isDotted: false,\n colorType: 'dark',\n};\n\nexport const propTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n isVertical: PropTypes.bool.description('Set vertical orientation.').defaultValue(false),\n isDotted: PropTypes.bool.description('Set dashed style.').defaultValue(false),\n colorType: PropTypes.oneOf(['dark', 'light'])\n .description('Set dark or light color types. Using color property will override this one.')\n .defaultValue('dark'),\n color: PropTypes.string.description('Set a custom color.'),\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AAoBA,MAAM,eAA4C;AAAA,EACvD,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,WAAW;AACb;AAEO,MAAM,YAAY;AAAA,EACvB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,YAAY,UAAU,KAAK,YAAY,2BAA2B,EAAE,aAAa,KAAK;AAAA,EACtF,UAAU,UAAU,KAAK,YAAY,mBAAmB,EAAE,aAAa,KAAK;AAAA,EAC5E,WAAW,UAAU,MAAM,CAAC,QAAQ,OAAO,CAAC,EACzC,YAAY,6EAA6E,EACzF,aAAa,MAAM;AAAA,EACtB,OAAO,UAAU,OAAO,YAAY,qBAAqB;AAC3D;",
6
6
  "names": []
7
7
  }
@@ -1,17 +1,14 @@
1
1
  import * as React from "react";
2
2
  import { styled, css, xStyledCommonProps } from "@elliemae/ds-system";
3
- const defaultColorTypes = {
4
- dark: "700",
5
- light: "400"
6
- };
3
+ const getDefaultColorType = ({ colorType }) => colorType === "light" ? "400" : "700";
7
4
  const directionStyles = css`
8
5
  ${({ isVertical }) => isVertical ? `height: 100%; width: 1px;` : `height: 1px; width: 100%;`}
9
6
  `;
10
- ``;
11
7
  const dottedBorder = css`
12
8
  background-image: linear-gradient(
13
9
  to ${({ isVertical }) => !isVertical ? "right" : "bottom"},
14
- ${({ theme, color, colorType }) => color || theme.colors.neutral[defaultColorTypes[colorType]]} 25%,
10
+ ${({ theme, color, colorType }) => color || theme.colors.neutral[getDefaultColorType({ colorType })]}
11
+ 25%,
15
12
  rgba(255, 255, 255, 0) 0%
16
13
  );
17
14
  background-position: bottom;
@@ -19,7 +16,7 @@ const dottedBorder = css`
19
16
  background-repeat: ${({ isVertical }) => isVertical ? "repeat-y" : "repeat-x"};
20
17
  `;
21
18
  const solidBorder = css`
22
- background: ${({ theme, color, colorType }) => color || theme.colors.neutral[defaultColorTypes[colorType]]};
19
+ background: ${({ theme, color, colorType }) => color || theme.colors.neutral[getDefaultColorType({ colorType })]};
23
20
  `;
24
21
  const StyledSeparator = styled("div", { name: "DSSeparator", slot: "root" })`
25
22
  ${directionStyles}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/v2/styles.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled, css, xStyledCommonProps } from '@elliemae/ds-system';\n\ninterface StyledSeparatorT {\n isVertical: boolean;\n isDotted: boolean;\n color: string;\n colorType: 'dark' | 'light';\n}\n\nconst defaultColorTypes = {\n dark: '700',\n light: '400',\n};\n\nconst directionStyles = css`\n ${({ isVertical }) => (isVertical ? `height: 100%; width: 1px;` : `height: 1px; width: 100%;`)}\n`;\n``;\nconst dottedBorder = css`\n background-image: linear-gradient(\n to ${({ isVertical }) => (!isVertical ? 'right' : 'bottom')},\n ${({ theme, color, colorType }) => color || theme.colors.neutral[defaultColorTypes[colorType]]} 25%,\n rgba(255, 255, 255, 0) 0%\n );\n background-position: bottom;\n background-size: ${({ isVertical }) => (isVertical ? '1px 4px' : '4px 1px')};\n background-repeat: ${({ isVertical }) => (isVertical ? 'repeat-y' : 'repeat-x')};\n`;\n\nconst solidBorder = css`\n background: ${({ theme, color, colorType }) => color || theme.colors.neutral[defaultColorTypes[colorType]]};\n`;\n\nexport const StyledSeparator = styled('div', { name: 'DSSeparator', slot: 'root' })<StyledSeparatorT>`\n ${directionStyles}\n ${({ isDotted }) => (isDotted ? dottedBorder : solidBorder)}\n ${xStyledCommonProps}\n`;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,QAAQ,KAAK,0BAA0B;AAShD,MAAM,oBAAoB;AAAA,EACxB,MAAM;AAAA,EACN,OAAO;AACT;AAEA,MAAM,kBAAkB;AAAA,IACpB,CAAC,EAAE,WAAW,MAAO,aAAa,8BAA8B;AAAA;AAEpE;AACA,MAAM,eAAe;AAAA;AAAA,SAEZ,CAAC,EAAE,WAAW,MAAO,CAAC,aAAa,UAAU;AAAA,MAChD,CAAC,EAAE,OAAO,OAAO,UAAU,MAAM,SAAS,MAAM,OAAO,QAAQ,kBAAkB,SAAS,CAAC;AAAA;AAAA;AAAA;AAAA,qBAI5E,CAAC,EAAE,WAAW,MAAO,aAAa,YAAY;AAAA,uBAC5C,CAAC,EAAE,WAAW,MAAO,aAAa,aAAa;AAAA;AAGtE,MAAM,cAAc;AAAA,gBACJ,CAAC,EAAE,OAAO,OAAO,UAAU,MAAM,SAAS,MAAM,OAAO,QAAQ,kBAAkB,SAAS,CAAC;AAAA;AAGpG,MAAM,kBAAkB,OAAO,OAAO,EAAE,MAAM,eAAe,MAAM,OAAO,CAAC;AAAA,IAC9E;AAAA,IACA,CAAC,EAAE,SAAS,MAAO,WAAW,eAAe;AAAA,IAC7C;AAAA;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { Theme } from '@elliemae/ds-system';\nimport { styled, css, xStyledCommonProps } from '@elliemae/ds-system';\nimport type { ThemeProps } from 'styled-components';\nimport type { DSSeparatorV2T } from './react-desc-prop-types.js';\n\nconst getDefaultColorType = ({ colorType }: DSSeparatorV2T.Props) => (colorType === 'light' ? '400' : '700');\n\nconst directionStyles = css`\n ${({ isVertical }: DSSeparatorV2T.Props) => (isVertical ? `height: 100%; width: 1px;` : `height: 1px; width: 100%;`)}\n`;\n\nconst dottedBorder = css`\n background-image: linear-gradient(\n to ${({ isVertical }: DSSeparatorV2T.Props) => (!isVertical ? 'right' : 'bottom')},\n ${({ theme, color, colorType }: ThemeProps<Theme> & DSSeparatorV2T.Props) =>\n color || theme.colors.neutral[getDefaultColorType({ colorType })]}\n 25%,\n rgba(255, 255, 255, 0) 0%\n );\n background-position: bottom;\n background-size: ${({ isVertical }) => (isVertical ? '1px 4px' : '4px 1px')};\n background-repeat: ${({ isVertical }) => (isVertical ? 'repeat-y' : 'repeat-x')};\n`;\n\nconst solidBorder = css`\n background: ${({ theme, color, colorType }: ThemeProps<Theme> & DSSeparatorV2T.Props) =>\n color || theme.colors.neutral[getDefaultColorType({ colorType })]};\n`;\n\nexport const StyledSeparator = styled('div', { name: 'DSSeparator', slot: 'root' })<DSSeparatorV2T.Props>`\n ${directionStyles}\n ${({ isDotted }) => (isDotted ? dottedBorder : solidBorder)}\n ${xStyledCommonProps}\n`;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,QAAQ,KAAK,0BAA0B;AAIhD,MAAM,sBAAsB,CAAC,EAAE,UAAU,MAA6B,cAAc,UAAU,QAAQ;AAEtG,MAAM,kBAAkB;AAAA,IACpB,CAAC,EAAE,WAAW,MAA6B,aAAa,8BAA8B;AAAA;AAG1F,MAAM,eAAe;AAAA;AAAA,SAEZ,CAAC,EAAE,WAAW,MAA6B,CAAC,aAAa,UAAU;AAAA,MACtE,CAAC,EAAE,OAAO,OAAO,UAAU,MACzB,SAAS,MAAM,OAAO,QAAQ,oBAAoB,EAAE,UAAU,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,qBAKnD,CAAC,EAAE,WAAW,MAAO,aAAa,YAAY;AAAA,uBAC5C,CAAC,EAAE,WAAW,MAAO,aAAa,aAAa;AAAA;AAGtE,MAAM,cAAc;AAAA,gBACJ,CAAC,EAAE,OAAO,OAAO,UAAU,MACvC,SAAS,MAAM,OAAO,QAAQ,oBAAoB,EAAE,UAAU,CAAC,CAAC;AAAA;AAG7D,MAAM,kBAAkB,OAAO,OAAO,EAAE,MAAM,eAAe,MAAM,OAAO,CAAC;AAAA,IAC9E;AAAA,IACA,CAAC,EAAE,SAAS,MAAO,WAAW,eAAe;AAAA,IAC7C;AAAA;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,49 @@
1
+ import * as React from "react";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { DSSeparatorV2 } from "../index.js";
4
+ const testOptionalProps = {
5
+ color: "#FF0000"
6
+ };
7
+ const testPartialDefaults = {
8
+ isVertical: true,
9
+ isDotted: false,
10
+ colorType: "dark"
11
+ };
12
+ const testProps = {
13
+ ...testOptionalProps,
14
+ ...testPartialDefaults
15
+ };
16
+ const testPropsAsSyntax = {
17
+ ...testOptionalProps,
18
+ ...testPartialDefaults
19
+ };
20
+ const testCompleteDefaults = {
21
+ isVertical: true,
22
+ isDotted: false,
23
+ colorType: "dark"
24
+ };
25
+ const testExplicitDefinition = {
26
+ isVertical: true,
27
+ isDotted: true,
28
+ colorType: "dark",
29
+ color: "#FF0000"
30
+ };
31
+ const testInferedTypeCompatibility = {
32
+ isVertical: true,
33
+ isDotted: false,
34
+ colorType: "light",
35
+ color: "green"
36
+ };
37
+ const testDefinitionAsConst = {
38
+ isVertical: true,
39
+ isDotted: false,
40
+ colorType: "dark",
41
+ color: "#2565AE"
42
+ };
43
+ const ExampleUsageComponent = () => /* @__PURE__ */ jsxs(Fragment, { children: [
44
+ /* @__PURE__ */ jsx(DSSeparatorV2, { ...testExplicitDefinition }),
45
+ /* @__PURE__ */ jsx(DSSeparatorV2, { ...testInferedTypeCompatibility }),
46
+ /* @__PURE__ */ jsx(DSSeparatorV2, { ...testDefinitionAsConst }),
47
+ /* @__PURE__ */ jsx(DSSeparatorV2, { isVertical: false, isDotted: false, colorType: "light", color: "#000000" })
48
+ ] });
49
+ //# sourceMappingURL=typescript-separator-v2-valid.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/v2/typescript-testing/typescript-separator-v2-valid.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { DSSeparatorV2 } from '../index.js';\nimport { type DSSeparatorV2T } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSSeparatorV2T.Props;\ntype ComponentPropsDefaultProps = DSSeparatorV2T.DefaultProps;\ntype ComponentPropsOptionalProps = DSSeparatorV2T.OptionalProps;\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n color: '#FF0000',\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n isVertical: true,\n isDotted: false,\n colorType: 'dark',\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n isVertical: true,\n isDotted: false,\n colorType: 'dark',\n};\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n isVertical: true,\n isDotted: true,\n colorType: 'dark',\n color: '#FF0000',\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n isVertical: true,\n isDotted: false,\n colorType: 'light',\n color: 'green',\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n isVertical: true,\n isDotted: false,\n colorType: 'dark',\n color: '#2565AE',\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSSeparatorV2 {...testExplicitDefinition} />\n <DSSeparatorV2 {...testInferedTypeCompatibility} />\n <DSSeparatorV2 {...testDefinitionAsConst} />\n {/* works with inline values */}\n <DSSeparatorV2 isVertical={false} isDotted={false} colorType=\"light\" color=\"#000000\" />\n </>\n);\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC8DrB,mBAEE,KAFF;AA7DF,SAAS,qBAAqB;AAQ9B,MAAM,oBAAiD;AAAA,EACrD,OAAO;AACT;AAIA,MAAM,sBAA2D;AAAA,EAC/D,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,WAAW;AACb;AAEA,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,uBAA6D;AAAA,EACjE,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,WAAW;AACb;AAGA,MAAM,yBAA+C;AAAA,EACnD,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,WAAW;AAAA,EACX,OAAO;AACT;AAGA,MAAM,+BAA+B;AAAA,EACnC,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,WAAW;AAAA,EACX,OAAO;AACT;AAEA,MAAM,wBAAwB;AAAA,EAC5B,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,WAAW;AAAA,EACX,OAAO;AACT;AAEA,MAAM,wBAAwB,MAC5B,iCAEE;AAAA,sBAAC,iBAAe,GAAG,wBAAwB;AAAA,EAC3C,oBAAC,iBAAe,GAAG,8BAA8B;AAAA,EACjD,oBAAC,iBAAe,GAAG,uBAAuB;AAAA,EAE1C,oBAAC,iBAAc,YAAY,OAAO,UAAU,OAAO,WAAU,SAAQ,OAAM,WAAU;AAAA,GACvF;",
6
+ "names": []
7
+ }
@@ -1,14 +1,19 @@
1
+ type MarginT = 's' | 'm' | 'l' | 'none';
2
+ type OrientationT = 'horizontal' | 'vertical';
3
+ type TypeT = 'category-level' | 'group-level' | 'non-form';
4
+ type PositionT = 'initial' | 'center' | 'end';
5
+ interface DSSeparatorPropsT {
6
+ containerProps: object;
7
+ dashed: boolean;
8
+ margin: MarginT;
9
+ orientation: OrientationT;
10
+ type: TypeT;
11
+ position: PositionT;
12
+ className?: string;
13
+ style?: object;
14
+ }
1
15
  declare const DSSeparator: {
2
- ({ containerProps, dashed, margin, orientation, type, position, className, style }: {
3
- containerProps: any;
4
- dashed: any;
5
- margin: any;
6
- orientation: any;
7
- type: any;
8
- position: any;
9
- className: any;
10
- style: any;
11
- }): import("react/jsx-runtime").JSX.Element;
16
+ ({ containerProps, dashed, margin, orientation, type, position, className, style, }: DSSeparatorPropsT): import("react/jsx-runtime").JSX.Element;
12
17
  defaultProps: {
13
18
  containerProps: {};
14
19
  dashed: boolean;
@@ -47,15 +52,6 @@ declare const DSSeparator: {
47
52
  };
48
53
  displayName: string;
49
54
  };
50
- declare const DSSeparatorWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").DocumentedReactComponent<{
51
- containerProps: any;
52
- dashed: any;
53
- margin: any;
54
- orientation: any;
55
- type: any;
56
- position: any;
57
- className: any;
58
- style: any;
59
- }>;
55
+ declare const DSSeparatorWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").DocumentedReactComponent<DSSeparatorPropsT>;
60
56
  export { DSSeparator, DSSeparatorWithSchema };
61
57
  export default DSSeparator;
@@ -1,2 +1,3 @@
1
+ export { type DSSeparatorV2T } from './react-desc-prop-types.js';
1
2
  export * from './DSSeparatorV2.js';
2
3
  export * from './exported-related/DSSeparatorV2Datatestid.js';
@@ -1,4 +1,16 @@
1
1
  import { type GlobalAttributesT, type XstyledProps } from '@elliemae/ds-props-helpers';
2
+ export declare namespace DSSeparatorV2T {
3
+ interface DefaultProps {
4
+ isVertical: boolean;
5
+ isDotted: boolean;
6
+ colorType: 'dark' | 'light';
7
+ }
8
+ interface OptionalProps {
9
+ color?: string;
10
+ }
11
+ interface Props extends Partial<DefaultProps>, OptionalProps, Omit<GlobalAttributesT, keyof DefaultProps | keyof OptionalProps>, Omit<XstyledProps, keyof OptionalProps> {
12
+ }
13
+ }
2
14
  export declare const defaultProps: DSSeparatorV2T.DefaultProps;
3
15
  export declare const propTypes: {
4
16
  isVertical: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
@@ -455,15 +467,3 @@ export declare const propTypes: {
455
467
  'aria-description': import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
456
468
  'aria-rowindextext': import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
457
469
  };
458
- export declare namespace DSSeparatorV2T {
459
- interface DefaultProps {
460
- isVertical: boolean;
461
- isDotted: boolean;
462
- colorType: 'dark' | 'light';
463
- }
464
- interface PropsOptional {
465
- color?: string;
466
- }
467
- interface Props extends Partial<DefaultProps>, PropsOptional, Omit<GlobalAttributesT, keyof DefaultProps | keyof PropsOptional>, Omit<XstyledProps, keyof PropsOptional> {
468
- }
469
- }
@@ -1,8 +1,3 @@
1
- interface StyledSeparatorT {
2
- isVertical: boolean;
3
- isDotted: boolean;
4
- color: string;
5
- colorType: 'dark' | 'light';
6
- }
7
- export declare const StyledSeparator: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, StyledSeparatorT & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
8
- export {};
1
+ import type { Theme } from '@elliemae/ds-system';
2
+ import type { DSSeparatorV2T } from './react-desc-prop-types.js';
3
+ export declare const StyledSeparator: import("styled-components").StyledComponent<"div", Theme, DSSeparatorV2T.Props & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-separator",
3
- "version": "3.28.1-rc.2",
3
+ "version": "3.29.0-next.0",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Separator",
6
6
  "files": [
@@ -39,15 +39,15 @@
39
39
  "indent": 4
40
40
  },
41
41
  "dependencies": {
42
- "@elliemae/ds-classnames": "3.28.1-rc.2",
43
- "@elliemae/ds-props-helpers": "3.28.1-rc.2",
44
- "@elliemae/ds-utilities": "3.28.1-rc.2",
45
- "@elliemae/ds-system": "3.28.1-rc.2"
42
+ "@elliemae/ds-classnames": "3.29.0-next.0",
43
+ "@elliemae/ds-props-helpers": "3.29.0-next.0",
44
+ "@elliemae/ds-system": "3.29.0-next.0",
45
+ "@elliemae/ds-utilities": "3.29.0-next.0"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@elliemae/pui-cli": "~9.0.0-next.31",
49
49
  "styled-components": "~5.3.9",
50
- "@elliemae/ds-monorepo-devops": "3.28.1-rc.2"
50
+ "@elliemae/ds-monorepo-devops": "3.29.0-next.0"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "react": "^17.0.2",
@@ -56,7 +56,7 @@
56
56
  },
57
57
  "publishConfig": {
58
58
  "access": "public",
59
- "typeSafety": false
59
+ "typeSafety": true
60
60
  },
61
61
  "scripts": {
62
62
  "dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch",