@trionesdev/antd-mobile-react 0.0.2-beta.0 → 0.0.2-beta.2

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 (60) hide show
  1. package/LICENSE +21 -21
  2. package/dist/Avatar/demo/base.js +2 -2
  3. package/dist/Avatar/demo/style.scss +6 -6
  4. package/dist/Badge/demo/base.js +2 -2
  5. package/dist/Badge/demo/base.scss +6 -6
  6. package/dist/Button/demo/base.js +2 -2
  7. package/dist/Button/style.scss +232 -231
  8. package/dist/Calendar/calendar-grid.js +2 -2
  9. package/dist/Calendar/calendar-range.js +2 -2
  10. package/dist/Calendar/style.scss +85 -85
  11. package/dist/Calendar/touchable-calendar-grid.js +9 -9
  12. package/dist/CalendarDatetimePicker/style.scss +54 -54
  13. package/dist/CalendarPicker/style.scss +31 -31
  14. package/dist/Card/demo/base.js +2 -2
  15. package/dist/Card/demo/base.scss +18 -18
  16. package/dist/Checkbox/demo/base.js +2 -2
  17. package/dist/ConfigProvider/demo/base.js +2 -2
  18. package/dist/DemoBlock/index.scss +20 -20
  19. package/dist/DemoDescription/index.scss +3 -3
  20. package/dist/Divider/demo/base.js +2 -2
  21. package/dist/Ellipsis/demo/base.js +2 -2
  22. package/dist/Empty/demo/base.js +2 -2
  23. package/dist/ErrorBlock/demo/base.js +2 -2
  24. package/dist/Footer/demo/base.js +2 -2
  25. package/dist/Grid/demo/base.js +2 -2
  26. package/dist/Grid/demo/base.scss +7 -7
  27. package/dist/Icon/demo/base.js +4 -4
  28. package/dist/Image/demo/base.js +2 -2
  29. package/dist/Image/demo/base.scss +4 -4
  30. package/dist/Image/style.scss +30 -30
  31. package/dist/ImagesPreview/style.scss +34 -34
  32. package/dist/ImagesWall/ImagesWall.js +1 -1
  33. package/dist/ImagesWall/style.scss +70 -70
  34. package/dist/Input/demo/base.js +2 -2
  35. package/dist/NavBar/demo/base.scss +5 -5
  36. package/dist/NoticeBar/demo/base.js +2 -2
  37. package/dist/PageIndicator/demo/base.js +2 -2
  38. package/dist/Popup/demo/base.js +2 -2
  39. package/dist/Progress/style.scss +33 -33
  40. package/dist/Radio/demo/base.scss +4 -4
  41. package/dist/Result/demo/base.js +2 -2
  42. package/dist/SafeArea/demo/base.scss +18 -18
  43. package/dist/SideBar/side-bar.js +6 -6
  44. package/dist/SideBar/style.scss +85 -85
  45. package/dist/Space/demo/base.js +2 -2
  46. package/dist/Swiper/style.scss +54 -54
  47. package/dist/Switch/demo/base.js +2 -2
  48. package/dist/TabBar/demo/base.js +2 -2
  49. package/dist/Tag/demo/base.js +2 -2
  50. package/dist/Tag/demo/style.scss +8 -8
  51. package/dist/Toast/style.scss +63 -63
  52. package/dist/WaterMark/demo/demo1.js +2 -2
  53. package/dist/WaterMark/demo/demo1.scss +6 -6
  54. package/dist/WaterMark/demo/demo2.js +2 -2
  55. package/dist/style/variable.scss +1 -0
  56. package/dist/utils/type.js +36 -36
  57. package/dist/utils/use-isomorphic-update-layout-effect.d.ts +1 -1
  58. package/dist/utils/with-default-props.js +4 -4
  59. package/package.json +8 -8
  60. package/readme.md +43 -43
