@elliemae/ds-button-group 3.5.0-rc.9 → 3.6.0-next.0

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.
@@ -30,6 +30,7 @@ __export(DSButtonGroup_exports, {
30
30
  });
31
31
  module.exports = __toCommonJS(DSButtonGroup_exports);
32
32
  var React = __toESM(require("react"));
33
+ var import_jsx_runtime = require("react/jsx-runtime");
33
34
  var import_react = __toESM(require("react"));
34
35
  var import_ds_utilities = require("@elliemae/ds-utilities");
35
36
  var import_ds_classnames = require("@elliemae/ds-classnames");
@@ -44,22 +45,23 @@ const GroupContainer = (0, import_ds_classnames.aggregatedClasses)("div")(blockN
44
45
  }));
45
46
  const DSButtonGroup = ({ size, buttonType, orientation, spacing, children: buttons, containerProps }) => {
46
47
  (0, import_ds_utilities.useDeprecateComponent)({ componentName: "ds-button-group", version: "3.x" });
47
- return /* @__PURE__ */ import_react.default.createElement(GroupContainer, {
48
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GroupContainer, {
48
49
  classProps: {
49
50
  vertical: orientation === "vertical",
50
51
  horizontal: orientation !== "vertical",
51
52
  spacing
52
53
  },
53
- ...containerProps
54
- }, import_react.default.Children.map(
55
- buttons,
56
- (button) => import_react.default.cloneElement(button, {
57
- buttonType,
58
- size,
59
- ...button.props
60
- }),
61
- null
62
- ));
54
+ ...containerProps,
55
+ children: import_react.default.Children.map(
56
+ buttons,
57
+ (button) => import_react.default.cloneElement(button, {
58
+ buttonType,
59
+ size,
60
+ ...button.props
61
+ }),
62
+ null
63
+ )
64
+ });
63
65
  };
64
66
  DSButtonGroup.defaultProps = {
65
67
  size: "m",
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/DSButtonGroup.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
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,YAAY;AAElB,MAAM,qBAAiB,wCAAkB,KAAK,EAAE,WAAW,MAAM,CAAC,EAAE,UAAU,YAAY,QAAQ,OAAO;AAAA,EACvG;AAAA,EACA;AAAA,EACA,CAAC,UAAU;AACb,EAAE;AAEF,MAAM,gBAAgB,CAAC,EAAE,MAAM,YAAY,aAAa,SAAS,UAAU,SAAS,eAAe,MAAM;AACvG,iDAAsB,EAAE,eAAe,mBAAmB,SAAS,MAAM,CAAC;AAE1E,SACE,6BAAAA,QAAA,cAAC;AAAA,IACC,YAAY;AAAA,MACV,UAAU,gBAAgB;AAAA,MAC1B,YAAY,gBAAgB;AAAA,MAC5B;AAAA,IACF;AAAA,IACC,GAAG;AAAA,KAEH,aAAAA,QAAM,SAAS;AAAA,IACd;AAAA,IACA,CAAC,WACC,aAAAA,QAAM,aAAa,QAAQ;AAAA,MACzB;AAAA,MACA;AAAA,MAGA,GAAG,OAAO;AAAA,IACZ,CAAC;AAAA,IACH;AAAA,EACF,CACF;AAEJ;AAEA,cAAc,eAAe;AAAA,EAC3B,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,aAAa;AACf;AAEA,MAAM,QAAQ;AAAA,EAEZ,gBAAgB,8BAAU,MAAM,CAAC,CAAC,EAAE,YAAY,0CAA0C;AAAA,EAI1F,MAAM,8BAAU,MAAM,6BAAY,EAAE,YAAY,iBAAiB;AAAA,EAIjE,YAAY,8BAAU,MAAM,4BAAW,EAAE,YAAY,0CAA0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AA,EACN,YAAY;AAAA,EACZ,aAAa;AACf;AAEA,MAAM,QAAQ;AAAA,EAEZ,gBAAgB,8BAAU,MAAM,CAAC,CAAC,EAAE,YAAY,0CAA0C;AAAA,EAI1F,MAAM,8BAAU,MAAM,6BAAY,EAAE,YAAY,iBAAiB;AAAA,EAIjE,YAAY,8BAAU,MAAM,4BAAW,EAAE,YAAY,0CAA0C;AAAA,EAI/F,aAAa,8BAAU,MAAM,iBAAAC,WAAsB,EAAE,YAAY,4BAA4B;AAAA,EAI7F,SAAS,8BAAU,MAAM,6BAAY,EAAE,YAAY,iBAAiB;AAAA,EAIpE,UAAU,8BAAU,QAAQ,8BAAU,MAAM,CAAC,iBAAAC,OAAQ,CAAC,CAAC,EAAE,YAAY,6CAA6C;AACpH;AAEA,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,cAAc,cAAc;AAE5B,MAAM,8BAA0B,8BAAS,aAAa;AAEtD,wBAAwB,YAAY;AAGpC,IAAO,wBAAQ;",
6
6
  "names": ["React", "buttonGroupOrientation", "DSButton"]
7
7
  }
