@trionesdev/antd-mobile-base-react 0.0.2-beta.18 → 0.0.2-beta.19

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/README.md +23 -23
  3. package/dist/Alert/style.scss +69 -69
  4. package/dist/Avatar/style.scss +17 -17
  5. package/dist/Badge/style.scss +100 -100
  6. package/dist/Card/style.scss +35 -35
  7. package/dist/CascaderView/style.scss +22 -22
  8. package/dist/Cell/styles.scss +81 -81
  9. package/dist/Checkbox/index.scss +165 -165
  10. package/dist/DemoBlock/index.scss +20 -20
  11. package/dist/DemoDescription/index.scss +3 -3
  12. package/dist/Descriptions/style.scss +65 -65
  13. package/dist/Divider/style.scss +62 -62
  14. package/dist/Ellipsis/style.scss +13 -13
  15. package/dist/Empty/style.scss +29 -29
  16. package/dist/ErrorBlock/demo/base.js +2 -2
  17. package/dist/ErrorBlock/style.scss +62 -62
  18. package/dist/Footer/style.scss +55 -55
  19. package/dist/Form/styles.scss +11 -11
  20. package/dist/FormCell/styles.scss +103 -103
  21. package/dist/Grid/style.scss +17 -17
  22. package/dist/Icon/demo/base.js +2 -2
  23. package/dist/InputNumber/style.scss +100 -100
  24. package/dist/Loading/DotLoading.d.ts +0 -1
  25. package/dist/Loading/DotLoading.js +0 -1
  26. package/dist/Loading/SpinLoading.d.ts +0 -1
  27. package/dist/Loading/SpinLoading.js +0 -1
  28. package/dist/Loading/index.d.ts +1 -0
  29. package/dist/Loading/index.js +1 -0
  30. package/dist/Loading/{dot-loading.scss → style.scss} +113 -72
  31. package/dist/NavBar/style.scss +65 -64
  32. package/dist/NoticeBar/style.scss +130 -130
  33. package/dist/PageIndicator/style.scss +59 -59
  34. package/dist/Progress/style.scss +33 -33
  35. package/dist/Radio/style.scss +154 -154
  36. package/dist/Rate/style.scss +37 -37
  37. package/dist/Result/demo/base.js +2 -2
  38. package/dist/Result/style.scss +73 -73
  39. package/dist/SafeArea/style.scss +20 -20
  40. package/dist/Scaffold/style.scss +17 -17
  41. package/dist/Segmented/style.scss +75 -75
  42. package/dist/Skeleton/style.scss +215 -215
  43. package/dist/Space/style.scss +101 -101
  44. package/dist/Stepper/style.scss +100 -100
  45. package/dist/Steps/style.scss +153 -153
  46. package/dist/Switch/style.scss +127 -127
  47. package/dist/TabBar/demo/base.js +2 -2
  48. package/dist/TabBar/index.scss +37 -37
  49. package/dist/Tabs/style.scss +108 -108
  50. package/dist/Tag/style.scss +110 -110
  51. package/dist/WaterMark/style.scss +17 -17
  52. package/dist/style/css-variable.scss +6 -6
  53. package/dist/style/style.scss +52 -52
  54. package/dist/style/theme-dark.scss +24 -24
  55. package/dist/style/theme-default.scss +54 -54
  56. package/dist/style/variable.scss +180 -180
  57. package/dist/utils/type.js +36 -36
  58. package/dist/utils/with-default-props.js +4 -4
  59. package/package.json +3 -3
  60. package/dist/Loading/spin-loading.scss +0 -39
