2026-09-12 13:45:10 +00:00
|
|
|
// Module ID: 6708
|
|
|
|
|
// Function ID: 6709
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: Input
|
2026-09-12 13:45:10 +00:00
|
|
|
// Dependencies: [19, 17, 21, 4636, 576, 6709, 4340, 4632, 6710, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: Input
|
|
|
|
|
|
2026-09-12 13:45:10 +00:00
|
|
|
// Module 6708 (Input)
|
2026-09-10 05:38:07 +00:00
|
|
|
import nativeDefault from "native" /* 576 */;
|
2026-09-12 13:45:10 +00:00
|
|
|
import native from "native" /* 4340 */;
|
|
|
|
|
import getRequiredFieldA11yName from "getRequiredFieldA11yName" /* 6709 */;
|
2026-09-10 05:38:07 +00:00
|
|
|
import noop from "module_19" /* 19 */;
|
2026-07-23 10:11:24 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
require = fn;
|
|
|
|
|
const View = fn(17).View;
|
|
|
|
|
const jsxProd = fn(21);
|
|
|
|
|
({ jsx: c3, jsxs: closure_4 } = jsxProd);
|
2026-09-12 13:45:10 +00:00
|
|
|
const createStyles = fn(4636);
|
2026-09-10 05:38:07 +00:00
|
|
|
const obj2 = { inputRow: { flexDirection: "row", gap: nativeDefault.space.PX_8, marginTop: nativeDefault.space.PX_4, marginBottom: nativeDefault.space.PX_4 }, labelWrapper: null, label: null, description: null, error: null };
|
|
|
|
|
let obj3 = { flexDirection: "row", gap: nativeDefault.space.PX_8, marginTop: nativeDefault.space.PX_4, marginBottom: nativeDefault.space.PX_4 };
|
|
|
|
|
obj2.labelWrapper = { marginBottom: nativeDefault.space.PX_4, flexDirection: "row", alignItems: "center" };
|
|
|
|
|
let obj4 = { marginBottom: nativeDefault.space.PX_4, flexDirection: "row", alignItems: "center" };
|
|
|
|
|
obj2.label = { marginBottom: nativeDefault.space.PX_4 };
|
|
|
|
|
let obj5 = { marginBottom: nativeDefault.space.PX_4 };
|
|
|
|
|
obj2.description = { marginTop: nativeDefault.space.PX_4 };
|
|
|
|
|
let obj6 = { marginTop: nativeDefault.space.PX_4 };
|
|
|
|
|
obj2.error = { marginTop: nativeDefault.space.PX_4, width: "auto" };
|
|
|
|
|
let closure_5 = createStyles.createStyles(obj2);
|
|
|
|
|
const size = fn(2);
|
|
|
|
|
const result = size.fileFinishedImporting("design/components/Input/native/Input.native.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export const Input = function Input(arg0) {
|
2026-09-10 05:38:07 +00:00
|
|
|
const tmp = closure_5();
|
2026-07-20 16:05:17 +00:00
|
|
|
({ label, labelTrailing, labelId, description, errorMessage, required } = arg0);
|
|
|
|
|
({ children, containerStyle } = arg0);
|
2026-09-10 05:38:07 +00:00
|
|
|
const obj = getRequiredFieldA11yName;
|
|
|
|
|
const requiredFieldA11yName = obj.getRequiredFieldA11yName(native.getNodeText(label), required);
|
|
|
|
|
const obj3 = { style: containerStyle, children: null };
|
2026-07-20 16:05:17 +00:00
|
|
|
if (null == label) {
|
|
|
|
|
const items = [null, , , ];
|
2026-09-10 05:38:07 +00:00
|
|
|
const obj4 = { style: tmp.inputRow, children };
|
|
|
|
|
items[1] = React3(tmp6, obj4);
|
2026-09-05 10:56:28 +00:00
|
|
|
let tmp11Result = null;
|
2026-07-20 16:05:17 +00:00
|
|
|
if (null != description) {
|
2026-09-10 05:38:07 +00:00
|
|
|
const obj5 = { variant: "text-xs/medium", color: "text-muted", style: tmp.description, children: description };
|
2026-09-12 13:45:10 +00:00
|
|
|
tmp11Result = tmp11(tmp2(4632).Text, obj5);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-09-05 10:56:28 +00:00
|
|
|
items[2] = tmp11Result;
|
2026-09-10 05:38:07 +00:00
|
|
|
let tmp11Result2 = null;
|
2026-07-20 16:05:17 +00:00
|
|
|
if (null != errorMessage) {
|
2026-09-10 05:38:07 +00:00
|
|
|
const obj6 = { style: tmp.error, children: errorMessage };
|
2026-09-12 13:45:10 +00:00
|
|
|
tmp11Result2 = tmp11(tmp2(6710).ErrorText, obj6);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
items[3] = tmp11Result2;
|
|
|
|
|
obj3.children = items;
|
|
|
|
|
return tmp5(tmp6, obj3);
|
2026-07-20 16:05:17 +00:00
|
|
|
} else if (null != labelTrailing) {
|
2026-09-10 05:38:07 +00:00
|
|
|
const obj7 = { style: tmp.labelWrapper, children: null };
|
|
|
|
|
const obj8 = { variant: "text-sm/semibold", color: "text-subtle", nativeID: labelId, accessibilityLabel: requiredFieldA11yName, children: label };
|
2026-09-12 13:45:10 +00:00
|
|
|
const items1 = [React3(tmp2(4632).Text, obj8), labelTrailing];
|
2026-09-10 05:38:07 +00:00
|
|
|
obj7.children = items1;
|
|
|
|
|
let tmp5Result = tmp5(tmp6, obj7);
|
2026-07-20 16:05:17 +00:00
|
|
|
} else {
|
2026-09-10 05:38:07 +00:00
|
|
|
const obj9 = { variant: "text-sm/semibold", color: "text-subtle", style: tmp.label, nativeID: labelId, accessibilityLabel: requiredFieldA11yName, children: null };
|
2026-07-20 16:05:17 +00:00
|
|
|
const items2 = [label, ];
|
2026-09-10 05:38:07 +00:00
|
|
|
let tmp5Result2 = null;
|
2026-07-20 16:05:17 +00:00
|
|
|
if (required) {
|
2026-09-10 05:38:07 +00:00
|
|
|
const obj10 = { variant: "text-sm/bold", color: "text-feedback-critical", "aria-hidden": true, children: [" ", "*"] };
|
2026-09-12 13:45:10 +00:00
|
|
|
tmp5Result2 = tmp5(tmp2(4632).Text, obj10);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
items2[1] = tmp5Result2;
|
|
|
|
|
obj9.children = items2;
|
2026-09-12 13:45:10 +00:00
|
|
|
tmp5Result = tmp5(tmp2(4632).Text, obj9);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
};
|