@trionesdev/antd-taro-react 0.0.2-beta.15 → 0.0.2-beta.17

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.
Files changed (62) hide show
  1. package/LICENSE +21 -21
  2. package/dist/ActionSheet/style.scss +52 -52
  3. package/dist/Button/button.d.ts +2 -2
  4. package/dist/Button/button.js +2 -3
  5. package/dist/Button/style.scss +246 -235
  6. package/dist/Calendar/style.scss +88 -88
  7. package/dist/Calendar/touchable-calendar-grid.js +9 -9
  8. package/dist/CalendarDatetimePicker/style.scss +62 -62
  9. package/dist/CalendarDatetimePickerCell/CalendarDatetimePickerCell.d.ts +2 -2
  10. package/dist/CalendarDatetimePickerCell/CalendarDatetimePickerCell.js +3 -3
  11. package/dist/CalendarPicker/style.scss +32 -32
  12. package/dist/CalendarPickerCell/CalendarPickerCell.d.ts +2 -2
  13. package/dist/CalendarPickerCell/CalendarPickerCell.js +3 -3
  14. package/dist/CalendarPickerCell/CalendarRangePickerCell.d.ts +2 -2
  15. package/dist/CalendarPickerCell/CalendarRangePickerCell.js +3 -3
  16. package/dist/CascaderPicker/style.scss +45 -45
  17. package/dist/CascaderPickerCell/CascaderPickerCell.d.ts +2 -2
  18. package/dist/CascaderPickerCell/CascaderPickerCell.js +3 -3
  19. package/dist/DatePicker/style.scss +41 -41
  20. package/dist/FetchPicker/FetchPicker.d.ts +113 -0
  21. package/dist/FetchPicker/FetchPicker.js +322 -0
  22. package/dist/FetchPicker/index.d.ts +4 -0
  23. package/dist/FetchPicker/index.js +3 -0
  24. package/dist/FetchPicker/styles.scss +118 -0
  25. package/dist/FloatButton/style.scss +126 -126
  26. package/dist/Form/FormItem/{form-item-input.d.ts → form-item-content.d.ts} +3 -1
  27. package/dist/Form/FormItem/{form-item-input.js → form-item-content.js} +2 -2
  28. package/dist/Form/FormItem/form-item-label.js +2 -8
  29. package/dist/Form/FormItem/form-item.d.ts +3 -2
  30. package/dist/Form/FormItem/form-item.js +23 -19
  31. package/dist/Form/index.d.ts +2 -2
  32. package/dist/Form/style.scss +100 -78
  33. package/dist/FormCell/index.d.ts +3 -0
  34. package/dist/FormCell/index.js +2 -0
  35. package/dist/ImagesPreview/style.scss +34 -34
  36. package/dist/ImagesWall/style.scss +70 -70
  37. package/dist/Input/index.scss +282 -267
  38. package/dist/Input/input-affix-wrapper.js +1 -1
  39. package/dist/Input/taro-input.js +16 -3
  40. package/dist/Input/types.d.ts +3 -3
  41. package/dist/Loading/index.d.ts +4 -0
  42. package/dist/Loading/index.js +3 -0
  43. package/dist/Overlay/style.scss +20 -20
  44. package/dist/Picker/Picker.d.ts +8 -0
  45. package/dist/Picker/Picker.js +6 -7
  46. package/dist/Picker/style.scss +41 -41
  47. package/dist/PickerView/style.scss +13 -13
  48. package/dist/PickerView/types.d.ts +2 -2
  49. package/dist/Popup/style.scss +126 -124
  50. package/dist/SideBar/side-bar.js +6 -6
  51. package/dist/SideBar/style.scss +85 -85
  52. package/dist/Stepper/index.d.ts +3 -0
  53. package/dist/Stepper/index.js +2 -0
  54. package/dist/Toast/style.scss +63 -63
  55. package/dist/VerificationCodeInput/style.scss +20 -20
  56. package/dist/index.d.ts +10 -3
  57. package/dist/index.js +4 -1
  58. package/dist/style/variable.scss +34 -20
  59. package/package.json +20 -24
  60. package/readme.md +23 -23
  61. package/dist/SpinLoading/index.d.ts +0 -3
  62. package/dist/SpinLoading/index.js +0 -2
