@elliemae/ds-separator 3.0.0-next.4 → 3.0.0-next.40
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.map +1 -1
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/v2/DSSeparatorV2.js +87 -0
- package/dist/cjs/v2/DSSeparatorV2.js.map +7 -0
- package/dist/cjs/v2/exported-related/DSSeparatorV2Datatestid.js +37 -0
- package/dist/cjs/v2/exported-related/DSSeparatorV2Datatestid.js.map +7 -0
- package/dist/cjs/v2/index.js +29 -0
- package/dist/cjs/v2/index.js.map +7 -0
- package/dist/cjs/v2/react-desc-prop-types.js +64 -0
- package/dist/cjs/v2/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/v2/styles.js +63 -0
- package/dist/cjs/v2/styles.js.map +7 -0
- package/dist/esm/DSSeparator.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/v2/DSSeparatorV2.js +66 -0
- package/dist/esm/v2/DSSeparatorV2.js.map +7 -0
- package/dist/esm/v2/exported-related/DSSeparatorV2Datatestid.js +8 -0
- package/dist/esm/v2/exported-related/DSSeparatorV2Datatestid.js.map +7 -0
- package/dist/esm/v2/index.js +4 -0
- package/dist/esm/v2/index.js.map +7 -0
- package/dist/esm/v2/react-desc-prop-types.js +37 -0
- package/dist/esm/v2/react-desc-prop-types.js.map +7 -0
- package/dist/esm/v2/styles.js +34 -0
- package/dist/esm/v2/styles.js.map +7 -0
- package/package.json +5 -2
|
@@ -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 'react-desc';\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;\n\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;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;AACpC,2BAAkC;AAElC,MAAM,YAAY;AAElB,MAAM,cAAc;AAAA,EAClB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,MAAM;
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;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,GACC,SAAS;AAAA,GACT,cAAc;AAAA,GACd,WAAW;AACd,EACF;AAEA,MAAM,YAAY,4CAAkB,KAAK,EACvC,WACA,MACA,CAAC,EAAE,QAAQ,QAAQ,aAAa,WAAY;AAAA,EAC1C;AAAA,GACC,SAAS;AAAA,GACT,cAAc;AAAA,GACd,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,mDACK,iBADL;AAAA,EAEC;AAAA,EACA,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA;AAAA,IAEA,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,4BAAU,OAAO,YAAY,qBAAqB;AAAA,EAE7D,OAAO,4BAAU,OAAO,YAAY,4BAA4B;AAAA,EAEhE,gBAAgB,4BAAU,OAAO,YAC/B,gDACF;AAAA,EAIA,QAAQ,4BAAU,KAAK,YACrB,4CACF;AAAA,EAIA,QAAQ,4BAAU,MAAM,CAAC,KAAK,KAAK,KAAK,MAAM,CAAC,EAAE,YAC/C,+CACF;AAAA,EAIA,aAAa,4BAAU,OAAO,YAC5B,wCACF;AAAA,EAIA,MAAM,4BAAU,MAAM,KAAK,EAAE,YAC3B,+CACF;AAAA,EAIA,UAAU,4BAAU,MAAM,CAAC,WAAW,UAAU,KAAK,CAAC,EAAE,YACtD,8BACF;AACF;AAEA,YAAY,YAAY;AAExB,MAAM,wBAAwB,gCAAS,WAAW;AAElD,sBAAsB,YAAY;AAGlC,IAAO,sBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -31,6 +31,7 @@ __export(src_exports, {
|
|
|
31
31
|
});
|
|
32
32
|
var React = __toESM(require("react"));
|
|
33
33
|
__reExport(src_exports, require("./DSSeparator"));
|
|
34
|
+
__reExport(src_exports, require("./v2"));
|
|
34
35
|
var import_DSSeparator = __toESM(require("./DSSeparator"));
|
|
35
36
|
module.exports = __toCommonJS(src_exports);
|
|
36
37
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export * from './DSSeparator';\nexport { default } from './DSSeparator';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc;AACd,yBAAwB;",
|
|
4
|
+
"sourcesContent": ["export * from './DSSeparator';\nexport * from './v2';\nexport { default } from './DSSeparator';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc;AACd,wBAAc;AACd,yBAAwB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
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
|
+
var __export = (target, all) => {
|
|
38
|
+
for (var name in all)
|
|
39
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
40
|
+
};
|
|
41
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
42
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
43
|
+
for (let key of __getOwnPropNames(module2))
|
|
44
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
45
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
46
|
+
}
|
|
47
|
+
return target;
|
|
48
|
+
};
|
|
49
|
+
var __toESM = (module2, isNodeMode) => {
|
|
50
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
51
|
+
};
|
|
52
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
53
|
+
return (module2, temp) => {
|
|
54
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
55
|
+
};
|
|
56
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
57
|
+
var DSSeparatorV2_exports = {};
|
|
58
|
+
__export(DSSeparatorV2_exports, {
|
|
59
|
+
DSSeparatorV2: () => DSSeparatorV2,
|
|
60
|
+
DSSeparatorV2WithSchema: () => DSSeparatorV2WithSchema
|
|
61
|
+
});
|
|
62
|
+
var React = __toESM(require("react"));
|
|
63
|
+
var import_react = __toESM(require("react"));
|
|
64
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
65
|
+
var import_styles = require("./styles");
|
|
66
|
+
var import_react_desc_prop_types = require("./react-desc-prop-types");
|
|
67
|
+
var import_DSSeparatorV2Datatestid = require("./exported-related/DSSeparatorV2Datatestid");
|
|
68
|
+
const DSSeparatorV2 = (props) => {
|
|
69
|
+
(0, import_ds_utilities.useValidateTypescriptPropTypes)(props, import_react_desc_prop_types.propTypes);
|
|
70
|
+
const propsWithDefault = (0, import_ds_utilities.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultProps);
|
|
71
|
+
const _a = propsWithDefault, { type, isDashed, isVertical, color } = _a, rest = __objRest(_a, ["type", "isDashed", "isVertical", "color"]);
|
|
72
|
+
const _b = (0, import_ds_utilities.useGetGlobalAttributes)(rest), { role } = _b, globalAttrs = __objRest(_b, ["role"]);
|
|
73
|
+
const xstyledAttrs = (0, import_ds_utilities.useGetXstyledProps)(rest);
|
|
74
|
+
return /* @__PURE__ */ import_react.default.createElement(import_styles.StyledSeparator, __spreadValues(__spreadValues(__spreadProps(__spreadValues({
|
|
75
|
+
colorType: type,
|
|
76
|
+
isDashed,
|
|
77
|
+
isVertical,
|
|
78
|
+
color,
|
|
79
|
+
role
|
|
80
|
+
}, role ? { "aria-orientation": isVertical ? "vertical" : "horizontal" } : void 0), {
|
|
81
|
+
"data-testid": import_DSSeparatorV2Datatestid.DSSeparatorV2Datatestid.SEPARATOR
|
|
82
|
+
}), globalAttrs), xstyledAttrs));
|
|
83
|
+
};
|
|
84
|
+
const DSSeparatorV2WithSchema = (0, import_ds_utilities.describe)(DSSeparatorV2);
|
|
85
|
+
DSSeparatorV2WithSchema.propTypes = import_react_desc_prop_types.propTypes;
|
|
86
|
+
module.exports = __toCommonJS(DSSeparatorV2_exports);
|
|
87
|
+
//# sourceMappingURL=DSSeparatorV2.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/v2/DSSeparatorV2.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
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 { type, isDashed, isVertical, color, ...rest } = propsWithDefault;\n\n const { role, ...globalAttrs } = useGetGlobalAttributes(rest);\n const xstyledAttrs = useGetXstyledProps(rest);\n\n return (\n <StyledSeparator\n colorType={type}\n isDashed={isDashed}\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\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;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,QAAuD,uBAA/C,QAAM,UAAU,YAAY,UAAmB,IAAT,iBAAS,IAAT,CAAtC,QAAM,YAAU,cAAY;AAEpC,QAAiC,qDAAuB,IAAI,GAApD,WAAyB,IAAhB,wBAAgB,IAAhB,CAAT;AACR,QAAM,eAAe,4CAAmB,IAAI;AAE5C,SACE,mDAAC;AAAA,IACC,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,KACK,OAAO,EAAE,oBAAoB,aAAa,aAAa,aAAa,IAAI,SAN9E;AAAA,IAOC,eAAa,uDAAwB;AAAA,MACjC,cACA,aACN;AAEJ;AAEA,MAAM,0BAA0B,kCAAS,aAAa;AACtD,wBAAwB,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var DSSeparatorV2Datatestid_exports = {};
|
|
29
|
+
__export(DSSeparatorV2Datatestid_exports, {
|
|
30
|
+
DSSeparatorV2Datatestid: () => DSSeparatorV2Datatestid
|
|
31
|
+
});
|
|
32
|
+
var React = __toESM(require("react"));
|
|
33
|
+
const DSSeparatorV2Datatestid = {
|
|
34
|
+
SEPARATOR: "ds-separator-v2"
|
|
35
|
+
};
|
|
36
|
+
module.exports = __toCommonJS(DSSeparatorV2Datatestid_exports);
|
|
37
|
+
//# sourceMappingURL=DSSeparatorV2Datatestid.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/v2/exported-related/DSSeparatorV2Datatestid.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export const DSSeparatorV2Datatestid = {\n SEPARATOR: 'ds-separator-v2',\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,0BAA0B;AAAA,EACrC,WAAW;AACb;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
9
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(module2))
|
|
11
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
12
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return target;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (module2, isNodeMode) => {
|
|
17
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
20
|
+
return (module2, temp) => {
|
|
21
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
22
|
+
};
|
|
23
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
24
|
+
var v2_exports = {};
|
|
25
|
+
var React = __toESM(require("react"));
|
|
26
|
+
__reExport(v2_exports, require("./DSSeparatorV2"));
|
|
27
|
+
__reExport(v2_exports, require("./exported-related/DSSeparatorV2Datatestid"));
|
|
28
|
+
module.exports = __toCommonJS(v2_exports);
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/v2/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export * from './DSSeparatorV2';\nexport * from './exported-related/DSSeparatorV2Datatestid';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA,YAAuB;ADAvB,uBAAc;AACd,uBAAc;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
25
|
+
var __export = (target, all) => {
|
|
26
|
+
for (var name in all)
|
|
27
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
28
|
+
};
|
|
29
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
30
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
31
|
+
for (let key of __getOwnPropNames(module2))
|
|
32
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
33
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
34
|
+
}
|
|
35
|
+
return target;
|
|
36
|
+
};
|
|
37
|
+
var __toESM = (module2, isNodeMode) => {
|
|
38
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
39
|
+
};
|
|
40
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
41
|
+
return (module2, temp) => {
|
|
42
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
43
|
+
};
|
|
44
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
45
|
+
var react_desc_prop_types_exports = {};
|
|
46
|
+
__export(react_desc_prop_types_exports, {
|
|
47
|
+
defaultProps: () => defaultProps,
|
|
48
|
+
propTypes: () => propTypes
|
|
49
|
+
});
|
|
50
|
+
var React = __toESM(require("react"));
|
|
51
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
52
|
+
const defaultProps = {
|
|
53
|
+
isVertical: false,
|
|
54
|
+
isDashed: false,
|
|
55
|
+
type: "primary"
|
|
56
|
+
};
|
|
57
|
+
const propTypes = __spreadProps(__spreadValues(__spreadValues({}, import_ds_utilities.globalAttributesPropTypes), import_ds_utilities.xstyledPropTypes), {
|
|
58
|
+
isVertical: import_ds_utilities.PropTypes.bool.description("Set vertical orientation.").defaultValue(false),
|
|
59
|
+
isDashed: import_ds_utilities.PropTypes.bool.description("Set dashed style.").defaultValue(false),
|
|
60
|
+
type: import_ds_utilities.PropTypes.oneOf(["primary", "secondary"]).description("Set primary or secondary color types. Using color property will override this one.").defaultValue("primary"),
|
|
61
|
+
color: import_ds_utilities.PropTypes.string.description("Set a custom color.")
|
|
62
|
+
});
|
|
63
|
+
module.exports = __toCommonJS(react_desc_prop_types_exports);
|
|
64
|
+
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/v2/react-desc-prop-types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-utilities';\n\nexport const defaultProps: DSSeparatorV2T.DefaultProps = {\n isVertical: false,\n isDashed: false,\n type: 'primary',\n};\n\nexport const propTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n isVertical: PropTypes.bool.description('Set vertical orientation.').defaultValue(false),\n isDashed: PropTypes.bool.description('Set dashed style.').defaultValue(false),\n type: PropTypes.oneOf(['primary', 'secondary'])\n .description('Set primary or secondary color types. Using color property will override this one.')\n .defaultValue('primary'),\n color: PropTypes.string.description('Set a custom color.'),\n};\n\nexport declare namespace DSSeparatorV2T {\n export interface DefaultProps {\n isVertical: boolean;\n isDashed: boolean;\n type: 'primary' | 'secondary';\n }\n\n export interface PropsOptional {\n color?: string;\n }\n\n export interface Props extends DefaultProps, PropsOptional {}\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAuE;AAEhE,MAAM,eAA4C;AAAA,EACvD,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,MAAM;AACR;AAEO,MAAM,YAAY,gDACpB,gDACA,uCAFoB;AAAA,EAGvB,YAAY,8BAAU,KAAK,YAAY,2BAA2B,EAAE,aAAa,KAAK;AAAA,EACtF,UAAU,8BAAU,KAAK,YAAY,mBAAmB,EAAE,aAAa,KAAK;AAAA,EAC5E,MAAM,8BAAU,MAAM,CAAC,WAAW,WAAW,CAAC,EAC3C,YAAY,oFAAoF,EAChG,aAAa,SAAS;AAAA,EACzB,OAAO,8BAAU,OAAO,YAAY,qBAAqB;AAC3D;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var styles_exports = {};
|
|
29
|
+
__export(styles_exports, {
|
|
30
|
+
StyledSeparator: () => StyledSeparator
|
|
31
|
+
});
|
|
32
|
+
var React = __toESM(require("react"));
|
|
33
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
34
|
+
var import_styled_components = require("@xstyled/styled-components");
|
|
35
|
+
const defaultColorTypes = {
|
|
36
|
+
primary: "black",
|
|
37
|
+
secondary: "gray"
|
|
38
|
+
};
|
|
39
|
+
const directionStyles = import_ds_system.css`
|
|
40
|
+
${({ isVertical }) => isVertical ? `height: 100%; width: 1px;` : `height: 1px; width: 100%;`}
|
|
41
|
+
`;
|
|
42
|
+
const dashedBorder = import_ds_system.css`
|
|
43
|
+
background-image: linear-gradient(
|
|
44
|
+
to ${({ isVertical }) => !isVertical ? "right" : "bottom"},
|
|
45
|
+
${({ color, colorType }) => color || defaultColorTypes[colorType]} 50%,
|
|
46
|
+
rgba(255, 255, 255, 0) 0%
|
|
47
|
+
);
|
|
48
|
+
background-position: bottom;
|
|
49
|
+
background-size: ${({ isVertical }) => isVertical ? "1px 5px" : "5px 1px"};
|
|
50
|
+
background-repeat: ${({ isVertical }) => isVertical ? "repeat-y" : "repeat-x"};
|
|
51
|
+
`;
|
|
52
|
+
const solidBorder = import_ds_system.css`
|
|
53
|
+
background: ${({ color, colorType }) => color || defaultColorTypes[colorType]};
|
|
54
|
+
`;
|
|
55
|
+
const StyledSeparator = (0, import_ds_system.styled)("div", { name: "DS-Separator", slot: "root" })`
|
|
56
|
+
${directionStyles}
|
|
57
|
+
${({ isDashed }) => isDashed ? dashedBorder : solidBorder}
|
|
58
|
+
${import_styled_components.sizing}
|
|
59
|
+
${import_styled_components.space}
|
|
60
|
+
${import_styled_components.layout}
|
|
61
|
+
`;
|
|
62
|
+
module.exports = __toCommonJS(styles_exports);
|
|
63
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/v2/styles.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { styled, css } from '@elliemae/ds-system';\nimport { space, sizing, layout } from '@xstyled/styled-components';\n\ninterface StyledSeparatorT {\n isVertical: boolean;\n isDashed: boolean;\n color: string;\n colorType: 'primary' | 'secondary';\n}\n\nconst defaultColorTypes = {\n primary: 'black',\n secondary: 'gray',\n};\n\nconst directionStyles = css`\n ${({ isVertical }) => (isVertical ? `height: 100%; width: 1px;` : `height: 1px; width: 100%;`)}\n`;\n\nconst dashedBorder = css`\n background-image: linear-gradient(\n to ${({ isVertical }) => (!isVertical ? 'right' : 'bottom')},\n ${({ color, colorType }) => color || defaultColorTypes[colorType]} 50%,\n rgba(255, 255, 255, 0) 0%\n );\n background-position: bottom;\n background-size: ${({ isVertical }) => (isVertical ? '1px 5px' : '5px 1px')};\n background-repeat: ${({ isVertical }) => (isVertical ? 'repeat-y' : 'repeat-x')};\n`;\n\nconst solidBorder = css`\n background: ${({ color, colorType }) => color || defaultColorTypes[colorType]};\n`;\n\nexport const StyledSeparator = styled('div', { name: 'DS-Separator', slot: 'root' })<StyledSeparatorT>`\n ${directionStyles}\n ${({ isDashed }) => (isDashed ? dashedBorder : solidBorder)}\n ${sizing}\n ${space}\n ${layout}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAA4B;AAC5B,+BAAsC;AAStC,MAAM,oBAAoB;AAAA,EACxB,SAAS;AAAA,EACT,WAAW;AACb;AAEA,MAAM,kBAAkB;AAAA,IACpB,CAAC,EAAE,iBAAkB,aAAa,8BAA8B;AAAA;AAGpE,MAAM,eAAe;AAAA;AAAA,SAEZ,CAAC,EAAE,iBAAkB,CAAC,aAAa,UAAU;AAAA,MAChD,CAAC,EAAE,OAAO,gBAAgB,SAAS,kBAAkB;AAAA;AAAA;AAAA;AAAA,qBAItC,CAAC,EAAE,iBAAkB,aAAa,YAAY;AAAA,uBAC5C,CAAC,EAAE,iBAAkB,aAAa,aAAa;AAAA;AAGtE,MAAM,cAAc;AAAA,gBACJ,CAAC,EAAE,OAAO,gBAAgB,SAAS,kBAAkB;AAAA;AAG9D,MAAM,kBAAkB,6BAAO,OAAO,EAAE,MAAM,gBAAgB,MAAM,OAAO,CAAC;AAAA,IAC/E;AAAA,IACA,CAAC,EAAE,eAAgB,WAAW,eAAe;AAAA,IAC7C;AAAA,IACA;AAAA,IACA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -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 'react-desc';\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;\n\nconst DSSeparatorWithSchema = describe(DSSeparator);\n\nDSSeparatorWithSchema.propTypes = props;\n\nexport { DSSeparator, DSSeparatorWithSchema };\nexport default DSSeparator;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AAEA,MAAM,YAAY;AAElB,MAAM,cAAc;AAAA,EAClB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,MAAM;
|
|
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,GACC,SAAS;AAAA,GACT,cAAc;AAAA,GACd,WAAW;AACd,EACF;AAEA,MAAM,YAAY,kBAAkB,KAAK,EACvC,WACA,MACA,CAAC,EAAE,QAAQ,QAAQ,aAAa,WAAY;AAAA,EAC1C;AAAA,GACC,SAAS;AAAA,GACT,cAAc;AAAA,GACd,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,mDACK,iBADL;AAAA,EAEC;AAAA,EACA,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA;AAAA,IAEA,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;AAExB,MAAM,wBAAwB,SAAS,WAAW;AAElD,sBAAsB,YAAY;AAGlC,IAAO,sBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/index.js
CHANGED
package/dist/esm/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSSeparator';\nexport { default } from './DSSeparator';\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;",
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSSeparator';\nexport * from './v2';\nexport { default } from './DSSeparator';\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
import * as React from "react";
|
|
33
|
+
import React2 from "react";
|
|
34
|
+
import {
|
|
35
|
+
describe,
|
|
36
|
+
useMemoMergePropsWithDefault,
|
|
37
|
+
useGetGlobalAttributes,
|
|
38
|
+
useValidateTypescriptPropTypes,
|
|
39
|
+
useGetXstyledProps
|
|
40
|
+
} from "@elliemae/ds-utilities";
|
|
41
|
+
import { StyledSeparator } from "./styles";
|
|
42
|
+
import { propTypes, defaultProps } from "./react-desc-prop-types";
|
|
43
|
+
import { DSSeparatorV2Datatestid } from "./exported-related/DSSeparatorV2Datatestid";
|
|
44
|
+
const DSSeparatorV2 = (props) => {
|
|
45
|
+
useValidateTypescriptPropTypes(props, propTypes);
|
|
46
|
+
const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
|
|
47
|
+
const _a = propsWithDefault, { type, isDashed, isVertical, color } = _a, rest = __objRest(_a, ["type", "isDashed", "isVertical", "color"]);
|
|
48
|
+
const _b = useGetGlobalAttributes(rest), { role } = _b, globalAttrs = __objRest(_b, ["role"]);
|
|
49
|
+
const xstyledAttrs = useGetXstyledProps(rest);
|
|
50
|
+
return /* @__PURE__ */ React2.createElement(StyledSeparator, __spreadValues(__spreadValues(__spreadProps(__spreadValues({
|
|
51
|
+
colorType: type,
|
|
52
|
+
isDashed,
|
|
53
|
+
isVertical,
|
|
54
|
+
color,
|
|
55
|
+
role
|
|
56
|
+
}, role ? { "aria-orientation": isVertical ? "vertical" : "horizontal" } : void 0), {
|
|
57
|
+
"data-testid": DSSeparatorV2Datatestid.SEPARATOR
|
|
58
|
+
}), globalAttrs), xstyledAttrs));
|
|
59
|
+
};
|
|
60
|
+
const DSSeparatorV2WithSchema = describe(DSSeparatorV2);
|
|
61
|
+
DSSeparatorV2WithSchema.propTypes = propTypes;
|
|
62
|
+
export {
|
|
63
|
+
DSSeparatorV2,
|
|
64
|
+
DSSeparatorV2WithSchema
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=DSSeparatorV2.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v2/DSSeparatorV2.tsx"],
|
|
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 { type, isDashed, isVertical, color, ...rest } = propsWithDefault;\n\n const { role, ...globalAttrs } = useGetGlobalAttributes(rest);\n const xstyledAttrs = useGetXstyledProps(rest);\n\n return (\n <StyledSeparator\n colorType={type}\n isDashed={isDashed}\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\nconst DSSeparatorV2WithSchema = describe(DSSeparatorV2);\nDSSeparatorV2WithSchema.propTypes = propTypes as WeakValidationMap<unknown>;\n\nexport { DSSeparatorV2, DSSeparatorV2WithSchema };\n"],
|
|
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,QAAuD,uBAA/C,QAAM,UAAU,YAAY,UAAmB,IAAT,iBAAS,IAAT,CAAtC,QAAM,YAAU,cAAY;AAEpC,QAAiC,4BAAuB,IAAI,GAApD,WAAyB,IAAhB,wBAAgB,IAAhB,CAAT;AACR,QAAM,eAAe,mBAAmB,IAAI;AAE5C,SACE,qCAAC;AAAA,IACC,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,KACK,OAAO,EAAE,oBAAoB,aAAa,aAAa,aAAa,IAAI,SAN9E;AAAA,IAOC,eAAa,wBAAwB;AAAA,MACjC,cACA,aACN;AAEJ;AAEA,MAAM,0BAA0B,SAAS,aAAa;AACtD,wBAAwB,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/v2/exported-related/DSSeparatorV2Datatestid.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const DSSeparatorV2Datatestid = {\n SEPARATOR: 'ds-separator-v2',\n};\n"],
|
|
5
|
+
"mappings": "AAAA;ACAO,MAAM,0BAA0B;AAAA,EACrC,WAAW;AACb;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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';\nexport * from './exported-related/DSSeparatorV2Datatestid';\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import * as React from "react";
|
|
21
|
+
import { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from "@elliemae/ds-utilities";
|
|
22
|
+
const defaultProps = {
|
|
23
|
+
isVertical: false,
|
|
24
|
+
isDashed: false,
|
|
25
|
+
type: "primary"
|
|
26
|
+
};
|
|
27
|
+
const propTypes = __spreadProps(__spreadValues(__spreadValues({}, globalAttributesPropTypes), xstyledPropTypes), {
|
|
28
|
+
isVertical: PropTypes.bool.description("Set vertical orientation.").defaultValue(false),
|
|
29
|
+
isDashed: PropTypes.bool.description("Set dashed style.").defaultValue(false),
|
|
30
|
+
type: PropTypes.oneOf(["primary", "secondary"]).description("Set primary or secondary color types. Using color property will override this one.").defaultValue("primary"),
|
|
31
|
+
color: PropTypes.string.description("Set a custom color.")
|
|
32
|
+
});
|
|
33
|
+
export {
|
|
34
|
+
defaultProps,
|
|
35
|
+
propTypes
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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 { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-utilities';\n\nexport const defaultProps: DSSeparatorV2T.DefaultProps = {\n isVertical: false,\n isDashed: false,\n type: 'primary',\n};\n\nexport const propTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n isVertical: PropTypes.bool.description('Set vertical orientation.').defaultValue(false),\n isDashed: PropTypes.bool.description('Set dashed style.').defaultValue(false),\n type: PropTypes.oneOf(['primary', 'secondary'])\n .description('Set primary or secondary color types. Using color property will override this one.')\n .defaultValue('primary'),\n color: PropTypes.string.description('Set a custom color.'),\n};\n\nexport declare namespace DSSeparatorV2T {\n export interface DefaultProps {\n isVertical: boolean;\n isDashed: boolean;\n type: 'primary' | 'secondary';\n }\n\n export interface PropsOptional {\n color?: string;\n }\n\n export interface Props extends DefaultProps, PropsOptional {}\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACAA;AAEO,MAAM,eAA4C;AAAA,EACvD,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,MAAM;AACR;AAEO,MAAM,YAAY,gDACpB,4BACA,mBAFoB;AAAA,EAGvB,YAAY,UAAU,KAAK,YAAY,2BAA2B,EAAE,aAAa,KAAK;AAAA,EACtF,UAAU,UAAU,KAAK,YAAY,mBAAmB,EAAE,aAAa,KAAK;AAAA,EAC5E,MAAM,UAAU,MAAM,CAAC,WAAW,WAAW,CAAC,EAC3C,YAAY,oFAAoF,EAChG,aAAa,SAAS;AAAA,EACzB,OAAO,UAAU,OAAO,YAAY,qBAAqB;AAC3D;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { styled, css } from "@elliemae/ds-system";
|
|
3
|
+
import { space, sizing, layout } from "@xstyled/styled-components";
|
|
4
|
+
const defaultColorTypes = {
|
|
5
|
+
primary: "black",
|
|
6
|
+
secondary: "gray"
|
|
7
|
+
};
|
|
8
|
+
const directionStyles = css`
|
|
9
|
+
${({ isVertical }) => isVertical ? `height: 100%; width: 1px;` : `height: 1px; width: 100%;`}
|
|
10
|
+
`;
|
|
11
|
+
const dashedBorder = css`
|
|
12
|
+
background-image: linear-gradient(
|
|
13
|
+
to ${({ isVertical }) => !isVertical ? "right" : "bottom"},
|
|
14
|
+
${({ color, colorType }) => color || defaultColorTypes[colorType]} 50%,
|
|
15
|
+
rgba(255, 255, 255, 0) 0%
|
|
16
|
+
);
|
|
17
|
+
background-position: bottom;
|
|
18
|
+
background-size: ${({ isVertical }) => isVertical ? "1px 5px" : "5px 1px"};
|
|
19
|
+
background-repeat: ${({ isVertical }) => isVertical ? "repeat-y" : "repeat-x"};
|
|
20
|
+
`;
|
|
21
|
+
const solidBorder = css`
|
|
22
|
+
background: ${({ color, colorType }) => color || defaultColorTypes[colorType]};
|
|
23
|
+
`;
|
|
24
|
+
const StyledSeparator = styled("div", { name: "DS-Separator", slot: "root" })`
|
|
25
|
+
${directionStyles}
|
|
26
|
+
${({ isDashed }) => isDashed ? dashedBorder : solidBorder}
|
|
27
|
+
${sizing}
|
|
28
|
+
${space}
|
|
29
|
+
${layout}
|
|
30
|
+
`;
|
|
31
|
+
export {
|
|
32
|
+
StyledSeparator
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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 } from '@elliemae/ds-system';\nimport { space, sizing, layout } from '@xstyled/styled-components';\n\ninterface StyledSeparatorT {\n isVertical: boolean;\n isDashed: boolean;\n color: string;\n colorType: 'primary' | 'secondary';\n}\n\nconst defaultColorTypes = {\n primary: 'black',\n secondary: 'gray',\n};\n\nconst directionStyles = css`\n ${({ isVertical }) => (isVertical ? `height: 100%; width: 1px;` : `height: 1px; width: 100%;`)}\n`;\n\nconst dashedBorder = css`\n background-image: linear-gradient(\n to ${({ isVertical }) => (!isVertical ? 'right' : 'bottom')},\n ${({ color, colorType }) => color || defaultColorTypes[colorType]} 50%,\n rgba(255, 255, 255, 0) 0%\n );\n background-position: bottom;\n background-size: ${({ isVertical }) => (isVertical ? '1px 5px' : '5px 1px')};\n background-repeat: ${({ isVertical }) => (isVertical ? 'repeat-y' : 'repeat-x')};\n`;\n\nconst solidBorder = css`\n background: ${({ color, colorType }) => color || defaultColorTypes[colorType]};\n`;\n\nexport const StyledSeparator = styled('div', { name: 'DS-Separator', slot: 'root' })<StyledSeparatorT>`\n ${directionStyles}\n ${({ isDashed }) => (isDashed ? dashedBorder : solidBorder)}\n ${sizing}\n ${space}\n ${layout}\n`;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AASA,MAAM,oBAAoB;AAAA,EACxB,SAAS;AAAA,EACT,WAAW;AACb;AAEA,MAAM,kBAAkB;AAAA,IACpB,CAAC,EAAE,iBAAkB,aAAa,8BAA8B;AAAA;AAGpE,MAAM,eAAe;AAAA;AAAA,SAEZ,CAAC,EAAE,iBAAkB,CAAC,aAAa,UAAU;AAAA,MAChD,CAAC,EAAE,OAAO,gBAAgB,SAAS,kBAAkB;AAAA;AAAA;AAAA;AAAA,qBAItC,CAAC,EAAE,iBAAkB,aAAa,YAAY;AAAA,uBAC5C,CAAC,EAAE,iBAAkB,aAAa,aAAa;AAAA;AAGtE,MAAM,cAAc;AAAA,gBACJ,CAAC,EAAE,OAAO,gBAAgB,SAAS,kBAAkB;AAAA;AAG9D,MAAM,kBAAkB,OAAO,OAAO,EAAE,MAAM,gBAAgB,MAAM,OAAO,CAAC;AAAA,IAC/E;AAAA,IACA,CAAC,EAAE,eAAgB,WAAW,eAAe;AAAA,IAC7C;AAAA,IACA;AAAA,IACA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-separator",
|
|
3
|
-
"version": "3.0.0-next.
|
|
3
|
+
"version": "3.0.0-next.40",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Separator",
|
|
6
6
|
"files": [
|
|
@@ -39,7 +39,10 @@
|
|
|
39
39
|
"indent": 4
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@elliemae/ds-classnames": "3.0.0-next.
|
|
42
|
+
"@elliemae/ds-classnames": "3.0.0-next.29",
|
|
43
|
+
"@elliemae/ds-system": "3.0.0-next.29",
|
|
44
|
+
"@elliemae/ds-utilities": "3.0.0-next.40",
|
|
45
|
+
"@xstyled/styled-components": "~3.1.2",
|
|
43
46
|
"react-desc": "~4.1.3"
|
|
44
47
|
},
|
|
45
48
|
"peerDependencies": {
|