@@ -1,17 +1,17 @@
1
- $class-prefix-grid: 'triones-antm-grid';
2
- /* prettier-ignore */
3
- .#{$class-prefix-grid} {
4
- --gap: 0;
5
- --gap-horizontal: var(--gap);
6
- --gap-vertical: var(--gap);
7
-
8
- display: grid;
9
- grid-gap: 10PX;
10
- column-gap: var(--gap-horizontal);
11
- row-gap: var(--gap-vertical);
12
- grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
13
- align-items: stretch;
14
- &-item {
15
- grid-column-end: span var(--item-span);
16
- }
17
- }
1
+ $class-prefix-grid: 'triones-antm-grid';
2
+ /* prettier-ignore */
3
+ .#{$class-prefix-grid} {
4
+ --gap: 0;
5
+ --gap-horizontal: var(--gap);
6
+ --gap-vertical: var(--gap);
7
+
8
+ display: grid;
9
+ grid-gap: 10PX;
10
+ column-gap: var(--gap-horizontal);
11
+ row-gap: var(--gap-vertical);
12
+ grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
13
+ align-items: stretch;
14
+ &-item {
15
+ grid-column-end: span var(--item-span);
16
+ }
17
+ }
@@ -1,5 +1,5 @@
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";
@@ -1,100 +1,100 @@
1
- @use "../style/variable" as variable;
2
-
3
- $trionesInputNumberCls: 'triones-antm-input-number';
4
-
5
- $inputNumberBg: #F5F5F5;
6
- $inputSm: 24Px;
7
- $inputLg: 40Px;
8
- $inputNumberControlHeight: 28Px;
9
-
10
- .#{$trionesInputNumberCls} {
11
- display: inline-flex;
12
- align-items: stretch;
13
- gap: 2Px;
14
- border-radius: variable.$trionesBorderRadiusXs;
15
- overflow: hidden;
16
-
17
- &--block {
18
- display: flex;
19
- width: 100%;
20
-
21
- .#{$trionesInputNumberCls}-input {
22
- flex: 1 1 auto;
23
- min-width: 0;
24
- }
25
- }
26
-
27
- &-input {
28
- display: flex;
29
- align-items: stretch;
30
- flex: 0 1 auto;
31
- min-width: 36Px;
32
- min-height: $inputNumberControlHeight;
33
-
34
- input {
35
- width: 100%;
36
- min-width: 0;
37
- height: 100%;
38
- min-height: $inputNumberControlHeight;
39
- box-sizing: border-box;
40
- margin: 0;
41
- padding: 0 8Px;
42
- border: 0;
43
- border-radius: variable.$trionesBorderRadiusXs;
44
- background-color: $inputNumberBg;
45
- color: variable.$trionesColorText;
46
- font-size: 14Px;
47
- line-height: $inputNumberControlHeight;
48
- text-align: center;
49
- -moz-appearance: textfield;
50
- appearance: textfield;
51
-
52
- &::-webkit-outer-spin-button,
53
- &::-webkit-inner-spin-button {
54
- -webkit-appearance: none;
55
- margin: 0;
56
- }
57
-
58
- &:focus {
59
- outline: none;
60
- }
61
-
62
- &:disabled {
63
- color: variable.$trionesColorTextDisabled;
64
- cursor: not-allowed;
65
- }
66
- }
67
- }
68
-
69
- &-button {
70
- cursor: pointer;
71
- display: flex;
72
- flex-shrink: 0;
73
- font-size: 10Px;
74
- height: $inputNumberControlHeight;
75
- width: $inputNumberControlHeight;
76
- justify-content: center;
77
- align-items: center;
78
- background-color: $inputNumberBg;
79
- border-radius: variable.$trionesBorderRadiusXs;
80
-
81
- &-sm {
82
- width: $inputSm;
83
- height: $inputSm;
84
- }
85
-
86
- &-lg {
87
- width: $inputLg;
88
- height: $inputLg;
89
- }
90
-
91
- &-disabled {
92
- cursor: not-allowed;
93
- color: variable.$trionesColorTextDisabled;
94
- }
95
-
96
- .triones-antm-icon {
97
- font-size: 10Px !important;
98
- }
99
- }
100
- }
1
+ @use "../style/variable" as variable;
2
+
3
+ $trionesInputNumberCls: 'triones-antm-input-number';
4
+
5
+ $inputNumberBg: #F5F5F5;
6
+ $inputSm: 24Px;
7
+ $inputLg: 40Px;
8
+ $inputNumberControlHeight: 28Px;
9
+
10
+ .#{$trionesInputNumberCls} {
11
+ display: inline-flex;
12
+ align-items: stretch;
13
+ gap: 2Px;
14
+ border-radius: variable.$trionesBorderRadiusXs;
15
+ overflow: hidden;
16
+
17
+ &--block {
18
+ display: flex;
19
+ width: 100%;
20
+
21
+ .#{$trionesInputNumberCls}-input {
22
+ flex: 1 1 auto;
23
+ min-width: 0;
24
+ }
25
+ }
26
+
27
+ &-input {
28
+ display: flex;
29
+ align-items: stretch;
30
+ flex: 0 1 auto;
31
+ min-width: 36Px;
32
+ min-height: $inputNumberControlHeight;
33
+
34
+ input {
35
+ width: 100%;
36
+ min-width: 0;
37
+ height: 100%;
38
+ min-height: $inputNumberControlHeight;
39
+ box-sizing: border-box;
40
+ margin: 0;
41
+ padding: 0 8Px;
42
+ border: 0;
43
+ border-radius: variable.$trionesBorderRadiusXs;
44
+ background-color: $inputNumberBg;
45
+ color: variable.$trionesColorText;
46
+ font-size: 14Px;
47
+ line-height: $inputNumberControlHeight;
48
+ text-align: center;
49
+ -moz-appearance: textfield;
50
+ appearance: textfield;
51
+
52
+ &::-webkit-outer-spin-button,
53
+ &::-webkit-inner-spin-button {
54
+ -webkit-appearance: none;
55
+ margin: 0;
56
+ }
57
+
58
+ &:focus {
59
+ outline: none;
60
+ }
61
+
62
+ &:disabled {
63
+ color: variable.$trionesColorTextDisabled;
64
+ cursor: not-allowed;
65
+ }
66
+ }
67
+ }
68
+
69
+ &-button {
70
+ cursor: pointer;
71
+ display: flex;
72
+ flex-shrink: 0;
73
+ font-size: 10Px;
74
+ height: $inputNumberControlHeight;
75
+ width: $inputNumberControlHeight;
76
+ justify-content: center;
77
+ align-items: center;
78
+ background-color: $inputNumberBg;
79
+ border-radius: variable.$trionesBorderRadiusXs;
80
+
81
+ &-sm {
82
+ width: $inputSm;
83
+ height: $inputSm;
84
+ }
85
+
86
+ &-lg {
87
+ width: $inputLg;
88
+ height: $inputLg;
89
+ }
90
+
91
+ &-disabled {
92
+ cursor: not-allowed;
93
+ color: variable.$trionesColorTextDisabled;
94
+ }
95
+
96
+ .triones-antm-icon {
97
+ font-size: 10Px !important;
98
+ }
99
+ }
100
+ }
@@ -1,5 +1,4 @@
1
1
  import React, { FC } from 'react';
