@elliemae/ds-separator 3.12.0-next.0 → 3.12.0-rc.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.
- package/dist/cjs/DSSeparator.js +13 -38
- package/dist/cjs/DSSeparator.js.map +2 -2
- package/dist/cjs/v2/DSSeparatorV2.js.map +2 -2
- package/dist/cjs/v2/styles.js +1 -4
- package/dist/cjs/v2/styles.js.map +2 -2
- package/dist/esm/DSSeparator.js +13 -38
- package/dist/esm/DSSeparator.js.map +2 -2
- package/dist/esm/v2/DSSeparatorV2.js.map +2 -2
- package/dist/esm/v2/styles.js +2 -5
- package/dist/esm/v2/styles.js.map +2 -2
- package/package.json +4 -4
package/dist/cjs/DSSeparator.js
CHANGED
|
@@ -55,27 +55,14 @@ const SeparatorWrapper = (0, import_ds_classnames.aggregatedClasses)("div")(
|
|
|
55
55
|
[position]: position
|
|
56
56
|
})
|
|
57
57
|
);
|
|
58
|
-
const Separator = (0, import_ds_classnames.aggregatedClasses)("div")(
|
|
59
|
-
blockName,
|
|
60
|
-
null,
|
|
61
|
-
({ dashed, margin, orientation, type }) => ({
|
|
62
|
-
dashed,
|
|
63
|
-
[margin]: margin,
|
|
64
|
-
[orientation]: orientation,
|
|
65
|
-
[type]: type
|
|
66
|
-
})
|
|
67
|
-
);
|
|
68
|
-
const types = ["category-level", "group-level", "non-form"];
|
|
69
|
-
const DSSeparator = ({
|
|
70
|
-
containerProps,
|
|
58
|
+
const Separator = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, null, ({ dashed, margin, orientation, type }) => ({
|
|
71
59
|
dashed,
|
|
72
|
-
margin,
|
|
73
|
-
orientation,
|
|
74
|
-
type
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SeparatorWrapper, {
|
|
60
|
+
[margin]: margin,
|
|
61
|
+
[orientation]: orientation,
|
|
62
|
+
[type]: type
|
|
63
|
+
}));
|
|
64
|
+
const types = ["category-level", "group-level", "non-form"];
|
|
65
|
+
const DSSeparator = ({ containerProps, dashed, margin, orientation, type, position, className, style }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SeparatorWrapper, {
|
|
79
66
|
...containerProps,
|
|
80
67
|
className,
|
|
81
68
|
classProps: {
|
|
@@ -105,24 +92,12 @@ DSSeparator.defaultProps = {
|
|
|
105
92
|
const props = {
|
|
106
93
|
className: import_ds_utilities.PropTypes.string.description("class for separator"),
|
|
107
94
|
style: import_ds_utilities.PropTypes.object.description("style object for separator"),
|
|
108
|
-
containerProps: import_ds_utilities.PropTypes.object.description(
|
|
109
|
-
|
|
110
|
-
),
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
),
|
|
114
|
-
margin: import_ds_utilities.PropTypes.oneOf(["s", "m", "l", "none"]).description(
|
|
115
|
-
"Amount of margin to be added to the separator"
|
|
116
|
-
),
|
|
117
|
-
orientation: import_ds_utilities.PropTypes.string.description(
|
|
118
|
-
"Orientation 'horizontal' or 'vertical'"
|
|
119
|
-
),
|
|
120
|
-
type: import_ds_utilities.PropTypes.oneOf(types).description(
|
|
121
|
-
"['category-level', 'group-level', 'non-form']"
|
|
122
|
-
),
|
|
123
|
-
position: import_ds_utilities.PropTypes.oneOf(["initial", "center", "end"]).description(
|
|
124
|
-
"['initial', 'center', 'end']"
|
|
125
|
-
)
|
|
95
|
+
containerProps: import_ds_utilities.PropTypes.object.description("Injected props to wrapper element of component"),
|
|
96
|
+
dashed: import_ds_utilities.PropTypes.bool.description("If the separator has to be dashed or solid"),
|
|
97
|
+
margin: import_ds_utilities.PropTypes.oneOf(["s", "m", "l", "none"]).description("Amount of margin to be added to the separator"),
|
|
98
|
+
orientation: import_ds_utilities.PropTypes.string.description("Orientation 'horizontal' or 'vertical'"),
|
|
99
|
+
type: import_ds_utilities.PropTypes.oneOf(types).description("['category-level', 'group-level', 'non-form']"),
|
|
100
|
+
position: import_ds_utilities.PropTypes.oneOf(["initial", "center", "end"]).description("['initial', 'center', 'end']")
|
|
126
101
|
};
|
|
127
102
|
DSSeparator.propTypes = props;
|
|
128
103
|
DSSeparator.displayName = "DSSeparator";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSSeparator.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\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')(
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\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 <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\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;ADmDnB;AAlDJ,0BAAoC;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,SAAS;AAAA,IACV,CAAC,cAAc;AAAA,IACf,CAAC,WAAW;AAAA,EACd;AACF;AAEA,MAAM,gBAAY,wCAAkB,KAAK,EAAE,WAAW,MAAM,CAAC,EAAE,QAAQ,QAAQ,aAAa,KAAK,OAAO;AAAA,EACtG;AAAA,EACA,CAAC,SAAS;AAAA,EACV,CAAC,cAAc;AAAA,EACf,CAAC,OAAO;AACV,EAAE;AAEF,MAAM,QAAQ,CAAC,kBAAkB,eAAe,UAAU;AAE1D,MAAM,cAAc,CAAC,EAAE,gBAAgB,QAAQ,QAAQ,aAAa,MAAM,UAAU,WAAW,MAAM,MACnG,4CAAC;AAAA,EACE,GAAG;AAAA,EACJ;AAAA,EACA,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA;AAAA,EAEA,sDAAC;AAAA,IACC,YAAY;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,GACF;AAAA,CACF;AAGF,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,EAEZ,WAAW,8BAAU,OAAO,YAAY,qBAAqB;AAAA,EAE7D,OAAO,8BAAU,OAAO,YAAY,4BAA4B;AAAA,EAEhE,gBAAgB,8BAAU,OAAO,YAAY,gDAAgD;AAAA,EAI7F,QAAQ,8BAAU,KAAK,YAAY,4CAA4C;AAAA,EAI/E,QAAQ,8BAAU,MAAM,CAAC,KAAK,KAAK,KAAK,MAAM,CAAC,EAAE,YAAY,+CAA+C;AAAA,EAI5G,aAAa,8BAAU,OAAO,YAAY,wCAAwC;AAAA,EAIlF,MAAM,8BAAU,MAAM,KAAK,EAAE,YAAY,+CAA+C;AAAA,EAIxF,UAAU,8BAAU,MAAM,CAAC,WAAW,UAAU,KAAK,CAAC,EAAE,YAAY,8BAA8B;AACpG;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,4BAAwB,8BAAS,WAAW;AAElD,sBAAsB,YAAY;AAGlC,IAAO,sBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/v2/DSSeparatorV2.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport React from 'react';\nimport {\n describe,\n useMemoMergePropsWithDefault,\n useGetGlobalAttributes,\n useValidateTypescriptPropTypes,\n useGetXstyledProps,\n} from '@elliemae/ds-utilities';\nimport { StyledSeparator } from './styles';\nimport { propTypes, defaultProps } from './react-desc-prop-types';\nimport { DSSeparatorV2Datatestid } from './exported-related/DSSeparatorV2Datatestid';\nimport type { DSSeparatorV2T } from './react-desc-prop-types';\n\nconst DSSeparatorV2 = (props: DSSeparatorV2T.Props): JSX.Element => {\n useValidateTypescriptPropTypes(props, propTypes);\n const propsWithDefault = useMemoMergePropsWithDefault<DSSeparatorV2T.Props>(props, defaultProps);\n\n const { colorType, isDotted, isVertical, color, ...rest } = propsWithDefault;\n\n const { role, ...globalAttrs } = useGetGlobalAttributes(rest);\n const xstyledAttrs = useGetXstyledProps(rest);\n\n return (\n <StyledSeparator\n colorType={colorType}\n isDotted={isDotted}\n isVertical={isVertical}\n color={color}\n role={role}\n {...(role ? { 'aria-orientation': isVertical ? 'vertical' : 'horizontal' } : undefined)}\n data-testid={DSSeparatorV2Datatestid.SEPARATOR}\n {...globalAttrs}\n {...xstyledAttrs}\n />\n );\n};\n\nDSSeparatorV2.displayName = 'DSSeparatorV2';\nconst DSSeparatorV2WithSchema = describe(DSSeparatorV2);\nDSSeparatorV2WithSchema.propTypes = propTypes as WeakValidationMap<unknown>;\n\nexport { DSSeparatorV2, DSSeparatorV2WithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADwBnB;AAtBJ,0BAMO;AACP,oBAAgC;AAChC,mCAAwC;AACxC,qCAAwC;AAGxC,MAAM,gBAAgB,CAAC,UAA6C;AAClE,0DAA+B,OAAO,sCAAS;AAC/C,QAAM,uBAAmB,kDAAmD,OAAO,yCAAY;AAE/F,QAAM,EAAE,WAAW,UAAU,YAAY,UAAU,KAAK,IAAI;AAE5D,QAAM,EAAE,SAAS,YAAY,QAAI,4CAAuB,IAAI;AAC5D,QAAM,mBAAe,wCAAmB,IAAI;AAE5C,SACE,4CAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACC,GAAI,OAAO,EAAE,oBAAoB,aAAa,aAAa,aAAa,IAAI;AAAA,IAC7E,eAAa,uDAAwB;AAAA,IACpC,GAAG;AAAA,IACH,GAAG;AAAA,GACN;AAEJ;AAEA,cAAc,cAAc;AAC5B,MAAM,8BAA0B,8BAAS,aAAa;AACtD,wBAAwB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/v2/styles.js
CHANGED
|
@@ -50,11 +50,8 @@ const dottedBorder = import_ds_system.css`
|
|
|
50
50
|
const solidBorder = import_ds_system.css`
|
|
51
51
|
background: ${({ theme, color, colorType }) => color || theme.colors.neutral[defaultColorTypes[colorType]]};
|
|
52
52
|
`;
|
|
53
|
-
const StyledSeparator = (0, import_ds_system.styled)(
|
|
53
|
+
const StyledSeparator = (0, import_ds_system.styled)(import_ds_system.XStyledWrapper, { name: "DS-Separator", slot: "root" })`
|
|
54
54
|
${directionStyles}
|
|
55
55
|
${({ isDotted }) => isDotted ? dottedBorder : solidBorder}
|
|
56
|
-
${import_ds_system.sizing}
|
|
57
|
-
${import_ds_system.space}
|
|
58
|
-
${import_ds_system.layout}
|
|
59
56
|
`;
|
|
60
57
|
//# sourceMappingURL=styles.js.map
|
|
@@ -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,
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,
|
|
4
|
+
"sourcesContent": ["import { styled, css, XStyledWrapper } 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(XStyledWrapper, { name: 'DS-Separator', slot: 'root' })<StyledSeparatorT>`\n ${directionStyles}\n ${({ isDotted }) => (isDotted ? dottedBorder : solidBorder)}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAA4C;AAS5C,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;AAAA;AAAA;AAAA;AAAA,qBAIlE,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;AAAA;AAG1F,MAAM,sBAAkB,yBAAO,iCAAgB,EAAE,MAAM,gBAAgB,MAAM,OAAO,CAAC;AAAA,IACxF;AAAA,IACA,CAAC,EAAE,SAAS,MAAO,WAAW,eAAe;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/DSSeparator.js
CHANGED
|
@@ -24,27 +24,14 @@ const SeparatorWrapper = aggregatedClasses("div")(
|
|
|
24
24
|
[position]: position
|
|
25
25
|
})
|
|
26
26
|
);
|
|
27
|
-
const Separator = aggregatedClasses("div")(
|
|
28
|
-
blockName,
|
|
29
|
-
null,
|
|
30
|
-
({ dashed, margin, orientation, type }) => ({
|
|
31
|
-
dashed,
|
|
32
|
-
[margin]: margin,
|
|
33
|
-
[orientation]: orientation,
|
|
34
|
-
[type]: type
|
|
35
|
-
})
|
|
36
|
-
);
|
|
37
|
-
const types = ["category-level", "group-level", "non-form"];
|
|
38
|
-
const DSSeparator = ({
|
|
39
|
-
containerProps,
|
|
27
|
+
const Separator = aggregatedClasses("div")(blockName, null, ({ dashed, margin, orientation, type }) => ({
|
|
40
28
|
dashed,
|
|
41
|
-
margin,
|
|
42
|
-
orientation,
|
|
43
|
-
type
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}) => /* @__PURE__ */ jsx(SeparatorWrapper, {
|
|
29
|
+
[margin]: margin,
|
|
30
|
+
[orientation]: orientation,
|
|
31
|
+
[type]: type
|
|
32
|
+
}));
|
|
33
|
+
const types = ["category-level", "group-level", "non-form"];
|
|
34
|
+
const DSSeparator = ({ containerProps, dashed, margin, orientation, type, position, className, style }) => /* @__PURE__ */ jsx(SeparatorWrapper, {
|
|
48
35
|
...containerProps,
|
|
49
36
|
className,
|
|
50
37
|
classProps: {
|
|
@@ -74,24 +61,12 @@ DSSeparator.defaultProps = {
|
|
|
74
61
|
const props = {
|
|
75
62
|
className: PropTypes.string.description("class for separator"),
|
|
76
63
|
style: PropTypes.object.description("style object for separator"),
|
|
77
|
-
containerProps: PropTypes.object.description(
|
|
78
|
-
|
|
79
|
-
),
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
),
|
|
83
|
-
margin: PropTypes.oneOf(["s", "m", "l", "none"]).description(
|
|
84
|
-
"Amount of margin to be added to the separator"
|
|
85
|
-
),
|
|
86
|
-
orientation: PropTypes.string.description(
|
|
87
|
-
"Orientation 'horizontal' or 'vertical'"
|
|
88
|
-
),
|
|
89
|
-
type: PropTypes.oneOf(types).description(
|
|
90
|
-
"['category-level', 'group-level', 'non-form']"
|
|
91
|
-
),
|
|
92
|
-
position: PropTypes.oneOf(["initial", "center", "end"]).description(
|
|
93
|
-
"['initial', 'center', 'end']"
|
|
94
|
-
)
|
|
64
|
+
containerProps: PropTypes.object.description("Injected props to wrapper element of component"),
|
|
65
|
+
dashed: PropTypes.bool.description("If the separator has to be dashed or solid"),
|
|
66
|
+
margin: PropTypes.oneOf(["s", "m", "l", "none"]).description("Amount of margin to be added to the separator"),
|
|
67
|
+
orientation: PropTypes.string.description("Orientation 'horizontal' or 'vertical'"),
|
|
68
|
+
type: PropTypes.oneOf(types).description("['category-level', 'group-level', 'non-form']"),
|
|
69
|
+
position: PropTypes.oneOf(["initial", "center", "end"]).description("['initial', 'center', 'end']")
|
|
95
70
|
};
|
|
96
71
|
DSSeparator.propTypes = props;
|
|
97
72
|
DSSeparator.displayName = "DSSeparator";
|
|
@@ -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", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\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')(
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\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 <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\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;ACmDnB;AAlDJ,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,MAAM,mBAAmB,kBAAkB,KAAK;AAAA,EAC9C;AAAA,EACA;AAAA,EACA,CAAC,EAAE,QAAQ,aAAa,QAAQ,SAAS,OAAO;AAAA,IAC9C;AAAA,IACA,CAAC,SAAS;AAAA,IACV,CAAC,cAAc;AAAA,IACf,CAAC,WAAW;AAAA,EACd;AACF;AAEA,MAAM,YAAY,kBAAkB,KAAK,EAAE,WAAW,MAAM,CAAC,EAAE,QAAQ,QAAQ,aAAa,KAAK,OAAO;AAAA,EACtG;AAAA,EACA,CAAC,SAAS;AAAA,EACV,CAAC,cAAc;AAAA,EACf,CAAC,OAAO;AACV,EAAE;AAEF,MAAM,QAAQ,CAAC,kBAAkB,eAAe,UAAU;AAE1D,MAAM,cAAc,CAAC,EAAE,gBAAgB,QAAQ,QAAQ,aAAa,MAAM,UAAU,WAAW,MAAM,MACnG,oBAAC;AAAA,EACE,GAAG;AAAA,EACJ;AAAA,EACA,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA;AAAA,EAEA,8BAAC;AAAA,IACC,YAAY;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,GACF;AAAA,CACF;AAGF,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,EAEZ,WAAW,UAAU,OAAO,YAAY,qBAAqB;AAAA,EAE7D,OAAO,UAAU,OAAO,YAAY,4BAA4B;AAAA,EAEhE,gBAAgB,UAAU,OAAO,YAAY,gDAAgD;AAAA,EAI7F,QAAQ,UAAU,KAAK,YAAY,4CAA4C;AAAA,EAI/E,QAAQ,UAAU,MAAM,CAAC,KAAK,KAAK,KAAK,MAAM,CAAC,EAAE,YAAY,+CAA+C;AAAA,EAI5G,aAAa,UAAU,OAAO,YAAY,wCAAwC;AAAA,EAIlF,MAAM,UAAU,MAAM,KAAK,EAAE,YAAY,+CAA+C;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;",
|
|
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/DSSeparatorV2.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { WeakValidationMap } from 'react';\nimport React from 'react';\nimport {\n describe,\n useMemoMergePropsWithDefault,\n useGetGlobalAttributes,\n useValidateTypescriptPropTypes,\n useGetXstyledProps,\n} from '@elliemae/ds-utilities';\nimport { StyledSeparator } from './styles';\nimport { propTypes, defaultProps } from './react-desc-prop-types';\nimport { DSSeparatorV2Datatestid } from './exported-related/DSSeparatorV2Datatestid';\nimport type { DSSeparatorV2T } from './react-desc-prop-types';\n\nconst DSSeparatorV2 = (props: DSSeparatorV2T.Props): JSX.Element => {\n useValidateTypescriptPropTypes(props, propTypes);\n const propsWithDefault = useMemoMergePropsWithDefault<DSSeparatorV2T.Props>(props, defaultProps);\n\n const { colorType, isDotted, isVertical, color, ...rest } = propsWithDefault;\n\n const { role, ...globalAttrs } = useGetGlobalAttributes(rest);\n const xstyledAttrs = useGetXstyledProps(rest);\n\n return (\n <StyledSeparator\n colorType={colorType}\n isDotted={isDotted}\n isVertical={isVertical}\n color={color}\n role={role}\n {...(role ? { 'aria-orientation': isVertical ? 'vertical' : 'horizontal' } : undefined)}\n data-testid={DSSeparatorV2Datatestid.SEPARATOR}\n {...globalAttrs}\n {...xstyledAttrs}\n />\n );\n};\n\nDSSeparatorV2.displayName = 'DSSeparatorV2';\nconst DSSeparatorV2WithSchema = describe(DSSeparatorV2);\nDSSeparatorV2WithSchema.propTypes = propTypes as WeakValidationMap<unknown>;\n\nexport { DSSeparatorV2, DSSeparatorV2WithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACwBnB;AAtBJ;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,uBAAuB;AAChC,SAAS,WAAW,oBAAoB;AACxC,SAAS,+BAA+B;AAGxC,MAAM,gBAAgB,CAAC,UAA6C;AAClE,iCAA+B,OAAO,SAAS;AAC/C,QAAM,mBAAmB,6BAAmD,OAAO,YAAY;AAE/F,QAAM,EAAE,WAAW,UAAU,YAAY,UAAU,KAAK,IAAI;AAE5D,QAAM,EAAE,SAAS,YAAY,IAAI,uBAAuB,IAAI;AAC5D,QAAM,eAAe,mBAAmB,IAAI;AAE5C,SACE,oBAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACC,GAAI,OAAO,EAAE,oBAAoB,aAAa,aAAa,aAAa,IAAI;AAAA,IAC7E,eAAa,wBAAwB;AAAA,IACpC,GAAG;AAAA,IACH,GAAG;AAAA,GACN;AAEJ;AAEA,cAAc,cAAc;AAC5B,MAAM,0BAA0B,SAAS,aAAa;AACtD,wBAAwB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/v2/styles.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { styled, css,
|
|
2
|
+
import { styled, css, XStyledWrapper } from "@elliemae/ds-system";
|
|
3
3
|
const defaultColorTypes = {
|
|
4
4
|
dark: "700",
|
|
5
5
|
light: "400"
|
|
@@ -21,12 +21,9 @@ const dottedBorder = css`
|
|
|
21
21
|
const solidBorder = css`
|
|
22
22
|
background: ${({ theme, color, colorType }) => color || theme.colors.neutral[defaultColorTypes[colorType]]};
|
|
23
23
|
`;
|
|
24
|
-
const StyledSeparator = styled(
|
|
24
|
+
const StyledSeparator = styled(XStyledWrapper, { name: "DS-Separator", slot: "root" })`
|
|
25
25
|
${directionStyles}
|
|
26
26
|
${({ isDotted }) => isDotted ? dottedBorder : solidBorder}
|
|
27
|
-
${sizing}
|
|
28
|
-
${space}
|
|
29
|
-
${layout}
|
|
30
27
|
`;
|
|
31
28
|
export {
|
|
32
29
|
StyledSeparator
|
|
@@ -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,
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,QAAQ,KAAK,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled, css, XStyledWrapper } 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(XStyledWrapper, { name: 'DS-Separator', slot: 'root' })<StyledSeparatorT>`\n ${directionStyles}\n ${({ isDotted }) => (isDotted ? dottedBorder : solidBorder)}\n`;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,QAAQ,KAAK,sBAAsB;AAS5C,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;AAAA;AAAA;AAAA;AAAA,qBAIlE,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;AAAA;AAG1F,MAAM,kBAAkB,OAAO,gBAAgB,EAAE,MAAM,gBAAgB,MAAM,OAAO,CAAC;AAAA,IACxF;AAAA,IACA,CAAC,EAAE,SAAS,MAAO,WAAW,eAAe;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-separator",
|
|
3
|
-
"version": "3.12.0-
|
|
3
|
+
"version": "3.12.0-rc.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Separator",
|
|
6
6
|
"files": [
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"indent": 4
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@elliemae/ds-classnames": "3.12.0-
|
|
43
|
-
"@elliemae/ds-system": "3.12.0-
|
|
44
|
-
"@elliemae/ds-utilities": "3.12.0-
|
|
42
|
+
"@elliemae/ds-classnames": "3.12.0-rc.0",
|
|
43
|
+
"@elliemae/ds-system": "3.12.0-rc.0",
|
|
44
|
+
"@elliemae/ds-utilities": "3.12.0-rc.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@testing-library/react": "~12.1.3",
|