@elliemae/ds-button-group 3.1.0-next.2 → 3.1.0-next.5
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.
|
@@ -41,11 +41,10 @@ __export(DSButtonGroup_exports, {
|
|
|
41
41
|
module.exports = __toCommonJS(DSButtonGroup_exports);
|
|
42
42
|
var React = __toESM(require("react"));
|
|
43
43
|
var import_react = __toESM(require("react"));
|
|
44
|
-
var
|
|
44
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
45
45
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
46
46
|
var import_ds_button = __toESM(require("@elliemae/ds-button"));
|
|
47
47
|
var import_ds_shared = require("@elliemae/ds-shared");
|
|
48
|
-
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
49
48
|
var import_defaultProps = require("./defaultProps");
|
|
50
49
|
const blockName = "button-group";
|
|
51
50
|
const GroupContainer = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, null, ({ vertical, horizontal, spacing }) => ({
|
|
@@ -72,17 +71,17 @@ DSButtonGroup.defaultProps = {
|
|
|
72
71
|
orientation: "horizontal"
|
|
73
72
|
};
|
|
74
73
|
const props = {
|
|
75
|
-
containerProps:
|
|
76
|
-
size:
|
|
77
|
-
buttonType:
|
|
78
|
-
orientation:
|
|
79
|
-
spacing:
|
|
80
|
-
children:
|
|
74
|
+
containerProps: import_ds_utilities.PropTypes.shape({}).description("props injected to wrapper of page header"),
|
|
75
|
+
size: import_ds_utilities.PropTypes.oneOf(import_ds_shared.dsBasicSizes).description("['s', 'm', 'l']"),
|
|
76
|
+
buttonType: import_ds_utilities.PropTypes.oneOf(import_ds_button.buttonTypes).description("['primary', 'secondary', 'text', 'link']"),
|
|
77
|
+
orientation: import_ds_utilities.PropTypes.oneOf(import_ds_shared.orientation).description("['horizontal', 'vertical']"),
|
|
78
|
+
spacing: import_ds_utilities.PropTypes.oneOf(import_ds_shared.dsBasicSizes).description("['s', 'm', 'l']"),
|
|
79
|
+
children: import_ds_utilities.PropTypes.arrayOf(import_ds_utilities.PropTypes.oneOf([import_ds_button.default])).description("Button group items to show of type DSButton")
|
|
81
80
|
};
|
|
82
81
|
DSButtonGroup.defaultProps = import_defaultProps.defaultProps;
|
|
83
82
|
DSButtonGroup.propTypes = props;
|
|
84
83
|
DSButtonGroup.displayName = "DSButtonGroup";
|
|
85
|
-
const DSButtonGroupWithSchema = (0,
|
|
84
|
+
const DSButtonGroupWithSchema = (0, import_ds_utilities.describe)(DSButtonGroup);
|
|
86
85
|
DSButtonGroupWithSchema.propTypes = props;
|
|
87
86
|
var DSButtonGroup_default = DSButtonGroup;
|
|
88
87
|
//# sourceMappingURL=DSButtonGroup.js.map
|
|
@@ -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 } from '
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe, useDeprecateComponent } from '@elliemae/ds-utilities';\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": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,0BAA2D;AAC3D,2BAAkC;AAClC,uBAAsC;AACtC,uBAAoE;AACpE,0BAA6B;AAE7B,MAAM,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a, b) => {
|
|
|
16
16
|
};
|
|
17
17
|
import * as React from "react";
|
|
18
18
|
import React2 from "react";
|
|
19
|
-
import { PropTypes, describe } from "
|
|
19
|
+
import { PropTypes, describe, useDeprecateComponent } from "@elliemae/ds-utilities";
|
|
20
20
|
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
21
21
|
import DSButton, { buttonTypes } from "@elliemae/ds-button";
|
|
22
22
|
import { dsBasicSizes, orientation as buttonGroupOrientation } from "@elliemae/ds-shared";
|
|
23
|
-
import { useDeprecateComponent } from "@elliemae/ds-utilities";
|
|
24
23
|
import { defaultProps } from "./defaultProps";
|
|
25
24
|
const blockName = "button-group";
|
|
26
25
|
const GroupContainer = aggregatedClasses("div")(blockName, null, ({ vertical, horizontal, spacing }) => ({
|
|
@@ -52,7 +51,7 @@ const props = {
|
|
|
52
51
|
buttonType: PropTypes.oneOf(buttonTypes).description("['primary', 'secondary', 'text', 'link']"),
|
|
53
52
|
orientation: PropTypes.oneOf(buttonGroupOrientation).description("['horizontal', 'vertical']"),
|
|
54
53
|
spacing: PropTypes.oneOf(dsBasicSizes).description("['s', 'm', 'l']"),
|
|
55
|
-
children: PropTypes.arrayOf(DSButton).description("Button group items to show of type DSButton")
|
|
54
|
+
children: PropTypes.arrayOf(PropTypes.oneOf([DSButton])).description("Button group items to show of type DSButton")
|
|
56
55
|
};
|
|
57
56
|
DSButtonGroup.defaultProps = defaultProps;
|
|
58
57
|
DSButtonGroup.propTypes = props;
|
|
@@ -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 } from '
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe, useDeprecateComponent } from '@elliemae/ds-utilities';\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;ACAA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,YAAY;AAElB,MAAM,iBAAiB,kBAAkB,KAAK,EAAE,WAAW,MAAM,CAAC,EAAE,UAAU,YAAY,cAAe;AAAA,EACvG;AAAA,EACA;AAAA,GACC,UAAU;AACb,EAAE;AAEF,MAAM,gBAAgB,CAAC,EAAE,MAAM,YAAY,aAAa,SAAS,UAAU,SAAS,qBAAqB;AACvG,wBAAsB,EAAE,eAAe,mBAAmB,SAAS,MAAM,CAAC;AAE1E,SACE,qCAAC;AAAA,IACC,YAAY;AAAA,MACV,UAAU,gBAAgB;AAAA,MAC1B,YAAY,gBAAgB;AAAA,MAC5B;AAAA,IACF;AAAA,KACI,iBAEH,OAAM,SAAS,IACd,SACA,CAAC,WACC,OAAM,aAAa,QAAQ;AAAA,IACzB;AAAA,IACA;AAAA,KAGG,OAAO,MACX,GACH,IACF,CACF;AAEJ;AAEA,cAAc,eAAe;AAAA,EAC3B,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,aAAa;AACf;AAEA,MAAM,QAAQ;AAAA,EAEZ,gBAAgB,UAAU,MAAM,CAAC,CAAC,EAAE,YAAY,0CAA0C;AAAA,EAI1F,MAAM,UAAU,MAAM,YAAY,EAAE,YAAY,iBAAiB;AAAA,EAIjE,YAAY,UAAU,MAAM,WAAW,EAAE,YAAY,0CAA0C;AAAA,EAI/F,aAAa,UAAU,MAAM,sBAAsB,EAAE,YAAY,4BAA4B;AAAA,EAI7F,SAAS,UAAU,MAAM,YAAY,EAAE,YAAY,iBAAiB;AAAA,EAIpE,UAAU,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": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-button-group",
|
|
3
|
-
"version": "3.1.0-next.
|
|
3
|
+
"version": "3.1.0-next.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Button Group",
|
|
6
6
|
"files": [
|
|
@@ -42,19 +42,11 @@
|
|
|
42
42
|
"reportFile": "tests.xml",
|
|
43
43
|
"indent": 4
|
|
44
44
|
},
|
|
45
|
-
"scripts": {
|
|
46
|
-
"dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
|
|
47
|
-
"test": "node ../../scripts/testing/test.mjs",
|
|
48
|
-
"lint": "node ../../scripts/lint.mjs",
|
|
49
|
-
"dts": "node ../../scripts/dts.mjs",
|
|
50
|
-
"build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
|
|
51
|
-
},
|
|
52
45
|
"dependencies": {
|
|
53
|
-
"@elliemae/ds-button": "3.1.0-next.
|
|
54
|
-
"@elliemae/ds-classnames": "3.1.0-next.
|
|
55
|
-
"@elliemae/ds-shared": "3.1.0-next.
|
|
56
|
-
"@elliemae/ds-utilities": "3.1.0-next.
|
|
57
|
-
"react-desc": "~4.1.3"
|
|
46
|
+
"@elliemae/ds-button": "3.1.0-next.5",
|
|
47
|
+
"@elliemae/ds-classnames": "3.1.0-next.5",
|
|
48
|
+
"@elliemae/ds-shared": "3.1.0-next.5",
|
|
49
|
+
"@elliemae/ds-utilities": "3.1.0-next.5"
|
|
58
50
|
},
|
|
59
51
|
"devDependencies": {
|
|
60
52
|
"@testing-library/jest-dom": "~5.16.2",
|
|
@@ -67,5 +59,13 @@
|
|
|
67
59
|
"publishConfig": {
|
|
68
60
|
"access": "public",
|
|
69
61
|
"typeSafety": false
|
|
62
|
+
},
|
|
63
|
+
"scripts": {
|
|
64
|
+
"dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
|
|
65
|
+
"test": "node ../../scripts/testing/test.mjs",
|
|
66
|
+
"lint": "node ../../scripts/lint.mjs",
|
|
67
|
+
"dts": "node ../../scripts/dts.mjs",
|
|
68
|
+
"build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs",
|
|
69
|
+
"checkDeps": "npx -yes ../ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
70
70
|
}
|
|
71
|
-
}
|
|
71
|
+
}
|