@elliemae/ds-card 3.12.0-next.1 → 3.12.0-rc.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.
@@ -34,34 +34,33 @@ var import_jsx_runtime = require("react/jsx-runtime");
34
34
  var import_ds_utilities = require("@elliemae/ds-utilities");
35
35
  var import_ds_system = require("@elliemae/ds-system");
36
36
  var import_ds_icons = require("@elliemae/ds-icons");
37
- var import_ds_button = __toESM(require("@elliemae/ds-button"));
38
- const Addon = (0, import_ds_system.styled)(import_ds_button.default)`
37
+ var import_ds_button = require("@elliemae/ds-button");
38
+ const Addon = (0, import_ds_system.styled)(import_ds_button.DSButtonV2)`
39
39
  background-color: transparent;
40
- padding-right: 4px;
40
+ padding: 4px;
41
41
  height: 100%;
42
42
  border: none;
43
- font-size: 12px;
43
+ font-size: 13px;
44
44
  font-weight: ${(props) => props.theme.fontWeights.semibold};
45
45
  color: ${(props) => props.theme.colors.brand["700"]};
46
46
  cursor: pointer;
47
- &:focus,
48
- &::after {
49
- background-color: transparent;
50
- box-shadow: none !important; /* needed */
51
- border: none !important; /* needed */
52
- }
53
47
  `;
54
- const ActionAddon = ({ label, onClick, icon }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Addon, {
48
+ const ActionAddon = ({ innerRef, label, onClick, icon }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Addon, {
49
+ innerRef,
55
50
  onClick,
56
- labelText: label,
57
- icon: icon || /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronSmallDown, {
58
- color: ["brand-primary", 700]
59
- })
51
+ buttonType: "icon",
52
+ children: [
53
+ label,
54
+ icon || /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronSmallDown, {
55
+ color: ["brand-primary", 700]
56
+ })
57
+ ]
60
58
  });
61
59
  const actionProps = {
62
60
  label: import_ds_utilities.PropTypes.string.description("Addon label"),
63
61
  onClick: import_ds_utilities.PropTypes.func.description("On click callback"),
64
- icon: import_ds_utilities.PropTypes.element.description("Icon to display after the label")
62
+ icon: import_ds_utilities.PropTypes.element.description("Icon to display after the label"),
63
+ innerRef: import_ds_utilities.PropTypes.func.description("Ref to the action button")
65
64
  };
66
65
  ActionAddon.propTypes = actionProps;
67
66
  ActionAddon.displayName = "ActionAddon";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/v2/ActionAddon.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport { styled } from '@elliemae/ds-system';\nimport { ChevronSmallDown } from '@elliemae/ds-icons';\nimport Button from '@elliemae/ds-button';\n\nconst Addon = styled(Button)`\n background-color: transparent;\n padding-right: 4px;\n height: 100%;\n border: none;\n font-size: 12px;\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n color: ${(props) => props.theme.colors.brand['700']};\n cursor: pointer;\n &:focus,\n &::after {\n background-color: transparent;\n box-shadow: none !important; /* needed */\n border: none !important; /* needed */\n }\n`;\n\nconst ActionAddon = ({ label, onClick, icon }) => (\n <Addon onClick={onClick} labelText={label} icon={icon || <ChevronSmallDown color={['brand-primary', 700]} />} />\n);\n\nconst actionProps = {\n /**\n * Addon label\n */\n label: PropTypes.string.description('Addon label'),\n /**\n * On click callback\n */\n onClick: PropTypes.func.description('On click callback'),\n /**\n * Icon to display after the label\n */\n icon: PropTypes.element.description('Icon to display after the label'),\n};\n\nActionAddon.propTypes = actionProps;\nActionAddon.displayName = 'ActionAddon';\nconst DSCardActionAddonWithSchema = describe(ActionAddon);\nDSCardActionAddonWithSchema.propTypes = actionProps;\n\nexport { ActionAddon, DSCardActionAddonWithSchema };\nexport default ActionAddon;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADwBoC;AAvB3D,0BAAoC;AACpC,uBAAuB;AACvB,sBAAiC;AACjC,uBAAmB;AAEnB,MAAM,YAAQ,yBAAO,iBAAAA,OAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAMV,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,WACzC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAU/C,MAAM,cAAc,CAAC,EAAE,OAAO,SAAS,KAAK,MAC1C,4CAAC;AAAA,EAAM;AAAA,EAAkB,WAAW;AAAA,EAAO,MAAM,QAAQ,4CAAC;AAAA,IAAiB,OAAO,CAAC,iBAAiB,GAAG;AAAA,GAAG;AAAA,CAAI;AAGhH,MAAM,cAAc;AAAA,EAIlB,OAAO,8BAAU,OAAO,YAAY,aAAa;AAAA,EAIjD,SAAS,8BAAU,KAAK,YAAY,mBAAmB;AAAA,EAIvD,MAAM,8BAAU,QAAQ,YAAY,iCAAiC;AACvE;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,kCAA8B,8BAAS,WAAW;AACxD,4BAA4B,YAAY;AAGxC,IAAO,sBAAQ;",
6
- "names": ["Button"]
4
+ "sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport { styled } from '@elliemae/ds-system';\nimport { ChevronSmallDown } from '@elliemae/ds-icons';\nimport { DSButtonV2 } from '@elliemae/ds-button';\n\nconst Addon = styled(DSButtonV2)`\n background-color: transparent;\n padding: 4px;\n height: 100%;\n border: none;\n font-size: 13px;\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n color: ${(props) => props.theme.colors.brand['700']};\n cursor: pointer;\n`;\n\nconst ActionAddon = ({ innerRef, label, onClick, icon }) => (\n <Addon innerRef={innerRef} onClick={onClick} buttonType=\"icon\">\n {label}\n {icon || <ChevronSmallDown color={['brand-primary', 700]} />}\n </Addon>\n);\n\nconst actionProps = {\n /**\n * Addon label\n */\n label: PropTypes.string.description('Addon label'),\n /**\n * On click callback\n */\n onClick: PropTypes.func.description('On click callback'),\n /**\n * Icon to display after the label\n */\n icon: PropTypes.element.description('Icon to display after the label'),\n innerRef: PropTypes.func.description('Ref to the action button'),\n};\n\nActionAddon.propTypes = actionProps;\nActionAddon.displayName = 'ActionAddon';\nconst DSCardActionAddonWithSchema = describe(ActionAddon);\nDSCardActionAddonWithSchema.propTypes = actionProps;\n\nexport { ActionAddon, DSCardActionAddonWithSchema };\nexport default ActionAddon;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkBrB;AAjBF,0BAAoC;AACpC,uBAAuB;AACvB,sBAAiC;AACjC,uBAA2B;AAE3B,MAAM,YAAQ,yBAAO,2BAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAMd,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,WACzC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM;AAAA;AAAA;AAI/C,MAAM,cAAc,CAAC,EAAE,UAAU,OAAO,SAAS,KAAK,MACpD,6CAAC;AAAA,EAAM;AAAA,EAAoB;AAAA,EAAkB,YAAW;AAAA,EACrD;AAAA;AAAA,IACA,QAAQ,4CAAC;AAAA,MAAiB,OAAO,CAAC,iBAAiB,GAAG;AAAA,KAAG;AAAA;AAAA,CAC5D;AAGF,MAAM,cAAc;AAAA,EAIlB,OAAO,8BAAU,OAAO,YAAY,aAAa;AAAA,EAIjD,SAAS,8BAAU,KAAK,YAAY,mBAAmB;AAAA,EAIvD,MAAM,8BAAU,QAAQ,YAAY,iCAAiC;AAAA,EACrE,UAAU,8BAAU,KAAK,YAAY,0BAA0B;AACjE;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,kCAA8B,8BAAS,WAAW;AACxD,4BAA4B,YAAY;AAGxC,IAAO,sBAAQ;",
6
+ "names": []
7
7
  }
@@ -1,36 +1,35 @@
1
1
  import * as React from "react";
2
- import { jsx } from "react/jsx-runtime";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { PropTypes, describe } from "@elliemae/ds-utilities";
4
4
  import { styled } from "@elliemae/ds-system";
5
5
  import { ChevronSmallDown } from "@elliemae/ds-icons";
6
- import Button from "@elliemae/ds-button";
7
- const Addon = styled(Button)`
6
+ import { DSButtonV2 } from "@elliemae/ds-button";
7
+ const Addon = styled(DSButtonV2)`
8
8
  background-color: transparent;
9
- padding-right: 4px;
9
+ padding: 4px;
10
10
  height: 100%;
11
11
  border: none;
12
- font-size: 12px;
12
+ font-size: 13px;
13
13
  font-weight: ${(props) => props.theme.fontWeights.semibold};
14
14
  color: ${(props) => props.theme.colors.brand["700"]};
15
15
  cursor: pointer;
16
- &:focus,
17
- &::after {
18
- background-color: transparent;
19
- box-shadow: none !important; /* needed */
20
- border: none !important; /* needed */
21
- }
22
16
  `;
