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

102 lines
3.9 KiB
TypeScript
Raw Normal View History

2026-08-08 06:10:11 +00:00
// Module ID: 7791
// Function ID: 7792
2026-07-20 16:05:17 +00:00
// Name: Input
2026-08-08 06:10:11 +00:00
// Dependencies: [19, 17, 21, 4303, 712, 1236, 4299, 7792, 2]
2026-07-20 16:05:17 +00:00
// Exports: Input
2026-08-08 06:10:11 +00:00
// Module 7791 (Input)
2026-07-29 08:29:29 +00:00
import "noop";
2026-07-23 10:11:24 +00:00
import { View } from "get ActivityIndicator";
import jsxProd from "jsxProd";
2026-07-29 08:29:29 +00:00
import createCacheKey from "createCacheKey";
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
let c3;
let c4;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
({ jsx: c3, jsxs: c4 } = jsxProd);
createCacheKey = { inputRow: null, labelWrapper: null, label: null, description: null, error: null };
createCacheKey = { flexDirection: "row", gap: require("Themes").space.PX_8, marginTop: require("Themes").space.PX_4, marginBottom: require("Themes").space.PX_4 };
createCacheKey[0] = createCacheKey;
createCacheKey[1] = { marginBottom: require("Themes").space.PX_4, flexDirection: "row", alignItems: "center" };
let obj1 = { marginBottom: require("Themes").space.PX_4, flexDirection: "row", alignItems: "center" };
createCacheKey[2] = { marginBottom: require("Themes").space.PX_4 };
let obj2 = { marginBottom: require("Themes").space.PX_4 };
createCacheKey[3] = { marginTop: require("Themes").space.PX_4 };
let obj3 = { marginTop: require("Themes").space.PX_4 };
createCacheKey[4] = { marginTop: require("Themes").space.PX_4, width: "auto" };
createCacheKey = createCacheKey.createStyles(createCacheKey);
let obj4 = { marginTop: require("Themes").space.PX_4, width: "auto" };
2026-07-23 10:11:24 +00:00
const result = require("jsxProd").fileFinishedImporting("design/components/Input/native/Input.native.tsx");
2026-07-20 16:05:17 +00:00
export const Input = function Input(arg0) {
let children;
let containerStyle;
let description;
let errorMessage;
let label;
let labelId;
let labelTrailing;
let required;
2026-07-29 08:29:29 +00:00
const tmp = createCacheKey();
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-07-29 08:29:29 +00:00
const intl = require(1236) /* getSystemLocale */.intl;
2026-07-20 16:05:17 +00:00
const _HermesInternal = HermesInternal;
2026-07-29 08:29:29 +00:00
const combined = "" + label + " (" + intl.string(require(1236) /* 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-08 06:10:11 +00:00
tmp15Result = tmp15(require(4299) /* 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-07-29 08:29:29 +00:00
const obj1 = { style: null, children: null };
obj1[0] = tmp.error;
obj1[1] = errorMessage;
2026-08-08 06:10:11 +00:00
tmp15Result = tmp15(require(7792) /* 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-08 06:10:11 +00:00
const items1 = [callback(require(4299) /* 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-08 06:10:11 +00:00
tmp7Result = tmp7(tmp22(4299).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-08 06:10:11 +00:00
tmp7Result = tmp7(require(4299) /* Text */.Text, obj4);
2026-07-29 08:29:29 +00:00
tmp22 = require;
2026-07-20 16:05:17 +00:00
}
};