@beisen-phoenix/mobile-inner-input
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -7,2 +7,3 @@ import React from 'react'; | ||
readOnly?: boolean; | ||
textAlign?: string; | ||
translation?: { | ||
@@ -9,0 +10,0 @@ inputHolder: string; |
@@ -19,15 +19,2 @@ import "core-js/modules/es6.object.assign"; | ||
var __rest = this && this.__rest || function (s, e) { | ||
var t = {}; | ||
for (var p in s) { | ||
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; | ||
} | ||
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { | ||
if (e.indexOf(p[i]) < 0) t[p[i]] = s[p[i]]; | ||
} | ||
return t; | ||
}; | ||
import React from 'react'; | ||
@@ -50,2 +37,3 @@ import { StyledInput } from './index.st'; | ||
defaultValue = _a === void 0 ? '' : _a, | ||
textAlign = props.textAlign, | ||
_b = props.placeholder, | ||
@@ -59,5 +47,3 @@ placeholder = _b === void 0 ? '' : _b, | ||
onChange = props.onChange, | ||
onBlur = props.onBlur, | ||
others = __rest(props, ["defaultValue", "placeholder", "readOnly", "translation", "onFocus", "onChange", "onBlur"]); | ||
onBlur = props.onBlur; | ||
var valueProps = { | ||
@@ -80,3 +66,4 @@ defaultValue: defaultValue | ||
return React.createElement(StyledInput, __assign({}, valueProps, others, { | ||
return React.createElement(StyledInput, __assign({}, valueProps, { | ||
textAlign: textAlign, | ||
readOnly: readOnly, | ||
@@ -83,0 +70,0 @@ placeholder: readOnly ? '' : placeholder || translation.inputHolder, |
export declare const StyledInput: import("styled-components").StyledComponent<"input", any, { | ||
readOnly?: boolean | undefined; | ||
textAlign?: string | undefined; | ||
}, never>; |
@@ -17,8 +17,10 @@ var __makeTemplateObject = this && this.__makeTemplateObject || function (cooked, raw) { | ||
/*#__PURE__*/ | ||
css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n -webkit-appearance: none;\n -webkit-tap-highlight-color:rgba(255,255,255,0);\n border: none;\n padding: 0;\n &:focus{\n\t outline: none;\n }\n ::-webkit-input-placeholder {\n\t color: ", ";\n }\n"], ["\n -webkit-appearance: none;\n -webkit-tap-highlight-color:rgba(255,255,255,0);\n border: none;\n padding: 0;\n &:focus{\n\t outline: none;\n }\n ::-webkit-input-placeholder {\n\t color: ", ";\n }\n"])), token.$M5); | ||
css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n -webkit-appearance: none;\n -webkit-tap-highlight-color:rgba(255,255,255,0);\n border: none;\n padding: 0;\n font-weight: 300;\n &:focus{\n\t outline: none;\n }\n ::-webkit-input-placeholder {\n\t color: ", ";\n font-weight: 300;\n font-family: ", ";\n }\n"], ["\n font-family: ", ";\n -webkit-appearance: none;\n -webkit-tap-highlight-color:rgba(255,255,255,0);\n border: none;\n padding: 0;\n font-weight: 300;\n &:focus{\n\t outline: none;\n }\n ::-webkit-input-placeholder {\n\t color: ", ";\n font-weight: 300;\n font-family: ", ";\n }\n"])), token.$family, token.$M5, token.$family); | ||
export var StyledInput = | ||
/*#__PURE__*/ | ||
styled.input(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 100%;\n ", "\n ", "\n color: ", ";\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n"], ["\n width: 100%;\n ", "\n ", "\n color: ", ";\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n"])), resetInput, token.$Fs3, function (props) { | ||
styled.input(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 100%;\n ", "\n ", "\n color: ", ";\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n text-align: ", ";\n"], ["\n width: 100%;\n ", "\n ", "\n color: ", ";\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n text-align: ", ";\n"])), resetInput, token.$Fs3, function (props) { | ||
return props.readOnly ? token.$alpha(token.$M2, '0.7') : token.$M1; | ||
}, function (props) { | ||
return props.textAlign || 'right'; | ||
}); | ||
var templateObject_1, templateObject_2; |
{ | ||
"name": "@beisen-phoenix/mobile-inner-input", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "", | ||
@@ -48,4 +48,4 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@beisen-phoenix/mobile-style-token": "^1.0.7" | ||
"@beisen-phoenix/mobile-style-token": "1.0.16" | ||
} | ||
} |
@@ -26,1 +26,6 @@ 一个单纯的输入框 充满整个容器 | ||
文字对齐 | ||
| 参数 | 说明 | 类型 | 默认值 | | ||
| --- | --- | --- | --- | | ||
| textAlign | 文字对齐方式 可选值为css支持的所有对齐方式 | string | right | |
6932
31
104
+ Added@beisen-phoenix/mobile-style-token@1.0.16(transitive)
- Removed@beisen-phoenix/mobile-style-token@1.0.35(transitive)