@aic-kits/react 0.2.0 → 0.3.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/components/Button/StyledButton.d.ts +5 -1
- package/dist/components/Button/index.d.ts +10 -1
- package/dist/components/Button/utils.d.ts +1 -1
- package/dist/components/Header/HeaderAuth.d.ts +11 -0
- package/dist/components/Header/HeaderLogo.d.ts +6 -0
- package/dist/components/Header/HeaderNav.d.ts +8 -0
- package/dist/components/Header/index.d.ts +3 -0
- package/dist/components/Touchable/types.d.ts +0 -5
- package/dist/index.cjs +76 -52
- package/dist/index.js +2598 -2527
- package/dist/theme/components/button.d.ts +9 -0
- package/dist/theme/components/touchable.d.ts +1 -2
- package/package.json +2 -2
|
@@ -3,6 +3,9 @@ type ButtonContainerProps = {
|
|
|
3
3
|
backgroundColor: Color | 'disabled';
|
|
4
4
|
borderRadius: string;
|
|
5
5
|
disabled?: boolean;
|
|
6
|
+
variant: 'solid' | 'outlined' | 'text';
|
|
7
|
+
color: Color;
|
|
8
|
+
themePadding?: string;
|
|
6
9
|
};
|
|
7
10
|
declare const StyledButtonContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('..').BoxProps & {
|
|
8
11
|
ref?: import('react').ForwardedRef<HTMLDivElement>;
|
|
@@ -10,9 +13,10 @@ declare const StyledButtonContainer: import('styled-components/dist/types').ISty
|
|
|
10
13
|
ref?: import('react').ForwardedRef<HTMLDivElement>;
|
|
11
14
|
}) => ReturnType<({ children, style, "data-testid": testId, ...otherProps }: import('..').BoxProps, ref: import('react').ForwardedRef<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element>, keyof import('react').Component<any, {}, any>>;
|
|
12
15
|
type ButtonTextProps = {
|
|
13
|
-
themeColor: Color
|
|
16
|
+
themeColor: Color;
|
|
14
17
|
themeTextColor?: Color;
|
|
15
18
|
disabled?: boolean;
|
|
19
|
+
variant: 'solid' | 'outlined' | 'text';
|
|
16
20
|
};
|
|
17
21
|
declare const StyledButtonText: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('..').TextProps & {
|
|
18
22
|
useRichText?: boolean;
|
|
@@ -11,10 +11,14 @@ export interface ButtonProps {
|
|
|
11
11
|
icon?: React.ReactNode;
|
|
12
12
|
/**
|
|
13
13
|
* Visual color to apply to button.
|
|
14
|
+
* For 'solid' variant, sets background color.
|
|
15
|
+
* For 'outlined' variant, sets border and text color.
|
|
16
|
+
* For 'text' variant, sets text color.
|
|
14
17
|
*/
|
|
15
18
|
color?: Color;
|
|
16
19
|
/**
|
|
17
20
|
* Visual color to apply to button's text.
|
|
21
|
+
* Overrides the default text color derived from the variant and color prop.
|
|
18
22
|
*/
|
|
19
23
|
textColor?: Color;
|
|
20
24
|
/**
|
|
@@ -33,6 +37,11 @@ export interface ButtonProps {
|
|
|
33
37
|
* Corner style of button.
|
|
34
38
|
*/
|
|
35
39
|
corner?: 'circle' | 'rounded' | 'square';
|
|
40
|
+
/**
|
|
41
|
+
* Button style variant.
|
|
42
|
+
* @default 'solid'
|
|
43
|
+
*/
|
|
44
|
+
variant?: 'solid' | 'outlined' | 'text';
|
|
36
45
|
/**
|
|
37
46
|
* Additional style.
|
|
38
47
|
*/
|
|
@@ -50,5 +59,5 @@ export interface ButtonProps {
|
|
|
50
59
|
*/
|
|
51
60
|
flex?: number | string;
|
|
52
61
|
}
|
|
53
|
-
export declare const Button: ({ disabled, icon, color, textColor, loading, onClick, rightIcon, corner, style, "data-testid": testId, text, ...rest }: ButtonProps) => React.ReactElement;
|
|
62
|
+
export declare const Button: ({ disabled, icon, color, textColor, loading, onClick, rightIcon, corner, variant, style, "data-testid": testId, text, ...rest }: ButtonProps) => React.ReactElement;
|
|
54
63
|
export * from './utils';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Theme } from '../../theme';
|
|
2
2
|
import { Color } from '../../theme/common';
|
|
3
|
-
export declare const getTextColor: (theme: Theme,
|
|
3
|
+
export declare const getTextColor: (theme: Theme, color: Color, textColor?: Color, variant?: "solid" | "outlined" | "text", disabled?: boolean) => string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { HeaderProps } from './types';
|
|
3
|
+
interface HeaderAuthProps {
|
|
4
|
+
isSignedIn?: boolean;
|
|
5
|
+
userProfile?: HeaderProps['userProfile'];
|
|
6
|
+
onSignInClick?: () => void;
|
|
7
|
+
onRegisterClick?: () => void;
|
|
8
|
+
onProfileClick?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const HeaderAuth: React.FC<HeaderAuthProps>;
|
|
11
|
+
export {};
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { TouchableHapticFeedbackType } from '../../theme';
|
|
3
2
|
import { BoxProps } from '../Box';
|
|
4
3
|
export interface TouchableProps extends React.HTMLAttributes<HTMLDivElement>, BoxProps {
|
|
5
|
-
/**
|
|
6
|
-
* Haptic feedback type (not used in web, but kept for API compatibility)
|
|
7
|
-
*/
|
|
8
|
-
hapticFeedback?: TouchableHapticFeedbackType;
|
|
9
4
|
/**
|
|
10
5
|
* Touchable's content.
|
|
11
6
|
*/
|