@tarojs/components-react 4.1.7-beta.1 → 4.1.7-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/button/index.js +20 -7
- package/dist/components/button/index.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/original/components/button/index.js +100 -0
- package/dist/original/components/button/index.js.map +1 -0
- package/dist/original/components/button/style/index.css +3 -0
- package/dist/original/components/button/style/index.css.map +1 -0
- package/dist/original/components/icon/index.js +36 -0
- package/dist/original/components/icon/index.js.map +1 -0
- package/dist/original/components/icon/style/index.css +3 -0
- package/dist/original/components/icon/style/index.css.map +1 -0
- package/dist/original/components/image/index.js +146 -0
- package/dist/original/components/image/index.js.map +1 -0
- package/dist/original/components/image/style/index.css +3 -0
- package/dist/original/components/image/style/index.css.map +1 -0
- package/dist/original/components/input/index.js +233 -0
- package/dist/original/components/input/index.js.map +1 -0
- package/dist/original/components/input/style/index.css +3 -0
- package/dist/original/components/input/style/index.css.map +1 -0
- package/dist/original/components/picker/index.js +788 -0
- package/dist/original/components/picker/index.js.map +1 -0
- package/dist/original/components/picker/picker-group.js +491 -0
- package/dist/original/components/picker/picker-group.js.map +1 -0
- package/dist/{components/picker/react-style/style.css → original/components/picker/style/index.css} +2 -1
- package/dist/original/components/picker/style/index.css.map +1 -0
- package/dist/original/components/pull-down-refresh/index.js +320 -0
- package/dist/original/components/pull-down-refresh/index.js.map +1 -0
- package/dist/original/components/pull-down-refresh/style/index.css +3 -0
- package/dist/original/components/pull-down-refresh/style/index.css.map +1 -0
- package/dist/original/components/refresher/index.js +7 -0
- package/dist/original/components/refresher/index.js.map +1 -0
- package/dist/original/components/scroll-view/index.js +189 -0
- package/dist/original/components/scroll-view/index.js.map +1 -0
- package/dist/original/components/scroll-view/style/index.css +3 -0
- package/dist/original/components/scroll-view/style/index.css.map +1 -0
- package/dist/original/components/swiper/index.js +461 -0
- package/dist/original/components/swiper/index.js.map +1 -0
- package/dist/original/components/swiper/style/index.css +3 -0
- package/dist/original/components/swiper/style/index.css.map +1 -0
- package/dist/original/components/text/index.js +28 -0
- package/dist/original/components/text/index.js.map +1 -0
- package/dist/original/components/text/style/index.css +3 -0
- package/dist/original/components/text/style/index.css.map +1 -0
- package/dist/original/components/view/index.js +80 -0
- package/dist/original/components/view/index.js.map +1 -0
- package/dist/original/index.css +2 -0
- package/dist/original/index.css.map +1 -0
- package/dist/original/index.js +15 -0
- package/dist/original/index.js.map +1 -0
- package/dist/original/utils/hooks.react.js +15 -0
- package/dist/original/utils/hooks.react.js.map +1 -0
- package/dist/original/utils/index.js +162 -0
- package/dist/original/utils/index.js.map +1 -0
- package/dist/solid/components/button/index.js +20 -7
- package/dist/solid/components/button/index.js.map +1 -1
- package/dist/solid/index.css +1 -1
- package/package.json +8 -6
- package/dist/components/picker/react-style/style.css.map +0 -1
- package/dist/components/picker/react-style/style.js +0 -4
- package/dist/components/picker/react-style/style.js.map +0 -1
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import './style/index.css';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import React__default from 'react';
|
|
4
|
+
import { omit, createForwardRefComponent } from '../../utils/index.js';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
function getTrueType(type, confirmType, password) {
|
|
8
|
+
if (confirmType === 'search') type = 'search';
|
|
9
|
+
if (password) type = 'password';
|
|
10
|
+
if (typeof type === 'undefined') {
|
|
11
|
+
return 'text';
|
|
12
|
+
}
|
|
13
|
+
if (!type) {
|
|
14
|
+
throw new Error('unexpected type');
|
|
15
|
+
}
|
|
16
|
+
if (type === 'digit') type = 'number';
|
|
17
|
+
return type;
|
|
18
|
+
}
|
|
19
|
+
function fixControlledValue(value) {
|
|
20
|
+
return value !== null && value !== void 0 ? value : '';
|
|
21
|
+
}
|
|
22
|
+
class Input extends React__default.Component {
|
|
23
|
+
constructor(props) {
|
|
24
|
+
super(props);
|
|
25
|
+
this.handleBeforeInput = e => {
|
|
26
|
+
if (!e.data) return;
|
|
27
|
+
const isNumber = e.data && /[0-9]/.test(e.data);
|
|
28
|
+
if (this.props.type === 'number' && !isNumber) {
|
|
29
|
+
e.preventDefault();
|
|
30
|
+
}
|
|
31
|
+
if (this.props.type === 'digit' && !isNumber) {
|
|
32
|
+
if (e.data !== '.' || e.data === '.' && e.target.value.indexOf('.') > -1) {
|
|
33
|
+
e.preventDefault();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
this.handleInput = this.handleInput.bind(this);
|
|
38
|
+
this.handlePaste = this.handlePaste.bind(this);
|
|
39
|
+
this.handleFocus = this.handleFocus.bind(this);
|
|
40
|
+
this.handleBlur = this.handleBlur.bind(this);
|
|
41
|
+
this.handleKeyDown = this.handleKeyDown.bind(this);
|
|
42
|
+
this.handleComposition = this.handleComposition.bind(this);
|
|
43
|
+
this.handleBeforeInput = this.handleBeforeInput.bind(this);
|
|
44
|
+
this.isOnComposition = false;
|
|
45
|
+
this.onInputExcuted = false;
|
|
46
|
+
}
|
|
47
|
+
componentDidMount() {
|
|
48
|
+
var _a, _b;
|
|
49
|
+
// 修复无法选择文件
|
|
50
|
+
if (this.props.type === 'file') {
|
|
51
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.addEventListener('change', this.handleInput);
|
|
52
|
+
} else {
|
|
53
|
+
(_b = this.inputRef) === null || _b === void 0 ? void 0 : _b.addEventListener('textInput', this.handleBeforeInput);
|
|
54
|
+
}
|
|
55
|
+
// 处理初始化是否 focus
|
|
56
|
+
if (this.props.focus && this.inputRef) this.inputRef.focus();
|
|
57
|
+
}
|
|
58
|
+
componentWillUnmount() {
|
|
59
|
+
var _a;
|
|
60
|
+
// 修复无法选择文件
|
|
61
|
+
if (this.props.type === 'file') {
|
|
62
|
+
this.inputRef.removeEventListener('change', this.handleInput);
|
|
63
|
+
} else {
|
|
64
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.removeEventListener('textInput', this.handleBeforeInput);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
68
|
+
if (!this.props.focus && nextProps.focus && this.inputRef) this.inputRef.focus();
|
|
69
|
+
}
|
|
70
|
+
handleInput(e) {
|
|
71
|
+
e.stopPropagation();
|
|
72
|
+
const {
|
|
73
|
+
type,
|
|
74
|
+
maxlength = 140,
|
|
75
|
+
confirmType = 'done',
|
|
76
|
+
password = false,
|
|
77
|
+
onInput
|
|
78
|
+
} = this.props;
|
|
79
|
+
if (!this.isOnComposition && !this.onInputExcuted) {
|
|
80
|
+
let {
|
|
81
|
+
value
|
|
82
|
+
} = e.target;
|
|
83
|
+
const inputType = getTrueType(type, confirmType, password);
|
|
84
|
+
this.onInputExcuted = true;
|
|
85
|
+
/* 修复 number 类型 maxLength 无效 */
|
|
86
|
+
if (inputType === 'number' && value && maxlength <= value.length) {
|
|
87
|
+
value = value.substring(0, maxlength);
|
|
88
|
+
e.target.value = value;
|
|
89
|
+
}
|
|
90
|
+
Object.defineProperty(e, 'detail', {
|
|
91
|
+
value: {
|
|
92
|
+
value,
|
|
93
|
+
cursor: value.length
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
// // 修复 IOS 光标跳转问题
|
|
97
|
+
// if (!(['number', 'file'].indexOf(inputType) >= 0)) {
|
|
98
|
+
// const pos = e.target.selectionEnd
|
|
99
|
+
// setTimeout(
|
|
100
|
+
// () => {
|
|
101
|
+
// e.target.selectionStart = pos
|
|
102
|
+
// e.target.selectionEnd = pos
|
|
103
|
+
// }
|
|
104
|
+
// )
|
|
105
|
+
// }
|
|
106
|
+
typeof onInput === 'function' && onInput(e);
|
|
107
|
+
this.onInputExcuted = false;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
handlePaste(e) {
|
|
111
|
+
e.stopPropagation();
|
|
112
|
+
const {
|
|
113
|
+
onPaste
|
|
114
|
+
} = this.props;
|
|
115
|
+
this.onInputExcuted = false;
|
|
116
|
+
Object.defineProperty(e, 'detail', {
|
|
117
|
+
value: {
|
|
118
|
+
value: e.target.value
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
typeof onPaste === 'function' && onPaste(e);
|
|
122
|
+
}
|
|
123
|
+
handleFocus(e) {
|
|
124
|
+
e.stopPropagation();
|
|
125
|
+
const {
|
|
126
|
+
onFocus
|
|
127
|
+
} = this.props;
|
|
128
|
+
this.onInputExcuted = false;
|
|
129
|
+
Object.defineProperty(e, 'detail', {
|
|
130
|
+
value: {
|
|
131
|
+
value: e.target.value
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
onFocus && onFocus(e);
|
|
135
|
+
}
|
|
136
|
+
handleBlur(e) {
|
|
137
|
+
e.stopPropagation();
|
|
138
|
+
const {
|
|
139
|
+
onBlur
|
|
140
|
+
} = this.props;
|
|
141
|
+
Object.defineProperty(e, 'detail', {
|
|
142
|
+
value: {
|
|
143
|
+
value: e.target.value
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
onBlur && onBlur(e);
|
|
147
|
+
}
|
|
148
|
+
handleKeyDown(e) {
|
|
149
|
+
e.stopPropagation();
|
|
150
|
+
const {
|
|
151
|
+
onConfirm,
|
|
152
|
+
onKeyDown
|
|
153
|
+
} = this.props;
|
|
154
|
+
const {
|
|
155
|
+
value
|
|
156
|
+
} = e.target;
|
|
157
|
+
const keyCode = e.keyCode || e.code;
|
|
158
|
+
this.onInputExcuted = false;
|
|
159
|
+
if (typeof onKeyDown === 'function') {
|
|
160
|
+
Object.defineProperty(e, 'detail', {
|
|
161
|
+
value: {
|
|
162
|
+
value,
|
|
163
|
+
cursor: value.length,
|
|
164
|
+
keyCode
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
onKeyDown(e);
|
|
168
|
+
}
|
|
169
|
+
if (e.keyCode === 13 && typeof onConfirm === 'function') {
|
|
170
|
+
Object.defineProperty(e, 'detail', {
|
|
171
|
+
value: {
|
|
172
|
+
value
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
onConfirm(e);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
handleComposition(e) {
|
|
179
|
+
e.stopPropagation();
|
|
180
|
+
if (!(e.target instanceof HTMLInputElement)) return;
|
|
181
|
+
if (e.type === 'compositionend') {
|
|
182
|
+
this.isOnComposition = false;
|
|
183
|
+
this.handleInput(e);
|
|
184
|
+
} else {
|
|
185
|
+
this.isOnComposition = true;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
render() {
|
|
189
|
+
const {
|
|
190
|
+
className = '',
|
|
191
|
+
placeholder,
|
|
192
|
+
type,
|
|
193
|
+
password = false,
|
|
194
|
+
disabled = false,
|
|
195
|
+
maxlength = 140,
|
|
196
|
+
confirmType = 'done',
|
|
197
|
+
name,
|
|
198
|
+
value
|
|
199
|
+
} = this.props;
|
|
200
|
+
const cls = classNames('taro-input-core', 'weui-input', className);
|
|
201
|
+
const otherProps = omit(this.props, ['forwardedRef', 'className', 'placeholder', 'disabled', 'password', 'type', 'maxlength', 'confirmType', 'focus', 'name']);
|
|
202
|
+
if ('value' in this.props) {
|
|
203
|
+
otherProps.value = fixControlledValue(value);
|
|
204
|
+
}
|
|
205
|
+
return /*#__PURE__*/jsx("input", {
|
|
206
|
+
ref: input => {
|
|
207
|
+
if (this.props.forwardedRef) {
|
|
208
|
+
this.props.forwardedRef.current = input;
|
|
209
|
+
}
|
|
210
|
+
this.inputRef = input;
|
|
211
|
+
},
|
|
212
|
+
...otherProps,
|
|
213
|
+
className: cls,
|
|
214
|
+
type: getTrueType(type, confirmType, password),
|
|
215
|
+
placeholder: placeholder,
|
|
216
|
+
disabled: disabled,
|
|
217
|
+
maxLength: maxlength,
|
|
218
|
+
name: name,
|
|
219
|
+
onInput: this.handleInput,
|
|
220
|
+
onPaste: this.handlePaste,
|
|
221
|
+
onFocus: this.handleFocus,
|
|
222
|
+
onBlur: this.handleBlur,
|
|
223
|
+
onKeyDown: this.handleKeyDown,
|
|
224
|
+
onCompositionStart: this.handleComposition,
|
|
225
|
+
onCompositionEnd: this.handleComposition,
|
|
226
|
+
onBeforeInput: this.handleBeforeInput
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
var index = createForwardRefComponent(Input);
|
|
231
|
+
|
|
232
|
+
export { index as default };
|
|
233
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/input/index.tsx"],"sourcesContent":["import './style/index.scss'\n\nimport classNames from 'classnames'\nimport React from 'react'\n\nimport { createForwardRefComponent, omit } from '../../utils'\n\nfunction getTrueType (type: string | undefined, confirmType: string, password: boolean) {\n if (confirmType === 'search') type = 'search'\n if (password) type = 'password'\n if (typeof type === 'undefined') {\n return 'text'\n }\n if (!type) {\n throw new Error('unexpected type')\n }\n if (type === 'digit') type = 'number'\n\n return type\n}\n\nfunction fixControlledValue (value) {\n return value ?? ''\n}\n\ninterface IProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {\n password?: boolean\n disabled?: boolean\n maxlength?: number\n placeholder?: string\n value?: string\n focus?: boolean\n confirmType?: string\n name?: string\n type?: string\n onConfirm?: (e) => void\n forwardedRef?: React.MutableRefObject<HTMLInputElement>\n}\n\nclass Input extends React.Component<IProps, null> {\n constructor (props) {\n super(props)\n this.handleInput = this.handleInput.bind(this)\n this.handlePaste = this.handlePaste.bind(this)\n this.handleFocus = this.handleFocus.bind(this)\n this.handleBlur = this.handleBlur.bind(this)\n this.handleKeyDown = this.handleKeyDown.bind(this)\n this.handleComposition = this.handleComposition.bind(this)\n this.handleBeforeInput = this.handleBeforeInput.bind(this)\n this.isOnComposition = false\n this.onInputExcuted = false\n }\n\n inputRef: HTMLInputElement\n isOnComposition: boolean\n onInputExcuted: boolean\n\n componentDidMount () {\n // 修复无法选择文件\n if (this.props.type === 'file') {\n this.inputRef?.addEventListener('change', this.handleInput)\n } else {\n this.inputRef?.addEventListener('textInput', this.handleBeforeInput)\n }\n\n // 处理初始化是否 focus\n if (this.props.focus && this.inputRef) this.inputRef.focus()\n }\n\n componentWillUnmount () {\n // 修复无法选择文件\n if (this.props.type === 'file') {\n this.inputRef.removeEventListener('change', this.handleInput)\n } else {\n this.inputRef?.removeEventListener('textInput', this.handleBeforeInput)\n }\n }\n\n UNSAFE_componentWillReceiveProps (nextProps: Readonly<IProps>) {\n if (!this.props.focus && nextProps.focus && this.inputRef) this.inputRef.focus()\n }\n\n handleInput (e) {\n e.stopPropagation()\n const {\n type,\n maxlength = 140,\n confirmType = 'done',\n password = false,\n onInput\n } = this.props\n\n if (!this.isOnComposition && !this.onInputExcuted) {\n let { value } = e.target\n const inputType = getTrueType(type, confirmType, password)\n this.onInputExcuted = true\n /* 修复 number 类型 maxLength 无效 */\n if (inputType === 'number' && value && maxlength <= value.length) {\n value = value.substring(0, maxlength)\n e.target.value = value\n }\n\n Object.defineProperty(e, 'detail', {\n value: { value, cursor: value.length }\n })\n // // 修复 IOS 光标跳转问题\n // if (!(['number', 'file'].indexOf(inputType) >= 0)) {\n // const pos = e.target.selectionEnd\n // setTimeout(\n // () => {\n // e.target.selectionStart = pos\n // e.target.selectionEnd = pos\n // }\n // )\n // }\n\n typeof onInput === 'function' && onInput(e)\n this.onInputExcuted = false\n }\n }\n\n handlePaste (e) {\n e.stopPropagation()\n const { onPaste } = this.props\n this.onInputExcuted = false\n Object.defineProperty(e, 'detail', {\n value: {\n value: e.target.value\n }\n })\n typeof onPaste === 'function' && onPaste(e)\n }\n\n handleFocus (e) {\n e.stopPropagation()\n const { onFocus } = this.props\n this.onInputExcuted = false\n Object.defineProperty(e, 'detail', {\n value: {\n value: e.target.value\n }\n })\n onFocus && onFocus(e)\n }\n\n handleBlur (e) {\n e.stopPropagation()\n const { onBlur } = this.props\n Object.defineProperty(e, 'detail', {\n value: {\n value: e.target.value\n }\n })\n onBlur && onBlur(e)\n }\n\n handleKeyDown (e) {\n e.stopPropagation()\n const { onConfirm, onKeyDown } = this.props\n const { value } = e.target\n const keyCode = e.keyCode || e.code\n this.onInputExcuted = false\n\n if (typeof onKeyDown === 'function') {\n Object.defineProperty(e, 'detail', {\n value: {\n value,\n cursor: value.length,\n keyCode\n }\n })\n onKeyDown(e)\n }\n\n if (e.keyCode === 13 && typeof onConfirm === 'function') {\n Object.defineProperty(e, 'detail', {\n value: {\n value\n }\n })\n onConfirm(e)\n }\n }\n\n handleComposition (e) {\n e.stopPropagation()\n if (!(e.target instanceof HTMLInputElement)) return\n\n if (e.type === 'compositionend') {\n this.isOnComposition = false\n this.handleInput(e)\n } else {\n this.isOnComposition = true\n }\n }\n\n handleBeforeInput = (e) => {\n if (!e.data) return\n const isNumber = e.data && /[0-9]/.test(e.data)\n if (this.props.type === 'number' && !isNumber) {\n e.preventDefault()\n }\n if (this.props.type === 'digit' && !isNumber) {\n if (e.data !== '.' || (e.data === '.' && e.target.value.indexOf('.') > -1)) {\n e.preventDefault()\n }\n }\n }\n\n render () {\n const {\n className = '',\n placeholder,\n type,\n password = false,\n disabled = false,\n maxlength = 140,\n confirmType = 'done',\n name,\n value\n } = this.props\n const cls = classNames('taro-input-core', 'weui-input', className)\n\n const otherProps = omit(this.props, [\n 'forwardedRef',\n 'className',\n 'placeholder',\n 'disabled',\n 'password',\n 'type',\n 'maxlength',\n 'confirmType',\n 'focus',\n 'name'\n ])\n\n if ('value' in this.props) {\n otherProps.value = fixControlledValue(value)\n }\n\n return (\n <input\n ref={(input: HTMLInputElement) => {\n if (this.props.forwardedRef) {\n this.props.forwardedRef.current = input\n }\n this.inputRef = input\n }}\n {...otherProps}\n className={cls}\n type={getTrueType(type, confirmType, password)}\n placeholder={placeholder}\n disabled={disabled}\n maxLength={maxlength}\n name={name}\n onInput={this.handleInput}\n onPaste={this.handlePaste}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n onKeyDown={this.handleKeyDown}\n onCompositionStart={this.handleComposition}\n onCompositionEnd={this.handleComposition}\n onBeforeInput={this.handleBeforeInput}\n />\n )\n }\n}\n\nexport default createForwardRefComponent(Input)\n"],"names":["getTrueType","type","confirmType","password","Error","fixControlledValue","value","Input","React","Component","constructor","props","handleBeforeInput","e","data","isNumber","test","preventDefault","target","indexOf","handleInput","bind","handlePaste","handleFocus","handleBlur","handleKeyDown","handleComposition","isOnComposition","onInputExcuted","componentDidMount","_a","inputRef","addEventListener","_b","focus","componentWillUnmount","removeEventListener","UNSAFE_componentWillReceiveProps","nextProps","stopPropagation","maxlength","onInput","inputType","length","substring","Object","defineProperty","cursor","onPaste","onFocus","onBlur","onConfirm","onKeyDown","keyCode","code","HTMLInputElement","render","className","placeholder","disabled","name","cls","classNames","otherProps","omit","_jsx","ref","input","forwardedRef","current","maxLength","onCompositionStart","onCompositionEnd","onBeforeInput","createForwardRefComponent"],"mappings":";;;;;;AAOA,SAASA,WAAWA,CAAEC,IAAwB,EAAEC,WAAmB,EAAEC,QAAiB,EAAA;AACpF,EAAA,IAAID,WAAW,KAAK,QAAQ,EAAED,IAAI,GAAG,QAAQ;AAC7C,EAAA,IAAIE,QAAQ,EAAEF,IAAI,GAAG,UAAU;AAC/B,EAAA,IAAI,OAAOA,IAAI,KAAK,WAAW,EAAE;AAC/B,IAAA,OAAO,MAAM;AACf;EACA,IAAI,CAACA,IAAI,EAAE;AACT,IAAA,MAAM,IAAIG,KAAK,CAAC,iBAAiB,CAAC;AACpC;AACA,EAAA,IAAIH,IAAI,KAAK,OAAO,EAAEA,IAAI,GAAG,QAAQ;AAErC,EAAA,OAAOA,IAAI;AACb;AAEA,SAASI,kBAAkBA,CAAEC,KAAK,EAAA;EAChC,OAAOA,KAAK,KAAL,IAAA,IAAAA,KAAK,cAALA,KAAK,GAAI,EAAE;AACpB;AAgBA,MAAMC,KAAM,SAAQC,cAAK,CAACC,SAAuB,CAAA;EAC/CC,WAAAA,CAAaC,KAAK,EAAA;IAChB,KAAK,CAACA,KAAK,CAAC;AA2Jd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C+C,aAAa,EAAE,IAAI,CAAC7D;AAAkB,KACtC,CAAA;AAEN;AACD;AAED,YAAe8D,yBAAyB,CAACnE,KAAK,CAAC;;;;"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
.taro-input-core{display:block}.weui-input{-webkit-appearance:none;background-color:transparent;border:0;color:inherit;font-size:inherit;height:1.4705882353em;line-height:1.4705882353;outline:0;width:100%}.weui-input::-webkit-inner-spin-button,.weui-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
|
|
2
|
+
/*# sourceMappingURL=index.css.map */
|
|
3
|
+
/*# sourceMappingURL=index.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../src/components/input/style/index.scss","../../../../../../../src/components/input/style/variable.scss"],"names":[],"mappings":"AAEA,iBACE,aADF,CAIA,YAII,uBAAA,CACA,4BAAA,CAHA,QAAA,CAMA,aAAA,CADA,iBAAA,CAEA,qBAAA,CACA,wBCUiB,CDjBjB,SAAA,CAFA,UAOJ,CAKI,8EAEE,uBAAA,CACA,QAJN","file":"index.css","sourcesContent":["@import './variable.scss';\n\n.taro-input-core {\n display: block;\n}\n\n.weui-input {\n width: 100%;\n border: 0;\n outline: 0;\n -webkit-appearance: none;\n background-color: transparent;\n // font-family: inherit;\n font-size: inherit;\n color: inherit;\n height: em($weuiCellLineHeight);\n line-height: $weuiCellLineHeight;\n \n // hides the spin-button\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n // &:focus {\n // &:not(:placeholder-shown) {\n // & + .weui-btn_input-clear {\n // display: inline;\n // }\n // }\n // }\n}\n","@use 'sass:math';\n\n$browser-context: 16;\n@function em($pixels, $context: $browser-context) {\n // @if math.unit($pixels) == px {\n // $pixels: math.div($pixels, $context);\n // }\n @if math.unit($pixels) != '' {\n $pixels: math.div($pixels, $pixels * 0 + 1);\n }\n \n @return #{$pixels}em;\n }\n \n\n$weuiCellBg:#FFFFFF; // var(--weui-BG-2);\n$weuiCellBorderColor:#e5e5e5; // $weuiLineColorLight;\n$weuiCellGapV:10px; // 16px;\n$weuiCellGapH:15px; // 16px;\n$weuiCellInnerGapH:.35em; // 16px;\n$weuiCellHeight: 45px; // 56px;\n$weuiCellFontSize: 17px;\n$weuiCellTipsFontSize: 14px;\n$weuiCellLabelWidth: 105px;\n// $weuiCellActiveBg: $weuiBgColorActive;\n\n$weuiCellLineHeight: calc(($weuiCellHeight - 2 * $weuiCellGapV) / $weuiCellFontSize); // 高度减去上下padding的行高\n$weuiCellsMarginTop: em(math.div(20, $weuiCellFontSize)); // 8px;\n\n// weui switch\n$weuiSwitchHeight: 32px;\n\n// weui uploader\n$weuiUploaderBorderColor:#D9D9D9;\n$weuiUploaderActiveBorderColor:#999999;\n$weuiUploaderFileSpacing: 9px;\n$weuiUploaderSize: 79px;\n$weuiUploaderBorderWidth: 1px;\n"]}
|