@elliemae/ds-button-group 3.0.0-next.7 → 3.0.0-next.72

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.
@@ -18,40 +18,34 @@ var __spreadValues = (a, b) => {
18
18
  }
19
19
  return a;
20
20
  };
21
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
22
21
  var __export = (target, all) => {
23
22
  for (var name in all)
24
23
  __defProp(target, name, { get: all[name], enumerable: true });
25
24
  };
26
- var __reExport = (target, module2, copyDefault, desc) => {
27
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
28
- for (let key of __getOwnPropNames(module2))
29
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
30
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
25
+ var __copyProps = (to, from, except, desc) => {
26
+ if (from && typeof from === "object" || typeof from === "function") {
27
+ for (let key of __getOwnPropNames(from))
28
+ if (!__hasOwnProp.call(to, key) && key !== except)
29
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
31
30
  }
32
- return target;
31
+ return to;
33
32
  };
34
- var __toESM = (module2, isNodeMode) => {
35
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
36
- };
37
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
38
- return (module2, temp) => {
39
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
40
- };
41
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
33
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
34
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
42
35
  var DSButtonGroup_exports = {};
43
36
  __export(DSButtonGroup_exports, {
44
37
  DSButtonGroup: () => DSButtonGroup,
45
38
  DSButtonGroupWithSchema: () => DSButtonGroupWithSchema,
46
39
  default: () => DSButtonGroup_default
47
40
  });
41
+ module.exports = __toCommonJS(DSButtonGroup_exports);
48
42
  var React = __toESM(require("react"));
49
43
  var import_react = __toESM(require("react"));
50
44
  var import_react_desc = require("react-desc");
51
45
  var import_ds_classnames = require("@elliemae/ds-classnames");
52
46
  var import_ds_button = __toESM(require("@elliemae/ds-button"));
53
- var import_prop_types = require("@elliemae/ds-shared/prop-types");
54
- var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
47
+ var import_ds_shared = require("@elliemae/ds-shared");
48
+ var import_ds_utilities = require("@elliemae/ds-utilities");
55
49
  var import_defaultProps = require("./defaultProps");
56
50
  const blockName = "button-group";
57
51
  const GroupContainer = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, null, ({ vertical, horizontal, spacing }) => ({
@@ -60,7 +54,7 @@ const GroupContainer = (0, import_ds_classnames.aggregatedClasses)("div")(blockN
60
54
  [spacing]: spacing
61
55
  }));
62
56
  const DSButtonGroup = ({ size, buttonType, orientation, spacing, children: buttons, containerProps }) => {
63
- (0, import_ds_props_helpers.useDeprecateComponent)({ componentName: "ds-button-group", version: "3.x" });
57
+ (0, import_ds_utilities.useDeprecateComponent)({ componentName: "ds-button-group", version: "3.x" });
64
58
  return /* @__PURE__ */ import_react.default.createElement(GroupContainer, __spreadValues({
65
59
  classProps: {
66
60
  vertical: orientation === "vertical",
@@ -79,16 +73,16 @@ DSButtonGroup.defaultProps = {
79
73
  };
80
74
  const props = {
81
75
  containerProps: import_react_desc.PropTypes.shape({}).description("props injected to wrapper of page header"),
82
- size: import_react_desc.PropTypes.oneOf(import_prop_types.dsBasicSizes).description("['s', 'm', 'l']"),
76
+ size: import_react_desc.PropTypes.oneOf(import_ds_shared.dsBasicSizes).description("['s', 'm', 'l']"),
83
77
  buttonType: import_react_desc.PropTypes.oneOf(import_ds_button.buttonTypes).description("['primary', 'secondary', 'text', 'link']"),
84
- orientation: import_react_desc.PropTypes.oneOf(import_prop_types.orientation).description("['horizontal', 'vertical']"),
85
- spacing: import_react_desc.PropTypes.oneOf(import_prop_types.dsBasicSizes).description("['s', 'm', 'l']"),
78
+ orientation: import_react_desc.PropTypes.oneOf(import_ds_shared.orientation).description("['horizontal', 'vertical']"),
79
+ spacing: import_react_desc.PropTypes.oneOf(import_ds_shared.dsBasicSizes).description("['s', 'm', 'l']"),
86
80
  children: import_react_desc.PropTypes.arrayOf(import_ds_button.default).description("Button group items to show of type DSButton")
87
81
  };
88
82
  DSButtonGroup.defaultProps = import_defaultProps.defaultProps;
89
83
  DSButtonGroup.propTypes = props;
84
+ DSButtonGroup.displayName = "DSButtonGroup";
90
85
  const DSButtonGroupWithSchema = (0, import_react_desc.describe)(DSButtonGroup);
91
86
  DSButtonGroupWithSchema.propTypes = props;
92
87
  var DSButtonGroup_default = DSButtonGroup;
93
- module.exports = __toCommonJS(DSButtonGroup_exports);
94
88
  //# 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 'react-desc';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport DSButton, { buttonTypes } from '@elliemae/ds-button';\nimport { dsBasicSizes, orientation as buttonGroupOrientation } from '@elliemae/ds-shared/prop-types';\nimport { useDeprecateComponent } from '@elliemae/ds-props-helpers';\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,2BAAkC;AAClC,uBAAsC;AACtC,wBAAoE;AACpE,8BAAsC;AACtC,0BAA6B;AAE7B,MAAM,YAAY;AAElB,MAAM,iBAAiB,4CAAkB,OAAO,WAAW,MAAM,CAAC,EAAE,UAAU,YAAY,cAAe;AAAA,EACvG;AAAA,EACA;AAAA,GACC,UAAU;AAAA;AAGb,MAAM,gBAAgB,CAAC,EAAE,MAAM,YAAY,aAAa,SAAS,UAAU,SAAS,qBAAqB;AACvG,qDAAsB,EAAE,eAAe,mBAAmB,SAAS;AAEnE,SACE,mDAAC,gBAAD;AAAA,IACE,YAAY;AAAA,MACV,UAAU,gBAAgB;AAAA,MAC1B,YAAY,gBAAgB;AAAA,MAC5B;AAAA;AAAA,KAEE,iBAEH,qBAAM,SAAS,IACd,SACA,CAAC,WACC,qBAAM,aAAa,QAAQ;AAAA,IACzB;AAAA,IACA;AAAA,KAGG,OAAO,SAEd;AAAA;AAMR,cAAc,eAAe;AAAA,EAC3B,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,aAAa;AAAA;AAGf,MAAM,QAAQ;AAAA,EAEZ,gBAAgB,4BAAU,MAAM,IAAI,YAAY;AAAA,EAIhD,MAAM,4BAAU,MAAM,gCAAc,YAAY;AAAA,EAIhD,YAAY,4BAAU,MAAM,8BAAa,YAAY;AAAA,EAIrD,aAAa,4BAAU,MAAM,+BAAwB,YAAY;AAAA,EAIjE,SAAS,4BAAU,MAAM,gCAAc,YAAY;AAAA,EAInD,UAAU,4BAAU,QAAQ,0BAAU,YAAY;AAAA;AAGpD,cAAc,eAAe;AAE7B,cAAc,YAAY;AAE1B,MAAM,0BAA0B,gCAAS;AAEzC,wBAAwB,YAAY;AAGpC,IAAO,wBAAQ;",
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;\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,wBAAoC;AACpC,2BAAkC;AAClC,uBAAsC;AACtC,uBAAoE;AACpE,0BAAsC;AACtC,0BAA6B;AAE7B,MAAM,YAAY;AAElB,MAAM,iBAAiB,4CAAkB,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,iDAAsB,EAAE,eAAe,mBAAmB,SAAS,MAAM,CAAC;AAE1E,SACE,mDAAC;AAAA,IACC,YAAY;AAAA,MACV,UAAU,gBAAgB;AAAA,MAC1B,YAAY,gBAAgB;AAAA,MAC5B;AAAA,IACF;AAAA,KACI,iBAEH,qBAAM,SAAS,IACd,SACA,CAAC,WACC,qBAAM,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,4BAAU,MAAM,CAAC,CAAC,EAAE,YAAY,0CAA0C;AAAA,EAI1F,MAAM,4BAAU,MAAM,6BAAY,EAAE,YAAY,iBAAiB;AAAA,EAIjE,YAAY,4BAAU,MAAM,4BAAW,EAAE,YAAY,0CAA0C;AAAA,EAI/F,aAAa,4BAAU,MAAM,4BAAsB,EAAE,YAAY,4BAA4B;AAAA,EAI7F,SAAS,4BAAU,MAAM,6BAAY,EAAE,YAAY,iBAAiB;AAAA,EAIpE,UAAU,4BAAU,QAAQ,wBAAQ,EAAE,YAAY,6CAA6C;AACjG;AAEA,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,cAAc,cAAc;AAE5B,MAAM,0BAA0B,gCAAS,aAAa;AAEtD,wBAAwB,YAAY;AAGpC,IAAO,wBAAQ;",
6
6
  "names": []
7
7
  }
@@ -4,36 +4,29 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
7
  var __export = (target, all) => {
9
8
  for (var name in all)
10
9
  __defProp(target, name, { get: all[name], enumerable: true });
11
10
  };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
16
  }
18
- return target;
17
+ return to;
19
18
  };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
21
  var defaultProps_exports = {};
29
22
  __export(defaultProps_exports, {
30
23
  defaultProps: () => defaultProps
31
24
  });
25
+ module.exports = __toCommonJS(defaultProps_exports);
32
26
  var React = __toESM(require("react"));
33
27
  const defaultProps = {
34
28
  spacing: null,
35
29
  children: [],
36
30
  containerProps: {}
37
31
  };
38
- module.exports = __toCommonJS(defaultProps_exports);
39
32
  //# sourceMappingURL=defaultProps.js.map
@@ -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,EACV,gBAAgB;AAAA;",
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
@@ -4,33 +4,27 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
7
  var __export = (target, all) => {
9
8
  for (var name in all)
10
9
  __defProp(target, name, { get: all[name], enumerable: true });
11
10
  };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
16
  }
18
- return target;
17
+ return to;
19
18
  };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
19
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
21
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
22
  var src_exports = {};
29
23
  __export(src_exports, {
30
24
  default: () => import_DSButtonGroup.default
31
25
  });
26
+ module.exports = __toCommonJS(src_exports);
32
27
  var React = __toESM(require("react"));
33
- __reExport(src_exports, require("./DSButtonGroup"));
28
+ __reExport(src_exports, require("./DSButtonGroup"), module.exports);
34
29
  var import_DSButtonGroup = __toESM(require("./DSButtonGroup"));
35
- module.exports = __toCommonJS(src_exports);
36
30
  //# sourceMappingURL=index.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export * from './DSButtonGroup';\nexport { default } from './DSButtonGroup';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc;AACd,2BAAwB;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,4BAAd;AACA,2BAAwB;",
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/prop-types";
23
- import { useDeprecateComponent } from "@elliemae/ds-props-helpers";
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 }) => ({
@@ -56,6 +56,7 @@ const props = {
56
56
  };
57
57
  DSButtonGroup.defaultProps = defaultProps;
58
58
  DSButtonGroup.propTypes = props;
59
+ DSButtonGroup.displayName = "DSButtonGroup";
59
60
  const DSButtonGroupWithSchema = describe(DSButtonGroup);
60
61
  DSButtonGroupWithSchema.propTypes = props;
61
62
  var DSButtonGroup_default = DSButtonGroup;
@@ -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/prop-types';\nimport { useDeprecateComponent } from '@elliemae/ds-props-helpers';\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,OAAO,WAAW,MAAM,CAAC,EAAE,UAAU,YAAY,cAAe;AAAA,EACvG;AAAA,EACA;AAAA,GACC,UAAU;AAAA;AAGb,MAAM,gBAAgB,CAAC,EAAE,MAAM,YAAY,aAAa,SAAS,UAAU,SAAS,qBAAqB;AACvG,wBAAsB,EAAE,eAAe,mBAAmB,SAAS;AAEnE,SACE,qCAAC,gBAAD;AAAA,IACE,YAAY;AAAA,MACV,UAAU,gBAAgB;AAAA,MAC1B,YAAY,gBAAgB;AAAA,MAC5B;AAAA;AAAA,KAEE,iBAEH,OAAM,SAAS,IACd,SACA,CAAC,WACC,OAAM,aAAa,QAAQ;AAAA,IACzB;AAAA,IACA;AAAA,KAGG,OAAO,SAEd;AAAA;AAMR,cAAc,eAAe;AAAA,EAC3B,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,aAAa;AAAA;AAGf,MAAM,QAAQ;AAAA,EAEZ,gBAAgB,UAAU,MAAM,IAAI,YAAY;AAAA,EAIhD,MAAM,UAAU,MAAM,cAAc,YAAY;AAAA,EAIhD,YAAY,UAAU,MAAM,aAAa,YAAY;AAAA,EAIrD,aAAa,UAAU,MAAM,wBAAwB,YAAY;AAAA,EAIjE,SAAS,UAAU,MAAM,cAAc,YAAY;AAAA,EAInD,UAAU,UAAU,QAAQ,UAAU,YAAY;AAAA;AAGpD,cAAc,eAAe;AAE7B,cAAc,YAAY;AAE1B,MAAM,0BAA0B,SAAS;AAEzC,wBAAwB,YAAY;AAGpC,IAAO,wBAAQ;",
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;\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;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;AAC7B,cAAc,YAAY;AAC1B,cAAc,cAAc;AAE5B,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,EACV,gBAAgB;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.7",
3
+ "version": "3.0.0-next.72",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Button Group",
6
6
  "files": [
@@ -42,11 +42,18 @@
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
+ },
45
52
  "dependencies": {
46
- "@elliemae/ds-button": "3.0.0-next.7",
47
- "@elliemae/ds-classnames": "3.0.0-next.7",
48
- "@elliemae/ds-props-helpers": "3.0.0-next.7",
49
- "@elliemae/ds-shared": "3.0.0-next.7",
53
+ "@elliemae/ds-button": "workspace:*",
54
+ "@elliemae/ds-classnames": "workspace:*",
55
+ "@elliemae/ds-shared": "workspace:*",
56
+ "@elliemae/ds-utilities": "workspace:*",
50
57
  "react-desc": "~4.1.3"
51
58
  },
52
59
  "devDependencies": {
@@ -60,12 +67,5 @@
60
67
  "publishConfig": {
61
68
  "access": "public",
62
69
  "typeSafety": false
63
- },
64
- "scripts": {
65
- "dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
66
- "test": "node ../../scripts/testing/test.mjs",
67
- "lint": "node ../../scripts/lint.mjs",
68
- "dts": "node ../../scripts/dts.mjs",
69
- "build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
70
70
  }
71
- }
71
+ }