@trionesdev/antd-taro-react 0.0.2-beta.19 → 0.0.2-beta.20

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.
@@ -1,88 +1,88 @@
1
- @use "../style/variable" as variable;
2
-
3
- $calendarCls: 'triones-antm-calendar';
4
-
5
- .#{$calendarCls}-grid {
6
- //display: flex;
7
- //flex-wrap: wrap;
8
- display: grid;
9
- grid-template-columns: repeat(7, 1fr);
10
- }
11
-
12
- .#{$calendarCls}-cell {
13
- aspect-ratio: 1;
14
- display: flex;
15
- justify-content: center;
16
- align-items: center;
17
- border-radius: variable.$trionesBorderRadius;
18
- cursor: default;
19
- flex-direction: column;
20
-
21
- &-date {
22
- display: flex;
23
- width: 100%;
24
- justify-content: center;
25
- align-items: center;
26
- }
27
-
28
- &-mouth {
29
- display: flex;
30
- width: 100%;
31
- justify-content: center;
32
- align-items: center;
33
- font-size: 8Px;
34
- }
35
-
36
- &.#{$calendarCls}-cell {
37
- box-sizing: border-box;
38
- &-disabled {
39
- color: #999999;
40
- }
41
- &-today{
42
- border: 1Px solid variable.$trionesColorPrimary;
43
- }
44
- &-selected {
45
- background-color: variable.$trionesColorPrimary;
46
- color: white;
47
- }
48
-
49
- &-selected-range {
50
- border-radius: 0;
51
- background-color: variable.$trionesColorPrimaryBg;
52
- color: black;
53
- }
54
- }
55
- }
56
-
57
- .#{$calendarCls} {
58
- &-header {
59
- display: flex;
60
- justify-content: space-between;
61
- align-items: center;
62
-
63
- &-title {
64
- font-size: 16Px;
65
- padding: 8Px;
66
- text-align: center;
67
- }
68
-
69
- &-button {
70
- padding-left: 12Px;
71
- padding-right: 12Px;
72
- cursor: pointer;
73
- }
74
- }
75
-
76
- &-week {
77
- display: grid;
78
- grid-template-columns: repeat(7, 1fr);
79
-
80
- &-cell {
81
- display: flex;
82
- justify-content: center;
83
- align-items: center;
84
- padding-top: 8Px;
85
- padding-bottom: 8Px;
86
- }
87
- }
88
- }
1
+ @use "../style/variable" as variable;
2
+
3
+ $calendarCls: 'triones-antm-calendar';
4
+
5
+ .#{$calendarCls}-grid {
6
+ //display: flex;
7
+ //flex-wrap: wrap;
8
+ display: grid;
9
+ grid-template-columns: repeat(7, 1fr);
10
+ }
11
+
12
+ .#{$calendarCls}-cell {
13
+ aspect-ratio: 1;
14
+ display: flex;
15
+ justify-content: center;
16
+ align-items: center;
17
+ border-radius: variable.$trionesBorderRadius;
18
+ cursor: default;
19
+ flex-direction: column;
20
+
21
+ &-date {
22
+ display: flex;
23
+ width: 100%;
24
+ justify-content: center;
25
+ align-items: center;
26
+ }
27
+
28
+ &-mouth {
29
+ display: flex;
30
+ width: 100%;
31
+ justify-content: center;
32
+ align-items: center;
33
+ font-size: 8Px;
34
+ }
35
+
36
+ &.#{$calendarCls}-cell {
37
+ box-sizing: border-box;
38
+ &-disabled {
39
+ color: #999999;
40
+ }
41
+ &-today{
42
+ border: 1Px solid variable.$trionesColorPrimary;
43
+ }
44
+ &-selected {
45
+ background-color: variable.$trionesColorPrimary;
46
+ color: white;
47
+ }
48
+
49
+ &-selected-range {
50
+ border-radius: 0;
51
+ background-color: variable.$trionesColorPrimaryBg;
52
+ color: black;
53
+ }
54
+ }
55
+ }
56
+
57
+ .#{$calendarCls} {
58
+ &-header {
59
+ display: flex;
60
+ justify-content: space-between;
61
+ align-items: center;
62
+
63
+ &-title {
64
+ font-size: 16Px;
65
+ padding: 8Px;
66
+ text-align: center;
67
+ }
68
+
69
+ &-button {
70
+ padding-left: 12Px;
71
+ padding-right: 12Px;
72
+ cursor: pointer;
73
+ }
74
+ }
75
+
76
+ &-week {
77
+ display: grid;
78
+ grid-template-columns: repeat(7, 1fr);
79
+
80
+ &-cell {
81
+ display: flex;
82
+ justify-content: center;
83
+ align-items: center;
84
+ padding-top: 8Px;
85
+ padding-bottom: 8Px;
86
+ }
87
+ }
88
+ }
@@ -21,8 +21,8 @@ import classNames from "classnames";
21
21
  import dayjs from "dayjs";
