decord/source/design/components/Input/native/Input.native.tsx

97 lines
3.8 KiB
TypeScript
Raw Normal View History

2026-08-27 16:17:25 +00:00
// Module ID: 7639
// Function ID: 7640
2026-07-20 16:05:17 +00:00
// Name: Input
2026-08-27 16:17:25 +00:00
// Dependencies: [19, 17, 21, 4445, 712, 1236, 4441, 7640, 2]
2026-07-20 16:05:17 +00:00
// Exports: Input
2026-08-27 16:17:25 +00:00
// Module 7639 (Input)
2026-08-24 06:08:38 +00:00
import noopAll from "noop" /* 19 */;
import ThemesDefault from "Themes" /* 712 */;
import getSystemLocale from "getSystemLocale" /* 1236 */;
2026-08-27 16:17:25 +00:00
import Text from "Text" /* 4441 */;
import ErrorText from "ErrorText" /* 7640 */;
2026-08-24 06:08:38 +00:00
import { View } from "get ActivityIndicator" /* 17 */;
import jsxProd from "jsxProd" /* 21 */;
2026-08-27 16:17:25 +00:00
import createCacheKey from "createCacheKey" /* 4445 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
noopAll;
2026-07-29 08:29:29 +00:00
({ jsx: c3, jsxs: c4 } = jsxProd);
createCacheKey = { inputRow: null, labelWrapper: null, label: null, description: null, error: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { flexDirection: "row", gap: ThemesDefault.space.PX_8, marginTop: ThemesDefault.space.PX_4, marginBottom: ThemesDefault.space.PX_4 };
2026-07-29 08:29:29 +00:00
createCacheKey[0] = createCacheKey;
2026-08-24 06:08:38 +00:00
createCacheKey[1] = { marginBottom: ThemesDefault.space.PX_4, flexDirection: "row", alignItems: "center" };
let obj1 = { marginBottom: ThemesDefault.space.PX_4, flexDirection: "row", alignItems: "center" };
createCacheKey[2] = { marginBottom: ThemesDefault.space.PX_4 };
let obj2 = { marginBottom: ThemesDefault.space.PX_4 };
createCacheKey[3] = { marginTop: ThemesDefault.space.PX_4 };
let obj3 = { marginTop: ThemesDefault.space.PX_4 };
createCacheKey[4] = { marginTop: ThemesDefault.space.PX_4, width: "auto" };
let closure_5 = createCacheKey.createStyles(createCacheKey);
let obj4 = { marginTop: ThemesDefault.space.PX_4, width: "auto" };
const result = require("set").fileFinishedImporting("design/components/Input/native/Input.native.tsx");
2026-07-20 16:05:17 +00:00
export const Input = function Input(arg0) {
2026-08-24 06:08:38 +00:00
const tmp = callback2();
2026-07-20 16:05:17 +00:00
({ label, labelTrailing, labelId, description, errorMessage, required } = arg0);
({ children, containerStyle } = arg0);
2026-08-04 21:03:28 +00:00
if (typeof label === "string") {
2026-07-20 16:05:17 +00:00
if (true === required) {
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
2026-07-20 16:05:17 +00:00
const _HermesInternal = HermesInternal;
2026-08-24 06:08:38 +00:00
const combined = "" + label + " (" + intl.string(getSystemLocale.t.EkokLy) + ")";
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
let obj = { style: containerStyle, children: null };
2026-07-20 16:05:17 +00:00
if (null == label) {
const items = [null, , , ];
2026-07-29 08:29:29 +00:00
obj = { style: null, children: null };
obj[0] = tmp.inputRow;
obj[1] = children;
items[1] = callback(tmp8, obj);
let tmp15Result = null;
2026-07-20 16:05:17 +00:00
if (null != description) {
2026-07-29 08:29:29 +00:00
obj = { variant: "text-xs/medium", color: "text-muted", style: null, children: null };
obj[2] = tmp.description;
obj[3] = description;
2026-08-24 06:08:38 +00:00
tmp15Result = tmp15(Text.Text, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
items[2] = tmp15Result;
tmp15Result = null;
2026-07-20 16:05:17 +00:00
if (null != errorMessage) {
2026-08-24 06:08:38 +00:00
obj1 = { style: null, children: null };
2026-07-29 08:29:29 +00:00
obj1[0] = tmp.error;
obj1[1] = errorMessage;
2026-08-24 06:08:38 +00:00
tmp15Result = tmp15(ErrorText.ErrorText, obj1);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
items[3] = tmp15Result;
obj[1] = items;
2026-07-20 16:05:17 +00:00
return tmp7(tmp8, obj);
} else if (null != labelTrailing) {
2026-07-29 08:29:29 +00:00
const obj2 = { style: null, children: null };
obj2[0] = tmp.labelWrapper;
const obj3 = { variant: "text-sm/semibold", color: "text-subtle", nativeID: null, children: null };
obj3[2] = labelId;
obj3[3] = label;
2026-08-24 06:08:38 +00:00
const items1 = [callback(Text.Text, obj3), labelTrailing];
2026-07-29 08:29:29 +00:00
obj2[1] = items1;
let tmp7Result = tmp7(tmp8, obj2);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const obj4 = { variant: "text-sm/semibold", color: "text-subtle", style: null, nativeID: null, accessibilityLabel: null, children: null };
obj4[2] = tmp.label;
obj4[3] = labelId;
obj4[4] = combined;
2026-07-20 16:05:17 +00:00
const items2 = [label, ];
2026-07-29 08:29:29 +00:00
tmp7Result = null;
2026-07-20 16:05:17 +00:00
if (required) {
2026-07-29 08:29:29 +00:00
const obj5 = { variant: "text-sm/bold", color: "text-feedback-critical", "aria-hidden": true, children: null };
obj5[3] = [" ", "*"];
2026-08-27 16:17:25 +00:00
tmp7Result = tmp7(tmp22(4441).Text, obj5);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
items2[1] = tmp7Result;
obj4[5] = items2;
2026-08-24 06:08:38 +00:00
tmp7Result = tmp7(Text.Text, obj4);
2026-07-29 08:29:29 +00:00
tmp22 = require;
2026-07-20 16:05:17 +00:00
}
};