69 lines
2.3 KiB
TypeScript
69 lines
2.3 KiB
TypeScript
// Module ID: 13700
|
|
// Function ID: 13701
|
|
// Name: GhostInput
|
|
// Dependencies: [19, 21, 4444, 4440, 712, 6175, 6169, 8003, 6178, 2]
|
|
// Exports: GhostInput
|
|
|
|
// Module 13700 (GhostInput)
|
|
import noopAll from "noop" /* 19 */;
|
|
import ThemesDefault from "Themes" /* 712 */;
|
|
import Text from "Text" /* 4440 */;
|
|
import useTextFieldState from "useTextFieldState" /* 6169 */;
|
|
import useInputStyles from "useInputStyles" /* 6175 */;
|
|
import useKeyboardBlurring from "useKeyboardBlurring" /* 6178 */;
|
|
import Input from "Input" /* 8003 */;
|
|
import { jsx } from "jsxProd" /* 21 */;
|
|
import createCacheKey from "createCacheKey" /* 4444 */;
|
|
|
|
require = arg1;
|
|
noopAll;
|
|
let closure_4 = createCacheKey.createStyles(() => {
|
|
let str = arg0;
|
|
if (arg0 === undefined) {
|
|
str = "lg";
|
|
}
|
|
let str2 = arg1;
|
|
if (arg1 === undefined) {
|
|
str2 = "default";
|
|
}
|
|
const input = {};
|
|
const merged = Object.assign({ md: Text.TextStyleSheet["text-md/semibold"], lg: Text.TextStyleSheet["text-lg/semibold"] }[str]);
|
|
if ("error" === str2) {
|
|
let TEXT_DEFAULT = ThemesDefault.colors.TEXT_FEEDBACK_CRITICAL;
|
|
} else {
|
|
TEXT_DEFAULT = ThemesDefault.colors.TEXT_DEFAULT;
|
|
}
|
|
input.color = TEXT_DEFAULT;
|
|
input.minWidth = 48;
|
|
return { input, centeredContainerStyle: { alignItems: "center" } };
|
|
});
|
|
const result = require("set").fileFinishedImporting("design/components/TextInput/native/GhostInput.native.tsx");
|
|
|
|
export const GhostInput = function GhostInput(size) {
|
|
let obj = useInputStyles;
|
|
obj = { size: size.size };
|
|
const inputStyles = obj.useInputStyles(obj);
|
|
const tmp4 = callback(size.size, size.status);
|
|
const isCentered = size.isCentered;
|
|
const autoFocus = size.autoFocus;
|
|
const textField = useTextFieldState.useTextField(size, undefined);
|
|
obj = {};
|
|
const merged = Object.assign(size);
|
|
const items = [size.containerStyle, ];
|
|
let prop;
|
|
if (tmp5) {
|
|
prop = tmp4.centeredContainerStyle;
|
|
}
|
|
items[1] = prop;
|
|
obj.containerStyle = items;
|
|
obj1 = {};
|
|
const merged1 = Object.assign(textField.inputProps);
|
|
obj1.ref = textField.innerRef;
|
|
const items1 = [tmp4.input];
|
|
obj1.style = items1;
|
|
obj1.placeholderTextColor = inputStyles.placeholderText.color;
|
|
obj1.spellCheck = false;
|
|
obj1.autoFocus = undefined === autoFocus || autoFocus;
|
|
obj.children = jsx(useKeyboardBlurring.NativeTextInput, {});
|
|
return jsx(Input.Input, {});
|
|
};
|