@kivid/native-components 1.0.0-alpha.7 → 1.0.0-alpha.9
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/Button/index.js +2 -1
- package/dist/commonjs/components/Button/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 +3 -3
- package/dist/commonjs/components/ChatBubble/components/ChatBubbleSeal/index.js.map +1 -1
- package/dist/commonjs/components/ChatBubble/components/ChatBubbleText/index.js +2 -2
- package/dist/commonjs/components/ChatBubble/components/ChatBubbleText/index.js.map +1 -1
- package/dist/commonjs/components/ChatBubble/index.js +14 -9
- package/dist/commonjs/components/ChatBubble/index.js.map +1 -1
- package/dist/commonjs/components/ListButton/assets/class-variants.js +1 -1
- package/dist/commonjs/components/ListButton/assets/class-variants.js.map +1 -1
- package/dist/commonjs/components/ListButton/index.js +22 -13
- package/dist/commonjs/components/ListButton/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/assets/class-variants.js +1 -1
- package/dist/commonjs/components/TextInput/assets/class-variants.js.map +1 -1
- package/dist/commonjs/components/TextInput/index.js +13 -2
- package/dist/commonjs/components/TextInput/index.js.map +1 -1
- package/dist/commonjs/components/Title/components/icon/types.js +0 -9
- package/dist/commonjs/components/Title/components/icon/types.js.map +1 -1
- package/dist/commonjs/components/index.js +11 -0
- package/dist/commonjs/components/index.js.map +1 -1
- package/dist/commonjs/enums/index.js +11 -0
- package/dist/commonjs/enums/index.js.map +1 -1
- package/dist/commonjs/enums/state-variant.js +15 -0
- package/dist/commonjs/enums/state-variant.js.map +1 -0
- package/dist/module/components/Avatar/index.js +5 -4
- package/dist/module/components/Avatar/index.js.map +1 -1
- package/dist/module/components/Button/index.js +2 -1
- package/dist/module/components/Button/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 +3 -3
- package/dist/module/components/ChatBubble/components/ChatBubbleSeal/index.js.map +1 -1
- package/dist/module/components/ChatBubble/components/ChatBubbleText/index.js +2 -2
- package/dist/module/components/ChatBubble/components/ChatBubbleText/index.js.map +1 -1
- package/dist/module/components/ChatBubble/index.js +14 -9
- package/dist/module/components/ChatBubble/index.js.map +1 -1
- package/dist/module/components/ListButton/assets/class-variants.js +1 -1
- package/dist/module/components/ListButton/assets/class-variants.js.map +1 -1
- package/dist/module/components/ListButton/index.js +22 -13
- package/dist/module/components/ListButton/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/assets/class-variants.js +1 -1
- package/dist/module/components/TextInput/assets/class-variants.js.map +1 -1
- package/dist/module/components/TextInput/index.js +13 -2
- package/dist/module/components/TextInput/index.js.map +1 -1
- package/dist/module/components/Title/components/icon/types.js +1 -8
- package/dist/module/components/Title/components/icon/types.js.map +1 -1
- package/dist/module/components/index.js +1 -0
- package/dist/module/components/index.js.map +1 -1
- package/dist/module/enums/index.js +1 -0
- package/dist/module/enums/index.js.map +1 -1
- package/dist/module/enums/state-variant.js +11 -0
- package/dist/module/enums/state-variant.js.map +1 -0
- 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/contexts/ChatBubbleContext/types.d.ts +1 -1
- package/dist/typescript/components/ChatBubble/types.d.ts +2 -1
- package/dist/typescript/components/Chip/assets/class-variants.d.ts +1 -1
- package/dist/typescript/components/ListButton/types.d.ts +2 -1
- package/dist/typescript/components/PasswordInput/index.d.ts +2 -0
- package/dist/typescript/components/PasswordInput/types.d.ts +3 -0
- package/dist/typescript/components/Seal/assets/class-variants.d.ts +1 -1
- package/dist/typescript/components/TextInput/index.d.ts +1 -1
- package/dist/typescript/components/TextInput/types.d.ts +3 -0
- package/dist/typescript/components/Title/components/icon/types.d.ts +2 -9
- package/dist/typescript/components/Tooltip/types.d.ts +0 -1
- package/dist/typescript/components/index.d.ts +2 -0
- package/dist/typescript/enums/index.d.ts +1 -0
- package/dist/typescript/enums/state-variant.d.ts +7 -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/Button/index.tsx +2 -1
- package/src/components/ChatBubble/assets/class-variants.ts +6 -6
- package/src/components/ChatBubble/components/ChatBubbleSeal/index.tsx +3 -3
- package/src/components/ChatBubble/components/ChatBubbleText/index.tsx +2 -2
- package/src/components/ChatBubble/contexts/ChatBubbleContext/types.ts +1 -1
- package/src/components/ChatBubble/index.tsx +14 -11
- package/src/components/ChatBubble/types.ts +2 -1
- package/src/components/ListButton/assets/class-variants.ts +1 -1
- package/src/components/ListButton/index.tsx +27 -26
- package/src/components/ListButton/types.ts +2 -1
- package/src/components/PasswordInput/index.tsx +37 -0
- package/src/components/PasswordInput/types.ts +4 -0
- package/src/components/TextInput/assets/class-variants.ts +1 -1
- package/src/components/TextInput/index.tsx +16 -2
- package/src/components/TextInput/types.ts +3 -0
- package/src/components/Title/components/icon/types.ts +2 -10
- package/src/components/Tooltip/types.ts +0 -1
- package/src/components/index.ts +3 -0
- package/src/enums/index.ts +1 -0
- package/src/enums/state-variant.ts +7 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["cva","textInputContainerVariants","variants","corners","small","medium","showLabel","true","false","error","disabled","defaultVariants","textInputContentVariants","textInputFieldVariants","isValid"],"sourceRoot":"../../../../../src","sources":["components/TextInput/assets/class-variants.ts"],"mappings":";;AAAA,SAASA,GAAG,QAAQ,0BAA0B;AAE9C,OAAO,MAAMC,0BAA0B,GAAGD,GAAG,CAC3C,mEAAmE,EACnE;EACEE,QAAQ,EAAE;IACRC,OAAO,EAAE;MACPC,KAAK,EAAE,aAAa;MACpBC,MAAM,EAAE;IACV,CAAC;IACDC,SAAS,EAAE;MACTC,IAAI,EAAE,uBAAuB;MAC7BC,KAAK,EAAE;IACT,CAAC;IACDC,KAAK,EAAE;MACLF,IAAI,EAAE,uBAAuB;MAC7BC,KAAK,EAAE;IACT,CAAC;IAEDE,QAAQ,EAAE;MACRH,IAAI,EAAE,YAAY;MAClBC,KAAK,EAAE;IACT;EACF,CAAC;EACDG,eAAe,EAAE;IACfR,OAAO,EAAE,QAAQ;IACjBG,SAAS,EAAE,KAAK;IAChBG,KAAK,EAAE,KAAK;IACZC,QAAQ,EAAE;EACZ;AACF,CACF,CAAC;AAED,OAAO,MAAME,wBAAwB,GAAGZ,GAAG,CAAC,+BAA+B,EAAE;EAC3EE,QAAQ,EAAE;IACRI,SAAS,EAAE;MACTC,IAAI,EAAE,OAAO;MACbC,KAAK,EAAE;IACT;EACF,CAAC;EACDG,eAAe,EAAE;IACfL,SAAS,EAAE;EACb;AACF,CAAC,CAAC;AAEF,OAAO,MAAMO,sBAAsB,GAAGb,GAAG,CACvC,
|
|
1
|
+
{"version":3,"names":["cva","textInputContainerVariants","variants","corners","small","medium","showLabel","true","false","error","disabled","defaultVariants","textInputContentVariants","textInputFieldVariants","isValid"],"sourceRoot":"../../../../../src","sources":["components/TextInput/assets/class-variants.ts"],"mappings":";;AAAA,SAASA,GAAG,QAAQ,0BAA0B;AAE9C,OAAO,MAAMC,0BAA0B,GAAGD,GAAG,CAC3C,mEAAmE,EACnE;E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
|
28
28
|
containerTestID,
|
|
29
29
|
ref,
|
|
30
30
|
tooltipClassName = "",
|
|
31
|
+
tooltipPointerClassName,
|
|
32
|
+
tooltipContainerClassName,
|
|
33
|
+
rightIcon,
|
|
31
34
|
...rest
|
|
32
35
|
}) {
|
|
33
36
|
const inputRef = useRef(null);
|
|
@@ -47,6 +50,12 @@ export function TextInput({
|
|
|
47
50
|
})
|
|
48
51
|
});
|
|
49
52
|
};
|
|
53
|
+
const renderRightIcon = () => {
|
|
54
|
+
if (rightIcon) {
|
|
55
|
+
return rightIcon;
|
|
56
|
+
}
|
|
57
|
+
return renderSeal();
|
|
58
|
+
};
|
|
50
59
|
const handleChangeText = text => {
|
|
51
60
|
onChangeText?.(text);
|
|
52
61
|
};
|
|
@@ -60,9 +69,11 @@ export function TextInput({
|
|
|
60
69
|
};
|
|
61
70
|
return /*#__PURE__*/_jsx(Tooltip, {
|
|
62
71
|
isOpenedByVariantError: hasError,
|
|
63
|
-
message:
|
|
72
|
+
message: error,
|
|
64
73
|
variant: TooltipVariantEnum.ERROR,
|
|
65
74
|
className: tooltipClassName,
|
|
75
|
+
pointerClassName: tooltipPointerClassName,
|
|
76
|
+
containerClassName: tooltipContainerClassName,
|
|
66
77
|
children: /*#__PURE__*/_jsxs(Pressable, {
|
|
67
78
|
testID: containerTestID,
|
|
68
79
|
className: merge(textInputContainerVariants({
|
|
@@ -109,7 +120,7 @@ export function TextInput({
|
|
|
109
120
|
}
|
|
110
121
|
}
|
|
111
122
|
})]
|
|
112
|
-
}),
|
|
123
|
+
}), renderRightIcon()]
|
|
113
124
|
})
|
|
114
125
|
});
|
|
115
126
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useRef","View","TextInput","RNTextInput","Pressable","merge","Seal","SealVariantEnum","TextInputCornersEnum","textInputContainerVariants","textInputContentVariants","textInputFieldVariants","Typography","SizeEnum","Tooltip","TooltipVariantEnum","jsx","_jsx","jsxs","_jsxs","corners","MEDIUM","label","value","onChangeText","disabled","error","isValid","className","inputClassName","labelClassName","placeholder","accessibilityLabel","containerTestID","ref","tooltipClassName","rest","inputRef","hasLabel","hasError","shouldShowSeal","renderSeal","testID","sealVariant","ERROR","SUCCESS","children","variant","size","handleChangeText","text","getAccessibilityLabel","labelText","isOpenedByVariantError","message","showLabel","onPress","current","focus","weight","editable","accessibilityState","instance","displayName"],"sourceRoot":"../../../../src","sources":["components/TextInput/index.tsx"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,OAAO;AAC9B,SAASC,IAAI,EAAEC,SAAS,IAAIC,WAAW,EAAEC,SAAS,QAAQ,cAAc;AACxE,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,IAAI,QAAQ,kBAAS;AAC9B,SAASC,eAAe,QAAQ,wBAAe;AAE/C,SAASC,oBAAoB,QAAQ,YAAS;AAC9C,SACEC,0BAA0B,EAC1BC,wBAAwB,EACxBC,sBAAsB,QACjB,4BAAyB;AAChC,OAAOC,UAAU,MAAM,wBAAe;AACtC,SAASC,QAAQ,QAAQ,sBAAa;AACtC,SAASC,OAAO,QAAQ,qBAAY;AACpC,SAASC,kBAAkB,QAAQ,0BAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAErD,OAAO,SAASjB,SAASA,CAAC;EACxBkB,OAAO,GAAGZ,oBAAoB,CAACa,MAAM;EACrCC,KAAK;EACLC,KAAK;EACLC,YAAY;EACZC,QAAQ,GAAG,KAAK;EAChBC,KAAK;EACLC,OAAO;EACPC,SAAS,GAAG,EAAE;EACdC,cAAc,GAAG,EAAE;EACnBC,cAAc,GAAG,EAAE;EACnBC,WAAW,GAAG,aAAa;EAC3BC,kBAAkB;EAClBC,eAAe;EACfC,GAAG;EACHC,gBAAgB,GAAG,EAAE;
|
|
1
|
+
{"version":3,"names":["useRef","View","TextInput","RNTextInput","Pressable","merge","Seal","SealVariantEnum","TextInputCornersEnum","textInputContainerVariants","textInputContentVariants","textInputFieldVariants","Typography","SizeEnum","Tooltip","TooltipVariantEnum","jsx","_jsx","jsxs","_jsxs","corners","MEDIUM","label","value","onChangeText","disabled","error","isValid","className","inputClassName","labelClassName","placeholder","accessibilityLabel","containerTestID","ref","tooltipClassName","tooltipPointerClassName","tooltipContainerClassName","rightIcon","rest","inputRef","hasLabel","hasError","shouldShowSeal","renderSeal","testID","sealVariant","ERROR","SUCCESS","children","variant","size","renderRightIcon","handleChangeText","text","getAccessibilityLabel","labelText","isOpenedByVariantError","message","pointerClassName","containerClassName","showLabel","onPress","current","focus","weight","editable","accessibilityState","instance","displayName"],"sourceRoot":"../../../../src","sources":["components/TextInput/index.tsx"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,OAAO;AAC9B,SAASC,IAAI,EAAEC,SAAS,IAAIC,WAAW,EAAEC,SAAS,QAAQ,cAAc;AACxE,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,IAAI,QAAQ,kBAAS;AAC9B,SAASC,eAAe,QAAQ,wBAAe;AAE/C,SAASC,oBAAoB,QAAQ,YAAS;AAC9C,SACEC,0BAA0B,EAC1BC,wBAAwB,EACxBC,sBAAsB,QACjB,4BAAyB;AAChC,OAAOC,UAAU,MAAM,wBAAe;AACtC,SAASC,QAAQ,QAAQ,sBAAa;AACtC,SAASC,OAAO,QAAQ,qBAAY;AACpC,SAASC,kBAAkB,QAAQ,0BAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAErD,OAAO,SAASjB,SAASA,CAAC;EACxBkB,OAAO,GAAGZ,oBAAoB,CAACa,MAAM;EACrCC,KAAK;EACLC,KAAK;EACLC,YAAY;EACZC,QAAQ,GAAG,KAAK;EAChBC,KAAK;EACLC,OAAO;EACPC,SAAS,GAAG,EAAE;EACdC,cAAc,GAAG,EAAE;EACnBC,cAAc,GAAG,EAAE;EACnBC,WAAW,GAAG,aAAa;EAC3BC,kBAAkB;EAClBC,eAAe;EACfC,GAAG;EACHC,gBAAg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ACPD,KAAK,EAAEgB,QAAQ;YACfmB,SAAS,EAAEpB;UACb,CAAC,CAAC,EACFZ,cACF,CAAE;UACFG,kBAAkB,EAAEuB,qBAAqB,CAAC,CAAE;UAC5CY,kBAAkB,EAAE;YAClB1C;UACF,CAAE;UAAA,GACEc,IAAI;UACRL,GAAG,EAAGkC,QAAQ,IAAK;YACjB5B,QAAQ,CAACuB,OAAO,GAAGK,QAAQ;YAE3B,IAAIlC,GAAG,EAAE;cACPA,GAAG,CAAC6B,OAAO,GAAGK,QAAQ;YACxB;UACF;QAAE,CACH,CAAC;MAAA,CACE,CAAC,EAENhB,eAAe,CAAC,CAAC;IAAA,CACT;EAAC,CACL,CAAC;AAEd;AAEAlD,SAAS,CAACmE,WAAW,GAAG,WAAW;AAEnC,eAAenE,SAAS","ignoreList":[]}
|
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
export
|
|
4
|
-
IconVariants["SUCCESS"] = "success";
|
|
5
|
-
IconVariants["ERROR"] = "error";
|
|
6
|
-
IconVariants["WARNING"] = "warning";
|
|
7
|
-
IconVariants["ADD"] = "add";
|
|
8
|
-
IconVariants["CUSTOM"] = "custom";
|
|
9
|
-
return IconVariants;
|
|
10
|
-
}({});
|
|
3
|
+
export {};
|
|
11
4
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../../src","sources":["components/Title/components/icon/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;AAAA,cAAc,mBAAU;AACxB,cAAc,mBAAU;AAGxB,cAAc,uBAAc;AAI5B,cAAc,iBAAQ;AACtB,cAAc,iBAAc;AAC5B,cAAc,uBAAc;AAE5B,cAAc,8BAAqB;AAEnC,cAAc,8BAA2B;AAEzC,c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B;AAEpC,cAAc,uBAAc;AAE5B,cAAc,6BAAoB;AAElC,cAAc,uBAAc;AAE5B,cAAc,uBAAoB;AAElC,cAAc,0BAAiB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["enums/index.ts"],"mappings":";;AAAA,cAAc,WAAQ;AACtB,cAAc,cAAW","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["enums/index.ts"],"mappings":";;AAAA,cAAc,WAAQ;AACtB,cAAc,cAAW;AACzB,cAAc,oBAAiB","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export let StateVariantEnum = /*#__PURE__*/function (StateVariantEnum) {
|
|
4
|
+
StateVariantEnum["SUCCESS"] = "success";
|
|
5
|
+
StateVariantEnum["ERROR"] = "error";
|
|
6
|
+
StateVariantEnum["WARNING"] = "warning";
|
|
7
|
+
StateVariantEnum["ADD"] = "add";
|
|
8
|
+
StateVariantEnum["CUSTOM"] = "custom";
|
|
9
|
+
return StateVariantEnum;
|
|
10
|
+
}({});
|
|
11
|
+
//# sourceMappingURL=state-variant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["StateVariantEnum"],"sourceRoot":"../../../src","sources":["enums/state-variant.ts"],"mappings":";;AAAA,WAAYA,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const chatBubbleBoxVariants: (props?: ({
|
|
2
|
-
|
|
2
|
+
variant?: "error" | "custom" | "alert" | "check" | null | undefined;
|
|
3
3
|
colorState?: "fill" | "outline" | null | undefined;
|
|
4
4
|
hasEar?: boolean | null | undefined;
|
|
5
5
|
messageType?: "initial" | "followUp" | null | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChatBubbleColorState, ChatBubbleMessageType, ChatBubbleType } from "../../types";
|
|
2
2
|
export interface ChatBubbleContextValue {
|
|
3
|
-
|
|
3
|
+
variant?: ChatBubbleType;
|
|
4
4
|
colorState: ChatBubbleColorState;
|
|
5
5
|
messageType: ChatBubbleMessageType;
|
|
6
6
|
}
|
|
@@ -3,11 +3,12 @@ export type ChatBubbleType = "check" | "alert" | "error" | "custom";
|
|
|
3
3
|
export type ChatBubbleColorState = "fill" | "outline";
|
|
4
4
|
export type ChatBubbleMessageType = "initial" | "followUp";
|
|
5
5
|
export interface ChatBubbleProps extends Omit<ViewProps, "children"> {
|
|
6
|
-
|
|
6
|
+
variant?: ChatBubbleType;
|
|
7
7
|
colorState?: ChatBubbleColorState;
|
|
8
8
|
hasEar?: boolean;
|
|
9
9
|
className?: string;
|
|
10
10
|
children?: React.ReactNode;
|
|
11
11
|
time?: string;
|
|
12
|
+
shouldDisplayTime?: boolean;
|
|
12
13
|
messageType?: ChatBubbleMessageType;
|
|
13
14
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const chipVariants: (props?: ({
|
|
2
2
|
size?: "medium" | "large" | null | undefined;
|
|
3
3
|
variant?: "outline" | "highlight" | "filled" | null | undefined;
|
|
4
|
-
sealVariant?: "
|
|
4
|
+
sealVariant?: "success" | "error" | "add" | "alert" | "left" | "right" | "minus" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -14,5 +14,6 @@ export interface ListButtonProps extends PressableProps, VariantProps<typeof but
|
|
|
14
14
|
corners?: CornersEnum.SMALL | CornersEnum.MEDIUM;
|
|
15
15
|
className?: string;
|
|
16
16
|
disabled?: boolean;
|
|
17
|
-
accessibilityLabel
|
|
17
|
+
accessibilityLabel?: string;
|
|
18
|
+
numberOfLines?: number;
|
|
18
19
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SizeEnum } from "../../../enums";
|
|
2
2
|
export declare const sealVariants: (props?: ({
|
|
3
3
|
size?: SizeEnum.SMALL | SizeEnum.MEDIUM | null | undefined;
|
|
4
|
-
variant?: "
|
|
4
|
+
variant?: "success" | "error" | "add" | "alert" | "left" | "right" | "minus" | null | undefined;
|
|
5
5
|
inverted?: boolean | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -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
|
}
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import { SizeEnum } from "../../../../enums";
|
|
2
|
-
export declare enum IconVariants {
|
|
3
|
-
SUCCESS = "success",
|
|
4
|
-
ERROR = "error",
|
|
5
|
-
WARNING = "warning",
|
|
6
|
-
ADD = "add",
|
|
7
|
-
CUSTOM = "custom"
|
|
8
|
-
}
|
|
1
|
+
import { StateVariantEnum, SizeEnum } from "../../../../enums";
|
|
9
2
|
export type IconSize = SizeEnum.SMALL | SizeEnum.MEDIUM | SizeEnum.LARGE;
|
|
10
3
|
export interface IconProps {
|
|
11
|
-
variants:
|
|
4
|
+
variants: StateVariantEnum;
|
|
12
5
|
size?: IconSize;
|
|
13
6
|
customIcon?: React.ReactNode;
|
|
14
7
|
}
|
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.9",
|
|
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.9",
|
|
82
|
+
"@kivid/tailwind-preset": "1.0.0-alpha.9"
|
|
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/
|
|
93
|
-
"@kivid/
|
|
92
|
+
"@kivid/icons": "1.0.0-alpha.9",
|
|
93
|
+
"@kivid/tailwind-preset": "1.0.0-alpha.9"
|
|
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"}
|
|
@@ -124,11 +124,12 @@ export function Button(props: ButtonProps) {
|
|
|
124
124
|
style={{
|
|
125
125
|
opacity: animatedValue,
|
|
126
126
|
}}
|
|
127
|
+
className={buttonStyle}
|
|
127
128
|
>
|
|
128
129
|
<Pressable
|
|
129
130
|
ref={ref}
|
|
130
|
-
className={buttonStyle}
|
|
131
131
|
disabled={disabled}
|
|
132
|
+
className="flex-row"
|
|
132
133
|
onPress={onPress}
|
|
133
134
|
onPressIn={handlePressIn}
|
|
134
135
|
onPressOut={handlePressOut}
|
|
@@ -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
|
},
|
|
@@ -11,9 +11,9 @@ export const ChatBubbleSeal: React.FC<ChatBubbleSealProps> = ({
|
|
|
11
11
|
className,
|
|
12
12
|
...props
|
|
13
13
|
}) => {
|
|
14
|
-
const {
|
|
14
|
+
const { variant, colorState } = useChatBubbleContext();
|
|
15
15
|
|
|
16
|
-
if (!
|
|
16
|
+
if (!variant || variant === "custom") {
|
|
17
17
|
return null;
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -25,7 +25,7 @@ export const ChatBubbleSeal: React.FC<ChatBubbleSealProps> = ({
|
|
|
25
25
|
|
|
26
26
|
return (
|
|
27
27
|
<Seal
|
|
28
|
-
variant={sealVariantMap[
|
|
28
|
+
variant={sealVariantMap[variant]}
|
|
29
29
|
size={SizeEnum.MEDIUM}
|
|
30
30
|
inverted={colorState === "fill"}
|
|
31
31
|
className={merge("ml-[-6px]", className)}
|
|
@@ -13,11 +13,11 @@ export const ChatBubbleText: React.FC<ChatBubbleTextProps> = ({
|
|
|
13
13
|
children,
|
|
14
14
|
...props
|
|
15
15
|
}) => {
|
|
16
|
-
const { colorState,
|
|
16
|
+
const { colorState, variant } = useChatBubbleContext();
|
|
17
17
|
|
|
18
18
|
// Text color based on bubble colorState
|
|
19
19
|
const textColorClass =
|
|
20
|
-
colorState === "fill" &&
|
|
20
|
+
colorState === "fill" && variant !== "custom"
|
|
21
21
|
? "text-chia-200"
|
|
22
22
|
: "text-chia-800";
|
|
23
23
|
|
|
@@ -14,22 +14,26 @@ import { elevationDown100 } from "../../styles/mixins/shadows";
|
|
|
14
14
|
import { merge } from "@kivid/tailwind-preset";
|
|
15
15
|
import { ChatBubbleContext } from "./contexts";
|
|
16
16
|
import type { ChatBubbleContextValue } from "./contexts/ChatBubbleContext/types";
|
|
17
|
-
|
|
17
|
+
import { useMemo } from "react";
|
|
18
18
|
|
|
19
19
|
export function ChatBubble(props: ChatBubbleProps) {
|
|
20
20
|
const {
|
|
21
|
-
|
|
21
|
+
variant = "custom",
|
|
22
22
|
colorState = "outline",
|
|
23
|
-
hasEar =
|
|
23
|
+
hasEar = true,
|
|
24
24
|
className,
|
|
25
25
|
children,
|
|
26
26
|
time: timeFromProps,
|
|
27
|
+
shouldDisplayTime = true,
|
|
27
28
|
messageType = "initial",
|
|
28
29
|
...restOfProps
|
|
29
30
|
} = props;
|
|
30
31
|
|
|
31
|
-
const
|
|
32
|
-
|
|
32
|
+
const time = useMemo(() => {
|
|
33
|
+
if (timeFromProps) return timeFromProps;
|
|
34
|
+
const [hours, minutes] = new Date().toLocaleTimeString().split(":");
|
|
35
|
+
return `${hours}:${minutes}`;
|
|
36
|
+
}, [timeFromProps]);
|
|
33
37
|
|
|
34
38
|
const colorMap = {
|
|
35
39
|
check: "#3DCC78",
|
|
@@ -38,11 +42,10 @@ export function ChatBubble(props: ChatBubbleProps) {
|
|
|
38
42
|
custom: "#FAFCFC",
|
|
39
43
|
};
|
|
40
44
|
|
|
41
|
-
const tailColor =
|
|
42
|
-
colorState === "outline" ? "#FAFCFC" : colorMap[contentType];
|
|
45
|
+
const tailColor = colorState === "outline" ? "#FAFCFC" : colorMap[variant];
|
|
43
46
|
|
|
44
47
|
const contextInitialValue: ChatBubbleContextValue = {
|
|
45
|
-
|
|
48
|
+
variant,
|
|
46
49
|
colorState,
|
|
47
50
|
messageType,
|
|
48
51
|
};
|
|
@@ -68,7 +71,7 @@ export function ChatBubble(props: ChatBubbleProps) {
|
|
|
68
71
|
<ChatBubbleContext.Provider value={contextInitialValue}>
|
|
69
72
|
<View
|
|
70
73
|
accessibilityRole="text"
|
|
71
|
-
accessibilityLabel={accessibilityLabelMap[
|
|
74
|
+
accessibilityLabel={accessibilityLabelMap[variant]}
|
|
72
75
|
accessible={true}
|
|
73
76
|
className={merge("flex", className)}
|
|
74
77
|
{...restOfProps}
|
|
@@ -87,7 +90,7 @@ export function ChatBubble(props: ChatBubbleProps) {
|
|
|
87
90
|
<View
|
|
88
91
|
className={merge(
|
|
89
92
|
chatBubbleBoxVariants({
|
|
90
|
-
|
|
93
|
+
variant,
|
|
91
94
|
colorState,
|
|
92
95
|
hasEar,
|
|
93
96
|
messageType,
|
|
@@ -101,7 +104,7 @@ export function ChatBubble(props: ChatBubbleProps) {
|
|
|
101
104
|
{children}
|
|
102
105
|
</View>
|
|
103
106
|
</View>
|
|
104
|
-
<ChatBubbleTime>{time}</ChatBubbleTime>
|
|
107
|
+
{shouldDisplayTime && <ChatBubbleTime>{time}</ChatBubbleTime>}
|
|
105
108
|
</View>
|
|
106
109
|
</ChatBubbleContext.Provider>
|
|
107
110
|
);
|
|
@@ -5,11 +5,12 @@ export type ChatBubbleColorState = "fill" | "outline";
|
|
|
5
5
|
export type ChatBubbleMessageType = "initial" | "followUp";
|
|
6
6
|
|
|
7
7
|
export interface ChatBubbleProps extends Omit<ViewProps, "children"> {
|
|
8
|
-
|
|
8
|
+
variant?: ChatBubbleType;
|
|
9
9
|
colorState?: ChatBubbleColorState;
|
|
10
10
|
hasEar?: boolean;
|
|
11
11
|
className?: string;
|
|
12
12
|
children?: React.ReactNode;
|
|
13
13
|
time?: string;
|
|
14
|
+
shouldDisplayTime?: boolean;
|
|
14
15
|
messageType?: ChatBubbleMessageType;
|
|
15
16
|
}
|
|
@@ -4,7 +4,7 @@ import { SizeEnum, CornersEnum } from "../../../enums";
|
|
|
4
4
|
|
|
5
5
|
const buttonVariants = cva(
|
|
6
6
|
[
|
|
7
|
-
"flex flex-row items-center justify-between
|
|
7
|
+
"flex flex-row items-center justify-between",
|
|
8
8
|
"font-bold",
|
|
9
9
|
"disabled:cursor-not-allowed",
|
|
10
10
|
"relative overflow-hidden",
|