@kivid/native-components 1.0.0-alpha.6 → 1.0.0-alpha.7
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/ChatBubble/components/ChatBubbleSeal/index.js +2 -2
- 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/{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 +2 -2
- 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 +24 -28
- 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/TextInput/index.js +1 -1
- 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 +22 -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/ChatBubble/components/ChatBubbleSeal/index.js +1 -1
- package/dist/module/components/ChatBubble/components/ChatBubbleSeal/index.js.map +1 -1
- package/dist/module/components/ChatBubble/components/ChatBubbleText/index.js +3 -2
- 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 +1 -1
- 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 +27 -31
- 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/TextInput/index.js +1 -1
- 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 +2 -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/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 +0 -1
- 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 +5 -4
- 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/Tooltip/components/Content/types.d.ts +1 -0
- package/dist/typescript/components/Tooltip/types.d.ts +3 -1
- package/dist/typescript/components/index.d.ts +4 -0
- package/package.json +5 -5
- package/src/components/ChatBubble/components/ChatBubbleSeal/index.tsx +2 -1
- package/src/components/ChatBubble/components/ChatBubbleSeal/types.ts +1 -1
- package/src/components/ChatBubble/components/ChatBubbleText/index.tsx +2 -1
- 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 +5 -2
- package/src/components/ChatBubble/types.ts +0 -2
- 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 +28 -26
- package/src/components/ListButton/types.ts +5 -4
- 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/TextInput/index.tsx +1 -1
- package/src/components/Tooltip/components/Content/types.ts +1 -0
- package/src/components/Tooltip/index.tsx +57 -5
- package/src/components/Tooltip/types.ts +3 -1
- package/src/components/index.ts +5 -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":["useMemo","merge","Button","HighlightedText","LoadingDots","Chip","Text","ChipVariantEnum","SealVariantEnum","
|
|
1
|
+
{"version":3,"names":["useMemo","merge","Button","HighlightedText","LoadingDots","Chip","Text","View","ChipVariantEnum","SealVariantEnum","OTPInputInformationStatusEnum","SizeEnum","CornersEnum","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","InformationStatus","props","status","DEFAULT","disabled","onPress","renderInformation","textStyle","children","variant","corners","MEDIUM","size","SMALL","highlightText","text","reverse","className","LOADING","SUCCESS","OUTLINE","sealVariant","label","ERROR"],"sourceRoot":"../../../../../../src","sources":["components/OtpInput/components/InformationStatus/index.tsx"],"mappings":";AAAA,YAAY;;AAEZ,SAASA,OAAO,QAAQ,OAAO;AAG/B,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,MAAM,QAAQ,0BAAiB;AACxC,SAASC,eAAe,QAAQ,mCAA0B;AAC1D,OAAOC,WAAW,MAAM,+BAAsB;AAC9C,SAASC,IAAI,QAAQ,wBAAe;AACpC,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,SAASC,eAAe,QAAQ,8BAAqB;AACrD,SAASC,eAAe,QAAQ,8BAAqB;AACrD,SAASC,6BAA6B,QAAQ,sBAAa;AAC3D,SAASC,QAAQ,EAAEC,WAAW,QAAQ,4BAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAE1D,OAAO,SAASC,iBAAiBA,CAACC,KAA6B,EAAE;EAC/D,MAAM;IACJC,MAAM,GAAGX,6BAA6B,CAACY,OAAO;IAC9CC,QAAQ,GAAG,KAAK;IAChBC;EACF,CAAC,GAAGJ,KAAK;EAET,MAAMK,iBAAiB,GAAGzB,OAAO,CAAC,MAAM;IACtC,MAAM0B,SAAS,GAAGzB,KAAK,CAAC,EAAE,EAAEsB,QAAQ,IAAI,YAAY,CAAC;IAErD,IAAIF,MAAM,KAAKX,6BAA6B,CAACY,OAAO,EAAE;MACpD,oBACEJ,KAAA,CAAAF,SAAA;QAAAW,QAAA,gBACEb,IAAA,CAACZ,MAAM;UACL0B,OAAO,EAAC,SAAS;UACjBC,OAAO,EAAEjB,WAAW,CA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BC,OAAO,EAAEjB,WAAW,CAACkB,MAAO;UAC5BP,QAAQ,EAAEA,QAAS;UACnBC,OAAO,EAAEA,OAAQ;UACjBO,IAAI,EAAEpB,QAAQ,CAACqB,KAAM;UAAAL,QAAA,EACtB;QAED,CAAQ,CAAC,eAETb,IAAA,CAACR,IAAI;UAAC8B,SAAS,EAAEb,QAAQ,GAAG,YAAY,GAAG,EAAG;UAAAI,QAAA,EAAC;QAE/C,CAAM,CAAC;MAAA,CACP,CAAC;IAEP;EACF,CAAC,EAAE,CAACJ,QAAQ,EAAEC,OAAO,EAAEH,MAAM,CAAC,CAAC;EAE/B,oBAAOP,IAAA,CAAAE,SAAA;IAAAW,QAAA,EAAGF;EAAiB,CAAG,CAAC;AACjC;AAEA,eAAeN,iBAAiB","ignoreList":[]}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
export let
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return InformationStatusEnum;
|
|
3
|
+
export let OTPInputInformationStatusEnum = /*#__PURE__*/function (OTPInputInformationStatusEnum) {
|
|
4
|
+
OTPInputInformationStatusEnum["DEFAULT"] = "default";
|
|
5
|
+
OTPInputInformationStatusEnum["ERROR"] = "error";
|
|
6
|
+
OTPInputInformationStatusEnum["SUCCESS"] = "success";
|
|
7
|
+
OTPInputInformationStatusEnum["LOADING"] = "loading";
|
|
8
|
+
return OTPInputInformationStatusEnum;
|
|
10
9
|
}({});
|
|
11
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["OTPInputInformationStatusEnum"],"sourceRoot":"../../../../../src","sources":["components/OtpInput/enums/index.ts"],"mappings":";;AAAA,WAAYA,6BAA6B,0BAA7BA,6BAA6B;EAA7BA,6BAA6B;EAA7BA,6BAA6B;EAA7BA,6BAA6B;EAA7BA,6BAA6B;EAAA,OAA7BA,6BAA6B;AAAA","ignoreList":[]}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { useRef, useState } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { OTPInputInformationStatusEnum } from "./enums/index.js";
|
|
5
|
+
import { TextInput, Text, View, Platform } from "react-native";
|
|
5
6
|
import { merge } from "@kivid/tailwind-preset";
|
|
6
|
-
import { InformationStatus } from "./components/index.js";
|
|
7
|
-
import { InformationStatusEnum } from "./enums/index.js";
|
|
8
7
|
import { inputVariants } from "./assets/class-variant.js";
|
|
8
|
+
import { InformationStatus } from "./components/index.js";
|
|
9
9
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
10
|
export function OtpInput(props) {
|
|
11
11
|
const {
|
|
12
|
-
status =
|
|
13
|
-
|
|
12
|
+
status = OTPInputInformationStatusEnum.DEFAULT,
|
|
13
|
+
length = 6,
|
|
14
14
|
customInformation,
|
|
15
15
|
rounded = false,
|
|
16
16
|
disabled = false,
|
|
@@ -18,80 +18,35 @@ export function OtpInput(props) {
|
|
|
18
18
|
onChange,
|
|
19
19
|
onPressRetryToken
|
|
20
20
|
} = props;
|
|
21
|
-
const
|
|
22
|
-
const [
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
const hasError = status === OTPInputInformationStatusEnum.ERROR;
|
|
22
|
+
const [code, setCode] = useState('');
|
|
23
|
+
const textInputRef = useRef(null);
|
|
24
|
+
const codeDigitsArray = new Array(length).fill(0);
|
|
25
|
+
const inputStyle = merge(inputVariants({
|
|
26
|
+
rounded,
|
|
27
|
+
hasError,
|
|
28
|
+
disabled
|
|
29
|
+
}), inputClassName);
|
|
30
|
+
const [inputContainerIsFocused, setInputContainerIsFocused] = useState(false);
|
|
31
|
+
function handleOnPress() {
|
|
32
|
+
setInputContainerIsFocused(true);
|
|
33
|
+
textInputRef.current?.focus();
|
|
30
34
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
newValues[targetIndex] = char;
|
|
40
|
-
targetIndex++;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
setInputValues(newValues);
|
|
44
|
-
onChange?.(newValues.join(""));
|
|
45
|
-
const nextEmptyIndex = newValues.findIndex(value => !value);
|
|
46
|
-
if (nextEmptyIndex !== -1) {
|
|
47
|
-
inputsRef.current[nextEmptyIndex]?.focus();
|
|
48
|
-
} else {
|
|
49
|
-
inputsRef.current[OTPInputsQuantity - 1]?.focus();
|
|
50
|
-
}
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
newValues[index] = text;
|
|
54
|
-
setInputValues(newValues);
|
|
55
|
-
onChange?.(newValues.join(""));
|
|
56
|
-
if (text && index < OTPInputsQuantity - 1) {
|
|
57
|
-
const nextEmptyIndex = newValues.findIndex((v, i) => i > index && !v);
|
|
58
|
-
if (nextEmptyIndex !== -1) {
|
|
59
|
-
inputsRef.current[nextEmptyIndex]?.focus();
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
const handleKeyDown = (e, index) => {
|
|
64
|
-
if (e.nativeEvent.key === "Backspace") {
|
|
65
|
-
const hasValueAhead = inputValues.slice(index + 1).some(value => value);
|
|
66
|
-
if (hasValueAhead) {
|
|
67
|
-
const lastFilledIndex = [...inputValues].map((value, i) => value ? i : -1).filter(i => i !== -1).pop();
|
|
68
|
-
if (lastFilledIndex !== undefined) {
|
|
69
|
-
inputsRef.current[lastFilledIndex]?.focus();
|
|
70
|
-
}
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
if (inputValues[index]) {
|
|
74
|
-
const newValues = [...inputValues];
|
|
75
|
-
newValues[index] = "";
|
|
76
|
-
setInputValues(newValues);
|
|
77
|
-
}
|
|
78
|
-
if (index > 0) {
|
|
79
|
-
inputsRef.current[index - 1]?.focus();
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
const handleFocus = (event, index) => {
|
|
84
|
-
const firstEmptyIndex = inputValues.findIndex(value => !value);
|
|
85
|
-
if (firstEmptyIndex !== -1 && index > firstEmptyIndex) {
|
|
86
|
-
inputsRef.current[firstEmptyIndex]?.focus();
|
|
87
|
-
event.preventDefault();
|
|
88
|
-
return;
|
|
35
|
+
function handleOnBlur() {
|
|
36
|
+
setInputContainerIsFocused(false);
|
|
37
|
+
}
|
|
38
|
+
function handleChangeText(text) {
|
|
39
|
+
const textInputQuantity = text.replace(/\s+/g, '').slice(0, length);
|
|
40
|
+
setCode(textInputQuantity);
|
|
41
|
+
if (textInputQuantity.length === length) {
|
|
42
|
+
onChange?.(textInputQuantity);
|
|
89
43
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
44
|
+
}
|
|
45
|
+
function handleInformationStatusOnPress() {
|
|
46
|
+
if (code.length === length) {
|
|
47
|
+
onPressRetryToken?.(code);
|
|
93
48
|
}
|
|
94
|
-
}
|
|
49
|
+
}
|
|
95
50
|
function renderInformationStatus() {
|
|
96
51
|
if (customInformation) {
|
|
97
52
|
return /*#__PURE__*/_jsx(_Fragment, {
|
|
@@ -100,35 +55,45 @@ export function OtpInput(props) {
|
|
|
100
55
|
}
|
|
101
56
|
return /*#__PURE__*/_jsx(InformationStatus, {
|
|
102
57
|
status: status,
|
|
103
|
-
onPress:
|
|
58
|
+
onPress: handleInformationStatusOnPress
|
|
104
59
|
});
|
|
105
60
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
61
|
+
function renderDigit(_value, index) {
|
|
62
|
+
const isCurrentDigit = index === code.length;
|
|
63
|
+
const isLastDigit = index === length - 1;
|
|
64
|
+
const isCodeFull = code.length === length;
|
|
65
|
+
const isDigitFocused = isCurrentDigit && inputContainerIsFocused || isLastDigit && isCodeFull && inputContainerIsFocused;
|
|
66
|
+
return /*#__PURE__*/_jsx(Text, {
|
|
67
|
+
className: inputStyle,
|
|
68
|
+
style: {
|
|
69
|
+
...(isDigitFocused ? {
|
|
70
|
+
borderColor: '#98A3A3'
|
|
71
|
+
} : {}),
|
|
72
|
+
...(code[index] ? {} : {
|
|
73
|
+
color: '#98A3A3'
|
|
74
|
+
})
|
|
75
|
+
},
|
|
76
|
+
children: code[index] ?? "•"
|
|
77
|
+
}, index);
|
|
78
|
+
}
|
|
111
79
|
return /*#__PURE__*/_jsxs(View, {
|
|
112
|
-
className: "flex
|
|
80
|
+
className: "flex-col gap-300 max-w-[280px] items-center justify-between",
|
|
113
81
|
children: [/*#__PURE__*/_jsx(View, {
|
|
114
|
-
className: "flex-row
|
|
115
|
-
children:
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
onKeyPress: e => handleKeyDown(e, i),
|
|
130
|
-
onFocus: e => handleFocus(e, i)
|
|
131
|
-
}, `otp-input-${i}`))
|
|
82
|
+
className: "w-full flex-row justify-around gap-400",
|
|
83
|
+
children: codeDigitsArray.map(renderDigit)
|
|
84
|
+
}), /*#__PURE__*/_jsx(TextInput, {
|
|
85
|
+
className: "w-full h-1000 absolute text-transparent",
|
|
86
|
+
value: code,
|
|
87
|
+
onChangeText: handleChangeText,
|
|
88
|
+
maxLength: length,
|
|
89
|
+
editable: !disabled,
|
|
90
|
+
returnKeyType: "done",
|
|
91
|
+
textContentType: "oneTimeCode",
|
|
92
|
+
ref: textInputRef,
|
|
93
|
+
onBlur: handleOnBlur,
|
|
94
|
+
onPress: handleOnPress,
|
|
95
|
+
caretHidden: true,
|
|
96
|
+
autoComplete: Platform.OS === "android" ? "sms-otp" : "one-time-code"
|
|
132
97
|
}), renderInformationStatus()]
|
|
133
98
|
});
|
|
134
99
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useRef","useState","
|
|
1
|
+
{"version":3,"names":["useRef","useState","OTPInputInformationStatusEnum","TextInput","Text","View","Platform","merge","inputVariants","InformationStatus","Fragment","_Fragment","jsx","_jsx","jsxs","_jsxs","OtpInput","props","status","DEFAULT","length","customInformation","rounded","disabled","inputClassName","onChange","onPressRetryToken","hasError","ERROR","code","setCode","textInputRef","codeDigitsArray","Array","fill","inputStyle","inputContainerIsFocused","setInputContainerIsFocused","handleOnPress","current","focus","handleOnBlur","handleChangeText","text","textInputQuantity","replace","slice","handleInformationStatusOnPress","renderInformationStatus","children","onPress","renderDigit","_value","index","isCurrentDigit","isLastDigit","isCodeFull","isDigitFocused","className","style","borderColor","color","map","value","onChangeText","maxLength","editable","returnKeyType","textContentType","ref","onBlur","caretHidden","autoComplete","OS"],"sourceRoot":"../../../../src","sources":["components/OtpInput/index.tsx"],"mappings":";;AAAA,SAASA,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACxC,SAASC,6BAA6B,QAAQ,kBAAS;AAEvD,SAASC,SAAS,EAAEC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,cAAc;AAC9D,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,aAAa,QAAQ,2BAAwB;AACtD,SAASC,iBAAiB,QAAQ,uBAAc;AAAC,SAAAC,QAAA,IAAAC,SAAA,EAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEjD,OAAO,SAASC,QAAQA,CAACC,KAAoB,EAAE;EAC7C,MAAM;IACJC,MAAM,GAAGhB,6BAA6B,CAACiB,OAAO;IAC9CC,MAAM,GAAG,CAAC;IACVC,iBAAiB;IACjBC,OAAO,GAAG,KAAK;IACfC,QAAQ,GAAG,KAAK;IAChBC,cAAc;IACdC,QAAQ;IACRC;EAEF,CAAC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aAAa,EAAC,MAAM;MACpBC,eAAe,EAAC,aAAa;MAC7BC,GAAG,EAAEtC,YAAa;MAClBuC,MAAM,EAAE7B,YAAa;MACrBS,OAAO,EAAEZ,aAAc;MACvBiC,WAAW,EAAE,IAAK;MAClBC,YAAY,EACVlE,QAAQ,CAACmE,EAAE,KAAK,SAAS,GAAG,SAAS,GAAG;IACzC,CACF,CAAC,EACDzB,uBAAuB,CAAC,CAAC;EAAA,CACtB,CAAC;AAGX;AAEA,eAAehC,QAAQ","ignoreList":[]}
|
|
@@ -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","
|
|
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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3B,KAAA,CAAClB,IAAI;QACH2B,SAAS,EAAEvB,KAAK,CAACK,wBAAwB,CAAC;UAAE6C,SAAS,EAAEjB;QAAS,CAAC,CAAC,CAAE;QAAAQ,QAAA,GAEnExB,KAAK,iBACJH,KAAA,CAACP,UAAU;UACTmC,OAAO,EAAC,aAAa;UACrBY,MAAM,EAAC,KAAK;UACZ/B,SAAS,EAAEE,cAAe;UAAAgB,QAAA,GAEzBxB,KAAK,EAAC,GACT;QAAA,CAAY,CACb,eAEDL,IAAA,CAACd,WAAW;UACVoB,KAAK,EAAEA,KAAM;UACbC,YAAY,EAAEyB,gBAAiB;UAC/BW,QAAQ,EAAE,CAACnC,QAAS;UACpBM,WAAW,EAAEA,WAAY;UACzBH,SAAS,EAAEvB,KAAK,CACdM,sBAAsB,CAAC;YACrBc,QAAQ;YACRE,OAAO;YACPD,KAAK,EAAEa,QAAQ;YACfgB,SAAS,EAAEjB;UACb,CAAC,CAAC,EACFT,cACF,CAAE;UACFG,kBAAkB,EAAEmB,qBAAqB,CAAC,CAAE;UAC5CU,kBAAkB,EAAE;YAClBpC;UACF,CAAE;UAAA,GACEW,IAAI;UACRF,GAAG,EAAG4B,QAAQ,IAAK;YACjBzB,QAAQ,CAACoB,OAAO,GAAGK,QAAQ;YAE3B,IAAI5B,GAAG,EAAE;cACPA,GAAG,CAACuB,OAAO,GAAGK,QAAQ;YACxB;UACF;QAAE,CACH,CAAC;MAAA,CACE,CAAC,EACNrB,UAAU,CAAC,CAAC;IAAA,CACJ;EAAC,CACL,CAAC;AAEd;AAEAvC,SAAS,CAAC6D,WAAW,GAAG,WAAW;AAEnC,eAAe7D,SAAS","ignoreList":[]}
|
|
@@ -1,38 +1,77 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { View } from "react-native";
|
|
3
|
+
import { View, Pressable } from "react-native";
|
|
4
4
|
import { Content } from "./components/index.js";
|
|
5
5
|
import { useTooltipPosition } from "./hooks/index.js";
|
|
6
6
|
import { TooltipVariantEnum } from "./enum/index.js";
|
|
7
|
+
import { useState, useCallback, cloneElement, isValidElement } from "react";
|
|
7
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
9
|
export function Tooltip(props) {
|
|
9
10
|
const {
|
|
10
11
|
children,
|
|
11
12
|
message,
|
|
12
13
|
variant = TooltipVariantEnum.TRIGGER,
|
|
13
|
-
isVisible,
|
|
14
14
|
className,
|
|
15
15
|
containerClassName,
|
|
16
|
-
pointerClassName
|
|
16
|
+
pointerClassName,
|
|
17
|
+
isOpenedByVariantError,
|
|
18
|
+
onChangeVisibility
|
|
17
19
|
} = props;
|
|
18
20
|
const {
|
|
19
21
|
positionData,
|
|
20
22
|
onTriggerLayout,
|
|
21
23
|
onTooltipLayout
|
|
22
24
|
} = useTooltipPosition();
|
|
25
|
+
const [isVisible, setIsVisible] = useState(false);
|
|
26
|
+
const handleVisibilityChange = useCallback(visible => {
|
|
27
|
+
setIsVisible(visible);
|
|
28
|
+
onChangeVisibility?.(visible);
|
|
29
|
+
}, [onChangeVisibility]);
|
|
30
|
+
const handleToggleVisibility = useCallback(() => {
|
|
31
|
+
const newVisibility = !isVisible;
|
|
32
|
+
handleVisibilityChange(newVisibility);
|
|
33
|
+
}, [isVisible, handleVisibilityChange]);
|
|
34
|
+
const renderTriggerContent = () => {
|
|
35
|
+
if (variant !== TooltipVariantEnum.TRIGGER) {
|
|
36
|
+
return children;
|
|
37
|
+
}
|
|
38
|
+
if (/*#__PURE__*/isValidElement(children)) {
|
|
39
|
+
const child = children;
|
|
40
|
+
const childProps = child.props;
|
|
41
|
+
const componentType = child.type;
|
|
42
|
+
const componentName = (typeof componentType === 'function' ? componentType.displayName || componentType.name : componentType) || '';
|
|
43
|
+
const isButton = componentName === 'Button' || componentName === 'Pressable' || componentName === 'TouchableOpacity';
|
|
44
|
+
if (isButton || childProps && typeof childProps.onPress === 'function') {
|
|
45
|
+
return /*#__PURE__*/cloneElement(child, {
|
|
46
|
+
...childProps,
|
|
47
|
+
onPress: (...args) => {
|
|
48
|
+
if (typeof childProps.onPress === 'function') {
|
|
49
|
+
childProps.onPress(...args);
|
|
50
|
+
handleToggleVisibility();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return /*#__PURE__*/_jsx(Pressable, {
|
|
57
|
+
onPress: handleToggleVisibility,
|
|
58
|
+
children: children
|
|
59
|
+
});
|
|
60
|
+
};
|
|
23
61
|
return /*#__PURE__*/_jsxs(View, {
|
|
24
62
|
className: "relative",
|
|
25
63
|
onLayout: onTriggerLayout,
|
|
26
|
-
children: [
|
|
64
|
+
children: [renderTriggerContent(), /*#__PURE__*/_jsx(Content, {
|
|
27
65
|
message: message,
|
|
28
66
|
variant: variant,
|
|
29
|
-
isVisible: isVisible,
|
|
67
|
+
isVisible: variant === TooltipVariantEnum.TRIGGER ? isVisible : !!isOpenedByVariantError,
|
|
30
68
|
onLayout: onTooltipLayout,
|
|
31
69
|
translateX: positionData.adjustedPosition.translateX,
|
|
32
70
|
pointerOffset: positionData.pointerOffset,
|
|
33
71
|
className: className,
|
|
34
72
|
containerClassName: containerClassName,
|
|
35
|
-
pointerClassName: pointerClassName
|
|
73
|
+
pointerClassName: pointerClassName,
|
|
74
|
+
onChangeVisibility: handleVisibilityChange
|
|
36
75
|
})]
|
|
37
76
|
});
|
|
38
77
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["View","Content","useTooltipPosition","TooltipVariantEnum","jsx","_jsx","jsxs","_jsxs","Tooltip","props","children","message","variant","TRIGGER","
|
|
1
|
+
{"version":3,"names":["View","Pressable","Content","useTooltipPosition","TooltipVariantEnum","useState","useCallback","cloneElement","isValidElement","jsx","_jsx","jsxs","_jsxs","Tooltip","props","children","message","variant","TRIGGER","className","containerClassName","pointerClassName","isOpenedByVariantError","onChangeVisibility","positionData","onTriggerLayout","onTooltipLayout","isVisible","setIsVisible","handleVisibilityChange","visible","handleToggleVisibility","newVisibility","renderTriggerContent","child","childProps","componentType","type","componentName","displayName","name","isButton","onPress","args","onLayout","translateX","adjustedPosition","pointerOffset"],"sourceRoot":"../../../../src","sources":["components/Tooltip/index.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,SAAS,QAAQ,cAAc;AAC9C,SAASC,OAAO,QAAQ,uBAAc;AACtC,SAASC,kBAAkB,QAAQ,kBAAS;AAG5C,SAASC,kBAAkB,QAAQ,iBAAQ;AAC3C,SAASC,QAAQ,EAAEC,WAAW,EAAEC,YAAY,EAAEC,cAAc,QAAsB,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE1F,OAAO,SAASC,OAAOA,CAACC,KAAmB,EAAE;EAC3C,MAAM;IACJC,QAAQ;IACRC,OAAO;IACPC,OAAO,GAAGb,kBAAkB,CAACc,OAAO;IACpCC,SAAS;IACTC,kBAAkB;IAClBC,gBAAgB;IAChBC,sBAAsB;IACtBC;EACF,CAAC,GAAGT,KAAK;EACT,MAAM;IAAEU,YAAY;IAAEC,eAAe;IAAEC;EAAgB,CAAC,GACtDvB,kBAAkB,CAAC,CAAC;EAEtB,MAAM,CAACwB,SAAS,EAAEC,YAAY,CAAC,GAAGvB,QAAQ,CAAC,KAAK,CAAC;EAEjD,MAAMwB,sBAAsB,GAAGvB,WAAW,CAAEwB,OAAgB,IAAK;IAC/DF,YAAY,CAACE,OAAO,CAAC;IACrBP,kBAAkB,GAAGO,OAAO,CAAC;EAC/B,CAAC,EAAE,CAACP,kBAAkB,CAAC,CAAC;EAExB,MAAMQ,sBAAsB,GAAGzB,WAAW,CAAC,MAAM;IAC/C,MAAM0B,aAAa,GAAG,CAACL,SAAS;IAChCE,sBAAsB,CAACG,aAAa,CAAC;EACvC,CAAC,EAAE,CAACL,SAAS,EAAEE,sBAAsB,CAAC,CAAC;EAEvC,MAAMI,oBAAoB,GAAGA,CAAA,KAAM;IACjC,IAAIhB,OA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AS,GAAG,CAAC,CAACL,sBAAuB;MACzFsB,QAAQ,EAAElB,eAAgB;MAC1BmB,UAAU,EAAErB,YAAY,CAACsB,gBAAgB,CAACD,UAAW;MACrDE,aAAa,EAAEvB,YAAY,CAACuB,aAAc;MAC1C5B,SAAS,EAAEA,SAAU;MACrBC,kBAAkB,EAAEA,kBAAmB;MACvCC,gBAAgB,EAAEA,gBAAiB;MACnCE,kBAAkB,EAAEM;IAAuB,CAC5C,CAAC;EAAA,CACE,CAAC;AAEX","ignoreList":[]}
|
|
@@ -32,4 +32,6 @@ export * from "./SelectButton/index.js";
|
|
|
32
32
|
export * from "./SelectButton/enums/index.js";
|
|
33
33
|
export * from "./RadioInput/index.js";
|
|
34
34
|
export * from "./RadioInput/enums/index.js";
|
|
35
|
+
export * from "./IconButton/index.js";
|
|
36
|
+
export * from "./IconButton/enums.js";
|
|
35
37
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;AAAA,cAAc,mBAAU;AACxB,cAAc,mBAAU;AAGxB,cAAc,uBAAc;
|
|
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,cAAc,0BAAiB;AAE/B,cAAc,gCAAuB;AAErC,cAAc,qBAAY;AAE1B,cAAc,2BAAkB;AAEhC,cAAc,4BAAmB;AAGjC,cAAc,wBAAe;AAC7B,cAAc,wBAAqB;AAEnC,cAAc,iBAAQ;AAEtB,cAAc,uBAAc;AAE5B,cAAc,kBAAS;AAGvB,cAAc,mBAAU;AAExB,cAAc,yBAAgB;AAE9B,cAAc,uBAAc;AAG5B,cAAc,kBAAS;AAEvB,cAAc,wBAAe;AAE7B,cAAc,oBAAW;AAGzB,cAAc,uBAAc;AAE5B,cAAc,6BAAoB;AAElC,cAAc,sBAAa;AAE3B,cAAc,sBAAmB;AAEjC,cAAc,yBAAgB;AAE9B,cAAc,+BAAsB;AAEpC,cAAc,uBAAc;AAE5B,cAAc,6BAAoB;AAElC,cAAc,uBAAc;AAE5B,cAAc,uBAAoB","ignoreList":[]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import * as IconsNative from "@kivid/icons/native";
|
|
4
4
|
import React, { useMemo, useState } from "react";
|
|
5
|
-
import { Alert, FlatList, Pressable,
|
|
5
|
+
import { Alert, FlatList, Pressable, Text, TextInput, View } from "react-native";
|
|
6
6
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
7
|
export function Icons(props) {
|
|
8
8
|
const {
|
|
@@ -23,7 +23,7 @@ export function Icons(props) {
|
|
|
23
23
|
const component = `<${name} size={${size}} ${isCurrentColor ? "" : `color="${color}"`} />`;
|
|
24
24
|
Alert.alert(`Ícone selecionado: ${component}`);
|
|
25
25
|
}
|
|
26
|
-
return /*#__PURE__*/_jsxs(
|
|
26
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
27
27
|
className: "m-16",
|
|
28
28
|
children: [/*#__PURE__*/_jsx(TextInput, {
|
|
29
29
|
placeholder: "Pesquisar \xEDcones...",
|
|
@@ -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":";;AAAA,OAAO,KAAKA,WAAW,MAAM,qBAAqB;AAClD,OAAOC,KAAK,IAAIC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAEhD,SACEC,KAAK,EACLC,QAAQ,EACRC,SAAS,EACTC,IAAI,EACJC,SAAS,EACTC,IAAI,QACC,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEtB,OAAO,SAASC,KAAKA,CAACC,KAAiB,EAAE;EACvC,MAAM;IAAEC,IAAI,GAAG,EAAE;IAAEC,KAAK,GAAG;EAAe,CAAC,GAAGF,KAAK;EAEnD,MAAMG,KAAK,GAAGC,MAAM,CAACC,OAAO,CAACpB,WAAW,CAAC,CAACqB,GAAG,CAAC,CAAC,CAACC,IAAI,EAAEC,aAAa,CAAC,MAAM;IACxED,IAAI;IACJE,SAAS,EAAED;EACb,CAAC,CAAC,CAAC;EAEH,MAAM,CAACE,UAAU,EAAEC,aAAa,CAAC,GAAGvB,QAAQ,CAAC,EAAE,CAAC;EAEhD,MAAMwB,aAAa,GAAGzB,OAAO,CAAC,MAAM;IAClC,MAAM0B,MAAM,GAAG,CAAC,GAAGV,KAAK,CAAC,CAACW,IAAI,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,CAACR,IAAI,CAACU,aAAa,CAACD,CAAC,CAACT,IAAI,CAAC,CAAC;IACtE,OAAOM,MAAM,CAACK,MAAM,CAAEC,IAAI,IACxBA,IAAI,CAACZ,IAAI,CAACa,WAAW,CAAC,CAAC,CAACC,QAAQ,CAACX,UAAU,CAACU,WAAW,CAAC,CAAC,CAC3D,CAAC;EACH,CAAC,EA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AAzB,QAAA,eAChE5B,KAAA,CAACP,SAAS;UACRsC,KAAK,EAAE;YACLuB,aAAa,EAAE,QAAQ;YACvBF,UAAU,EAAE,QAAQ;YACpBG,OAAO,EAAE;UACX,CAAE;UACFC,OAAO,EAAEA,CAAA,KAAMhC,eAAe,CAACf,IAAI,CAAE;UAAAmB,QAAA,gBAErC9B,IAAA,CAACY,aAAa;YAACP,IAAI,EAAEA,IAAK;YAACC,KAAK,EAAEA;UAAM,CAAE,CAAC,eAC3CN,IAAA,CAACJ,IAAI;YACHqC,KAAK,EAAE;cACL0B,SAAS,EAAE,CAAC;cACZlB,QAAQ,EAAE,EAAE;cACZmB,SAAS,EAAE,QAAQ;cACnBC,QAAQ,EAAE;YACZ,CAAE;YACFC,aAAa,EAAE,CAAE;YAAAhC,QAAA,EAEhBnB;UAAI,CACD,CAAC;QAAA,CACE;MAAC,CACR;IACN,CACH,CAAC;EAAA,CACE,CAAC;AAEX","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ChatBubbleContext";
|
|
@@ -1,5 +1,4 @@
|
|
|
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";
|
|
@@ -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 {};
|