@beisen-phoenix/mobile-input
Advanced tools
Comparing version 0.0.6 to 0.0.7-alpha.1
import React from 'react'; | ||
interface InputProps { | ||
export interface InputProps { | ||
labelText?: string; | ||
@@ -14,5 +14,3 @@ value?: any; | ||
}; | ||
helpIcon?: React.ReactNode; | ||
className?: string; | ||
onClickHelp?: (e: React.SyntheticEvent) => void; | ||
labelIcon?: React.ReactNode; | ||
onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void; | ||
@@ -19,0 +17,0 @@ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void; |
import "core-js/modules/es6.object.assign"; | ||
var __makeTemplateObject = this && this.__makeTemplateObject || function (cooked, raw) { | ||
if (Object.defineProperty) { | ||
Object.defineProperty(cooked, "raw", { | ||
value: raw | ||
}); | ||
} else { | ||
cooked.raw = raw; | ||
} | ||
return cooked; | ||
}; | ||
var __assign = this && this.__assign || function () { | ||
@@ -31,37 +19,19 @@ __assign = Object.assign || function (t) { | ||
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, { useState, useEffect } from 'react'; | ||
import FieldBox from '@beisen-phoenix/mobile-field-box'; | ||
import InnerInput from '@beisen-phoenix/mobile-inner-input'; | ||
import styled from 'styled-components'; | ||
var StyledInput = | ||
/*#__PURE__*/ | ||
styled(InnerInput)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n"], ["\n width: 100%;\n"]))); | ||
var Input = function Input(props) { | ||
var labelText = props.labelText, | ||
defaultValue = props.defaultValue, | ||
required = props.required, | ||
readOnly = props.readOnly, | ||
helpIcon = props.helpIcon, | ||
onClickHelp = props.onClickHelp, | ||
labelIcon = props.labelIcon, | ||
placeholder = props.placeholder, | ||
translation = props.translation, | ||
rightEl = props.rightEl, | ||
hasError = props.hasError, | ||
onFocus = props.onFocus, | ||
value = props.value, | ||
defaultValue = props.defaultValue, | ||
onChange = props.onChange, | ||
onBlur = props.onBlur, | ||
others = __rest(props, ["labelText", "required", "readOnly", "helpIcon", "onClickHelp", "rightEl", "hasError", "onFocus", "value", "defaultValue", "onChange", "onBlur"]); | ||
onBlur = props.onBlur; | ||
@@ -85,4 +55,3 @@ var _a = useState(hasError), | ||
readOnly: readOnly, | ||
helpIcon: helpIcon, | ||
onClickHelp: onClickHelp, | ||
labelIcon: labelIcon, | ||
rightEl: rightEl, | ||
@@ -93,6 +62,8 @@ hasError: showError | ||
readOnly: readOnly, | ||
placeholder: placeholder, | ||
defaultValue: defaultValue, | ||
onFocus: handleFocus, | ||
translation: translation, | ||
onChange: onChange, | ||
onBlur: onBlur | ||
onBlur: onBlur, | ||
onFocus: handleFocus | ||
}; | ||
@@ -104,6 +75,5 @@ | ||
return React.createElement(FieldBox, __assign({}, fieldProps, others), React.createElement(StyledInput, __assign({}, inputProps))); | ||
return React.createElement(FieldBox, __assign({}, fieldProps), React.createElement(InnerInput, __assign({}, inputProps))); | ||
}; | ||
export default Input; | ||
var templateObject_1; | ||
export default Input; |
{ | ||
"name": "@beisen-phoenix/mobile-input", | ||
"version": "0.0.6", | ||
"version": "0.0.7-alpha.1", | ||
"description": "", | ||
@@ -12,3 +12,2 @@ "main": "lib/index.js", | ||
"examples": "sbl start --port 9001", | ||
"postlib": "tsc --emitDeclarationOnly", | ||
"commit": "git-cz", | ||
@@ -28,7 +27,7 @@ "prepublish": "npm run lib" | ||
"@beisen/babel": "7.x.x", | ||
"@beisen/build": "^1.0.27", | ||
"@beisen/italent-thunder": "^1.0.24", | ||
"@beisen/storybook": "^1.0.27", | ||
"@beisen/build": "1.x.x", | ||
"@beisen/italent-thunder": "1.0.24-rc.3", | ||
"@beisen/storybook": "1.x.x", | ||
"@beisen/storybook-react": "4.x.x", | ||
"@beisen/ts": "^1.0.11", | ||
"@beisen/ts": "1.x.x", | ||
"@beisen/webpack": "4.x.x", | ||
@@ -50,6 +49,6 @@ "@types/react": "^16.8.5", | ||
"dependencies": { | ||
"@beisen-phoenix/mobile-field-box": "^1.0.12", | ||
"@beisen-phoenix/mobile-inner-input": "0.0.5", | ||
"@beisen-phoenix/mobile-style-token": "^1.0.5" | ||
"@beisen-phoenix/mobile-field-box": "^1.2.1", | ||
"@beisen-phoenix/mobile-inner-input": "0.0.6", | ||
"@beisen-phoenix/mobile-style-token": "1.0.7" | ||
} | ||
} |
5309
34
81
+ Added@beisen-phoenix/mobile-inner-input@0.0.6(transitive)
+ Added@beisen-phoenix/mobile-style-token@1.0.7(transitive)
- Removed@beisen-phoenix/mobile-inner-input@0.0.5(transitive)