@@ -1,85 +1,85 @@
1
- @import "@trionesdev/antd-mobile-base-react/dist/style/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: $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
- &-disabled {
38
- color: #999999;
39
- }
40
-
41
- &-selected {
42
- background-color: $trionesColorPrimary;
43
- color: white;
44
- }
45
-
46
- &-selected-range {
47
- border-radius: 0;
48
- background-color: $trionesColorPrimaryBg;
49
- color: black;
50
- }
51
- }
52
- }
53
-
54
- .#{$calendarCls} {
55
- &-header {
56
- display: flex;
57
- justify-content: space-between;
58
- align-items: center;
59
-
60
- &-title {
61
- font-size: 16Px;
62
- padding: 8Px;
63
- text-align: center;
64
- }
65
-
66
- &-button {
67
- padding-left: 12Px;
68
- padding-right: 12Px;
69
- cursor: pointer;
70
- }
71
- }
72
-
73
- &-week {
74
- display: grid;
75
- grid-template-columns: repeat(7, 1fr);
76
-
77
- &-cell {
78
- display: flex;
79
- justify-content: center;
80
- align-items: center;
81
- padding-top: 8Px;
82
- padding-bottom: 8Px;
83
- }
84
- }
85
- }
1
+ @use "../style/variable" as *;
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: $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
+ &-disabled {
38
+ color: #999999;
39
+ }
40
+
41
+ &-selected {
42
+ background-color: $trionesColorPrimary;
43
+ color: white;
44
+ }
45
+
46
+ &-selected-range {
47
+ border-radius: 0;
48
+ background-color: $trionesColorPrimaryBg;
49
+ color: black;
50
+ }
51
+ }
52
+ }
53
+
54
+ .#{$calendarCls} {
55
+ &-header {
56
+ display: flex;
57
+ justify-content: space-between;
58
+ align-items: center;
59
+
60
+ &-title {
61
+ font-size: 16Px;
62
+ padding: 8Px;
63
+ text-align: center;
64
+ }
65
+
66
+ &-button {
67
+ padding-left: 12Px;
68
+ padding-right: 12Px;
69
+ cursor: pointer;
70
+ }
71
+ }
72
+
73
+ &-week {
74
+ display: grid;
75
+ grid-template-columns: repeat(7, 1fr);
76
+
77
+ &-cell {
78
+ display: flex;
79
+ justify-content: center;
80
+ align-items: center;
81
+ padding-top: 8Px;
82
+ padding-bottom: 8Px;
83
+ }
84
+ }
85
+ }
@@ -16,8 +16,8 @@ import React, { memo, useEffect, useRef, useState } from 'react';
16
16
  import { CalendarGrid } from "../Calendar";
17
17
  import { RandomUtils } from "../utils/random-utils";
18
18
  import classNames from "classnames";
19
- /**
20
- * 可以手势滑动的日历组件
19
+ /**
20
+ * 可以手势滑动的日历组件
21
21
  */
