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

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 (118) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +23 -23
  3. package/dist/Alert/alert.js +1 -1
  4. package/dist/Alert/style.scss +69 -69
  5. package/dist/Avatar/avatar.d.ts +2 -2
  6. package/dist/Avatar/avatar.js +1 -1
  7. package/dist/Avatar/style.scss +17 -17
  8. package/dist/Badge/style.scss +100 -100
  9. package/dist/Card/style.scss +35 -35
  10. package/dist/CascaderView/cascader-column-item.js +1 -1
  11. package/dist/CascaderView/style.scss +22 -22
  12. package/dist/Cell/CellGroup.js +25 -8
  13. package/dist/Cell/cell.js +20 -37
  14. package/dist/Cell/context.d.ts +4 -2
  15. package/dist/Cell/styles.scss +81 -52
  16. package/dist/Cell/types.d.ts +6 -4
  17. package/dist/Checkbox/checkbox-button.js +1 -1
  18. package/dist/Checkbox/checkbox-group.js +1 -2
  19. package/dist/Checkbox/checkbox-round.js +1 -1
  20. package/dist/Checkbox/index.scss +165 -165
  21. package/dist/ConfigProvider/config-provider.d.ts +1 -0
  22. package/dist/DemoBlock/index.scss +20 -20
  23. package/dist/DemoDescription/index.scss +3 -3
  24. package/dist/Descriptions/style.scss +65 -65
  25. package/dist/Divider/divider.d.ts +1 -1
  26. package/dist/Divider/divider.js +5 -3
  27. package/dist/Divider/style.scss +62 -62
  28. package/dist/Ellipsis/style.scss +13 -13
  29. package/dist/Empty/style.scss +29 -29
  30. package/dist/ErrorBlock/demo/base.js +2 -2
  31. package/dist/ErrorBlock/style.scss +62 -62
  32. package/dist/Footer/style.scss +55 -55
  33. package/dist/Form/ErrorList.d.ts +4 -0
  34. package/dist/Form/ErrorList.js +9 -0
  35. package/dist/Form/context.d.ts +4 -2
  36. package/dist/Form/context.js +2 -1
  37. package/dist/Form/form.d.ts +24 -6
  38. package/dist/Form/form.js +22 -11
  39. package/dist/Form/hooks/useForm.js +1 -8
  40. package/dist/Form/hooks/useFormContext.js +1 -2
  41. package/dist/Form/index.d.ts +6 -3
  42. package/dist/Form/index.js +4 -1
  43. package/dist/Form/styles.scss +11 -0
  44. package/dist/Form/types.d.ts +2 -1
  45. package/dist/FormCell/FormCell.d.ts +21 -0
  46. package/dist/FormCell/FormCell.js +56 -0
  47. package/dist/FormCell/index.d.ts +4 -0
  48. package/dist/FormCell/index.js +3 -0
  49. package/dist/FormCell/styles.scss +103 -0
  50. package/dist/Grid/style.scss +17 -17
  51. package/dist/Icon/demo/base.js +2 -2
  52. package/dist/InputNumber/style.scss +100 -100
  53. package/dist/Loading/DotLoading.d.ts +8 -0
  54. package/dist/Loading/DotLoading.js +33 -0
  55. package/dist/Loading/SpinLoading.js +70 -0
  56. package/dist/Loading/dot-loading.scss +72 -0
  57. package/dist/Loading/index.d.ts +5 -0
  58. package/dist/Loading/index.js +3 -0
  59. package/dist/{SpinLoading → Loading}/spin-loading.scss +39 -40
  60. package/dist/NavBar/nav-bar.js +1 -1
  61. package/dist/NavBar/style.scss +64 -64
  62. package/dist/NoticeBar/style.scss +130 -130
  63. package/dist/PageIndicator/style.scss +59 -59
  64. package/dist/Progress/Progress.js +1 -1
  65. package/dist/Progress/ProgressCircle.js +5 -2
  66. package/dist/Progress/ProgressLine.js +2 -2
  67. package/dist/Progress/style.scss +33 -33
  68. package/dist/Progress/types.d.ts +2 -2
  69. package/dist/Radio/radio.js +1 -1
  70. package/dist/Radio/style.scss +154 -141
  71. package/dist/Rate/rate.js +1 -1
  72. package/dist/Rate/style.scss +37 -37
  73. package/dist/Result/demo/base.js +2 -2
  74. package/dist/Result/style.scss +73 -73
  75. package/dist/Result/use-result-icon.js +1 -1
  76. package/dist/SafeArea/style.scss +20 -20
  77. package/dist/Scaffold/style.scss +17 -17
  78. package/dist/Segmented/style.scss +75 -75
  79. package/dist/Skeleton/Skeleton.d.ts +80 -21
  80. package/dist/Skeleton/Skeleton.js +248 -57
  81. package/dist/Skeleton/index.d.ts +3 -1
  82. package/dist/Skeleton/index.js +2 -1
  83. package/dist/Skeleton/style.scss +215 -48
  84. package/dist/Space/space.js +12 -9
  85. package/dist/Space/style.scss +101 -80
  86. package/dist/Stepper/stepper.js +2 -1
  87. package/dist/Stepper/style.scss +100 -100
  88. package/dist/Steps/HorizontalSteps.js +5 -2
  89. package/dist/Steps/VerticalSteps.js +5 -2
  90. package/dist/Steps/style.scss +153 -153
  91. package/dist/Steps/types.d.ts +2 -0
  92. package/dist/Switch/style.scss +127 -128
  93. package/dist/Switch/switch.d.ts +2 -0
  94. package/dist/Switch/switch.js +6 -5
  95. package/dist/TabBar/demo/base.js +2 -2
  96. package/dist/TabBar/index.scss +37 -37
  97. package/dist/Tabs/style.scss +108 -108
  98. package/dist/Tag/style.scss +110 -109
  99. package/dist/Tag/tag.d.ts +1 -1
  100. package/dist/Tag/tag.js +1 -1
  101. package/dist/WaterMark/style.scss +17 -17
  102. package/dist/index.d.ts +9 -4
  103. package/dist/index.js +4 -2
  104. package/dist/style/css-variable.scss +6 -6
  105. package/dist/style/style.scss +52 -52
  106. package/dist/style/theme-dark.scss +24 -24
  107. package/dist/style/theme-default.scss +54 -54
  108. package/dist/style/variable.scss +180 -173
  109. package/dist/types.d.ts +6 -1
  110. package/dist/utils/type.js +36 -36
  111. package/dist/utils/with-default-props.js +4 -4
  112. package/package.json +4 -7
  113. package/dist/SpinLoading/index.d.ts +0 -3
  114. package/dist/SpinLoading/index.js +0 -2
  115. package/dist/SpinLoading/spin-loading.js +0 -59
  116. package/dist/Tabs/demo/base.d.ts +0 -3
  117. package/dist/Tabs/demo/base.js +0 -59
  118. /package/dist/{SpinLoading/spin-loading.d.ts → Loading/SpinLoading.d.ts} +0 -0
