@elliemae/ds-separator 3.2.1-rc.5 → 3.2.1-rc.6
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 +3 -19
- package/dist/cjs/DSSeparator.js.map +1 -1
- package/dist/cjs/v2/DSSeparatorV2.js +9 -36
- package/dist/cjs/v2/DSSeparatorV2.js.map +1 -1
- package/dist/cjs/v2/react-desc-prop-types.js +4 -19
- package/dist/cjs/v2/react-desc-prop-types.js.map +1 -1
- package/dist/esm/DSSeparator.js +3 -21
- package/dist/esm/DSSeparator.js.map +1 -1
- package/dist/esm/v2/DSSeparatorV2.js +9 -38
- package/dist/esm/v2/DSSeparatorV2.js.map +1 -1
- package/dist/esm/v2/react-desc-prop-types.js +4 -21
- package/dist/esm/v2/react-desc-prop-types.js.map +1 -1
- package/package.json +4 -4
package/dist/cjs/DSSeparator.js
CHANGED
|
@@ -1,27 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
|
-
var __defProps = Object.defineProperties;
|
|
5
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
10
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
-
var __spreadValues = (a, b) => {
|
|
14
|
-
for (var prop in b || (b = {}))
|
|
15
|
-
if (__hasOwnProp.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
if (__getOwnPropSymbols)
|
|
18
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
-
if (__propIsEnum.call(b, prop))
|
|
20
|
-
__defNormalProp(a, prop, b[prop]);
|
|
21
|
-
}
|
|
22
|
-
return a;
|
|
23
|
-
};
|
|
24
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
8
|
var __export = (target, all) => {
|
|
26
9
|
for (var name in all)
|
|
27
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -81,7 +64,8 @@ const DSSeparator = ({
|
|
|
81
64
|
position,
|
|
82
65
|
className,
|
|
83
66
|
style
|
|
84
|
-
}) => /* @__PURE__ */ import_react.default.createElement(SeparatorWrapper,
|
|
67
|
+
}) => /* @__PURE__ */ import_react.default.createElement(SeparatorWrapper, {
|
|
68
|
+
...containerProps,
|
|
85
69
|
className,
|
|
86
70
|
classProps: {
|
|
87
71
|
margin,
|
|
@@ -90,7 +74,7 @@ const DSSeparator = ({
|
|
|
90
74
|
position
|
|
91
75
|
},
|
|
92
76
|
style
|
|
93
|
-
}
|
|
77
|
+
}, /* @__PURE__ */ import_react.default.createElement(Separator, {
|
|
94
78
|
classProps: {
|
|
95
79
|
dashed,
|
|
96
80
|
margin,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSSeparator.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
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')(\n blockName,\n null,\n ({ dashed, margin, orientation, type }) => ({\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}) => (\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(\n 'Injected props to wrapper element of component',\n ),\n /**\n * If the separator has to be dashed or solid\n */\n dashed: PropTypes.bool.description(\n 'If the separator has to be dashed or solid',\n ),\n /**\n * Amount of margin to be added to the separator\n */\n margin: PropTypes.oneOf(['s', 'm', 'l', 'none']).description(\n 'Amount of margin to be added to the separator',\n ),\n /**\n * Orientation 'horizontal' or 'vertical'\n */\n orientation: PropTypes.string.description(\n \"Orientation 'horizontal' or 'vertical'\",\n ),\n /**\n * ['category-level', 'group-level', 'non-form']\n */\n type: PropTypes.oneOf(types).description(\n \"['category-level', 'group-level', 'non-form']\",\n ),\n /**\n * ['initial', 'center', 'end']\n */\n position: PropTypes.oneOf(['initial', 'center', 'end']).description(\n \"['initial', 'center', 'end']\",\n ),\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": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,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,mBAAmB,4CAAkB,KAAK,EAC9C,qBACA,MACA,CAAC,EAAE,QAAQ,aAAa,QAAQ,eAAgB;AAAA,EAC9C;AAAA,EACA,CAAC,SAAS;AAAA,EACV,CAAC,cAAc;AAAA,EACf,CAAC,WAAW;AACd,EACF;AAEA,MAAM,YAAY,4CAAkB,KAAK,EACvC,WACA,MACA,CAAC,EAAE,QAAQ,QAAQ,aAAa,WAAY;AAAA,EAC1C;AAAA,EACA,CAAC,SAAS;AAAA,EACV,CAAC,cAAc;AAAA,EACf,CAAC,OAAO;AACV,EACF;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;AAAA,MAEA,mDAAC;AAAA,EACE,GAAG;AAAA,EACJ;AAAA,EACA,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA;AAAA,GAEA,mDAAC;AAAA,EACC,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,CACF,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,YAC/B,gDACF;AAAA,EAIA,QAAQ,8BAAU,KAAK,YACrB,4CACF;AAAA,EAIA,QAAQ,8BAAU,MAAM,CAAC,KAAK,KAAK,KAAK,MAAM,CAAC,EAAE,YAC/C,+CACF;AAAA,EAIA,aAAa,8BAAU,OAAO,YAC5B,wCACF;AAAA,EAIA,MAAM,8BAAU,MAAM,KAAK,EAAE,YAC3B,+CACF;AAAA,EAIA,UAAU,8BAAU,MAAM,CAAC,WAAW,UAAU,KAAK,CAAC,EAAE,YACtD,8BACF;AACF;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,wBAAwB,kCAAS,WAAW;AAElD,sBAAsB,YAAY;AAGlC,IAAO,sBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,39 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
|
-
var __defProps = Object.defineProperties;
|
|
5
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
10
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
-
var __spreadValues = (a, b) => {
|
|
14
|
-
for (var prop in b || (b = {}))
|
|
15
|
-
if (__hasOwnProp.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
if (__getOwnPropSymbols)
|
|
18
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
-
if (__propIsEnum.call(b, prop))
|
|
20
|
-
__defNormalProp(a, prop, b[prop]);
|
|
21
|
-
}
|
|
22
|
-
return a;
|
|
23
|
-
};
|
|
24
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
-
var __objRest = (source, exclude) => {
|
|
26
|
-
var target = {};
|
|
27
|
-
for (var prop in source)
|
|
28
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
29
|
-
target[prop] = source[prop];
|
|
30
|
-
if (source != null && __getOwnPropSymbols)
|
|
31
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
32
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
-
target[prop] = source[prop];
|
|
34
|
-
}
|
|
35
|
-
return target;
|
|
36
|
-
};
|
|
37
8
|
var __export = (target, all) => {
|
|
38
9
|
for (var name in all)
|
|
39
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -63,18 +34,20 @@ var import_DSSeparatorV2Datatestid = require("./exported-related/DSSeparatorV2Da
|
|
|
63
34
|
const DSSeparatorV2 = (props) => {
|
|
64
35
|
(0, import_ds_utilities.useValidateTypescriptPropTypes)(props, import_react_desc_prop_types.propTypes);
|
|
65
36
|
const propsWithDefault = (0, import_ds_utilities.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultProps);
|
|
66
|
-
const
|
|
67
|
-
const
|
|
37
|
+
const { colorType, isDotted, isVertical, color, ...rest } = propsWithDefault;
|
|
38
|
+
const { role, ...globalAttrs } = (0, import_ds_utilities.useGetGlobalAttributes)(rest);
|
|
68
39
|
const xstyledAttrs = (0, import_ds_utilities.useGetXstyledProps)(rest);
|
|
69
|
-
return /* @__PURE__ */ import_react.default.createElement(import_styles.StyledSeparator,
|
|
40
|
+
return /* @__PURE__ */ import_react.default.createElement(import_styles.StyledSeparator, {
|
|
70
41
|
colorType,
|
|
71
42
|
isDotted,
|
|
72
43
|
isVertical,
|
|
73
44
|
color,
|
|
74
|
-
role
|
|
75
|
-
|
|
76
|
-
"data-testid": import_DSSeparatorV2Datatestid.DSSeparatorV2Datatestid.SEPARATOR
|
|
77
|
-
|
|
45
|
+
role,
|
|
46
|
+
...role ? { "aria-orientation": isVertical ? "vertical" : "horizontal" } : void 0,
|
|
47
|
+
"data-testid": import_DSSeparatorV2Datatestid.DSSeparatorV2Datatestid.SEPARATOR,
|
|
48
|
+
...globalAttrs,
|
|
49
|
+
...xstyledAttrs
|
|
50
|
+
});
|
|
78
51
|
};
|
|
79
52
|
DSSeparatorV2.displayName = "DSSeparatorV2";
|
|
80
53
|
const DSSeparatorV2WithSchema = (0, import_ds_utilities.describe)(DSSeparatorV2);
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/v2/DSSeparatorV2.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React, { WeakValidationMap } 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": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAyC;AACzC,0BAMO;AACP,oBAAgC;AAChC,mCAAwC;AACxC,qCAAwC;AAGxC,MAAM,gBAAgB,CAAC,UAA6C;AAClE,0DAA+B,OAAO,sCAAS;AAC/C,QAAM,mBAAmB,sDAAmD,OAAO,yCAAY;AAE/F,QAAM,EAAE,WAAW,UAAU,YAAY,UAAU,SAAS;AAE5D,QAAM,EAAE,SAAS,gBAAgB,gDAAuB,IAAI;AAC5D,QAAM,eAAe,4CAAmB,IAAI;AAE5C,SACE,mDAAC;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,0BAA0B,kCAAS,aAAa;AACtD,wBAAwB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,27 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
|
-
var __defProps = Object.defineProperties;
|
|
5
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
10
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
-
var __spreadValues = (a, b) => {
|
|
14
|
-
for (var prop in b || (b = {}))
|
|
15
|
-
if (__hasOwnProp.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
if (__getOwnPropSymbols)
|
|
18
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
-
if (__propIsEnum.call(b, prop))
|
|
20
|
-
__defNormalProp(a, prop, b[prop]);
|
|
21
|
-
}
|
|
22
|
-
return a;
|
|
23
|
-
};
|
|
24
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
8
|
var __export = (target, all) => {
|
|
26
9
|
for (var name in all)
|
|
27
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -49,10 +32,12 @@ const defaultProps = {
|
|
|
49
32
|
isDotted: false,
|
|
50
33
|
colorType: "dark"
|
|
51
34
|
};
|
|
52
|
-
const propTypes =
|
|
35
|
+
const propTypes = {
|
|
36
|
+
...import_ds_utilities.globalAttributesPropTypes,
|
|
37
|
+
...import_ds_utilities.xstyledPropTypes,
|
|
53
38
|
isVertical: import_ds_utilities.PropTypes.bool.description("Set vertical orientation.").defaultValue(false),
|
|
54
39
|
isDotted: import_ds_utilities.PropTypes.bool.description("Set dashed style.").defaultValue(false),
|
|
55
40
|
colorType: import_ds_utilities.PropTypes.oneOf(["dark", "light"]).description("Set dark or light color types. Using color property will override this one.").defaultValue("dark"),
|
|
56
41
|
color: import_ds_utilities.PropTypes.string.description("Set a custom color.")
|
|
57
|
-
}
|
|
42
|
+
};
|
|
58
43
|
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/v2/react-desc-prop-types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-utilities';\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 extends Partial<DefaultProps>, PropsOptional {}\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAuE;AAEhE,MAAM,eAA4C;AAAA,EACvD,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,WAAW;AACb;AAEO,MAAM,YAAY;AAAA,EACvB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,YAAY,8BAAU,KAAK,YAAY,2BAA2B,EAAE,aAAa,KAAK;AAAA,EACtF,UAAU,8BAAU,KAAK,YAAY,mBAAmB,EAAE,aAAa,KAAK;AAAA,EAC5E,WAAW,8BAAU,MAAM,CAAC,QAAQ,OAAO,CAAC,EACzC,YAAY,6EAA6E,EACzF,aAAa,MAAM;AAAA,EACtB,OAAO,8BAAU,OAAO,YAAY,qBAAqB;AAC3D;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/DSSeparator.js
CHANGED
|
@@ -1,23 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
-
var __spreadValues = (a, b) => {
|
|
10
|
-
for (var prop in b || (b = {}))
|
|
11
|
-
if (__hasOwnProp.call(b, prop))
|
|
12
|
-
__defNormalProp(a, prop, b[prop]);
|
|
13
|
-
if (__getOwnPropSymbols)
|
|
14
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
-
if (__propIsEnum.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
}
|
|
18
|
-
return a;
|
|
19
|
-
};
|
|
20
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
2
|
import * as React from "react";
|
|
22
3
|
import React2 from "react";
|
|
23
4
|
import { PropTypes, describe } from "@elliemae/ds-utilities";
|
|
@@ -56,7 +37,8 @@ const DSSeparator = ({
|
|
|
56
37
|
position,
|
|
57
38
|
className,
|
|
58
39
|
style
|
|
59
|
-
}) => /* @__PURE__ */ React2.createElement(SeparatorWrapper,
|
|
40
|
+
}) => /* @__PURE__ */ React2.createElement(SeparatorWrapper, {
|
|
41
|
+
...containerProps,
|
|
60
42
|
className,
|
|
61
43
|
classProps: {
|
|
62
44
|
margin,
|
|
@@ -65,7 +47,7 @@ const DSSeparator = ({
|
|
|
65
47
|
position
|
|
66
48
|
},
|
|
67
49
|
style
|
|
68
|
-
}
|
|
50
|
+
}, /* @__PURE__ */ React2.createElement(Separator, {
|
|
69
51
|
classProps: {
|
|
70
52
|
dashed,
|
|
71
53
|
margin,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSSeparator.tsx"],
|
|
4
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')(\n blockName,\n null,\n ({ dashed, margin, orientation, type }) => ({\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}) => (\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(\n 'Injected props to wrapper element of component',\n ),\n /**\n * If the separator has to be dashed or solid\n */\n dashed: PropTypes.bool.description(\n 'If the separator has to be dashed or solid',\n ),\n /**\n * Amount of margin to be added to the separator\n */\n margin: PropTypes.oneOf(['s', 'm', 'l', 'none']).description(\n 'Amount of margin to be added to the separator',\n ),\n /**\n * Orientation 'horizontal' or 'vertical'\n */\n orientation: PropTypes.string.description(\n \"Orientation 'horizontal' or 'vertical'\",\n ),\n /**\n * ['category-level', 'group-level', 'non-form']\n */\n type: PropTypes.oneOf(types).description(\n \"['category-level', 'group-level', 'non-form']\",\n ),\n /**\n * ['initial', 'center', 'end']\n */\n position: PropTypes.oneOf(['initial', 'center', 'end']).description(\n \"['initial', 'center', 'end']\",\n ),\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": "
|
|
5
|
+
"mappings": ";AAAA;ACAA;AACA;AACA;AAEA,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,EAC9C,qBACA,MACA,CAAC,EAAE,QAAQ,aAAa,QAAQ,eAAgB;AAAA,EAC9C;AAAA,EACA,CAAC,SAAS;AAAA,EACV,CAAC,cAAc;AAAA,EACf,CAAC,WAAW;AACd,EACF;AAEA,MAAM,YAAY,kBAAkB,KAAK,EACvC,WACA,MACA,CAAC,EAAE,QAAQ,QAAQ,aAAa,WAAY;AAAA,EAC1C;AAAA,EACA,CAAC,SAAS;AAAA,EACV,CAAC,cAAc;AAAA,EACf,CAAC,OAAO;AACV,EACF;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;AAAA,MAEA,qCAAC;AAAA,EACE,GAAG;AAAA,EACJ;AAAA,EACA,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA;AAAA,GAEA,qCAAC;AAAA,EACC,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,CACF,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,YAC/B,gDACF;AAAA,EAIA,QAAQ,UAAU,KAAK,YACrB,4CACF;AAAA,EAIA,QAAQ,UAAU,MAAM,CAAC,KAAK,KAAK,KAAK,MAAM,CAAC,EAAE,YAC/C,+CACF;AAAA,EAIA,aAAa,UAAU,OAAO,YAC5B,wCACF;AAAA,EAIA,MAAM,UAAU,MAAM,KAAK,EAAE,YAC3B,+CACF;AAAA,EAIA,UAAU,UAAU,MAAM,CAAC,WAAW,UAAU,KAAK,CAAC,EAAE,YACtD,8BACF;AACF;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,wBAAwB,SAAS,WAAW;AAElD,sBAAsB,YAAY;AAGlC,IAAO,sBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,35 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
-
var __spreadValues = (a, b) => {
|
|
10
|
-
for (var prop in b || (b = {}))
|
|
11
|
-
if (__hasOwnProp.call(b, prop))
|
|
12
|
-
__defNormalProp(a, prop, b[prop]);
|
|
13
|
-
if (__getOwnPropSymbols)
|
|
14
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
-
if (__propIsEnum.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
}
|
|
18
|
-
return a;
|
|
19
|
-
};
|
|
20
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
|
-
var __objRest = (source, exclude) => {
|
|
22
|
-
var target = {};
|
|
23
|
-
for (var prop in source)
|
|
24
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
25
|
-
target[prop] = source[prop];
|
|
26
|
-
if (source != null && __getOwnPropSymbols)
|
|
27
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
28
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
29
|
-
target[prop] = source[prop];
|
|
30
|
-
}
|
|
31
|
-
return target;
|
|
32
|
-
};
|
|
33
2
|
import * as React from "react";
|
|
34
3
|
import React2 from "react";
|
|
35
4
|
import {
|
|
@@ -45,18 +14,20 @@ import { DSSeparatorV2Datatestid } from "./exported-related/DSSeparatorV2Datates
|
|
|
45
14
|
const DSSeparatorV2 = (props) => {
|
|
46
15
|
useValidateTypescriptPropTypes(props, propTypes);
|
|
47
16
|
const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
|
|
48
|
-
const
|
|
49
|
-
const
|
|
17
|
+
const { colorType, isDotted, isVertical, color, ...rest } = propsWithDefault;
|
|
18
|
+
const { role, ...globalAttrs } = useGetGlobalAttributes(rest);
|
|
50
19
|
const xstyledAttrs = useGetXstyledProps(rest);
|
|
51
|
-
return /* @__PURE__ */ React2.createElement(StyledSeparator,
|
|
20
|
+
return /* @__PURE__ */ React2.createElement(StyledSeparator, {
|
|
52
21
|
colorType,
|
|
53
22
|
isDotted,
|
|
54
23
|
isVertical,
|
|
55
24
|
color,
|
|
56
|
-
role
|
|
57
|
-
|
|
58
|
-
"data-testid": DSSeparatorV2Datatestid.SEPARATOR
|
|
59
|
-
|
|
25
|
+
role,
|
|
26
|
+
...role ? { "aria-orientation": isVertical ? "vertical" : "horizontal" } : void 0,
|
|
27
|
+
"data-testid": DSSeparatorV2Datatestid.SEPARATOR,
|
|
28
|
+
...globalAttrs,
|
|
29
|
+
...xstyledAttrs
|
|
30
|
+
});
|
|
60
31
|
};
|
|
61
32
|
DSSeparatorV2.displayName = "DSSeparatorV2";
|
|
62
33
|
const DSSeparatorV2WithSchema = describe(DSSeparatorV2);
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v2/DSSeparatorV2.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { WeakValidationMap } 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": "
|
|
5
|
+
"mappings": ";AAAA;ACAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA;AACA;AACA;AAGA,MAAM,gBAAgB,CAAC,UAA6C;AAClE,iCAA+B,OAAO,SAAS;AAC/C,QAAM,mBAAmB,6BAAmD,OAAO,YAAY;AAE/F,QAAM,EAAE,WAAW,UAAU,YAAY,UAAU,SAAS;AAE5D,QAAM,EAAE,SAAS,gBAAgB,uBAAuB,IAAI;AAC5D,QAAM,eAAe,mBAAmB,IAAI;AAE5C,SACE,qCAAC;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
|
}
|
|
@@ -1,23 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
-
var __spreadValues = (a, b) => {
|
|
10
|
-
for (var prop in b || (b = {}))
|
|
11
|
-
if (__hasOwnProp.call(b, prop))
|
|
12
|
-
__defNormalProp(a, prop, b[prop]);
|
|
13
|
-
if (__getOwnPropSymbols)
|
|
14
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
-
if (__propIsEnum.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
}
|
|
18
|
-
return a;
|
|
19
|
-
};
|
|
20
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
2
|
import * as React from "react";
|
|
22
3
|
import { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from "@elliemae/ds-utilities";
|
|
23
4
|
const defaultProps = {
|
|
@@ -25,12 +6,14 @@ const defaultProps = {
|
|
|
25
6
|
isDotted: false,
|
|
26
7
|
colorType: "dark"
|
|
27
8
|
};
|
|
28
|
-
const propTypes =
|
|
9
|
+
const propTypes = {
|
|
10
|
+
...globalAttributesPropTypes,
|
|
11
|
+
...xstyledPropTypes,
|
|
29
12
|
isVertical: PropTypes.bool.description("Set vertical orientation.").defaultValue(false),
|
|
30
13
|
isDotted: PropTypes.bool.description("Set dashed style.").defaultValue(false),
|
|
31
14
|
colorType: PropTypes.oneOf(["dark", "light"]).description("Set dark or light color types. Using color property will override this one.").defaultValue("dark"),
|
|
32
15
|
color: PropTypes.string.description("Set a custom color.")
|
|
33
|
-
}
|
|
16
|
+
};
|
|
34
17
|
export {
|
|
35
18
|
defaultProps,
|
|
36
19
|
propTypes
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v2/react-desc-prop-types.ts"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-utilities';\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 extends Partial<DefaultProps>, PropsOptional {}\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";AAAA;ACAA;AAEO,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
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-separator",
|
|
3
|
-
"version": "3.2.1-rc.
|
|
3
|
+
"version": "3.2.1-rc.6",
|
|
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.2.1-rc.
|
|
43
|
-
"@elliemae/ds-system": "3.2.1-rc.
|
|
44
|
-
"@elliemae/ds-utilities": "3.2.1-rc.
|
|
42
|
+
"@elliemae/ds-classnames": "3.2.1-rc.6",
|
|
43
|
+
"@elliemae/ds-system": "3.2.1-rc.6",
|
|
44
|
+
"@elliemae/ds-utilities": "3.2.1-rc.6"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@testing-library/react": "~12.1.3"
|