@kivid/native-components 1.0.0-alpha.6 → 1.0.0-alpha.8
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/commonjs/components/Avatar/index.js +5 -4
- package/dist/commonjs/components/Avatar/index.js.map +1 -1
- package/dist/commonjs/components/ChatBubble/assets/class-variants.js +6 -6
- package/dist/commonjs/components/ChatBubble/assets/class-variants.js.map +1 -1
- package/dist/commonjs/components/ChatBubble/components/ChatBubbleSeal/index.js +5 -5
- package/dist/commonjs/components/ChatBubble/components/ChatBubbleSeal/index.js.map +1 -1
- package/dist/commonjs/components/ChatBubble/components/ChatBubbleText/index.js +4 -4
- package/dist/commonjs/components/ChatBubble/components/ChatBubbleText/index.js.map +1 -1
- package/dist/commonjs/components/ChatBubble/{context.js → contexts/ChatBubbleContext/index.js} +1 -1
- package/dist/commonjs/components/ChatBubble/contexts/ChatBubbleContext/index.js.map +1 -0
- package/dist/commonjs/components/ChatBubble/contexts/ChatBubbleContext/types.js +6 -0
- package/dist/commonjs/components/ChatBubble/contexts/ChatBubbleContext/types.js.map +1 -0
- package/dist/commonjs/components/ChatBubble/contexts/index.js +17 -0
- package/dist/commonjs/components/ChatBubble/contexts/index.js.map +1 -0
- package/dist/commonjs/components/ChatBubble/index.js +10 -9
- package/dist/commonjs/components/ChatBubble/index.js.map +1 -1
- package/dist/commonjs/components/IconButton/assets/class-variants.js +82 -0
- package/dist/commonjs/components/IconButton/assets/class-variants.js.map +1 -0
- package/dist/commonjs/components/IconButton/assets/design-system-showcase.js +119 -0
- package/dist/commonjs/components/IconButton/assets/design-system-showcase.js.map +1 -0
- package/dist/commonjs/components/IconButton/enums.js +33 -0
- package/dist/commonjs/components/IconButton/enums.js.map +1 -0
- package/dist/commonjs/components/IconButton/index.js +108 -0
- package/dist/commonjs/components/IconButton/index.js.map +1 -0
- package/dist/commonjs/components/IconButton/types.js +6 -0
- package/dist/commonjs/components/IconButton/types.js.map +1 -0
- package/dist/commonjs/components/ListButton/assets/class-variants.js +2 -10
- package/dist/commonjs/components/ListButton/assets/class-variants.js.map +1 -1
- package/dist/commonjs/components/ListButton/assets/design-system-showcase.js +424 -0
- package/dist/commonjs/components/ListButton/assets/design-system-showcase.js.map +1 -0
- package/dist/commonjs/components/ListButton/enums/index.js +0 -11
- package/dist/commonjs/components/ListButton/enums/index.js.map +1 -1
- package/dist/commonjs/components/ListButton/index.js +41 -36
- package/dist/commonjs/components/ListButton/index.js.map +1 -1
- package/dist/commonjs/components/OtpInput/assets/class-variant.js +1 -1
- package/dist/commonjs/components/OtpInput/assets/class-variant.js.map +1 -1
- package/dist/commonjs/components/OtpInput/components/InformationStatus/index.js +13 -11
- package/dist/commonjs/components/OtpInput/components/InformationStatus/index.js.map +1 -1
- package/dist/commonjs/components/OtpInput/enums/index.js +7 -8
- package/dist/commonjs/components/OtpInput/enums/index.js.map +1 -1
- package/dist/commonjs/components/OtpInput/index.js +66 -101
- package/dist/commonjs/components/OtpInput/index.js.map +1 -1
- package/dist/commonjs/components/PasswordInput/index.js +42 -0
- package/dist/commonjs/components/PasswordInput/index.js.map +1 -0
- package/dist/commonjs/components/PasswordInput/types.js +6 -0
- package/dist/commonjs/components/PasswordInput/types.js.map +1 -0
- package/dist/commonjs/components/TextInput/index.js +14 -3
- package/dist/commonjs/components/TextInput/index.js.map +1 -1
- package/dist/commonjs/components/Tooltip/index.js +44 -5
- package/dist/commonjs/components/Tooltip/index.js.map +1 -1
- package/dist/commonjs/components/index.js +33 -0
- package/dist/commonjs/components/index.js.map +1 -1
- package/dist/commonjs/iconography/Icons/index.js +1 -1
- package/dist/commonjs/iconography/Icons/index.js.map +1 -1
- package/dist/module/components/Avatar/index.js +5 -4
- package/dist/module/components/Avatar/index.js.map +1 -1
- package/dist/module/components/ChatBubble/assets/class-variants.js +6 -6
- package/dist/module/components/ChatBubble/assets/class-variants.js.map +1 -1
- package/dist/module/components/ChatBubble/components/ChatBubbleSeal/index.js +4 -4
- package/dist/module/components/ChatBubble/components/ChatBubbleSeal/index.js.map +1 -1
- package/dist/module/components/ChatBubble/components/ChatBubbleText/index.js +5 -4
- package/dist/module/components/ChatBubble/components/ChatBubbleText/index.js.map +1 -1
- package/dist/module/components/ChatBubble/{context.js → contexts/ChatBubbleContext/index.js} +1 -1
- package/dist/module/components/ChatBubble/contexts/ChatBubbleContext/index.js.map +1 -0
- package/dist/module/components/ChatBubble/contexts/ChatBubbleContext/types.js +4 -0
- package/dist/module/components/ChatBubble/contexts/ChatBubbleContext/types.js.map +1 -0
- package/dist/module/components/ChatBubble/contexts/index.js +4 -0
- package/dist/module/components/ChatBubble/contexts/index.js.map +1 -0
- package/dist/module/components/ChatBubble/index.js +9 -8
- package/dist/module/components/ChatBubble/index.js.map +1 -1
- package/dist/module/components/IconButton/assets/class-variants.js +79 -0
- package/dist/module/components/IconButton/assets/class-variants.js.map +1 -0
- package/dist/module/components/IconButton/assets/design-system-showcase.js +115 -0
- package/dist/module/components/IconButton/assets/design-system-showcase.js.map +1 -0
- package/dist/module/components/IconButton/enums.js +29 -0
- package/dist/module/components/IconButton/enums.js.map +1 -0
- package/dist/module/components/IconButton/index.js +103 -0
- package/dist/module/components/IconButton/index.js.map +1 -0
- package/dist/module/components/IconButton/types.js +4 -0
- package/dist/module/components/IconButton/types.js.map +1 -0
- package/dist/module/components/ListButton/assets/class-variants.js +2 -10
- package/dist/module/components/ListButton/assets/class-variants.js.map +1 -1
- package/dist/module/components/ListButton/assets/design-system-showcase.js +420 -0
- package/dist/module/components/ListButton/assets/design-system-showcase.js.map +1 -0
- package/dist/module/components/ListButton/enums/index.js +0 -1
- package/dist/module/components/ListButton/enums/index.js.map +1 -1
- package/dist/module/components/ListButton/index.js +44 -39
- package/dist/module/components/ListButton/index.js.map +1 -1
- package/dist/module/components/OtpInput/assets/class-variant.js +1 -1
- package/dist/module/components/OtpInput/assets/class-variant.js.map +1 -1
- package/dist/module/components/OtpInput/components/InformationStatus/index.js +15 -13
- package/dist/module/components/OtpInput/components/InformationStatus/index.js.map +1 -1
- package/dist/module/components/OtpInput/enums/index.js +6 -7
- package/dist/module/components/OtpInput/enums/index.js.map +1 -1
- package/dist/module/components/OtpInput/index.js +66 -101
- package/dist/module/components/OtpInput/index.js.map +1 -1
- package/dist/module/components/PasswordInput/index.js +37 -0
- package/dist/module/components/PasswordInput/index.js.map +1 -0
- package/dist/module/components/PasswordInput/types.js +4 -0
- package/dist/module/components/PasswordInput/types.js.map +1 -0
- package/dist/module/components/TextInput/index.js +14 -3
- package/dist/module/components/TextInput/index.js.map +1 -1
- package/dist/module/components/Tooltip/index.js +45 -6
- package/dist/module/components/Tooltip/index.js.map +1 -1
- package/dist/module/components/index.js +3 -0
- package/dist/module/components/index.js.map +1 -1
- package/dist/module/iconography/Icons/index.js +2 -2
- package/dist/module/iconography/Icons/index.js.map +1 -1
- package/dist/typescript/components/Avatar/types.d.ts +1 -0
- package/dist/typescript/components/ChatBubble/assets/class-variants.d.ts +1 -1
- package/dist/typescript/components/ChatBubble/components/ChatBubbleSeal/types.d.ts +1 -1
- package/dist/typescript/components/ChatBubble/components/ChatBubbleText/types.d.ts +1 -1
- package/dist/typescript/components/ChatBubble/contexts/ChatBubbleContext/index.d.ts +3 -0
- package/dist/typescript/components/ChatBubble/contexts/ChatBubbleContext/types.d.ts +6 -0
- package/dist/typescript/components/ChatBubble/contexts/index.d.ts +1 -0
- package/dist/typescript/components/ChatBubble/types.d.ts +2 -2
- package/dist/typescript/components/IconButton/assets/class-variants.d.ts +8 -0
- package/dist/typescript/components/IconButton/assets/design-system-showcase.d.ts +17 -0
- package/dist/typescript/components/IconButton/enums.d.ts +22 -0
- package/dist/typescript/components/IconButton/index.d.ts +2 -0
- package/dist/typescript/components/IconButton/types.d.ts +15 -0
- package/dist/typescript/components/ListButton/assets/class-variants.d.ts +1 -4
- package/dist/typescript/components/ListButton/assets/design-system-showcase.d.ts +14 -0
- package/dist/typescript/components/ListButton/enums/index.d.ts +0 -1
- package/dist/typescript/components/ListButton/types.d.ts +7 -5
- package/dist/typescript/components/OtpInput/components/InformationStatus/types.d.ts +2 -2
- package/dist/typescript/components/OtpInput/enums/index.d.ts +2 -3
- package/dist/typescript/components/OtpInput/index.d.ts +1 -1
- package/dist/typescript/components/OtpInput/types.d.ts +4 -4
- package/dist/typescript/components/PasswordInput/index.d.ts +2 -0
- package/dist/typescript/components/PasswordInput/types.d.ts +3 -0
- package/dist/typescript/components/TextInput/index.d.ts +1 -1
- package/dist/typescript/components/TextInput/types.d.ts +3 -0
- package/dist/typescript/components/Tooltip/components/Content/types.d.ts +1 -0
- package/dist/typescript/components/Tooltip/types.d.ts +2 -1
- package/dist/typescript/components/index.d.ts +6 -0
- package/package.json +5 -5
- package/src/components/Avatar/index.tsx +4 -4
- package/src/components/Avatar/types.ts +1 -0
- package/src/components/ChatBubble/assets/class-variants.ts +6 -6
- package/src/components/ChatBubble/components/ChatBubbleSeal/index.tsx +5 -4
- package/src/components/ChatBubble/components/ChatBubbleSeal/types.ts +1 -1
- package/src/components/ChatBubble/components/ChatBubbleText/index.tsx +4 -3
- package/src/components/ChatBubble/components/ChatBubbleText/types.ts +1 -1
- package/src/components/ChatBubble/{context.tsx → contexts/ChatBubbleContext/index.tsx} +1 -10
- package/src/components/ChatBubble/contexts/ChatBubbleContext/types.ts +11 -0
- package/src/components/ChatBubble/contexts/index.ts +1 -0
- package/src/components/ChatBubble/index.tsx +12 -10
- package/src/components/ChatBubble/types.ts +2 -3
- package/src/components/IconButton/assets/class-variants.ts +126 -0
- package/src/components/IconButton/assets/design-system-showcase.ts +246 -0
- package/src/components/IconButton/enums.ts +26 -0
- package/src/components/IconButton/index.tsx +124 -0
- package/src/components/IconButton/types.ts +22 -0
- package/src/components/ListButton/assets/class-variants.ts +2 -11
- package/src/components/ListButton/assets/design-system-showcase.ts +502 -0
- package/src/components/ListButton/enums/index.ts +0 -1
- package/src/components/ListButton/index.tsx +44 -41
- package/src/components/ListButton/types.ts +7 -5
- package/src/components/OtpInput/assets/class-variant.ts +1 -1
- package/src/components/OtpInput/components/InformationStatus/index.tsx +15 -14
- package/src/components/OtpInput/components/InformationStatus/types.ts +2 -2
- package/src/components/OtpInput/enums/index.ts +1 -2
- package/src/components/OtpInput/index.tsx +77 -136
- package/src/components/OtpInput/types.ts +4 -4
- package/src/components/PasswordInput/index.tsx +37 -0
- package/src/components/PasswordInput/types.ts +4 -0
- package/src/components/TextInput/index.tsx +17 -3
- package/src/components/TextInput/types.ts +3 -0
- package/src/components/Tooltip/components/Content/types.ts +1 -0
- package/src/components/Tooltip/index.tsx +57 -5
- package/src/components/Tooltip/types.ts +2 -1
- package/src/components/index.ts +8 -0
- package/src/iconography/Icons/index.tsx +2 -3
- package/dist/commonjs/components/ChatBubble/context.js.map +0 -1
- package/dist/commonjs/components/ListButton/enums/icon-color.js +0 -18
- package/dist/commonjs/components/ListButton/enums/icon-color.js.map +0 -1
- package/dist/module/components/ChatBubble/context.js.map +0 -1
- package/dist/module/components/ListButton/enums/icon-color.js +0 -14
- package/dist/module/components/ListButton/enums/icon-color.js.map +0 -1
- package/dist/typescript/components/ChatBubble/context.d.ts +0 -8
- package/dist/typescript/components/ListButton/enums/icon-color.d.ts +0 -10
- package/src/components/ListButton/enums/icon-color.ts +0 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["IconsNative","React","useMemo","useState","Alert","FlatList","Pressable","
|
|
1
|
+
{"version":3,"names":["IconsNative","React","useMemo","useState","Alert","FlatList","Pressable","Text","TextInput","View","jsx","_jsx","jsxs","_jsxs","Icons","props","size","color","icons","Object","entries","map","name","IconComponent","component","searchTerm","setSearchTerm","iconsFiltered","sorted","sort","a","b","localeCompare","filter","icon","toLowerCase","includes","handleIconPress","isCurrentColor","alert","className","children","placeholder","placeholderTextColor","style","width","height","marginBottom","borderRadius","borderWidth","borderColor","paddingHorizontal","fontSize","onChangeText","value","data","keyExtractor","numColumns","columnWrapperStyle","justifyContent","contentContainerStyle","paddingBottom","renderItem","item","flex","alignItems","marginVertical","flexDirection","padding","onPress","marginTop","textAlign","maxWidth","numberOfLines"],"sourceRoot":"../../../../src","sources":["iconography/Icons/index.tsx"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const chatBubbleBoxVariants: (props?: ({
|
|
2
|
-
|
|
2
|
+
variant?: "alert" | "error" | "check" | "custom" | null | undefined;
|
|
3
3
|
colorState?: "fill" | "outline" | null | undefined;
|
|
4
4
|
hasEar?: boolean | null | undefined;
|
|
5
5
|
messageType?: "initial" | "followUp" | null | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ChatBubbleContext";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { ViewProps } from "react-native";
|
|
2
|
-
export type { ChatBubbleContextValue } from "./context";
|
|
3
2
|
export type ChatBubbleType = "check" | "alert" | "error" | "custom";
|
|
4
3
|
export type ChatBubbleColorState = "fill" | "outline";
|
|
5
4
|
export type ChatBubbleMessageType = "initial" | "followUp";
|
|
6
5
|
export interface ChatBubbleProps extends Omit<ViewProps, "children"> {
|
|
7
|
-
|
|
6
|
+
variant?: ChatBubbleType;
|
|
8
7
|
colorState?: ChatBubbleColorState;
|
|
9
8
|
hasEar?: boolean;
|
|
10
9
|
className?: string;
|
|
11
10
|
children?: React.ReactNode;
|
|
12
11
|
time?: string;
|
|
12
|
+
shouldDisplayTime?: boolean;
|
|
13
13
|
messageType?: ChatBubbleMessageType;
|
|
14
14
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IconButtonCornersEnum, IconButtonSizeEnum, IconButtonVariantEnum } from "../enums";
|
|
2
|
+
declare const buttonVariants: (props?: ({
|
|
3
|
+
variant?: IconButtonVariantEnum | null | undefined;
|
|
4
|
+
size?: IconButtonSizeEnum | null | undefined;
|
|
5
|
+
corners?: IconButtonCornersEnum | null | undefined;
|
|
6
|
+
selected?: boolean | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
export { buttonVariants };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IconButtonCornersEnum, IconButtonSizeEnum, IconButtonVariantEnum } from "../enums";
|
|
2
|
+
interface DesignSystemShowcaseItem {
|
|
3
|
+
size: IconButtonSizeEnum;
|
|
4
|
+
variant: IconButtonVariantEnum;
|
|
5
|
+
corners: IconButtonCornersEnum;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
selected?: boolean;
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface DesignSystemShowcaseButtonProps {
|
|
11
|
+
title: string;
|
|
12
|
+
buttons: {
|
|
13
|
+
[key: string]: DesignSystemShowcaseItem[];
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export declare const designSystemShowcase: Record<IconButtonSizeEnum, DesignSystemShowcaseButtonProps>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare enum IconButtonVariantEnum {
|
|
2
|
+
GRAPE = "grape",
|
|
3
|
+
JAVA = "java",
|
|
4
|
+
PEAR = "pear",
|
|
5
|
+
TANGERINE = "tangerine",
|
|
6
|
+
PITAYA = "pitaya",
|
|
7
|
+
BLACKBERRY = "blackberry",
|
|
8
|
+
CHIA = "chia",
|
|
9
|
+
OUTLINE = "outline",
|
|
10
|
+
GHOST = "ghost"
|
|
11
|
+
}
|
|
12
|
+
export declare enum IconButtonSizeEnum {
|
|
13
|
+
SMALL = "small",
|
|
14
|
+
MEDIUM = "medium",
|
|
15
|
+
LARGE = "large",
|
|
16
|
+
XLARGE = "xlarge",
|
|
17
|
+
XXLARGE = "xxlarge"
|
|
18
|
+
}
|
|
19
|
+
export declare enum IconButtonCornersEnum {
|
|
20
|
+
SMALL = "small",
|
|
21
|
+
MEDIUM = "medium"
|
|
22
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { VariantProps } from "class-variance-authority";
|
|
2
|
+
import type { buttonVariants } from "./assets/class-variants";
|
|
3
|
+
import { PressableProps } from "react-native";
|
|
4
|
+
import { IconButtonCornersEnum, IconButtonSizeEnum, IconButtonVariantEnum } from "./enums";
|
|
5
|
+
export interface IconButtonProps extends PressableProps, VariantProps<typeof buttonVariants> {
|
|
6
|
+
selected?: boolean;
|
|
7
|
+
icon: React.ReactNode;
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
variant?: IconButtonVariantEnum;
|
|
10
|
+
size?: IconButtonSizeEnum;
|
|
11
|
+
corners?: IconButtonCornersEnum;
|
|
12
|
+
className?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
accessibilityLabel: string;
|
|
15
|
+
}
|
|
@@ -8,7 +8,4 @@ declare const buttonVariants: (props?: ({
|
|
|
8
8
|
declare const textVariants: (props?: ({
|
|
9
9
|
variant?: "grape" | "java" | "pear" | "tangerine" | "blackberry" | "chia" | "outline" | "glass" | "ghost" | null | undefined;
|
|
10
10
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
|
-
|
|
12
|
-
showChevronIcon?: boolean | null | undefined;
|
|
13
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
14
|
-
export { buttonVariants, textVariants, iconButtonVariants };
|
|
11
|
+
export { buttonVariants, textVariants };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ListButtonVariantEnum } from "../enums";
|
|
2
|
+
import { SizeEnum, CornersEnum } from "../../../enums";
|
|
3
|
+
interface ListButtonShowcaseProps {
|
|
4
|
+
variant: ListButtonVariantEnum;
|
|
5
|
+
size: SizeEnum.SMALL | SizeEnum.MEDIUM | SizeEnum.LARGE;
|
|
6
|
+
corners: CornersEnum.SMALL | CornersEnum.MEDIUM;
|
|
7
|
+
children: string;
|
|
8
|
+
iconColor: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
iconLeft?: boolean;
|
|
11
|
+
iconRight?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const listButtonShowcaseVariants: Record<string, ListButtonShowcaseProps[]>;
|
|
14
|
+
export {};
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import type { VariantProps } from "class-variance-authority";
|
|
2
2
|
import type { buttonVariants } from "./assets/class-variants";
|
|
3
|
-
import type {
|
|
3
|
+
import type { ListButtonVariantEnum } from "./enums";
|
|
4
4
|
import { PressableProps } from "react-native";
|
|
5
5
|
import { SizeEnum, CornersEnum } from "../../enums";
|
|
6
6
|
export interface ListButtonProps extends PressableProps, VariantProps<typeof buttonVariants> {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
iconLeft?: React.ReactNode;
|
|
8
|
+
iconRight?: React.ReactNode;
|
|
9
|
+
iconLeftContainerClassName?: React.ReactNode;
|
|
10
|
+
iconRightContainerClassName?: React.ReactNode;
|
|
9
11
|
children: React.ReactNode;
|
|
10
|
-
showChevronIcon?: boolean;
|
|
11
12
|
variant?: ListButtonVariantEnum;
|
|
12
13
|
size?: SizeEnum.SMALL | SizeEnum.MEDIUM | SizeEnum.LARGE;
|
|
13
14
|
corners?: CornersEnum.SMALL | CornersEnum.MEDIUM;
|
|
14
15
|
className?: string;
|
|
15
16
|
disabled?: boolean;
|
|
16
|
-
accessibilityLabel
|
|
17
|
+
accessibilityLabel?: string;
|
|
18
|
+
numberOfLines?: number;
|
|
17
19
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { OTPInputInformationStatusEnum } from "../../enums";
|
|
2
2
|
export interface InformationStatusProps {
|
|
3
|
-
status:
|
|
3
|
+
status: OTPInputInformationStatusEnum;
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
onPress?: () => void;
|
|
6
6
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { OTPInputInformationStatusEnum } from "./enums";
|
|
3
3
|
export interface OtpInputProps {
|
|
4
|
-
|
|
4
|
+
length?: number;
|
|
5
5
|
rounded?: boolean;
|
|
6
6
|
disabled?: boolean;
|
|
7
|
-
status?:
|
|
7
|
+
status?: OTPInputInformationStatusEnum;
|
|
8
8
|
customInformation?: React.ReactNode;
|
|
9
|
-
onChange: (value
|
|
9
|
+
onChange: (value?: string) => void;
|
|
10
10
|
onPressRetryToken?: (value: string) => void;
|
|
11
11
|
inputClassName?: string;
|
|
12
12
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TextInputProps } from "./types";
|
|
2
|
-
export declare function TextInput({ corners, label, value, onChangeText, disabled, error, isValid, className, inputClassName, labelClassName, placeholder, accessibilityLabel, containerTestID, ref, tooltipClassName, ...rest }: TextInputProps): import("react").JSX.Element;
|
|
2
|
+
export declare function TextInput({ corners, label, value, onChangeText, disabled, error, isValid, className, inputClassName, labelClassName, placeholder, accessibilityLabel, containerTestID, ref, tooltipClassName, tooltipPointerClassName, tooltipContainerClassName, rightIcon, ...rest }: TextInputProps): import("react").JSX.Element;
|
|
3
3
|
export declare namespace TextInput {
|
|
4
4
|
var displayName: string;
|
|
5
5
|
}
|
|
@@ -13,6 +13,9 @@ export interface TextInputProps extends Omit<RNTextInputProps, "value" | "onChan
|
|
|
13
13
|
labelClassName?: string;
|
|
14
14
|
containerTestID?: string;
|
|
15
15
|
tooltipClassName?: string;
|
|
16
|
+
tooltipPointerClassName?: string;
|
|
17
|
+
tooltipContainerClassName?: string;
|
|
18
|
+
rightIcon?: React.ReactNode;
|
|
16
19
|
onChangeText?: (text: string) => void;
|
|
17
20
|
ref?: React.RefObject<RNTextInput | null>;
|
|
18
21
|
}
|
|
@@ -3,6 +3,7 @@ export * from "./Button";
|
|
|
3
3
|
export type * from "./Button/types";
|
|
4
4
|
export * from "./ChatBubble";
|
|
5
5
|
export type * from "./ChatBubble/types";
|
|
6
|
+
export type * from "./ChatBubble/contexts/ChatBubbleContext/types";
|
|
6
7
|
export * from "./Chip";
|
|
7
8
|
export * from "./Chip/types";
|
|
8
9
|
export * from "./Chip/enums";
|
|
@@ -46,3 +47,8 @@ export * from "./SelectButton/enums";
|
|
|
46
47
|
export * from "./RadioInput";
|
|
47
48
|
export type * from "./RadioInput/types";
|
|
48
49
|
export * from "./RadioInput/enums";
|
|
50
|
+
export * from "./IconButton";
|
|
51
|
+
export type * from "./IconButton/types";
|
|
52
|
+
export * from "./IconButton/enums";
|
|
53
|
+
export * from "./PasswordInput";
|
|
54
|
+
export type * from "./PasswordInput/types";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kivid/native-components",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.8",
|
|
4
4
|
"description": "A React Native component library for the Butterfly Design System.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -78,8 +78,8 @@
|
|
|
78
78
|
"react": "19.0.0",
|
|
79
79
|
"ts-jest": "^29.2.5",
|
|
80
80
|
"typescript": "~5.8.3",
|
|
81
|
-
"@kivid/
|
|
82
|
-
"@kivid/
|
|
81
|
+
"@kivid/icons": "1.0.0-alpha.8",
|
|
82
|
+
"@kivid/tailwind-preset": "1.0.0-alpha.8"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
85
|
"@lottiefiles/dotlottie-react": "^0.15.1",
|
|
@@ -89,8 +89,8 @@
|
|
|
89
89
|
"react-native-svg": "^15.12.0",
|
|
90
90
|
"react-native": "0.79.5",
|
|
91
91
|
"react": "19.0.0",
|
|
92
|
-
"@kivid/tailwind-preset": "1.0.0-alpha.
|
|
93
|
-
"@kivid/icons": "1.0.0-alpha.
|
|
92
|
+
"@kivid/tailwind-preset": "1.0.0-alpha.8",
|
|
93
|
+
"@kivid/icons": "1.0.0-alpha.8"
|
|
94
94
|
},
|
|
95
95
|
"eslintIgnore": [
|
|
96
96
|
"node_modules/",
|
|
@@ -7,7 +7,7 @@ import { merge } from "@kivid/tailwind-preset";
|
|
|
7
7
|
import Typography from "../Typography";
|
|
8
8
|
|
|
9
9
|
export function Avatar(props: AvatarProps) {
|
|
10
|
-
const { src, name, size = SizeEnum.MEDIUM } = props;
|
|
10
|
+
const { src, name, size = SizeEnum.MEDIUM, className } = props;
|
|
11
11
|
|
|
12
12
|
const personMappedSize = {
|
|
13
13
|
[SizeEnum.XLARGE]: 56,
|
|
@@ -77,7 +77,7 @@ export function Avatar(props: AvatarProps) {
|
|
|
77
77
|
|
|
78
78
|
//TODO: line height add spaces on font, and element cant be centered
|
|
79
79
|
return (
|
|
80
|
-
<View className={avatarStyle}>
|
|
80
|
+
<View className={merge(avatarStyle, className)}>
|
|
81
81
|
<Typography
|
|
82
82
|
className={merge(
|
|
83
83
|
avatarTextStyleMap[size].className,
|
|
@@ -93,7 +93,7 @@ export function Avatar(props: AvatarProps) {
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
return (
|
|
96
|
-
<View className={avatarStyle}>
|
|
96
|
+
<View className={merge(avatarStyle, className)}>
|
|
97
97
|
<Person
|
|
98
98
|
color="#B6C2C2"
|
|
99
99
|
size={personMappedSize}
|
|
@@ -108,7 +108,7 @@ export function Avatar(props: AvatarProps) {
|
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
return (
|
|
111
|
-
<View className={merge(avatarStyle, "overflow-hidden")}>
|
|
111
|
+
<View className={merge(avatarStyle, "overflow-hidden", className)}>
|
|
112
112
|
<Image
|
|
113
113
|
source={{ uri: src }}
|
|
114
114
|
className={"object-cover w-full h-full"}
|
|
@@ -4,7 +4,7 @@ export const chatBubbleBoxVariants = cva(
|
|
|
4
4
|
"flex-row gap-400 px-600 py-500 min-h-1000",
|
|
5
5
|
{
|
|
6
6
|
variants: {
|
|
7
|
-
|
|
7
|
+
variant: {
|
|
8
8
|
check: "",
|
|
9
9
|
alert: "",
|
|
10
10
|
error: "",
|
|
@@ -25,27 +25,27 @@ export const chatBubbleBoxVariants = cva(
|
|
|
25
25
|
},
|
|
26
26
|
compoundVariants: [
|
|
27
27
|
{
|
|
28
|
-
|
|
28
|
+
variant: "check",
|
|
29
29
|
colorState: "fill",
|
|
30
30
|
className: "bg-pear-500",
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
|
-
|
|
33
|
+
variant: "alert",
|
|
34
34
|
colorState: "fill",
|
|
35
35
|
className: "bg-tangerine-500",
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
|
-
|
|
38
|
+
variant: "error",
|
|
39
39
|
colorState: "fill",
|
|
40
40
|
className: "bg-blackberry-500",
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
|
-
|
|
43
|
+
variant: "custom",
|
|
44
44
|
colorState: "fill",
|
|
45
45
|
className: "bg-chia-100",
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
|
-
|
|
48
|
+
variant: "custom",
|
|
49
49
|
colorState: "outline",
|
|
50
50
|
className: "bg-chia-100",
|
|
51
51
|
},
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { merge } from "@kivid/tailwind-preset";
|
|
3
3
|
import { Seal } from "../../../Seal";
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
import type { ChatBubbleSealProps } from "./types";
|
|
6
6
|
import { SealVariantEnum } from "../../../Seal/enums";
|
|
7
7
|
import { SizeEnum } from "../../../../enums";
|
|
8
|
+
import { useChatBubbleContext } from "../../contexts";
|
|
8
9
|
|
|
9
10
|
export const ChatBubbleSeal: React.FC<ChatBubbleSealProps> = ({
|
|
10
11
|
className,
|
|
11
12
|
...props
|
|
12
13
|
}) => {
|
|
13
|
-
const {
|
|
14
|
+
const { variant, colorState } = useChatBubbleContext();
|
|
14
15
|
|
|
15
|
-
if (!
|
|
16
|
+
if (!variant || variant === "custom") {
|
|
16
17
|
return null;
|
|
17
18
|
}
|
|
18
19
|
|
|
@@ -24,7 +25,7 @@ export const ChatBubbleSeal: React.FC<ChatBubbleSealProps> = ({
|
|
|
24
25
|
|
|
25
26
|
return (
|
|
26
27
|
<Seal
|
|
27
|
-
variant={sealVariantMap[
|
|
28
|
+
variant={sealVariantMap[variant]}
|
|
28
29
|
size={SizeEnum.MEDIUM}
|
|
29
30
|
inverted={colorState === "fill"}
|
|
30
31
|
className={merge("ml-[-6px]", className)}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { merge } from "@kivid/tailwind-preset";
|
|
3
3
|
import { Typography } from "../../../Typography";
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
import type { ChatBubbleTextProps } from "./types";
|
|
6
|
+
import { useChatBubbleContext } from "../../contexts";
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Typography component for bubble text content
|
|
@@ -12,11 +13,11 @@ export const ChatBubbleText: React.FC<ChatBubbleTextProps> = ({
|
|
|
12
13
|
children,
|
|
13
14
|
...props
|
|
14
15
|
}) => {
|
|
15
|
-
const { colorState,
|
|
16
|
+
const { colorState, variant } = useChatBubbleContext();
|
|
16
17
|
|
|
17
18
|
// Text color based on bubble colorState
|
|
18
19
|
const textColorClass =
|
|
19
|
-
colorState === "fill" &&
|
|
20
|
+
colorState === "fill" && variant !== "custom"
|
|
20
21
|
? "text-chia-200"
|
|
21
22
|
: "text-chia-800";
|
|
22
23
|
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
import { createContext, useContext } from "react";
|
|
2
|
-
import type {
|
|
3
|
-
ChatBubbleType,
|
|
4
|
-
ChatBubbleColorState,
|
|
5
|
-
ChatBubbleMessageType,
|
|
6
|
-
} from "./types";
|
|
7
2
|
|
|
8
|
-
|
|
9
|
-
contentType?: ChatBubbleType;
|
|
10
|
-
colorState: ChatBubbleColorState;
|
|
11
|
-
messageType: ChatBubbleMessageType;
|
|
12
|
-
}
|
|
3
|
+
import type { ChatBubbleContextValue } from "./types";
|
|
13
4
|
|
|
14
5
|
export const ChatBubbleContext = createContext<ChatBubbleContextValue | null>(
|
|
15
6
|
null
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ChatBubbleContext";
|
|
@@ -7,20 +7,23 @@ import {
|
|
|
7
7
|
ChatBubbleTime,
|
|
8
8
|
ChatBubbleLoading,
|
|
9
9
|
} from "./components";
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
import { chatBubbleBoxVariants } from "./assets/class-variants";
|
|
12
|
-
import type { ChatBubbleProps
|
|
12
|
+
import type { ChatBubbleProps } from "./types";
|
|
13
13
|
import { elevationDown100 } from "../../styles/mixins/shadows";
|
|
14
14
|
import { merge } from "@kivid/tailwind-preset";
|
|
15
|
+
import { ChatBubbleContext } from "./contexts";
|
|
16
|
+
import type { ChatBubbleContextValue } from "./contexts/ChatBubbleContext/types";
|
|
15
17
|
|
|
16
18
|
export function ChatBubble(props: ChatBubbleProps) {
|
|
17
19
|
const {
|
|
18
|
-
|
|
20
|
+
variant = "custom",
|
|
19
21
|
colorState = "outline",
|
|
20
|
-
hasEar =
|
|
22
|
+
hasEar = true,
|
|
21
23
|
className,
|
|
22
24
|
children,
|
|
23
25
|
time: timeFromProps,
|
|
26
|
+
shouldDisplayTime = true,
|
|
24
27
|
messageType = "initial",
|
|
25
28
|
...restOfProps
|
|
26
29
|
} = props;
|
|
@@ -35,11 +38,10 @@ export function ChatBubble(props: ChatBubbleProps) {
|
|
|
35
38
|
custom: "#FAFCFC",
|
|
36
39
|
};
|
|
37
40
|
|
|
38
|
-
const tailColor =
|
|
39
|
-
colorState === "outline" ? "#FAFCFC" : colorMap[contentType];
|
|
41
|
+
const tailColor = colorState === "outline" ? "#FAFCFC" : colorMap[variant];
|
|
40
42
|
|
|
41
43
|
const contextInitialValue: ChatBubbleContextValue = {
|
|
42
|
-
|
|
44
|
+
variant,
|
|
43
45
|
colorState,
|
|
44
46
|
messageType,
|
|
45
47
|
};
|
|
@@ -65,7 +67,7 @@ export function ChatBubble(props: ChatBubbleProps) {
|
|
|
65
67
|
<ChatBubbleContext.Provider value={contextInitialValue}>
|
|
66
68
|
<View
|
|
67
69
|
accessibilityRole="text"
|
|
68
|
-
accessibilityLabel={accessibilityLabelMap[
|
|
70
|
+
accessibilityLabel={accessibilityLabelMap[variant]}
|
|
69
71
|
accessible={true}
|
|
70
72
|
className={merge("flex", className)}
|
|
71
73
|
{...restOfProps}
|
|
@@ -84,7 +86,7 @@ export function ChatBubble(props: ChatBubbleProps) {
|
|
|
84
86
|
<View
|
|
85
87
|
className={merge(
|
|
86
88
|
chatBubbleBoxVariants({
|
|
87
|
-
|
|
89
|
+
variant,
|
|
88
90
|
colorState,
|
|
89
91
|
hasEar,
|
|
90
92
|
messageType,
|
|
@@ -98,7 +100,7 @@ export function ChatBubble(props: ChatBubbleProps) {
|
|
|
98
100
|
{children}
|
|
99
101
|
</View>
|
|
100
102
|
</View>
|
|
101
|
-
<ChatBubbleTime>{time}</ChatBubbleTime>
|
|
103
|
+
{shouldDisplayTime && <ChatBubbleTime>{time}</ChatBubbleTime>}
|
|
102
104
|
</View>
|
|
103
105
|
</ChatBubbleContext.Provider>
|
|
104
106
|
);
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import type { ViewProps } from "react-native";
|
|
2
2
|
|
|
3
|
-
export type { ChatBubbleContextValue } from "./context";
|
|
4
|
-
|
|
5
3
|
export type ChatBubbleType = "check" | "alert" | "error" | "custom";
|
|
6
4
|
export type ChatBubbleColorState = "fill" | "outline";
|
|
7
5
|
export type ChatBubbleMessageType = "initial" | "followUp";
|
|
8
6
|
|
|
9
7
|
export interface ChatBubbleProps extends Omit<ViewProps, "children"> {
|
|
10
|
-
|
|
8
|
+
variant?: ChatBubbleType;
|
|
11
9
|
colorState?: ChatBubbleColorState;
|
|
12
10
|
hasEar?: boolean;
|
|
13
11
|
className?: string;
|
|
14
12
|
children?: React.ReactNode;
|
|
15
13
|
time?: string;
|
|
14
|
+
shouldDisplayTime?: boolean;
|
|
16
15
|
messageType?: ChatBubbleMessageType;
|
|
17
16
|
}
|