@@ -1,4 +1,5 @@
1
1
  import * as React from "react";
2
+ import { jsx } from "react/jsx-runtime";
2
3
  import React2 from "react";
3
4
  import { PropTypes, describe, useDeprecateComponent } from "@elliemae/ds-utilities";
4
5
  import { aggregatedClasses } from "@elliemae/ds-classnames";
@@ -13,22 +14,23 @@ const GroupContainer = aggregatedClasses("div")(blockName, null, ({ vertical, ho
13
14
  }));
14
15
  const DSButtonGroup = ({ size, buttonType, orientation, spacing, children: buttons, containerProps }) => {
15
16
  useDeprecateComponent({ componentName: "ds-button-group", version: "3.x" });
16
- return /* @__PURE__ */ React2.createElement(GroupContainer, {
17
+ return /* @__PURE__ */ jsx(GroupContainer, {
17
18
  classProps: {
18
19
  vertical: orientation === "vertical",
19
20
  horizontal: orientation !== "vertical",
20
21
  spacing
21
22
  },
22
- ...containerProps
23
- }, React2.Children.map(
24
- buttons,
25
- (button) => React2.cloneElement(button, {
26
- buttonType,
27
- size,
28
- ...button.props
29
- }),
30
- null
31
- ));
23
+ ...containerProps,
24
+ children: React2.Children.map(
25
+ buttons,
26
+ (button) => React2.cloneElement(button, {
27
+ buttonType,
28
+ size,
29
+ ...button.props
30
+ }),
31
+ null
32
+ )
33
+ });
32
34
  };
33
35
  DSButtonGroup.defaultProps = {
34
36
  size: "m",
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSButtonGroup.tsx"],
4
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,YAAY,WAAW;ACAvB,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,UAAU;AACb,EAAE;AAEF,MAAM,gBAAgB,CAAC,EAAE,MAAM,YAAY,aAAa,SAAS,UAAU,SAAS,eAAe,MAAM;AACvG,wBAAsB,EAAE,eAAe,mBAAmB,SAAS,MAAM,CAAC;AAE1E,SACE,gBAAAA,OAAA,cAAC;AAAA,IACC,YAAY;AAAA,MACV,UAAU,gBAAgB;AAAA,MAC1B,YAAY,gBAAgB;AAAA,MAC5B;AAAA,IACF;AAAA,IACC,GAAG;AAAA,KAEHA,OAAM,SAAS;AAAA,IACd;AAAA,IACA,CAAC,WACCA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AAC;AAE1E,SACE,oBAAC;AAAA,IACC,YAAY;AAAA,MACV,UAAU,gBAAgB;AAAA,MAC1B,YAAY,gBAAgB;AAAA,MAC5B;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEH,UAAAA,OAAM,SAAS;AAAA,MACd;AAAA,MACA,CAAC,WACCA,OAAM,aAAa,QAAQ;AAAA,QACzB;AAAA,QACA;AAAA,QAGA,GAAG,OAAO;AAAA,MACZ,CAAC;AAAA,MACH;AAAA,IACF;AAAA,GACF;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": ["React"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-button-group",
3
- "version": "3.5.0-rc.9",
3
+ "version": "3.6.0-next.0",
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.5.0-rc.9",
47
- "@elliemae/ds-classnames": "3.5.0-rc.9",
48
- "@elliemae/ds-shared": "3.5.0-rc.9",
49
- "@elliemae/ds-utilities": "3.5.0-rc.9"
46
+ "@elliemae/ds-button": "3.6.0-next.0",
47
+ "@elliemae/ds-classnames": "3.6.0-next.0",
48
+ "@elliemae/ds-shared": "3.6.0-next.0",
49
+ "@elliemae/ds-utilities": "3.6.0-next.0"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@testing-library/jest-dom": "~5.16.4",