@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.
Files changed (183) hide show
  1. package/dist/commonjs/components/Avatar/index.js +5 -4
  2. package/dist/commonjs/components/Avatar/index.js.map +1 -1
  3. package/dist/commonjs/components/ChatBubble/assets/class-variants.js +6 -6
  4. package/dist/commonjs/components/ChatBubble/assets/class-variants.js.map +1 -1
  5. package/dist/commonjs/components/ChatBubble/components/ChatBubbleSeal/index.js +5 -5
  6. package/dist/commonjs/components/ChatBubble/components/ChatBubbleSeal/index.js.map +1 -1
  7. package/dist/commonjs/components/ChatBubble/components/ChatBubbleText/index.js +4 -4
  8. package/dist/commonjs/components/ChatBubble/components/ChatBubbleText/index.js.map +1 -1
  9. package/dist/commonjs/components/ChatBubble/{context.js → contexts/ChatBubbleContext/index.js} +1 -1
  10. package/dist/commonjs/components/ChatBubble/contexts/ChatBubbleContext/index.js.map +1 -0
  11. package/dist/commonjs/components/ChatBubble/contexts/ChatBubbleContext/types.js +6 -0
  12. package/dist/commonjs/components/ChatBubble/contexts/ChatBubbleContext/types.js.map +1 -0
  13. package/dist/commonjs/components/ChatBubble/contexts/index.js +17 -0
  14. package/dist/commonjs/components/ChatBubble/contexts/index.js.map +1 -0
  15. package/dist/commonjs/components/ChatBubble/index.js +10 -9
  16. package/dist/commonjs/components/ChatBubble/index.js.map +1 -1
  17. package/dist/commonjs/components/IconButton/assets/class-variants.js +82 -0
  18. package/dist/commonjs/components/IconButton/assets/class-variants.js.map +1 -0
  19. package/dist/commonjs/components/IconButton/assets/design-system-showcase.js +119 -0
  20. package/dist/commonjs/components/IconButton/assets/design-system-showcase.js.map +1 -0
  21. package/dist/commonjs/components/IconButton/enums.js +33 -0
  22. package/dist/commonjs/components/IconButton/enums.js.map +1 -0
  23. package/dist/commonjs/components/IconButton/index.js +108 -0
  24. package/dist/commonjs/components/IconButton/index.js.map +1 -0
  25. package/dist/commonjs/components/IconButton/types.js +6 -0
  26. package/dist/commonjs/components/IconButton/types.js.map +1 -0
  27. package/dist/commonjs/components/ListButton/assets/class-variants.js +2 -10
  28. package/dist/commonjs/components/ListButton/assets/class-variants.js.map +1 -1
  29. package/dist/commonjs/components/ListButton/assets/design-system-showcase.js +424 -0
  30. package/dist/commonjs/components/ListButton/assets/design-system-showcase.js.map +1 -0
  31. package/dist/commonjs/components/ListButton/enums/index.js +0 -11
  32. package/dist/commonjs/components/ListButton/enums/index.js.map +1 -1
  33. package/dist/commonjs/components/ListButton/index.js +41 -36
  34. package/dist/commonjs/components/ListButton/index.js.map +1 -1
  35. package/dist/commonjs/components/OtpInput/assets/class-variant.js +1 -1
  36. package/dist/commonjs/components/OtpInput/assets/class-variant.js.map +1 -1
  37. package/dist/commonjs/components/OtpInput/components/InformationStatus/index.js +13 -11
  38. package/dist/commonjs/components/OtpInput/components/InformationStatus/index.js.map +1 -1
  39. package/dist/commonjs/components/OtpInput/enums/index.js +7 -8
  40. package/dist/commonjs/components/OtpInput/enums/index.js.map +1 -1
  41. package/dist/commonjs/components/OtpInput/index.js +66 -101
  42. package/dist/commonjs/components/OtpInput/index.js.map +1 -1
  43. package/dist/commonjs/components/PasswordInput/index.js +42 -0
  44. package/dist/commonjs/components/PasswordInput/index.js.map +1 -0
  45. package/dist/commonjs/components/PasswordInput/types.js +6 -0
  46. package/dist/commonjs/components/PasswordInput/types.js.map +1 -0
  47. package/dist/commonjs/components/TextInput/index.js +14 -3
  48. package/dist/commonjs/components/TextInput/index.js.map +1 -1
  49. package/dist/commonjs/components/Tooltip/index.js +44 -5
  50. package/dist/commonjs/components/Tooltip/index.js.map +1 -1
  51. package/dist/commonjs/components/index.js +33 -0
  52. package/dist/commonjs/components/index.js.map +1 -1
  53. package/dist/commonjs/iconography/Icons/index.js +1 -1
  54. package/dist/commonjs/iconography/Icons/index.js.map +1 -1
  55. package/dist/module/components/Avatar/index.js +5 -4
  56. package/dist/module/components/Avatar/index.js.map +1 -1
  57. package/dist/module/components/ChatBubble/assets/class-variants.js +6 -6
  58. package/dist/module/components/ChatBubble/assets/class-variants.js.map +1 -1
  59. package/dist/module/components/ChatBubble/components/ChatBubbleSeal/index.js +4 -4
  60. package/dist/module/components/ChatBubble/components/ChatBubbleSeal/index.js.map +1 -1
  61. package/dist/module/components/ChatBubble/components/ChatBubbleText/index.js +5 -4
  62. package/dist/module/components/ChatBubble/components/ChatBubbleText/index.js.map +1 -1
  63. package/dist/module/components/ChatBubble/{context.js → contexts/ChatBubbleContext/index.js} +1 -1
  64. package/dist/module/components/ChatBubble/contexts/ChatBubbleContext/index.js.map +1 -0
  65. package/dist/module/components/ChatBubble/contexts/ChatBubbleContext/types.js +4 -0
  66. package/dist/module/components/ChatBubble/contexts/ChatBubbleContext/types.js.map +1 -0
  67. package/dist/module/components/ChatBubble/contexts/index.js +4 -0
  68. package/dist/module/components/ChatBubble/contexts/index.js.map +1 -0
  69. package/dist/module/components/ChatBubble/index.js +9 -8
  70. package/dist/module/components/ChatBubble/index.js.map +1 -1
  71. package/dist/module/components/IconButton/assets/class-variants.js +79 -0
  72. package/dist/module/components/IconButton/assets/class-variants.js.map +1 -0
  73. package/dist/module/components/IconButton/assets/design-system-showcase.js +115 -0
  74. package/dist/module/components/IconButton/assets/design-system-showcase.js.map +1 -0
  75. package/dist/module/components/IconButton/enums.js +29 -0
  76. package/dist/module/components/IconButton/enums.js.map +1 -0
  77. package/dist/module/components/IconButton/index.js +103 -0
  78. package/dist/module/components/IconButton/index.js.map +1 -0
  79. package/dist/module/components/IconButton/types.js +4 -0
  80. package/dist/module/components/IconButton/types.js.map +1 -0
  81. package/dist/module/components/ListButton/assets/class-variants.js +2 -10
  82. package/dist/module/components/ListButton/assets/class-variants.js.map +1 -1
  83. package/dist/module/components/ListButton/assets/design-system-showcase.js +420 -0
  84. package/dist/module/components/ListButton/assets/design-system-showcase.js.map +1 -0
  85. package/dist/module/components/ListButton/enums/index.js +0 -1
  86. package/dist/module/components/ListButton/enums/index.js.map +1 -1
  87. package/dist/module/components/ListButton/index.js +44 -39
  88. package/dist/module/components/ListButton/index.js.map +1 -1
  89. package/dist/module/components/OtpInput/assets/class-variant.js +1 -1
  90. package/dist/module/components/OtpInput/assets/class-variant.js.map +1 -1
  91. package/dist/module/components/OtpInput/components/InformationStatus/index.js +15 -13
  92. package/dist/module/components/OtpInput/components/InformationStatus/index.js.map +1 -1
  93. package/dist/module/components/OtpInput/enums/index.js +6 -7
  94. package/dist/module/components/OtpInput/enums/index.js.map +1 -1
  95. package/dist/module/components/OtpInput/index.js +66 -101
  96. package/dist/module/components/OtpInput/index.js.map +1 -1
  97. package/dist/module/components/PasswordInput/index.js +37 -0
  98. package/dist/module/components/PasswordInput/index.js.map +1 -0
  99. package/dist/module/components/PasswordInput/types.js +4 -0
  100. package/dist/module/components/PasswordInput/types.js.map +1 -0
  101. package/dist/module/components/TextInput/index.js +14 -3
  102. package/dist/module/components/TextInput/index.js.map +1 -1
  103. package/dist/module/components/Tooltip/index.js +45 -6
  104. package/dist/module/components/Tooltip/index.js.map +1 -1
  105. package/dist/module/components/index.js +3 -0
  106. package/dist/module/components/index.js.map +1 -1
  107. package/dist/module/iconography/Icons/index.js +2 -2
  108. package/dist/module/iconography/Icons/index.js.map +1 -1
  109. package/dist/typescript/components/Avatar/types.d.ts +1 -0
  110. package/dist/typescript/components/ChatBubble/assets/class-variants.d.ts +1 -1
  111. package/dist/typescript/components/ChatBubble/components/ChatBubbleSeal/types.d.ts +1 -1
  112. package/dist/typescript/components/ChatBubble/components/ChatBubbleText/types.d.ts +1 -1
  113. package/dist/typescript/components/ChatBubble/contexts/ChatBubbleContext/index.d.ts +3 -0
  114. package/dist/typescript/components/ChatBubble/contexts/ChatBubbleContext/types.d.ts +6 -0
  115. package/dist/typescript/components/ChatBubble/contexts/index.d.ts +1 -0
  116. package/dist/typescript/components/ChatBubble/types.d.ts +2 -2
  117. package/dist/typescript/components/IconButton/assets/class-variants.d.ts +8 -0
  118. package/dist/typescript/components/IconButton/assets/design-system-showcase.d.ts +17 -0
  119. package/dist/typescript/components/IconButton/enums.d.ts +22 -0
  120. package/dist/typescript/components/IconButton/index.d.ts +2 -0
  121. package/dist/typescript/components/IconButton/types.d.ts +15 -0
  122. package/dist/typescript/components/ListButton/assets/class-variants.d.ts +1 -4
  123. package/dist/typescript/components/ListButton/assets/design-system-showcase.d.ts +14 -0
  124. package/dist/typescript/components/ListButton/enums/index.d.ts +0 -1
  125. package/dist/typescript/components/ListButton/types.d.ts +7 -5
  126. package/dist/typescript/components/OtpInput/components/InformationStatus/types.d.ts +2 -2
  127. package/dist/typescript/components/OtpInput/enums/index.d.ts +2 -3
  128. package/dist/typescript/components/OtpInput/index.d.ts +1 -1
  129. package/dist/typescript/components/OtpInput/types.d.ts +4 -4
  130. package/dist/typescript/components/PasswordInput/index.d.ts +2 -0
  131. package/dist/typescript/components/PasswordInput/types.d.ts +3 -0
  132. package/dist/typescript/components/TextInput/index.d.ts +1 -1
  133. package/dist/typescript/components/TextInput/types.d.ts +3 -0
  134. package/dist/typescript/components/Tooltip/components/Content/types.d.ts +1 -0
  135. package/dist/typescript/components/Tooltip/types.d.ts +2 -1
  136. package/dist/typescript/components/index.d.ts +6 -0
  137. package/package.json +5 -5
  138. package/src/components/Avatar/index.tsx +4 -4
  139. package/src/components/Avatar/types.ts +1 -0
  140. package/src/components/ChatBubble/assets/class-variants.ts +6 -6
  141. package/src/components/ChatBubble/components/ChatBubbleSeal/index.tsx +5 -4
  142. package/src/components/ChatBubble/components/ChatBubbleSeal/types.ts +1 -1
  143. package/src/components/ChatBubble/components/ChatBubbleText/index.tsx +4 -3
  144. package/src/components/ChatBubble/components/ChatBubbleText/types.ts +1 -1
  145. package/src/components/ChatBubble/{context.tsx → contexts/ChatBubbleContext/index.tsx} +1 -10
  146. package/src/components/ChatBubble/contexts/ChatBubbleContext/types.ts +11 -0
  147. package/src/components/ChatBubble/contexts/index.ts +1 -0
  148. package/src/components/ChatBubble/index.tsx +12 -10
  149. package/src/components/ChatBubble/types.ts +2 -3
  150. package/src/components/IconButton/assets/class-variants.ts +126 -0
  151. package/src/components/IconButton/assets/design-system-showcase.ts +246 -0
  152. package/src/components/IconButton/enums.ts +26 -0
  153. package/src/components/IconButton/index.tsx +124 -0
  154. package/src/components/IconButton/types.ts +22 -0
  155. package/src/components/ListButton/assets/class-variants.ts +2 -11
  156. package/src/components/ListButton/assets/design-system-showcase.ts +502 -0
  157. package/src/components/ListButton/enums/index.ts +0 -1
  158. package/src/components/ListButton/index.tsx +44 -41
  159. package/src/components/ListButton/types.ts +7 -5
  160. package/src/components/OtpInput/assets/class-variant.ts +1 -1
  161. package/src/components/OtpInput/components/InformationStatus/index.tsx +15 -14
  162. package/src/components/OtpInput/components/InformationStatus/types.ts +2 -2
  163. package/src/components/OtpInput/enums/index.ts +1 -2
  164. package/src/components/OtpInput/index.tsx +77 -136
  165. package/src/components/OtpInput/types.ts +4 -4
  166. package/src/components/PasswordInput/index.tsx +37 -0
  167. package/src/components/PasswordInput/types.ts +4 -0
  168. package/src/components/TextInput/index.tsx +17 -3
  169. package/src/components/TextInput/types.ts +3 -0
  170. package/src/components/Tooltip/components/Content/types.ts +1 -0
  171. package/src/components/Tooltip/index.tsx +57 -5
  172. package/src/components/Tooltip/types.ts +2 -1
  173. package/src/components/index.ts +8 -0
  174. package/src/iconography/Icons/index.tsx +2 -3
  175. package/dist/commonjs/components/ChatBubble/context.js.map +0 -1
  176. package/dist/commonjs/components/ListButton/enums/icon-color.js +0 -18
  177. package/dist/commonjs/components/ListButton/enums/icon-color.js.map +0 -1
  178. package/dist/module/components/ChatBubble/context.js.map +0 -1
  179. package/dist/module/components/ListButton/enums/icon-color.js +0 -14
  180. package/dist/module/components/ListButton/enums/icon-color.js.map +0 -1
  181. package/dist/typescript/components/ChatBubble/context.d.ts +0 -8
  182. package/dist/typescript/components/ListButton/enums/icon-color.d.ts +0 -10
  183. package/src/components/ListButton/enums/icon-color.ts +0 -10
