@elliemae/ds-button-group 3.0.0-next.4 → 3.0.0-next.40
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.
|
@@ -50,8 +50,8 @@ var import_react = __toESM(require("react"));
|
|
|
50
50
|
var import_react_desc = require("react-desc");
|
|
51
51
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
52
52
|
var import_ds_button = __toESM(require("@elliemae/ds-button"));
|
|
53
|
-
var
|
|
54
|
-
var
|
|
53
|
+
var import_ds_shared = require("@elliemae/ds-shared");
|
|
54
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
55
55
|
var import_defaultProps = require("./defaultProps");
|
|
56
56
|
const blockName = "button-group";
|
|
57
57
|
const GroupContainer = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, null, ({ vertical, horizontal, spacing }) => ({
|
|
@@ -60,7 +60,7 @@ const GroupContainer = (0, import_ds_classnames.aggregatedClasses)("div")(blockN
|
|
|
60
60
|
[spacing]: spacing
|
|
61
61
|
}));
|
|
62
62
|
const DSButtonGroup = ({ size, buttonType, orientation, spacing, children: buttons, containerProps }) => {
|
|
63
|
-
(0,
|
|
63
|
+
(0, import_ds_utilities.useDeprecateComponent)({ componentName: "ds-button-group", version: "3.x" });
|
|
64
64
|
return /* @__PURE__ */ import_react.default.createElement(GroupContainer, __spreadValues({
|
|
65
65
|
classProps: {
|
|
66
66
|
vertical: orientation === "vertical",
|
|
@@ -79,10 +79,10 @@ DSButtonGroup.defaultProps = {
|
|
|
79
79
|
};
|
|
80
80
|
const props = {
|
|
81
81
|
containerProps: import_react_desc.PropTypes.shape({}).description("props injected to wrapper of page header"),
|
|
82
|
-
size: import_react_desc.PropTypes.oneOf(
|
|
82
|
+
size: import_react_desc.PropTypes.oneOf(import_ds_shared.dsBasicSizes).description("['s', 'm', 'l']"),
|
|
83
83
|
buttonType: import_react_desc.PropTypes.oneOf(import_ds_button.buttonTypes).description("['primary', 'secondary', 'text', 'link']"),
|
|
84
|
-
orientation: import_react_desc.PropTypes.oneOf(
|
|
85
|
-
spacing: import_react_desc.PropTypes.oneOf(
|
|
84
|
+
orientation: import_react_desc.PropTypes.oneOf(import_ds_shared.orientation).description("['horizontal', 'vertical']"),
|
|
85
|
+
spacing: import_react_desc.PropTypes.oneOf(import_ds_shared.dsBasicSizes).description("['s', 'm', 'l']"),
|
|
86
86
|
children: import_react_desc.PropTypes.arrayOf(import_ds_button.default).description("Button group items to show of type DSButton")
|
|
87
87
|
};
|
|
88
88
|
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 } from 'react-desc';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport DSButton, { buttonTypes } from '@elliemae/ds-button';\nimport { dsBasicSizes, orientation as buttonGroupOrientation } from '@elliemae/ds-shared
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;AACpC,2BAAkC;AAClC,uBAAsC;AACtC,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport DSButton, { buttonTypes } from '@elliemae/ds-button';\nimport { dsBasicSizes, orientation as buttonGroupOrientation } from '@elliemae/ds-shared';\nimport { useDeprecateComponent } from '@elliemae/ds-utilities';\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(DSButton).description('Button group items to show of type DSButton'),\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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;AACpC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@@ -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": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,eAAe;AAAA,EAC1B,SAAS;AAAA,EACT,UAAU;AAAA,
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;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
|
}
|
|
@@ -19,8 +19,8 @@ import React2 from "react";
|
|
|
19
19
|
import { PropTypes, describe } from "react-desc";
|
|
20
20
|
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
21
21
|
import DSButton, { buttonTypes } from "@elliemae/ds-button";
|
|
22
|
-
import { dsBasicSizes, orientation as buttonGroupOrientation } from "@elliemae/ds-shared
|
|
23
|
-
import { useDeprecateComponent } from "@elliemae/ds-
|
|
22
|
+
import { dsBasicSizes, orientation as buttonGroupOrientation } from "@elliemae/ds-shared";
|
|
23
|
+
import { useDeprecateComponent } from "@elliemae/ds-utilities";
|
|
24
24
|
import { defaultProps } from "./defaultProps";
|
|
25
25
|
const blockName = "button-group";
|
|
26
26
|
const GroupContainer = aggregatedClasses("div")(blockName, null, ({ vertical, horizontal, spacing }) => ({
|
|
@@ -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 'react-desc';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport DSButton, { buttonTypes } from '@elliemae/ds-button';\nimport { dsBasicSizes, orientation as buttonGroupOrientation } from '@elliemae/ds-shared
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,YAAY;AAElB,MAAM,iBAAiB,kBAAkB,
|
|
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';\nimport DSButton, { buttonTypes } from '@elliemae/ds-button';\nimport { dsBasicSizes, orientation as buttonGroupOrientation } from '@elliemae/ds-shared';\nimport { useDeprecateComponent } from '@elliemae/ds-utilities';\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(DSButton).description('Button group items to show of type DSButton'),\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"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;AAAA;ACAA;AACA;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,QAAQ,EAAE,YAAY,6CAA6C;AACjG;AAEA,cAAc,eAAe;AAE7B,cAAc,YAAY;AAE1B,MAAM,0BAA0B,SAAS,aAAa;AAEtD,wBAAwB,YAAY;AAGpC,IAAO,wBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/defaultProps.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const defaultProps = {\n spacing: null,\n children: [],\n containerProps: {},\n};\n"],
|
|
5
|
-
"mappings": "AAAA;ACAO,MAAM,eAAe;AAAA,EAC1B,SAAS;AAAA,EACT,UAAU;AAAA,
|
|
5
|
+
"mappings": "AAAA;ACAO,MAAM,eAAe;AAAA,EAC1B,SAAS;AAAA,EACT,UAAU,CAAC;AAAA,EACX,gBAAgB,CAAC;AACnB;",
|
|
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.0.0-next.
|
|
3
|
+
"version": "3.0.0-next.40",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Button Group",
|
|
6
6
|
"files": [
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"indent": 4
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@elliemae/ds-button": "3.0.0-next.
|
|
47
|
-
"@elliemae/ds-classnames": "3.0.0-next.
|
|
48
|
-
"@elliemae/ds-
|
|
49
|
-
"@elliemae/ds-
|
|
46
|
+
"@elliemae/ds-button": "3.0.0-next.40",
|
|
47
|
+
"@elliemae/ds-classnames": "3.0.0-next.29",
|
|
48
|
+
"@elliemae/ds-shared": "3.0.0-next.29",
|
|
49
|
+
"@elliemae/ds-utilities": "3.0.0-next.40",
|
|
50
50
|
"react-desc": "~4.1.3"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|