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

92 lines
3.8 KiB
TypeScript
Raw Normal View History

// Module ID: 6607
// Function ID: 6608
2026-07-20 16:05:17 +00:00
// Name: Input
// Dependencies: [19, 17, 21, 4560, 576, 6608, 4264, 4556, 6609, 2]
2026-07-20 16:05:17 +00:00
// Exports: Input
// Module 6607 (Input)
2026-08-24 06:08:38 +00:00
import noopAll from "noop" /* 19 */;
import ThemesDefault from "Themes" /* 576 */;
import getNodeText from "getNodeText" /* 4264 */;
import getRequiredFieldA11yName from "getRequiredFieldA11yName" /* 6608 */;
2026-08-24 06:08:38 +00:00
import { View } from "get ActivityIndicator" /* 17 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4560 */;
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 = getRequiredFieldA11yName;
obj1 = getNodeText;
const requiredFieldA11yName = obj.getRequiredFieldA11yName(obj1.getNodeText(label), required);
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(tmp6, obj);
let tmp11Result = 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;
tmp11Result = tmp11(tmp2(4556).Text, obj1);
2026-07-20 16:05:17 +00:00
}
items[2] = tmp11Result;
tmp11Result = 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;
tmp11Result = tmp11(tmp2(6609).ErrorText, obj2);
2026-07-20 16:05:17 +00:00
}
items[3] = tmp11Result;
2026-07-29 08:29:29 +00:00
obj[1] = items;
return tmp5(tmp6, 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, accessibilityLabel: null, children: null };
obj4[2] = labelId;
obj4[3] = requiredFieldA11yName;
obj4[4] = label;
const items1 = [callback(tmp2(4556).Text, obj4), labelTrailing];
obj3[1] = items1;
let tmp5Result = tmp5(tmp6, 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] = requiredFieldA11yName;
2026-07-20 16:05:17 +00:00
const items2 = [label, ];
tmp5Result = 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] = [" ", "*"];
tmp5Result = tmp5(tmp2(4556).Text, obj6);
2026-07-20 16:05:17 +00:00
}
items2[1] = tmp5Result;
obj5[5] = items2;
tmp5Result = tmp5(tmp2(4556).Text, obj5);
2026-07-20 16:05:17 +00:00
}
};