@@ -1,20 +1,20 @@
1
- @use "../style/variable" as variable;
2
-
3
- $trionesOverlayCls: 'triones-antm-overlay';
4
-
5
- .#{$trionesOverlayCls} {
6
- position: fixed;
7
- top: 0;
8
- left: 0;
9
- right: 0;
10
- bottom: 0;
11
- background-color: rgba(0, 0, 0, .55);
12
- opacity: 0;
13
- transition: opacity 0.3s ease;
14
- pointer-events: none; // 初始状态不可点击
15
-
16
- &-active {
17
- opacity: 1;
18
- pointer-events: auto;
19
- }
20
- }
1
+ @use "../style/variable" as variable;
2
+
3
+ $trionesOverlayCls: 'triones-antm-overlay';
4
+
5
+ .#{$trionesOverlayCls} {
6
+ position: fixed;
7
+ top: 0;
8
+ left: 0;
9
+ right: 0;
10
+ bottom: 0;
11
+ background-color: rgba(0, 0, 0, .55);
12
+ opacity: 0;
13
+ transition: opacity 0.3s ease;
14
+ pointer-events: none; // 初始状态不可点击
15
+
16
+ &-active {
17
+ opacity: 1;
18
+ pointer-events: auto;
19
+ }
20
+ }
@@ -12,8 +12,16 @@ export type PickerProps = {
12
12
  */
13
13
  labelInValue?: boolean;
14
14
  value?: any[];
15
+ round?: boolean;
15
16
  onOk?: (value: any[]) => void;
16
17
  onCancel?: () => void;
17
18
  onClose?: () => void;
19
+ styles?: {
20
+ overlay?: React.CSSProperties;
21
+ container?: React.CSSProperties;
22
+ header?: React.CSSProperties;
23
+ title?: React.CSSProperties;
24
+ body?: React.CSSProperties;
25
+ };
18
26
  };
19
27
  export declare const Picker: FC<PickerProps>;