2
- import './dot-loading.scss';
3
2
  export type DotLoadingProps = {
4
3
  className?: string;
5
4
  style?: React.CSSProperties;
@@ -6,7 +6,6 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
6
6
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
7
  import classNames from 'classnames';
8
8
  import React, { memo, useMemo } from 'react';
9
- import "./dot-loading.scss";
10
9
  var dotLoadingCls = 'triones-antm-dot-loading';
11
10
  export var DotLoading = /*#__PURE__*/memo(function (_ref) {
12
11
  var className = _ref.className,
@@ -1,5 +1,4 @@
1
1
  import { FC } from 'react';
2
- import './spin-loading.scss';
3
2
  export type SpinLoadingProps = {
4
3
  size?: 'small' | 'middle' | 'large' | number;
5
4
  color?: 'default' | 'primary' | 'white' | string;
@@ -6,7 +6,6 @@ import classNames from 'classnames';
6
6
  import Base64 from 'crypto-js/enc-base64';
7
7
  import Utf8 from 'crypto-js/enc-utf8';
8
8
  import React from 'react';
9
- import "./spin-loading.scss";
10
9
  var spinLoadingCls = 'triones-antm-spin-loading';
11
10
  export function createSvgStr(props) {
12
11
  return "<svg xmlns=\"http://www.w3.org/2000/svg\" style=\"width:100%;height:100%\" viewBox=\"0 0 32 32\">\n <circle r=\"15\" cx=\"16\" cy=\"16\"\n stroke-width=\"2\"\n stroke=\"".concat(props.stroke, "\"\n fill=\"transparent\"\n stroke-linecap=\"round\"\n stroke-dasharray=\"").concat(15 * 3.14159265358979 * 2, "\"\n stroke-dashoffset=\"").concat(15 * 3.14159265358979 * 0.5, "\"></circle>\n </svg>");
@@ -1,4 +1,5 @@
1
1
  import { SpinLoading, SpinLoadingProps } from './SpinLoading';
2
+ import "./style.scss";
2
3
  export { DotLoading } from './DotLoading';
3
4
  export type { DotLoadingProps } from './DotLoading';
4
5
  export type { SpinLoadingProps };
@@ -1,3 +1,4 @@
1
1
  import { SpinLoading } from "./SpinLoading";
2
+ import "./style.scss";
2
3
  export { DotLoading } from "./DotLoading";
3
4
  export { SpinLoading };
@@ -1,72 +1,113 @@
1
- @use "../style/variable" as variable;
2
-
3
- $dotLoadingCls: triones-antm-dot-loading;
4
-
5
- .#{$dotLoadingCls} {
6
- display: inline-flex;
7
- align-items: center;
8
- height: 1em;
9
- vertical-align: -0.125em;
10
- /* 18 / 40 * 1em — horizontal gap between dots in antd-mobile viewBox */
11
- gap: 0.45em;
12
-
13
- &-default {
14
- color: #9D9D9D;
15
- }
16
-
17
- &-primary {
18
- color: variable.$trionesColorPrimary;
19
- }
20
-
21
- &-white {
22
- color: white;
23
- }
24
-
25
- &-dot {
26
- display: block;
27
- flex-shrink: 0;
28
- /* 8×8 in a 40-unit-tall viewBox, height = 1em */
29
- width: 0.2em;
30
- height: 0.2em;
31
- background: currentColor;
32
- //mask-image: var(--dotLoadingMask);
33
- //-webkit-mask-image: var(--dotLoadingMask);
34
- mask-repeat: no-repeat;
35
- -webkit-mask-repeat: no-repeat;
36
- mask-size: 100% 100%;
37
- -webkit-mask-size: 100% 100%;
38
- mask-position: center;
39
- -webkit-mask-position: center;
40
- animation: triones-antm-dot-loading-bounce 2s infinite linear;
41
- animation-fill-mode: backwards;
42
- }
43
-
44
- &-dot-0 {
45
- animation-delay: 0s;
46
- }
47
-
48
- &-dot-1 {
49
- animation-delay: 0.2s;
50
- }
51
-
52
- &-dot-2 {
53
- animation-delay: 0.4s;
54
- }
55
- }
56
-
57
- /* Mirrors antd-mobile SMIL: values 16;6;26;16;16, keyTimes 0;0.1;0.3;0.4;1, viewBox height 40 */
58
- @keyframes triones-antm-dot-loading-bounce {
59
- 0%,
60
- 40%,
61
- 100% {
62
- transform: translateY(0);
63
- }
64
-
65
- 10% {
66
- transform: translateY(-0.25em);
67
- }
68
-
69
- 30% {
70
- transform: translateY(0.25em);
71
- }
72
- }
1
+ @use "../style/variable";
2
+
3
+ $dotLoadingCls: triones-antm-dot-loading;
4
+ $spinLoadingCls: triones-antm-spin-loading;
5
+
6
+ .#{$dotLoadingCls} {
7
+ display: inline-flex;
8
+ align-items: center;
9
+ height: 1em;
10
+ vertical-align: -0.125em;
11
+ /* 18 / 40 * 1em — horizontal gap between dots in antd-mobile viewBox */
12
+ gap: 0.45em;
13
+
14
+ &-default {
15
+ color: #9D9D9D;
16
+ }
17
+
18
+ &-primary {
19
+ color: variable.$trionesColorPrimary;
20
+ }
21
+
22
+ &-white {
23
+ color: white;
24
+ }
25
+
26
+ &-dot {
27
+ display: block;
28
+ flex-shrink: 0;
29
+ /* 8×8 in a 40-unit-tall viewBox, height = 1em */
30
+ width: 0.2em;
31
+ height: 0.2em;
32
+ background: currentColor;
33
+ //mask-image: var(--dotLoadingMask);
34
+ //-webkit-mask-image: var(--dotLoadingMask);
35
+ mask-repeat: no-repeat;
36
+ -webkit-mask-repeat: no-repeat;
37
+ mask-size: 100% 100%;
38
+ -webkit-mask-size: 100% 100%;
39
+ mask-position: center;
40
+ -webkit-mask-position: center;
41
+ animation: triones-antm-dot-loading-bounce 2s infinite linear;
42
+ animation-fill-mode: backwards;
43
+ }
44
+
45
+ &-dot-0 {
46
+ animation-delay: 0s;
47
+ }
48
+
49
+ &-dot-1 {
50
+ animation-delay: 0.2s;
51
+ }
52
+
53
+ &-dot-2 {
54
+ animation-delay: 0.4s;
55
+ }
56
+ }
57
+
58
+ /* Mirrors antd-mobile SMIL: values 16;6;26;16;16, keyTimes 0;0.1;0.3;0.4;1, viewBox height 40 */
59
+ @keyframes triones-antm-dot-loading-bounce {
60
+ 0%,
61
+ 40%,
62
+ 100% {
63
+ transform: translateY(0);
64
+ }
65
+
66
+ 10% {
67
+ transform: translateY(-0.25em);
68
+ }
69
+
70
+ 30% {
71
+ transform: translateY(0.25em);
72
+ }
73
+ }
74
+
75
+
76
+
77
+
78
+ .#{$spinLoadingCls} {
79
+ --size: 32Px;
80
+ width: var(--size);
81
+ height: var(--size);
82
+
83
+ &-default{
84
+ color: #9D9D9D;
85
+ }
86
+ &-primary{
87
+ color: variable.$trionesColorPrimary;
88
+ }
89
+ &-white{
90
+ color: #ffffff;
91
+ }
92
+
93
+ &-spin {
94
+ //color: var(--color);
95
+ display: inline-block;
96
+ height: 100%;
97
+ width: 100%;
98
+ background: currentColor;
99
+ mask-image: var(--maskImage);
100
+ -webkit-mask-image: var(--maskImage);
101
+ animation: adm-spin-loading-rotate 2s infinite linear;
102
+ }
103
+
104
+ }
105
+
106
+ @keyframes adm-spin-loading-rotate {
107
+ from {
108
+ transform: rotate(0deg);
109
+ }
110
+ to {
111
+ transform: rotate(360deg);
112
+ }
113
+ }
@@ -1,64 +1,65 @@
1
- @use "../style/variable" as variable;
2
-
3
- $trionesNavBarColorBg: variable.$trionesColorBorderBg !default;
4
- $trionesNavBarColorText: variable.$trionesColorTextBase !default;
5
-
6
- $class-prefix-nav-bar: 'triones-antm-nav-bar';
7
- /* prettier-ignore */
8
- .#{$class-prefix-nav-bar} {
9
- --height: 45PX;
10
- --border-bottom: none;
11
- display: flex;
12
- align-items: center;
13
- height: var(--height);
14
- border-bottom: var(--border-bottom);
15
- padding: 0 12PX;
16
- white-space: nowrap;
17
- color: $trionesNavBarColorText;
18
- background-color: $trionesNavBarColorBg;
19
-
20
- &-left,
21
- &-right {
22
- flex: 1;
23
- }
24
-
25
- &-title {
26
- flex: auto;
27
- text-align: center;
28
- overflow: hidden;
29
- text-overflow: ellipsis;
30
- }
31
-
32
- &-back {
33
- display: flex;
34
- align-items: center;
35
- margin-right: 16PX;
36
- padding: 6PX 0;
37
- cursor: pointer;
38
-
39
- &-arrow {
40
- font-size: 20PX;
41
- margin-right: 5PX;
42
- display: flex;
43
- align-items: center;
44
- }
45
- }
46
-
47
- &-left {
48
- font-size: var(--triones-antm-font-size-7);
49
- display: flex;
50
- justify-content: flex-start;
51
- align-items: center;
52
- }
53
-
54
- &-title {
55
- justify-content: center;
56
- white-space: nowrap;
57
- font-size: var(--triones-antm-font-size-10);
58
- padding: 0 12PX;
59
- }
60
-
61
- &-right {
62
- text-align: right;
63
- }
64
- }
1
+ @use "../style/variable" as variable;
2
+
3
+ $trionesNavBarColorBg: variable.$trionesColorBorderBg !default;
4
+ $trionesNavBarColorText: variable.$trionesColorTextBase !default;
5
+
6
+ $class-prefix-nav-bar: 'triones-antm-nav-bar';
7
+ /* prettier-ignore */
8
+ .#{$class-prefix-nav-bar} {
9
+ --height: 45PX;
10
+ --border-bottom: none;
11
+ display: flex;
12
+ flex: none;
13
+ align-items: center;
14
+ height: var(--height);
15
+ border-bottom: var(--border-bottom);
16
+ padding: 0 12PX;
17
+ white-space: nowrap;
18
+ color: $trionesNavBarColorText;
19
+ background-color: $trionesNavBarColorBg;
20
+
21
+ &-left,
22
+ &-right {
23
+ flex: 1;
24
+ }
25
+
26
+ &-title {
27
+ flex: auto;
28
+ text-align: center;
29
+ overflow: hidden;
30
+ text-overflow: ellipsis;
31
+ }
32
+
33
+ &-back {
34
+ display: flex;
35
+ align-items: center;
36
+ margin-right: 16PX;
37
+ padding: 6PX 0;
38
+ cursor: pointer;
39
+
40
+ &-arrow {
41
+ font-size: 20PX;
42
+ margin-right: 5PX;
43
+ display: flex;
44
+ align-items: center;
45
+ }
46
+ }
47
+
48
+ &-left {
49
+ font-size: var(--triones-antm-font-size-7);
50
+ display: flex;
51
+ justify-content: flex-start;
52
+ align-items: center;
53
+ }
54
+
55
+ &-title {
56
+ justify-content: center;
57
+ white-space: nowrap;
58
+ font-size: var(--triones-antm-font-size-10);
59
+ padding: 0 12PX;
60
+ }
61
+
62
+ &-right {
63
+ text-align: right;
64
+ }
65
+ }