@@ -0,0 +1,4 @@
1
+ import { FormCell, FormCellProps } from "./FormCell";
2
+ import "./styles.scss";
3
+ export type { FormCellProps };
4
+ export default FormCell;
@@ -0,0 +1,3 @@
1
+ import { FormCell } from "./FormCell";
2
+ import "./styles.scss";
3
+ export default FormCell;
@@ -0,0 +1,103 @@
1
+ @use "../style/variable" as variable;
2
+
3
+ $cellCls: 'triones-antm-form-cell';
4
+
5
+ .#{$cellCls} {
6
+ width: 100%;
7
+ display: flex;
8
+ flex-direction: row;
9
+ gap: 4Px;
10
+ align-items: center;
11
+
12
+ &-content {
13
+ flex: 1 auto;
14
+ display: flex;
15
+ align-items: center;
16
+ min-height: 20Px;
17
+ }
18
+
19
+ &-placeholder {
20
+ font-size: variable.$trionesFontSize;
21
+ color: variable.$trionesColorTextPlaceholder;
22
+ //width: 100%;
23
+ }
24
+
25
+ &-extra {
26
+ flex-shrink: 0;
27
+ }
28
+
29
+ &-arrow {
30
+ flex-shrink: 0;
31
+
32
+ .triones-antm-icon {
33
+ color: variable.$trionesColorTextPlaceholder;
34
+ font-size: variable.$trionesFontSize;
35
+ }
36
+ }
37
+
38
+ &-small {
39
+ min-height: 20Px;
40
+ }
41
+
42
+ &-medium {
43
+ //min-height: 32Px;
44
+ }
45
+
46
+ &-large {
47
+ min-height: 40Px;
48
+ }
49
+
50
+ &-start {
51
+ .#{$cellCls} {
52
+ &-content {
53
+ justify-content: flex-start;
54
+ }
55
+ }
56
+ }
57
+
58
+ &-center {
59
+ .#{$cellCls} {
60
+ &-content {
61
+ justify-content: center;
62
+ }
63
+ }
64
+ }
65
+
66
+ &-end {
67
+ .#{$cellCls} {
68
+ &-content {
69
+ justify-content: flex-end;
70
+ }
71
+ }
72
+ }
73
+
74
+ &-borderless {
75
+ border: 0;
76
+ }
77
+
78
+ &-outlined {
79
+ border-radius: variable.$trionesBorderRadius;
80
+ border: 1Px solid variable.$trionesBorderColor;
81
+ padding-inline: 4Px;
82
+ box-sizing: border-box;
83
+ min-height: variable.$trionesControlHeight;
84
+ }
85
+
86
+ &-filled {
87
+ border-radius: variable.$trionesBorderRadius;
88
+ background-color: variable.$trionesColorFillTertiary;
89
+ padding-inline: 4Px;
90
+ box-sizing: border-box;
91
+ border: 0;
92
+ min-height: variable.$trionesControlHeight;
93
+ }
94
+
95
+ &-underlined {
96
+ border-top: 0;
97
+ border-left: 0;
98
+ border-right: 0;
99
+ border-bottom: 1Px solid variable.$trionesBorderColor;
100
+ box-sizing: border-box;
101
+ min-height: variable.$trionesControlHeight;
102
+ }
103
+ }
@@ -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
+ }
@@ -0,0 +1,8 @@
1
+ import React, { FC } from 'react';
2
+ import './dot-loading.scss';
3
+ export type DotLoadingProps = {
4
+ className?: string;
5
+ style?: React.CSSProperties;
6
+ color?: 'default' | 'primary' | 'white' | string;
7
+ };
8
+ export declare const DotLoading: FC<DotLoadingProps>;
@@ -0,0 +1,33 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
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
+ import classNames from 'classnames';
8
+ import React, { memo, useMemo } from 'react';
9
+ import "./dot-loading.scss";
10
+ var dotLoadingCls = 'triones-antm-dot-loading';
11
+ export var DotLoading = /*#__PURE__*/memo(function (_ref) {
12
+ var className = _ref.className,
13
+ styleProp = _ref.style,
14
+ _ref$color = _ref.color,
15
+ colorProp = _ref$color === void 0 ? 'default' : _ref$color;
16
+ var colors = ['default', 'primary', 'white'];
17
+ var rootStyle = useMemo(function () {
18
+ var style = _objectSpread({}, styleProp);
19
+ if (!colors.includes(colorProp)) {
20
+ style.color = colorProp;
21
+ }
22
+ return style;
23
+ }, [colorProp]);
24
+ return /*#__PURE__*/React.createElement("div", {
25
+ className: classNames(className, dotLoadingCls, _defineProperty({}, "".concat(dotLoadingCls, "-").concat(colorProp), colors.includes(colorProp))),
26
+ style: rootStyle
27
+ }, [0, 1, 2].map(function (i) {
28
+ return /*#__PURE__*/React.createElement("i", {
29
+ key: i,
30
+ className: classNames("".concat(dotLoadingCls, "-dot"), "".concat(dotLoadingCls, "-dot-").concat(i))
31
+ });
32
+ }));
33
+ });
@@ -0,0 +1,70 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
4
+ 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); }
5
+ import classNames from 'classnames';
6
+ import Base64 from 'crypto-js/enc-base64';
7
+ import Utf8 from 'crypto-js/enc-utf8';
8
+ import React from 'react';
9
+ import "./spin-loading.scss";
10
+ var spinLoadingCls = 'triones-antm-spin-loading';
11
+ export function createSvgStr(props) {
12
+ 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>");
13
+ }
14
+ export var SpinLoading = function SpinLoading(_ref) {
15
+ var _ref$size = _ref.size,
16
+ size = _ref$size === void 0 ? 'middle' : _ref$size,
17
+ _ref$color = _ref.color,
18
+ colorProp = _ref$color === void 0 ? 'default' : _ref$color;
19
+ var colors = ['default', 'primary', 'white'];
20
+ var computedSize = React.useMemo(function () {
21
+ var resSize = null;
22
+ if (size === 'small') {
23
+ resSize = '24Px';
24
+ } else if (size === 'middle') {
25
+ resSize = '32Px';
26
+ } else if (size === 'large') {
27
+ resSize = '48Px';
28
+ } else {
29
+ resSize = size;
30
+ }
31
+ if (typeof resSize === 'number') {
32
+ return "".concat(resSize, "Px");
33
+ } else {
34
+ return resSize;
35
+ }
36
+ }, [size]);
37
+
38
+ // const computedColor = React.useMemo(() => {
39
+ // if (colorProp === 'default') {
40
+ // return '#9D9D9D';
41
+ // } else if (colorProp === 'primary') {
42
+ // return '#1677ff';
43
+ // } else if (colorProp === 'white') {
44
+ // return '#ffffff';
45
+ // } else {
46
+ // return colorProp;
47
+ // }
48
+ // }, [colorProp]);
49
+
50
+ var completedStyle = React.useMemo(function () {
51
+ var maskImageSvg = createSvgStr({
52
+ stroke: 'currentColor'
53
+ });
54
+ var style = {
55
+ '--size': computedSize,
56
+ // '--color': computedColor,
57
+ '--maskImage': "url(data:image/svg+xml;base64,".concat(Base64.stringify(Utf8.parse(maskImageSvg)), ")")
58
+ };
59
+ if (!colors.includes(colorProp)) {
60
+ style.color = colorProp;
61
+ }
62
+ return style;
63
+ }, [computedSize, colorProp]);
64
+ return /*#__PURE__*/React.createElement("div", {
65
+ className: classNames(spinLoadingCls, _defineProperty({}, "".concat(spinLoadingCls, "-").concat(colorProp), colors.includes(colorProp))),
66
+ style: completedStyle
67
+ }, /*#__PURE__*/React.createElement("i", {
68
+ className: classNames("".concat(spinLoadingCls, "-spin"))
69
+ }));
70
+ };
@@ -0,0 +1,72 @@
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
+ }
@@ -0,0 +1,5 @@
1
+ import { SpinLoading, SpinLoadingProps } from './SpinLoading';
2
+ export { DotLoading } from './DotLoading';
3
+ export type { DotLoadingProps } from './DotLoading';
4
+ export type { SpinLoadingProps };
5
+ export { SpinLoading };
@@ -0,0 +1,3 @@
1
+ import { SpinLoading } from "./SpinLoading";
2
+ export { DotLoading } from "./DotLoading";
3
+ export { SpinLoading };
@@ -1,40 +1,39 @@
1
- $spinLoadingCls: triones-antm-spin-loading;
2
-
3
- .#{$spinLoadingCls} {
4
- --size: 32Px;
5
- --color: #1677ff;
6
- width: var(--size);
7
- height: var(--size);
8
-
9
- &-svg {
10
- width: 100%;
11
- height: 100%;
12
- //animation: adm-spin-loading-rotate 0.8s infinite linear;
13
-
14
- > .#{$spinLoadingCls}-circle {
15
- //stroke: #1677ff;
16
- stroke: var(--color);
17
- }
18
- }
19
-
20
- &-loading {
21
- color: var(--color);
22
- display: inline-block;
23
- height: 100%;
24
- width: 100%;
25
- background: currentColor;
26
- mask-image: var(--maskImage);
27
- -webkit-mask-image: var(--maskImage);
28
- animation: adm-spin-loading-rotate 2s infinite linear;
29
- }
30
-
31
- }
32
-
33
- @keyframes adm-spin-loading-rotate {
34
- from {
35
- transform: rotate(0deg);
36
- }
37
- to {
38
- transform: rotate(360deg);
39
- }
40
- }
1
+ @use "../style/variable" as variable;
2
+ $spinLoadingCls: triones-antm-spin-loading;
3
+
4
+ .#{$spinLoadingCls} {
5
+ --size: 32Px;
6
+ width: var(--size);
7
+ height: var(--size);
8
+
9
+ &-default{
10
+ color: #9D9D9D;
11
+ }
12
+ &-primary{
13
+ color: variable.$trionesColorPrimary;
14
+ }
15
+ &-white{
16
+ color: #ffffff;
17
+ }
18
+
19
+ &-spin {
20
+ //color: var(--color);
21
+ display: inline-block;
22
+ height: 100%;
23
+ width: 100%;
24
+ background: currentColor;
25
+ mask-image: var(--maskImage);
26
+ -webkit-mask-image: var(--maskImage);
27
+ animation: adm-spin-loading-rotate 2s infinite linear;
28
+ }
29
+
30
+ }
31
+
32
+ @keyframes adm-spin-loading-rotate {
33
+ from {
34
+ transform: rotate(0deg);
35
+ }
36
+ to {
37
+ transform: rotate(360deg);
38
+ }
39
+ }
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  import { withNativeProps } from "../utils/native-props";
4
4
  import ConfigProvider from "../ConfigProvider";
5
5
  import { mergeProp, mergeProps } from "../utils/with-default-props";
6
- import { LeftOutline } from "../../../antd-mobile-icons-react";
6
+ import { LeftOutline } from '@trionesdev/antd-mobile-icons-react';
7
7
  import "./style.scss";
8
8
  var classPrefix = "triones-antm-nav-bar";
9
9
  var defaultBackIcon = /*#__PURE__*/React.createElement(LeftOutline, null);