@elliemae/ds-separator 2.3.1 → 3.0.0-alpha.3

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.
@@ -0,0 +1,129 @@
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 DSSeparator_exports = {};
46
+ __export(DSSeparator_exports, {
47
+ DSSeparator: () => DSSeparator,
48
+ DSSeparatorWithSchema: () => DSSeparatorWithSchema,
49
+ default: () => DSSeparator_default
50
+ });
51
+ var React = __toESM(require("react"));
52
+ var import_react = __toESM(require("react"));
53
+ var import_react_desc = require("react-desc");
54
+ var import_ds_classnames = require("@elliemae/ds-classnames");
55
+ const blockName = "separator";
56
+ const MARGIN_SIZE = {
57
+ S: "s",
58
+ M: "m",
59
+ L: "l",
60
+ none: "none"
61
+ };
62
+ const POSITION = {
63
+ INITIAL: "initial",
64
+ CENTER: "center",
65
+ END: "end"
66
+ };
67
+ const SeparatorWrapper = (0, import_ds_classnames.aggregatedClasses)("div")("separator-wrapper", null, ({ margin, orientation, dashed, position }) => ({
68
+ dashed,
69
+ [margin]: margin,
70
+ [orientation]: orientation,
71
+ [position]: position
72
+ }));
73
+ const Separator = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, null, ({ dashed, margin, orientation, type }) => ({
74
+ dashed,
75
+ [margin]: margin,
76
+ [orientation]: orientation,
77
+ [type]: type
78
+ }));
79
+ const types = ["category-level", "group-level", "non-form"];
80
+ const DSSeparator = ({
81
+ containerProps,
82
+ dashed,
83
+ margin,
84
+ orientation,
85
+ type,
86
+ position,
87
+ className,
88
+ style
89
+ }) => /* @__PURE__ */ import_react.default.createElement(SeparatorWrapper, __spreadProps(__spreadValues({}, containerProps), {
90
+ className,
91
+ classProps: {
92
+ margin,
93
+ orientation,
94
+ dashed,
95
+ position
96
+ },
97
+ style
98
+ }), /* @__PURE__ */ import_react.default.createElement(Separator, {
99
+ classProps: {
100
+ dashed,
101
+ margin,
102
+ orientation,
103
+ type
104
+ }
105
+ }));
106
+ DSSeparator.defaultProps = {
107
+ containerProps: {},
108
+ dashed: false,
109
+ margin: MARGIN_SIZE.S,
110
+ orientation: "horizontal",
111
+ type: "category-level",
112
+ position: POSITION.INITIAL
113
+ };
114
+ const props = {
115
+ className: import_react_desc.PropTypes.string.description("class for separator"),
116
+ style: import_react_desc.PropTypes.object.description("style object for separator"),
117
+ containerProps: import_react_desc.PropTypes.object.description("Injected props to wrapper element of component"),
118
+ dashed: import_react_desc.PropTypes.bool.description("If the separator has to be dashed or solid"),
119
+ margin: import_react_desc.PropTypes.oneOf(["s", "m", "l", "none"]).description("Amount of margin to be added to the separator"),
120
+ orientation: import_react_desc.PropTypes.string.description("Orientation 'horizontal' or 'vertical'"),
121
+ type: import_react_desc.PropTypes.oneOf(types).description("['category-level', 'group-level', 'non-form']"),
122
+ position: import_react_desc.PropTypes.oneOf(["initial", "center", "end"]).description("['initial', 'center', 'end']")
123
+ };
124
+ DSSeparator.propTypes = props;
125
+ const DSSeparatorWithSchema = (0, import_react_desc.describe)(DSSeparator);
126
+ DSSeparatorWithSchema.propTypes = props;
127
+ var DSSeparator_default = DSSeparator;
128
+ module.exports = __toCommonJS(DSSeparator_exports);
129
+ //# sourceMappingURL=DSSeparator.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/DSSeparator.tsx", "../../../../scripts/build/transpile/react-shim.js"],
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;AAAA;AAGR,MAAM,WAAW;AAAA,EACf,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,KAAK;AAAA;AAGP,MAAM,mBAAmB,4CAAkB,OACzC,qBACA,MACA,CAAC,EAAE,QAAQ,aAAa,QAAQ,eAAgB;AAAA,EAC9C;AAAA,GACC,SAAS;AAAA,GACT,cAAc;AAAA,GACd,WAAW;AAAA;AAIhB,MAAM,YAAY,4CAAkB,OAClC,WACA,MACA,CAAC,EAAE,QAAQ,QAAQ,aAAa,WAAY;AAAA,EAC1C;AAAA,GACC,SAAS;AAAA,GACT,cAAc;AAAA,GACd,OAAO;AAAA;AAIZ,MAAM,QAAQ,CAAC,kBAAkB,eAAe;AAEhD,MAAM,cAAc,CAAC;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MAEA,mDAAC,kBAAD,iCACM,iBADN;AAAA,EAEE;AAAA,EACA,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,EAEF;AAAA,IAEA,mDAAC,WAAD;AAAA,EACE,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA;AAMR,YAAY,eAAe;AAAA,EACzB,gBAAgB;AAAA,EAChB,QAAQ;AAAA,EACR,QAAQ,YAAY;AAAA,EACpB,aAAa;AAAA,EACb,MAAM;AAAA,EACN,UAAU,SAAS;AAAA;AAGrB,MAAM,QAAQ;AAAA,EAEZ,WAAW,4BAAU,OAAO,YAAY;AAAA,EAExC,OAAO,4BAAU,OAAO,YAAY;AAAA,EAEpC,gBAAgB,4BAAU,OAAO,YAC/B;AAAA,EAKF,QAAQ,4BAAU,KAAK,YACrB;AAAA,EAKF,QAAQ,4BAAU,MAAM,CAAC,KAAK,KAAK,KAAK,SAAS,YAC/C;AAAA,EAKF,aAAa,4BAAU,OAAO,YAC5B;AAAA,EAKF,MAAM,4BAAU,MAAM,OAAO,YAC3B;AAAA,EAKF,UAAU,4BAAU,MAAM,CAAC,WAAW,UAAU,QAAQ,YACtD;AAAA;AAIJ,YAAY,YAAY;AAExB,MAAM,wBAAwB,gCAAS;AAEvC,sBAAsB,YAAY;AAGlC,IAAO,sBAAQ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,36 @@
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 src_exports = {};
29
+ __export(src_exports, {
30
+ default: () => import_DSSeparator.default
31
+ });
32
+ var React = __toESM(require("react"));
33
+ __reExport(src_exports, require("./DSSeparator"));
34
+ var import_DSSeparator = __toESM(require("./DSSeparator"));
35
+ module.exports = __toCommonJS(src_exports);
36
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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;",
6
+ "names": []
7
+ }
@@ -0,0 +1,102 @@
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 React2 from "react";
22
+ import { PropTypes, describe } from "react-desc";
23
+ import { aggregatedClasses } from "@elliemae/ds-classnames";
24
+ const blockName = "separator";
25
+ const MARGIN_SIZE = {
26
+ S: "s",
27
+ M: "m",
28
+ L: "l",
29
+ none: "none"
30
+ };
31
+ const POSITION = {
32
+ INITIAL: "initial",
33
+ CENTER: "center",
34
+ END: "end"
35
+ };
36
+ const SeparatorWrapper = aggregatedClasses("div")("separator-wrapper", null, ({ margin, orientation, dashed, position }) => ({
37
+ dashed,
38
+ [margin]: margin,
39
+ [orientation]: orientation,
40
+ [position]: position
41
+ }));
42
+ const Separator = aggregatedClasses("div")(blockName, null, ({ dashed, margin, orientation, type }) => ({
43
+ dashed,
44
+ [margin]: margin,
45
+ [orientation]: orientation,
46
+ [type]: type
47
+ }));
48
+ const types = ["category-level", "group-level", "non-form"];
49
+ const DSSeparator = ({
50
+ containerProps,
51
+ dashed,
52
+ margin,
53
+ orientation,
54
+ type,
55
+ position,
56
+ className,
57
+ style
58
+ }) => /* @__PURE__ */ React2.createElement(SeparatorWrapper, __spreadProps(__spreadValues({}, containerProps), {
59
+ className,
60
+ classProps: {
61
+ margin,
62
+ orientation,
63
+ dashed,
64
+ position
65
+ },
66
+ style
67
+ }), /* @__PURE__ */ React2.createElement(Separator, {
68
+ classProps: {
69
+ dashed,
70
+ margin,
71
+ orientation,
72
+ type
73
+ }
74
+ }));
75
+ DSSeparator.defaultProps = {
76
+ containerProps: {},
77
+ dashed: false,
78
+ margin: MARGIN_SIZE.S,
79
+ orientation: "horizontal",
80
+ type: "category-level",
81
+ position: POSITION.INITIAL
82
+ };
83
+ const props = {
84
+ className: PropTypes.string.description("class for separator"),
85
+ style: PropTypes.object.description("style object for separator"),
86
+ containerProps: PropTypes.object.description("Injected props to wrapper element of component"),
87
+ dashed: PropTypes.bool.description("If the separator has to be dashed or solid"),
88
+ margin: PropTypes.oneOf(["s", "m", "l", "none"]).description("Amount of margin to be added to the separator"),
89
+ orientation: PropTypes.string.description("Orientation 'horizontal' or 'vertical'"),
90
+ type: PropTypes.oneOf(types).description("['category-level', 'group-level', 'non-form']"),
91
+ position: PropTypes.oneOf(["initial", "center", "end"]).description("['initial', 'center', 'end']")
92
+ };
93
+ DSSeparator.propTypes = props;
94
+ const DSSeparatorWithSchema = describe(DSSeparator);
95
+ DSSeparatorWithSchema.propTypes = props;
96
+ var DSSeparator_default = DSSeparator;
97
+ export {
98
+ DSSeparator,
99
+ DSSeparatorWithSchema,
100
+ DSSeparator_default as default
101
+ };
102
+ //# sourceMappingURL=DSSeparator.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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 '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;AAAA;AAGR,MAAM,WAAW;AAAA,EACf,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,KAAK;AAAA;AAGP,MAAM,mBAAmB,kBAAkB,OACzC,qBACA,MACA,CAAC,EAAE,QAAQ,aAAa,QAAQ,eAAgB;AAAA,EAC9C;AAAA,GACC,SAAS;AAAA,GACT,cAAc;AAAA,GACd,WAAW;AAAA;AAIhB,MAAM,YAAY,kBAAkB,OAClC,WACA,MACA,CAAC,EAAE,QAAQ,QAAQ,aAAa,WAAY;AAAA,EAC1C;AAAA,GACC,SAAS;AAAA,GACT,cAAc;AAAA,GACd,OAAO;AAAA;AAIZ,MAAM,QAAQ,CAAC,kBAAkB,eAAe;AAEhD,MAAM,cAAc,CAAC;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MAEA,qCAAC,kBAAD,iCACM,iBADN;AAAA,EAEE;AAAA,EACA,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,EAEF;AAAA,IAEA,qCAAC,WAAD;AAAA,EACE,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA;AAMR,YAAY,eAAe;AAAA,EACzB,gBAAgB;AAAA,EAChB,QAAQ;AAAA,EACR,QAAQ,YAAY;AAAA,EACpB,aAAa;AAAA,EACb,MAAM;AAAA,EACN,UAAU,SAAS;AAAA;AAGrB,MAAM,QAAQ;AAAA,EAEZ,WAAW,UAAU,OAAO,YAAY;AAAA,EAExC,OAAO,UAAU,OAAO,YAAY;AAAA,EAEpC,gBAAgB,UAAU,OAAO,YAC/B;AAAA,EAKF,QAAQ,UAAU,KAAK,YACrB;AAAA,EAKF,QAAQ,UAAU,MAAM,CAAC,KAAK,KAAK,KAAK,SAAS,YAC/C;AAAA,EAKF,aAAa,UAAU,OAAO,YAC5B;AAAA,EAKF,MAAM,UAAU,MAAM,OAAO,YAC3B;AAAA,EAKF,UAAU,UAAU,MAAM,CAAC,WAAW,UAAU,QAAQ,YACtD;AAAA;AAIJ,YAAY,YAAY;AAExB,MAAM,wBAAwB,SAAS;AAEvC,sBAAsB,YAAY;AAGlC,IAAO,sBAAQ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ export * from "./DSSeparator";
3
+ import { default as default2 } from "./DSSeparator";
4
+ export {
5
+ default2 as default
6
+ };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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;",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -1,19 +1,22 @@
1
1
  {
2
2
  "name": "@elliemae/ds-separator",
3
- "version": "2.3.1",
3
+ "version": "3.0.0-alpha.3",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Separator",
6
- "module": "./esm/index.js",
7
- "main": "./cjs/index.js",
8
- "types": "./types/index.d.ts",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "module": "./dist/esm/index.js",
10
+ "main": "./dist/cjs/index.js",
11
+ "types": "./dist/types/index.d.ts",
9
12
  "exports": {
10
13
  ".": {
11
- "import": "./esm/index.js",
12
- "require": "./cjs/index.js"
14
+ "import": "./dist/esm/index.js",
15
+ "require": "./dist/cjs/index.js"
13
16
  },
14
17
  "./DSSeparator": {
15
- "import": "./esm/DSSeparator.js",
16
- "require": "./cjs/DSSeparator.js"
18
+ "import": "./dist/esm/DSSeparator.js",
19
+ "require": "./dist/cjs/DSSeparator.js"
17
20
  }
18
21
  },
19
22
  "sideEffects": [
@@ -25,18 +28,18 @@
25
28
  "url": "https://git.elliemae.io/platform-ui/dimsum.git"
26
29
  },
27
30
  "engines": {
28
- "npm": ">=7",
29
- "node": ">=14"
31
+ "pnpm": ">=6",
32
+ "node": ">=16"
30
33
  },
31
34
  "author": "ICE MT",
32
- "scripts": {
33
- "dev": "cross-env NODE_ENV=development && node ../../scripts/build/build.js -w",
34
- "prebuild": "exit 0",
35
- "predev": "exit 0",
36
- "build": "node ../../scripts/build/build.js"
35
+ "jestSonar": {
36
+ "sonar56x": true,
37
+ "reportPath": "reports",
38
+ "reportFile": "tests.xml",
39
+ "indent": 4
37
40
  },
38
41
  "dependencies": {
39
- "@elliemae/ds-classnames": "2.3.1",
42
+ "@elliemae/ds-classnames": "3.0.0-alpha.3",
40
43
  "react-desc": "~4.1.3"
41
44
  },
42
45
  "peerDependencies": {
@@ -45,7 +48,13 @@
45
48
  },
46
49
  "publishConfig": {
47
50
  "access": "public",
48
- "directory": "dist",
49
- "generateSubmodules": true
51
+ "typeSafety": false
52
+ },
53
+ "scripts": {
54
+ "dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
55
+ "test": "node ../../scripts/testing/test.mjs",
56
+ "lint": "node ../../scripts/lint.mjs",
57
+ "dts": "node ../../scripts/dts.mjs",
58
+ "build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
50
59
  }
51
60
  }
@@ -1,146 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- require('core-js/modules/esnext.async-iterator.filter.js');
6
- require('core-js/modules/esnext.iterator.constructor.js');
7
- require('core-js/modules/esnext.iterator.filter.js');
8
- require('core-js/modules/esnext.async-iterator.for-each.js');
9
- require('core-js/modules/esnext.iterator.for-each.js');
10
- var _defineProperty = require('@babel/runtime/helpers/defineProperty');
11
- var _jsx = require('@babel/runtime/helpers/jsx');
12
- require('react');
13
- var reactDesc = require('react-desc');
14
- var dsClassnames = require('@elliemae/ds-classnames');
15
- var jsxRuntime = require('react/jsx-runtime');
16
-
17
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
18
-
19
- var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
20
- var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
21
-
22
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
23
-
24
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
25
- const blockName = 'separator';
26
- const MARGIN_SIZE = {
27
- S: 's',
28
- M: 'm',
29
- L: 'l',
30
- none: 'none'
31
- };
32
- const POSITION = {
33
- INITIAL: 'initial',
34
- CENTER: 'center',
35
- END: 'end'
36
- };
37
- const SeparatorWrapper = dsClassnames.aggregatedClasses('div')('separator-wrapper', null, _ref => {
38
- let {
39
- margin,
40
- orientation,
41
- dashed,
42
- position
43
- } = _ref;
44
- return {
45
- dashed,
46
- [margin]: margin,
47
- [orientation]: orientation,
48
- [position]: position
49
- };
50
- });
51
- const Separator = dsClassnames.aggregatedClasses('div')(blockName, null, _ref2 => {
52
- let {
53
- dashed,
54
- margin,
55
- orientation,
56
- type
57
- } = _ref2;
58
- return {
59
- dashed,
60
- [margin]: margin,
61
- [orientation]: orientation,
62
- [type]: type
63
- };
64
- });
65
- const types = ['category-level', 'group-level', 'non-form'];
66
-
67
- const DSSeparator = _ref3 => {
68
- let {
69
- containerProps,
70
- dashed,
71
- margin,
72
- orientation,
73
- type,
74
- position,
75
- className,
76
- style
77
- } = _ref3;
78
- return /*#__PURE__*/jsxRuntime.jsx(SeparatorWrapper, _objectSpread(_objectSpread({}, containerProps), {}, {
79
- className: className,
80
- classProps: {
81
- margin,
82
- orientation,
83
- dashed,
84
- position
85
- },
86
- style: style,
87
- children: /*#__PURE__*/_jsx__default["default"](Separator, {
88
- classProps: {
89
- dashed,
90
- margin,
91
- orientation,
92
- type
93
- }
94
- })
95
- }));
96
- };
97
-
98
- DSSeparator.defaultProps = {
99
- containerProps: {},
100
- dashed: false,
101
- margin: MARGIN_SIZE.S,
102
- orientation: 'horizontal',
103
- type: 'category-level',
104
- position: POSITION.INITIAL
105
- };
106
- const props = {
107
- /** class for separator */
108
- className: reactDesc.PropTypes.string.description('class for separator'),
109
-
110
- /** style object for separator */
111
- style: reactDesc.PropTypes.object.description('style object for separator'),
112
-
113
- /** Injected props to wrapper element of component */
114
- containerProps: reactDesc.PropTypes.object.description('Injected props to wrapper element of component'),
115
-
116
- /**
117
- * If the separator has to be dashed or solid
118
- */
119
- dashed: reactDesc.PropTypes.bool.description('If the separator has to be dashed or solid'),
120
-
121
- /**
122
- * Amount of margin to be added to the separator
123
- */
124
- margin: reactDesc.PropTypes.oneOf(['s', 'm', 'l', 'none']).description('Amount of margin to be added to the separator'),
125
-
126
- /**
127
- * Orientation 'horizontal' or 'vertical'
128
- */
129
- orientation: reactDesc.PropTypes.string.description("Orientation 'horizontal' or 'vertical'"),
130
-
131
- /**
132
- * ['category-level', 'group-level', 'non-form']
133
- */
134
- type: reactDesc.PropTypes.oneOf(types).description("['category-level', 'group-level', 'non-form']"),
135
-
136
- /**
137
- * ['initial', 'center', 'end']
138
- */
139
- position: reactDesc.PropTypes.oneOf(['initial', 'center', 'end']).description("['initial', 'center', 'end']")
140
- };
141
- const DSSeparatorWithSchema = reactDesc.describe(DSSeparator);
142
- DSSeparatorWithSchema.propTypes = props;
143
-
144
- exports.DSSeparator = DSSeparator;
145
- exports.DSSeparatorWithSchema = DSSeparatorWithSchema;
146
- exports["default"] = DSSeparator;
package/cjs/index.js DELETED
@@ -1,11 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var DSSeparator = require('./DSSeparator.js');
6
-
7
-
8
-
9
- exports.DSSeparator = DSSeparator.DSSeparator;
10
- exports.DSSeparatorWithSchema = DSSeparator.DSSeparatorWithSchema;
11
- exports["default"] = DSSeparator.DSSeparator;
@@ -1,135 +0,0 @@
1
- import 'core-js/modules/esnext.async-iterator.filter.js';
2
- import 'core-js/modules/esnext.iterator.constructor.js';
3
- import 'core-js/modules/esnext.iterator.filter.js';
4
- import 'core-js/modules/esnext.async-iterator.for-each.js';
5
- import 'core-js/modules/esnext.iterator.for-each.js';
6
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
7
- import _jsx from '@babel/runtime/helpers/esm/jsx';
8
- import 'react';
9
- import { PropTypes, describe } from 'react-desc';
10
- import { aggregatedClasses } from '@elliemae/ds-classnames';
11
- import { jsx } from 'react/jsx-runtime';
12
-
13
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
14
-
15
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
16
- const blockName = 'separator';
17
- const MARGIN_SIZE = {
18
- S: 's',
19
- M: 'm',
20
- L: 'l',
21
- none: 'none'
22
- };
23
- const POSITION = {
24
- INITIAL: 'initial',
25
- CENTER: 'center',
26
- END: 'end'
27
- };
28
- const SeparatorWrapper = aggregatedClasses('div')('separator-wrapper', null, _ref => {
29
- let {
30
- margin,
31
- orientation,
32
- dashed,
33
- position
34
- } = _ref;
35
- return {
36
- dashed,
37
- [margin]: margin,
38
- [orientation]: orientation,
39
- [position]: position
40
- };
41
- });
42
- const Separator = aggregatedClasses('div')(blockName, null, _ref2 => {
43
- let {
44
- dashed,
45
- margin,
46
- orientation,
47
- type
48
- } = _ref2;
49
- return {
50
- dashed,
51
- [margin]: margin,
52
- [orientation]: orientation,
53
- [type]: type
54
- };
55
- });
56
- const types = ['category-level', 'group-level', 'non-form'];
57
-
58
- const DSSeparator = _ref3 => {
59
- let {
60
- containerProps,
61
- dashed,
62
- margin,
63
- orientation,
64
- type,
65
- position,
66
- className,
67
- style
68
- } = _ref3;
69
- return /*#__PURE__*/jsx(SeparatorWrapper, _objectSpread(_objectSpread({}, containerProps), {}, {
70
- className: className,
71
- classProps: {
72
- margin,
73
- orientation,
74
- dashed,
75
- position
76
- },
77
- style: style,
78
- children: /*#__PURE__*/_jsx(Separator, {
79
- classProps: {
80
- dashed,
81
- margin,
82
- orientation,
83
- type
84
- }
85
- })
86
- }));
87
- };
88
-
89
- DSSeparator.defaultProps = {
90
- containerProps: {},
91
- dashed: false,
92
- margin: MARGIN_SIZE.S,
93
- orientation: 'horizontal',
94
- type: 'category-level',
95
- position: POSITION.INITIAL
96
- };
97
- const props = {
98
- /** class for separator */
99
- className: PropTypes.string.description('class for separator'),
100
-
101
- /** style object for separator */
102
- style: PropTypes.object.description('style object for separator'),
103
-
104
- /** Injected props to wrapper element of component */
105
- containerProps: PropTypes.object.description('Injected props to wrapper element of component'),
106
-
107
- /**
108
- * If the separator has to be dashed or solid
109
- */
110
- dashed: PropTypes.bool.description('If the separator has to be dashed or solid'),
111
-
112
- /**
113
- * Amount of margin to be added to the separator
114
- */
115
- margin: PropTypes.oneOf(['s', 'm', 'l', 'none']).description('Amount of margin to be added to the separator'),
116
-
117
- /**
118
- * Orientation 'horizontal' or 'vertical'
119
- */
120
- orientation: PropTypes.string.description("Orientation 'horizontal' or 'vertical'"),
121
-
122
- /**
123
- * ['category-level', 'group-level', 'non-form']
124
- */
125
- type: PropTypes.oneOf(types).description("['category-level', 'group-level', 'non-form']"),
126
-
127
- /**
128
- * ['initial', 'center', 'end']
129
- */
130
- position: PropTypes.oneOf(['initial', 'center', 'end']).description("['initial', 'center', 'end']")
131
- };
132
- const DSSeparatorWithSchema = describe(DSSeparator);
133
- DSSeparatorWithSchema.propTypes = props;
134
-
135
- export { DSSeparator, DSSeparatorWithSchema, DSSeparator as default };
package/esm/index.js DELETED
@@ -1 +0,0 @@
1
- export { DSSeparator, DSSeparatorWithSchema, DSSeparator as default } from './DSSeparator.js';
@@ -1,97 +0,0 @@
1
- /// <reference path="../../../../shared/typings/react-desc.d.ts" />
2
- /// <reference types="react" />
3
- declare const DSSeparator: {
4
- ({ containerProps, dashed, margin, orientation, type, position, className, style, }: {
5
- containerProps: any;
6
- dashed: any;
7
- margin: any;
8
- orientation: any;
9
- type: any;
10
- position: any;
11
- className: any;
12
- style: any;
13
- }): JSX.Element;
14
- defaultProps: {
15
- containerProps: {};
16
- dashed: boolean;
17
- margin: string;
18
- orientation: string;
19
- type: string;
20
- position: string;
21
- };
22
- propTypes: {
23
- /** class for separator */
24
- className: {
25
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
26
- deprecated: import("react-desc").PropTypesDescValidator;
27
- };
28
- isRequired: import("react-desc").PropTypesDescValue;
29
- };
30
- /** style object for separator */
31
- style: {
32
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
33
- deprecated: import("react-desc").PropTypesDescValidator;
34
- };
35
- isRequired: import("react-desc").PropTypesDescValue;
36
- };
37
- /** Injected props to wrapper element of component */
38
- containerProps: {
39
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
40
- deprecated: import("react-desc").PropTypesDescValidator;
41
- };
42
- isRequired: import("react-desc").PropTypesDescValue;
43
- };
44
- /**
45
- * If the separator has to be dashed or solid
46
- */
47
- dashed: {
48
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
49
- deprecated: import("react-desc").PropTypesDescValidator;
50
- };
51
- isRequired: import("react-desc").PropTypesDescValue;
52
- };
53
- /**
54
- * Amount of margin to be added to the separator
55
- */
56
- margin: {
57
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
58
- deprecated: import("react-desc").PropTypesDescValidator;
59
- };
60
- isRequired: import("react-desc").PropTypesDescValue;
61
- };
62
- /**
63
- * Orientation 'horizontal' or 'vertical'
64
- */
65
- orientation: {
66
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
67
- deprecated: import("react-desc").PropTypesDescValidator;
68
- };
69
- isRequired: import("react-desc").PropTypesDescValue;
70
- };
71
- /**
72
- * ['category-level', 'group-level', 'non-form']
73
- */
74
- type: {
75
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
76
- deprecated: import("react-desc").PropTypesDescValidator;
77
- };
78
- isRequired: import("react-desc").PropTypesDescValue;
79
- };
80
- /**
81
- * ['initial', 'center', 'end']
82
- */
83
- position: {
84
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
85
- deprecated: import("react-desc").PropTypesDescValidator;
86
- };
87
- isRequired: import("react-desc").PropTypesDescValue;
88
- };
89
- };
90
- };
91
- declare const DSSeparatorWithSchema: {
92
- (props?: unknown): JSX.Element;
93
- propTypes: unknown;
94
- toTypescript: () => import("react-desc").TypescriptSchema;
95
- };
96
- export { DSSeparator, DSSeparatorWithSchema };
97
- export default DSSeparator;
package/types/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './DSSeparator';
2
- export { default } from './DSSeparator';