@trionesdev/antd-mobile-base-react 0.0.2-beta.2 → 0.0.2-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/ActionSheet/style.scss +6 -5
- package/dist/Alert/style.scss +17 -17
- package/dist/Avatar/avatar.d.ts +2 -1
- package/dist/Avatar/avatar.js +14 -4
- package/dist/Avatar/style.scss +3 -2
- package/dist/Card/style.scss +11 -11
- package/dist/CascaderPicker/style.scss +3 -3
- package/dist/CascaderView/style.scss +2 -2
- package/dist/Cell/CellGroup.js +22 -14
- package/dist/Cell/cell.js +54 -16
- package/dist/Cell/context.d.ts +11 -0
- package/dist/Cell/context.js +2 -0
- package/dist/Cell/styles.scss +10 -14
- package/dist/Cell/types.d.ts +15 -7
- package/dist/Checkbox/checkbox-button.d.ts +6 -2
- package/dist/Checkbox/checkbox-button.js +5 -17
- package/dist/Checkbox/checkbox-group.js +19 -3
- package/dist/Checkbox/checkbox-round.d.ts +8 -0
- package/dist/Checkbox/checkbox-round.js +35 -0
- package/dist/Checkbox/checkbox.js +49 -34
- package/dist/Checkbox/index.d.ts +0 -2
- package/dist/Checkbox/index.js +0 -2
- package/dist/Checkbox/index.scss +48 -34
- package/dist/Checkbox/types.d.ts +11 -1
- package/dist/Descriptions/style.scss +4 -4
- package/dist/Divider/style.scss +5 -5
- package/dist/Form/context.d.ts +2 -1
- package/dist/Form/form.d.ts +2 -7
- package/dist/Form/form.js +4 -3
- package/dist/Form/index.d.ts +5 -3
- package/dist/Form/index.js +4 -2
- package/dist/Form/types.d.ts +7 -0
- package/dist/Form/types.js +1 -0
- package/dist/InputNumber/input-number.d.ts +3 -0
- package/dist/InputNumber/input-number.js +7 -3
- package/dist/InputNumber/style.scss +32 -12
- package/dist/NavBar/nav-bar.d.ts +1 -0
- package/dist/NavBar/nav-bar.js +2 -1
- package/dist/NavBar/style.scss +6 -3
- package/dist/Picker/style.scss +2 -2
- package/dist/Popup/index.d.ts +2 -0
- package/dist/Popup/index.js +2 -0
- package/dist/Popup/style.scss +3 -3
- package/dist/Radio/RadioGroup.js +3 -3
- package/dist/Radio/style.scss +24 -21
- package/dist/Radio/types.d.ts +6 -4
- package/dist/SafeArea/style.scss +5 -3
- package/dist/Scaffold/style.scss +2 -1
- package/dist/SideBar/style.scss +6 -6
- package/dist/Space/space.d.ts +1 -0
- package/dist/Space/space.js +17 -6
- package/dist/Space/style.scss +3 -0
- package/dist/Steps/HorizontalSteps.js +5 -1
- package/dist/Steps/style.scss +7 -0
- package/dist/Switch/style.scss +6 -6
- package/dist/TabBar/index.js +2 -1
- package/dist/TabBar/index.scss +3 -2
- package/dist/Tabs/style.scss +4 -4
- package/dist/Tag/style.scss +14 -14
- package/dist/index.d.ts +3 -7
- package/dist/index.js +2 -4
- package/dist/style/css-variable.scss +6 -0
- package/dist/style/style.scss +2 -2
- package/dist/style/variable.scss +169 -164
- package/dist/types.d.ts +5 -1
- package/package.json +4 -4
- package/dist/Form/FormItem/form-item-input.d.ts +0 -15
- package/dist/Form/FormItem/form-item-input.js +0 -39
- package/dist/Form/FormItem/form-item-label.d.ts +0 -13
- package/dist/Form/FormItem/form-item-label.js +0 -25
- package/dist/Form/FormItem/form-item.d.ts +0 -21
- package/dist/Form/FormItem/form-item.js +0 -70
- package/dist/Form/FormItem/index.d.ts +0 -5
- package/dist/Form/FormItem/index.js +0 -3
- package/dist/Form/style.scss +0 -45
- package/dist/Input/base-input.d.ts +0 -14
- package/dist/Input/base-input.js +0 -63
- package/dist/Input/index.d.ts +0 -12
- package/dist/Input/index.js +0 -9
- package/dist/Input/index.scss +0 -173
- package/dist/Input/input-affix-wrapper.d.ts +0 -8
- package/dist/Input/input-affix-wrapper.js +0 -50
- package/dist/Input/input-opt.d.ts +0 -16
- package/dist/Input/input-opt.js +0 -93
- package/dist/Input/input-password.d.ts +0 -7
- package/dist/Input/input-password.js +0 -47
- package/dist/Input/input.d.ts +0 -15
- package/dist/Input/input.js +0 -47
- package/dist/Input/textarea.d.ts +0 -13
- package/dist/Input/textarea.js +0 -45
- package/dist/Input/types.d.ts +0 -1
- package/dist/Input/types.js +0 -1
- package/dist/VerificationCodeInput/demo/base.d.ts +0 -3
- package/dist/VerificationCodeInput/demo/base.js +0 -11
- package/dist/VerificationCodeInput/index.d.ts +0 -3
- package/dist/VerificationCodeInput/index.js +0 -2
- package/dist/VerificationCodeInput/style.scss +0 -20
- package/dist/VerificationCodeInput/verification-code-input.d.ts +0 -24
- package/dist/VerificationCodeInput/verification-code-input.js +0 -99
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["className", "style", "children", "layout", "label", "labelAlign", "labelWidth", "name", "required", "hidden", "noStyle", "rules", "initialValue", "valuePropName", "errorRender"];
|
|
3
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
8
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
9
|
-
import React from "react";
|
|
10
|
-
import { FormItemLabel } from "./form-item-label";
|
|
11
|
-
import { FormItemInput } from "./form-item-input";
|
|
12
|
-
import classNames from "classnames";
|
|
13
|
-
import { useFormContext } from "../hooks/useFormContext";
|
|
14
|
-
import { Field } from "rc-field-form";
|
|
15
|
-
export var FormItem = function FormItem(_ref) {
|
|
16
|
-
var className = _ref.className,
|
|
17
|
-
style = _ref.style,
|
|
18
|
-
children = _ref.children,
|
|
19
|
-
layout = _ref.layout,
|
|
20
|
-
label = _ref.label,
|
|
21
|
-
labelAlign = _ref.labelAlign,
|
|
22
|
-
labelWidth = _ref.labelWidth,
|
|
23
|
-
name = _ref.name,
|
|
24
|
-
required = _ref.required,
|
|
25
|
-
_ref$hidden = _ref.hidden,
|
|
26
|
-
hidden = _ref$hidden === void 0 ? false : _ref$hidden,
|
|
27
|
-
_ref$noStyle = _ref.noStyle,
|
|
28
|
-
noStyle = _ref$noStyle === void 0 ? false : _ref$noStyle,
|
|
29
|
-
rules = _ref.rules,
|
|
30
|
-
initialValue = _ref.initialValue,
|
|
31
|
-
valuePropName = _ref.valuePropName,
|
|
32
|
-
errorRender = _ref.errorRender,
|
|
33
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
34
|
-
var _useFormContext = useFormContext(),
|
|
35
|
-
formLayout = _useFormContext.layout,
|
|
36
|
-
formLayoutAlign = _useFormContext.labelAlign,
|
|
37
|
-
formLabelWidth = _useFormContext.labelWidth,
|
|
38
|
-
hiddenError = _useFormContext.hiddenError;
|
|
39
|
-
var formItemLayout = layout ? layout : formLayout === 'inline' ? 'horizontal' : formLayout;
|
|
40
|
-
var formItemAlign = labelAlign ? labelAlign : formLayoutAlign || 'left';
|
|
41
|
-
var formItemLabelWidth = labelWidth ? labelWidth : formLabelWidth;
|
|
42
|
-
var clsPrefix = "triones-antm-form-item";
|
|
43
|
-
if (noStyle) {
|
|
44
|
-
return /*#__PURE__*/React.createElement(Field, {
|
|
45
|
-
name: name,
|
|
46
|
-
rules: rules,
|
|
47
|
-
trigger: 'onChange',
|
|
48
|
-
initialValue: initialValue
|
|
49
|
-
}, children);
|
|
50
|
-
}
|
|
51
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
52
|
-
className: classNames(clsPrefix, "".concat(clsPrefix, "-").concat(formItemLayout), className, _defineProperty({}, "".concat(clsPrefix, "-hidden"), hidden)),
|
|
53
|
-
style: style
|
|
54
|
-
}, label && /*#__PURE__*/React.createElement(FormItemLabel, {
|
|
55
|
-
className: classNames("".concat(clsPrefix, "-label"), "".concat(clsPrefix, "-label-").concat(formItemAlign)),
|
|
56
|
-
style: {
|
|
57
|
-
width: formItemLabelWidth
|
|
58
|
-
},
|
|
59
|
-
label: label,
|
|
60
|
-
required: required
|
|
61
|
-
}), /*#__PURE__*/React.createElement(FormItemInput, _extends({
|
|
62
|
-
className: "".concat(clsPrefix, "-input")
|
|
63
|
-
}, props, {
|
|
64
|
-
name: name,
|
|
65
|
-
rules: rules,
|
|
66
|
-
errorRender: errorRender,
|
|
67
|
-
initialValue: initialValue,
|
|
68
|
-
hiddenError: hiddenError
|
|
69
|
-
}), children));
|
|
70
|
-
};
|
package/dist/Form/style.scss
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
$cls-prefix-form: 'triones-antm-form';
|
|
2
|
-
$cls-prefix-form-item: 'triones-antm-form-item';
|
|
3
|
-
|
|
4
|
-
.#{$cls-prefix-form}{
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.#{$cls-prefix-form-item}{
|
|
9
|
-
&-label{
|
|
10
|
-
font-size: 14Px;
|
|
11
|
-
//line-height: 1.5;
|
|
12
|
-
color: #6F6F6F;
|
|
13
|
-
&-left{}
|
|
14
|
-
&-right{
|
|
15
|
-
text-align: right;
|
|
16
|
-
}
|
|
17
|
-
&-required-mark{
|
|
18
|
-
display: inline-block;
|
|
19
|
-
color: red;
|
|
20
|
-
margin-right: 4Px;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
&-input{
|
|
24
|
-
.#{$cls-prefix-form-item}{
|
|
25
|
-
&-error{
|
|
26
|
-
font-size: 12Px;
|
|
27
|
-
color: red;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
&-horizontal{
|
|
32
|
-
display: flex;
|
|
33
|
-
.#{$cls-prefix-form-item}{
|
|
34
|
-
&-label{
|
|
35
|
-
padding: 4Px;
|
|
36
|
-
}
|
|
37
|
-
&-input{
|
|
38
|
-
flex: auto 1;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
&-hidden{
|
|
43
|
-
display: none;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export type BaseInputProps = {
|
|
3
|
-
className?: string;
|
|
4
|
-
style?: React.CSSProperties;
|
|
5
|
-
placeholder?: string;
|
|
6
|
-
type?: 'text' | 'password' | 'textarea';
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
value?: any;
|
|
9
|
-
onChange?: (e: any) => void;
|
|
10
|
-
};
|
|
11
|
-
export interface BaseInputHandle {
|
|
12
|
-
clear?: () => void;
|
|
13
|
-
}
|
|
14
|
-
export declare const BaseInput: React.ForwardRefExoticComponent<BaseInputProps & React.RefAttributes<BaseInputHandle>>;
|
package/dist/Input/base-input.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
var _excluded = ["className", "style", "placeholder", "type", "value", "onChange"];
|
|
2
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
7
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
8
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
9
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
|
-
import classNames from 'classnames';
|
|
12
|
-
import React, { forwardRef, useEffect, useImperativeHandle, useState } from 'react';
|
|
13
|
-
export var BaseInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
14
|
-
var className = _ref.className,
|
|
15
|
-
style = _ref.style,
|
|
16
|
-
placeholder = _ref.placeholder,
|
|
17
|
-
type = _ref.type,
|
|
18
|
-
value = _ref.value,
|
|
19
|
-
_onChange = _ref.onChange,
|
|
20
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
21
|
-
var _useState = useState(0),
|
|
22
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
23
|
-
keySequence = _useState2[0],
|
|
24
|
-
setKeySequence = _useState2[1];
|
|
25
|
-
var _useState3 = useState(value || ''),
|
|
26
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
27
|
-
innerValue = _useState4[0],
|
|
28
|
-
setInnerValue = _useState4[1];
|
|
29
|
-
useImperativeHandle(ref, function () {
|
|
30
|
-
return {
|
|
31
|
-
clear: function clear() {
|
|
32
|
-
setInnerValue('');
|
|
33
|
-
_onChange === null || _onChange === void 0 || _onChange('');
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
});
|
|
37
|
-
var cls = 'triones-antm-input';
|
|
38
|
-
useEffect(function () {
|
|
39
|
-
setKeySequence(keySequence + 1);
|
|
40
|
-
}, [type]);
|
|
41
|
-
useEffect(function () {
|
|
42
|
-
if (value === undefined) {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
if (value === innerValue) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
setInnerValue(value);
|
|
49
|
-
}, [value]);
|
|
50
|
-
return /*#__PURE__*/React.createElement("input", _extends({
|
|
51
|
-
key: keySequence
|
|
52
|
-
}, props, {
|
|
53
|
-
className: classNames(["".concat(cls), className]),
|
|
54
|
-
style: style,
|
|
55
|
-
placeholder: placeholder,
|
|
56
|
-
type: type,
|
|
57
|
-
value: innerValue,
|
|
58
|
-
onChange: function onChange(e) {
|
|
59
|
-
setInnerValue(e.target.value);
|
|
60
|
-
_onChange === null || _onChange === void 0 || _onChange(e);
|
|
61
|
-
}
|
|
62
|
-
}));
|
|
63
|
-
});
|
package/dist/Input/index.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { InputProps, Input as InternalInput } from './input';
|
|
2
|
-
import { InputOPT, InputOPTProps } from './input-opt';
|
|
3
|
-
import { InputPassword, InputPasswordProps } from './input-password';
|
|
4
|
-
import { InputTextareaProps, Textarea } from './textarea';
|
|
5
|
-
type CompoundedComponent = typeof InternalInput & {
|
|
6
|
-
Password: typeof InputPassword;
|
|
7
|
-
TextArea: typeof Textarea;
|
|
8
|
-
OPT: typeof InputOPT;
|
|
9
|
-
};
|
|
10
|
-
declare const Input: CompoundedComponent;
|
|
11
|
-
export type { InputOPTProps, InputPasswordProps, InputProps, InputTextareaProps, };
|
|
12
|
-
export default Input;
|
package/dist/Input/index.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Input as InternalInput } from "./input";
|
|
2
|
-
import { InputOPT } from "./input-opt";
|
|
3
|
-
import { InputPassword } from "./input-password";
|
|
4
|
-
import { Textarea } from "./textarea";
|
|
5
|
-
var Input = InternalInput;
|
|
6
|
-
Input.Password = InputPassword;
|
|
7
|
-
Input.OPT = InputOPT;
|
|
8
|
-
Input.TextArea = Textarea;
|
|
9
|
-
export default Input;
|
package/dist/Input/index.scss
DELETED
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
@use "../style/variable" as *;
|
|
2
|
-
|
|
3
|
-
$inputCls: 'triones-antm-input';
|
|
4
|
-
$inputAffixWrapperCls: 'triones-antm-input-affix-wrapper';
|
|
5
|
-
$inputGroupWrapperCls: 'triones-antm-input-group-wrapper';
|
|
6
|
-
$inputPotCls: 'triones-antm-pot';
|
|
7
|
-
|
|
8
|
-
input {
|
|
9
|
-
height: auto;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.#{$inputCls} {
|
|
13
|
-
box-sizing: border-box;
|
|
14
|
-
display: inline-block;
|
|
15
|
-
position: relative;
|
|
16
|
-
width: 100%;
|
|
17
|
-
min-width: 0;
|
|
18
|
-
transition: all .2s;
|
|
19
|
-
padding: $trionesInputPaddingBlock $trionesInputPaddingInline;
|
|
20
|
-
outline: none;
|
|
21
|
-
box-shadow: none;
|
|
22
|
-
border: none;
|
|
23
|
-
line-height: $trionesLineHeight;
|
|
24
|
-
border-radius: $trionesBorderRadius;
|
|
25
|
-
font-size: $trionesInputInputFontSize;
|
|
26
|
-
height: auto;
|
|
27
|
-
|
|
28
|
-
&::placeholder {
|
|
29
|
-
font-size: $trionesInputInputFontSize;
|
|
30
|
-
color: #cccccc;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
.#{$inputAffixWrapperCls} {
|
|
36
|
-
box-sizing: border-box;
|
|
37
|
-
position: relative;
|
|
38
|
-
display: inline-flex;
|
|
39
|
-
width: 100%;
|
|
40
|
-
min-width: 0;
|
|
41
|
-
line-height: $trionesLineHeight;
|
|
42
|
-
padding: $trionesInputPaddingBlock $trionesInputPaddingInline;
|
|
43
|
-
gap: 4Px;
|
|
44
|
-
|
|
45
|
-
&::before {
|
|
46
|
-
|
|
47
|
-
display: inline-block;
|
|
48
|
-
width: 0;
|
|
49
|
-
visibility: hidden;
|
|
50
|
-
content: "\a0";
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
&::after {
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.#{$inputCls} {
|
|
58
|
-
padding: 0;
|
|
59
|
-
background-color: transparent;
|
|
60
|
-
|
|
61
|
-
&-prifix {
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
&-suffix {
|
|
65
|
-
display: inline-flex;
|
|
66
|
-
align-items: center;
|
|
67
|
-
flex-shrink: 0;
|
|
68
|
-
gap: 4Px;
|
|
69
|
-
|
|
70
|
-
.clear-icon {
|
|
71
|
-
color: rgba(0, 0, 0, 0.25);
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
&:hover {
|
|
75
|
-
color: rgba(0, 0, 0, 0.45);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.triones-antm-icon {
|
|
80
|
-
cursor: pointer;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.#{$inputGroupWrapperCls} {
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
.#{$inputPotCls} {
|
|
91
|
-
position: relative;
|
|
92
|
-
display: inline-flex;
|
|
93
|
-
&-wrapper{
|
|
94
|
-
position: relative;
|
|
95
|
-
display: inline-flex;
|
|
96
|
-
align-items: center;
|
|
97
|
-
flex-wrap: nowrap;
|
|
98
|
-
column-gap: 8Px;
|
|
99
|
-
}
|
|
100
|
-
&-input {
|
|
101
|
-
position: absolute;
|
|
102
|
-
background-color: transparent;
|
|
103
|
-
z-index: -1;
|
|
104
|
-
left: 0;
|
|
105
|
-
top: 0;
|
|
106
|
-
right: 0;
|
|
107
|
-
bottom: 0;
|
|
108
|
-
opacity: 0;
|
|
109
|
-
-moz-appearance: textfield;
|
|
110
|
-
&::-webkit-outer-spin-button,
|
|
111
|
-
&::-webkit-inner-spin-button {
|
|
112
|
-
-webkit-appearance: none;
|
|
113
|
-
margin: 0;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
&-item {
|
|
118
|
-
text-align: center;
|
|
119
|
-
font-size: $trionesInputInputFontSize;
|
|
120
|
-
height: 32Px;
|
|
121
|
-
width: 32Px;
|
|
122
|
-
display: inline-flex;
|
|
123
|
-
align-items: center;
|
|
124
|
-
justify-content: center;
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
&::placeholder {
|
|
128
|
-
font-size: $trionesInputInputFontSize;
|
|
129
|
-
}
|
|
130
|
-
&-focus{
|
|
131
|
-
&::after{
|
|
132
|
-
content: ' ';
|
|
133
|
-
height: 100%;
|
|
134
|
-
width: 0.5Px;
|
|
135
|
-
background-color: #0a0a0a;
|
|
136
|
-
transition: transform 0.1s ease;
|
|
137
|
-
animation: blink 1s step-end infinite;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.#{$inputCls}-outlined {
|
|
144
|
-
font-size: $trionesInputInputFontSize;
|
|
145
|
-
color: rgba(0, 0, 0, 0.88);
|
|
146
|
-
background: #ffffff;
|
|
147
|
-
border-width: 1Px;
|
|
148
|
-
border-style: solid;
|
|
149
|
-
border-color: #d9d9d9;
|
|
150
|
-
-webkit-appearance: none;
|
|
151
|
-
-moz-appearance: none;
|
|
152
|
-
appearance: none;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
.#{$inputCls}-textarea {
|
|
158
|
-
box-sizing: border-box;
|
|
159
|
-
width: 100%;
|
|
160
|
-
border: 0;
|
|
161
|
-
outline: 0;
|
|
162
|
-
padding: $trionesInputPaddingBlock $trionesInputPaddingInline;
|
|
163
|
-
&::placeholder {
|
|
164
|
-
font-size: $trionesInputInputFontSize;
|
|
165
|
-
color: #cccccc;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
@keyframes blink {
|
|
170
|
-
50% {
|
|
171
|
-
background-color: transparent;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React, { FC } from 'react';
|
|
2
|
-
import { BaseInputProps } from './base-input';
|
|
3
|
-
export type InputAffixWrapperProps = BaseInputProps & {
|
|
4
|
-
prefix?: React.ReactNode;
|
|
5
|
-
suffix?: React.ReactNode;
|
|
6
|
-
allowClear?: boolean;
|
|
7
|
-
};
|
|
8
|
-
export declare const InputAffixWrapper: FC<InputAffixWrapperProps>;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
var _excluded = ["prefix", "suffix", "allowClear", "value", "onChange"];
|
|
2
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
7
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
8
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
9
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
|
-
import { CloseCircleFill } from "../../../antd-mobile-icons-react";
|
|
12
|
-
import classNames from 'classnames';
|
|
13
|
-
import React, { useRef } from 'react';
|
|
14
|
-
import { BaseInput } from "./base-input";
|
|
15
|
-
export var InputAffixWrapper = function InputAffixWrapper(_ref) {
|
|
16
|
-
var prefix = _ref.prefix,
|
|
17
|
-
suffix = _ref.suffix,
|
|
18
|
-
allowClear = _ref.allowClear,
|
|
19
|
-
value = _ref.value,
|
|
20
|
-
_onChange = _ref.onChange,
|
|
21
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
22
|
-
var _React$useState = React.useState(value),
|
|
23
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
24
|
-
innerValue = _React$useState2[0],
|
|
25
|
-
setInnerValue = _React$useState2[1];
|
|
26
|
-
var baseInputRef = useRef({});
|
|
27
|
-
var cls = 'triones-antm-input-affix-wrapper';
|
|
28
|
-
var inputCls = 'triones-antm-input';
|
|
29
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
30
|
-
className: classNames([cls])
|
|
31
|
-
}, prefix && /*#__PURE__*/React.createElement("div", {
|
|
32
|
-
className: classNames(["".concat(inputCls, "-prefix")])
|
|
33
|
-
}, prefix), /*#__PURE__*/React.createElement(BaseInput, _extends({
|
|
34
|
-
ref: baseInputRef
|
|
35
|
-
}, rest, {
|
|
36
|
-
value: value,
|
|
37
|
-
onChange: function onChange(value) {
|
|
38
|
-
setInnerValue(value);
|
|
39
|
-
_onChange === null || _onChange === void 0 || _onChange(value);
|
|
40
|
-
}
|
|
41
|
-
})), (suffix || allowClear) && /*#__PURE__*/React.createElement("div", {
|
|
42
|
-
className: classNames(["".concat(inputCls, "-suffix")])
|
|
43
|
-
}, allowClear && innerValue && /*#__PURE__*/React.createElement(CloseCircleFill, {
|
|
44
|
-
className: "clear-icon",
|
|
45
|
-
onClick: function onClick() {
|
|
46
|
-
var _baseInputRef$current, _baseInputRef$current2;
|
|
47
|
-
(_baseInputRef$current = (_baseInputRef$current2 = baseInputRef.current).clear) === null || _baseInputRef$current === void 0 || _baseInputRef$current.call(_baseInputRef$current2);
|
|
48
|
-
}
|
|
49
|
-
}), suffix));
|
|
50
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React, { FC } from 'react';
|
|
2
|
-
import './index.scss';
|
|
3
|
-
export type InputOPTProps = {
|
|
4
|
-
className?: string;
|
|
5
|
-
style?: React.CSSProperties;
|
|
6
|
-
length?: number;
|
|
7
|
-
value?: string;
|
|
8
|
-
onChange?: (value: string) => void;
|
|
9
|
-
};
|
|
10
|
-
export type InputOPTItemProps = {
|
|
11
|
-
index: number;
|
|
12
|
-
focusIndex?: number;
|
|
13
|
-
value?: string;
|
|
14
|
-
onFocus?: (index: number) => void;
|
|
15
|
-
};
|
|
16
|
-
export declare const InputOPT: FC<InputOPTProps>;
|
package/dist/Input/input-opt.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
import classNames from 'classnames';
|
|
8
|
-
import React, { useEffect, useRef, useState } from 'react';
|
|
9
|
-
import "./index.scss";
|
|
10
|
-
var cls = 'triones-antm-pot';
|
|
11
|
-
var inputCls = 'triones-antm-input';
|
|
12
|
-
var InputOPTItem = function InputOPTItem(_ref) {
|
|
13
|
-
var index = _ref.index,
|
|
14
|
-
focusIndex = _ref.focusIndex,
|
|
15
|
-
value = _ref.value,
|
|
16
|
-
onFocus = _ref.onFocus;
|
|
17
|
-
var ref = React.useRef(null);
|
|
18
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
19
|
-
ref: ref,
|
|
20
|
-
className: classNames("".concat(inputCls), "".concat(cls, "-item"), "".concat(inputCls, "-outlined") // {
|
|
21
|
-
// [`${cls}-item-focus`]: focusIndex === index,
|
|
22
|
-
// }
|
|
23
|
-
),
|
|
24
|
-
onClick: function onClick() {
|
|
25
|
-
onFocus === null || onFocus === void 0 || onFocus(index);
|
|
26
|
-
}
|
|
27
|
-
}, value);
|
|
28
|
-
};
|
|
29
|
-
export var InputOPT = function InputOPT(_ref2) {
|
|
30
|
-
var className = _ref2.className,
|
|
31
|
-
style = _ref2.style,
|
|
32
|
-
_ref2$length = _ref2.length,
|
|
33
|
-
length = _ref2$length === void 0 ? 6 : _ref2$length,
|
|
34
|
-
value = _ref2.value,
|
|
35
|
-
_onChange = _ref2.onChange;
|
|
36
|
-
var inputRef = useRef();
|
|
37
|
-
var _useState = useState(value || ''),
|
|
38
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
39
|
-
inputValue = _useState2[0],
|
|
40
|
-
setInputValue = _useState2[1];
|
|
41
|
-
var _React$useState = React.useState(Array.from({
|
|
42
|
-
length: length
|
|
43
|
-
}).map(function () {
|
|
44
|
-
return '';
|
|
45
|
-
})),
|
|
46
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
47
|
-
internalValue = _React$useState2[0],
|
|
48
|
-
setInternalValue = _React$useState2[1];
|
|
49
|
-
var _useState3 = useState(0),
|
|
50
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
51
|
-
focusIndex = _useState4[0],
|
|
52
|
-
setFocusIndex = _useState4[1];
|
|
53
|
-
useEffect(function () {
|
|
54
|
-
if (value === undefined) {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
setInternalValue(Array.from(inputValue));
|
|
58
|
-
}, [inputValue]);
|
|
59
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
60
|
-
className: classNames(cls, className),
|
|
61
|
-
style: style
|
|
62
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
63
|
-
className: classNames("".concat(cls, "-wrapper")),
|
|
64
|
-
onClick: function onClick() {
|
|
65
|
-
var _inputRef$current;
|
|
66
|
-
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.focus();
|
|
67
|
-
}
|
|
68
|
-
}, Array.from({
|
|
69
|
-
length: length
|
|
70
|
-
}).map(function (_, index) {
|
|
71
|
-
return /*#__PURE__*/React.createElement(InputOPTItem, {
|
|
72
|
-
key: index,
|
|
73
|
-
index: index,
|
|
74
|
-
focusIndex: focusIndex,
|
|
75
|
-
value: (internalValue === null || internalValue === void 0 ? void 0 : internalValue[index]) || '',
|
|
76
|
-
onFocus: function onFocus(index) {
|
|
77
|
-
setFocusIndex(index);
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
})), /*#__PURE__*/React.createElement("input", {
|
|
81
|
-
ref: inputRef,
|
|
82
|
-
className: "".concat(cls, "-input"),
|
|
83
|
-
type: "number",
|
|
84
|
-
value: inputValue,
|
|
85
|
-
onChange: function onChange(e) {
|
|
86
|
-
if (e.target.value.length > length) {
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
setInputValue(e.target.value);
|
|
90
|
-
_onChange === null || _onChange === void 0 || _onChange(e.target.value);
|
|
91
|
-
}
|
|
92
|
-
}));
|
|
93
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React, { FC } from 'react';
|
|
2
|
-
import { InputProps } from './input';
|
|
3
|
-
export type InputPasswordProps = Omit<InputProps, 'type'> & {
|
|
4
|
-
iconRender?: (visible: boolean) => React.ReactNode;
|
|
5
|
-
visibilityToggle?: boolean;
|
|
6
|
-
};
|
|
7
|
-
export declare const InputPassword: FC<InputPasswordProps>;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
var _excluded = ["iconRender", "visibilityToggle", "suffix"];
|
|
2
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
7
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
8
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
9
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
|
-
import { EyeInvisibleOutline, EyeOutline } from "../../../antd-mobile-icons-react";
|
|
12
|
-
import React, { useState } from 'react';
|
|
13
|
-
import { Input } from "./input";
|
|
14
|
-
export var InputPassword = function InputPassword(_ref) {
|
|
15
|
-
var iconRender = _ref.iconRender,
|
|
16
|
-
_ref$visibilityToggle = _ref.visibilityToggle,
|
|
17
|
-
visibilityToggle = _ref$visibilityToggle === void 0 ? true : _ref$visibilityToggle,
|
|
18
|
-
suffix = _ref.suffix,
|
|
19
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
20
|
-
var _useState = useState(false),
|
|
21
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
22
|
-
visible = _useState2[0],
|
|
23
|
-
setVisible = _useState2[1];
|
|
24
|
-
var toggleRender = function toggleRender() {
|
|
25
|
-
if (iconRender) {
|
|
26
|
-
return iconRender(visible);
|
|
27
|
-
} else {
|
|
28
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, visible ? /*#__PURE__*/React.createElement(EyeOutline, {
|
|
29
|
-
onClick: function onClick() {
|
|
30
|
-
return setVisible(false);
|
|
31
|
-
}
|
|
32
|
-
}) : /*#__PURE__*/React.createElement(EyeInvisibleOutline, {
|
|
33
|
-
onClick: function onClick() {
|
|
34
|
-
return setVisible(true);
|
|
35
|
-
}
|
|
36
|
-
}));
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
return /*#__PURE__*/React.createElement(Input, _extends({}, rest, {
|
|
40
|
-
type: visible ? 'text' : 'password',
|
|
41
|
-
suffix: /*#__PURE__*/React.createElement(React.Fragment, null, ' ', visibilityToggle && /*#__PURE__*/React.createElement("div", {
|
|
42
|
-
style: {
|
|
43
|
-
paddingLeft: 4
|
|
44
|
-
}
|
|
45
|
-
}, toggleRender()), " ", suffix, ' ')
|
|
46
|
-
}));
|
|
47
|
-
};
|
package/dist/Input/input.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React, { FC } from 'react';
|
|
2
|
-
import './index.scss';
|
|
3
|
-
export type InputProps = {
|
|
4
|
-
className?: string;
|
|
5
|
-
style?: React.CSSProperties;
|
|
6
|
-
placeholder?: string;
|
|
7
|
-
type?: 'text' | 'password' | 'textarea';
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
allowClear?: boolean;
|
|
10
|
-
prefix?: React.ReactNode;
|
|
11
|
-
suffix?: React.ReactNode;
|
|
12
|
-
value?: any;
|
|
13
|
-
onChange?: (e: any) => void;
|
|
14
|
-
};
|
|
15
|
-
export declare const Input: FC<InputProps>;
|