@@ -1 +1 @@
1
- {"version":3,"names":["IconsNative","React","useMemo","useState","Alert","FlatList","Pressable","SafeAreaView","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
+ {"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":[]}
@@ -4,4 +4,5 @@ export interface AvatarProps {
4
4
  src?: string | null;
5
5
  name?: string;
6
6
  size?: AvatarSize;
7
+ className?: string;
7
8
  }
@@ -1,5 +1,5 @@
1
1
  export declare const chatBubbleBoxVariants: (props?: ({
2
- contentType?: "alert" | "error" | "check" | "custom" | null | undefined;
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;
@@ -1,4 +1,4 @@
1
- import { SealProps } from "../../..";
1
+ import { SealProps } from "../../../Seal/types";
2
2
  export interface ChatBubbleSealProps extends Omit<SealProps, "variant"> {
3
3
  className?: string;
4
4
  }
@@ -1,4 +1,4 @@
1
- import { TypographyProps } from "../../..";
1
+ import { TypographyProps } from "../../../Typography/types";
2
2
  export interface ChatBubbleTextProps extends Omit<TypographyProps, "variant" | "weight"> {
3
3
  className?: string;
4
4
  }
@@ -0,0 +1,3 @@
1
+ import type { ChatBubbleContextValue } from "./types";
2
+ export declare const ChatBubbleContext: import("react").Context<ChatBubbleContextValue | null>;
3
+ export declare const useChatBubbleContext: () => ChatBubbleContextValue;
@@ -0,0 +1,6 @@
1
+ import { ChatBubbleColorState, ChatBubbleMessageType, ChatBubbleType } from "../../types";
2
+ export interface ChatBubbleContextValue {
3
+ variant?: ChatBubbleType;
4
+ colorState: ChatBubbleColorState;
5
+ messageType: ChatBubbleMessageType;
6
+ }
@@ -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
- contentType?: ChatBubbleType;
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,2 @@
1
+ import type { IconButtonProps } from "./types";
2
+ export declare function IconButton(props: IconButtonProps): import("react").JSX.Element;
@@ -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
- declare const iconButtonVariants: (props?: ({
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,2 +1 @@
1
1
  export * from "./variant";
2
- export * from "./icon-color";
@@ -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 { ListButtonIconColorEnum, ListButtonVariantEnum } from "./enums";
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
- icon?: React.ReactNode;
8
- iconColor?: ListButtonIconColorEnum;
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: string;
17
+ accessibilityLabel?: string;
18
+ numberOfLines?: number;
17
19
  }
@@ -1,6 +1,6 @@
1
- import type { InformationStatusEnum } from "../../enums";
1
+ import type { OTPInputInformationStatusEnum } from "../../enums";
2
2
  export interface InformationStatusProps {
3
- status: InformationStatusEnum;
3
+ status: OTPInputInformationStatusEnum;
4
4
  disabled?: boolean;
5
5
  onPress?: () => void;
6
6
  }
@@ -1,7 +1,6 @@
1
- export declare enum InformationStatusEnum {
1
+ export declare enum OTPInputInformationStatusEnum {
2
2
  DEFAULT = "default",
3
3
  ERROR = "error",
4
4
  SUCCESS = "success",
5
- LOADING = "loading",
6
- COOLDOWN = "cooldown"
5
+ LOADING = "loading"
7
6
  }
@@ -1,3 +1,3 @@
1
- import type { OtpInputProps } from "./types";
1
+ import { OtpInputProps } from "./types";
2
2
  export declare function OtpInput(props: OtpInputProps): import("react").JSX.Element;
3
3
  export default OtpInput;
@@ -1,12 +1,12 @@
1
1
  import type React from "react";
2
- import type { InformationStatusEnum } from "./enums";
2
+ import { OTPInputInformationStatusEnum } from "./enums";
3
3
  export interface OtpInputProps {
4
- OTPInputsQuantity?: number;
4
+ length?: number;
5
5
  rounded?: boolean;
6
6
  disabled?: boolean;
7
- status?: InformationStatusEnum;
7
+ status?: OTPInputInformationStatusEnum;
8
8
  customInformation?: React.ReactNode;
9
- onChange: (value: string) => void;
9
+ onChange: (value?: string) => void;
10
10
  onPressRetryToken?: (value: string) => void;
11
11
  inputClassName?: string;
12
12
  }
@@ -0,0 +1,2 @@
1
+ import { PasswordInputProps } from "./types";
2
+ export declare function PasswordInput(props: PasswordInputProps): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { TextInputProps } from "../TextInput/types";
2
+ export interface PasswordInputProps extends Omit<TextInputProps, "secureTextEntry"> {
3
+ }
@@ -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
  }
@@ -10,4 +10,5 @@ export interface ContentProps {
10
10
  onLayout?: (event: LayoutChangeEvent) => void;
11
11
  translateX?: number;
12
12
  pointerOffset?: TooltipPointerOffsetEnum;
13
+ onChangeVisibility?: (isVisible: boolean) => void;
13
14
  }
@@ -7,6 +7,7 @@ export interface TooltipProps {
7
7
  className?: string;
8
8
  pointerClassName?: string;
9
9
  containerClassName?: string;
10
- isVisible: boolean;
11
10
  style?: ViewStyle;
11
+ onChangeVisibility?: (isVisible: boolean) => void;
12
+ isOpenedByVariantError?: boolean;
12
13
  }
@@ -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.6",
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/tailwind-preset": "1.0.0-alpha.6",
82
- "@kivid/icons": "1.0.0-alpha.6"
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.6",
93
- "@kivid/icons": "1.0.0-alpha.6"
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"}
@@ -12,4 +12,5 @@ export interface AvatarProps {
12
12
  src?: string | null;
13
13
  name?: string;
14
14
  size?: AvatarSize;
15
+ className?: string;
15
16
  }
@@ -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
- contentType: {
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
- contentType: "check",
28
+ variant: "check",
29
29
  colorState: "fill",
30
30
  className: "bg-pear-500",
31
31
  },
32
32
  {
33
- contentType: "alert",
33
+ variant: "alert",
34
34
  colorState: "fill",
35
35
  className: "bg-tangerine-500",
36
36
  },
37
37
  {
38
- contentType: "error",
38
+ variant: "error",
39
39
  colorState: "fill",
40
40
  className: "bg-blackberry-500",
41
41
  },
42
42
  {
43
- contentType: "custom",
43
+ variant: "custom",
44
44
  colorState: "fill",
45
45
  className: "bg-chia-100",
46
46
  },
47
47
  {
48
- contentType: "custom",
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
- import { useChatBubbleContext } from "../../context";
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 { contentType, colorState } = useChatBubbleContext();
14
+ const { variant, colorState } = useChatBubbleContext();
14
15
 
15
- if (!contentType || contentType === "custom") {
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[contentType]}
28
+ variant={sealVariantMap[variant]}
28
29
  size={SizeEnum.MEDIUM}
29
30
  inverted={colorState === "fill"}
30
31
  className={merge("ml-[-6px]", className)}
@@ -1,4 +1,4 @@
1
- import { SealProps } from "../../..";
1
+ import { SealProps } from "../../../Seal/types";
2
2
 
3
3
  export interface ChatBubbleSealProps extends Omit<SealProps, "variant"> {
4
4
  className?: string;
@@ -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
- import { useChatBubbleContext } from "../../context";
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, contentType } = useChatBubbleContext();
16
+ const { colorState, variant } = useChatBubbleContext();
16
17
 
17
18
  // Text color based on bubble colorState
18
19
  const textColorClass =
19
- colorState === "fill" && contentType !== "custom"
20
+ colorState === "fill" && variant !== "custom"
20
21
  ? "text-chia-200"
21
22
  : "text-chia-800";
22
23
 
@@ -1,4 +1,4 @@
1
- import { TypographyProps } from "../../..";
1
+ import { TypographyProps } from "../../../Typography/types";
2
2
 
3
3
  export interface ChatBubbleTextProps
4
4
  extends Omit<TypographyProps, "variant" | "weight"> {
@@ -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
- export interface ChatBubbleContextValue {
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,11 @@
1
+ import {
2
+ ChatBubbleColorState,
3
+ ChatBubbleMessageType,
4
+ ChatBubbleType,
5
+ } from "../../types";
6
+
7
+ export interface ChatBubbleContextValue {
8
+ variant?: ChatBubbleType;
9
+ colorState: ChatBubbleColorState;
10
+ messageType: ChatBubbleMessageType;
11
+ }
@@ -0,0 +1 @@
1
+ export * from "./ChatBubbleContext";
@@ -7,20 +7,23 @@ import {
7
7
  ChatBubbleTime,
8
8
  ChatBubbleLoading,
9
9
  } from "./components";
10
- import { ChatBubbleContext } from "./context";
10
+
11
11
  import { chatBubbleBoxVariants } from "./assets/class-variants";
12
- import type { ChatBubbleProps, ChatBubbleContextValue } from "./types";
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
- contentType = "custom",
20
+ variant = "custom",
19
21
  colorState = "outline",
20
- hasEar = false,
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
- contentType,
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[contentType]}
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
- contentType,
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
- contentType?: ChatBubbleType;
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
  }