@trionesdev/antd-mobile-react 0.0.2-beta.1 → 0.0.2-beta.11
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/LICENSE +21 -21
- package/dist/ActionSheet/ActionSheet.d.ts +25 -0
- package/dist/ActionSheet/ActionSheet.js +77 -0
- package/dist/ActionSheet/index.d.ts +1 -1
- package/dist/ActionSheet/index.js +1 -1
- package/dist/ActionSheet/style.scss +52 -0
- package/dist/Avatar/demo/base.js +2 -2
- package/dist/Avatar/demo/style.scss +6 -6
- package/dist/Badge/demo/base.js +2 -2
- package/dist/Badge/demo/base.scss +6 -6
- package/dist/Button/demo/base.js +2 -2
- package/dist/Button/style.scss +234 -232
- package/dist/Calendar/calendar.js +2 -1
- package/dist/Calendar/style.scss +85 -85
- package/dist/Calendar/touchable-calendar-grid.js +9 -9
- package/dist/CalendarDatetimePicker/CalendarDatetimePicker.d.ts +5 -6
- package/dist/CalendarDatetimePicker/CalendarDatetimePicker.js +37 -132
- package/dist/CalendarDatetimePicker/demo/base.js +5 -21
- package/dist/CalendarDatetimePicker/index.d.ts +2 -2
- package/dist/CalendarDatetimePicker/style.scss +10 -54
- package/dist/CalendarDatetimePicker/types.d.ts +0 -4
- package/dist/CalendarDatetimePicker/types.js +1 -6
- package/dist/CalendarDatetimePopup/CalendarDatetimePopup.d.ts +10 -0
- package/dist/CalendarDatetimePopup/CalendarDatetimePopup.js +142 -0
- package/dist/CalendarDatetimePopup/demo/base.js +41 -0
- package/dist/CalendarDatetimePopup/index.d.ts +3 -0
- package/dist/CalendarDatetimePopup/index.js +2 -0
- package/dist/CalendarDatetimePopup/style.scss +54 -0
- package/dist/CalendarDatetimePopup/types.d.ts +5 -0
- package/dist/CalendarDatetimePopup/types.js +6 -0
- package/dist/CalendarPopup/calendar-popup.d.ts +4 -0
- package/dist/{CalendarPicker/calendar-picker.js → CalendarPopup/calendar-popup.js} +2 -2
- package/dist/CalendarPopup/calendar-range-popup.d.ts +4 -0
- package/dist/{CalendarPicker/calendar-range-picker.js → CalendarPopup/calendar-range-popup.js} +8 -7
- package/dist/{CalendarPicker → CalendarPopup}/demo/base.js +3 -3
- package/dist/CalendarPopup/index.d.ts +9 -0
- package/dist/CalendarPopup/index.js +5 -0
- package/dist/CalendarPopup/style.scss +31 -0
- package/dist/{CalendarPicker → CalendarPopup}/types.d.ts +2 -2
- package/dist/Card/demo/base.js +2 -2
- package/dist/Card/demo/base.scss +18 -18
- package/dist/CascaderPicker/CascaderPicker.d.ts +25 -0
- package/dist/CascaderPicker/CascaderPicker.js +78 -0
- package/dist/CascaderPicker/demo/base.js +6 -18
- package/dist/CascaderPicker/index.d.ts +1 -1
- package/dist/CascaderPicker/index.js +1 -1
- package/dist/CascaderPicker/style.scss +24 -0
- package/dist/CascaderPopup/cascader-popup.d.ts +27 -0
- package/dist/CascaderPopup/cascader-popup.js +90 -0
- package/dist/CascaderPopup/demo/base.d.ts +3 -0
- package/dist/CascaderPopup/demo/base.js +82 -0
- package/dist/CascaderPopup/index.d.ts +3 -0
- package/dist/CascaderPopup/index.js +2 -0
- package/dist/CascaderPopup/style.scss +45 -0
- package/dist/Cell/demo/base.js +41 -2
- package/dist/Checkbox/demo/base.js +11 -6
- package/dist/Checkbox/demo/disabled.js +2 -1
- package/dist/ConfigProvider/demo/base.js +2 -2
- package/dist/DemoBlock/index.d.ts +6 -0
- package/dist/DemoBlock/index.js +9 -2
- package/dist/DemoBlock/index.scss +20 -20
- package/dist/DemoDescription/index.scss +3 -3
- package/dist/Divider/demo/base.js +2 -2
- package/dist/Ellipsis/demo/base.js +2 -2
- package/dist/Empty/demo/base.js +2 -2
- package/dist/ErrorBlock/demo/base.js +2 -2
- package/dist/Footer/demo/base.js +2 -2
- package/dist/Form/FormItem/form-item-input.d.ts +15 -0
- package/dist/Form/FormItem/form-item-input.js +39 -0
- package/dist/Form/FormItem/form-item-label.d.ts +13 -0
- package/dist/Form/FormItem/form-item-label.js +27 -0
- package/dist/Form/FormItem/form-item.d.ts +22 -0
- package/dist/Form/FormItem/form-item.js +73 -0
- package/dist/Form/FormItem/index.d.ts +5 -0
- package/dist/Form/FormItem/index.js +3 -0
- package/dist/Form/demo/input.js +1 -1
- package/dist/Form/index.d.ts +8 -1
- package/dist/Form/index.js +5 -1
- package/dist/Form/style.scss +67 -0
- package/dist/Grid/demo/base.js +2 -2
- package/dist/Grid/demo/base.scss +7 -7
- package/dist/Icon/demo/base.js +2 -2
- package/dist/Image/demo/base.js +2 -2
- package/dist/Image/demo/base.scss +4 -4
- package/dist/Image/style.scss +30 -30
- package/dist/ImagesPreview/ImagesPreview.js +2 -2
- package/dist/ImagesPreview/style.scss +34 -34
- package/dist/ImagesWall/CameraModal.js +2 -2
- package/dist/ImagesWall/style.scss +70 -70
- package/dist/Input/base-input.d.ts +13 -0
- package/dist/Input/base-input.js +41 -0
- package/dist/Input/demo/base.js +89 -13
- package/dist/Input/index.d.ts +14 -2
- package/dist/Input/index.js +11 -1
- package/dist/Input/index.scss +223 -0
- package/dist/Input/input-affix-wrapper.d.ts +11 -0
- package/dist/Input/input-affix-wrapper.js +37 -0
- package/dist/Input/input-opt.d.ts +16 -0
- package/dist/Input/input-opt.js +87 -0
- package/dist/Input/input-password.d.ts +7 -0
- package/dist/Input/input-password.js +48 -0
- package/dist/Input/input.d.ts +18 -0
- package/dist/Input/input.js +63 -0
- package/dist/Input/textarea.d.ts +15 -0
- package/dist/Input/textarea.js +51 -0
- package/dist/Input/types.d.ts +3 -0
- package/dist/Input/types.js +2 -0
- package/dist/NavBar/demo/base.scss +5 -5
- package/dist/NoticeBar/demo/base.js +2 -2
- package/dist/Overlay/Overlay.d.ts +16 -0
- package/dist/Overlay/Overlay.js +117 -0
- package/dist/Overlay/demo/base.d.ts +3 -0
- package/dist/{Mask → Overlay}/demo/base.js +14 -16
- package/dist/Overlay/index.d.ts +4 -0
- package/dist/Overlay/index.js +3 -0
- package/dist/Overlay/style.scss +20 -0
- package/dist/PageIndicator/demo/base.js +2 -2
- package/dist/Picker/index.d.ts +1 -1
- package/dist/Picker/index.js +1 -1
- package/dist/Picker/picker.d.ts +19 -0
- package/dist/Picker/picker.js +97 -0
- package/dist/Picker/style.scss +44 -0
- package/dist/PickerView/index.d.ts +2 -1
- package/dist/PickerView/index.js +1 -1
- package/dist/PickerView/picker-view-column-item.d.ts +7 -0
- package/dist/PickerView/picker-view-column-item.js +11 -0
- package/dist/PickerView/picker-view-column.d.ts +10 -0
- package/dist/PickerView/picker-view-column.js +117 -0
- package/dist/PickerView/picker-view.d.ts +12 -0
- package/dist/PickerView/picker-view.js +60 -0
- package/dist/PickerView/style.scss +72 -0
- package/dist/PickerView/types.d.ts +4 -0
- package/dist/PickerView/types.js +1 -0
- package/dist/Popup/demo/base.js +109 -27
- package/dist/Popup/index.d.ts +2 -1
- package/dist/Popup/index.js +2 -1
- package/dist/Popup/popup.d.ts +31 -0
- package/dist/Popup/popup.js +87 -0
- package/dist/Popup/style.scss +129 -0
- package/dist/Progress/index.d.ts +1 -1
- package/dist/Progress/index.js +1 -1
- package/dist/Radio/demo/base.js +2 -2
- package/dist/Radio/demo/base.scss +4 -4
- package/dist/Result/demo/base.js +2 -2
- package/dist/SafeArea/demo/base.scss +18 -18
- package/dist/ScrollView/index.d.ts +2 -1
- package/dist/ScrollView/index.js +1 -1
- package/dist/ScrollView/scroll-view.d.ts +4 -0
- package/dist/ScrollView/scroll-view.js +55 -0
- package/dist/ScrollView/style.scss +19 -0
- package/dist/ScrollView/types.d.ts +26 -0
- package/dist/ScrollView/types.js +1 -0
- package/dist/SideBar/index.d.ts +1 -1
- package/dist/SideBar/side-bar.js +6 -6
- package/dist/SideBar/style.scss +85 -85
- package/dist/Space/demo/base.js +2 -2
- package/dist/Swiper/style.scss +54 -54
- package/dist/Switch/demo/base.js +2 -2
- package/dist/TabBar/demo/base.js +2 -2
- package/dist/Tag/demo/base.js +2 -2
- package/dist/Tag/demo/style.scss +8 -8
- package/dist/Toast/style.scss +63 -63
- package/dist/Toast/toast-modal.js +4 -4
- package/dist/VerificationCodeInput/demo/base.js +2 -2
- package/dist/VerificationCodeInput/index.d.ts +2 -2
- package/dist/VerificationCodeInput/index.js +1 -1
- package/dist/VerificationCodeInput/style.scss +20 -0
- package/dist/VerificationCodeInput/verification-code-input.d.ts +24 -0
- package/dist/VerificationCodeInput/verification-code-input.js +99 -0
- package/dist/WaterMark/demo/demo1.js +2 -2
- package/dist/WaterMark/demo/demo1.scss +6 -6
- package/dist/WaterMark/demo/demo2.js +2 -2
- package/dist/index.d.ts +9 -7
- package/dist/index.js +4 -3
- package/dist/style/variable.scss +1 -1
- package/dist/types.d.ts +0 -8
- package/dist/types.js +0 -1
- package/dist/utils/type.js +36 -36
- package/dist/utils/use-isomorphic-update-layout-effect.d.ts +1 -1
- package/dist/utils/with-default-props.js +4 -4
- package/package.json +10 -11
- package/readme.md +43 -43
- package/dist/CalendarPicker/calendar-picker.d.ts +0 -4
- package/dist/CalendarPicker/calendar-range-picker.d.ts +0 -4
- package/dist/CalendarPicker/index.d.ts +0 -9
- package/dist/CalendarPicker/index.js +0 -5
- package/dist/CalendarPicker/style.scss +0 -31
- package/dist/Mask/index.d.ts +0 -3
- package/dist/Mask/index.js +0 -2
- package/dist/Progress/Progress.d.ts +0 -37
- package/dist/Progress/Progress.js +0 -52
- package/dist/Progress/ProgressCircle.d.ts +0 -17
- package/dist/Progress/ProgressCircle.js +0 -148
- package/dist/Progress/ProgressLine.d.ts +0 -15
- package/dist/Progress/ProgressLine.js +0 -87
- package/dist/Progress/style.scss +0 -33
- package/dist/Progress/types.d.ts +0 -4
- package/dist/Progress/types.js +0 -2
- /package/dist/{CalendarDatetimePicker → CalendarDatetimePopup}/DateTimeSwitch.d.ts +0 -0
- /package/dist/{CalendarDatetimePicker → CalendarDatetimePopup}/DateTimeSwitch.js +0 -0
- /package/dist/{CalendarPicker → CalendarDatetimePopup}/demo/base.d.ts +0 -0
- /package/dist/{Mask → CalendarPopup}/demo/base.d.ts +0 -0
- /package/dist/{CalendarPicker → CalendarPopup}/types.js +0 -0
package/dist/Image/style.scss
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
$class-prefix-image: 'triones-antm-image';
|
|
2
|
-
|
|
3
|
-
.#{$class-prefix-image} {
|
|
4
|
-
overflow: hidden;
|
|
5
|
-
text-align: center;
|
|
6
|
-
display: flex;
|
|
7
|
-
justify-content: center;
|
|
8
|
-
position: relative;
|
|
9
|
-
&-img {
|
|
10
|
-
height: 100%;
|
|
11
|
-
width: 100%;
|
|
12
|
-
object-fit: cover;
|
|
13
|
-
}
|
|
14
|
-
&-tip {
|
|
15
|
-
position: relative;
|
|
16
|
-
background-color: var(--triones-antm-color-fill-content);
|
|
17
|
-
height: 100%;
|
|
18
|
-
min-height: 24px;
|
|
19
|
-
min-width: 24px;
|
|
20
|
-
> svg {
|
|
21
|
-
width: 24px;
|
|
22
|
-
height: 24px;
|
|
23
|
-
position: absolute;
|
|
24
|
-
left: 50%;
|
|
25
|
-
top: 50%;
|
|
26
|
-
transform: translate(-50%, -50%);
|
|
27
|
-
color: var(--triones-antm-color-weak);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
1
|
+
$class-prefix-image: 'triones-antm-image';
|
|
2
|
+
|
|
3
|
+
.#{$class-prefix-image} {
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
text-align: center;
|
|
6
|
+
display: flex;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
position: relative;
|
|
9
|
+
&-img {
|
|
10
|
+
height: 100%;
|
|
11
|
+
width: 100%;
|
|
12
|
+
object-fit: cover;
|
|
13
|
+
}
|
|
14
|
+
&-tip {
|
|
15
|
+
position: relative;
|
|
16
|
+
background-color: var(--triones-antm-color-fill-content);
|
|
17
|
+
height: 100%;
|
|
18
|
+
min-height: 24px;
|
|
19
|
+
min-width: 24px;
|
|
20
|
+
> svg {
|
|
21
|
+
width: 24px;
|
|
22
|
+
height: 24px;
|
|
23
|
+
position: absolute;
|
|
24
|
+
left: 50%;
|
|
25
|
+
top: 50%;
|
|
26
|
+
transform: translate(-50%, -50%);
|
|
27
|
+
color: var(--triones-antm-color-weak);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -5,10 +5,10 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
5
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
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import React, { useEffect } from "react";
|
|
8
|
-
import Mask from "../Mask";
|
|
9
8
|
import classNames from "classnames";
|
|
10
9
|
import { Swiper, Image } from "../index";
|
|
11
10
|
import "./style.scss";
|
|
11
|
+
import Overlay from "../Overlay";
|
|
12
12
|
var cls = 'triones-antm-image-preview';
|
|
13
13
|
export var ImagesPreview = function ImagesPreview(_ref) {
|
|
14
14
|
var className = _ref.className,
|
|
@@ -45,7 +45,7 @@ export var ImagesPreview = function ImagesPreview(_ref) {
|
|
|
45
45
|
}
|
|
46
46
|
setInnerActiveIndex(activeIndex);
|
|
47
47
|
}, [activeIndex]);
|
|
48
|
-
return /*#__PURE__*/React.createElement(
|
|
48
|
+
return /*#__PURE__*/React.createElement(Overlay, {
|
|
49
49
|
open: innerOpen
|
|
50
50
|
}, /*#__PURE__*/React.createElement("div", {
|
|
51
51
|
className: classNames(cls, className),
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
$imagePreviewCls: 'triones-antm-image-preview';
|
|
2
|
-
|
|
3
|
-
.#{$imagePreviewCls} {
|
|
4
|
-
height: 100%;
|
|
5
|
-
width: 100%;
|
|
6
|
-
position: relative;
|
|
7
|
-
background-color: rgba(0, 0, 0, 0.8);
|
|
8
|
-
|
|
9
|
-
&-head {
|
|
10
|
-
position: fixed;
|
|
11
|
-
top: 50Px;
|
|
12
|
-
left: 0;
|
|
13
|
-
right: 0;
|
|
14
|
-
display: flex;
|
|
15
|
-
justify-content: center;
|
|
16
|
-
align-items: center;
|
|
17
|
-
color: white;
|
|
18
|
-
font-size: 14Px;
|
|
19
|
-
z-index: 1000;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
&-content {
|
|
23
|
-
height: 100%;
|
|
24
|
-
width: 100%;
|
|
25
|
-
:global{
|
|
26
|
-
.triones-antm-image-img{
|
|
27
|
-
height: auto!important;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
&-foot {
|
|
33
|
-
}
|
|
34
|
-
}
|
|
1
|
+
$imagePreviewCls: 'triones-antm-image-preview';
|
|
2
|
+
|
|
3
|
+
.#{$imagePreviewCls} {
|
|
4
|
+
height: 100%;
|
|
5
|
+
width: 100%;
|
|
6
|
+
position: relative;
|
|
7
|
+
background-color: rgba(0, 0, 0, 0.8);
|
|
8
|
+
|
|
9
|
+
&-head {
|
|
10
|
+
position: fixed;
|
|
11
|
+
top: 50Px;
|
|
12
|
+
left: 0;
|
|
13
|
+
right: 0;
|
|
14
|
+
display: flex;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
align-items: center;
|
|
17
|
+
color: white;
|
|
18
|
+
font-size: 14Px;
|
|
19
|
+
z-index: 1000;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&-content {
|
|
23
|
+
height: 100%;
|
|
24
|
+
width: 100%;
|
|
25
|
+
:global{
|
|
26
|
+
.triones-antm-image-img{
|
|
27
|
+
height: auto!important;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&-foot {
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -5,14 +5,14 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
5
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
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import React from "react";
|
|
8
|
-
import
|
|
8
|
+
import Overlay from "../Overlay";
|
|
9
9
|
export var CameraModal = function CameraModal(_ref) {
|
|
10
10
|
var open = _ref.open;
|
|
11
11
|
var _React$useState = React.useState(open || false),
|
|
12
12
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
13
13
|
innerOpen = _React$useState2[0],
|
|
14
14
|
setInnerOpen = _React$useState2[1];
|
|
15
|
-
return /*#__PURE__*/React.createElement(
|
|
15
|
+
return /*#__PURE__*/React.createElement(Overlay, {
|
|
16
16
|
open: innerOpen
|
|
17
17
|
}, /*#__PURE__*/React.createElement("div", {
|
|
18
18
|
style: {
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
@use "../style/variable" as
|
|
2
|
-
|
|
3
|
-
$imagesWallCls: 'triones-antm-images-wall';
|
|
4
|
-
|
|
5
|
-
.#{$imagesWallCls} {
|
|
6
|
-
display: grid;
|
|
7
|
-
grid-gap: 4PX;
|
|
8
|
-
width: 100%;
|
|
9
|
-
|
|
10
|
-
&-item {
|
|
11
|
-
aspect-ratio: 1;
|
|
12
|
-
border-radius:
|
|
13
|
-
overflow: hidden;
|
|
14
|
-
position: relative;
|
|
15
|
-
|
|
16
|
-
&-inner {
|
|
17
|
-
width: 100%;
|
|
18
|
-
height: 100%;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
&-close {
|
|
22
|
-
position: absolute;
|
|
23
|
-
top: 0;
|
|
24
|
-
right: 0;
|
|
25
|
-
background-color: rgb(0 0 0 / 63%);
|
|
26
|
-
width: 20Px;
|
|
27
|
-
height: 20Px;
|
|
28
|
-
border-bottom-left-radius:
|
|
29
|
-
display: flex;
|
|
30
|
-
justify-content: center;
|
|
31
|
-
align-items: center;
|
|
32
|
-
|
|
33
|
-
.triones-antm-icon {
|
|
34
|
-
color: white;
|
|
35
|
-
font-size: 12Px;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
&-input {
|
|
40
|
-
position: absolute;
|
|
41
|
-
width: 100%;
|
|
42
|
-
height: 100%;
|
|
43
|
-
top: 0;
|
|
44
|
-
left: 0;
|
|
45
|
-
margin: 0;
|
|
46
|
-
padding: 0;
|
|
47
|
-
z-index: 1;
|
|
48
|
-
opacity: 0;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
&-image {
|
|
52
|
-
width: 100%;
|
|
53
|
-
height: 100%;
|
|
54
|
-
object-fit: cover;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
&-upload {
|
|
59
|
-
display: flex;
|
|
60
|
-
justify-content: center;
|
|
61
|
-
align-items: center;
|
|
62
|
-
background-color:
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
&-action-sheet {
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
1
|
+
@use "../style/variable" as variable;
|
|
2
|
+
|
|
3
|
+
$imagesWallCls: 'triones-antm-images-wall';
|
|
4
|
+
|
|
5
|
+
.#{$imagesWallCls} {
|
|
6
|
+
display: grid;
|
|
7
|
+
grid-gap: 4PX;
|
|
8
|
+
width: 100%;
|
|
9
|
+
|
|
10
|
+
&-item {
|
|
11
|
+
aspect-ratio: 1;
|
|
12
|
+
border-radius: variable.$trionesBorderRadius;
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
position: relative;
|
|
15
|
+
|
|
16
|
+
&-inner {
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: 100%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&-close {
|
|
22
|
+
position: absolute;
|
|
23
|
+
top: 0;
|
|
24
|
+
right: 0;
|
|
25
|
+
background-color: rgb(0 0 0 / 63%);
|
|
26
|
+
width: 20Px;
|
|
27
|
+
height: 20Px;
|
|
28
|
+
border-bottom-left-radius: variable.$trionesBorderRadius;
|
|
29
|
+
display: flex;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
align-items: center;
|
|
32
|
+
|
|
33
|
+
.triones-antm-icon {
|
|
34
|
+
color: white;
|
|
35
|
+
font-size: 12Px;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&-input {
|
|
40
|
+
position: absolute;
|
|
41
|
+
width: 100%;
|
|
42
|
+
height: 100%;
|
|
43
|
+
top: 0;
|
|
44
|
+
left: 0;
|
|
45
|
+
margin: 0;
|
|
46
|
+
padding: 0;
|
|
47
|
+
z-index: 1;
|
|
48
|
+
opacity: 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&-image {
|
|
52
|
+
width: 100%;
|
|
53
|
+
height: 100%;
|
|
54
|
+
object-fit: cover;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&-upload {
|
|
59
|
+
display: flex;
|
|
60
|
+
justify-content: center;
|
|
61
|
+
align-items: center;
|
|
62
|
+
background-color: variable.$trionesColorBgTextActive;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&-action-sheet {
|
|
66
|
+
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
}
|
|
13
|
+
export declare const BaseInput: React.ForwardRefExoticComponent<BaseInputProps & React.RefAttributes<BaseInputHandle>>;
|
|
@@ -0,0 +1,41 @@
|
|
|
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, useState } from 'react';
|
|
13
|
+
import { inputCls } from "./types";
|
|
14
|
+
export var BaseInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
15
|
+
var className = _ref.className,
|
|
16
|
+
style = _ref.style,
|
|
17
|
+
placeholder = _ref.placeholder,
|
|
18
|
+
type = _ref.type,
|
|
19
|
+
value = _ref.value,
|
|
20
|
+
_onChange = _ref.onChange,
|
|
21
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
22
|
+
var _useState = useState(0),
|
|
23
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
24
|
+
keySequence = _useState2[0],
|
|
25
|
+
setKeySequence = _useState2[1];
|
|
26
|
+
useEffect(function () {
|
|
27
|
+
setKeySequence(keySequence + 1);
|
|
28
|
+
}, [type]);
|
|
29
|
+
return /*#__PURE__*/React.createElement("input", _extends({
|
|
30
|
+
key: keySequence
|
|
31
|
+
}, props, {
|
|
32
|
+
className: classNames(["".concat(inputCls), className]),
|
|
33
|
+
style: style,
|
|
34
|
+
placeholder: placeholder,
|
|
35
|
+
type: type,
|
|
36
|
+
value: value,
|
|
37
|
+
onChange: function onChange(e) {
|
|
38
|
+
_onChange === null || _onChange === void 0 || _onChange(e.target.value);
|
|
39
|
+
}
|
|
40
|
+
}));
|
|
41
|
+
});
|
package/dist/Input/demo/base.js
CHANGED
|
@@ -1,29 +1,105 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* compact: true
|
|
1
|
+
/**
|
|
2
|
+
* compact: true
|
|
3
3
|
*/
|
|
4
4
|
import { DemoBlock } from "../../DemoBlock";
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import Input from "../index";
|
|
7
|
+
import Space from "../../Space";
|
|
7
8
|
export default (function () {
|
|
8
9
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DemoBlock, {
|
|
9
|
-
title: "\u57FA\u7840\u7528\u6CD5"
|
|
10
|
+
title: "\u57FA\u7840\u7528\u6CD5",
|
|
11
|
+
styles: {
|
|
12
|
+
body: {
|
|
13
|
+
backgroundColor: '#D5D5D5'
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
17
|
+
style: {
|
|
18
|
+
backgroundColor: '#FFFFFF'
|
|
19
|
+
}
|
|
10
20
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
11
21
|
placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9"
|
|
12
|
-
})), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
13
|
-
title: "\u5E26\u6E05\u9664\u6309\u94AE"
|
|
22
|
+
}))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
23
|
+
title: "\u5E26\u6E05\u9664\u6309\u94AE",
|
|
24
|
+
styles: {
|
|
25
|
+
body: {
|
|
26
|
+
backgroundColor: '#D5D5D5'
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
30
|
+
style: {
|
|
31
|
+
backgroundColor: '#FFFFFF'
|
|
32
|
+
}
|
|
14
33
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
15
34
|
placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9",
|
|
16
35
|
allowClear: true
|
|
17
|
-
})), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
18
|
-
title: "\u5BC6\u7801\u6A21\u5F0F"
|
|
36
|
+
}))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
37
|
+
title: "\u5BC6\u7801\u6A21\u5F0F",
|
|
38
|
+
styles: {
|
|
39
|
+
body: {
|
|
40
|
+
backgroundColor: '#D5D5D5'
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
style: {
|
|
45
|
+
backgroundColor: '#FFFFFF'
|
|
46
|
+
}
|
|
19
47
|
}, /*#__PURE__*/React.createElement(Input.Password, {
|
|
20
48
|
placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9",
|
|
21
49
|
allowClear: true
|
|
22
|
-
})), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
23
|
-
title: "OPT\u6A21\u5F0F"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
50
|
+
}))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
51
|
+
title: "OPT\u6A21\u5F0F",
|
|
52
|
+
styles: {
|
|
53
|
+
body: {
|
|
54
|
+
backgroundColor: '#D5D5D5'
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
58
|
+
style: {
|
|
59
|
+
backgroundColor: '#FFFFFF'
|
|
60
|
+
}
|
|
61
|
+
}, /*#__PURE__*/React.createElement(Input.OPT, null))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
62
|
+
title: "Textarea",
|
|
63
|
+
styles: {
|
|
64
|
+
body: {
|
|
65
|
+
backgroundColor: '#D5D5D5'
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}, /*#__PURE__*/React.createElement(Input.Textarea, {
|
|
27
69
|
placeholder: '请输入内容'
|
|
28
|
-
}))
|
|
70
|
+
})), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
71
|
+
title: "\u53D8\u4F53"
|
|
72
|
+
}, /*#__PURE__*/React.createElement(Space, {
|
|
73
|
+
direction: "vertical",
|
|
74
|
+
block: true
|
|
75
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
76
|
+
variant: "outlined",
|
|
77
|
+
placeholder: "outlined"
|
|
78
|
+
}), /*#__PURE__*/React.createElement(Input, {
|
|
79
|
+
variant: "filled",
|
|
80
|
+
placeholder: "filled"
|
|
81
|
+
}), /*#__PURE__*/React.createElement(Input, {
|
|
82
|
+
variant: "borderless",
|
|
83
|
+
placeholder: "borderless"
|
|
84
|
+
}), /*#__PURE__*/React.createElement(Input, {
|
|
85
|
+
variant: "underlined",
|
|
86
|
+
placeholder: "underlined"
|
|
87
|
+
}))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
88
|
+
title: "\u5C3A\u5BF8"
|
|
89
|
+
}, /*#__PURE__*/React.createElement(Space, {
|
|
90
|
+
direction: "vertical",
|
|
91
|
+
block: true
|
|
92
|
+
}, /*#__PURE__*/React.createElement(Input.Textarea, {
|
|
93
|
+
variant: "outlined",
|
|
94
|
+
placeholder: "outlined"
|
|
95
|
+
}), /*#__PURE__*/React.createElement(Input.Textarea, {
|
|
96
|
+
variant: "filled",
|
|
97
|
+
placeholder: "filled"
|
|
98
|
+
}), /*#__PURE__*/React.createElement(Input.Textarea, {
|
|
99
|
+
variant: "borderless",
|
|
100
|
+
placeholder: "borderless"
|
|
101
|
+
}), /*#__PURE__*/React.createElement(Input.Textarea, {
|
|
102
|
+
variant: "underlined",
|
|
103
|
+
placeholder: "underlined"
|
|
104
|
+
}))));
|
|
29
105
|
});
|
package/dist/Input/index.d.ts
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { InputAffixWrapperProps, InputAffixWrapper } from "./input-affix-wrapper";
|
|
2
|
+
import { InputProps, Input as InternalInput } from './input';
|
|
3
|
+
import { InputOPT, InputOPTProps } from './input-opt';
|
|
4
|
+
import { InputPassword, InputPasswordProps } from './input-password';
|
|
5
|
+
import { InputTextareaProps, Textarea } from './textarea';
|
|
6
|
+
type CompoundedComponent = typeof InternalInput & {
|
|
7
|
+
Password: typeof InputPassword;
|
|
8
|
+
Textarea: typeof Textarea;
|
|
9
|
+
OPT: typeof InputOPT;
|
|
10
|
+
};
|
|
11
|
+
declare const Input: CompoundedComponent;
|
|
12
|
+
export type { InputAffixWrapperProps, InputOPTProps, InputPasswordProps, InputProps, InputTextareaProps, };
|
|
13
|
+
export * from './types';
|
|
14
|
+
export { InputAffixWrapper };
|
|
3
15
|
export default Input;
|
package/dist/Input/index.js
CHANGED
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InputAffixWrapper } from "./input-affix-wrapper";
|
|
2
|
+
import { Input as InternalInput } from "./input";
|
|
3
|
+
import { InputOPT } from "./input-opt";
|
|
4
|
+
import { InputPassword } from "./input-password";
|
|
5
|
+
import { Textarea } from "./textarea";
|
|
6
|
+
var Input = InternalInput;
|
|
7
|
+
Input.Password = InputPassword;
|
|
8
|
+
Input.OPT = InputOPT;
|
|
9
|
+
Input.Textarea = Textarea;
|
|
10
|
+
export * from "./types";
|
|
11
|
+
export { InputAffixWrapper };
|
|
2
12
|
export default Input;
|