@@ -21,9 +21,12 @@ export var Picker = /*#__PURE__*/React.memo(function (_ref) {
21
21
  _ref$labelInValue = _ref.labelInValue,
22
22
  labelInValue = _ref$labelInValue === void 0 ? false : _ref$labelInValue,
23
23
  value = _ref.value,
24
+ _ref$round = _ref.round,
25
+ round = _ref$round === void 0 ? true : _ref$round,
24
26
  onOk = _ref.onOk,
25
27
  onCancel = _ref.onCancel,
26
- onClose = _ref.onClose;
28
+ onClose = _ref.onClose,
29
+ styles = _ref.styles;
27
30
  var _ConfigProvider$useCo = ConfigProvider.useConfig(),
28
31
  locale = _ConfigProvider$useCo.locale;
29
32
  var _useState = useState(value || []),
@@ -70,12 +73,8 @@ export var Picker = /*#__PURE__*/React.memo(function (_ref) {
70
73
  onClose: function onClose() {
71
74
  afterOpenChange === null || afterOpenChange === void 0 || afterOpenChange(false);
72
75
  },
73
- styles: {
74
- body: {
75
- borderTopLeftRadius: 6,
76
- borderTopRightRadius: 6
77
- }
78
- }
76
+ round: round,
77
+ styles: styles
79
78
  }, /*#__PURE__*/React.createElement("div", {
80
79
  className: classNames(pickerCls)
81
80
  }, /*#__PURE__*/React.createElement("div", {
@@ -1,41 +1,41 @@
1
- @use "../style/variable" as variable;
2
- $pickerCls: 'triones-antm-picker';
3
-
4
- .#{$pickerCls} {
5
- width: 100%;
6
- height: 300Px;
7
- overflow: hidden;
8
- position: relative;
9
- display: flex;
10
- flex-direction: column;
11
-
12
- &-header {
13
- display: flex;
14
- justify-content: space-between;
15
- align-items: center;
16
- border-bottom: 1Px solid #eee;
17
- padding: 4Px;
18
-
19
- &-button {
20
- padding: 8Px;
21
- font-size: 12Px;
22
- &-cancel{
23
- color: variable.$trionesColorTextSecondary;
24
- }
25
- &-ok{
26
- color: variable.$trionesColorPrimary;
27
- }
28
- }
29
-
30
- &-title {
31
- }
32
- }
33
-
34
- &-body {
35
- flex: 1 1;
36
- width: 100%;
37
- height: 100%;
38
- pointer-events: unset;
39
- }
40
-
41
- }
1
+ @use "../style/variable" as variable;
2
+ $pickerCls: 'triones-antm-picker';
3
+
4
+ .#{$pickerCls} {
5
+ width: 100%;
6
+ height: 300Px;
7
+ overflow: hidden;
8
+ position: relative;
9
+ display: flex;
10
+ flex-direction: column;
11
+
12
+ &-header {
13
+ display: flex;
14
+ justify-content: space-between;
15
+ align-items: center;
16
+ border-bottom: 1Px solid #eee;
17
+ padding: 4Px;
18
+
19
+ &-button {
20
+ padding: 8Px;
21
+ font-size: 12Px;
22
+ &-cancel{
23
+ color: variable.$trionesColorTextSecondary;
24
+ }
25
+ &-ok{
26
+ color: variable.$trionesColorPrimary;
27
+ }
28
+ }
29
+
30
+ &-title {
31
+ }
32
+ }
33
+
34
+ &-body {
35
+ flex: 1 1;
36
+ width: 100%;
37
+ height: 100%;
38
+ pointer-events: unset;
39
+ }
40
+
41
+ }
@@ -1,13 +1,13 @@
1
- $pickerViewCls: 'triones-antm-picker-view';
2
- .#{$pickerViewCls}{
3
- &-column{
4
- &-item{
5
- flex-shrink: 0;
6
- display: flex;
7
- align-items: center;
8
- justify-content: center;
9
- height: 32Px;
10
- box-sizing: border-box;
11
- }
12
- }
13
- }
1
+ $pickerViewCls: 'triones-antm-picker-view';
2
+ .#{$pickerViewCls}{
3
+ &-column{
4
+ &-item{
5
+ flex-shrink: 0;
6
+ display: flex;
7
+ align-items: center;
8
+ justify-content: center;
9
+ height: 32Px;
10
+ box-sizing: border-box;
11
+ }
12
+ }
13
+ }
@@ -1,8 +1,8 @@
1
1
  import React from "react";
2
2
  export declare const pickerViewCls = "triones-antm-picker-view";
3
3
  export type PickerColumnOption = {
4
- label?: string;
5
- value?: string;
4
+ label?: React.ReactNode;
5
+ value?: any;
6
6
  };
7
7
  export type PickerViewProps = {
8
8
  className?: string;
@@ -1,124 +1,126 @@
1
- @use "../style/variable" as variable;
2
-
3
- $trionesPopupCls: 'triones-antm-popup';
4
-
5
- .#{$trionesPopupCls} {
6
- position: fixed;
7
- top: 0;
8
- bottom: 0;
9
- left: 0;
10
- right: 0;
11
- touch-action: none;
12
- pointer-events: none;
13
- opacity: 0;
14
- transition: opacity 0.3s ease;
15
-
16
- &-open {
17
- pointer-events: auto;
18
- opacity: 1;
19
- }
20
-
21
- &-overlay {
22
- width: 100%;
23
- height: 100%;
24
- background-color: rgba(0, 0, 0, .55);
25
- }
26
-
27
- &-container {
28
- position: fixed;
29
- overflow: hidden;
30
- background-color: white;
31
- display: flex;
32
- flex-direction: column;
33
- }
34
-
35
-
36
- &-header {
37
- display: flex;
38
- align-items: center;
39
- padding-block: variable.$trionesPaddingContentVertical;
40
- padding-inline: variable.$trionesPaddingContentHorizontal;
41
- &-title{
42
- flex: 1;
43
- text-align: center;
44
- font-size: variable.$trionesFontSizeLg;
45
- }
46
- }
47
-
48
- &-body{
49
- flex: 1;
50
- }
51
-
52
- &-top {
53
- top: 0;
54
- left: 0;
55
- right: 0;
56
- max-height: 100%;
57
-
58
-
59
- &.#{$trionesPopupCls} {
60
- &-round {
61
- border-bottom-left-radius: variable.$trionesBorderRadius;
62
- border-bottom-right-radius: variable.$trionesBorderRadius;
63
- }
64
- }
65
- }
66
-
67
- &-bottom {
68
- bottom: 0;
69
- left: 0;
70
- right: 0;
71
- max-height: 100%;
72
-
73
-
74
- &.#{$trionesPopupCls} {
75
- &-round {
76
- border-top-left-radius: variable.$trionesBorderRadius;
77
- border-top-right-radius: variable.$trionesBorderRadius;
78
- }
79
- }
80
- }
81
-
82
- &-left {
83
- top: 0;
84
- bottom: 0;
85
- left: 0;
86
- max-width: 100%;
87
-
88
- &.#{$trionesPopupCls} {
89
- &-round {
90
- border-top-right-radius: variable.$trionesBorderRadius;
91
- border-bottom-right-radius: variable.$trionesBorderRadius;
92
- }
93
- }
94
- }
95
-
96
- &-right {
97
- top: 0;
98
- bottom: 0;
99
- right: 0;
100
- max-width: 100%;
101
-
102
- &.#{$trionesPopupCls} {
103
- &-round {
104
- border-top-left-radius: variable.$trionesBorderRadius;
105
- border-bottom-left-radius: variable.$trionesBorderRadius;
106
- }
107
- }
108
- }
109
-
110
- &-center {
111
- top: 50%;
112
- left: 50%;
113
- transform: translate(-50%, -50%);
114
- max-width: 100%;
115
- max-height: 100%;
116
-
117
- &.#{$trionesPopupCls} {
118
- &-round {
119
- border-radius: variable.$trionesBorderRadius;
120
- }
121
- }
122
- }
123
-
124
- }
1
+ @use "../style/variable" as variable;
2
+
3
+ $trionesPopupCls: 'triones-antm-popup';
4
+
5
+ .#{$trionesPopupCls} {
6
+ position: fixed;
7
+ top: 0;
8
+ bottom: 0;
9
+ left: 0;
10
+ right: 0;
11
+ touch-action: none;
12
+ pointer-events: none;
13
+ opacity: 0;
14
+ transition: opacity 0.3s ease;
15
+
16
+ &-open {
17
+ pointer-events: auto;
18
+ opacity: 1;
19
+ }
20
+
21
+ &-overlay {
22
+ width: 100%;
23
+ height: 100%;
24
+ background-color: rgba(0, 0, 0, .55);
25
+ }
26
+
27
+ &-container {
28
+ position: fixed;
29
+ overflow: hidden;
30
+ background-color: white;
31
+ display: flex;
32
+ flex-direction: column;
33
+ }
34
+
35
+
36
+ &-header {
37
+ display: flex;
38
+ align-items: center;
39
+ padding-block: variable.$trionesPaddingContentVertical;
40
+ padding-inline: variable.$trionesPaddingContentHorizontal;
41
+ border-bottom: 1px solid variable.$trionesBorderColor;
42
+ &-title{
43
+ flex: 1;
44
+ text-align: center;
45
+ font-size: variable.$trionesFontSizeLg;
46
+ }
47
+ }
48
+
49
+ &-body{
50
+ min-height: 0;
51
+ flex: 1;
52
+ }
53
+
54
+ &-top {
55
+ top: 0;
56
+ left: 0;
57
+ right: 0;
58
+ max-height: 100%;
59
+
60
+
61
+ &.#{$trionesPopupCls} {
62
+ &-round {
63
+ border-bottom-left-radius: variable.$trionesBorderRadius;
64
+ border-bottom-right-radius: variable.$trionesBorderRadius;
65
+ }
66
+ }
67
+ }
68
+
69
+ &-bottom {
70
+ bottom: 0;
71
+ left: 0;
72
+ right: 0;
73
+ max-height: 100%;
74
+
75
+
76
+ &.#{$trionesPopupCls} {
77
+ &-round {
78
+ border-top-left-radius: variable.$trionesBorderRadius;
79
+ border-top-right-radius: variable.$trionesBorderRadius;
80
+ }
81
+ }
82
+ }
83
+
84
+ &-left {
85
+ top: 0;
86
+ bottom: 0;
87
+ left: 0;
88
+ max-width: 100%;
89
+
90
+ &.#{$trionesPopupCls} {
91
+ &-round {
92
+ border-top-right-radius: variable.$trionesBorderRadius;
93
+ border-bottom-right-radius: variable.$trionesBorderRadius;
94
+ }
95
+ }
96
+ }
97
+
98
+ &-right {
99
+ top: 0;
100
+ bottom: 0;
101
+ right: 0;
102
+ max-width: 100%;
103
+
104
+ &.#{$trionesPopupCls} {
105
+ &-round {
106
+ border-top-left-radius: variable.$trionesBorderRadius;
107
+ border-bottom-left-radius: variable.$trionesBorderRadius;
108
+ }
109
+ }
110
+ }
111
+
112
+ &-center {
113
+ top: 50%;
114
+ left: 50%;
115
+ transform: translate(-50%, -50%);
116
+ max-width: 100%;
117
+ max-height: 100%;
118
+
119
+ &.#{$trionesPopupCls} {
120
+ &-round {
121
+ border-radius: variable.$trionesBorderRadius;
122
+ }
123
+ }
124
+ }
125
+
126
+ }
@@ -106,8 +106,8 @@ var SideBarContent = /*#__PURE__*/memo(function (_ref2) {
106
106
  };
107
107
  }();