22
22
  var monthLines = 6;
23
23
 
24
- /**
25
- * 可以手势滑动的日历组件
24
+ /**
25
+ * 可以手势滑动的日历组件
26
26
  */
27
27
  export var TouchableCalendarGrid = /*#__PURE__*/memo(function (_ref) {
28
28
  var _wrapperRef$current3;
@@ -67,8 +67,8 @@ export var TouchableCalendarGrid = /*#__PURE__*/memo(function (_ref) {
67
67
  months = _useState10[0],
68
68
  setMonths = _useState10[1];
69
69
 
70
- /**
71
- * 计算出每个格子的大小
70
+ /**
71
+ * 计算出每个格子的大小
72
72
  */
73
73
  var cellSize = /*#__PURE__*/function () {
74
74
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
@@ -101,8 +101,8 @@ export var TouchableCalendarGrid = /*#__PURE__*/memo(function (_ref) {
101
101
  return _ref2.apply(this, arguments);
102
102
  };
103
103
  }();
104
- /**
105
- * 计算出最大的translateY,默认为wrapperRef.current?.clientHeight
104
+ /**
105
+ * 计算出最大的translateY,默认为wrapperRef.current?.clientHeight
106
106
  */
107
107
  var minTranslateY = /*#__PURE__*/function () {
108
108
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
@@ -136,9 +136,9 @@ export var TouchableCalendarGrid = /*#__PURE__*/memo(function (_ref) {
136
136
  };
137
137
  }();
138
138
 
139
- /**
140
- * 计算出该月的行数
141
- * @param mouth
139
+ /**
140
+ * 计算出该月的行数
141
+ * @param mouth
142
142
  */
143
143
  var mouthLines = function mouthLines(mouth) {
144
144
  var firstDate = dayjs(new Date(mouth.year(), mouth.month(), 1));
@@ -1,62 +1,62 @@
1
- @use "../style/variable" as variable;
2
-
3
- $calendarDatetimePickerCls: 'triones-antm-calendar-datetime-picker';
4
-
5
- .#{$calendarDatetimePickerCls} {
6
- border-top-left-radius: variable.$trionesBorderRadius;
7
- border-top-right-radius: variable.$trionesBorderRadius;
8
-
9
- &-header {
10
- display: flex;
11
- justify-content: space-between;
12
- border-bottom: 1Px solid variable.$trionesBorderColor;
13
-
14
-
15
- &-display {
16
- display: flex;
17
- padding-left: 8Px;
18
-
19
- &-date {
20
- padding-inline: 8Px;
21
- cursor: default;
22
- display: flex;
23
- align-items: center;
24
- }
25
-
26
- &-time {
27
- padding-inline: 12Px;
28
- display: flex;
29
- align-items: center;
30
- cursor: default;
31
- }
32
-
33
- &-active {
34
- color: variable.$trionesColorText;
35
- font-weight: bold;
36
- background-color: variable.$trionesColorBgTextActive;
37
- }
38
- }
39
-
40
- &-button {
41
- padding: 12Px 16Px;
42
-
43
- &-cancel {}
44
-
45
- &-ok {
46
- color: variable.$trionesColorPrimary;
47
- }
48
- }
49
- }
50
-
51
- &-body {
52
- .time-picker {
53
- .time-item {
54
- flex-shrink: 0;
55
- display: flex;
56
- align-items: center;
57
- justify-content: center;
58
- height: 32Px;
59
- }
60
- }
61
- }
62
- }
1
+ @use "../style/variable" as variable;
2
+
3
+ $calendarDatetimePickerCls: 'triones-antm-calendar-datetime-picker';
4
+
5
+ .#{$calendarDatetimePickerCls} {
6
+ border-top-left-radius: variable.$trionesBorderRadius;
7
+ border-top-right-radius: variable.$trionesBorderRadius;
8
+
9
+ &-header {
10
+ display: flex;
11
+ justify-content: space-between;
12
+ border-bottom: 1Px solid variable.$trionesBorderColor;
13
+
14
+
15
+ &-display {
16
+ display: flex;
17
+ padding-left: 8Px;
18
+
19
+ &-date {
20
+ padding-inline: 8Px;
21
+ cursor: default;
22
+ display: flex;
23
+ align-items: center;
24
+ }
25
+
26
+ &-time {
27
+ padding-inline: 12Px;
28
+ display: flex;
29
+ align-items: center;
30
+ cursor: default;
31
+ }
32
+
33
+ &-active {
34
+ color: variable.$trionesColorText;
35
+ font-weight: bold;
36
+ background-color: variable.$trionesColorBgTextActive;
37
+ }
38
+ }
39
+
40
+ &-button {
41
+ padding: 12Px 16Px;
42
+
43
+ &-cancel {}
44
+
45
+ &-ok {
46
+ color: variable.$trionesColorPrimary;
47
+ }
48
+ }
49
+ }
50
+
51
+ &-body {
52
+ .time-picker {
53
+ .time-item {
54
+ flex-shrink: 0;
55
+ display: flex;
56
+ align-items: center;
57
+ justify-content: center;
58
+ height: 32Px;
59
+ }
60
+ }
61
+ }
62
+ }
@@ -1,32 +1,32 @@
1
- @use "../style/variable" as variable;
2
-
3
- $calendarPickerCls: 'triones-antm-calendar-picker';
4
-
5
- .#{$calendarPickerCls} {
6
- border-top-left-radius: variable.$trionesBorderRadius;
7
- border-top-right-radius: variable.$trionesBorderRadius;
8
-
9
- &-header {
10
- display: flex;
11
- justify-content: space-between;
12
- border-bottom: 1Px solid variable.$trionesBorderColor;
13
- padding: 4Px;
14
- &-button {
15
- padding: 8Px 12Px;
16
-
17
- &-cancel{
18
- color: variable.$trionesColorTextSecondary;
19
- }
20
-
21
- &-ok {
22
- color: variable.$trionesColorPrimary;
23
- }
24
- }
25
-
26
-
27
- }
28
-
29
- &-body {
30
- pointer-events: unset;
31
- }
32
- }
1
+ @use "../style/variable" as variable;
2
+
3
+ $calendarPickerCls: 'triones-antm-calendar-picker';
4
+
5
+ .#{$calendarPickerCls} {
6
+ border-top-left-radius: variable.$trionesBorderRadius;
7
+ border-top-right-radius: variable.$trionesBorderRadius;
8
+
9
+ &-header {
10
+ display: flex;
11
+ justify-content: space-between;
12
+ border-bottom: 1Px solid variable.$trionesBorderColor;
13
+ padding: 4Px;
14
+ &-button {
15
+ padding: 8Px 12Px;
16
+
17
+ &-cancel{
18
+ color: variable.$trionesColorTextSecondary;
19
+ }
20
+
21
+ &-ok {
22
+ color: variable.$trionesColorPrimary;
23
+ }
24
+ }
25
+
26
+
27
+ }
28
+
29
+ &-body {
30
+ pointer-events: unset;
31
+ }
32
+ }
@@ -1,45 +1,45 @@
1
- @use "../style/variable" as variable;
2
- $cascaderPickerCls: 'triones-antm-cascader-picker';
3
-
4
- .#{$cascaderPickerCls} {
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 variable.$trionesBorderColor;
17
- padding: 4Px;
18
-
19
- &-button {
20
-
21
- padding: 8Px;
22
- font-size: 12Px;
23
- &-cancel{
24
- color: variable.$trionesColorTextSecondary;
25
- }
26
- &-ok{
27
- color: variable.$trionesColorPrimary;
28
- }
29
- }
30
-
31
- &-title {
32
- }
33
- }
34
-
35
- &-body {
36
- flex: 1 1;
37
- width: 100%;
38
- pointer-events: unset;
39
- overflow: hidden;
40
- }
41
- &-view{
42
- --height: 100%;
43
- }
44
-
45
- }
1
+ @use "../style/variable" as variable;
2
+ $cascaderPickerCls: 'triones-antm-cascader-picker';
3
+
4
+ .#{$cascaderPickerCls} {
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 variable.$trionesBorderColor;
17
+ padding: 4Px;
18
+
19
+ &-button {
20
+
21
+ padding: 8Px;
22
+ font-size: 12Px;
23
+ &-cancel{
24
+ color: variable.$trionesColorTextSecondary;
25
+ }
26
+ &-ok{
27
+ color: variable.$trionesColorPrimary;
28
+ }
29
+ }
30
+
31
+ &-title {
32
+ }
33
+ }
34
+
35
+ &-body {
36
+ flex: 1 1;
37
+ width: 100%;
38
+ pointer-events: unset;
39
+ overflow: hidden;
40
+ }
41
+ &-view{
42
+ --height: 100%;
43
+ }
44
+
45
+ }
@@ -1,41 +1,41 @@
1
- @use "../style/variable" as variable;
2
-
3
- $datePickerCls: 'triones-antm-date-picker';
4
-
5
- .#{$datePickerCls} {
6
- border-top-left-radius: variable.$trionesBorderRadius;
7
- border-top-right-radius: variable.$trionesBorderRadius;
8
-
9
- &-header {
10
- display: flex;
11
- justify-content: space-between;
12
- align-items: center;
13
- padding: 4Px;
14
- border-bottom: 1Px solid variable.$trionesBorderColor;
15
- &-title {
16
- font-size: 16Px;
17
- padding: 8Px;
18
- text-align: center;
19
- }
20
-
21
- &-button {
22
- padding: 8Px 12Px;
23
- cursor: pointer;
24
- &-cancel{
25
- color: variable.$trionesColorTextSecondary;
26
- }
27
- }
28
- }
29
-
30
- &-body {
31
- .time-picker {
32
- .time-item {
33
- flex-shrink: 0;
34
- display: flex;
35
- align-items: center;
36
- justify-content: center;
37
- height: 32Px;
38
- }
39
- }
40
- }
41
- }
1
+ @use "../style/variable" as variable;
2
+
3
+ $datePickerCls: 'triones-antm-date-picker';
4
+
5
+ .#{$datePickerCls} {
6
+ border-top-left-radius: variable.$trionesBorderRadius;
7
+ border-top-right-radius: variable.$trionesBorderRadius;
8
+
9
+ &-header {
10
+ display: flex;
11
+ justify-content: space-between;
12
+ align-items: center;
13
+ padding: 4Px;
14
+ border-bottom: 1Px solid variable.$trionesBorderColor;
15
+ &-title {
16
+ font-size: 16Px;
17
+ padding: 8Px;
18
+ text-align: center;
19
+ }
20
+
21
+ &-button {
22
+ padding: 8Px 12Px;
23
+ cursor: pointer;
24
+ &-cancel{
25
+ color: variable.$trionesColorTextSecondary;
26
+ }
27
+ }
28
+ }
29
+
30
+ &-body {
31
+ .time-picker {
32
+ .time-item {
33
+ flex-shrink: 0;
34
+ display: flex;
35
+ align-items: center;
36
+ justify-content: center;
37
+ height: 32Px;
38
+ }
39
+ }
40
+ }
41
+ }
@@ -1,11 +1,11 @@
1
1
  import React from "react";