23
- const ActionAddon = ({ label, onClick, icon }) => /* @__PURE__ */ jsx(Addon, {
17
+ const ActionAddon = ({ innerRef, label, onClick, icon }) => /* @__PURE__ */ jsxs(Addon, {
18
+ innerRef,
24
19
  onClick,
25
- labelText: label,
26
- icon: icon || /* @__PURE__ */ jsx(ChevronSmallDown, {
27
- color: ["brand-primary", 700]
28
- })
20
+ buttonType: "icon",
21
+ children: [
22
+ label,
23
+ icon || /* @__PURE__ */ jsx(ChevronSmallDown, {
24
+ color: ["brand-primary", 700]
25
+ })
26
+ ]
29
27
  });
30
28
  const actionProps = {
31
29
  label: PropTypes.string.description("Addon label"),
32
30
  onClick: PropTypes.func.description("On click callback"),
33
- icon: PropTypes.element.description("Icon to display after the label")
31
+ icon: PropTypes.element.description("Icon to display after the label"),
32
+ innerRef: PropTypes.func.description("Ref to the action button")
34
33
  };
35
34
  ActionAddon.propTypes = actionProps;
36
35
  ActionAddon.displayName = "ActionAddon";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v2/ActionAddon.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport { styled } from '@elliemae/ds-system';\nimport { ChevronSmallDown } from '@elliemae/ds-icons';\nimport Button from '@elliemae/ds-button';\n\nconst Addon = styled(Button)`\n background-color: transparent;\n padding-right: 4px;\n height: 100%;\n border: none;\n font-size: 12px;\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n color: ${(props) => props.theme.colors.brand['700']};\n cursor: pointer;\n &:focus,\n &::after {\n background-color: transparent;\n box-shadow: none !important; /* needed */\n border: none !important; /* needed */\n }\n`;\n\nconst ActionAddon = ({ label, onClick, icon }) => (\n <Addon onClick={onClick} labelText={label} icon={icon || <ChevronSmallDown color={['brand-primary', 700]} />} />\n);\n\nconst actionProps = {\n /**\n * Addon label\n */\n label: PropTypes.string.description('Addon label'),\n /**\n * On click callback\n */\n onClick: PropTypes.func.description('On click callback'),\n /**\n * Icon to display after the label\n */\n icon: PropTypes.element.description('Icon to display after the label'),\n};\n\nActionAddon.propTypes = actionProps;\nActionAddon.displayName = 'ActionAddon';\nconst DSCardActionAddonWithSchema = describe(ActionAddon);\nDSCardActionAddonWithSchema.propTypes = actionProps;\n\nexport { ActionAddon, DSCardActionAddonWithSchema };\nexport default ActionAddon;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACwBoC;AAvB3D,SAAS,WAAW,gBAAgB;AACpC,SAAS,cAAc;AACvB,SAAS,wBAAwB;AACjC,OAAO,YAAY;AAEnB,MAAM,QAAQ,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAMV,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,WACzC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAU/C,MAAM,cAAc,CAAC,EAAE,OAAO,SAAS,KAAK,MAC1C,oBAAC;AAAA,EAAM;AAAA,EAAkB,WAAW;AAAA,EAAO,MAAM,QAAQ,oBAAC;AAAA,IAAiB,OAAO,CAAC,iBAAiB,GAAG;AAAA,GAAG;AAAA,CAAI;AAGhH,MAAM,cAAc;AAAA,EAIlB,OAAO,UAAU,OAAO,YAAY,aAAa;AAAA,EAIjD,SAAS,UAAU,KAAK,YAAY,mBAAmB;AAAA,EAIvD,MAAM,UAAU,QAAQ,YAAY,iCAAiC;AACvE;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,8BAA8B,SAAS,WAAW;AACxD,4BAA4B,YAAY;AAGxC,IAAO,sBAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport { styled } from '@elliemae/ds-system';\nimport { ChevronSmallDown } from '@elliemae/ds-icons';\nimport { DSButtonV2 } from '@elliemae/ds-button';\n\nconst Addon = styled(DSButtonV2)`\n background-color: transparent;\n padding: 4px;\n height: 100%;\n border: none;\n font-size: 13px;\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n color: ${(props) => props.theme.colors.brand['700']};\n cursor: pointer;\n`;\n\nconst ActionAddon = ({ innerRef, label, onClick, icon }) => (\n <Addon innerRef={innerRef} onClick={onClick} buttonType=\"icon\">\n {label}\n {icon || <ChevronSmallDown color={['brand-primary', 700]} />}\n </Addon>\n);\n\nconst actionProps = {\n /**\n * Addon label\n */\n label: PropTypes.string.description('Addon label'),\n /**\n * On click callback\n */\n onClick: PropTypes.func.description('On click callback'),\n /**\n * Icon to display after the label\n */\n icon: PropTypes.element.description('Icon to display after the label'),\n innerRef: PropTypes.func.description('Ref to the action button'),\n};\n\nActionAddon.propTypes = actionProps;\nActionAddon.displayName = 'ActionAddon';\nconst DSCardActionAddonWithSchema = describe(ActionAddon);\nDSCardActionAddonWithSchema.propTypes = actionProps;\n\nexport { ActionAddon, DSCardActionAddonWithSchema };\nexport default ActionAddon;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACkBrB,SAEW,KAFX;AAjBF,SAAS,WAAW,gBAAgB;AACpC,SAAS,cAAc;AACvB,SAAS,wBAAwB;AACjC,SAAS,kBAAkB;AAE3B,MAAM,QAAQ,OAAO,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAMd,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,WACzC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM;AAAA;AAAA;AAI/C,MAAM,cAAc,CAAC,EAAE,UAAU,OAAO,SAAS,KAAK,MACpD,qBAAC;AAAA,EAAM;AAAA,EAAoB;AAAA,EAAkB,YAAW;AAAA,EACrD;AAAA;AAAA,IACA,QAAQ,oBAAC;AAAA,MAAiB,OAAO,CAAC,iBAAiB,GAAG;AAAA,KAAG;AAAA;AAAA,CAC5D;AAGF,MAAM,cAAc;AAAA,EAIlB,OAAO,UAAU,OAAO,YAAY,aAAa;AAAA,EAIjD,SAAS,UAAU,KAAK,YAAY,mBAAmB;AAAA,EAIvD,MAAM,UAAU,QAAQ,YAAY,iCAAiC;AAAA,EACrE,UAAU,UAAU,KAAK,YAAY,0BAA0B;AACjE;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,8BAA8B,SAAS,WAAW;AACxD,4BAA4B,YAAY;AAGxC,IAAO,sBAAQ;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-card",
3
- "version": "3.12.0-next.1",
3
+ "version": "3.12.0-rc.0",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Card",
6
6
  "files": [
@@ -71,16 +71,16 @@
71
71
  "indent": 4
72
72
  },
73
73
  "dependencies": {
74
- "@elliemae/ds-button": "3.12.0-next.1",
75
- "@elliemae/ds-classnames": "3.12.0-next.1",
76
- "@elliemae/ds-form": "3.12.0-next.1",
77
- "@elliemae/ds-grid": "3.12.0-next.1",
78
- "@elliemae/ds-header": "3.12.0-next.1",
79
- "@elliemae/ds-icons": "3.12.0-next.1",
80
- "@elliemae/ds-separator": "3.12.0-next.1",
81
- "@elliemae/ds-system": "3.12.0-next.1",
82
- "@elliemae/ds-truncated-tooltip-text": "3.12.0-next.1",
83
- "@elliemae/ds-utilities": "3.12.0-next.1"
74
+ "@elliemae/ds-button": "3.12.0-rc.0",
75
+ "@elliemae/ds-classnames": "3.12.0-rc.0",
76
+ "@elliemae/ds-form": "3.12.0-rc.0",
77
+ "@elliemae/ds-grid": "3.12.0-rc.0",
78
+ "@elliemae/ds-header": "3.12.0-rc.0",
79
+ "@elliemae/ds-icons": "3.12.0-rc.0",
80
+ "@elliemae/ds-separator": "3.12.0-rc.0",
81
+ "@elliemae/ds-system": "3.12.0-rc.0",
82
+ "@elliemae/ds-truncated-tooltip-text": "3.12.0-rc.0",
83
+ "@elliemae/ds-utilities": "3.12.0-rc.0"
84
84
  },
85
85
  "devDependencies": {
86
86
  "@testing-library/jest-dom": "~5.16.4",