@trionesdev/antd-mobile-react 0.0.2-beta.2 → 0.0.2-beta.21
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/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/Button/button.d.ts +2 -1
- package/dist/Button/button.js +1 -1
- package/dist/Button/style.scss +41 -39
- package/dist/Calendar/calendar-grid.d.ts +10 -9
- package/dist/Calendar/calendar-grid.js +41 -64
- package/dist/Calendar/calendar-header.d.ts +3 -2
- package/dist/Calendar/calendar-header.js +6 -6
- package/dist/Calendar/calendar-range.d.ts +4 -3
- package/dist/Calendar/calendar-range.js +12 -11
- package/dist/Calendar/calendar.d.ts +5 -4
- package/dist/Calendar/calendar.js +23 -14
- package/dist/Calendar/style.scss +4 -4
- package/dist/Calendar/touchable-calendar-grid.d.ts +6 -5
- package/dist/Calendar/touchable-calendar-grid.js +58 -50
- package/dist/CalendarDatetimePicker/CalendarDatetimePicker.d.ts +3 -2
- package/dist/CalendarDatetimePicker/CalendarDatetimePicker.js +14 -28
- package/dist/CalendarDatetimePicker/DateTimeSwitch.d.ts +3 -2
- package/dist/CalendarDatetimePicker/DateTimeSwitch.js +4 -3
- package/dist/CalendarDatetimePicker/demo/base.js +1 -1
- package/dist/CalendarDatetimePicker/style.scss +9 -9
- package/dist/CalendarDatetimePicker/types.d.ts +1 -1
- package/dist/CalendarDatetimePicker/types.js +1 -1
- package/dist/CalendarDatetimePickerCell/CalendarDatetimePickerCell.d.ts +11 -0
- package/dist/CalendarDatetimePickerCell/CalendarDatetimePickerCell.js +61 -0
- package/dist/{Mask → CalendarDatetimePickerCell}/demo/base.js +9 -15
- package/dist/CalendarDatetimePickerCell/index.d.ts +3 -0
- package/dist/CalendarDatetimePickerCell/index.js +2 -0
- package/dist/CalendarDatetimePickerCell/style.scss +10 -0
- package/dist/CalendarDatetimePickerCell/types.d.ts +1 -0
- package/dist/CalendarDatetimePickerCell/types.js +1 -0
- package/dist/CalendarPicker/calendar-picker.js +2 -2
- package/dist/CalendarPicker/calendar-range-picker.d.ts +4 -4
- package/dist/CalendarPicker/calendar-range-picker.js +11 -9
- package/dist/CalendarPicker/demo/base.js +6 -6
- package/dist/CalendarPicker/index.d.ts +2 -2
- package/dist/CalendarPicker/index.js +3 -3
- package/dist/CalendarPicker/style.scss +5 -5
- package/dist/CalendarPicker/types.d.ts +8 -7
- package/dist/CalendarPickerCell/CalendarPickerCell.d.ts +11 -0
- package/dist/CalendarPickerCell/CalendarPickerCell.js +54 -0
- package/dist/CalendarPickerCell/CalendarRangePickerCell.d.ts +11 -0
- package/dist/CalendarPickerCell/CalendarRangePickerCell.js +56 -0
- package/dist/CalendarPickerCell/demo/base.d.ts +3 -0
- package/dist/CalendarPickerCell/demo/base.js +31 -0
- package/dist/CalendarPickerCell/index.d.ts +8 -0
- package/dist/CalendarPickerCell/index.js +5 -0
- package/dist/CascaderPicker/cascader-picker.d.ts +27 -0
- package/dist/CascaderPicker/cascader-picker.js +90 -0
- package/dist/CascaderPicker/demo/base.js +1 -4
- package/dist/CascaderPicker/index.d.ts +1 -1
- package/dist/CascaderPicker/index.js +1 -1
- package/dist/CascaderPicker/style.scss +45 -0
- package/dist/CascaderPickerCell/CascaderPickerCell.d.ts +21 -0
- package/dist/CascaderPickerCell/CascaderPickerCell.js +70 -0
- package/dist/CascaderPickerCell/demo/base.js +71 -0
- package/dist/CascaderPickerCell/index.d.ts +3 -0
- package/dist/CascaderPickerCell/index.js +2 -0
- package/dist/CascaderPickerCell/style.scss +24 -0
- package/dist/Cell/demo/base.js +41 -2
- package/dist/Checkbox/demo/base.js +9 -4
- package/dist/Checkbox/demo/disabled.js +2 -1
- package/dist/DemoBlock/index.d.ts +6 -0
- package/dist/DemoBlock/index.js +9 -2
- package/dist/FetchPicker/FetchPicker.d.ts +113 -0
- package/dist/FetchPicker/FetchPicker.js +319 -0
- package/dist/FetchPicker/index.d.ts +4 -0
- package/dist/FetchPicker/index.js +3 -0
- package/dist/FetchPicker/styles.scss +118 -0
- package/dist/FloatButton/FloatButton.d.ts +21 -0
- package/dist/FloatButton/FloatButton.js +66 -0
- package/dist/FloatButton/FloatButtonGroup.d.ts +21 -0
- package/dist/FloatButton/FloatButtonGroup.js +120 -0
- package/dist/FloatButton/context.d.ts +13 -0
- package/dist/FloatButton/context.js +2 -0
- package/dist/FloatButton/demo/base.d.ts +3 -0
- package/dist/FloatButton/demo/base.js +10 -0
- package/dist/FloatButton/demo/group.d.ts +3 -0
- package/dist/FloatButton/demo/group.js +20 -0
- package/dist/FloatButton/demo/square.d.ts +3 -0
- package/dist/FloatButton/demo/square.js +12 -0
- package/dist/FloatButton/index.d.ts +10 -0
- package/dist/FloatButton/index.js +5 -0
- package/dist/FloatButton/style.scss +123 -0
- package/dist/Form/FormItem/form-item-content.d.ts +17 -0
- package/dist/Form/FormItem/form-item-content.js +39 -0
- package/dist/Form/FormItem/form-item-label.d.ts +13 -0
- package/dist/Form/FormItem/form-item-label.js +29 -0
- package/dist/Form/FormItem/form-item.d.ts +51 -0
- package/dist/Form/FormItem/form-item.js +74 -0
- package/dist/Form/FormItem/index.d.ts +5 -0
- package/dist/Form/FormItem/index.js +3 -0
- package/dist/Form/demo/input.js +7 -3
- package/dist/Form/demo/vertical.d.ts +3 -0
- package/dist/Form/demo/vertical.js +45 -0
- package/dist/Form/index.d.ts +9 -2
- package/dist/Form/index.js +5 -1
- package/dist/Form/style.scss +106 -0
- package/dist/FormCell/index.d.ts +3 -0
- package/dist/FormCell/index.js +2 -0
- package/dist/ImagesPreview/ImagesPreview.js +2 -2
- package/dist/ImagesWall/CameraModal.js +2 -2
- package/dist/ImagesWall/style.scss +4 -4
- package/dist/Input/base-input.d.ts +13 -0
- package/dist/Input/base-input.js +41 -0
- package/dist/Input/demo/base.js +113 -11
- package/dist/Input/index.d.ts +14 -2
- package/dist/Input/index.js +11 -1
- package/dist/Input/index.scss +240 -0
- package/dist/Input/input-affix-wrapper.d.ts +13 -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 +20 -0
- package/dist/Input/input.js +66 -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/Loading/DotLoading.d.ts +1 -0
- package/dist/Loading/DotLoading.js +1 -0
- package/dist/Loading/SpinLoading.d.ts +1 -0
- package/dist/Loading/SpinLoading.js +1 -0
- package/dist/Loading/demo/base.d.ts +3 -0
- package/dist/{SpinLoading → Loading}/demo/base.js +8 -2
- package/dist/Loading/demo/dot-loading.d.ts +3 -0
- package/dist/Loading/demo/dot-loading.js +25 -0
- package/dist/Loading/index.d.ts +5 -0
- package/dist/Loading/index.js +3 -0
- 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/Overlay/demo/base.js +27 -0
- package/dist/Overlay/index.d.ts +4 -0
- package/dist/Overlay/index.js +3 -0
- package/dist/Overlay/style.scss +20 -0
- package/dist/Picker/index.d.ts +1 -1
- package/dist/Picker/index.js +1 -1
- package/dist/Picker/picker.d.ts +20 -0
- package/dist/Picker/picker.js +94 -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 +107 -25
- 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/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/Segmented/demo/base.d.ts +3 -0
- package/dist/Segmented/demo/base.js +33 -0
- package/dist/Segmented/index.d.ts +3 -0
- package/dist/Segmented/index.js +2 -0
- package/dist/SideBar/index.d.ts +1 -1
- package/dist/SideBar/style.scss +6 -6
- package/dist/Skeleton/demo/base.d.ts +3 -0
- package/dist/Skeleton/demo/base.js +8 -0
- package/dist/Skeleton/index.d.ts +3 -0
- package/dist/Skeleton/index.js +2 -0
- package/dist/Stepper/demo/base.d.ts +3 -0
- package/dist/Stepper/demo/base.js +23 -0
- package/dist/Stepper/index.d.ts +3 -0
- package/dist/Stepper/index.js +2 -0
- package/dist/Swiper/style.scss +1 -1
- 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/index.d.ts +33 -19
- package/dist/index.js +9 -2
- package/dist/types.d.ts +0 -8
- package/dist/types.js +0 -1
- package/dist/utils/dayjs.d.ts +4 -0
- package/dist/utils/dayjs.js +42 -0
- package/dist/utils/use-isomorphic-update-layout-effect.d.ts +1 -1
- package/package.json +11 -16
- 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/SpinLoading/index.d.ts +0 -3
- package/dist/SpinLoading/index.js +0 -2
- /package/dist/{Mask → CalendarDatetimePickerCell}/demo/base.d.ts +0 -0
- /package/dist/{SpinLoading → CascaderPickerCell}/demo/base.d.ts +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
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 React from "react";
|
|
8
|
+
import { DemoBlock } from "../../DemoBlock";
|
|
9
|
+
import Form from "../index";
|
|
10
|
+
import { Input, Switch } from "../../index";
|
|
11
|
+
import Button from "../../Button";
|
|
12
|
+
export default (function () {
|
|
13
|
+
var _Form$useForm = Form.useForm(),
|
|
14
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
15
|
+
form = _Form$useForm2[0];
|
|
16
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DemoBlock, {
|
|
17
|
+
title: "\u6C34\u5E73\u8868\u5355"
|
|
18
|
+
}, /*#__PURE__*/React.createElement(Form, {
|
|
19
|
+
form: form,
|
|
20
|
+
layout: 'vertical'
|
|
21
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
22
|
+
label: "\u7528\u6237\u540D",
|
|
23
|
+
name: "username"
|
|
24
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
25
|
+
placeholder: "\u8BF7\u8F93\u5165\u7528\u6237\u540D"
|
|
26
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
27
|
+
label: "\u8BF4\u660E",
|
|
28
|
+
name: "description"
|
|
29
|
+
}, /*#__PURE__*/React.createElement(Input.Textarea, {
|
|
30
|
+
placeholder: "\u8BF7\u8F93\u5165\u8BF4\u660E"
|
|
31
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
32
|
+
label: "\u662F\u5426",
|
|
33
|
+
name: "married",
|
|
34
|
+
layout: 'horizontal',
|
|
35
|
+
contentAlign: 'end'
|
|
36
|
+
}, /*#__PURE__*/React.createElement(Switch, null))), /*#__PURE__*/React.createElement(Button, {
|
|
37
|
+
type: "primary",
|
|
38
|
+
block: true,
|
|
39
|
+
onClick: function onClick() {
|
|
40
|
+
form.validateFields().then(function (values) {
|
|
41
|
+
console.log(values);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}, "\u63D0\u4EA4")));
|
|
45
|
+
});
|
package/dist/Form/index.d.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
import { Form, FormProps,
|
|
2
|
-
|
|
1
|
+
import { Form as InternalForm, FormProps, FormInstance } from "@trionesdev/antd-mobile-base-react";
|
|
2
|
+
import FormItem, { FormItemProps } from "./FormItem";
|
|
3
|
+
import "./style.scss";
|
|
4
|
+
type InternalFormType = typeof InternalForm;
|
|
5
|
+
type CompoundedComponent = InternalFormType & {
|
|
6
|
+
Item: typeof FormItem;
|
|
7
|
+
};
|
|
8
|
+
declare const Form: CompoundedComponent;
|
|
9
|
+
export type { FormProps, FormItemProps, FormInstance };
|
|
3
10
|
export default Form;
|
package/dist/Form/index.js
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
import { Form } from "@trionesdev/antd-mobile-base-react";
|
|
1
|
+
import { Form as InternalForm } from "@trionesdev/antd-mobile-base-react";
|
|
2
|
+
import FormItem from "./FormItem";
|
|
3
|
+
import "./style.scss";
|
|
4
|
+
var Form = InternalForm;
|
|
5
|
+
Form.Item = FormItem;
|
|
2
6
|
export default Form;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
@use "../style/variable" as variable;
|
|
2
|
+
|
|
3
|
+
$cls-prefix-form: 'triones-antm-form';
|
|
4
|
+
$cls-prefix-form-item: 'triones-antm-form-item';
|
|
5
|
+
|
|
6
|
+
.#{$cls-prefix-form} {
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.#{$cls-prefix-form-item} {
|
|
10
|
+
line-height: 1.5;
|
|
11
|
+
|
|
12
|
+
&-label {
|
|
13
|
+
font-size: variable.$trionesFontSize;
|
|
14
|
+
color: #6F6F6F;
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
&-wrapper {
|
|
18
|
+
height: 100%;
|
|
19
|
+
// height: 1.47059em;
|
|
20
|
+
|
|
21
|
+
//display: flex;
|
|
22
|
+
//align-items: center;
|
|
23
|
+
}
|
|
24
|
+
&-required-mark {
|
|
25
|
+
display: inline-block;
|
|
26
|
+
color: variable.$trionesColorError;
|
|
27
|
+
width: 8Px;
|
|
28
|
+
margin-left: -8Px;
|
|
29
|
+
}
|
|
30
|
+
&-left {
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&-right {
|
|
34
|
+
text-align: right;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
//&-required {
|
|
38
|
+
// display: inline-block;
|
|
39
|
+
// color: red;
|
|
40
|
+
// width: 8Px;
|
|
41
|
+
// margin-left: -8Px;
|
|
42
|
+
//}
|
|
43
|
+
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&-content {
|
|
47
|
+
padding-block: 12Px;
|
|
48
|
+
|
|
49
|
+
&-right {
|
|
50
|
+
text-align: right;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.#{$cls-prefix-form-item} {
|
|
54
|
+
&-error {
|
|
55
|
+
font-size: variable.$trionesFontSizeSm;
|
|
56
|
+
color: variable.$trionesColorError;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&-horizontal {
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: row;
|
|
64
|
+
align-items: stretch;
|
|
65
|
+
|
|
66
|
+
.#{$cls-prefix-form-item} {
|
|
67
|
+
&-label {
|
|
68
|
+
padding-block: 12Px;
|
|
69
|
+
flex-shrink: 1;
|
|
70
|
+
min-width: 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&-content {
|
|
74
|
+
flex: auto 1;
|
|
75
|
+
flex-shrink: 1;
|
|
76
|
+
min-width: 0;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&.#{$cls-prefix-form-item} {
|
|
81
|
+
&-start {
|
|
82
|
+
align-items: flex-start;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&-center {
|
|
86
|
+
align-items: center;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&-vertical {
|
|
92
|
+
.#{$cls-prefix-form-item} {
|
|
93
|
+
&-label {
|
|
94
|
+
margin-bottom: 4Px;
|
|
95
|
+
}
|
|
96
|
+
&-content {
|
|
97
|
+
padding-block-end: 12Px;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&-hidden {
|
|
104
|
+
display: none;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
@@ -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),
|
|
@@ -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,4 +1,4 @@
|
|
|
1
|
-
@use "../style/variable" as
|
|
1
|
+
@use "../style/variable" as variable;
|
|
2
2
|
|
|
3
3
|
$imagesWallCls: 'triones-antm-images-wall';
|
|
4
4
|
|
|
@@ -9,7 +9,7 @@ $imagesWallCls: 'triones-antm-images-wall';
|
|
|
9
9
|
|
|
10
10
|
&-item {
|
|
11
11
|
aspect-ratio: 1;
|
|
12
|
-
border-radius:
|
|
12
|
+
border-radius: variable.$trionesBorderRadius;
|
|
13
13
|
overflow: hidden;
|
|
14
14
|
position: relative;
|
|
15
15
|
|
|
@@ -25,7 +25,7 @@ $imagesWallCls: 'triones-antm-images-wall';
|
|
|
25
25
|
background-color: rgb(0 0 0 / 63%);
|
|
26
26
|
width: 20Px;
|
|
27
27
|
height: 20Px;
|
|
28
|
-
border-bottom-left-radius:
|
|
28
|
+
border-bottom-left-radius: variable.$trionesBorderRadius;
|
|
29
29
|
display: flex;
|
|
30
30
|
justify-content: center;
|
|
31
31
|
align-items: center;
|
|
@@ -59,7 +59,7 @@ $imagesWallCls: 'triones-antm-images-wall';
|
|
|
59
59
|
display: flex;
|
|
60
60
|
justify-content: center;
|
|
61
61
|
align-items: center;
|
|
62
|
-
background-color:
|
|
62
|
+
background-color: variable.$trionesColorBgTextActive;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
&-action-sheet {
|
|
@@ -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
|
@@ -4,26 +4,128 @@
|
|
|
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: "\
|
|
22
|
+
}))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
23
|
+
title: "\u57FA\u7840\u7528\u6CD5\uFF08\u5927\u5C0F\uFF09",
|
|
24
|
+
styles: {
|
|
25
|
+
body: {
|
|
26
|
+
backgroundColor: '#D5D5D5'
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
30
|
+
style: {
|
|
31
|
+
backgroundColor: '#FFFFFF'
|
|
32
|
+
}
|
|
33
|
+
}, /*#__PURE__*/React.createElement(Space, {
|
|
34
|
+
direction: "vertical",
|
|
35
|
+
block: true
|
|
36
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
37
|
+
placeholder: "Large Size",
|
|
38
|
+
size: "large",
|
|
39
|
+
variant: "outlined"
|
|
40
|
+
}), /*#__PURE__*/React.createElement(Input, {
|
|
41
|
+
placeholder: "Middle Size",
|
|
42
|
+
size: "medium",
|
|
43
|
+
variant: 'outlined'
|
|
44
|
+
}), /*#__PURE__*/React.createElement(Input, {
|
|
45
|
+
placeholder: "Small Size",
|
|
46
|
+
size: "small",
|
|
47
|
+
variant: "outlined"
|
|
48
|
+
})))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
49
|
+
title: "\u5E26\u6E05\u9664\u6309\u94AE",
|
|
50
|
+
styles: {
|
|
51
|
+
body: {
|
|
52
|
+
backgroundColor: '#D5D5D5'
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
56
|
+
style: {
|
|
57
|
+
backgroundColor: '#FFFFFF'
|
|
58
|
+
}
|
|
14
59
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
15
60
|
placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9",
|
|
16
61
|
allowClear: true
|
|
17
|
-
})), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
18
|
-
title: "\u5BC6\u7801\u6A21\u5F0F"
|
|
62
|
+
}))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
63
|
+
title: "\u5BC6\u7801\u6A21\u5F0F",
|
|
64
|
+
styles: {
|
|
65
|
+
body: {
|
|
66
|
+
backgroundColor: '#D5D5D5'
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
70
|
+
style: {
|
|
71
|
+
backgroundColor: '#FFFFFF'
|
|
72
|
+
}
|
|
19
73
|
}, /*#__PURE__*/React.createElement(Input.Password, {
|
|
20
74
|
placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9",
|
|
21
75
|
allowClear: true
|
|
22
|
-
})), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
23
|
-
title: "OPT\u6A21\u5F0F"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
76
|
+
}))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
77
|
+
title: "OPT\u6A21\u5F0F",
|
|
78
|
+
styles: {
|
|
79
|
+
body: {
|
|
80
|
+
backgroundColor: '#D5D5D5'
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
84
|
+
style: {
|
|
85
|
+
backgroundColor: '#FFFFFF'
|
|
86
|
+
}
|
|
87
|
+
}, /*#__PURE__*/React.createElement(Input.OPT, null))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
88
|
+
title: "Textarea",
|
|
89
|
+
styles: {
|
|
90
|
+
body: {
|
|
91
|
+
backgroundColor: '#D5D5D5'
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}, /*#__PURE__*/React.createElement(Input.Textarea, {
|
|
27
95
|
placeholder: '请输入内容'
|
|
28
|
-
}))
|
|
96
|
+
})), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
97
|
+
title: "\u53D8\u4F53"
|
|
98
|
+
}, /*#__PURE__*/React.createElement(Space, {
|
|
99
|
+
direction: "vertical",
|
|
100
|
+
block: true
|
|
101
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
102
|
+
variant: "outlined",
|
|
103
|
+
placeholder: "outlined"
|
|
104
|
+
}), /*#__PURE__*/React.createElement(Input, {
|
|
105
|
+
variant: "filled",
|
|
106
|
+
placeholder: "filled"
|
|
107
|
+
}), /*#__PURE__*/React.createElement(Input, {
|
|
108
|
+
variant: "borderless",
|
|
109
|
+
placeholder: "borderless"
|
|
110
|
+
}), /*#__PURE__*/React.createElement(Input, {
|
|
111
|
+
variant: "underlined",
|
|
112
|
+
placeholder: "underlined"
|
|
113
|
+
}))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
114
|
+
title: "\u5C3A\u5BF8"
|
|
115
|
+
}, /*#__PURE__*/React.createElement(Space, {
|
|
116
|
+
direction: "vertical",
|
|
117
|
+
block: true
|
|
118
|
+
}, /*#__PURE__*/React.createElement(Input.Textarea, {
|
|
119
|
+
variant: "outlined",
|
|
120
|
+
placeholder: "outlined"
|
|
121
|
+
}), /*#__PURE__*/React.createElement(Input.Textarea, {
|
|
122
|
+
variant: "filled",
|
|
123
|
+
placeholder: "filled"
|
|
124
|
+
}), /*#__PURE__*/React.createElement(Input.Textarea, {
|
|
125
|
+
variant: "borderless",
|
|
126
|
+
placeholder: "borderless"
|
|
127
|
+
}), /*#__PURE__*/React.createElement(Input.Textarea, {
|
|
128
|
+
variant: "underlined",
|
|
129
|
+
placeholder: "underlined"
|
|
130
|
+
}))));
|
|
29
131
|
});
|
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;
|