digital-rabbit-cl 1.3.13 → 1.3.14
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/components/Button/Button.d.ts +12 -2
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/useButtonStyles.d.ts +2 -4
- package/dist/components/Button/useButtonStyles.d.ts.map +1 -1
- package/dist/digital-rabbit-cl.es.js +594 -602
- package/dist/digital-rabbit-cl.umd.js +3 -3
- package/package.json +1 -1
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { BaseComponentProps, StateProps,
|
|
3
|
-
export interface ButtonProps extends Pick<BaseComponentProps, 'className' | 'style' | 'children'>, Pick<StateProps, 'disabled'
|
|
2
|
+
import { BaseComponentProps, StateProps, SizeVariant, ElementSpecificProps } from '../../types/component-props';
|
|
3
|
+
export interface ButtonProps extends Pick<BaseComponentProps, 'className' | 'style' | 'children'>, Pick<StateProps, 'disabled'> {
|
|
4
|
+
/**
|
|
5
|
+
* Button background color (or border/text color for outline variant)
|
|
6
|
+
* Defaults to theme.colors.primary
|
|
7
|
+
*/
|
|
8
|
+
color?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Hover background color
|
|
11
|
+
* Defaults to opacity change if not provided
|
|
12
|
+
*/
|
|
13
|
+
hoverColor?: string;
|
|
4
14
|
/**
|
|
5
15
|
* Button size variant
|
|
6
16
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAIxC,OAAO,KAAK,EACV,kBAAkB,EAClB,UAAU,EACV,
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAIxC,OAAO,KAAK,EACV,kBAAkB,EAClB,UAAU,EACV,WAAW,EACX,oBAAoB,EACrB,MAAM,6BAA6B,CAAC;AAErC,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,kBAAkB,EAAE,WAAW,GAAG,OAAO,GAAG,UAAU,CAAC,EAClE,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC;IAE9B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IAEnB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IAErC;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAG/D;;OAEG;IACH,WAAW,CAAC,EAAE,IAAI,CAChB,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,CACrE,CAAC;CACH;AAED,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAkEjC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -2,10 +2,8 @@ import { Theme } from '../../theme';
|
|
|
2
2
|
export interface UseButtonStylesParams {
|
|
3
3
|
isActive: boolean;
|
|
4
4
|
disabled: boolean;
|
|
5
|
-
backgroundColor?: string;
|
|
6
5
|
color?: string;
|
|
7
|
-
|
|
8
|
-
hoverTextColor?: string;
|
|
6
|
+
hoverColor?: string;
|
|
9
7
|
outline: boolean;
|
|
10
8
|
theme: Theme;
|
|
11
9
|
}
|
|
@@ -15,5 +13,5 @@ export interface ButtonStyles {
|
|
|
15
13
|
color: string;
|
|
16
14
|
opacity: number;
|
|
17
15
|
}
|
|
18
|
-
export declare const useButtonStyles: ({ isActive, disabled,
|
|
16
|
+
export declare const useButtonStyles: ({ isActive, disabled, color: colorProp, hoverColor, outline, theme, }: UseButtonStylesParams) => ButtonStyles;
|
|
19
17
|
//# sourceMappingURL=useButtonStyles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useButtonStyles.d.ts","sourceRoot":"","sources":["../../../src/components/Button/useButtonStyles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,
|
|
1
|
+
{"version":3,"file":"useButtonStyles.d.ts","sourceRoot":"","sources":["../../../src/components/Button/useButtonStyles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,CAAC;CACd;AAED,MAAM,WAAW,YAAY;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,eAAe,GAAI,uEAO7B,qBAAqB,KAAG,YAqD1B,CAAC"}
|