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

86 lines
3.1 KiB
TypeScript
Raw Normal View History

// Module ID: 14170
// Function ID: 14171
2026-07-20 16:05:17 +00:00
// Name: GhostInput
// Dependencies: [109, 19, 21, 4560, 4556, 576, 6621, 4278, 6614, 6607, 6624, 6608, 2]
2026-07-20 16:05:17 +00:00
// Exports: GhostInput
// Module 14170 (GhostInput)
2026-08-24 06:08:38 +00:00
import noopAll from "noop" /* 19 */;
import ThemesDefault from "Themes" /* 576 */;
import Text from "Text" /* 4556 */;
import Input from "Input" /* 6607 */;
import getRequiredFieldA11yName from "getRequiredFieldA11yName" /* 6608 */;
import useInputStyles from "useInputStyles" /* 6621 */;
import useKeyboardBlurring from "useKeyboardBlurring" /* 6624 */;
2026-08-27 16:17:25 +00:00
import closure_4 from "_objectWithoutProperties" /* 109 */;
2026-08-24 06:08:38 +00:00
import { jsx } 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;
let closure_3 = ["labelId", "accessibilityLabel"];
2026-08-24 06:08:38 +00:00
noopAll;
2026-08-27 16:17:25 +00:00
let closure_6 = createCacheKey.createStyles(() => {
2026-07-20 16:05:17 +00:00
let str = arg0;
if (arg0 === undefined) {
str = "lg";
}
2026-07-29 08:29:29 +00:00
let str2 = arg1;
if (arg1 === undefined) {
2026-07-20 16:05:17 +00:00
str2 = "default";
}
2026-07-29 08:29:29 +00:00
const input = {};
2026-08-24 06:08:38 +00:00
const merged = Object.assign({ md: Text.TextStyleSheet["text-md/semibold"], lg: Text.TextStyleSheet["text-lg/semibold"] }[str]);
2026-07-20 16:05:17 +00:00
if ("error" === str2) {
2026-08-24 06:08:38 +00:00
let TEXT_DEFAULT = ThemesDefault.colors.TEXT_FEEDBACK_CRITICAL;
2026-07-20 16:05:17 +00:00
} else {
2026-08-24 06:08:38 +00:00
TEXT_DEFAULT = ThemesDefault.colors.TEXT_DEFAULT;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
input.color = TEXT_DEFAULT;
input.minWidth = 48;
return { input, centeredContainerStyle: { alignItems: "center" } };
2026-07-20 16:05:17 +00:00
});
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("design/components/TextInput/native/GhostInput.native.tsx");
2026-07-20 16:05:17 +00:00
export const GhostInput = function GhostInput(size) {
2026-08-24 06:08:38 +00:00
let obj = useInputStyles;
2026-07-20 16:05:17 +00:00
obj = { size: size.size };
const inputStyles = obj.useInputStyles(obj);
2026-08-27 16:17:25 +00:00
const tmp4 = callback2(size.size, size.status);
2026-07-20 16:05:17 +00:00
const isCentered = size.isCentered;
const autoFocus = size.autoFocus;
let tmpResult = tmp(4278);
2026-08-27 16:17:25 +00:00
const fieldLabelA11yNative = tmpResult.useFieldLabelA11yNative(size);
const accessibilityLabel = fieldLabelA11yNative.accessibilityLabel;
tmpResult = tmp(6614);
2026-08-27 16:17:25 +00:00
const textField = tmpResult.useTextField(size, undefined);
2026-07-20 16:05:17 +00:00
obj = {};
const merged = Object.assign(size);
2026-08-27 16:17:25 +00:00
obj.labelId = fieldLabelA11yNative.labelId;
2026-07-20 16:05:17 +00:00
const items = [size.containerStyle, ];
let prop;
2026-07-29 08:29:29 +00:00
if (tmp5) {
prop = tmp4.centeredContainerStyle;
2026-07-20 16:05:17 +00:00
}
items[1] = prop;
2026-07-29 08:29:29 +00:00
obj.containerStyle = items;
2026-08-24 06:08:38 +00:00
obj1 = {};
2026-07-20 16:05:17 +00:00
const merged1 = Object.assign(textField.inputProps);
2026-08-27 16:17:25 +00:00
const merged2 = Object.assign(callback(fieldLabelA11yNative, closure_3));
tmp5 = undefined === isCentered || isCentered;
const tmp6 = undefined === autoFocus || autoFocus;
const tmp8 = callback(fieldLabelA11yNative, closure_3);
let requiredFieldA11yName = getRequiredFieldA11yName.getRequiredFieldA11yName(accessibilityLabel, size.required);
if (requiredFieldA11yName == null) {
requiredFieldA11yName = accessibilityLabel;
}
obj1.accessibilityLabel = requiredFieldA11yName;
2026-07-29 08:29:29 +00:00
obj1.ref = textField.innerRef;
const items1 = [tmp4.input];
obj1.style = items1;
obj1.placeholderTextColor = inputStyles.placeholderText.color;
obj1.spellCheck = false;
obj1.autoFocus = tmp6;
2026-08-24 06:08:38 +00:00
obj.children = jsx(useKeyboardBlurring.NativeTextInput, {});
return jsx(Input.Input, {});
2026-07-20 16:05:17 +00:00
};