@elliemae/ds-separator 2.0.0-alpha.1 → 2.0.0-alpha.13
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/cjs/DSSeparator.js +60 -46
- package/cjs/index.js +1 -1
- package/esm/DSSeparator.js +58 -44
- package/package.json +3 -3
- package/types/DSSeparator.d.ts +63 -9
- package/cjs/package.json +0 -7
- package/esm/package.json +0 -7
package/cjs/DSSeparator.js
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
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');
|
|
5
10
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
11
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
7
12
|
require('react');
|
|
@@ -16,7 +21,7 @@ var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
|
16
21
|
|
|
17
22
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
18
23
|
|
|
19
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default[
|
|
24
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
20
25
|
const blockName = 'separator';
|
|
21
26
|
const MARGIN_SIZE = {
|
|
22
27
|
S: 's',
|
|
@@ -29,57 +34,66 @@ const POSITION = {
|
|
|
29
34
|
CENTER: 'center',
|
|
30
35
|
END: 'end'
|
|
31
36
|
};
|
|
32
|
-
const SeparatorWrapper = dsClassnames.aggregatedClasses('div')('separator-wrapper', null,
|
|
33
|
-
|
|
34
|
-
orientation,
|
|
35
|
-
dashed,
|
|
36
|
-
position
|
|
37
|
-
}) => ({
|
|
38
|
-
dashed,
|
|
39
|
-
[margin]: margin,
|
|
40
|
-
[orientation]: orientation,
|
|
41
|
-
[position]: position
|
|
42
|
-
}));
|
|
43
|
-
const Separator = dsClassnames.aggregatedClasses('div')(blockName, null, ({
|
|
44
|
-
dashed,
|
|
45
|
-
margin,
|
|
46
|
-
orientation,
|
|
47
|
-
type
|
|
48
|
-
}) => ({
|
|
49
|
-
dashed,
|
|
50
|
-
[margin]: margin,
|
|
51
|
-
[orientation]: orientation,
|
|
52
|
-
[type]: type
|
|
53
|
-
}));
|
|
54
|
-
const types = ['category-level', 'group-level', 'non-form'];
|
|
55
|
-
|
|
56
|
-
const DSSeparator = ({
|
|
57
|
-
containerProps,
|
|
58
|
-
dashed,
|
|
59
|
-
margin,
|
|
60
|
-
orientation,
|
|
61
|
-
type,
|
|
62
|
-
position,
|
|
63
|
-
className,
|
|
64
|
-
style
|
|
65
|
-
}) => /*#__PURE__*/jsxRuntime.jsx(SeparatorWrapper, _objectSpread(_objectSpread({}, containerProps), {}, {
|
|
66
|
-
className: className,
|
|
67
|
-
classProps: {
|
|
37
|
+
const SeparatorWrapper = dsClassnames.aggregatedClasses('div')('separator-wrapper', null, _ref => {
|
|
38
|
+
let {
|
|
68
39
|
margin,
|
|
69
40
|
orientation,
|
|
70
41
|
dashed,
|
|
71
42
|
position
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
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,
|
|
75
80
|
classProps: {
|
|
76
|
-
dashed,
|
|
77
81
|
margin,
|
|
78
82
|
orientation,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
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
|
+
};
|
|
83
97
|
|
|
84
98
|
DSSeparator.defaultProps = {
|
|
85
99
|
containerProps: {},
|
|
@@ -129,4 +143,4 @@ DSSeparatorWithSchema.propTypes = props;
|
|
|
129
143
|
|
|
130
144
|
exports.DSSeparator = DSSeparator;
|
|
131
145
|
exports.DSSeparatorWithSchema = DSSeparatorWithSchema;
|
|
132
|
-
exports[
|
|
146
|
+
exports["default"] = DSSeparator;
|
package/cjs/index.js
CHANGED
package/esm/DSSeparator.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
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';
|
|
1
6
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
7
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
8
|
import 'react';
|
|
@@ -20,57 +25,66 @@ const POSITION = {
|
|
|
20
25
|
CENTER: 'center',
|
|
21
26
|
END: 'end'
|
|
22
27
|
};
|
|
23
|
-
const SeparatorWrapper = aggregatedClasses('div')('separator-wrapper', null,
|
|
24
|
-
|
|
25
|
-
orientation,
|
|
26
|
-
dashed,
|
|
27
|
-
position
|
|
28
|
-
}) => ({
|
|
29
|
-
dashed,
|
|
30
|
-
[margin]: margin,
|
|
31
|
-
[orientation]: orientation,
|
|
32
|
-
[position]: position
|
|
33
|
-
}));
|
|
34
|
-
const Separator = aggregatedClasses('div')(blockName, null, ({
|
|
35
|
-
dashed,
|
|
36
|
-
margin,
|
|
37
|
-
orientation,
|
|
38
|
-
type
|
|
39
|
-
}) => ({
|
|
40
|
-
dashed,
|
|
41
|
-
[margin]: margin,
|
|
42
|
-
[orientation]: orientation,
|
|
43
|
-
[type]: type
|
|
44
|
-
}));
|
|
45
|
-
const types = ['category-level', 'group-level', 'non-form'];
|
|
46
|
-
|
|
47
|
-
const DSSeparator = ({
|
|
48
|
-
containerProps,
|
|
49
|
-
dashed,
|
|
50
|
-
margin,
|
|
51
|
-
orientation,
|
|
52
|
-
type,
|
|
53
|
-
position,
|
|
54
|
-
className,
|
|
55
|
-
style
|
|
56
|
-
}) => /*#__PURE__*/jsx(SeparatorWrapper, _objectSpread(_objectSpread({}, containerProps), {}, {
|
|
57
|
-
className: className,
|
|
58
|
-
classProps: {
|
|
28
|
+
const SeparatorWrapper = aggregatedClasses('div')('separator-wrapper', null, _ref => {
|
|
29
|
+
let {
|
|
59
30
|
margin,
|
|
60
31
|
orientation,
|
|
61
32
|
dashed,
|
|
62
33
|
position
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
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,
|
|
66
71
|
classProps: {
|
|
67
|
-
dashed,
|
|
68
72
|
margin,
|
|
69
73
|
orientation,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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
|
+
};
|
|
74
88
|
|
|
75
89
|
DSSeparator.defaultProps = {
|
|
76
90
|
containerProps: {},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-separator",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.13",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Separator",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"build": "node ../../scripts/build/build.js"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@elliemae/ds-classnames": "2.0.0-alpha.
|
|
40
|
-
"react-desc": "
|
|
39
|
+
"@elliemae/ds-classnames": "2.0.0-alpha.13",
|
|
40
|
+
"react-desc": "~4.1.3"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"react": "^17.0.2",
|
package/types/DSSeparator.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference path="../../../../shared/typings/react-desc.d.ts" />
|
|
1
2
|
/// <reference types="react" />
|
|
2
3
|
declare const DSSeparator: {
|
|
3
4
|
({ containerProps, dashed, margin, orientation, type, position, className, style, }: {
|
|
@@ -20,33 +21,86 @@ declare const DSSeparator: {
|
|
|
20
21
|
};
|
|
21
22
|
propTypes: {
|
|
22
23
|
/** class for separator */
|
|
23
|
-
className:
|
|
24
|
+
className: {
|
|
25
|
+
defaultValue<T = unknown>(arg: T): {
|
|
26
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
27
|
+
};
|
|
28
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
29
|
+
};
|
|
24
30
|
/** style object for separator */
|
|
25
|
-
style:
|
|
31
|
+
style: {
|
|
32
|
+
defaultValue<T = unknown>(arg: T): {
|
|
33
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
34
|
+
};
|
|
35
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
36
|
+
};
|
|
26
37
|
/** Injected props to wrapper element of component */
|
|
27
|
-
containerProps:
|
|
38
|
+
containerProps: {
|
|
39
|
+
defaultValue<T = unknown>(arg: T): {
|
|
40
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
41
|
+
};
|
|
42
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
43
|
+
};
|
|
28
44
|
/**
|
|
29
45
|
* If the separator has to be dashed or solid
|
|
30
46
|
*/
|
|
31
|
-
dashed:
|
|
47
|
+
dashed: {
|
|
48
|
+
defaultValue<T = unknown>(arg: T): {
|
|
49
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
50
|
+
};
|
|
51
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
52
|
+
};
|
|
32
53
|
/**
|
|
33
54
|
* Amount of margin to be added to the separator
|
|
34
55
|
*/
|
|
35
|
-
margin:
|
|
56
|
+
margin: {
|
|
57
|
+
defaultValue<T = unknown>(arg: T): {
|
|
58
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
59
|
+
};
|
|
60
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
61
|
+
};
|
|
36
62
|
/**
|
|
37
63
|
* Orientation 'horizontal' or 'vertical'
|
|
38
64
|
*/
|
|
39
|
-
orientation:
|
|
65
|
+
orientation: {
|
|
66
|
+
defaultValue<T = unknown>(arg: T): {
|
|
67
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
68
|
+
};
|
|
69
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
70
|
+
};
|
|
40
71
|
/**
|
|
41
72
|
* ['category-level', 'group-level', 'non-form']
|
|
42
73
|
*/
|
|
43
|
-
type:
|
|
74
|
+
type: {
|
|
75
|
+
defaultValue<T = unknown>(arg: T): {
|
|
76
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
77
|
+
};
|
|
78
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
79
|
+
};
|
|
44
80
|
/**
|
|
45
81
|
* ['initial', 'center', 'end']
|
|
46
82
|
*/
|
|
47
|
-
position:
|
|
83
|
+
position: {
|
|
84
|
+
defaultValue<T = unknown>(arg: T): {
|
|
85
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
86
|
+
};
|
|
87
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
88
|
+
};
|
|
48
89
|
};
|
|
49
90
|
};
|
|
50
|
-
declare const DSSeparatorWithSchema:
|
|
91
|
+
declare const DSSeparatorWithSchema: {
|
|
92
|
+
(props?: {
|
|
93
|
+
containerProps: any;
|
|
94
|
+
dashed: any;
|
|
95
|
+
margin: any;
|
|
96
|
+
orientation: any;
|
|
97
|
+
type: any;
|
|
98
|
+
position: any;
|
|
99
|
+
className: any;
|
|
100
|
+
style: any;
|
|
101
|
+
} | undefined): JSX.Element;
|
|
102
|
+
propTypes: unknown;
|
|
103
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
104
|
+
};
|
|
51
105
|
export { DSSeparator, DSSeparatorWithSchema };
|
|
52
106
|
export default DSSeparator;
|
package/cjs/package.json
DELETED