@elliemae/ds-button-v2 3.34.0 → 3.35.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.
- package/dist/cjs/parts/DSButton/config/useValidateProps.js +3 -0
- package/dist/cjs/parts/DSButton/config/useValidateProps.js.map +2 -2
- package/dist/cjs/parts/DSButton/react-desc-prop-types.js +3 -1
- package/dist/cjs/parts/DSButton/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/parts/DSButtonV2/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/parts/DSButtonV3/react-desc-prop-types.js.map +2 -2
- package/dist/esm/parts/DSButton/config/useValidateProps.js +3 -0
- package/dist/esm/parts/DSButton/config/useValidateProps.js.map +2 -2
- package/dist/esm/parts/DSButton/react-desc-prop-types.js +3 -1
- package/dist/esm/parts/DSButton/react-desc-prop-types.js.map +2 -2
- package/dist/esm/parts/DSButtonV2/react-desc-prop-types.js.map +2 -2
- package/dist/esm/parts/DSButtonV3/react-desc-prop-types.js.map +2 -2
- package/dist/types/parts/DSButton/config/useValidateProps.d.ts +2 -2
- package/dist/types/parts/DSButton/react-desc-prop-types.d.ts +3 -3
- package/dist/types/parts/DSButtonV2/react-desc-prop-types.d.ts +2 -3
- package/dist/types/parts/DSButtonV3/react-desc-prop-types.d.ts +2 -3
- package/package.json +6 -6
|
@@ -36,5 +36,8 @@ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
|
36
36
|
var import_DSButtonDefinitions = require("../DSButtonDefinitions.js");
|
|
37
37
|
const useValidateProps = (props, propTypes) => {
|
|
38
38
|
(0, import_ds_props_helpers.useValidateTypescriptPropTypes)(props, propTypes, import_DSButtonDefinitions.DSButtonName);
|
|
39
|
+
if (props.size === "s") {
|
|
40
|
+
console.warn("[DSButton] Size 's' will be deprecated in the future, so its use is not recommended.");
|
|
41
|
+
}
|
|
39
42
|
};
|
|
40
43
|
//# sourceMappingURL=useValidateProps.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/parts/DSButton/config/useValidateProps.ts", "../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,
|
|
4
|
+
"sourcesContent": ["import { useValidateTypescriptPropTypes, type ValidationMap } from '@elliemae/ds-props-helpers';\nimport { DSButtonName } from '../DSButtonDefinitions.js';\nimport type { DSButtonT } from '../react-desc-prop-types.js';\n\nexport const useValidateProps = (props: DSButtonT.Props, propTypes: ValidationMap<unknown>): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSButtonName);\n\n if (props.size === 's') {\n console.warn(\"[DSButton] Size 's' will be deprecated in the future, so its use is not recommended.\");\n }\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAAmE;AACnE,iCAA6B;AAGtB,MAAM,mBAAmB,CAAC,OAAwB,cAA4C;AAEnG,8DAA+B,OAAO,WAAW,uCAAY;AAE7D,MAAI,MAAM,SAAS,KAAK;AACtB,YAAQ,KAAK,sFAAsF;AAAA,EACrG;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -55,7 +55,9 @@ const DSButtonPropTypes = {
|
|
|
55
55
|
buttonType: import_ds_props_helpers.PropTypes.oneOf(import_constants.ButtonTypesValuesArray).description(import_constants.ButtonTypesValuesString).defaultValue(import_constants.BUTTON_TYPES.FILLED),
|
|
56
56
|
shape: import_ds_props_helpers.PropTypes.oneOf(import_constants.ButtonShapesValuesArray).description(import_constants.ButtonShapesValuesString).defaultValue(import_constants.BUTTON_SHAPES.DEFAULT),
|
|
57
57
|
type: import_ds_props_helpers.PropTypes.string.description('Html "type" props.').defaultValue("button"),
|
|
58
|
-
size: import_ds_props_helpers.PropTypes.oneOf(import_constants.ButtonSizesValuesArray).description(
|
|
58
|
+
size: import_ds_props_helpers.PropTypes.oneOf(import_constants.ButtonSizesValuesArray).description(
|
|
59
|
+
`${import_constants.ButtonSizesValuesString}. Size "s" will be deprecated in the future, so its use is not recommended.`
|
|
60
|
+
).defaultValue(import_constants.BUTTON_SIZES.M),
|
|
59
61
|
onClick: import_ds_props_helpers.PropTypes.func.description('Function executed when the button is activated (via keyboard "space" or enter OR via mouse).').signature("(( e: React.SyntheticEvent ) => void )").defaultValue(() => {
|
|
60
62
|
}),
|
|
61
63
|
innerRef: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.object, import_ds_props_helpers.PropTypes.func]).description("Inner ref to button component."),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/DSButton/react-desc-prop-types.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type { RefCallback
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,8BAKO;AAEP,uBAYO;AACP,iCAAgE;AA6CzD,MAAM,eAAuC;AAAA,EAClD,MAAM,8BAAa;AAAA,EACnB,YAAY,8BAAa;AAAA,EACzB,OAAO,+BAAc;AAAA,EACrB,eAAe,8CAAmB;AAAA,EAClC,MAAM;AAAA,EACN,SAAS,MAAM;AAAA,EAAC;AAClB;AAEO,MAAM,oBAAoB;AAAA,EAC/B,OAAG,kDAAyB,yCAAc,wCAAa;AAAA,EACvD,GAAG;AAAA,EACH,GAAG;AAAA,EACH,UAAU,kCAAU,UAAU,CAAC,kCAAU,MAAM,kCAAU,QAAQ,kCAAU,IAAI,CAAC,CAAC,EAAE;AAAA,IACjF;AAAA,EACF,EAAE;AAAA,EACF,YAAY,kCAAU,MAAM,uCAAsB,EAC/C,YAAY,wCAAuB,EACnC,aAAa,8BAAa,MAAM;AAAA,EACnC,OAAO,kCAAU,MAAM,wCAAuB,EAC3C,YAAY,yCAAwB,EACpC,aAAa,+BAAc,OAAO;AAAA,EACrC,MAAM,kCAAU,OAAO,YAAY,oBAAoB,EAAE,aAAa,QAAQ;AAAA,EAC9E,MAAM,kCAAU,MAAM,uCAAsB,
|
|
4
|
+
"sourcesContent": ["import type { RefCallback } from 'react';\nimport type React from 'react';\nimport type { GlobalAttributesT, XstyledProps, ValidationMap } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport {\n BUTTON_SIZES,\n BUTTON_TYPES,\n BUTTON_SHAPES,\n ButtonSizesValuesArray,\n ButtonInteractionStates,\n ButtonSizesValuesString,\n ButtonInteractionStatesValuesString,\n ButtonTypesValuesArray,\n ButtonTypesValuesString,\n ButtonShapesValuesArray,\n ButtonShapesValuesString,\n} from '../../constants.js';\nimport { DSButtonDataTestId, DSButtonName, DSButtonSlots } from './DSButtonDefinitions.js';\n\nexport declare namespace DSButtonT {\n export type HTMLButtonTypeProp = 'button' | 'submit' | 'reset';\n\n export type ButtonSizesT = (typeof BUTTON_SIZES)[keyof typeof BUTTON_SIZES];\n\n export type ButtonTypesT = (typeof BUTTON_TYPES)[keyof typeof BUTTON_TYPES];\n\n export type ButtonShapesT = (typeof BUTTON_SHAPES)[keyof typeof BUTTON_SHAPES];\n\n export type ButtonInteractionStatesT = (typeof ButtonInteractionStates)[number];\n\n export interface DefaultProps {\n 'data-testid': string;\n size: ButtonSizesT;\n type: HTMLButtonTypeProp;\n buttonType: ButtonTypesT;\n onClick: (e: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => void;\n shape: ButtonShapesT;\n }\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSButtonName, typeof DSButtonSlots> {\n innerRef?: React.MutableRefObject<HTMLButtonElement | null> | RefCallback<HTMLButtonElement>;\n }\n export interface RequiredProps {\n children: React.ReactNode | React.ReactNode[];\n isV3: boolean;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSButtonT.DefaultProps = {\n size: BUTTON_SIZES.M,\n buttonType: BUTTON_TYPES.FILLED,\n shape: BUTTON_SHAPES.DEFAULT,\n 'data-testid': DSButtonDataTestId.ROOT,\n type: 'button',\n onClick: () => {},\n};\n\nexport const DSButtonPropTypes = {\n ...getPropsPerSlotPropTypes(DSButtonName, DSButtonSlots),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n children: PropTypes.oneOfType([PropTypes.node, PropTypes.arrayOf(PropTypes.node)]).description(\n 'String, Number and/or Dimsum Icon.',\n ).isRequired,\n buttonType: PropTypes.oneOf(ButtonTypesValuesArray)\n .description(ButtonTypesValuesString)\n .defaultValue(BUTTON_TYPES.FILLED),\n shape: PropTypes.oneOf(ButtonShapesValuesArray)\n .description(ButtonShapesValuesString)\n .defaultValue(BUTTON_SHAPES.DEFAULT),\n type: PropTypes.string.description('Html \"type\" props.').defaultValue('button'),\n size: PropTypes.oneOf(ButtonSizesValuesArray)\n .description(\n `${ButtonSizesValuesString}. Size \"s\" will be deprecated in the future, so its use is not recommended.`,\n )\n .defaultValue(BUTTON_SIZES.M),\n onClick: PropTypes.func\n .description('Function executed when the button is activated (via keyboard \"space\" or enter OR via mouse).')\n .signature('(( e: React.SyntheticEvent ) => void )')\n .defaultValue(() => {}),\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description('Inner ref to button component.'),\n\n 'data-testid': PropTypes.string.description('Root element data-testid.').defaultValue(DSButtonDataTestId.ROOT),\n 'data-testemulatestate': PropTypes.oneOf(ButtonInteractionStates).description(\n `Emulates button states. Useful for e2e tests. ${ButtonInteractionStatesValuesString}`,\n ),\n} as ValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,8BAKO;AAEP,uBAYO;AACP,iCAAgE;AA6CzD,MAAM,eAAuC;AAAA,EAClD,MAAM,8BAAa;AAAA,EACnB,YAAY,8BAAa;AAAA,EACzB,OAAO,+BAAc;AAAA,EACrB,eAAe,8CAAmB;AAAA,EAClC,MAAM;AAAA,EACN,SAAS,MAAM;AAAA,EAAC;AAClB;AAEO,MAAM,oBAAoB;AAAA,EAC/B,OAAG,kDAAyB,yCAAc,wCAAa;AAAA,EACvD,GAAG;AAAA,EACH,GAAG;AAAA,EACH,UAAU,kCAAU,UAAU,CAAC,kCAAU,MAAM,kCAAU,QAAQ,kCAAU,IAAI,CAAC,CAAC,EAAE;AAAA,IACjF;AAAA,EACF,EAAE;AAAA,EACF,YAAY,kCAAU,MAAM,uCAAsB,EAC/C,YAAY,wCAAuB,EACnC,aAAa,8BAAa,MAAM;AAAA,EACnC,OAAO,kCAAU,MAAM,wCAAuB,EAC3C,YAAY,yCAAwB,EACpC,aAAa,+BAAc,OAAO;AAAA,EACrC,MAAM,kCAAU,OAAO,YAAY,oBAAoB,EAAE,aAAa,QAAQ;AAAA,EAC9E,MAAM,kCAAU,MAAM,uCAAsB,EACzC;AAAA,IACC,GAAG;AAAA,EACL,EACC,aAAa,8BAAa,CAAC;AAAA,EAC9B,SAAS,kCAAU,KAChB,YAAY,8FAA8F,EAC1G,UAAU,wCAAwC,EAClD,aAAa,MAAM;AAAA,EAAC,CAAC;AAAA,EACxB,UAAU,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,IAAI,CAAC,EAAE,YAAY,gCAAgC;AAAA,EAE9G,eAAe,kCAAU,OAAO,YAAY,2BAA2B,EAAE,aAAa,8CAAmB,IAAI;AAAA,EAC7G,yBAAyB,kCAAU,MAAM,wCAAuB,EAAE;AAAA,IAChE,iDAAiD;AAAA,EACnD;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/DSButtonV2/react-desc-prop-types.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import { PropTypes } from '@elliemae/ds-props-helpers';\nimport type { GlobalAttributesT, XstyledProps, ValidationMap } from '@elliemae/ds-props-helpers';\nimport type { DSButtonT } from '../DSButton/react-desc-prop-types.js';\nimport { DSButtonPropTypes } from '../DSButton/react-desc-prop-types.js';\nimport { DSButtonV2DataTestId } from './DSButtonV2Definitions.js';\n\nexport namespace DSButtonV2T {\n export interface DefaultProps extends DSButtonT.DefaultProps {}\n\n export interface OptionalProps extends DSButtonT.OptionalProps {}\n\n export interface RequiredProps extends Omit<DSButtonT.RequiredProps, 'isV3'> {}\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const DSButtonV2PropTypes = {\n ...DSButtonPropTypes,\n 'data-testid': PropTypes.string.description('Root element data-testid.').defaultValue(DSButtonV2DataTestId.ROOT),\n} as ValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA0B;AAG1B,mCAAkC;AAClC,mCAAqC;AAwB9B,MAAM,sBAAsB;AAAA,EACjC,GAAG;AAAA,EACH,eAAe,kCAAU,OAAO,YAAY,2BAA2B,EAAE,aAAa,kDAAqB,IAAI;AACjH;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/DSButtonV3/react-desc-prop-types.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import { PropTypes } from '@elliemae/ds-props-helpers';\nimport type { GlobalAttributesT, XstyledProps, ValidationMap } from '@elliemae/ds-props-helpers';\nimport type { DSButtonT } from '../DSButton/react-desc-prop-types.js';\nimport { DSButtonPropTypes } from '../DSButton/react-desc-prop-types.js';\nimport { DSButtonV3DataTestId } from './DSButtonV3Definitions.js';\n\nexport namespace DSButtonV3T {\n export interface DefaultProps extends DSButtonT.DefaultProps {}\n\n export interface OptionalProps extends DSButtonT.OptionalProps {}\n\n export interface RequiredProps extends Omit<DSButtonT.RequiredProps, 'isV3'> {}\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const DSButtonV3PropTypes = {\n ...DSButtonPropTypes,\n 'data-testid': PropTypes.string.description('Root element data-testid.').defaultValue(DSButtonV3DataTestId.ROOT),\n} as ValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA0B;AAG1B,mCAAkC;AAClC,mCAAqC;AAwB9B,MAAM,sBAAsB;AAAA,EACjC,GAAG;AAAA,EACH,eAAe,kCAAU,OAAO,YAAY,2BAA2B,EAAE,aAAa,kDAAqB,IAAI;AACjH;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -3,6 +3,9 @@ import { useValidateTypescriptPropTypes } from "@elliemae/ds-props-helpers";
|
|
|
3
3
|
import { DSButtonName } from "../DSButtonDefinitions.js";
|
|
4
4
|
const useValidateProps = (props, propTypes) => {
|
|
5
5
|
useValidateTypescriptPropTypes(props, propTypes, DSButtonName);
|
|
6
|
+
if (props.size === "s") {
|
|
7
|
+
console.warn("[DSButton] Size 's' will be deprecated in the future, so its use is not recommended.");
|
|
8
|
+
}
|
|
6
9
|
};
|
|
7
10
|
export {
|
|
8
11
|
useValidateProps
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/DSButton/config/useValidateProps.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useValidateTypescriptPropTypes, type ValidationMap } from '@elliemae/ds-props-helpers';\nimport { DSButtonName } from '../DSButtonDefinitions.js';\nimport type { DSButtonT } from '../react-desc-prop-types.js';\n\nexport const useValidateProps = (props: DSButtonT.Props, propTypes: ValidationMap<unknown>): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSButtonName);\n\n if (props.size === 's') {\n console.warn(\"[DSButton] Size 's' will be deprecated in the future, so its use is not recommended.\");\n }\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,sCAA0D;AACnE,SAAS,oBAAoB;AAGtB,MAAM,mBAAmB,CAAC,OAAwB,cAA4C;AAEnG,iCAA+B,OAAO,WAAW,YAAY;AAE7D,MAAI,MAAM,SAAS,KAAK;AACtB,YAAQ,KAAK,sFAAsF;AAAA,EACrG;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -38,7 +38,9 @@ const DSButtonPropTypes = {
|
|
|
38
38
|
buttonType: PropTypes.oneOf(ButtonTypesValuesArray).description(ButtonTypesValuesString).defaultValue(BUTTON_TYPES.FILLED),
|
|
39
39
|
shape: PropTypes.oneOf(ButtonShapesValuesArray).description(ButtonShapesValuesString).defaultValue(BUTTON_SHAPES.DEFAULT),
|
|
40
40
|
type: PropTypes.string.description('Html "type" props.').defaultValue("button"),
|
|
41
|
-
size: PropTypes.oneOf(ButtonSizesValuesArray).description(
|
|
41
|
+
size: PropTypes.oneOf(ButtonSizesValuesArray).description(
|
|
42
|
+
`${ButtonSizesValuesString}. Size "s" will be deprecated in the future, so its use is not recommended.`
|
|
43
|
+
).defaultValue(BUTTON_SIZES.M),
|
|
42
44
|
onClick: PropTypes.func.description('Function executed when the button is activated (via keyboard "space" or enter OR via mouse).').signature("(( e: React.SyntheticEvent ) => void )").defaultValue(() => {
|
|
43
45
|
}),
|
|
44
46
|
innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description("Inner ref to button component."),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/DSButton/react-desc-prop-types.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { RefCallback
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACGvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,oBAAoB,cAAc,qBAAqB;AA6CzD,MAAM,eAAuC;AAAA,EAClD,MAAM,aAAa;AAAA,EACnB,YAAY,aAAa;AAAA,EACzB,OAAO,cAAc;AAAA,EACrB,eAAe,mBAAmB;AAAA,EAClC,MAAM;AAAA,EACN,SAAS,MAAM;AAAA,EAAC;AAClB;AAEO,MAAM,oBAAoB;AAAA,EAC/B,GAAG,yBAAyB,cAAc,aAAa;AAAA,EACvD,GAAG;AAAA,EACH,GAAG;AAAA,EACH,UAAU,UAAU,UAAU,CAAC,UAAU,MAAM,UAAU,QAAQ,UAAU,IAAI,CAAC,CAAC,EAAE;AAAA,IACjF;AAAA,EACF,EAAE;AAAA,EACF,YAAY,UAAU,MAAM,sBAAsB,EAC/C,YAAY,uBAAuB,EACnC,aAAa,aAAa,MAAM;AAAA,EACnC,OAAO,UAAU,MAAM,uBAAuB,EAC3C,YAAY,wBAAwB,EACpC,aAAa,cAAc,OAAO;AAAA,EACrC,MAAM,UAAU,OAAO,YAAY,oBAAoB,EAAE,aAAa,QAAQ;AAAA,EAC9E,MAAM,UAAU,MAAM,sBAAsB,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { RefCallback } from 'react';\nimport type React from 'react';\nimport type { GlobalAttributesT, XstyledProps, ValidationMap } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport {\n BUTTON_SIZES,\n BUTTON_TYPES,\n BUTTON_SHAPES,\n ButtonSizesValuesArray,\n ButtonInteractionStates,\n ButtonSizesValuesString,\n ButtonInteractionStatesValuesString,\n ButtonTypesValuesArray,\n ButtonTypesValuesString,\n ButtonShapesValuesArray,\n ButtonShapesValuesString,\n} from '../../constants.js';\nimport { DSButtonDataTestId, DSButtonName, DSButtonSlots } from './DSButtonDefinitions.js';\n\nexport declare namespace DSButtonT {\n export type HTMLButtonTypeProp = 'button' | 'submit' | 'reset';\n\n export type ButtonSizesT = (typeof BUTTON_SIZES)[keyof typeof BUTTON_SIZES];\n\n export type ButtonTypesT = (typeof BUTTON_TYPES)[keyof typeof BUTTON_TYPES];\n\n export type ButtonShapesT = (typeof BUTTON_SHAPES)[keyof typeof BUTTON_SHAPES];\n\n export type ButtonInteractionStatesT = (typeof ButtonInteractionStates)[number];\n\n export interface DefaultProps {\n 'data-testid': string;\n size: ButtonSizesT;\n type: HTMLButtonTypeProp;\n buttonType: ButtonTypesT;\n onClick: (e: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => void;\n shape: ButtonShapesT;\n }\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSButtonName, typeof DSButtonSlots> {\n innerRef?: React.MutableRefObject<HTMLButtonElement | null> | RefCallback<HTMLButtonElement>;\n }\n export interface RequiredProps {\n children: React.ReactNode | React.ReactNode[];\n isV3: boolean;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSButtonT.DefaultProps = {\n size: BUTTON_SIZES.M,\n buttonType: BUTTON_TYPES.FILLED,\n shape: BUTTON_SHAPES.DEFAULT,\n 'data-testid': DSButtonDataTestId.ROOT,\n type: 'button',\n onClick: () => {},\n};\n\nexport const DSButtonPropTypes = {\n ...getPropsPerSlotPropTypes(DSButtonName, DSButtonSlots),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n children: PropTypes.oneOfType([PropTypes.node, PropTypes.arrayOf(PropTypes.node)]).description(\n 'String, Number and/or Dimsum Icon.',\n ).isRequired,\n buttonType: PropTypes.oneOf(ButtonTypesValuesArray)\n .description(ButtonTypesValuesString)\n .defaultValue(BUTTON_TYPES.FILLED),\n shape: PropTypes.oneOf(ButtonShapesValuesArray)\n .description(ButtonShapesValuesString)\n .defaultValue(BUTTON_SHAPES.DEFAULT),\n type: PropTypes.string.description('Html \"type\" props.').defaultValue('button'),\n size: PropTypes.oneOf(ButtonSizesValuesArray)\n .description(\n `${ButtonSizesValuesString}. Size \"s\" will be deprecated in the future, so its use is not recommended.`,\n )\n .defaultValue(BUTTON_SIZES.M),\n onClick: PropTypes.func\n .description('Function executed when the button is activated (via keyboard \"space\" or enter OR via mouse).')\n .signature('(( e: React.SyntheticEvent ) => void )')\n .defaultValue(() => {}),\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description('Inner ref to button component.'),\n\n 'data-testid': PropTypes.string.description('Root element data-testid.').defaultValue(DSButtonDataTestId.ROOT),\n 'data-testemulatestate': PropTypes.oneOf(ButtonInteractionStates).description(\n `Emulates button states. Useful for e2e tests. ${ButtonInteractionStatesValuesString}`,\n ),\n} as ValidationMap<unknown>;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACGvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,oBAAoB,cAAc,qBAAqB;AA6CzD,MAAM,eAAuC;AAAA,EAClD,MAAM,aAAa;AAAA,EACnB,YAAY,aAAa;AAAA,EACzB,OAAO,cAAc;AAAA,EACrB,eAAe,mBAAmB;AAAA,EAClC,MAAM;AAAA,EACN,SAAS,MAAM;AAAA,EAAC;AAClB;AAEO,MAAM,oBAAoB;AAAA,EAC/B,GAAG,yBAAyB,cAAc,aAAa;AAAA,EACvD,GAAG;AAAA,EACH,GAAG;AAAA,EACH,UAAU,UAAU,UAAU,CAAC,UAAU,MAAM,UAAU,QAAQ,UAAU,IAAI,CAAC,CAAC,EAAE;AAAA,IACjF;AAAA,EACF,EAAE;AAAA,EACF,YAAY,UAAU,MAAM,sBAAsB,EAC/C,YAAY,uBAAuB,EACnC,aAAa,aAAa,MAAM;AAAA,EACnC,OAAO,UAAU,MAAM,uBAAuB,EAC3C,YAAY,wBAAwB,EACpC,aAAa,cAAc,OAAO;AAAA,EACrC,MAAM,UAAU,OAAO,YAAY,oBAAoB,EAAE,aAAa,QAAQ;AAAA,EAC9E,MAAM,UAAU,MAAM,sBAAsB,EACzC;AAAA,IACC,GAAG;AAAA,EACL,EACC,aAAa,aAAa,CAAC;AAAA,EAC9B,SAAS,UAAU,KAChB,YAAY,8FAA8F,EAC1G,UAAU,wCAAwC,EAClD,aAAa,MAAM;AAAA,EAAC,CAAC;AAAA,EACxB,UAAU,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,IAAI,CAAC,EAAE,YAAY,gCAAgC;AAAA,EAE9G,eAAe,UAAU,OAAO,YAAY,2BAA2B,EAAE,aAAa,mBAAmB,IAAI;AAAA,EAC7G,yBAAyB,UAAU,MAAM,uBAAuB,EAAE;AAAA,IAChE,iDAAiD;AAAA,EACnD;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/DSButtonV2/react-desc-prop-types.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-props-helpers';\nimport type { GlobalAttributesT, XstyledProps, ValidationMap } from '@elliemae/ds-props-helpers';\nimport type { DSButtonT } from '../DSButton/react-desc-prop-types.js';\nimport { DSButtonPropTypes } from '../DSButton/react-desc-prop-types.js';\nimport { DSButtonV2DataTestId } from './DSButtonV2Definitions.js';\n\nexport namespace DSButtonV2T {\n export interface DefaultProps extends DSButtonT.DefaultProps {}\n\n export interface OptionalProps extends DSButtonT.OptionalProps {}\n\n export interface RequiredProps extends Omit<DSButtonT.RequiredProps, 'isV3'> {}\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const DSButtonV2PropTypes = {\n ...DSButtonPropTypes,\n 'data-testid': PropTypes.string.description('Root element data-testid.').defaultValue(DSButtonV2DataTestId.ROOT),\n} as ValidationMap<unknown>;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,iBAAiB;AAG1B,SAAS,yBAAyB;AAClC,SAAS,4BAA4B;AAwB9B,MAAM,sBAAsB;AAAA,EACjC,GAAG;AAAA,EACH,eAAe,UAAU,OAAO,YAAY,2BAA2B,EAAE,aAAa,qBAAqB,IAAI;AACjH;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/DSButtonV3/react-desc-prop-types.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-props-helpers';\nimport type { GlobalAttributesT, XstyledProps, ValidationMap } from '@elliemae/ds-props-helpers';\nimport type { DSButtonT } from '../DSButton/react-desc-prop-types.js';\nimport { DSButtonPropTypes } from '../DSButton/react-desc-prop-types.js';\nimport { DSButtonV3DataTestId } from './DSButtonV3Definitions.js';\n\nexport namespace DSButtonV3T {\n export interface DefaultProps extends DSButtonT.DefaultProps {}\n\n export interface OptionalProps extends DSButtonT.OptionalProps {}\n\n export interface RequiredProps extends Omit<DSButtonT.RequiredProps, 'isV3'> {}\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const DSButtonV3PropTypes = {\n ...DSButtonPropTypes,\n 'data-testid': PropTypes.string.description('Root element data-testid.').defaultValue(DSButtonV3DataTestId.ROOT),\n} as ValidationMap<unknown>;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,iBAAiB;AAG1B,SAAS,yBAAyB;AAClC,SAAS,4BAA4B;AAwB9B,MAAM,sBAAsB;AAAA,EACjC,GAAG;AAAA,EACH,eAAe,UAAU,OAAO,YAAY,2BAA2B,EAAE,aAAa,qBAAqB,IAAI;AACjH;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ValidationMap } from '@elliemae/ds-props-helpers';
|
|
2
2
|
import type { DSButtonT } from '../react-desc-prop-types.js';
|
|
3
|
-
export declare const useValidateProps: (props: DSButtonT.Props, propTypes:
|
|
3
|
+
export declare const useValidateProps: (props: DSButtonT.Props, propTypes: ValidationMap<unknown>) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { RefCallback
|
|
1
|
+
import type { RefCallback } from 'react';
|
|
2
2
|
import type React from 'react';
|
|
3
|
-
import type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';
|
|
3
|
+
import type { GlobalAttributesT, XstyledProps, ValidationMap } from '@elliemae/ds-props-helpers';
|
|
4
4
|
import type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';
|
|
5
5
|
import { BUTTON_SIZES, BUTTON_TYPES, BUTTON_SHAPES, ButtonInteractionStates } from '../../constants.js';
|
|
6
6
|
import { DSButtonName, DSButtonSlots } from './DSButtonDefinitions.js';
|
|
@@ -31,4 +31,4 @@ export declare namespace DSButtonT {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
export declare const defaultProps: DSButtonT.DefaultProps;
|
|
34
|
-
export declare const DSButtonPropTypes:
|
|
34
|
+
export declare const DSButtonPropTypes: ValidationMap<unknown>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';
|
|
1
|
+
import type { GlobalAttributesT, XstyledProps, ValidationMap } from '@elliemae/ds-props-helpers';
|
|
3
2
|
import type { DSButtonT } from '../DSButton/react-desc-prop-types.js';
|
|
4
3
|
export declare namespace DSButtonV2T {
|
|
5
4
|
interface DefaultProps extends DSButtonT.DefaultProps {
|
|
@@ -13,4 +12,4 @@ export declare namespace DSButtonV2T {
|
|
|
13
12
|
interface InternalProps extends DefaultProps, OptionalProps, Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>, XstyledProps, RequiredProps {
|
|
14
13
|
}
|
|
15
14
|
}
|
|
16
|
-
export declare const DSButtonV2PropTypes:
|
|
15
|
+
export declare const DSButtonV2PropTypes: ValidationMap<unknown>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';
|
|
1
|
+
import type { GlobalAttributesT, XstyledProps, ValidationMap } from '@elliemae/ds-props-helpers';
|
|
3
2
|
import type { DSButtonT } from '../DSButton/react-desc-prop-types.js';
|
|
4
3
|
export declare namespace DSButtonV3T {
|
|
5
4
|
interface DefaultProps extends DSButtonT.DefaultProps {
|
|
@@ -13,4 +12,4 @@ export declare namespace DSButtonV3T {
|
|
|
13
12
|
interface InternalProps extends DefaultProps, OptionalProps, Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>, XstyledProps, RequiredProps {
|
|
14
13
|
}
|
|
15
14
|
}
|
|
16
|
-
export declare const DSButtonV3PropTypes:
|
|
15
|
+
export declare const DSButtonV3PropTypes: ValidationMap<unknown>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-button-v2",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.35.0-rc.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Button",
|
|
6
6
|
"files": [
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
"indent": 4
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@elliemae/ds-props-helpers": "3.
|
|
40
|
-
"@elliemae/ds-system": "3.
|
|
41
|
-
"@elliemae/ds-typescript-helpers": "3.
|
|
42
|
-
"@elliemae/ds-utilities": "3.
|
|
39
|
+
"@elliemae/ds-props-helpers": "3.35.0-rc.0",
|
|
40
|
+
"@elliemae/ds-system": "3.35.0-rc.0",
|
|
41
|
+
"@elliemae/ds-typescript-helpers": "3.35.0-rc.0",
|
|
42
|
+
"@elliemae/ds-utilities": "3.35.0-rc.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@elliemae/pui-cli": "~9.0.0-next.31",
|
|
46
46
|
"styled-components": "~5.3.9",
|
|
47
|
-
"@elliemae/ds-monorepo-devops": "3.
|
|
47
|
+
"@elliemae/ds-monorepo-devops": "3.35.0-rc.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"react": "^17.0.2",
|