@elliemae/ds-button-group 3.16.0 → 3.16.1
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/DSButtonGroup.js +23 -1
- package/dist/cjs/DSButtonGroup.js.map +2 -2
- package/dist/cjs/defaultProps.js +4 -0
- package/dist/cjs/defaultProps.js.map +1 -1
- package/dist/cjs/index.js +6 -2
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/package.json +7 -0
- package/dist/esm/DSButtonGroup.js +19 -1
- package/dist/esm/DSButtonGroup.js.map +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/package.json +7 -0
- package/package.json +9 -9
- package/dist/types/DSButtonGroup.d.ts +0 -54
- package/dist/types/defaultProps.d.ts +0 -5
- package/dist/types/index.d.ts +0 -2
- package/dist/types/tests/DSButtonGroup.events.test.d.ts +0 -1
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -36,7 +40,7 @@ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
|
36
40
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
37
41
|
var import_ds_button = __toESM(require("@elliemae/ds-button"));
|
|
38
42
|
var import_ds_shared = require("@elliemae/ds-shared");
|
|
39
|
-
var import_defaultProps = require("./defaultProps");
|
|
43
|
+
var import_defaultProps = require("./defaultProps.js");
|
|
40
44
|
const blockName = "button-group";
|
|
41
45
|
const GroupContainer = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, null, ({ vertical, horizontal, spacing }) => ({
|
|
42
46
|
vertical,
|
|
@@ -59,6 +63,8 @@ const DSButtonGroup = ({ size, buttonType, orientation, spacing, children: butto
|
|
|
59
63
|
(button) => import_react.default.cloneElement(button, {
|
|
60
64
|
buttonType,
|
|
61
65
|
size,
|
|
66
|
+
// Keeping it this way to allow individual Buttons to override group props
|
|
67
|
+
// [buttonType | size]
|
|
62
68
|
...button.props
|
|
63
69
|
}),
|
|
64
70
|
null
|
|
@@ -72,11 +78,27 @@ DSButtonGroup.defaultProps = {
|
|
|
72
78
|
orientation: "horizontal"
|
|
73
79
|
};
|
|
74
80
|
const props = {
|
|
81
|
+
/** props injected to wrapper of page header */
|
|
75
82
|
containerProps: import_ds_props_helpers.PropTypes.shape({}).description("props injected to wrapper of page header"),
|
|
83
|
+
/**
|
|
84
|
+
* ['s', 'm', 'l']
|
|
85
|
+
*/
|
|
76
86
|
size: import_ds_props_helpers.PropTypes.oneOf(import_ds_shared.dsBasicSizes).description("['s', 'm', 'l']"),
|
|
87
|
+
/**
|
|
88
|
+
* ['primary', 'secondary', 'text', 'link']
|
|
89
|
+
*/
|
|
77
90
|
buttonType: import_ds_props_helpers.PropTypes.oneOf(import_ds_button.buttonTypes).description("['primary', 'secondary', 'text', 'link']"),
|
|
91
|
+
/**
|
|
92
|
+
* ['horizontal', 'vertical']
|
|
93
|
+
*/
|
|
78
94
|
orientation: import_ds_props_helpers.PropTypes.oneOf(import_ds_shared.orientation).description("['horizontal', 'vertical']"),
|
|
95
|
+
/**
|
|
96
|
+
* ['s', 'm', 'l']
|
|
97
|
+
*/
|
|
79
98
|
spacing: import_ds_props_helpers.PropTypes.oneOf(import_ds_shared.dsBasicSizes).description("['s', 'm', 'l']"),
|
|
99
|
+
/**
|
|
100
|
+
* Button group items to show of type DSButton
|
|
101
|
+
*/
|
|
80
102
|
children: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.oneOf([import_ds_button.default])).description("Button group items to show of type DSButton")
|
|
81
103
|
};
|
|
82
104
|
DSButtonGroup.defaultProps = import_defaultProps.defaultProps;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSButtonGroup.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe, useDeprecateComponent } from '@elliemae/ds-props-helpers';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport DSButton, { buttonTypes } from '@elliemae/ds-button';\nimport { dsBasicSizes, orientation as buttonGroupOrientation } from '@elliemae/ds-shared';\nimport { defaultProps } from './defaultProps';\n\nconst blockName = 'button-group';\n\nconst GroupContainer = aggregatedClasses('div')(blockName, null, ({ vertical, horizontal, spacing }) => ({\n vertical,\n horizontal,\n [spacing]: spacing,\n}));\n\nconst DSButtonGroup = ({ size, buttonType, orientation, spacing, children: buttons, containerProps }) => {\n useDeprecateComponent({ componentName: 'ds-button-group', version: '3.x' });\n\n return (\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};\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('props injected to wrapper of page header'),\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(\"['primary', 'secondary', 'text', 'link']\"),\n /**\n * ['horizontal', 'vertical']\n */\n orientation: PropTypes.oneOf(buttonGroupOrientation).description(\"['horizontal', 'vertical']\"),\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(PropTypes.oneOf([DSButton])).description('Button group items to show of type DSButton'),\n};\n\nDSButtonGroup.defaultProps = defaultProps;\nDSButtonGroup.propTypes = props;\nDSButtonGroup.displayName = 'DSButtonGroup';\n\nconst DSButtonGroupWithSchema = describe(DSButtonGroup);\n\nDSButtonGroupWithSchema.propTypes = props;\n\nexport { DSButtonGroup, DSButtonGroupWithSchema };\nexport default DSButtonGroup;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe, useDeprecateComponent } from '@elliemae/ds-props-helpers';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport DSButton, { buttonTypes } from '@elliemae/ds-button';\nimport { dsBasicSizes, orientation as buttonGroupOrientation } from '@elliemae/ds-shared';\nimport { defaultProps } from './defaultProps.js';\n\nconst blockName = 'button-group';\n\nconst GroupContainer = aggregatedClasses('div')(blockName, null, ({ vertical, horizontal, spacing }) => ({\n vertical,\n horizontal,\n [spacing]: spacing,\n}));\n\nconst DSButtonGroup = ({ size, buttonType, orientation, spacing, children: buttons, containerProps }) => {\n useDeprecateComponent({ componentName: 'ds-button-group', version: '3.x' });\n\n return (\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};\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('props injected to wrapper of page header'),\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(\"['primary', 'secondary', 'text', 'link']\"),\n /**\n * ['horizontal', 'vertical']\n */\n orientation: PropTypes.oneOf(buttonGroupOrientation).description(\"['horizontal', 'vertical']\"),\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(PropTypes.oneOf([DSButton])).description('Button group items to show of type DSButton'),\n};\n\nDSButtonGroup.defaultProps = defaultProps;\nDSButtonGroup.propTypes = props;\nDSButtonGroup.displayName = 'DSButtonGroup';\n\nconst DSButtonGroupWithSchema = describe(DSButtonGroup);\n\nDSButtonGroupWithSchema.propTypes = props;\n\nexport { DSButtonGroup, DSButtonGroupWithSchema };\nexport default DSButtonGroup;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADmBnB;AAnBJ,mBAAkB;AAClB,8BAA2D;AAC3D,2BAAkC;AAClC,uBAAsC;AACtC,uBAAoE;AACpE,0BAA6B;AAE7B,MAAM,YAAY;AAElB,MAAM,qBAAiB,wCAAkB,KAAK,EAAE,WAAW,MAAM,CAAC,EAAE,UAAU,YAAY,QAAQ,OAAO;AAAA,EACvG;AAAA,EACA;AAAA,EACA,CAAC,OAAO,GAAG;AACb,EAAE;AAEF,MAAM,gBAAgB,CAAC,EAAE,MAAM,Y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rientation", "DSButton"]
|
|
7
7
|
}
|
package/dist/cjs/defaultProps.js
CHANGED
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/defaultProps.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export const defaultProps = {\n spacing: null,\n children: [],\n containerProps: {},\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,eAAe;AAAA,EAC1B,SAAS;AAAA,EACT,UAAU,CAAC;AAAA,EACX,gBAAgB,CAAC;AACnB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -19,6 +19,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
19
|
};
|
|
20
20
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
21
21
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
22
26
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
23
27
|
mod
|
|
24
28
|
));
|
|
@@ -29,6 +33,6 @@ __export(src_exports, {
|
|
|
29
33
|
});
|
|
30
34
|
module.exports = __toCommonJS(src_exports);
|
|
31
35
|
var React = __toESM(require("react"));
|
|
32
|
-
__reExport(src_exports, require("./DSButtonGroup"), module.exports);
|
|
33
|
-
var import_DSButtonGroup = __toESM(require("./DSButtonGroup"));
|
|
36
|
+
__reExport(src_exports, require("./DSButtonGroup.js"), module.exports);
|
|
37
|
+
var import_DSButtonGroup = __toESM(require("./DSButtonGroup.js"));
|
|
34
38
|
//# 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 './DSButtonGroup';\nexport { default } from './DSButtonGroup';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["export * from './DSButtonGroup.js';\nexport { default } from './DSButtonGroup.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,+BAAd;AACA,2BAAwB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -5,7 +5,7 @@ import { PropTypes, describe, useDeprecateComponent } from "@elliemae/ds-props-h
|
|
|
5
5
|
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
6
6
|
import DSButton, { buttonTypes } from "@elliemae/ds-button";
|
|
7
7
|
import { dsBasicSizes, orientation as buttonGroupOrientation } from "@elliemae/ds-shared";
|
|
8
|
-
import { defaultProps } from "./defaultProps";
|
|
8
|
+
import { defaultProps } from "./defaultProps.js";
|
|
9
9
|
const blockName = "button-group";
|
|
10
10
|
const GroupContainer = aggregatedClasses("div")(blockName, null, ({ vertical, horizontal, spacing }) => ({
|
|
11
11
|
vertical,
|
|
@@ -28,6 +28,8 @@ const DSButtonGroup = ({ size, buttonType, orientation, spacing, children: butto
|
|
|
28
28
|
(button) => React2.cloneElement(button, {
|
|
29
29
|
buttonType,
|
|
30
30
|
size,
|
|
31
|
+
// Keeping it this way to allow individual Buttons to override group props
|
|
32
|
+
// [buttonType | size]
|
|
31
33
|
...button.props
|
|
32
34
|
}),
|
|
33
35
|
null
|
|
@@ -41,11 +43,27 @@ DSButtonGroup.defaultProps = {
|
|
|
41
43
|
orientation: "horizontal"
|
|
42
44
|
};
|
|
43
45
|
const props = {
|
|
46
|
+
/** props injected to wrapper of page header */
|
|
44
47
|
containerProps: PropTypes.shape({}).description("props injected to wrapper of page header"),
|
|
48
|
+
/**
|
|
49
|
+
* ['s', 'm', 'l']
|
|
50
|
+
*/
|
|
45
51
|
size: PropTypes.oneOf(dsBasicSizes).description("['s', 'm', 'l']"),
|
|
52
|
+
/**
|
|
53
|
+
* ['primary', 'secondary', 'text', 'link']
|
|
54
|
+
*/
|
|
46
55
|
buttonType: PropTypes.oneOf(buttonTypes).description("['primary', 'secondary', 'text', 'link']"),
|
|
56
|
+
/**
|
|
57
|
+
* ['horizontal', 'vertical']
|
|
58
|
+
*/
|
|
47
59
|
orientation: PropTypes.oneOf(buttonGroupOrientation).description("['horizontal', 'vertical']"),
|
|
60
|
+
/**
|
|
61
|
+
* ['s', 'm', 'l']
|
|
62
|
+
*/
|
|
48
63
|
spacing: PropTypes.oneOf(dsBasicSizes).description("['s', 'm', 'l']"),
|
|
64
|
+
/**
|
|
65
|
+
* Button group items to show of type DSButton
|
|
66
|
+
*/
|
|
49
67
|
children: PropTypes.arrayOf(PropTypes.oneOf([DSButton])).description("Button group items to show of type DSButton")
|
|
50
68
|
};
|
|
51
69
|
DSButtonGroup.defaultProps = defaultProps;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSButtonGroup.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe, useDeprecateComponent } from '@elliemae/ds-props-helpers';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport DSButton, { buttonTypes } from '@elliemae/ds-button';\nimport { dsBasicSizes, orientation as buttonGroupOrientation } from '@elliemae/ds-shared';\nimport { defaultProps } from './defaultProps';\n\nconst blockName = 'button-group';\n\nconst GroupContainer = aggregatedClasses('div')(blockName, null, ({ vertical, horizontal, spacing }) => ({\n vertical,\n horizontal,\n [spacing]: spacing,\n}));\n\nconst DSButtonGroup = ({ size, buttonType, orientation, spacing, children: buttons, containerProps }) => {\n useDeprecateComponent({ componentName: 'ds-button-group', version: '3.x' });\n\n return (\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};\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('props injected to wrapper of page header'),\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(\"['primary', 'secondary', 'text', 'link']\"),\n /**\n * ['horizontal', 'vertical']\n */\n orientation: PropTypes.oneOf(buttonGroupOrientation).description(\"['horizontal', 'vertical']\"),\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(PropTypes.oneOf([DSButton])).description('Button group items to show of type DSButton'),\n};\n\nDSButtonGroup.defaultProps = defaultProps;\nDSButtonGroup.propTypes = props;\nDSButtonGroup.displayName = 'DSButtonGroup';\n\nconst DSButtonGroupWithSchema = describe(DSButtonGroup);\n\nDSButtonGroupWithSchema.propTypes = props;\n\nexport { DSButtonGroup, DSButtonGroupWithSchema };\nexport default DSButtonGroup;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACmBnB;AAnBJ,OAAOA,YAAW;AAClB,SAAS,WAAW,UAAU,6BAA6B;AAC3D,SAAS,yBAAyB;AAClC,OAAO,YAAY,mBAAmB;AACtC,SAAS,cAAc,eAAe,8BAA8B;AACpE,SAAS,oBAAoB;AAE7B,MAAM,YAAY;AAElB,MAAM,iBAAiB,kBAAkB,KAAK,EAAE,WAAW,MAAM,CAAC,EAAE,UAAU,YAAY,QAAQ,OAAO;AAAA,EACvG;AAAA,EACA;AAAA,EACA,CAAC,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe, useDeprecateComponent } from '@elliemae/ds-props-helpers';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport DSButton, { buttonTypes } from '@elliemae/ds-button';\nimport { dsBasicSizes, orientation as buttonGroupOrientation } from '@elliemae/ds-shared';\nimport { defaultProps } from './defaultProps.js';\n\nconst blockName = 'button-group';\n\nconst GroupContainer = aggregatedClasses('div')(blockName, null, ({ vertical, horizontal, spacing }) => ({\n vertical,\n horizontal,\n [spacing]: spacing,\n}));\n\nconst DSButtonGroup = ({ size, buttonType, orientation, spacing, children: buttons, containerProps }) => {\n useDeprecateComponent({ componentName: 'ds-button-group', version: '3.x' });\n\n return (\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};\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('props injected to wrapper of page header'),\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(\"['primary', 'secondary', 'text', 'link']\"),\n /**\n * ['horizontal', 'vertical']\n */\n orientation: PropTypes.oneOf(buttonGroupOrientation).description(\"['horizontal', 'vertical']\"),\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(PropTypes.oneOf([DSButton])).description('Button group items to show of type DSButton'),\n};\n\nDSButtonGroup.defaultProps = defaultProps;\nDSButtonGroup.propTypes = props;\nDSButtonGroup.displayName = 'DSButtonGroup';\n\nconst DSButtonGroupWithSchema = describe(DSButtonGroup);\n\nDSButtonGroupWithSchema.propTypes = props;\n\nexport { DSButtonGroup, DSButtonGroupWithSchema };\nexport default DSButtonGroup;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACmBnB;AAnBJ,OAAOA,YAAW;AAClB,SAAS,WAAW,UAAU,6BAA6B;AAC3D,SAAS,yBAAyB;AAClC,OAAO,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UAAU,QAAQ,UAAU,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,YAAY,6CAA6C;AACpH;AAEA,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,cAAc,cAAc;AAE5B,MAAM,0BAA0B,SAAS,aAAa;AAEtD,wBAAwB,YAAY;AAGpC,IAAO,wBAAQ;",
|
|
6
6
|
"names": ["React"]
|
|
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 './DSButtonGroup';\nexport { default } from './DSButtonGroup';\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSButtonGroup.js';\nexport { default } from './DSButtonGroup.js';\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,SAAS,WAAAA,gBAAe;",
|
|
6
6
|
"names": ["default"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-button-group",
|
|
3
|
-
"version": "3.16.
|
|
3
|
+
"version": "3.16.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Button Group",
|
|
6
6
|
"files": [
|
|
@@ -43,14 +43,14 @@
|
|
|
43
43
|
"indent": 4
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@elliemae/ds-button": "3.16.
|
|
47
|
-
"@elliemae/ds-classnames": "3.16.
|
|
48
|
-
"@elliemae/ds-props-helpers": "3.16.
|
|
49
|
-
"@elliemae/ds-shared": "3.16.
|
|
50
|
-
"@elliemae/ds-utilities": "3.16.
|
|
46
|
+
"@elliemae/ds-button": "3.16.1",
|
|
47
|
+
"@elliemae/ds-classnames": "3.16.1",
|
|
48
|
+
"@elliemae/ds-props-helpers": "3.16.1",
|
|
49
|
+
"@elliemae/ds-shared": "3.16.1",
|
|
50
|
+
"@elliemae/ds-utilities": "3.16.1"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@testing-library/jest-dom": "~5.16.
|
|
53
|
+
"@testing-library/jest-dom": "~5.16.5",
|
|
54
54
|
"@testing-library/react": "~12.1.3"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
|
|
66
66
|
"test": "node ../../scripts/testing/test.mjs",
|
|
67
67
|
"lint": "node ../../scripts/lint.mjs",
|
|
68
|
-
"eslint:fix": "
|
|
69
|
-
"dts": "
|
|
68
|
+
"eslint:fix": "exit 0",
|
|
69
|
+
"dts": "exit 0",
|
|
70
70
|
"build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs",
|
|
71
71
|
"dev:build": "pnpm --filter {.}... build",
|
|
72
72
|
"dev:install": "pnpm --filter {.}... i --no-lockfile && pnpm run dev:build",
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
declare const DSButtonGroup: {
|
|
2
|
-
({ size, buttonType, orientation, spacing, children: buttons, containerProps }: {
|
|
3
|
-
size: any;
|
|
4
|
-
buttonType: any;
|
|
5
|
-
orientation: any;
|
|
6
|
-
spacing: any;
|
|
7
|
-
children: any;
|
|
8
|
-
containerProps: any;
|
|
9
|
-
}): JSX.Element;
|
|
10
|
-
defaultProps: {
|
|
11
|
-
spacing: null;
|
|
12
|
-
children: never[];
|
|
13
|
-
containerProps: {};
|
|
14
|
-
} | {
|
|
15
|
-
size: string;
|
|
16
|
-
buttonType: string;
|
|
17
|
-
orientation: string;
|
|
18
|
-
};
|
|
19
|
-
propTypes: {
|
|
20
|
-
/** props injected to wrapper of page header */
|
|
21
|
-
containerProps: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
22
|
-
/**
|
|
23
|
-
* ['s', 'm', 'l']
|
|
24
|
-
*/
|
|
25
|
-
size: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
26
|
-
/**
|
|
27
|
-
* ['primary', 'secondary', 'text', 'link']
|
|
28
|
-
*/
|
|
29
|
-
buttonType: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
30
|
-
/**
|
|
31
|
-
* ['horizontal', 'vertical']
|
|
32
|
-
*/
|
|
33
|
-
orientation: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
34
|
-
/**
|
|
35
|
-
* ['s', 'm', 'l']
|
|
36
|
-
*/
|
|
37
|
-
spacing: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
38
|
-
/**
|
|
39
|
-
* Button group items to show of type DSButton
|
|
40
|
-
*/
|
|
41
|
-
children: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
42
|
-
};
|
|
43
|
-
displayName: string;
|
|
44
|
-
};
|
|
45
|
-
declare const DSButtonGroupWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").DocumentedReactComponent<{
|
|
46
|
-
size: any;
|
|
47
|
-
buttonType: any;
|
|
48
|
-
orientation: any;
|
|
49
|
-
spacing: any;
|
|
50
|
-
children: any;
|
|
51
|
-
containerProps: any;
|
|
52
|
-
}>;
|
|
53
|
-
export { DSButtonGroup, DSButtonGroupWithSchema };
|
|
54
|
-
export default DSButtonGroup;
|
package/dist/types/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|