22
22
  export var TouchableCalendarGrid = /*#__PURE__*/memo(function (_ref) {
23
23
  var _wrapperRef$current3;
@@ -60,8 +60,8 @@ export var TouchableCalendarGrid = /*#__PURE__*/memo(function (_ref) {
60
60
  mouths = _useState10[0],
61
61
  setMouths = _useState10[1];
62
62
 
63
- /**
64
- * 计算出每个格子的大小
63
+ /**
64
+ * 计算出每个格子的大小
65
65
  */
66
66
  var cellSize = /*#__PURE__*/function () {
67
67
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
@@ -80,8 +80,8 @@ export var TouchableCalendarGrid = /*#__PURE__*/memo(function (_ref) {
80
80
  return _ref2.apply(this, arguments);
81
81
  };
82
82
  }();
83
- /**
84
- * 计算出最大的translateY,默认为wrapperRef.current?.clientHeight
83
+ /**
84
+ * 计算出最大的translateY,默认为wrapperRef.current?.clientHeight
85
85
  */
86
86
  var minTranslateY = /*#__PURE__*/function () {
87
87
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
@@ -101,9 +101,9 @@ export var TouchableCalendarGrid = /*#__PURE__*/memo(function (_ref) {
101
101
  };
102
102
  }();
103
103
 
104
- /**
105
- * 计算出该月的行数
106
- * @param mouth
104
+ /**
105
+ * 计算出该月的行数
106
+ * @param mouth
107
107
  */
108
108
  var mouthLines = function mouthLines(mouth) {
109
109
  var firstDate = new Date(mouth.getFullYear(), mouth.getMonth(), 1);
@@ -1,54 +1,54 @@
1
- @import "@trionesdev/antd-mobile-base-react/dist/style/variable";
2
-
3
- $calendarDatetimePickerCls: 'triones-antm-calendar-datetime-picker';
4
-
5
- .#{$calendarDatetimePickerCls} {
6
- border-top-left-radius: $trionesBorderRadius;
7
- border-top-right-radius: $trionesBorderRadius;
8
-
9
- &-header {
10
- display: flex;
11
- justify-content: space-between;
12
- border-bottom: 1Px solid $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: $trionesColorText;
35
- font-weight: bold;
36
- background-color: $trionesColorBgTextActive;
37
- }
38
- }
39
-
40
- &-button {
41
- padding: 12Px 16Px;
42
-
43
- &-cancel {
44
- }
45
-
46
- &-ok {
47
- color: $trionesColorPrimary;
48
- }
49
- }
50
- }
51
- &-body {
52
-
53
- }
54
- }
1
+ @use "../style/variable" as *;
2
+
3
+ $calendarDatetimePickerCls: 'triones-antm-calendar-datetime-picker';
4
+
5
+ .#{$calendarDatetimePickerCls} {
6
+ border-top-left-radius: $trionesBorderRadius;
7
+ border-top-right-radius: $trionesBorderRadius;
8
+
9
+ &-header {
10
+ display: flex;
11
+ justify-content: space-between;
12
+ border-bottom: 1Px solid $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: $trionesColorText;
35
+ font-weight: bold;
36
+ background-color: $trionesColorBgTextActive;
37
+ }
38
+ }
39
+
40
+ &-button {
41
+ padding: 12Px 16Px;
42
+
43
+ &-cancel {
44
+ }
45
+
46
+ &-ok {
47
+ color: $trionesColorPrimary;
48
+ }
49
+ }
50
+ }
51
+ &-body {
52
+
53
+ }
54
+ }
@@ -1,31 +1,31 @@
1
- @import "@trionesdev/antd-mobile-base-react/dist/style/variable";
2
-
3
- $calendarPickerCls: 'triones-antm-calendar-picker';
4
-
5
- .#{$calendarPickerCls} {
6
- border-top-left-radius: $trionesBorderRadius;
7
- border-top-right-radius: $trionesBorderRadius;
8
-
9
- &-header {
10
- display: flex;
11
- justify-content: space-between;
12
- border-bottom: 1Px solid $trionesBorderColor;
13
- padding: 4Px;
14
- &-button {
15
- padding: 8Px 12Px;
16
-
17
- &-cancel {
18
- }
19
-
20
- &-ok {
21
- color: $trionesColorPrimary;
22
- }
23
- }
24
-
25
-
26
- }
27
-
28
- &-body {
29
- pointer-events: unset;
30
- }
31
- }
1
+ @use "../style/variable" as *;
2
+
3
+ $calendarPickerCls: 'triones-antm-calendar-picker';
4
+
5
+ .#{$calendarPickerCls} {
6
+ border-top-left-radius: $trionesBorderRadius;
7
+ border-top-right-radius: $trionesBorderRadius;
8
+
9
+ &-header {
10
+ display: flex;
11
+ justify-content: space-between;
12
+ border-bottom: 1Px solid $trionesBorderColor;
13
+ padding: 4Px;
14
+ &-button {
15
+ padding: 8Px 12Px;
16
+
17
+ &-cancel {
18
+ }
19
+
20
+ &-ok {
21
+ color: $trionesColorPrimary;
22
+ }
23
+ }
24
+
25
+
26
+ }
27
+
28
+ &-body {
29
+ pointer-events: unset;
30
+ }
31
+ }
@@ -1,5 +1,5 @@
1
- /**
2
- * compact: true
1
+ /**
2
+ * compact: true
3
3
  */
4
4
  import classNames from 'classnames';
5
5
  import React from 'react';
@@ -1,18 +1,18 @@
1
- $class-prefix-card: 'card-demo';
2
-
3
- .#{$class-prefix-card} {
4
- &-content {
5
- height: 50px;
6
- }
7
- &-footer {
8
- padding-top: 11px;
9
- border-top: 1px solid #e5e5e5;
10
- display: flex;
11
- justify-content: flex-end;
12
- }
13
-
14
- &-customBody {
15
- color: green;
16
- }
17
-
18
- }
1
+ $class-prefix-card: 'card-demo';
2
+
3
+ .#{$class-prefix-card} {
4
+ &-content {
5
+ height: 50px;
6
+ }
7
+ &-footer {
8
+ padding-top: 11px;
9
+ border-top: 1px solid #e5e5e5;
10
+ display: flex;
11
+ justify-content: flex-end;
12
+ }
13
+
14
+ &-customBody {
15
+ color: green;
16
+ }
17
+
18
+ }
@@ -1,5 +1,5 @@
1
- /**
2
- * compact: true
1
+ /**
2
+ * compact: true
3
3
  */
4
4
  import React from 'react';
5
5
  import { DemoBlock } from "../../DemoBlock";
@@ -1,5 +1,5 @@
1
- /**
2
- * compact: true
1
+ /**
2
+ * compact: true
3
3
  */
4
4
  import React from 'react';
5
5
  import { DemoBlock } from "../../DemoBlock";
