@elliemae/ds-button-group 1.57.1 → 2.0.0-alpha.11
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/DSButtonGroup.js +40 -48
- package/cjs/defaultProps.js +1 -2
- package/cjs/index.js +1 -9
- package/esm/DSButtonGroup.js +33 -40
- package/esm/defaultProps.js +1 -2
- package/esm/index.js +0 -8
- package/package.json +35 -10
- package/types/DSButtonGroup.d.ts +47 -0
- package/types/defaultProps.d.ts +5 -0
- package/types/index.d.ts +2 -0
- package/types/tests/DSButtonGroup.events.test.d.ts +1 -0
- package/DSButtonGroup/package.json +0 -10
- package/cjs/DSButtonGroup.js.map +0 -1
- package/cjs/defaultProps.js.map +0 -1
- package/cjs/index.js.map +0 -1
- package/defaultProps/package.json +0 -10
- package/esm/DSButtonGroup.js.map +0 -1
- package/esm/defaultProps.js.map +0 -1
- package/esm/index.js.map +0 -1
package/cjs/DSButtonGroup.js
CHANGED
|
@@ -2,74 +2,68 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _extends = require('@babel/runtime/helpers/extends');
|
|
6
5
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
7
6
|
var React = require('react');
|
|
8
7
|
var reactDesc = require('react-desc');
|
|
9
8
|
var dsClassnames = require('@elliemae/ds-classnames');
|
|
10
9
|
var DSButton = require('@elliemae/ds-button');
|
|
10
|
+
var propTypes = require('@elliemae/ds-shared/prop-types');
|
|
11
11
|
var defaultProps = require('./defaultProps.js');
|
|
12
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
12
13
|
|
|
13
14
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
15
|
|
|
15
|
-
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
|
|
16
16
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
17
17
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
18
18
|
var DSButton__default = /*#__PURE__*/_interopDefaultLegacy(DSButton);
|
|
19
19
|
|
|
20
|
-
/* eslint-disable max-lines */
|
|
21
|
-
const dsBasicSizes = ['s', 'm', 'l'];
|
|
22
|
-
|
|
23
|
-
const orientation = ['horizontal', 'vertical'];
|
|
24
|
-
|
|
25
20
|
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; }
|
|
26
21
|
|
|
27
|
-
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[
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
};
|
|
22
|
+
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; }
|
|
23
|
+
const blockName = 'button-group';
|
|
24
|
+
const GroupContainer = dsClassnames.aggregatedClasses('div')(blockName, null, ({
|
|
25
|
+
vertical,
|
|
26
|
+
horizontal,
|
|
27
|
+
spacing
|
|
28
|
+
}) => ({
|
|
29
|
+
vertical,
|
|
30
|
+
horizontal,
|
|
31
|
+
[spacing]: spacing
|
|
32
|
+
}));
|
|
33
|
+
|
|
34
|
+
const DSButtonGroup = ({
|
|
35
|
+
size,
|
|
36
|
+
buttonType,
|
|
37
|
+
orientation,
|
|
38
|
+
spacing,
|
|
39
|
+
children: buttons,
|
|
40
|
+
containerProps
|
|
41
|
+
}) => /*#__PURE__*/jsxRuntime.jsx(GroupContainer, _objectSpread(_objectSpread({
|
|
42
|
+
classProps: {
|
|
43
|
+
vertical: orientation === 'vertical',
|
|
44
|
+
horizontal: orientation !== 'vertical',
|
|
45
|
+
spacing
|
|
46
|
+
}
|
|
47
|
+
}, containerProps), {}, {
|
|
48
|
+
children: React__default["default"].Children.map(buttons, button => /*#__PURE__*/React__default["default"].cloneElement(button, _objectSpread({
|
|
49
|
+
buttonType,
|
|
50
|
+
size
|
|
51
|
+
}, button.props)), null)
|
|
52
|
+
}));
|
|
59
53
|
|
|
60
54
|
DSButtonGroup.defaultProps = {
|
|
61
55
|
size: 'm',
|
|
62
56
|
buttonType: 'secondary',
|
|
63
57
|
orientation: 'horizontal'
|
|
64
58
|
};
|
|
65
|
-
|
|
59
|
+
const props = {
|
|
66
60
|
/** props injected to wrapper of page header */
|
|
67
61
|
containerProps: reactDesc.PropTypes.shape({}).description('props injected to wrapper of page header'),
|
|
68
62
|
|
|
69
63
|
/**
|
|
70
64
|
* ['s', 'm', 'l']
|
|
71
65
|
*/
|
|
72
|
-
size: reactDesc.PropTypes.oneOf(dsBasicSizes).description("['s', 'm', 'l']"),
|
|
66
|
+
size: reactDesc.PropTypes.oneOf(propTypes.dsBasicSizes).description("['s', 'm', 'l']"),
|
|
73
67
|
|
|
74
68
|
/**
|
|
75
69
|
* ['primary', 'secondary', 'text', 'link']
|
|
@@ -79,24 +73,22 @@ var props = {
|
|
|
79
73
|
/**
|
|
80
74
|
* ['horizontal', 'vertical']
|
|
81
75
|
*/
|
|
82
|
-
orientation: reactDesc.PropTypes.oneOf(orientation).description("['horizontal', 'vertical']"),
|
|
76
|
+
orientation: reactDesc.PropTypes.oneOf(propTypes.orientation).description("['horizontal', 'vertical']"),
|
|
83
77
|
|
|
84
78
|
/**
|
|
85
79
|
* ['s', 'm', 'l']
|
|
86
80
|
*/
|
|
87
|
-
spacing: reactDesc.PropTypes.oneOf(dsBasicSizes).description("['s', 'm', 'l']"),
|
|
81
|
+
spacing: reactDesc.PropTypes.oneOf(propTypes.dsBasicSizes).description("['s', 'm', 'l']"),
|
|
88
82
|
|
|
89
83
|
/**
|
|
90
84
|
* Button group items to show of type DSButton
|
|
91
85
|
*/
|
|
92
|
-
children: reactDesc.PropTypes.arrayOf(DSButton__default[
|
|
86
|
+
children: reactDesc.PropTypes.arrayOf(DSButton__default["default"]).description('Button group items to show of type DSButton')
|
|
93
87
|
};
|
|
94
88
|
DSButtonGroup.defaultProps = defaultProps.defaultProps;
|
|
95
|
-
|
|
96
|
-
var DSButtonGroupWithSchema = reactDesc.describe(DSButtonGroup);
|
|
89
|
+
const DSButtonGroupWithSchema = reactDesc.describe(DSButtonGroup);
|
|
97
90
|
DSButtonGroupWithSchema.propTypes = props;
|
|
98
91
|
|
|
99
92
|
exports.DSButtonGroup = DSButtonGroup;
|
|
100
93
|
exports.DSButtonGroupWithSchema = DSButtonGroupWithSchema;
|
|
101
|
-
exports[
|
|
102
|
-
//# sourceMappingURL=DSButtonGroup.js.map
|
|
94
|
+
exports["default"] = DSButtonGroup;
|
package/cjs/defaultProps.js
CHANGED
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const defaultProps = {
|
|
6
6
|
spacing: null,
|
|
7
7
|
children: [],
|
|
8
8
|
containerProps: {}
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
exports.defaultProps = defaultProps;
|
|
12
|
-
//# sourceMappingURL=defaultProps.js.map
|
package/cjs/index.js
CHANGED
|
@@ -3,17 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var DSButtonGroup = require('./DSButtonGroup.js');
|
|
6
|
-
require('@babel/runtime/helpers/extends');
|
|
7
|
-
require('@babel/runtime/helpers/defineProperty');
|
|
8
|
-
require('react');
|
|
9
|
-
require('react-desc');
|
|
10
|
-
require('@elliemae/ds-classnames');
|
|
11
|
-
require('@elliemae/ds-button');
|
|
12
|
-
require('./defaultProps.js');
|
|
13
6
|
|
|
14
7
|
|
|
15
8
|
|
|
16
9
|
exports.DSButtonGroup = DSButtonGroup.DSButtonGroup;
|
|
17
10
|
exports.DSButtonGroupWithSchema = DSButtonGroup.DSButtonGroupWithSchema;
|
|
18
|
-
exports
|
|
19
|
-
//# sourceMappingURL=index.js.map
|
|
11
|
+
exports["default"] = DSButtonGroup.DSButtonGroup;
|
package/esm/DSButtonGroup.js
CHANGED
|
@@ -1,57 +1,52 @@
|
|
|
1
|
-
import _extends from '@babel/runtime/helpers/esm/extends';
|
|
2
1
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import { PropTypes, describe } from 'react-desc';
|
|
5
4
|
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
6
5
|
import DSButton, { buttonTypes } from '@elliemae/ds-button';
|
|
6
|
+
import { dsBasicSizes, orientation } from '@elliemae/ds-shared/prop-types';
|
|
7
7
|
import { defaultProps } from './defaultProps.js';
|
|
8
|
-
|
|
9
|
-
/* eslint-disable max-lines */
|
|
10
|
-
const dsBasicSizes = ['s', 'm', 'l'];
|
|
11
|
-
|
|
12
|
-
const orientation = ['horizontal', 'vertical'];
|
|
8
|
+
import { jsx } from 'react/jsx-runtime';
|
|
13
9
|
|
|
14
10
|
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; }
|
|
15
11
|
|
|
16
12
|
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(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; }
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
});
|
|
13
|
+
const blockName = 'button-group';
|
|
14
|
+
const GroupContainer = aggregatedClasses('div')(blockName, null, ({
|
|
15
|
+
vertical,
|
|
16
|
+
horizontal,
|
|
17
|
+
spacing
|
|
18
|
+
}) => ({
|
|
19
|
+
vertical,
|
|
20
|
+
horizontal,
|
|
21
|
+
[spacing]: spacing
|
|
22
|
+
}));
|
|
27
23
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
};
|
|
24
|
+
const DSButtonGroup = ({
|
|
25
|
+
size,
|
|
26
|
+
buttonType,
|
|
27
|
+
orientation,
|
|
28
|
+
spacing,
|
|
29
|
+
children: buttons,
|
|
30
|
+
containerProps
|
|
31
|
+
}) => /*#__PURE__*/jsx(GroupContainer, _objectSpread(_objectSpread({
|
|
32
|
+
classProps: {
|
|
33
|
+
vertical: orientation === 'vertical',
|
|
34
|
+
horizontal: orientation !== 'vertical',
|
|
35
|
+
spacing
|
|
36
|
+
}
|
|
37
|
+
}, containerProps), {}, {
|
|
38
|
+
children: React.Children.map(buttons, button => /*#__PURE__*/React.cloneElement(button, _objectSpread({
|
|
39
|
+
buttonType,
|
|
40
|
+
size
|
|
41
|
+
}, button.props)), null)
|
|
42
|
+
}));
|
|
48
43
|
|
|
49
44
|
DSButtonGroup.defaultProps = {
|
|
50
45
|
size: 'm',
|
|
51
46
|
buttonType: 'secondary',
|
|
52
47
|
orientation: 'horizontal'
|
|
53
48
|
};
|
|
54
|
-
|
|
49
|
+
const props = {
|
|
55
50
|
/** props injected to wrapper of page header */
|
|
56
51
|
containerProps: PropTypes.shape({}).description('props injected to wrapper of page header'),
|
|
57
52
|
|
|
@@ -81,9 +76,7 @@ var props = {
|
|
|
81
76
|
children: PropTypes.arrayOf(DSButton).description('Button group items to show of type DSButton')
|
|
82
77
|
};
|
|
83
78
|
DSButtonGroup.defaultProps = defaultProps;
|
|
84
|
-
|
|
85
|
-
var DSButtonGroupWithSchema = describe(DSButtonGroup);
|
|
79
|
+
const DSButtonGroupWithSchema = describe(DSButtonGroup);
|
|
86
80
|
DSButtonGroupWithSchema.propTypes = props;
|
|
87
81
|
|
|
88
82
|
export { DSButtonGroup, DSButtonGroupWithSchema, DSButtonGroup as default };
|
|
89
|
-
//# sourceMappingURL=DSButtonGroup.js.map
|
package/esm/defaultProps.js
CHANGED
package/esm/index.js
CHANGED
|
@@ -1,9 +1 @@
|
|
|
1
1
|
export { DSButtonGroup, DSButtonGroupWithSchema, DSButtonGroup as default } from './DSButtonGroup.js';
|
|
2
|
-
import '@babel/runtime/helpers/esm/extends';
|
|
3
|
-
import '@babel/runtime/helpers/esm/defineProperty';
|
|
4
|
-
import 'react';
|
|
5
|
-
import 'react-desc';
|
|
6
|
-
import '@elliemae/ds-classnames';
|
|
7
|
-
import '@elliemae/ds-button';
|
|
8
|
-
import './defaultProps.js';
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,14 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-button-group",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.11",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"description": "
|
|
6
|
-
"module": "esm/index.js",
|
|
7
|
-
"main": "cjs/index.js",
|
|
5
|
+
"description": "ICE MT - Dimsum - Button Group",
|
|
6
|
+
"module": "./esm/index.js",
|
|
7
|
+
"main": "./cjs/index.js",
|
|
8
|
+
"types": "./types/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./esm/index.js",
|
|
12
|
+
"require": "./cjs/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./DSButtonGroup": {
|
|
15
|
+
"import": "./esm/DSButtonGroup.js",
|
|
16
|
+
"require": "./cjs/DSButtonGroup.js"
|
|
17
|
+
},
|
|
18
|
+
"./defaultProps": {
|
|
19
|
+
"import": "./esm/defaultProps.js",
|
|
20
|
+
"require": "./cjs/defaultProps.js"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
8
23
|
"sideEffects": [
|
|
9
24
|
"*.css",
|
|
10
25
|
"*.scss"
|
|
11
26
|
],
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "https://git.elliemae.io/platform-ui/dimsum.git"
|
|
30
|
+
},
|
|
31
|
+
"engines": {
|
|
32
|
+
"npm": ">=7",
|
|
33
|
+
"node": ">=14"
|
|
34
|
+
},
|
|
35
|
+
"author": "ICE MT",
|
|
12
36
|
"scripts": {
|
|
13
37
|
"dev": "cross-env NODE_ENV=development && node ../../scripts/build/build.js -w",
|
|
14
38
|
"prebuild": "exit 0",
|
|
@@ -16,16 +40,17 @@
|
|
|
16
40
|
"build": "node ../../scripts/build/build.js"
|
|
17
41
|
},
|
|
18
42
|
"dependencies": {
|
|
19
|
-
"@elliemae/ds-button": "
|
|
20
|
-
"@elliemae/ds-classnames": "
|
|
21
|
-
"react-desc": "^4.1.
|
|
43
|
+
"@elliemae/ds-button": "2.0.0-alpha.11",
|
|
44
|
+
"@elliemae/ds-classnames": "2.0.0-alpha.11",
|
|
45
|
+
"react-desc": "^4.1.3"
|
|
22
46
|
},
|
|
23
47
|
"peerDependencies": {
|
|
24
|
-
"react": "^17.0.
|
|
25
|
-
"react-dom": "^17.0.
|
|
48
|
+
"react": "^17.0.2",
|
|
49
|
+
"react-dom": "^17.0.2"
|
|
26
50
|
},
|
|
27
51
|
"publishConfig": {
|
|
28
52
|
"access": "public",
|
|
29
|
-
"directory": "dist"
|
|
53
|
+
"directory": "dist",
|
|
54
|
+
"generateSubmodules": true
|
|
30
55
|
}
|
|
31
56
|
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const DSButtonGroup: {
|
|
3
|
+
({ size, buttonType, orientation, spacing, children: buttons, containerProps, }: {
|
|
4
|
+
size: any;
|
|
5
|
+
buttonType: any;
|
|
6
|
+
orientation: any;
|
|
7
|
+
spacing: any;
|
|
8
|
+
children: any;
|
|
9
|
+
containerProps: any;
|
|
10
|
+
}): JSX.Element;
|
|
11
|
+
defaultProps: {
|
|
12
|
+
spacing: null;
|
|
13
|
+
children: never[];
|
|
14
|
+
containerProps: {};
|
|
15
|
+
} | {
|
|
16
|
+
size: string;
|
|
17
|
+
buttonType: string;
|
|
18
|
+
orientation: string;
|
|
19
|
+
};
|
|
20
|
+
propTypes: {
|
|
21
|
+
/** props injected to wrapper of page header */
|
|
22
|
+
containerProps: any;
|
|
23
|
+
/**
|
|
24
|
+
* ['s', 'm', 'l']
|
|
25
|
+
*/
|
|
26
|
+
size: any;
|
|
27
|
+
/**
|
|
28
|
+
* ['primary', 'secondary', 'text', 'link']
|
|
29
|
+
*/
|
|
30
|
+
buttonType: any;
|
|
31
|
+
/**
|
|
32
|
+
* ['horizontal', 'vertical']
|
|
33
|
+
*/
|
|
34
|
+
orientation: any;
|
|
35
|
+
/**
|
|
36
|
+
* ['s', 'm', 'l']
|
|
37
|
+
*/
|
|
38
|
+
spacing: any;
|
|
39
|
+
/**
|
|
40
|
+
* Button group items to show of type DSButton
|
|
41
|
+
*/
|
|
42
|
+
children: any;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
declare const DSButtonGroupWithSchema: any;
|
|
46
|
+
export { DSButtonGroup, DSButtonGroupWithSchema };
|
|
47
|
+
export default DSButtonGroup;
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/cjs/DSButtonGroup.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DSButtonGroup.js","sources":["../../../../shared-configs/prop-types.js","../../src/DSButtonGroup.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nexport const dsBasicSizes = ['s', 'm', 'l'];\n\nexport const sizes = ['xsmall', 'small', 'medium', 'large', 'xlarge'];\n\nexport const iconSizes = ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'];\n\nexport const iconColors = [\n ['neutral', '900'],\n ['neutral', '0'],\n ['danger', '900'],\n ['warning', '500'],\n ['success', '900'],\n ['brand-primary', '600'],\n];\n\nexport const CHECKBOX_VARIANT = {\n DEFAULT: 'variant-default',\n FOCUS: 'variant-focus',\n ACTIVE: 'variant-active',\n DISABLED: 'variant-disabled',\n ERROR: 'variant-error',\n};\nexport const checkboxVariants = [\n CHECKBOX_VARIANT.DEFAULT,\n CHECKBOX_VARIANT.FOCUS,\n CHECKBOX_VARIANT.ACTIVE,\n CHECKBOX_VARIANT.DISABLED,\n CHECKBOX_VARIANT.ERROR,\n];\n\nexport const COMBOBOX_VARIANT = {\n DEFAULT: 'variant-default',\n FOCUS: 'variant-focus-input',\n FOCUS_ICON: 'variant-focus-icon',\n ACTIVE: 'variant-active-input',\n ACTIVE_ICON: 'variant-active-icon',\n DISABLED: 'variant-disabled',\n ERROR: 'variant-error',\n};\n\nexport const comboBoxVariants = [\n COMBOBOX_VARIANT.DEFAULT,\n COMBOBOX_VARIANT.FOCUS,\n COMBOBOX_VARIANT.FOCUS_ICON,\n COMBOBOX_VARIANT.ACTIVE,\n COMBOBOX_VARIANT.ACTIVE_ICON,\n COMBOBOX_VARIANT.DISABLED,\n COMBOBOX_VARIANT.ERROR,\n];\n\nexport const sizeVariants = {\n S: 's',\n M: 'm',\n L: 'l',\n};\n\nexport const position = {\n LEFT: 'left',\n RIGHT: 'right',\n CENTER: 'center',\n};\n\nexport const fontColor = {\n NEUTRAL500: 'neutral500',\n NEUTRAL700: 'neutral700',\n};\n\nexport const orientation = ['horizontal', 'vertical'];\n\nexport const orientationVariants = {\n HORIZONTAL: 'horizontal',\n VERTICAL: 'vertical',\n};\n","import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport DSButton, { buttonTypes } from '@elliemae/ds-button';\nimport {\n dsBasicSizes,\n orientation as buttonGroupOrientation,\n} from '../../../shared-configs/prop-types';\nimport { defaultProps } from './defaultProps';\n\nconst blockName = 'button-group';\n\nconst GroupContainer = aggregatedClasses('div')(\n blockName,\n null,\n ({ vertical, horizontal, spacing }) => ({\n vertical,\n horizontal,\n [spacing]: spacing,\n }),\n);\n\nconst DSButtonGroup = ({\n size,\n buttonType,\n orientation,\n spacing,\n children: buttons,\n containerProps,\n}) => (\n <GroupContainer\n classProps={{\n vertical: orientation === 'vertical',\n horizontal: orientation !== 'vertical',\n spacing,\n }}\n {...containerProps}\n >\n {React.Children.map(\n buttons,\n (button) =>\n React.cloneElement(button, {\n buttonType,\n size,\n // Keeping it this way to allow individual Buttons to override group props\n // [buttonType | size]\n ...button.props,\n }),\n null,\n )}\n </GroupContainer>\n);\n\nDSButtonGroup.defaultProps = {\n size: 'm',\n buttonType: 'secondary',\n orientation: 'horizontal',\n};\n\nconst props = {\n /** props injected to wrapper of page header */\n containerProps: PropTypes.shape({}).description(\n 'props injected to wrapper of page header',\n ),\n /**\n * ['s', 'm', 'l']\n */\n size: PropTypes.oneOf(dsBasicSizes).description(\"['s', 'm', 'l']\"),\n /**\n * ['primary', 'secondary', 'text', 'link']\n */\n buttonType: PropTypes.oneOf(buttonTypes).description(\n \"['primary', 'secondary', 'text', 'link']\",\n ),\n /**\n * ['horizontal', 'vertical']\n */\n orientation: PropTypes.oneOf(buttonGroupOrientation).description(\n \"['horizontal', 'vertical']\",\n ),\n /**\n * ['s', 'm', 'l']\n */\n spacing: PropTypes.oneOf(dsBasicSizes).description(\"['s', 'm', 'l']\"),\n /**\n * Button group items to show of type DSButton\n */\n children: PropTypes.arrayOf(DSButton).description(\n 'Button group items to show of type DSButton',\n ),\n};\n\nDSButtonGroup.defaultProps = defaultProps;\n\nDSButtonGroup.propTypes = props;\n\nconst DSButtonGroupWithSchema = describe(DSButtonGroup);\n\nDSButtonGroupWithSchema.propTypes = props;\n\nexport { DSButtonGroup, DSButtonGroupWithSchema };\nexport default DSButtonGroup;\n"],"names":["blockName","GroupContainer","aggregatedClasses","vertical","horizontal","spacing","DSButtonGroup","size","buttonType","orientation","buttons","children","containerProps","React","Children","map","button","cloneElement","props","defaultProps","PropTypes","shape","description","oneOf","dsBasicSizes","buttonTypes","buttonGroupOrientation","arrayOf","DSButton","propTypes","DSButtonGroupWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AACO,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAkE5C;AACO,MAAM,WAAW,GAAG,CAAC,YAAY,EAAE,UAAU,CAAC;;;;;AC1DrD,IAAMA,SAAS,GAAG,cAAlB;AAEA,IAAMC,cAAc,GAAG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,CACd,0CADc,CAFJ;;AAKZ;AACF;AACA;AACEf,EAAAA,IAAI,EAAEa,mBAAS,CAACG,KAAV,CAAgBC,YAAhB,EAA8BF,WAA9B,CAA0C,iBAA1C,CARM;;AASZ;AACF;AACA;AACEd,EAAAA,UAAU,EAAEY,mBAAS,CAACG,KAAV,CAAgBE,oBAAhB,EAA6BH,WAA7B,CACV,0CADU,CAZA;;AAeZ;AACF;AACA;AACEb,EAAAA,WAAW,EAAEW,mBAAS,CAACG,KAAV,CAAgBG,WAAhB,EAAwCJ,WAAxC,CACX,4BADW,CAlBD;;AAqBZ;AACF;AACA;AACEjB,EAAAA,OAAO,EAAEe,mBAAS,CAACG,KAAV,CAAgBC,YAAhB,EAA8BF,WAA9B,CAA0C,iBAA1C,CAxBG;;AAyBZ;AACF;AACA;AACEX,EAAAA,QAAQ,EAAES,mBAAS,CAACO,OAAV,CAAkBC,4BAAlB,EAA4BN,WAA5B,CACR,6CADQ;AA5BE,CAAd;AAiCAhB,aAAa,CAACa,YAAd,GAA6BA,yBAA7B;AAEAb,aAAa,CAACuB,SAAd,GAA0BX,KAA1B;IAEMY,uBAAuB,GAAGC,kBAAQ,CAACzB,aAAD;AAExCwB,uBAAuB,CAACD,SAAxB,GAAoCX,KAApC;;;;;;"}
|
package/cjs/defaultProps.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"defaultProps.js","sources":["../../src/defaultProps.tsx"],"sourcesContent":["export const defaultProps = {\n spacing: null,\n children: [],\n containerProps: {},\n};\n"],"names":["defaultProps","spacing","children","containerProps"],"mappings":";;;;IAAaA,YAAY,GAAG;AAC1BC,EAAAA,OAAO,EAAE,IADiB;AAE1BC,EAAAA,QAAQ,EAAE,EAFgB;AAG1BC,EAAAA,cAAc,EAAE;AAHU;;;;"}
|
package/cjs/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
|
package/esm/DSButtonGroup.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DSButtonGroup.js","sources":["../../../../shared-configs/prop-types.js","../../src/DSButtonGroup.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nexport const dsBasicSizes = ['s', 'm', 'l'];\n\nexport const sizes = ['xsmall', 'small', 'medium', 'large', 'xlarge'];\n\nexport const iconSizes = ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'];\n\nexport const iconColors = [\n ['neutral', '900'],\n ['neutral', '0'],\n ['danger', '900'],\n ['warning', '500'],\n ['success', '900'],\n ['brand-primary', '600'],\n];\n\nexport const CHECKBOX_VARIANT = {\n DEFAULT: 'variant-default',\n FOCUS: 'variant-focus',\n ACTIVE: 'variant-active',\n DISABLED: 'variant-disabled',\n ERROR: 'variant-error',\n};\nexport const checkboxVariants = [\n CHECKBOX_VARIANT.DEFAULT,\n CHECKBOX_VARIANT.FOCUS,\n CHECKBOX_VARIANT.ACTIVE,\n CHECKBOX_VARIANT.DISABLED,\n CHECKBOX_VARIANT.ERROR,\n];\n\nexport const COMBOBOX_VARIANT = {\n DEFAULT: 'variant-default',\n FOCUS: 'variant-focus-input',\n FOCUS_ICON: 'variant-focus-icon',\n ACTIVE: 'variant-active-input',\n ACTIVE_ICON: 'variant-active-icon',\n DISABLED: 'variant-disabled',\n ERROR: 'variant-error',\n};\n\nexport const comboBoxVariants = [\n COMBOBOX_VARIANT.DEFAULT,\n COMBOBOX_VARIANT.FOCUS,\n COMBOBOX_VARIANT.FOCUS_ICON,\n COMBOBOX_VARIANT.ACTIVE,\n COMBOBOX_VARIANT.ACTIVE_ICON,\n COMBOBOX_VARIANT.DISABLED,\n COMBOBOX_VARIANT.ERROR,\n];\n\nexport const sizeVariants = {\n S: 's',\n M: 'm',\n L: 'l',\n};\n\nexport const position = {\n LEFT: 'left',\n RIGHT: 'right',\n CENTER: 'center',\n};\n\nexport const fontColor = {\n NEUTRAL500: 'neutral500',\n NEUTRAL700: 'neutral700',\n};\n\nexport const orientation = ['horizontal', 'vertical'];\n\nexport const orientationVariants = {\n HORIZONTAL: 'horizontal',\n VERTICAL: 'vertical',\n};\n","import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport DSButton, { buttonTypes } from '@elliemae/ds-button';\nimport {\n dsBasicSizes,\n orientation as buttonGroupOrientation,\n} from '../../../shared-configs/prop-types';\nimport { defaultProps } from './defaultProps';\n\nconst blockName = 'button-group';\n\nconst GroupContainer = aggregatedClasses('div')(\n blockName,\n null,\n ({ vertical, horizontal, spacing }) => ({\n vertical,\n horizontal,\n [spacing]: spacing,\n }),\n);\n\nconst DSButtonGroup = ({\n size,\n buttonType,\n orientation,\n spacing,\n children: buttons,\n containerProps,\n}) => (\n <GroupContainer\n classProps={{\n vertical: orientation === 'vertical',\n horizontal: orientation !== 'vertical',\n spacing,\n }}\n {...containerProps}\n >\n {React.Children.map(\n buttons,\n (button) =>\n React.cloneElement(button, {\n buttonType,\n size,\n // Keeping it this way to allow individual Buttons to override group props\n // [buttonType | size]\n ...button.props,\n }),\n null,\n )}\n </GroupContainer>\n);\n\nDSButtonGroup.defaultProps = {\n size: 'm',\n buttonType: 'secondary',\n orientation: 'horizontal',\n};\n\nconst props = {\n /** props injected to wrapper of page header */\n containerProps: PropTypes.shape({}).description(\n 'props injected to wrapper of page header',\n ),\n /**\n * ['s', 'm', 'l']\n */\n size: PropTypes.oneOf(dsBasicSizes).description(\"['s', 'm', 'l']\"),\n /**\n * ['primary', 'secondary', 'text', 'link']\n */\n buttonType: PropTypes.oneOf(buttonTypes).description(\n \"['primary', 'secondary', 'text', 'link']\",\n ),\n /**\n * ['horizontal', 'vertical']\n */\n orientation: PropTypes.oneOf(buttonGroupOrientation).description(\n \"['horizontal', 'vertical']\",\n ),\n /**\n * ['s', 'm', 'l']\n */\n spacing: PropTypes.oneOf(dsBasicSizes).description(\"['s', 'm', 'l']\"),\n /**\n * Button group items to show of type DSButton\n */\n children: PropTypes.arrayOf(DSButton).description(\n 'Button group items to show of type DSButton',\n ),\n};\n\nDSButtonGroup.defaultProps = defaultProps;\n\nDSButtonGroup.propTypes = props;\n\nconst DSButtonGroupWithSchema = describe(DSButtonGroup);\n\nDSButtonGroupWithSchema.propTypes = props;\n\nexport { DSButtonGroup, DSButtonGroupWithSchema };\nexport default DSButtonGroup;\n"],"names":["blockName","GroupContainer","aggregatedClasses","vertical","horizontal","spacing","DSButtonGroup","size","buttonType","orientation","buttons","children","containerProps","React","Children","map","button","cloneElement","props","defaultProps","PropTypes","shape","description","oneOf","dsBasicSizes","buttonTypes","buttonGroupOrientation","arrayOf","DSButton","propTypes","DSButtonGroupWithSchema","describe"],"mappings":";;;;;;;;AAAA;AACO,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAkE5C;AACO,MAAM,WAAW,GAAG,CAAC,YAAY,EAAE,UAAU,CAAC;;;;;AC1DrD,IAAMA,SAAS,GAAG,cAAlB;AAEA,IAAMC,cAAc,GAAGC,iBAAiB,CAAC,KAAD,CAAjB,CACrBF,SADqB,EAErB,IAFqB,EAGrB;AAAA,MAAGG,QAAH,QAAGA,QAAH;AAAA,MAAaC,UAAb,QAAaA,UAAb;AAAA,MAAyBC,OAAzB,QAAyBA,OAAzB;AAAA;AACEF,IAAAA,QAAQ,EAARA,QADF;AAEEC,IAAAA,UAAU,EAAVA;AAFF,KAGGC,OAHH,EAGaA,OAHb;AAAA,CAHqB,CAAvB;;IAUMC,aAAa,GAAG,SAAhBA,aAAgB;AAAA,MACpBC,IADoB,SACpBA,IADoB;AAAA,MAEpBC,UAFoB,SAEpBA,UAFoB;AAAA,MAGpBC,WAHoB,SAGpBA,WAHoB;AAAA,MAIpBJ,OAJoB,SAIpBA,OAJoB;AAAA,MAKVK,OALU,SAKpBC,QALoB;AAAA,MAMpBC,cANoB,SAMpBA,cANoB;AAA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AkBC,QAAlB,EAA4BN,WAA5B,CACR,6CADQ;AA5BE,CAAd;AAiCAhB,aAAa,CAACa,YAAd,GAA6BA,YAA7B;AAEAb,aAAa,CAACuB,SAAd,GAA0BX,KAA1B;IAEMY,uBAAuB,GAAGC,QAAQ,CAACzB,aAAD;AAExCwB,uBAAuB,CAACD,SAAxB,GAAoCX,KAApC;;;;"}
|
package/esm/defaultProps.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"defaultProps.js","sources":["../../src/defaultProps.tsx"],"sourcesContent":["export const defaultProps = {\n spacing: null,\n children: [],\n containerProps: {},\n};\n"],"names":["defaultProps","spacing","children","containerProps"],"mappings":"IAAaA,YAAY,GAAG;AAC1BC,EAAAA,OAAO,EAAE,IADiB;AAE1BC,EAAAA,QAAQ,EAAE,EAFgB;AAG1BC,EAAAA,cAAc,EAAE;AAHU;;;;"}
|
package/esm/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|