@elliemae/ds-button-v1 3.16.0-next.2 → 3.16.0-next.4
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.
- package/dist/cjs/DSButton.js +2 -1
- package/dist/cjs/DSButton.js.map +2 -2
- package/dist/cjs/package.json +7 -0
- package/dist/cjs/propTypes.js +20 -20
- package/dist/cjs/propTypes.js.map +2 -2
- package/dist/esm/DSButton.js +2 -1
- package/dist/esm/DSButton.js.map +2 -2
- package/dist/esm/package.json +7 -0
- package/dist/esm/propTypes.js +1 -1
- package/dist/esm/propTypes.js.map +2 -2
- package/dist/types/DSButton.d.ts +20 -20
- package/dist/types/propTypes.d.ts +19 -19
- package/package.json +6 -5
package/dist/cjs/DSButton.js
CHANGED
|
@@ -34,6 +34,7 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
34
34
|
var import_react = require("react");
|
|
35
35
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
36
36
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
37
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
37
38
|
var import_constants = require("./constants");
|
|
38
39
|
var import_propTypes = require("./propTypes");
|
|
39
40
|
var import_defaultProps = require("./defaultProps");
|
|
@@ -141,7 +142,7 @@ const DSButton = ({
|
|
|
141
142
|
DSButton.defaultProps = import_defaultProps.defaultProps;
|
|
142
143
|
DSButton.propTypes = import_propTypes.btnPropTypes;
|
|
143
144
|
DSButton.displayName = "DSButton";
|
|
144
|
-
const DSButtonWithSchema = (0,
|
|
145
|
+
const DSButtonWithSchema = (0, import_ds_props_helpers.describe)(DSButton);
|
|
145
146
|
DSButtonWithSchema.propTypes = import_propTypes.btnPropTypes;
|
|
146
147
|
var DSButton_default = DSButton;
|
|
147
148
|
//# sourceMappingURL=DSButton.js.map
|
package/dist/cjs/DSButton.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSButton.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable jest/valid-title */\nimport React, { useState, useMemo } from 'react';\nimport { aggregatedClasses, convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { cx
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable jest/valid-title */\nimport React, { useState, useMemo } from 'react';\nimport { aggregatedClasses, convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { cx } from '@elliemae/ds-utilities';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { BUTTON_TYPE, BUTTON_SIZE, BUTTON_VARIANT } from './constants';\nimport { btnPropTypes } from './propTypes';\nimport { defaultProps } from './defaultProps';\n\nconst blockName = 'button';\n\nconst getContainer = (Element) =>\n aggregatedClasses(Element)(\n blockName,\n null,\n ({ iconOnly, variant }) => ({\n 'icon-only': iconOnly,\n [variant]: variant,\n }),\n {\n propsToRemoveFromFinalElement: ['cx'],\n },\n );\n\ninterface ButtonPropsT {\n [x: string]: unknown;\n disabled?: boolean;\n fluidWidth?: boolean;\n innerRef?: unknown;\n buttonType?: (typeof BUTTON_TYPE)[keyof typeof BUTTON_TYPE];\n size?: (typeof BUTTON_SIZE)[keyof typeof BUTTON_SIZE];\n variant?: (typeof BUTTON_VARIANT)[keyof typeof BUTTON_VARIANT];\n labelText?: string;\n icon?: JSX.Element;\n leftIcon?: JSX.Element;\n tabIndex?: number;\n intent?: 'success' | 'danger' | 'warning' | 'info';\n containerProps?: { [x: string]: unknown };\n className?: string;\n as?: string | JSX.Element;\n type?: 'button' | 'text';\n onBlur?: React.FocusEventHandler<HTMLElement>;\n onClick?: (event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>) => void;\n onKeyPress?: React.KeyboardEventHandler<HTMLElement>;\n}\n\n// eslint-disable-next-line complexity\nconst DSButton = ({\n innerRef,\n disabled,\n buttonType,\n fluidWidth,\n size,\n labelText,\n icon,\n onBlur,\n onClick,\n onKeyPress,\n leftIcon,\n tabIndex,\n variant,\n intent,\n containerProps,\n className,\n as: Component,\n type,\n ...rest\n}: ButtonPropsT) => {\n const [pressed, setPressed] = useState(false);\n const Button = useMemo(() => getContainer(Component), [Component]);\n const intentBlockName = `${blockName}${intent ? `-${intent}` : ''}`;\n const { cssClassName: intentClassName } = convertPropToCssClassName(intentBlockName);\n return (\n <Button\n data-testid={(containerProps && containerProps['data-testid']) || 'button-wrapper'}\n {...rest}\n {...containerProps}\n aria-disabled={rest['aria-disabled'] !== undefined ? rest['aria-disabled'] : disabled}\n aria-label={rest['aria-label'] || labelText || 'button'}\n aria-pressed={pressed}\n className={cx(intentClassName, className)}\n classProps={{\n disabled,\n // DON'T CHANGE FOR defaultProps\n // using OR to keep ButtonGroup behavior at packages/ds-basic/src/ButtonGroup/DSButtonGroup\n buttonType: buttonType || BUTTON_TYPE.PRIMARY,\n // using or to keep ButtonGroup behavior at packages/ds-basic/src/ButtonGroup/DSButtonGroup\n size: size || BUTTON_SIZE.M,\n fluidWidth,\n iconOnly: !labelText && (icon || leftIcon),\n variant: disabled ? BUTTON_VARIANT.DISABLED : variant,\n }}\n disabled={disabled} // https://jira.elliemae.io/browse/PUI-1215\n innerRef={innerRef}\n onBlur={(e: React.FocusEvent<HTMLElement>) => {\n if (disabled) return;\n setPressed(false);\n if (onBlur) onBlur(e);\n }}\n onClick={(e: React.MouseEvent<HTMLElement>) => {\n if (disabled) return;\n setPressed(true);\n if (onClick) onClick(e);\n }}\n onKeyPress={(e: React.KeyboardEvent<HTMLElement>) => {\n if (disabled) return;\n e.preventDefault();\n if (e.key === 'Enter') {\n setPressed(true);\n if (onClick) onClick(e);\n }\n if (onKeyPress) onKeyPress(e);\n }}\n tabIndex={tabIndex}\n type={type}\n >\n {leftIcon}\n {labelText && (\n <span\n className={`label-wrapper ${icon || leftIcon ? 'with-icon' : 'no-icon'}`}\n data-testid=\"button-label\"\n role=\"presentation\"\n >\n <span>{labelText}</span>\n </span>\n )}\n {icon}\n </Button>\n );\n};\n\nDSButton.defaultProps = defaultProps;\nDSButton.propTypes = btnPropTypes;\nDSButton.displayName = 'DSButton';\n\nconst DSButtonWithSchema = describe(DSButton);\nDSButtonWithSchema.propTypes = btnPropTypes;\n\nexport { DSButton, DSButtonWithSchema };\nexport default DSButton;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD0EnB;AAxEJ,mBAAyC;AACzC,2BAA6D;AAC7D,0BAAmB;AACnB,8BAAyB;AACzB,uBAAyD;AACzD,uBAA6B;AAC7B,0BAA6B;AAE7B,MAAM,YAAY;AAElB,MAAM,eAAe,CAAC,gBACpB,wCAAkB,OAAO;AAAA,EACvB;AAAA,EACA;AAAA,EACA,CAAC,EAAE,UAAU,QAAQ,OAAO;AAAA,IAC1B,aAAa;AAAA,IACb,CAAC,UAAU;AAAA,EACb;AAAA,EACA;AAAA,IACE,+BAA+B,CAAC,IAAI;AAAA,EACtC;AACF;AAyBF,MAAM,WAAW,CAAC;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,IAAI;AAAA,EACJ;AAAA,KACG;AACL,MAAoB;AAClB,QAAM,CAAC,SAAS,UAAU,QAAI,uBAAS,KAAK;AAC5C,QAAM,aAAS,sBAAQ,MAAM,aAAa,SAAS,GAAG,CAAC,SAAS,CAAC;AACjE,QAAM,kBAAkB,GAAG,YAAY,SAAS,IAAI,WAAW;AAC/D,QAAM,EAAE,cAAc,gBAAgB,QAAI,gDAA0B,eAAe;AACnF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAc,kBAAkB,eAAe,kBAAmB;AAAA,MACjE,GAAG;AAAA,MACH,GAAG;AAAA,MACJ,iBAAe,KAAK,qBAAqB,SAAY,KAAK,mBAAmB;AAAA,MAC7E,cAAY,KAAK,iBAAiB,aAAa;AAAA,MAC/C,gBAAc;AAAA,MACd,eAAW,wBAAG,iBAAiB,SAAS;AAAA,MACxC,YAAY;AAAA,QACV;AAAA,QAGA,YAAY,cAAc,6BAAY;AAAA,QAEtC,MAAM,QAAQ,6BAAY;AAAA,QAC1B;AAAA,QACA,UAAU,CAAC,cAAc,QAAQ;AAAA,QACjC,SAAS,WAAW,gCAAe,WAAW;AAAA,MAChD;AAAA,MACA;AAAA,MACA;AAAA,MACA,QAAQ,CAAC,MAAqC;AAC5C,YAAI;AAAU;AACd,mBAAW,KAAK;AAChB,YAAI;AAAQ,iBAAO,CAAC;AAAA,MACtB;AAAA,MACA,SAAS,CAAC,MAAqC;AAC7C,YAAI;AAAU;AACd,mBAAW,IAAI;AACf,YAAI;AAAS,kBAAQ,CAAC;AAAA,MACxB;AAAA,MACA,YAAY,CAAC,MAAwC;AACnD,YAAI;AAAU;AACd,UAAE,eAAe;AACjB,YAAI,EAAE,QAAQ,SAAS;AACrB,qBAAW,IAAI;AACf,cAAI;AAAS,oBAAQ,CAAC;AAAA,QACxB;AACA,YAAI;AAAY,qBAAW,CAAC;AAAA,MAC9B;AAAA,MACA;AAAA,MACA;AAAA,MAEC;AAAA;AAAA,QACA,aACC;AAAA,UAAC;AAAA;AAAA,YACC,WAAW,iBAAiB,QAAQ,WAAW,cAAc;AAAA,YAC7D,eAAY;AAAA,YACZ,MAAK;AAAA,YAEL,sDAAC,UAAM,qBAAU;AAAA;AAAA,QACnB;AAAA,QAED;AAAA;AAAA;AAAA,EACH;AAEJ;AAEA,SAAS,eAAe;AACxB,SAAS,YAAY;AACrB,SAAS,cAAc;AAEvB,MAAM,yBAAqB,kCAAS,QAAQ;AAC5C,mBAAmB,YAAY;AAG/B,IAAO,mBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/propTypes.js
CHANGED
|
@@ -28,34 +28,34 @@ __export(propTypes_exports, {
|
|
|
28
28
|
});
|
|
29
29
|
module.exports = __toCommonJS(propTypes_exports);
|
|
30
30
|
var React = __toESM(require("react"));
|
|
31
|
-
var
|
|
31
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
32
32
|
var import_ds_shared = require("@elliemae/ds-shared");
|
|
33
33
|
var import_constants = require("./constants");
|
|
34
34
|
const btnPropTypes = {
|
|
35
|
-
tabIndex:
|
|
36
|
-
className:
|
|
37
|
-
"aria-disabled":
|
|
38
|
-
as:
|
|
39
|
-
disabled:
|
|
40
|
-
fluidWidth:
|
|
41
|
-
labelText:
|
|
35
|
+
tabIndex: import_ds_props_helpers.PropTypes.number.description("Tab index"),
|
|
36
|
+
className: import_ds_props_helpers.PropTypes.string.description("Additional className"),
|
|
37
|
+
"aria-disabled": import_ds_props_helpers.PropTypes.string.description("aria disabled"),
|
|
38
|
+
as: import_ds_props_helpers.PropTypes.string.description("Html tag").defaultValue("button"),
|
|
39
|
+
disabled: import_ds_props_helpers.PropTypes.bool.description("Whether the button is disabled or not"),
|
|
40
|
+
fluidWidth: import_ds_props_helpers.PropTypes.bool.description("Make the content of the button fit the button container or not"),
|
|
41
|
+
labelText: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.string, import_ds_props_helpers.PropTypes.element]).description(
|
|
42
42
|
"Displayable label inside the button"
|
|
43
43
|
),
|
|
44
|
-
icon:
|
|
45
|
-
leftIcon:
|
|
46
|
-
buttonType:
|
|
47
|
-
size:
|
|
48
|
-
type:
|
|
49
|
-
variant:
|
|
50
|
-
innerRef:
|
|
44
|
+
icon: import_ds_props_helpers.PropTypes.element.description("Put an icon inside the button"),
|
|
45
|
+
leftIcon: import_ds_props_helpers.PropTypes.element.description("Put an icon on the left side of the button"),
|
|
46
|
+
buttonType: import_ds_props_helpers.PropTypes.oneOf(import_constants.buttonTypes).description("type of the button"),
|
|
47
|
+
size: import_ds_props_helpers.PropTypes.oneOf(import_ds_shared.dsBasicSizes).description("size of the button"),
|
|
48
|
+
type: import_ds_props_helpers.PropTypes.oneOf(["button", "submit"]).description("type of the button"),
|
|
49
|
+
variant: import_ds_props_helpers.PropTypes.oneOf(import_constants.buttonVariants).description("variant of the button"),
|
|
50
|
+
innerRef: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.func, import_ds_props_helpers.PropTypes.shape({ current: import_ds_props_helpers.PropTypes.any })]).description(
|
|
51
51
|
"reference to the component"
|
|
52
52
|
),
|
|
53
|
-
onBlur:
|
|
54
|
-
intent:
|
|
53
|
+
onBlur: import_ds_props_helpers.PropTypes.func.description("Allows a function that is triggered once the button is blur"),
|
|
54
|
+
intent: import_ds_props_helpers.PropTypes.oneOf(["success", "warning", "danger", "info"]).description(
|
|
55
55
|
'Apply intent color. Only valid with buttonType="text"'
|
|
56
56
|
),
|
|
57
|
-
containerProps:
|
|
58
|
-
onClick:
|
|
59
|
-
onKeyPress:
|
|
57
|
+
containerProps: import_ds_props_helpers.PropTypes.object.description("additional props for the container"),
|
|
58
|
+
onClick: import_ds_props_helpers.PropTypes.func.description("Allows a function that is triggered once the button is clicked"),
|
|
59
|
+
onKeyPress: import_ds_props_helpers.PropTypes.func.description("Allows a function that is triggered once the button is key pressed")
|
|
60
60
|
};
|
|
61
61
|
//# sourceMappingURL=propTypes.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/propTypes.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable no-unused-vars */\nimport { PropTypes } from '@elliemae/ds-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable no-unused-vars */\n\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { dsBasicSizes } from '@elliemae/ds-shared';\nimport { buttonTypes, buttonVariants } from './constants';\n\nexport const btnPropTypes = {\n /**\n * Tab index\n */\n tabIndex: PropTypes.number.description('Tab index'),\n /**\n * Additional className\n */\n className: PropTypes.string.description('Additional className'),\n /**\n * aria disabled\n */\n 'aria-disabled': PropTypes.string.description('aria disabled'),\n /**\n * Html tag. default 'button'\n */\n as: PropTypes.string.description('Html tag').defaultValue('button'),\n /**\n * Whether the button is disabled or not\n */\n disabled: PropTypes.bool.description('Whether the button is disabled or not'),\n /**\n * Make the content of the button fit the button container or not\n */\n fluidWidth: PropTypes.bool.description('Make the content of the button fit the button container or not'),\n /**\n * Displayable label inside the button\n */\n labelText: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description(\n 'Displayable label inside the button',\n ),\n /**\n * Put an icon inside the button\n */\n icon: PropTypes.element.description('Put an icon inside the button'),\n /**\n * Put an icon on the left side of the button\n */\n leftIcon: PropTypes.element.description('Put an icon on the left side of the button'),\n /**\n * ['primary', 'secondary', 'text', 'link']\n */\n buttonType: PropTypes.oneOf(buttonTypes).description('type of the button'),\n /**\n * ['s', 'm', 'l']\n */\n size: PropTypes.oneOf(dsBasicSizes).description('size of the button'),\n /**\n * submit or button\n */\n type: PropTypes.oneOf(['button', 'submit']).description('type of the button'),\n /**\n * [\n * 'variant-default',\n * 'variant-focus',\n * 'variant-active',\n * 'variant-disabled',\n * ]\n */\n variant: PropTypes.oneOf(buttonVariants).description('variant of the button'),\n /**\n * Refence\n */\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]).description(\n 'reference to the component',\n ),\n /**\n * Onblur callback\n */\n onBlur: PropTypes.func.description('Allows a function that is triggered once the button is blur'),\n /**\n * Apply intent color: ['success', 'warning', 'danger', 'info']\n * Only valid with buttonType=\"text\"\n */\n intent: PropTypes.oneOf(['success', 'warning', 'danger', 'info']).description(\n 'Apply intent color. Only valid with buttonType=\"text\"',\n ),\n /**\n * additional props for the container\n */\n containerProps: PropTypes.object.description('additional props for the container'),\n /**\n * Allows a function that is triggered once the button is clicked\n */\n onClick: PropTypes.func.description('Allows a function that is triggered once the button is clicked'),\n /**\n * Allows a function that is triggered once the button is key pressed\n */\n onKeyPress: PropTypes.func.description('Allows a function that is triggered once the button is key pressed'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAA0B;AAC1B,uBAA6B;AAC7B,uBAA4C;AAErC,MAAM,eAAe;AAAA,EAI1B,UAAU,kCAAU,OAAO,YAAY,WAAW;AAAA,EAIlD,WAAW,kCAAU,OAAO,YAAY,sBAAsB;AAAA,EAI9D,iBAAiB,kCAAU,OAAO,YAAY,eAAe;AAAA,EAI7D,IAAI,kCAAU,OAAO,YAAY,UAAU,EAAE,aAAa,QAAQ;AAAA,EAIlE,UAAU,kCAAU,KAAK,YAAY,uCAAuC;AAAA,EAI5E,YAAY,kCAAU,KAAK,YAAY,gEAAgE;AAAA,EAIvG,WAAW,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,OAAO,CAAC,EAAE;AAAA,IACpE;AAAA,EACF;AAAA,EAIA,MAAM,kCAAU,QAAQ,YAAY,+BAA+B;AAAA,EAInE,UAAU,kCAAU,QAAQ,YAAY,4CAA4C;AAAA,EAIpF,YAAY,kCAAU,MAAM,4BAAW,EAAE,YAAY,oBAAoB;AAAA,EAIzE,MAAM,kCAAU,MAAM,6BAAY,EAAE,YAAY,oBAAoB;AAAA,EAIpE,MAAM,kCAAU,MAAM,CAAC,UAAU,QAAQ,CAAC,EAAE,YAAY,oBAAoB;AAAA,EAS5E,SAAS,kCAAU,MAAM,+BAAc,EAAE,YAAY,uBAAuB;AAAA,EAI5E,UAAU,kCAAU,UAAU,CAAC,kCAAU,MAAM,kCAAU,MAAM,EAAE,SAAS,kCAAU,IAAI,CAAC,CAAC,CAAC,EAAE;AAAA,IAC3F;AAAA,EACF;AAAA,EAIA,QAAQ,kCAAU,KAAK,YAAY,6DAA6D;AAAA,EAKhG,QAAQ,kCAAU,MAAM,CAAC,WAAW,WAAW,UAAU,MAAM,CAAC,EAAE;AAAA,IAChE;AAAA,EACF;AAAA,EAIA,gBAAgB,kCAAU,OAAO,YAAY,oCAAoC;AAAA,EAIjF,SAAS,kCAAU,KAAK,YAAY,gEAAgE;AAAA,EAIpG,YAAY,kCAAU,KAAK,YAAY,oEAAoE;AAC7G;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/DSButton.js
CHANGED
|
@@ -2,7 +2,8 @@ import * as React from "react";
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useState, useMemo } from "react";
|
|
4
4
|
import { aggregatedClasses, convertPropToCssClassName } from "@elliemae/ds-classnames";
|
|
5
|
-
import { cx
|
|
5
|
+
import { cx } from "@elliemae/ds-utilities";
|
|
6
|
+
import { describe } from "@elliemae/ds-props-helpers";
|
|
6
7
|
import { BUTTON_TYPE, BUTTON_SIZE, BUTTON_VARIANT } from "./constants";
|
|
7
8
|
import { btnPropTypes } from "./propTypes";
|
|
8
9
|
import { defaultProps } from "./defaultProps";
|
package/dist/esm/DSButton.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSButton.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable jest/valid-title */\nimport React, { useState, useMemo } from 'react';\nimport { aggregatedClasses, convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { cx
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable jest/valid-title */\nimport React, { useState, useMemo } from 'react';\nimport { aggregatedClasses, convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { cx } from '@elliemae/ds-utilities';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { BUTTON_TYPE, BUTTON_SIZE, BUTTON_VARIANT } from './constants';\nimport { btnPropTypes } from './propTypes';\nimport { defaultProps } from './defaultProps';\n\nconst blockName = 'button';\n\nconst getContainer = (Element) =>\n aggregatedClasses(Element)(\n blockName,\n null,\n ({ iconOnly, variant }) => ({\n 'icon-only': iconOnly,\n [variant]: variant,\n }),\n {\n propsToRemoveFromFinalElement: ['cx'],\n },\n );\n\ninterface ButtonPropsT {\n [x: string]: unknown;\n disabled?: boolean;\n fluidWidth?: boolean;\n innerRef?: unknown;\n buttonType?: (typeof BUTTON_TYPE)[keyof typeof BUTTON_TYPE];\n size?: (typeof BUTTON_SIZE)[keyof typeof BUTTON_SIZE];\n variant?: (typeof BUTTON_VARIANT)[keyof typeof BUTTON_VARIANT];\n labelText?: string;\n icon?: JSX.Element;\n leftIcon?: JSX.Element;\n tabIndex?: number;\n intent?: 'success' | 'danger' | 'warning' | 'info';\n containerProps?: { [x: string]: unknown };\n className?: string;\n as?: string | JSX.Element;\n type?: 'button' | 'text';\n onBlur?: React.FocusEventHandler<HTMLElement>;\n onClick?: (event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>) => void;\n onKeyPress?: React.KeyboardEventHandler<HTMLElement>;\n}\n\n// eslint-disable-next-line complexity\nconst DSButton = ({\n innerRef,\n disabled,\n buttonType,\n fluidWidth,\n size,\n labelText,\n icon,\n onBlur,\n onClick,\n onKeyPress,\n leftIcon,\n tabIndex,\n variant,\n intent,\n containerProps,\n className,\n as: Component,\n type,\n ...rest\n}: ButtonPropsT) => {\n const [pressed, setPressed] = useState(false);\n const Button = useMemo(() => getContainer(Component), [Component]);\n const intentBlockName = `${blockName}${intent ? `-${intent}` : ''}`;\n const { cssClassName: intentClassName } = convertPropToCssClassName(intentBlockName);\n return (\n <Button\n data-testid={(containerProps && containerProps['data-testid']) || 'button-wrapper'}\n {...rest}\n {...containerProps}\n aria-disabled={rest['aria-disabled'] !== undefined ? rest['aria-disabled'] : disabled}\n aria-label={rest['aria-label'] || labelText || 'button'}\n aria-pressed={pressed}\n className={cx(intentClassName, className)}\n classProps={{\n disabled,\n // DON'T CHANGE FOR defaultProps\n // using OR to keep ButtonGroup behavior at packages/ds-basic/src/ButtonGroup/DSButtonGroup\n buttonType: buttonType || BUTTON_TYPE.PRIMARY,\n // using or to keep ButtonGroup behavior at packages/ds-basic/src/ButtonGroup/DSButtonGroup\n size: size || BUTTON_SIZE.M,\n fluidWidth,\n iconOnly: !labelText && (icon || leftIcon),\n variant: disabled ? BUTTON_VARIANT.DISABLED : variant,\n }}\n disabled={disabled} // https://jira.elliemae.io/browse/PUI-1215\n innerRef={innerRef}\n onBlur={(e: React.FocusEvent<HTMLElement>) => {\n if (disabled) return;\n setPressed(false);\n if (onBlur) onBlur(e);\n }}\n onClick={(e: React.MouseEvent<HTMLElement>) => {\n if (disabled) return;\n setPressed(true);\n if (onClick) onClick(e);\n }}\n onKeyPress={(e: React.KeyboardEvent<HTMLElement>) => {\n if (disabled) return;\n e.preventDefault();\n if (e.key === 'Enter') {\n setPressed(true);\n if (onClick) onClick(e);\n }\n if (onKeyPress) onKeyPress(e);\n }}\n tabIndex={tabIndex}\n type={type}\n >\n {leftIcon}\n {labelText && (\n <span\n className={`label-wrapper ${icon || leftIcon ? 'with-icon' : 'no-icon'}`}\n data-testid=\"button-label\"\n role=\"presentation\"\n >\n <span>{labelText}</span>\n </span>\n )}\n {icon}\n </Button>\n );\n};\n\nDSButton.defaultProps = defaultProps;\nDSButton.propTypes = btnPropTypes;\nDSButton.displayName = 'DSButton';\n\nconst DSButtonWithSchema = describe(DSButton);\nDSButtonWithSchema.propTypes = btnPropTypes;\n\nexport { DSButton, DSButtonWithSchema };\nexport default DSButton;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC0EnB,SAkDM,KAlDN;AAxEJ,SAAgB,UAAU,eAAe;AACzC,SAAS,mBAAmB,iCAAiC;AAC7D,SAAS,UAAU;AACnB,SAAS,gBAAgB;AACzB,SAAS,aAAa,aAAa,sBAAsB;AACzD,SAAS,oBAAoB;AAC7B,SAAS,oBAAoB;AAE7B,MAAM,YAAY;AAElB,MAAM,eAAe,CAAC,YACpB,kBAAkB,OAAO;AAAA,EACvB;AAAA,EACA;AAAA,EACA,CAAC,EAAE,UAAU,QAAQ,OAAO;AAAA,IAC1B,aAAa;AAAA,IACb,CAAC,UAAU;AAAA,EACb;AAAA,EACA;AAAA,IACE,+BAA+B,CAAC,IAAI;AAAA,EACtC;AACF;AAyBF,MAAM,WAAW,CAAC;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,IAAI;AAAA,EACJ;AAAA,KACG;AACL,MAAoB;AAClB,QAAM,CAAC,SAAS,UAAU,IAAI,SAAS,KAAK;AAC5C,QAAM,SAAS,QAAQ,MAAM,aAAa,SAAS,GAAG,CAAC,SAAS,CAAC;AACjE,QAAM,kBAAkB,GAAG,YAAY,SAAS,IAAI,WAAW;AAC/D,QAAM,EAAE,cAAc,gBAAgB,IAAI,0BAA0B,eAAe;AACnF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAc,kBAAkB,eAAe,kBAAmB;AAAA,MACjE,GAAG;AAAA,MACH,GAAG;AAAA,MACJ,iBAAe,KAAK,qBAAqB,SAAY,KAAK,mBAAmB;AAAA,MAC7E,cAAY,KAAK,iBAAiB,aAAa;AAAA,MAC/C,gBAAc;AAAA,MACd,WAAW,GAAG,iBAAiB,SAAS;AAAA,MACxC,YAAY;AAAA,QACV;AAAA,QAGA,YAAY,cAAc,YAAY;AAAA,QAEtC,MAAM,QAAQ,YAAY;AAAA,QAC1B;AAAA,QACA,UAAU,CAAC,cAAc,QAAQ;AAAA,QACjC,SAAS,WAAW,eAAe,WAAW;AAAA,MAChD;AAAA,MACA;AAAA,MACA;AAAA,MACA,QAAQ,CAAC,MAAqC;AAC5C,YAAI;AAAU;AACd,mBAAW,KAAK;AAChB,YAAI;AAAQ,iBAAO,CAAC;AAAA,MACtB;AAAA,MACA,SAAS,CAAC,MAAqC;AAC7C,YAAI;AAAU;AACd,mBAAW,IAAI;AACf,YAAI;AAAS,kBAAQ,CAAC;AAAA,MACxB;AAAA,MACA,YAAY,CAAC,MAAwC;AACnD,YAAI;AAAU;AACd,UAAE,eAAe;AACjB,YAAI,EAAE,QAAQ,SAAS;AACrB,qBAAW,IAAI;AACf,cAAI;AAAS,oBAAQ,CAAC;AAAA,QACxB;AACA,YAAI;AAAY,qBAAW,CAAC;AAAA,MAC9B;AAAA,MACA;AAAA,MACA;AAAA,MAEC;AAAA;AAAA,QACA,aACC;AAAA,UAAC;AAAA;AAAA,YACC,WAAW,iBAAiB,QAAQ,WAAW,cAAc;AAAA,YAC7D,eAAY;AAAA,YACZ,MAAK;AAAA,YAEL,8BAAC,UAAM,qBAAU;AAAA;AAAA,QACnB;AAAA,QAED;AAAA;AAAA;AAAA,EACH;AAEJ;AAEA,SAAS,eAAe;AACxB,SAAS,YAAY;AACrB,SAAS,cAAc;AAEvB,MAAM,qBAAqB,SAAS,QAAQ;AAC5C,mBAAmB,YAAY;AAG/B,IAAO,mBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/propTypes.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { PropTypes } from "@elliemae/ds-
|
|
2
|
+
import { PropTypes } from "@elliemae/ds-props-helpers";
|
|
3
3
|
import { dsBasicSizes } from "@elliemae/ds-shared";
|
|
4
4
|
import { buttonTypes, buttonVariants } from "./constants";
|
|
5
5
|
const btnPropTypes = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/propTypes.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-unused-vars */\nimport { PropTypes } from '@elliemae/ds-
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-unused-vars */\n\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { dsBasicSizes } from '@elliemae/ds-shared';\nimport { buttonTypes, buttonVariants } from './constants';\n\nexport const btnPropTypes = {\n /**\n * Tab index\n */\n tabIndex: PropTypes.number.description('Tab index'),\n /**\n * Additional className\n */\n className: PropTypes.string.description('Additional className'),\n /**\n * aria disabled\n */\n 'aria-disabled': PropTypes.string.description('aria disabled'),\n /**\n * Html tag. default 'button'\n */\n as: PropTypes.string.description('Html tag').defaultValue('button'),\n /**\n * Whether the button is disabled or not\n */\n disabled: PropTypes.bool.description('Whether the button is disabled or not'),\n /**\n * Make the content of the button fit the button container or not\n */\n fluidWidth: PropTypes.bool.description('Make the content of the button fit the button container or not'),\n /**\n * Displayable label inside the button\n */\n labelText: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description(\n 'Displayable label inside the button',\n ),\n /**\n * Put an icon inside the button\n */\n icon: PropTypes.element.description('Put an icon inside the button'),\n /**\n * Put an icon on the left side of the button\n */\n leftIcon: PropTypes.element.description('Put an icon on the left side of the button'),\n /**\n * ['primary', 'secondary', 'text', 'link']\n */\n buttonType: PropTypes.oneOf(buttonTypes).description('type of the button'),\n /**\n * ['s', 'm', 'l']\n */\n size: PropTypes.oneOf(dsBasicSizes).description('size of the button'),\n /**\n * submit or button\n */\n type: PropTypes.oneOf(['button', 'submit']).description('type of the button'),\n /**\n * [\n * 'variant-default',\n * 'variant-focus',\n * 'variant-active',\n * 'variant-disabled',\n * ]\n */\n variant: PropTypes.oneOf(buttonVariants).description('variant of the button'),\n /**\n * Refence\n */\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]).description(\n 'reference to the component',\n ),\n /**\n * Onblur callback\n */\n onBlur: PropTypes.func.description('Allows a function that is triggered once the button is blur'),\n /**\n * Apply intent color: ['success', 'warning', 'danger', 'info']\n * Only valid with buttonType=\"text\"\n */\n intent: PropTypes.oneOf(['success', 'warning', 'danger', 'info']).description(\n 'Apply intent color. Only valid with buttonType=\"text\"',\n ),\n /**\n * additional props for the container\n */\n containerProps: PropTypes.object.description('additional props for the container'),\n /**\n * Allows a function that is triggered once the button is clicked\n */\n onClick: PropTypes.func.description('Allows a function that is triggered once the button is clicked'),\n /**\n * Allows a function that is triggered once the button is key pressed\n */\n onKeyPress: PropTypes.func.description('Allows a function that is triggered once the button is key pressed'),\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,iBAAiB;AAC1B,SAAS,oBAAoB;AAC7B,SAAS,aAAa,sBAAsB;AAErC,MAAM,eAAe;AAAA,EAI1B,UAAU,UAAU,OAAO,YAAY,WAAW;AAAA,EAIlD,WAAW,UAAU,OAAO,YAAY,sBAAsB;AAAA,EAI9D,iBAAiB,UAAU,OAAO,YAAY,eAAe;AAAA,EAI7D,IAAI,UAAU,OAAO,YAAY,UAAU,EAAE,aAAa,QAAQ;AAAA,EAIlE,UAAU,UAAU,KAAK,YAAY,uCAAuC;AAAA,EAI5E,YAAY,UAAU,KAAK,YAAY,gEAAgE;AAAA,EAIvG,WAAW,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,OAAO,CAAC,EAAE;AAAA,IACpE;AAAA,EACF;AAAA,EAIA,MAAM,UAAU,QAAQ,YAAY,+BAA+B;AAAA,EAInE,UAAU,UAAU,QAAQ,YAAY,4CAA4C;AAAA,EAIpF,YAAY,UAAU,MAAM,WAAW,EAAE,YAAY,oBAAoB;AAAA,EAIzE,MAAM,UAAU,MAAM,YAAY,EAAE,YAAY,oBAAoB;AAAA,EAIpE,MAAM,UAAU,MAAM,CAAC,UAAU,QAAQ,CAAC,EAAE,YAAY,oBAAoB;AAAA,EAS5E,SAAS,UAAU,MAAM,cAAc,EAAE,YAAY,uBAAuB;AAAA,EAI5E,UAAU,UAAU,UAAU,CAAC,UAAU,MAAM,UAAU,MAAM,EAAE,SAAS,UAAU,IAAI,CAAC,CAAC,CAAC,EAAE;AAAA,IAC3F;AAAA,EACF;AAAA,EAIA,QAAQ,UAAU,KAAK,YAAY,6DAA6D;AAAA,EAKhG,QAAQ,UAAU,MAAM,CAAC,WAAW,WAAW,UAAU,MAAM,CAAC,EAAE;AAAA,IAChE;AAAA,EACF;AAAA,EAIA,gBAAgB,UAAU,OAAO,YAAY,oCAAoC;AAAA,EAIjF,SAAS,UAAU,KAAK,YAAY,gEAAgE;AAAA,EAIpG,YAAY,UAAU,KAAK,YAAY,oEAAoE;AAC7G;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/types/DSButton.d.ts
CHANGED
|
@@ -41,28 +41,28 @@ declare const DSButton: {
|
|
|
41
41
|
type: string;
|
|
42
42
|
};
|
|
43
43
|
propTypes: {
|
|
44
|
-
tabIndex: import("@elliemae/ds-
|
|
45
|
-
className: import("@elliemae/ds-
|
|
46
|
-
'aria-disabled': import("@elliemae/ds-
|
|
47
|
-
as: import("@elliemae/ds-
|
|
48
|
-
disabled: import("@elliemae/ds-
|
|
49
|
-
fluidWidth: import("@elliemae/ds-
|
|
50
|
-
labelText: import("@elliemae/ds-
|
|
51
|
-
icon: import("@elliemae/ds-
|
|
52
|
-
leftIcon: import("@elliemae/ds-
|
|
53
|
-
buttonType: import("@elliemae/ds-
|
|
54
|
-
size: import("@elliemae/ds-
|
|
55
|
-
type: import("@elliemae/ds-
|
|
56
|
-
variant: import("@elliemae/ds-
|
|
57
|
-
innerRef: import("@elliemae/ds-
|
|
58
|
-
onBlur: import("@elliemae/ds-
|
|
59
|
-
intent: import("@elliemae/ds-
|
|
60
|
-
containerProps: import("@elliemae/ds-
|
|
61
|
-
onClick: import("@elliemae/ds-
|
|
62
|
-
onKeyPress: import("@elliemae/ds-
|
|
44
|
+
tabIndex: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
45
|
+
className: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
46
|
+
'aria-disabled': import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
47
|
+
as: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
48
|
+
disabled: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
49
|
+
fluidWidth: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
50
|
+
labelText: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
51
|
+
icon: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
52
|
+
leftIcon: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
53
|
+
buttonType: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
54
|
+
size: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
55
|
+
type: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
56
|
+
variant: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
57
|
+
innerRef: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
58
|
+
onBlur: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
59
|
+
intent: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
60
|
+
containerProps: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
61
|
+
onClick: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
62
|
+
onKeyPress: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
63
63
|
};
|
|
64
64
|
displayName: string;
|
|
65
65
|
};
|
|
66
|
-
declare const DSButtonWithSchema: import("@elliemae/ds-
|
|
66
|
+
declare const DSButtonWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").DocumentedReactComponent<ButtonPropsT>;
|
|
67
67
|
export { DSButton, DSButtonWithSchema };
|
|
68
68
|
export default DSButton;
|
|
@@ -2,51 +2,51 @@ export declare const btnPropTypes: {
|
|
|
2
2
|
/**
|
|
3
3
|
* Tab index
|
|
4
4
|
*/
|
|
5
|
-
tabIndex: import("@elliemae/ds-
|
|
5
|
+
tabIndex: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
6
6
|
/**
|
|
7
7
|
* Additional className
|
|
8
8
|
*/
|
|
9
|
-
className: import("@elliemae/ds-
|
|
9
|
+
className: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
10
10
|
/**
|
|
11
11
|
* aria disabled
|
|
12
12
|
*/
|
|
13
|
-
'aria-disabled': import("@elliemae/ds-
|
|
13
|
+
'aria-disabled': import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
14
14
|
/**
|
|
15
15
|
* Html tag. default 'button'
|
|
16
16
|
*/
|
|
17
|
-
as: import("@elliemae/ds-
|
|
17
|
+
as: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
18
18
|
/**
|
|
19
19
|
* Whether the button is disabled or not
|
|
20
20
|
*/
|
|
21
|
-
disabled: import("@elliemae/ds-
|
|
21
|
+
disabled: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
22
22
|
/**
|
|
23
23
|
* Make the content of the button fit the button container or not
|
|
24
24
|
*/
|
|
25
|
-
fluidWidth: import("@elliemae/ds-
|
|
25
|
+
fluidWidth: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
26
26
|
/**
|
|
27
27
|
* Displayable label inside the button
|
|
28
28
|
*/
|
|
29
|
-
labelText: import("@elliemae/ds-
|
|
29
|
+
labelText: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
30
30
|
/**
|
|
31
31
|
* Put an icon inside the button
|
|
32
32
|
*/
|
|
33
|
-
icon: import("@elliemae/ds-
|
|
33
|
+
icon: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
34
34
|
/**
|
|
35
35
|
* Put an icon on the left side of the button
|
|
36
36
|
*/
|
|
37
|
-
leftIcon: import("@elliemae/ds-
|
|
37
|
+
leftIcon: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
38
38
|
/**
|
|
39
39
|
* ['primary', 'secondary', 'text', 'link']
|
|
40
40
|
*/
|
|
41
|
-
buttonType: import("@elliemae/ds-
|
|
41
|
+
buttonType: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
42
42
|
/**
|
|
43
43
|
* ['s', 'm', 'l']
|
|
44
44
|
*/
|
|
45
|
-
size: import("@elliemae/ds-
|
|
45
|
+
size: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
46
46
|
/**
|
|
47
47
|
* submit or button
|
|
48
48
|
*/
|
|
49
|
-
type: import("@elliemae/ds-
|
|
49
|
+
type: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
50
50
|
/**
|
|
51
51
|
* [
|
|
52
52
|
* 'variant-default',
|
|
@@ -55,30 +55,30 @@ export declare const btnPropTypes: {
|
|
|
55
55
|
* 'variant-disabled',
|
|
56
56
|
* ]
|
|
57
57
|
*/
|
|
58
|
-
variant: import("@elliemae/ds-
|
|
58
|
+
variant: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
59
59
|
/**
|
|
60
60
|
* Refence
|
|
61
61
|
*/
|
|
62
|
-
innerRef: import("@elliemae/ds-
|
|
62
|
+
innerRef: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
63
63
|
/**
|
|
64
64
|
* Onblur callback
|
|
65
65
|
*/
|
|
66
|
-
onBlur: import("@elliemae/ds-
|
|
66
|
+
onBlur: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
67
67
|
/**
|
|
68
68
|
* Apply intent color: ['success', 'warning', 'danger', 'info']
|
|
69
69
|
* Only valid with buttonType="text"
|
|
70
70
|
*/
|
|
71
|
-
intent: import("@elliemae/ds-
|
|
71
|
+
intent: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
72
72
|
/**
|
|
73
73
|
* additional props for the container
|
|
74
74
|
*/
|
|
75
|
-
containerProps: import("@elliemae/ds-
|
|
75
|
+
containerProps: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
76
76
|
/**
|
|
77
77
|
* Allows a function that is triggered once the button is clicked
|
|
78
78
|
*/
|
|
79
|
-
onClick: import("@elliemae/ds-
|
|
79
|
+
onClick: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
80
80
|
/**
|
|
81
81
|
* Allows a function that is triggered once the button is key pressed
|
|
82
82
|
*/
|
|
83
|
-
onKeyPress: import("@elliemae/ds-
|
|
83
|
+
onKeyPress: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
84
84
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-button-v1",
|
|
3
|
-
"version": "3.16.0-next.
|
|
3
|
+
"version": "3.16.0-next.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Button V 1",
|
|
6
6
|
"files": [
|
|
@@ -51,9 +51,10 @@
|
|
|
51
51
|
"indent": 4
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@elliemae/ds-classnames": "3.16.0-next.
|
|
55
|
-
"@elliemae/ds-
|
|
56
|
-
"@elliemae/ds-utilities": "3.16.0-next.
|
|
54
|
+
"@elliemae/ds-classnames": "3.16.0-next.4",
|
|
55
|
+
"@elliemae/ds-props-helpers": "3.16.0-next.4",
|
|
56
|
+
"@elliemae/ds-utilities": "3.16.0-next.4",
|
|
57
|
+
"@elliemae/ds-shared": "3.16.0-next.4"
|
|
57
58
|
},
|
|
58
59
|
"devDependencies": {
|
|
59
60
|
"@testing-library/jest-dom": "~5.16.4",
|
|
@@ -77,7 +78,7 @@
|
|
|
77
78
|
"dts": "node ../../scripts/dts.mjs",
|
|
78
79
|
"dts:withdeps": "pnpm --filter {.}... dts",
|
|
79
80
|
"build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs",
|
|
80
|
-
"dev:build": "pnpm --filter {.}... build
|
|
81
|
+
"dev:build": "pnpm --filter {.}... build",
|
|
81
82
|
"dev:install": "pnpm --filter {.}... i --no-lockfile && pnpm run dev:build",
|
|
82
83
|
"checkDeps": "npx -yes ../ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
83
84
|
}
|