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

48 lines
1.8 KiB
TypeScript
Raw Normal View History

// Module ID: 6656
// Function ID: 6657
2026-07-20 16:05:17 +00:00
// Name: TextInput
// Dependencies: [109, 19, 21, 4324, 6657, 6663, 6658, 2]
2026-07-20 16:05:17 +00:00
// Module 6656 (TextInput)
import useFieldLabelA11yNative from "useFieldLabelA11yNative" /* 4324 */;
import Input from "Input" /* 6657 */;
import getRequiredFieldA11yName from "getRequiredFieldA11yName" /* 6658 */;
import TextField from "TextField" /* 6663 */;
import _objectWithoutProperties from "_objectWithoutProperties" /* 109 */;
import noop from "module_19" /* 19 */;
2026-07-20 16:05:17 +00:00
require = fn;
let closure_2 = ["labelId", "accessibilityLabel"];
const jsx = fn(21).jsx;
const size = fn(2);
const result = size.fileFinishedImporting("design/components/TextInput/native/TextInput.native.tsx");
export const TextInput = noop.forwardRef((status, ref) => {
2026-08-27 16:17:25 +00:00
status = status.status;
({ errorMessage, required } = status);
const fieldLabelA11yNative = useFieldLabelA11yNative.useFieldLabelA11yNative(status);
const accessibilityLabel = fieldLabelA11yNative.accessibilityLabel;
2026-07-29 08:29:29 +00:00
if (status == null) {
2026-07-21 22:01:30 +00:00
let str;
if (null != errorMessage) {
2026-07-21 22:01:30 +00:00
str = "error";
2026-07-20 16:05:17 +00:00
}
2026-07-21 22:01:30 +00:00
status = str;
2026-07-20 16:05:17 +00:00
}
const obj2 = {};
2026-08-27 16:17:25 +00:00
const merged = Object.assign(status);
obj2.labelId = fieldLabelA11yNative.labelId;
const obj3 = { ref };
2026-08-27 16:17:25 +00:00
const merged1 = Object.assign(status);
obj3.status = status;
const merged2 = Object.assign(_objectWithoutProperties(fieldLabelA11yNative, closure_2));
const tmp4 = _objectWithoutProperties(fieldLabelA11yNative, closure_2);
let requiredFieldA11yName = getRequiredFieldA11yName.getRequiredFieldA11yName(accessibilityLabel, required);
if (requiredFieldA11yName == null) {
requiredFieldA11yName = accessibilityLabel;
}
obj3.accessibilityLabel = requiredFieldA11yName;
obj2.children = jsx(TextField.TextField, { ref });
return jsx(Input.Input, {});
2026-07-20 16:05:17 +00:00
});