108
108
 
109
- /**
110
- * 计算当前页顶部,距离可滚动区域顶部的距离
109
+ /**
110
+ * 计算当前页顶部,距离可滚动区域顶部的距离
111
111
  */
112
112
  var computeReactiveOffsetTop = /*#__PURE__*/function () {
113
113
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
@@ -153,8 +153,8 @@ var SideBarContent = /*#__PURE__*/memo(function (_ref2) {
153
153
  };
154
154
  }();
155
155
 
156
- /**
157
- * 计算当前页底部,距离可滚动区域顶部的距离
156
+ /**
157
+ * 计算当前页底部,距离可滚动区域顶部的距离
158
158
  */
159
159
  var computeReactiveOffsetBottom = /*#__PURE__*/function () {
160
160
  var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
@@ -232,8 +232,8 @@ var SideBarContent = /*#__PURE__*/memo(function (_ref2) {
232
232
  }
233
233
  }, [activeKey]);
234
234
 
235
- /**
236
- * 监听滚动变化,只有在人为操作的时候才监听滚动的位置是否需要切换tab,如果是切换tab 引发的滚动则不执行
235
+ /**
236
+ * 监听滚动变化,只有在人为操作的时候才监听滚动的位置是否需要切换tab,如果是切换tab 引发的滚动则不执行
237
237
  */
238
238
  useEffect(function () {
239
239
  if (mode === 'scroll' && manual && scrollDetail !== null && scrollDetail !== void 0 && scrollDetail.manual) {
@@ -1,85 +1,85 @@
1
- @use "../style/variable" as variable;
2
-
3
- $trionesSideBarCls: 'triones-antm-sidebar';
4
-
5
- .#{$trionesSideBarCls} {
6
- display: flex;
7
- height: 100%;
8
-
9
-
10
- &-tabs {
11
- min-width: 0;
12
- background-color: variable.$trionesColorFill;
13
- overflow: auto;
14
- scrollbar-width: thin;
15
- flex-shrink: 0;
16
- }
17
-
18
- &-tab {
19
- cursor: pointer;
20
- padding: variable.$trionesPadding variable.$trionesPadding;
21
- color: variable.$trionesColorTextSecondary;
22
-
23
- &-active {
24
- color: variable.$trionesColorPrimaryText;
25
- background-color: variable.$trionesColorBgBase;
26
- }
27
-
28
- }
29
-
30
- &-content {
31
- flex: 1 auto;
32
- min-width: 0;
33
- overflow: hidden;
34
- //overflow-y: auto;
35
- //scrollbar-width: none;
36
- position: relative;
37
- user-select: none;
38
- touch-action: none;
39
-
40
-
41
- &-wheel {
42
- width: 100%;
43
- cursor: grab;
44
- position: absolute;
45
- }
46
-
47
- &-item {
48
-
49
- &-active {
50
- display: block;
51
- }
52
- }
53
- }
54
-
55
- &-switch-mode {
56
- .#{$trionesSideBarCls} {
57
- &-content {
58
-
59
- &-item {
60
- height: 100%;
61
- display: none;
62
- &-active {
63
- display: block;
64
- }
65
- }
66
- }
67
- }
68
- }
69
-
70
- &-scroll-mode {
71
- .#{$trionesSideBarCls} {
72
- &-content {
73
-
74
- &-item {
75
-
76
-
77
- &-active {
78
- display: block;
79
- }
80
- }
81
- }
82
- }
83
- }
84
-
85
- }
1
+ @use "../style/variable" as variable;
2
+
3
+ $trionesSideBarCls: 'triones-antm-sidebar';
4
+
5
+ .#{$trionesSideBarCls} {
6
+ display: flex;
7
+ height: 100%;
8
+
9
+
10
+ &-tabs {
11
+ min-width: 0;
12
+ background-color: variable.$trionesColorFill;
13
+ overflow: auto;
14
+ scrollbar-width: thin;
15
+ flex-shrink: 0;
16
+ }
17
+
18
+ &-tab {
19
+ cursor: pointer;
20
+ padding: variable.$trionesPadding variable.$trionesPadding;
21
+ color: variable.$trionesColorTextSecondary;
22
+
23
+ &-active {
24
+ color: variable.$trionesColorPrimaryText;
25
+ background-color: variable.$trionesColorBgBase;
26
+ }
27
+
28
+ }
29
+
30
+ &-content {
31
+ flex: 1 auto;
32
+ min-width: 0;
33
+ overflow: hidden;
34
+ //overflow-y: auto;
35
+ //scrollbar-width: none;
36
+ position: relative;
37
+ user-select: none;
38
+ touch-action: none;
39
+
40
+
41
+ &-wheel {
42
+ width: 100%;
43
+ cursor: grab;
44
+ position: absolute;
45
+ }
46
+
47
+ &-item {
48
+
49
+ &-active {
50
+ display: block;
51
+ }
52
+ }
53
+ }
54
+
55
+ &-switch-mode {
56
+ .#{$trionesSideBarCls} {
57
+ &-content {
58
+
59
+ &-item {
60
+ height: 100%;
61
+ display: none;
62
+ &-active {
63
+ display: block;
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }
69
+
70
+ &-scroll-mode {
71
+ .#{$trionesSideBarCls} {
72
+ &-content {
73
+
74
+ &-item {
75
+
76
+
77
+ &-active {
78
+ display: block;
79
+ }
80
+ }
81
+ }
82
+ }
83
+ }
84
+
85
+ }
@@ -0,0 +1,3 @@
1
+ import { Stepper, StepperProps } from "@trionesdev/antd-mobile-base-react";
2
+ export type { StepperProps };
3
+ export default Stepper;
@@ -0,0 +1,2 @@
1
+ import { Stepper } from "@trionesdev/antd-mobile-base-react";
2
+ export default Stepper;