@@ -1,20 +1,20 @@
1
- .demoBlock {
2
- font-size: 14px;
3
- margin-bottom: 12px;
4
- &:last-of-type {
5
- padding-bottom: 32px;
6
- }
7
- scrollbar-width: thin;
8
- }
9
-
10
- .demoTitle {
11
- padding: 12px 12px 8px;
12
- color: #697b8c;
13
- font-size: 14px;
14
- background: #fafbfc;
15
- }
16
-
17
- .demoMain {
18
- border-right: none;
19
- border-left: none;
20
- }
1
+ .demoBlock {
2
+ font-size: 14px;
3
+ margin-bottom: 12px;
4
+ &:last-of-type {
5
+ padding-bottom: 32px;
6
+ }
7
+ scrollbar-width: thin;
8
+ }
9
+
10
+ .demoTitle {
11
+ padding: 12px 12px 8px;
12
+ color: #697b8c;
13
+ font-size: 14px;
14
+ background: #fafbfc;
15
+ }
16
+
17
+ .demoMain {
18
+ border-right: none;
19
+ border-left: none;
20
+ }
@@ -1,3 +1,3 @@
1
- .demoDescription {
2
- color: var(--triones-antm-color-weak);
3
- }
1
+ .demoDescription {
2
+ color: var(--triones-antm-color-weak);
3
+ }
@@ -1,5 +1,5 @@
1
- /**
2
- * compact: true
1
+ /**
2
+ * compact: true
3
3
  */
4
4
  import { DemoBlock } from "../../DemoBlock";
5
5
  import React from "react";
@@ -1,5 +1,5 @@
1
- /**
2
- * compact: true
1
+ /**
2
+ * compact: true
3
3
  */
4
4
  import { DemoBlock } from "../../DemoBlock";
5
5
  import React from 'react';
@@ -1,5 +1,5 @@
1
- /**
2
- * compact: true
1
+ /**
2
+ * compact: true
3
3
  */
4
4
  import { QuestionCircleOutline } from "../../../../antd-mobile-icons-react";
5
5
  import { DemoBlock } from "../../DemoBlock";
@@ -1,5 +1,5 @@
1
- /**
2
- * compact: true
1
+ /**
2
+ * compact: true
3
3
  */
4
4
  import { DemoBlock } from "../../DemoBlock";
5
5
  import React from 'react';
@@ -1,5 +1,5 @@
1
- /**
2
- * compact: true
1
+ /**
2
+ * compact: true
3
3
  */
4
4
  import React from 'react';
5
5
  import { DemoBlock } from "../../DemoBlock";
@@ -1,5 +1,5 @@
1
- /**
2
- * compact: true
1
+ /**
2
+ * compact: true
3
3
  */
4
4
  import React from 'react';
5
5
  import { DemoBlock } from "../../DemoBlock";
@@ -1,7 +1,7 @@
1
- .grid-demo-item-block {
2
- border: solid 1px #999;
3
- background: #f5f5f5;
4
- text-align: center;
5
- color: #999;
6
- height: 100%;
7
- }
1
+ .grid-demo-item-block {
2
+ border: solid 1px #999;
3
+ background: #f5f5f5;
4
+ text-align: center;
5
+ color: #999;
6
+ height: 100%;
7
+ }
@@ -1,9 +1,9 @@
1
- /**
2
- * compact: true
1
+ /**
2
+ * compact: true
3
3
  */
4
4
  import React from "react";
5
5
  import * as icons from "../../../../antd-mobile-icons-react";
6
- import _ from "lodash";
6
+ import { omit, map } from "lodash-es";
7
7
  import { DemoBlock } from "../../DemoBlock";
8
8
  export default (function () {
9
9
  return /*#__PURE__*/React.createElement(DemoBlock, {
@@ -16,7 +16,7 @@ export default (function () {
16
16
  gap: 20,
17
17
  flexWrap: 'wrap'
18
18
  }
19
- }, _.map(_.omit(icons, 'Icon'), function (icon, name) {
19
+ }, map(omit(icons, 'Icon'), function (icon, name) {
20
20
  return /*#__PURE__*/React.createElement("div", {
21
21
  key: name,
22
22
  style: {
@@ -1,5 +1,5 @@
1
- /**
2
- * compact: true
1
+ /**
2
+ * compact: true
3
3
  */
4
4
  import { DemoBlock } from "../../DemoBlock";
5
5
  import React from 'react';
@@ -1,4 +1,4 @@
1
- .imagesContainer {
2
- --triones-antm-image-width: 90px;
3
- --triones-antm-image-height: 60px;
4
- }
1
+ .imagesContainer {
2
+ --triones-antm-image-width: 90px;
3
+ --triones-antm-image-height: 60px;
4
+ }
@@ -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
+ }