@elliemae/ds-button-v2 3.14.0-next.16 → 3.14.0-next.17

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.
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { DSButtonT } from './react-desc-prop-types';
3
+ declare const DSButtonV2: React.ComponentType<DSButtonT.Props>;
4
+ declare const DSButtonV2WithSchema: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").DocumentedReactComponent<DSButtonT.Props>;
5
+ export { DSButtonV2, DSButtonV2WithSchema };
@@ -0,0 +1,7 @@
1
+ export declare const DSButtonV2Name = "DSButtonV2";
2
+ export declare const DSButtonV2DataTestId: {
3
+ ROOT: string;
4
+ };
5
+ export declare const DSButtonV2Slots: {
6
+ ROOT: string;
7
+ };
@@ -0,0 +1,2 @@
1
+ import type { DSButtonT } from '../react-desc-prop-types';
2
+ export declare const useButtonRenderer: (propsWithDefault: DSButtonT.InternalProps) => import("styled-components").StyledComponent<"button", import("@elliemae/ds-system").Theme, DSButtonT.Props, never>;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { useGetGlobalAttributes, useGetXstyledProps } from '@elliemae/ds-utilities';
3
+ import type { DSButtonT } from '../react-desc-prop-types';
4
+ import { useButtonRenderer } from './useButtonRenderer';
5
+ export interface ButtonV2Configuration {
6
+ propsWithDefault: DSButtonT.InternalProps;
7
+ globalProps: ReturnType<typeof useGetGlobalAttributes>;
8
+ xstyledProps: ReturnType<typeof useGetXstyledProps>;
9
+ ButtonRenderer: ReturnType<typeof useButtonRenderer>;
10
+ handleOnKeyDown: React.KeyboardEventHandler<HTMLButtonElement>;
11
+ tabIndex?: WCAGTabIndex;
12
+ handleOnClick: (e: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => void;
13
+ handleOnMouseDown: React.MouseEventHandler<HTMLButtonElement>;
14
+ }
15
+ export declare const useButtonV2: (props: DSButtonT.Props) => ButtonV2Configuration;
@@ -0,0 +1,3 @@
1
+ import type { WeakValidationMap } from 'react';
2
+ import type { DSButtonT } from '../react-desc-prop-types';
3
+ export declare const useValidateProps: (props: DSButtonT.Props, propTypes: WeakValidationMap<unknown>) => void;
@@ -0,0 +1,31 @@
1
+ export declare const BUTTON_TYPES: {
2
+ readonly FILLED: "filled";
3
+ readonly OUTLINE: "outline";
4
+ readonly TEXT: "text";
5
+ readonly ICON: "icon";
6
+ readonly ICON_FILLED: "iconFilled";
7
+ readonly ICON_OUTLINE: "iconOutline";
8
+ readonly RAW: "raw";
9
+ };
10
+ export declare const BUTTON_SHAPES: {
11
+ readonly DEFAULT: "default";
12
+ readonly ROUND: "round";
13
+ };
14
+ export declare const BUTTON_SIZES: {
15
+ readonly S: "s";
16
+ readonly M: "m";
17
+ readonly L: "l";
18
+ };
19
+ export declare const sizes: {
20
+ readonly s: "1.538rem";
21
+ readonly m: "2.154rem";
22
+ readonly l: "3.077rem";
23
+ };
24
+ export declare const ButtonTypesValuesArray: ("filled" | "outline" | "text" | "icon" | "iconFilled" | "iconOutline" | "raw")[];
25
+ export declare const ButtonSizesValuesArray: ("s" | "m" | "l")[];
26
+ export declare const ButtonShapesValuesArray: ("default" | "round")[];
27
+ export declare const ButtonInteractionStates: string[];
28
+ export declare const ButtonTypesValuesString: string;
29
+ export declare const ButtonSizesValuesString: string;
30
+ export declare const ButtonShapesValuesString: string;
31
+ export declare const ButtonInteractionStatesValuesString: string;
@@ -0,0 +1,3 @@
1
+ export { DSButtonV2, DSButtonV2WithSchema } from './DSButtonV2';
2
+ export { BUTTON_SIZES, BUTTON_TYPES, BUTTON_SHAPES } from './constants';
3
+ export type { DSButtonT } from './react-desc-prop-types';
@@ -0,0 +1,27 @@
1
+ import type { RefCallback, WeakValidationMap } from 'react';
2
+ import type React from 'react';
3
+ import type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-utilities';
4
+ import type { ButtonSizesT, ButtonTypesT, ButtonShapesT } from './sharedTypes';
5
+ export declare namespace DSButtonT {
6
+ type HTMLButtonTypeProp = 'button' | 'submit' | 'reset';
7
+ interface DefaultProps {
8
+ 'data-testid': string;
9
+ size: ButtonSizesT;
10
+ type: HTMLButtonTypeProp;
11
+ buttonType: ButtonTypesT;
12
+ onClick: (e: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => void;
13
+ shape: ButtonShapesT;
14
+ }
15
+ interface OptionalProps {
16
+ innerRef?: React.RefObject<HTMLButtonElement> | RefCallback<HTMLButtonElement>;
17
+ }
18
+ interface RequiredProps {
19
+ children: React.ReactNode;
20
+ }
21
+ interface Props extends Partial<DefaultProps>, OptionalProps, Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>, XstyledProps, RequiredProps {
22
+ }
23
+ interface InternalProps extends DefaultProps, OptionalProps, Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>, XstyledProps, RequiredProps {
24
+ }
25
+ }
26
+ export declare const defaultProps: DSButtonT.DefaultProps;
27
+ export declare const DSButtonPropTypes: WeakValidationMap<unknown>;
@@ -0,0 +1,5 @@
1
+ import type { BUTTON_SIZES, BUTTON_TYPES, BUTTON_SHAPES, ButtonInteractionStates } from './constants';
2
+ export type ButtonSizesT = (typeof BUTTON_SIZES)[keyof typeof BUTTON_SIZES];
3
+ export type ButtonTypesT = (typeof BUTTON_TYPES)[keyof typeof BUTTON_TYPES];
4
+ export type ButtonShapesT = (typeof BUTTON_SHAPES)[keyof typeof BUTTON_SHAPES];
5
+ export type ButtonInteractionStatesT = (typeof ButtonInteractionStates)[number];
@@ -0,0 +1,12 @@
1
+ import type { ButtonShapesT, ButtonSizesT, ButtonTypesT } from './sharedTypes';
2
+ import type { DSButtonT } from './react-desc-prop-types';
3
+ export interface StyledButtonPropsT {
4
+ size: ButtonSizesT;
5
+ buttonType: ButtonTypesT;
6
+ shape: ButtonShapesT;
7
+ }
8
+ export declare const RawButton: import("styled-components").StyledComponent<"button", import("@elliemae/ds-system").Theme, DSButtonT.Props, never>;
9
+ export declare const DefaultButton: import("styled-components").StyledComponent<"button", import("@elliemae/ds-system").Theme, DSButtonT.Props & StyledButtonPropsT, never>;
10
+ export declare const FilledButton: import("styled-components").StyledComponent<"button", import("@elliemae/ds-system").Theme, DSButtonT.Props & StyledButtonPropsT, never>;
11
+ export declare const OutlineButton: import("styled-components").StyledComponent<"button", import("@elliemae/ds-system").Theme, DSButtonT.Props & StyledButtonPropsT & object, never>;
12
+ export declare const TextButton: import("styled-components").StyledComponent<"button", import("@elliemae/ds-system").Theme, DSButtonT.Props & StyledButtonPropsT & object, never>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-button-v2",
3
- "version": "3.14.0-next.16",
3
+ "version": "3.14.0-next.17",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Button",
6
6
  "files": [
@@ -63,8 +63,8 @@
63
63
  "indent": 4
64
64
  },
65
65
  "dependencies": {
66
- "@elliemae/ds-system": "3.14.0-next.16",
67
- "@elliemae/ds-utilities": "3.14.0-next.16"
66
+ "@elliemae/ds-system": "3.14.0-next.17",
67
+ "@elliemae/ds-utilities": "3.14.0-next.17"
68
68
  },
69
69
  "devDependencies": {
70
70
  "@testing-library/jest-dom": "~5.16.4",