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

96 lines
3.8 KiB
TypeScript
Raw Normal View History

// Module ID: 6548
// Function ID: 6549
2026-07-20 16:05:17 +00:00
// Name: Input
// Dependencies: [19, 17, 21, 4481, 709, 4199, 1233, 4477, 6549, 2]
2026-07-20 16:05:17 +00:00
// Exports: Input
// Module 6548 (Input)
2026-08-24 06:08:38 +00:00
import noopAll from "noop" /* 19 */;
2026-09-02 09:53:35 +00:00
import ThemesDefault from "Themes" /* 709 */;
import getNodeText from "getNodeText" /* 4199 */;
2026-08-24 06:08:38 +00:00
import { View } from "get ActivityIndicator" /* 17 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4481 */;
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);
let obj = getNodeText;
const nodeText = obj.getNodeText(label);
if (null != nodeText) {
2026-07-20 16:05:17 +00:00
if (true === required) {
const intl = tmp2(1233).intl;
2026-07-20 16:05:17 +00:00
const _HermesInternal = HermesInternal;
const combined = "" + nodeText + " (" + intl.string(tmp2(1233).t.EkokLy) + ")";
2026-07-20 16:05:17 +00:00
}
}
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(tmp9, obj);
let tmp14Result = null;
2026-07-20 16:05:17 +00:00
if (null != description) {
obj1 = { variant: "text-xs/medium", color: "text-muted", style: null, children: null };
obj1[2] = tmp.description;
obj1[3] = description;
tmp14Result = tmp14(tmp2(4477).Text, obj1);
2026-07-20 16:05:17 +00:00
}
items[2] = tmp14Result;
tmp14Result = null;
2026-07-20 16:05:17 +00:00
if (null != errorMessage) {
const obj2 = { style: null, children: null };
obj2[0] = tmp.error;
obj2[1] = errorMessage;
tmp14Result = tmp14(tmp2(6549).ErrorText, obj2);
2026-07-20 16:05:17 +00:00
}
items[3] = tmp14Result;
2026-07-29 08:29:29 +00:00
obj[1] = items;
return tmp8(tmp9, obj);
2026-07-20 16:05:17 +00:00
} else if (null != labelTrailing) {
const obj3 = { style: null, children: null };
obj3[0] = tmp.labelWrapper;
const obj4 = { variant: "text-sm/semibold", color: "text-subtle", nativeID: null, children: null };
obj4[2] = labelId;
obj4[3] = label;
const items1 = [callback(tmp2(4477).Text, obj4), labelTrailing];
obj3[1] = items1;
let tmp8Result = tmp8(tmp9, obj3);
2026-07-20 16:05:17 +00:00
} else {
const obj5 = { variant: "text-sm/semibold", color: "text-subtle", style: null, nativeID: null, accessibilityLabel: null, children: null };
obj5[2] = tmp.label;
obj5[3] = labelId;
obj5[4] = combined;
2026-07-20 16:05:17 +00:00
const items2 = [label, ];
tmp8Result = null;
2026-07-20 16:05:17 +00:00
if (required) {
const obj6 = { variant: "text-sm/bold", color: "text-feedback-critical", "aria-hidden": true, children: null };
obj6[3] = [" ", "*"];
tmp8Result = tmp8(tmp2(4477).Text, obj6);
2026-07-20 16:05:17 +00:00
}
items2[1] = tmp8Result;
obj5[5] = items2;
tmp8Result = tmp8(tmp2(4477).Text, obj5);
2026-07-20 16:05:17 +00:00
}
};