2
+ import { PopupProps } from "../Popup";
2
3
  type LabeledValue = {
3
4
  label?: string;
4
5
  value?: string | number;
5
6
  };
6
7
  type PickerValue = string | string[] | number | number[] | LabeledValue | LabeledValue[];
7
- export type FetchPickerProps = {
8
- open?: boolean;
8
+ export type FetchPickerProps = Omit<PopupProps, ''> & {
9
9
  /**
10
10
  * @description 是否全屏
11
11
  * @default false
@@ -21,28 +21,7 @@ export type FetchPickerProps = {
21
21
  * @default 搜索
22
22
  */
23
23
  searchPlaceholder?: string;
24
- height?: number | string;
25
24
  value?: PickerValue;
26
- /**
27
- * @description 是否可返回,fullScreen 为 true 时生效
28
- * @default true
29
- */
30
- backable?: boolean;
31
- /**
32
- * @description 返回按钮图标,fullScreen 为 true 时生效
33
- * @default
34
- */
35
- backIcon?: React.ReactNode;
36
- /**
37
- * @description 是否可关闭,fullScreen 为 true 时生效
38
- * @default true
39
- */
40
- closable?: boolean;
41
- /**
42
- * @description 关闭按钮图标,fullScreen 为 true 时生效
43
- * @default
44
- */
45
- closeIcon?: React.ReactNode;
46
25
  /**
47
26
  * @description 是否多选
48
27
  * @default false
@@ -63,21 +42,7 @@ export type FetchPickerProps = {
63
42
  * @default 确定
64
43
  */
65
44
  okText?: string;
66
- /**
67
- * @description 是否圆角,fullScreen 为 false 时生效
68
- * @default true
69
- */
70
- round?: boolean;
71
- /**
72
- * @description 关闭回调
73
- * @default
74
- */
75
- onClose?: () => void;
76
- /**
77
- * @description 回退回调
78
- * @default
79
- */
80
- onBack?: () => void;
45
+ onCancel?: () => void;
81
46
  onOk?: (value?: PickerValue, option?: any | any[]) => void;
82
47
  /**
83
48
  * @description 请求