@kivid/native-components 1.0.0-alpha.6 → 1.0.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/components/Avatar/index.js +5 -4
- package/dist/commonjs/components/Avatar/index.js.map +1 -1
- package/dist/commonjs/components/ChatBubble/assets/class-variants.js +6 -6
- package/dist/commonjs/components/ChatBubble/assets/class-variants.js.map +1 -1
- package/dist/commonjs/components/ChatBubble/components/ChatBubbleSeal/index.js +5 -5
- package/dist/commonjs/components/ChatBubble/components/ChatBubbleSeal/index.js.map +1 -1
- package/dist/commonjs/components/ChatBubble/components/ChatBubbleText/index.js +4 -4
- package/dist/commonjs/components/ChatBubble/components/ChatBubbleText/index.js.map +1 -1
- package/dist/commonjs/components/ChatBubble/{context.js → contexts/ChatBubbleContext/index.js} +1 -1
- package/dist/commonjs/components/ChatBubble/contexts/ChatBubbleContext/index.js.map +1 -0
- package/dist/commonjs/components/ChatBubble/contexts/ChatBubbleContext/types.js +6 -0
- package/dist/commonjs/components/ChatBubble/contexts/ChatBubbleContext/types.js.map +1 -0
- package/dist/commonjs/components/ChatBubble/contexts/index.js +17 -0
- package/dist/commonjs/components/ChatBubble/contexts/index.js.map +1 -0
- package/dist/commonjs/components/ChatBubble/index.js +10 -9
- package/dist/commonjs/components/ChatBubble/index.js.map +1 -1
- package/dist/commonjs/components/IconButton/assets/class-variants.js +82 -0
- package/dist/commonjs/components/IconButton/assets/class-variants.js.map +1 -0
- package/dist/commonjs/components/IconButton/assets/design-system-showcase.js +119 -0
- package/dist/commonjs/components/IconButton/assets/design-system-showcase.js.map +1 -0
- package/dist/commonjs/components/IconButton/enums.js +33 -0
- package/dist/commonjs/components/IconButton/enums.js.map +1 -0
- package/dist/commonjs/components/IconButton/index.js +108 -0
- package/dist/commonjs/components/IconButton/index.js.map +1 -0
- package/dist/commonjs/components/IconButton/types.js +6 -0
- package/dist/commonjs/components/IconButton/types.js.map +1 -0
- package/dist/commonjs/components/ListButton/assets/class-variants.js +2 -10
- package/dist/commonjs/components/ListButton/assets/class-variants.js.map +1 -1
- package/dist/commonjs/components/ListButton/assets/design-system-showcase.js +424 -0
- package/dist/commonjs/components/ListButton/assets/design-system-showcase.js.map +1 -0
- package/dist/commonjs/components/ListButton/enums/index.js +0 -11
- package/dist/commonjs/components/ListButton/enums/index.js.map +1 -1
- package/dist/commonjs/components/ListButton/index.js +41 -36
- package/dist/commonjs/components/ListButton/index.js.map +1 -1
- package/dist/commonjs/components/OtpInput/assets/class-variant.js +1 -1
- package/dist/commonjs/components/OtpInput/assets/class-variant.js.map +1 -1
- package/dist/commonjs/components/OtpInput/components/InformationStatus/index.js +13 -11
- package/dist/commonjs/components/OtpInput/components/InformationStatus/index.js.map +1 -1
- package/dist/commonjs/components/OtpInput/enums/index.js +7 -8
- package/dist/commonjs/components/OtpInput/enums/index.js.map +1 -1
- package/dist/commonjs/components/OtpInput/index.js +66 -101
- package/dist/commonjs/components/OtpInput/index.js.map +1 -1
- package/dist/commonjs/components/PasswordInput/index.js +42 -0
- package/dist/commonjs/components/PasswordInput/index.js.map +1 -0
- package/dist/commonjs/components/PasswordInput/types.js +6 -0
- package/dist/commonjs/components/PasswordInput/types.js.map +1 -0
- package/dist/commonjs/components/TextInput/index.js +14 -3
- package/dist/commonjs/components/TextInput/index.js.map +1 -1
- package/dist/commonjs/components/Tooltip/index.js +44 -5
- package/dist/commonjs/components/Tooltip/index.js.map +1 -1
- package/dist/commonjs/components/index.js +33 -0
- package/dist/commonjs/components/index.js.map +1 -1
- package/dist/commonjs/iconography/Icons/index.js +1 -1
- package/dist/commonjs/iconography/Icons/index.js.map +1 -1
- package/dist/module/components/Avatar/index.js +5 -4
- package/dist/module/components/Avatar/index.js.map +1 -1
- package/dist/module/components/ChatBubble/assets/class-variants.js +6 -6
- package/dist/module/components/ChatBubble/assets/class-variants.js.map +1 -1
- package/dist/module/components/ChatBubble/components/ChatBubbleSeal/index.js +4 -4
- package/dist/module/components/ChatBubble/components/ChatBubbleSeal/index.js.map +1 -1
- package/dist/module/components/ChatBubble/components/ChatBubbleText/index.js +5 -4
- package/dist/module/components/ChatBubble/components/ChatBubbleText/index.js.map +1 -1
- package/dist/module/components/ChatBubble/{context.js → contexts/ChatBubbleContext/index.js} +1 -1
- package/dist/module/components/ChatBubble/contexts/ChatBubbleContext/index.js.map +1 -0
- package/dist/module/components/ChatBubble/contexts/ChatBubbleContext/types.js +4 -0
- package/dist/module/components/ChatBubble/contexts/ChatBubbleContext/types.js.map +1 -0
- package/dist/module/components/ChatBubble/contexts/index.js +4 -0
- package/dist/module/components/ChatBubble/contexts/index.js.map +1 -0
- package/dist/module/components/ChatBubble/index.js +9 -8
- package/dist/module/components/ChatBubble/index.js.map +1 -1
- package/dist/module/components/IconButton/assets/class-variants.js +79 -0
- package/dist/module/components/IconButton/assets/class-variants.js.map +1 -0
- package/dist/module/components/IconButton/assets/design-system-showcase.js +115 -0
- package/dist/module/components/IconButton/assets/design-system-showcase.js.map +1 -0
- package/dist/module/components/IconButton/enums.js +29 -0
- package/dist/module/components/IconButton/enums.js.map +1 -0
- package/dist/module/components/IconButton/index.js +103 -0
- package/dist/module/components/IconButton/index.js.map +1 -0
- package/dist/module/components/IconButton/types.js +4 -0
- package/dist/module/components/IconButton/types.js.map +1 -0
- package/dist/module/components/ListButton/assets/class-variants.js +2 -10
- package/dist/module/components/ListButton/assets/class-variants.js.map +1 -1
- package/dist/module/components/ListButton/assets/design-system-showcase.js +420 -0
- package/dist/module/components/ListButton/assets/design-system-showcase.js.map +1 -0
- package/dist/module/components/ListButton/enums/index.js +0 -1
- package/dist/module/components/ListButton/enums/index.js.map +1 -1
- package/dist/module/components/ListButton/index.js +44 -39
- package/dist/module/components/ListButton/index.js.map +1 -1
- package/dist/module/components/OtpInput/assets/class-variant.js +1 -1
- package/dist/module/components/OtpInput/assets/class-variant.js.map +1 -1
- package/dist/module/components/OtpInput/components/InformationStatus/index.js +15 -13
- package/dist/module/components/OtpInput/components/InformationStatus/index.js.map +1 -1
- package/dist/module/components/OtpInput/enums/index.js +6 -7
- package/dist/module/components/OtpInput/enums/index.js.map +1 -1
- package/dist/module/components/OtpInput/index.js +66 -101
- package/dist/module/components/OtpInput/index.js.map +1 -1
- package/dist/module/components/PasswordInput/index.js +37 -0
- package/dist/module/components/PasswordInput/index.js.map +1 -0
- package/dist/module/components/PasswordInput/types.js +4 -0
- package/dist/module/components/PasswordInput/types.js.map +1 -0
- package/dist/module/components/TextInput/index.js +14 -3
- package/dist/module/components/TextInput/index.js.map +1 -1
- package/dist/module/components/Tooltip/index.js +45 -6
- package/dist/module/components/Tooltip/index.js.map +1 -1
- package/dist/module/components/index.js +3 -0
- package/dist/module/components/index.js.map +1 -1
- package/dist/module/iconography/Icons/index.js +2 -2
- package/dist/module/iconography/Icons/index.js.map +1 -1
- package/dist/typescript/components/Avatar/types.d.ts +1 -0
- package/dist/typescript/components/ChatBubble/assets/class-variants.d.ts +1 -1
- package/dist/typescript/components/ChatBubble/components/ChatBubbleSeal/types.d.ts +1 -1
- package/dist/typescript/components/ChatBubble/components/ChatBubbleText/types.d.ts +1 -1
- package/dist/typescript/components/ChatBubble/contexts/ChatBubbleContext/index.d.ts +3 -0
- package/dist/typescript/components/ChatBubble/contexts/ChatBubbleContext/types.d.ts +6 -0
- package/dist/typescript/components/ChatBubble/contexts/index.d.ts +1 -0
- package/dist/typescript/components/ChatBubble/types.d.ts +2 -2
- package/dist/typescript/components/IconButton/assets/class-variants.d.ts +8 -0
- package/dist/typescript/components/IconButton/assets/design-system-showcase.d.ts +17 -0
- package/dist/typescript/components/IconButton/enums.d.ts +22 -0
- package/dist/typescript/components/IconButton/index.d.ts +2 -0
- package/dist/typescript/components/IconButton/types.d.ts +15 -0
- package/dist/typescript/components/ListButton/assets/class-variants.d.ts +1 -4
- package/dist/typescript/components/ListButton/assets/design-system-showcase.d.ts +14 -0
- package/dist/typescript/components/ListButton/enums/index.d.ts +0 -1
- package/dist/typescript/components/ListButton/types.d.ts +7 -5
- package/dist/typescript/components/OtpInput/components/InformationStatus/types.d.ts +2 -2
- package/dist/typescript/components/OtpInput/enums/index.d.ts +2 -3
- package/dist/typescript/components/OtpInput/index.d.ts +1 -1
- package/dist/typescript/components/OtpInput/types.d.ts +4 -4
- package/dist/typescript/components/PasswordInput/index.d.ts +2 -0
- package/dist/typescript/components/PasswordInput/types.d.ts +3 -0
- package/dist/typescript/components/TextInput/index.d.ts +1 -1
- package/dist/typescript/components/TextInput/types.d.ts +3 -0
- package/dist/typescript/components/Tooltip/components/Content/types.d.ts +1 -0
- package/dist/typescript/components/Tooltip/types.d.ts +2 -1
- package/dist/typescript/components/index.d.ts +6 -0
- package/package.json +5 -5
- package/src/components/Avatar/index.tsx +4 -4
- package/src/components/Avatar/types.ts +1 -0
- package/src/components/ChatBubble/assets/class-variants.ts +6 -6
- package/src/components/ChatBubble/components/ChatBubbleSeal/index.tsx +5 -4
- package/src/components/ChatBubble/components/ChatBubbleSeal/types.ts +1 -1
- package/src/components/ChatBubble/components/ChatBubbleText/index.tsx +4 -3
- package/src/components/ChatBubble/components/ChatBubbleText/types.ts +1 -1
- package/src/components/ChatBubble/{context.tsx → contexts/ChatBubbleContext/index.tsx} +1 -10
- package/src/components/ChatBubble/contexts/ChatBubbleContext/types.ts +11 -0
- package/src/components/ChatBubble/contexts/index.ts +1 -0
- package/src/components/ChatBubble/index.tsx +12 -10
- package/src/components/ChatBubble/types.ts +2 -3
- package/src/components/IconButton/assets/class-variants.ts +126 -0
- package/src/components/IconButton/assets/design-system-showcase.ts +246 -0
- package/src/components/IconButton/enums.ts +26 -0
- package/src/components/IconButton/index.tsx +124 -0
- package/src/components/IconButton/types.ts +22 -0
- package/src/components/ListButton/assets/class-variants.ts +2 -11
- package/src/components/ListButton/assets/design-system-showcase.ts +502 -0
- package/src/components/ListButton/enums/index.ts +0 -1
- package/src/components/ListButton/index.tsx +44 -41
- package/src/components/ListButton/types.ts +7 -5
- package/src/components/OtpInput/assets/class-variant.ts +1 -1
- package/src/components/OtpInput/components/InformationStatus/index.tsx +15 -14
- package/src/components/OtpInput/components/InformationStatus/types.ts +2 -2
- package/src/components/OtpInput/enums/index.ts +1 -2
- package/src/components/OtpInput/index.tsx +77 -136
- package/src/components/OtpInput/types.ts +4 -4
- package/src/components/PasswordInput/index.tsx +37 -0
- package/src/components/PasswordInput/types.ts +4 -0
- package/src/components/TextInput/index.tsx +17 -3
- package/src/components/TextInput/types.ts +3 -0
- package/src/components/Tooltip/components/Content/types.ts +1 -0
- package/src/components/Tooltip/index.tsx +57 -5
- package/src/components/Tooltip/types.ts +2 -1
- package/src/components/index.ts +8 -0
- package/src/iconography/Icons/index.tsx +2 -3
- package/dist/commonjs/components/ChatBubble/context.js.map +0 -1
- package/dist/commonjs/components/ListButton/enums/icon-color.js +0 -18
- package/dist/commonjs/components/ListButton/enums/icon-color.js.map +0 -1
- package/dist/module/components/ChatBubble/context.js.map +0 -1
- package/dist/module/components/ListButton/enums/icon-color.js +0 -14
- package/dist/module/components/ListButton/enums/icon-color.js.map +0 -1
- package/dist/typescript/components/ChatBubble/context.d.ts +0 -8
- package/dist/typescript/components/ListButton/enums/icon-color.d.ts +0 -10
- package/src/components/ListButton/enums/icon-color.ts +0 -10
|
@@ -7,21 +7,21 @@ import { Button } from "../../../Button/index.js";
|
|
|
7
7
|
import { HighlightedText } from "../../../HighlightedText/index.js";
|
|
8
8
|
import LoadingDots from "../../../LoadingDots/index.js";
|
|
9
9
|
import { Chip } from "../../../Chip/index.js";
|
|
10
|
-
import { Text } from "react-native";
|
|
10
|
+
import { Text, View } from "react-native";
|
|
11
11
|
import { ChipVariantEnum } from "../../../Chip/enums/index.js";
|
|
12
12
|
import { SealVariantEnum } from "../../../Seal/enums/index.js";
|
|
13
|
-
import {
|
|
13
|
+
import { OTPInputInformationStatusEnum } from "../../enums/index.js";
|
|
14
14
|
import { SizeEnum, CornersEnum } from "../../../../enums/index.js";
|
|
15
15
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
16
|
export function InformationStatus(props) {
|
|
17
17
|
const {
|
|
18
|
-
status =
|
|
18
|
+
status = OTPInputInformationStatusEnum.DEFAULT,
|
|
19
19
|
disabled = false,
|
|
20
20
|
onPress
|
|
21
21
|
} = props;
|
|
22
22
|
const renderInformation = useMemo(() => {
|
|
23
23
|
const textStyle = merge("", disabled && "opacity-50");
|
|
24
|
-
if (status ===
|
|
24
|
+
if (status === OTPInputInformationStatusEnum.DEFAULT) {
|
|
25
25
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
26
26
|
children: [/*#__PURE__*/_jsx(Button, {
|
|
27
27
|
variant: "outline",
|
|
@@ -38,7 +38,7 @@ export function InformationStatus(props) {
|
|
|
38
38
|
})]
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
-
if (status ===
|
|
41
|
+
if (status === OTPInputInformationStatusEnum.LOADING) {
|
|
42
42
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
43
43
|
children: [/*#__PURE__*/_jsx(LoadingDots, {
|
|
44
44
|
variant: "dark"
|
|
@@ -50,21 +50,23 @@ export function InformationStatus(props) {
|
|
|
50
50
|
})]
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
if (status ===
|
|
54
|
-
return /*#__PURE__*/_jsxs(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
sealVariant: SealVariantEnum.SUCCESS,
|
|
58
|
-
label: "Confirmado"
|
|
59
|
-
}), /*#__PURE__*/_jsx(HighlightedText, {
|
|
53
|
+
if (status === OTPInputInformationStatusEnum.SUCCESS) {
|
|
54
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
55
|
+
className: "flex flex-col mt-600 gap-600 items-center",
|
|
56
|
+
children: [/*#__PURE__*/_jsx(HighlightedText, {
|
|
60
57
|
highlightText: "C\xF3digo validado",
|
|
61
58
|
text: "com sucesso.",
|
|
62
59
|
reverse: true,
|
|
63
60
|
className: textStyle
|
|
61
|
+
}), /*#__PURE__*/_jsx(Chip, {
|
|
62
|
+
variant: ChipVariantEnum.OUTLINE,
|
|
63
|
+
sealVariant: SealVariantEnum.SUCCESS,
|
|
64
|
+
label: "Confirmado",
|
|
65
|
+
className: "max-w-fit"
|
|
64
66
|
})]
|
|
65
67
|
});
|
|
66
68
|
}
|
|
67
|
-
if (status ===
|
|
69
|
+
if (status === OTPInputInformationStatusEnum.ERROR) {
|
|
68
70
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
69
71
|
children: [/*#__PURE__*/_jsx(Button, {
|
|
70
72
|
variant: "outline",
|
|
@@ -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,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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,MAA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I,CAACwB,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG;UAAEQ,KAAK,EAAE;QAAU,CAAC;MAC7C,CAAE;MAAAZ,QAAA,EAEDpB,IAAI,CAACwB,KAAK,CAAC,IAAI;IAAG,GAPdA,KAQD,CAAC;EAEX;EAEA,oBACEtC,KAAA,CAACV,IAAI;IAACqD,SAAS,EAAC,6DAA6D;IAAAT,QAAA,gBAC3EpC,IAAA,CAACR,IAAI;MAACqD,SAAS,EAAC,wCAAwC;MAAAT,QAAA,EACrDjB,eAAe,CAAC8B,GAAG,CAACX,WAAW;IAAC,CAC7B,CAAC,eACPtC,IAAA,CAACV,SAAS;MACRuD,SAAS,EAAC,yCAAyC;MACnDK,KAAK,EAAElC,IAAK;MACZmC,YAAY,EAAEtB,gBAAiB;MAC/BuB,SAAS,EAAE7C,MAAO;MAClB8C,QAAQ,EAAE,CAAC3C,QAAS;MACpB4C,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":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import TextInput from "../TextInput/index.js";
|
|
5
|
+
import { IconButton } from "../IconButton/index.js";
|
|
6
|
+
import { Eye, EyeOff } from "@kivid/icons/native";
|
|
7
|
+
import { IconButtonVariantEnum } from "../IconButton/enums.js";
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
export function PasswordInput(props) {
|
|
10
|
+
const [shouldHidePassword, setShouldHidePassword] = useState(true);
|
|
11
|
+
function toogleHidePassword() {
|
|
12
|
+
setShouldHidePassword(!shouldHidePassword);
|
|
13
|
+
}
|
|
14
|
+
function renderIcon() {
|
|
15
|
+
if (shouldHidePassword) {
|
|
16
|
+
return /*#__PURE__*/_jsx(Eye, {
|
|
17
|
+
size: 24,
|
|
18
|
+
className: "text-chia-900"
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return /*#__PURE__*/_jsx(EyeOff, {
|
|
22
|
+
size: 24,
|
|
23
|
+
className: "text-chia-900"
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
return /*#__PURE__*/_jsx(TextInput, {
|
|
27
|
+
...props,
|
|
28
|
+
secureTextEntry: shouldHidePassword,
|
|
29
|
+
rightIcon: /*#__PURE__*/_jsx(IconButton, {
|
|
30
|
+
onPress: toogleHidePassword,
|
|
31
|
+
accessibilityLabel: "Toggle Password Visibility",
|
|
32
|
+
variant: IconButtonVariantEnum.GHOST,
|
|
33
|
+
icon: renderIcon()
|
|
34
|
+
})
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useState","TextInput","IconButton","Eye","EyeOff","IconButtonVariantEnum","jsx","_jsx","PasswordInput","props","shouldHidePassword","setShouldHidePassword","toogleHidePassword","renderIcon","size","className","secureTextEntry","rightIcon","onPress","accessibilityLabel","variant","GHOST","icon"],"sourceRoot":"../../../../src","sources":["components/PasswordInput/index.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,OAAO;AAChC,OAAOC,SAAS,MAAM,uBAAc;AACpC,SAASC,UAAU,QAAQ,wBAAe;AAE1C,SAASC,GAAG,EAAEC,MAAM,QAAQ,qBAAqB;AACjD,SAASC,qBAAqB,QAAQ,wBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE5D,OAAO,SAASC,aAAaA,CAACC,KAAyB,EAAE;EACvD,MAAM,CAACC,kBAAkB,EAAEC,qBAAqB,CAAC,GAAGX,QAAQ,CAAC,IAAI,CAAC;EAElE,SAASY,kBAAkBA,CAAA,EAAG;IAC5BD,qBAAqB,CAAC,CAACD,kBAAkB,CAAC;EAC5C;EAEA,SAASG,UAAUA,CAAA,EAAG;IACpB,IAAIH,kBAAkB,EAAE;MACtB,oBAAOH,IAAA,CAACJ,GAAG;QAACW,IAAI,EAAE,EAAG;QAACC,SAAS,EAAC;MAAe,CAAE,CAAC;IACpD;IAEA,oBAAOR,IAAA,CAACH,MAAM;MAACU,IAAI,EAAE,EAAG;MAACC,SAAS,EAAC;IAAe,CAAE,CAAC;EACvD;EAEA,oBACER,IAAA,CAACN,SAAS;IAAA,GACJQ,KAAK;IACTO,eAAe,EAAEN,kBAAmB;IACpCO,SAAS,eACPV,IAAA,CAACL,UAAU;MACTgB,OAAO,EAAEN,kBAAmB;MAC5BO,kBAAkB,EAAC,4BAA4B;MAC/CC,OAAO,EAAEf,qBAAqB,CAACgB,KAAM;MACrCC,IAAI,EAAET,UAAU,CAAC;IAAE,CACpB;EACF,CACF,CAAC;AAEN","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/PasswordInput/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -28,6 +28,9 @@ export function TextInput({
|
|
|
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
|
};
|
|
@@ -59,10 +68,12 @@ export function TextInput({
|
|
|
59
68
|
return labelText;
|
|
60
69
|
};
|
|
61
70
|
return /*#__PURE__*/_jsx(Tooltip, {
|
|
62
|
-
|
|
63
|
-
message:
|
|
71
|
+
isOpenedByVariantError: hasError,
|
|
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","
|
|
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,gBAAgB,GAAG,EAAE;EACrBC,uBAAuB;EACvBC,yBAAyB;EACz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ACb,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,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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,YAAY,CAAC2B,KAAK,EAAE;UACzB,GAAGC,UAAU;UACbO,OAAO,EAAEA,CAAC,GAAGC,IAAW,KAAK;YAC3B,IAAI,OAAOR,UAAU,CAACO,OAAO,KAAK,UAAU,EAAE;cAC5CP,UAAU,CAACO,OAAO,CAAC,GAAGC,IAAI,CAAC;cAC3BZ,sBAAsB,CAAC,CAAC;YAC1B;UACF;QACF,CAAC,CAAC;MACJ;IACF;IAEA,oBACErB,IAAA,CAACT,SAAS;MAACyC,OAAO,EAAEX,sBAAuB;MAAAhB,QAAA,EACxCA;IAAQ,CACA,CAAC;EAEhB,CAAC;EAED,oBACEH,KAAA,CAACZ,IAAI;IAACmB,SAAS,EAAC,UAAU;IAACyB,QAAQ,EAAEnB,eAAgB;IAAAV,QAAA,GAClDkB,oBAAoB,CAAC,CAAC,eAEvBvB,IAAA,CAACR,OAAO;MACNc,OAAO,EAAEA,OAAQ;MACjBC,OAAO,EAAEA,OAAQ;MACjBU,SAAS,EAAEV,OAAO,KAAKb,kBAAkB,CAACc,OAAO,GAAGS,SAAS,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,7 @@ 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";
|
|
37
|
+
export * from "./PasswordInput/index.js";
|
|
35
38
|
//# 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;AAElC,cAAc,0BAAiB","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...",
|