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

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 (226) hide show
  1. package/dist/Alert/alert.js +1 -1
  2. package/dist/Alert/style.scss +17 -17
  3. package/dist/Avatar/avatar.d.ts +4 -1
  4. package/dist/Avatar/avatar.js +19 -6
  5. package/dist/Avatar/style.scss +3 -2
  6. package/dist/Card/style.scss +12 -12
  7. package/dist/CascaderView/cascader-column-item.js +1 -1
  8. package/dist/CascaderView/style.scss +2 -2
  9. package/dist/Cell/CellGroup.js +53 -14
  10. package/dist/Cell/cell.js +52 -15
  11. package/dist/Cell/context.d.ts +19 -0
  12. package/dist/Cell/context.js +2 -0
  13. package/dist/Cell/styles.scss +42 -13
  14. package/dist/Cell/types.d.ts +30 -7
  15. package/dist/Checkbox/checkbox-button.d.ts +6 -2
  16. package/dist/Checkbox/checkbox-button.js +6 -18
  17. package/dist/Checkbox/checkbox-group.js +19 -4
  18. package/dist/Checkbox/checkbox-round.d.ts +8 -0
  19. package/dist/Checkbox/checkbox-round.js +35 -0
  20. package/dist/Checkbox/checkbox.js +49 -34
  21. package/dist/Checkbox/index.d.ts +0 -2
  22. package/dist/Checkbox/index.js +0 -2
  23. package/dist/Checkbox/index.scss +48 -34
  24. package/dist/Checkbox/types.d.ts +11 -1
  25. package/dist/ConfigProvider/config-provider.d.ts +1 -0
  26. package/dist/Descriptions/style.scss +4 -4
  27. package/dist/Divider/divider.d.ts +1 -1
  28. package/dist/Divider/divider.js +5 -3
  29. package/dist/Divider/style.scss +7 -7
  30. package/dist/Form/ErrorList.d.ts +4 -0
  31. package/dist/Form/ErrorList.js +9 -0
  32. package/dist/Form/context.d.ts +5 -2
  33. package/dist/Form/context.js +2 -1
  34. package/dist/Form/form.d.ts +25 -12
  35. package/dist/Form/form.js +25 -13
  36. package/dist/Form/hooks/useForm.js +1 -8
  37. package/dist/Form/hooks/useFormContext.js +1 -2
  38. package/dist/Form/index.d.ts +8 -3
  39. package/dist/Form/index.js +7 -2
  40. package/dist/Form/styles.scss +11 -0
  41. package/dist/Form/types.d.ts +8 -0
  42. package/dist/FormCell/FormCell.d.ts +22 -0
  43. package/dist/FormCell/FormCell.js +57 -0
  44. package/dist/FormCell/index.d.ts +4 -0
  45. package/dist/FormCell/index.js +3 -0
  46. package/dist/FormCell/styles.scss +103 -0
  47. package/dist/IndexedStack/IndexedStack.d.ts +9 -0
  48. package/dist/IndexedStack/IndexedStack.js +27 -0
  49. package/dist/IndexedStack/index.d.ts +3 -0
  50. package/dist/IndexedStack/index.js +2 -0
  51. package/dist/InputNumber/input-number.d.ts +3 -2
  52. package/dist/InputNumber/input-number.js +48 -26
  53. package/dist/InputNumber/style.scss +79 -22
  54. package/dist/Loading/DotLoading.d.ts +7 -0
  55. package/dist/{Mask/mask-modal.js → Loading/DotLoading.js} +25 -25
  56. package/dist/{SpinLoading/spin-loading.d.ts → Loading/SpinLoading.d.ts} +0 -1
  57. package/dist/Loading/SpinLoading.js +69 -0
  58. package/dist/Loading/index.d.ts +6 -0
  59. package/dist/Loading/index.js +4 -0
  60. package/dist/Loading/style.scss +113 -0
  61. package/dist/NavBar/nav-bar.d.ts +1 -0
  62. package/dist/NavBar/nav-bar.js +3 -2
  63. package/dist/NavBar/style.scss +7 -3
  64. package/dist/Progress/Progress.d.ts +39 -0
  65. package/dist/Progress/Progress.js +56 -0
  66. package/dist/Progress/ProgressCircle.d.ts +15 -0
  67. package/dist/Progress/ProgressCircle.js +117 -0
  68. package/dist/Progress/ProgressLine.d.ts +15 -0
  69. package/dist/Progress/ProgressLine.js +87 -0
  70. package/dist/Progress/index.d.ts +3 -0
  71. package/dist/Progress/index.js +2 -0
  72. package/dist/Progress/style.scss +33 -0
  73. package/dist/Progress/types.d.ts +6 -0
  74. package/dist/Progress/types.js +2 -0
  75. package/dist/Radio/RadioGroup.js +3 -3
  76. package/dist/Radio/radio.js +1 -1
  77. package/dist/Radio/style.scss +40 -24
  78. package/dist/Radio/types.d.ts +6 -4
  79. package/dist/Rate/rate.js +1 -1
  80. package/dist/Result/use-result-icon.js +1 -1
  81. package/dist/SafeArea/style.scss +5 -3
  82. package/dist/Scaffold/style.scss +2 -1
  83. package/dist/Segmented/Segmented.d.ts +57 -0
  84. package/dist/Segmented/Segmented.js +82 -0
  85. package/dist/Segmented/index.d.ts +2 -0
  86. package/dist/Segmented/index.js +1 -0
  87. package/dist/Segmented/style.scss +75 -0
  88. package/dist/Skeleton/Skeleton.d.ts +86 -0
  89. package/dist/Skeleton/Skeleton.js +263 -0
  90. package/dist/Skeleton/index.d.ts +3 -0
  91. package/dist/Skeleton/index.js +2 -0
  92. package/dist/Skeleton/style.scss +215 -0
  93. package/dist/Space/space.d.ts +1 -0
  94. package/dist/Space/space.js +20 -6
  95. package/dist/Space/style.scss +27 -3
  96. package/dist/Stepper/index.d.ts +3 -0
  97. package/dist/Stepper/index.js +2 -0
  98. package/dist/Stepper/stepper.d.ts +14 -0
  99. package/dist/Stepper/stepper.js +92 -0
  100. package/dist/Stepper/style.scss +100 -0
  101. package/dist/Steps/HorizontalSteps.js +10 -3
  102. package/dist/Steps/VerticalSteps.js +5 -2
  103. package/dist/Steps/style.scss +7 -0
  104. package/dist/Steps/types.d.ts +2 -0
  105. package/dist/Switch/style.scss +6 -7
  106. package/dist/Switch/switch.d.ts +2 -0
  107. package/dist/Switch/switch.js +6 -5
  108. package/dist/TabBar/index.js +2 -1
  109. package/dist/TabBar/index.scss +3 -2
  110. package/dist/Tabs/style.scss +5 -5
  111. package/dist/Tag/style.scss +45 -21
  112. package/dist/Tag/tag.d.ts +4 -1
  113. package/dist/Tag/tag.js +8 -2
  114. package/dist/index.d.ts +17 -26
  115. package/dist/index.js +8 -13
  116. package/dist/style/css-variable.scss +6 -0
  117. package/dist/style/style.scss +2 -2
  118. package/dist/style/variable.scss +176 -164
  119. package/dist/types.d.ts +10 -1
  120. package/package.json +5 -8
  121. package/dist/ActionSheet/ActionSheet.d.ts +0 -25
  122. package/dist/ActionSheet/ActionSheet.js +0 -77
  123. package/dist/ActionSheet/index.d.ts +0 -3
  124. package/dist/ActionSheet/index.js +0 -2
  125. package/dist/ActionSheet/style.scss +0 -51
  126. package/dist/CascaderPicker/cascader-picker.d.ts +0 -27
  127. package/dist/CascaderPicker/cascader-picker.js +0 -88
  128. package/dist/CascaderPicker/index.d.ts +0 -3
  129. package/dist/CascaderPicker/index.js +0 -2
  130. package/dist/CascaderPicker/style.scss +0 -42
  131. package/dist/Form/FormItem/form-item-input.d.ts +0 -15
  132. package/dist/Form/FormItem/form-item-input.js +0 -39
  133. package/dist/Form/FormItem/form-item-label.d.ts +0 -13
  134. package/dist/Form/FormItem/form-item-label.js +0 -25
  135. package/dist/Form/FormItem/form-item.d.ts +0 -21
  136. package/dist/Form/FormItem/form-item.js +0 -70
  137. package/dist/Form/FormItem/index.d.ts +0 -5
  138. package/dist/Form/FormItem/index.js +0 -3
  139. package/dist/Form/style.scss +0 -45
  140. package/dist/Input/base-input.d.ts +0 -14
  141. package/dist/Input/base-input.js +0 -63
  142. package/dist/Input/index.d.ts +0 -12
  143. package/dist/Input/index.js +0 -9
  144. package/dist/Input/index.scss +0 -173
  145. package/dist/Input/input-affix-wrapper.d.ts +0 -8
  146. package/dist/Input/input-affix-wrapper.js +0 -50
  147. package/dist/Input/input-opt.d.ts +0 -16
  148. package/dist/Input/input-opt.js +0 -93
  149. package/dist/Input/input-password.d.ts +0 -7
  150. package/dist/Input/input-password.js +0 -47
  151. package/dist/Input/input.d.ts +0 -15
  152. package/dist/Input/input.js +0 -47
  153. package/dist/Input/textarea.d.ts +0 -13
  154. package/dist/Input/textarea.js +0 -45
  155. package/dist/Input/types.d.ts +0 -1
  156. package/dist/Input/types.js +0 -1
  157. package/dist/Mask/index.d.ts +0 -3
  158. package/dist/Mask/index.js +0 -2
  159. package/dist/Mask/mask-modal.d.ts +0 -45
  160. package/dist/Mask/mask.d.ts +0 -5
  161. package/dist/Mask/mask.js +0 -19
  162. package/dist/Mask/style.scss +0 -20
  163. package/dist/Picker/index.d.ts +0 -3
  164. package/dist/Picker/index.js +0 -2
  165. package/dist/Picker/picker.d.ts +0 -19
  166. package/dist/Picker/picker.js +0 -97
  167. package/dist/Picker/style.scss +0 -41
  168. package/dist/PickerView/index.d.ts +0 -4
  169. package/dist/PickerView/index.js +0 -2
  170. package/dist/PickerView/picker-view-column-item.d.ts +0 -7
  171. package/dist/PickerView/picker-view-column-item.js +0 -11
  172. package/dist/PickerView/picker-view-column.d.ts +0 -10
  173. package/dist/PickerView/picker-view-column.js +0 -117
  174. package/dist/PickerView/picker-view.d.ts +0 -12
  175. package/dist/PickerView/picker-view.js +0 -60
  176. package/dist/PickerView/style.scss +0 -72
  177. package/dist/PickerView/types.d.ts +0 -4
  178. package/dist/Popup/index.d.ts +0 -3
  179. package/dist/Popup/index.js +0 -2
  180. package/dist/Popup/popup-modal.d.ts +0 -52
  181. package/dist/Popup/popup-modal.js +0 -74
  182. package/dist/Popup/popup.d.ts +0 -4
  183. package/dist/Popup/popup.js +0 -56
  184. package/dist/Popup/style.scss +0 -53
  185. package/dist/ScrollView/index.d.ts +0 -4
  186. package/dist/ScrollView/index.js +0 -2
  187. package/dist/ScrollView/scroll-view.d.ts +0 -4
  188. package/dist/ScrollView/scroll-view.js +0 -55
  189. package/dist/ScrollView/style.scss +0 -19
  190. package/dist/ScrollView/types.d.ts +0 -26
  191. package/dist/ScrollView/types.js +0 -1
  192. package/dist/SideBar/SideBarContext.d.ts +0 -18
  193. package/dist/SideBar/SideBarContext.js +0 -2
  194. package/dist/SideBar/index.d.ts +0 -3
  195. package/dist/SideBar/index.js +0 -2
  196. package/dist/SideBar/side-bar.d.ts +0 -25
  197. package/dist/SideBar/side-bar.js +0 -351
  198. package/dist/SideBar/style.scss +0 -85
  199. package/dist/SideBar/types.d.ts +0 -7
  200. package/dist/SideBar/types.js +0 -1
  201. package/dist/SpinLoading/demo/base.d.ts +0 -3
  202. package/dist/SpinLoading/demo/base.js +0 -21
  203. package/dist/SpinLoading/index.d.ts +0 -3
  204. package/dist/SpinLoading/index.js +0 -2
  205. package/dist/SpinLoading/spin-loading.js +0 -59
  206. package/dist/SpinLoading/spin-loading.scss +0 -40
  207. package/dist/Tabs/demo/base.d.ts +0 -3
  208. package/dist/Tabs/demo/base.js +0 -59
  209. package/dist/Tag/demo/base.d.ts +0 -7
  210. package/dist/Tag/demo/base.js +0 -67
  211. package/dist/Tag/demo/style.scss +0 -8
  212. package/dist/Toast/index.d.ts +0 -5
  213. package/dist/Toast/index.js +0 -3
  214. package/dist/Toast/style.scss +0 -63
  215. package/dist/Toast/toast-modal.d.ts +0 -18
  216. package/dist/Toast/toast-modal.js +0 -112
  217. package/dist/Toast/toast.d.ts +0 -7
  218. package/dist/Toast/toast.js +0 -78
  219. package/dist/VerificationCodeInput/demo/base.d.ts +0 -3
  220. package/dist/VerificationCodeInput/demo/base.js +0 -11
  221. package/dist/VerificationCodeInput/index.d.ts +0 -3
  222. package/dist/VerificationCodeInput/index.js +0 -2
  223. package/dist/VerificationCodeInput/style.scss +0 -20
  224. package/dist/VerificationCodeInput/verification-code-input.d.ts +0 -24
  225. package/dist/VerificationCodeInput/verification-code-input.js +0 -99
  226. /package/dist/{PickerView → Form}/types.js +0 -0
@@ -1,4 +1,4 @@
1
- @use "../style/variable" as *;
1
+ @use "../style/variable" as variable;
2
2
 
3
3
  $class-prefix-switch: 'triones-antm-switch';
4
4
 
@@ -18,7 +18,6 @@ $class-prefix-switch: 'triones-antm-switch';
18
18
  vertical-align: middle;
19
19
  box-sizing: border-box;
20
20
  position: relative;
21
- align-self: center;
22
21
  cursor: pointer;
23
22
 
24
23
  input {
@@ -30,7 +29,7 @@ $class-prefix-switch: 'triones-antm-switch';
30
29
  height: var(--height);
31
30
  box-sizing: border-box;
32
31
  border-radius: 31PX;
33
- background: $trionesBorderColor;
32
+ background: variable.$trionesBorderColor;
34
33
  z-index: 0;
35
34
  overflow: hidden;
36
35
  line-height: var(--height);
@@ -58,7 +57,7 @@ $class-prefix-switch: 'triones-antm-switch';
58
57
  width: calc(var(--height) - 2 * var(--border-width));
59
58
  height: calc(var(--height) - 2 * var(--border-width));
60
59
  border-radius: calc(var(--height) - 2 * var(--border-width));
61
- background: $trionesColorTextLightSolid;
60
+ background: variable.$trionesColorTextLightSolid;
62
61
  position: absolute;
63
62
  z-index: 2;
64
63
  top: var(--border-width);
@@ -69,7 +68,7 @@ $class-prefix-switch: 'triones-antm-switch';
69
68
  -1PX 2PX 2PX 0 rgba(0, 0, 0, 0.1);
70
69
 
71
70
  &-loading {
72
- color: var(--color,$trionesColorPrimary);
71
+ color: var(--color,variable.$trionesColorPrimary);
73
72
  display: inline-block;
74
73
  height: 100%;
75
74
  width: 100%;
@@ -96,7 +95,7 @@ $class-prefix-switch: 'triones-antm-switch';
96
95
  /* 选中状态 */
97
96
  &.#{$class-prefix-switch}-checked {
98
97
  .#{$class-prefix-switch}-checkbox {
99
- background: var(--checked-color, $trionesColorPrimary);
98
+ background: var(--checked-color, variable.$trionesColorPrimary);
100
99
 
101
100
  &:before {
102
101
  transform: scale(0);
@@ -109,7 +108,7 @@ $class-prefix-switch: 'triones-antm-switch';
109
108
 
110
109
  .#{$class-prefix-switch}-inner {
111
110
  margin: 0 calc(var(--height) - var(--border-width) + 5PX) 0 8PX;
112
- color: $trionesColorTextLightSolid;
111
+ color: variable.$trionesColorTextLightSolid;
113
112
  }
114
113
  }
115
114
 
@@ -14,6 +14,8 @@ export type SwitchProps = {
14
14
  checkedColor?: string;
15
15
  width?: number;
16
16
  height?: number;
17
+ value?: boolean;
18
+ defaultValue?: boolean;
17
19
  };
18
20
  export declare function createSvgStr(props: {
19
21
  stroke: string;
@@ -23,27 +23,28 @@ import Base64 from "crypto-js/enc-base64";
23
23
  import Utf8 from "crypto-js/enc-utf8";
24
24
  var classPrefix = "triones-antm-switch";
25
25
  var defaultProps = {
26
- defaultChecked: false
26
+ defaultChecked: false,
27
+ defaultValue: false
27
28
  };
28
29
  export function createSvgStr(props) {
29
30
  return "<svg xmlns=\"http://www.w3.org/2000/svg\" style=\"width:100%;height:100%\" viewBox=\"0 0 20 20\">\n <circle r=\"9\" cx=\"10\" cy=\"10\"\n stroke-width=\"1\"\n stroke=\"".concat(props.stroke, "\"\n fill=\"transparent\"\n stroke-linecap=\"round\"\n stroke-dasharray=\"").concat(10 * 3.14159265358979 * 2, "\"\n stroke-dashoffset=\"").concat(10 * 3.14159265358979 * 0.5, "\"></circle>\n </svg>");
30
31
  }
31
32
  export var Switch = function Switch(p) {
32
- var _props$checked;
33
+ var _ref, _ref2, _ref3, _props$checked;
33
34
  var props = mergeProps(defaultProps, p);
34
35
  var disabled = props.disabled || props.loading || false;
35
36
  var _useState = useState(false),
36
37
  _useState2 = _slicedToArray(_useState, 2),
37
38
  changing = _useState2[0],
38
39
  setChanging = _useState2[1];
39
- var _useState3 = useState((_props$checked = props.checked) !== null && _props$checked !== void 0 ? _props$checked : props.defaultChecked),
40
+ var _useState3 = useState((_ref = (_ref2 = (_ref3 = (_props$checked = props.checked) !== null && _props$checked !== void 0 ? _props$checked : props.value) !== null && _ref3 !== void 0 ? _ref3 : props.defaultChecked) !== null && _ref2 !== void 0 ? _ref2 : props.defaultValue) !== null && _ref !== void 0 ? _ref : false),
40
41
  _useState4 = _slicedToArray(_useState3, 2),
41
42
  checked = _useState4[0],
42
43
  setChecked = _useState4[1];
43
44
  var _ConfigProvider$useCo = ConfigProvider.useConfig(),
44
45
  locale = _ConfigProvider$useCo.locale;
45
46
  var handleClick = /*#__PURE__*/function () {
46
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
47
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
47
48
  return _regeneratorRuntime().wrap(function _callee$(_context) {
48
49
  while (1) switch (_context.prev = _context.next) {
49
50
  case 0:
@@ -55,7 +56,7 @@ export var Switch = function Switch(p) {
55
56
  }, _callee);
56
57
  }));
57
58
  return function handleClick() {
58
- return _ref.apply(this, arguments);
59
+ return _ref4.apply(this, arguments);
59
60
  };
60
61
  }();
61
62
  var completedStyle = React.useMemo(function () {
@@ -1,3 +1,4 @@
1
- import { TabBar as InternalTabBar } from "./tab-bar";
1
+ import { TabBar as InternalTabBar, TabBarItem } from "./tab-bar";
2
2
  var TabBar = InternalTabBar;
3
+ TabBar.Item = TabBarItem;
3
4
  export default TabBar;
@@ -1,6 +1,6 @@
1
- @use "../style/variable" as *;
1
+ @use "../style/variable" as variable;
2
2
 
3
- $trionesTabBarActiveColor: $trionesColorPrimary !default;
3
+ $trionesTabBarActiveColor: variable.$trionesColorPrimary !default;
4
4
 
5
5
  $tabBarCls: 'triones-tab-bar';
6
6
  .#{$tabBarCls} {
@@ -20,6 +20,7 @@ $tabBarCls: 'triones-tab-bar';
20
20
  gap: 4Px;
21
21
  cursor: default;
22
22
  flex: 1 auto;
23
+ padding: 4Px;
23
24
 
24
25
  &-active {
25
26
  color: $trionesTabBarActiveColor;
@@ -1,4 +1,4 @@
1
- @use "../style/variable" as *;
1
+ @use "../style/variable" as variable;
2
2
  $tabsCls: 'triones-antm-tabs';
3
3
 
4
4
  .#{$tabsCls} {
@@ -42,7 +42,7 @@ $tabsCls: 'triones-antm-tabs';
42
42
  &-ink-bar {
43
43
  position: absolute;
44
44
  bottom: 0;
45
- background-color: $trionesColorPrimary;
45
+ background-color: variable.$trionesColorPrimary;
46
46
  height: 2px;
47
47
  //width: 100px;
48
48
  &-animated {
@@ -69,18 +69,18 @@ $tabsCls: 'triones-antm-tabs';
69
69
  }
70
70
 
71
71
  &-active {
72
- color: $trionesColorPrimary;
72
+ color: variable.$trionesColorPrimary;
73
73
  &::after{
74
74
  content: ' ';
75
75
  position: absolute;
76
76
  bottom: 0;
77
77
  width: calc(100% - 0.24rem * 2);
78
- height: 0.04rem;
78
+ height: 2Px;
79
79
  overflow: hidden;
80
80
  font-size: 0;
81
81
  border-radius: 50vh;
82
82
  box-sizing: border-box;
83
- background-color: $trionesColorPrimary;
83
+ background-color: variable.$trionesColorPrimary;
84
84
  }
85
85
  }
86
86
 
@@ -1,13 +1,14 @@
1
- @use "../style/variable" as *;
1
+ @use "../style/variable" as variable;
2
+
2
3
  $tagCls: 'triones-antm-tag';
3
4
 
4
5
  .#{$tagCls} {
5
- display: inline-block;
6
+ display: inline-flex;
6
7
  align-items: center;
7
8
  padding: 2Px 8Px;
8
- font-size: 11Px;
9
- line-height: 1.2;
10
- border-radius: $trionesBorderRadius;
9
+ font-size: variable.$trionesFontSizeSm;
10
+ line-height: 1;
11
+ border-radius: variable.$trionesBorderRadiusXs;
11
12
  box-sizing: border-box;
12
13
  white-space: nowrap;
13
14
 
@@ -16,7 +17,8 @@ $tagCls: 'triones-antm-tag';
16
17
  }
17
18
 
18
19
  &-round {
19
- border-radius: 12px;
20
+ padding: 2Px 8Px;
21
+ border-radius: 12Px;
20
22
  }
21
23
 
22
24
  // Default variant styles
@@ -25,6 +27,7 @@ $tagCls: 'triones-antm-tag';
25
27
  background: #666;
26
28
  color: #fff;
27
29
  }
30
+
28
31
  &.#{$tagCls}-outline {
29
32
  color: #666;
30
33
  border: 1px solid #666;
@@ -32,15 +35,16 @@ $tagCls: 'triones-antm-tag';
32
35
  }
33
36
  }
34
37
 
35
- // Primary variant styles
36
- &-primary {
38
+ // processing variant styles
39
+ &-processing {
37
40
  &.#{$tagCls}-solid {
38
- background: $trionesColorPrimary;
41
+ background: variable.$trionesColorPrimary;
39
42
  color: #fff;
40
43
  }
44
+
41
45
  &.#{$tagCls}-outline {
42
- color: $trionesColorPrimary;
43
- border: 1px solid $trionesColorPrimary;
46
+ color: variable.$trionesColorPrimary;
47
+ border: 1px solid variable.$trionesColorPrimary;
44
48
  background: transparent;
45
49
  }
46
50
  }
@@ -48,12 +52,13 @@ $tagCls: 'triones-antm-tag';
48
52
  // Success variant styles
49
53
  &-success {
50
54
  &.#{$tagCls}-solid {
51
- background: $trionesColorSuccess;
55
+ background: variable.$trionesColorSuccess;
52
56
  color: #fff;
53
57
  }
58
+
54
59
  &.#{$tagCls}-outline {
55
- color: $trionesColorSuccess;
56
- border: 1px solid $trionesColorSuccess;
60
+ color: variable.$trionesColorSuccess;
61
+ border: 1px solid variable.$trionesColorSuccess;
57
62
  background: transparent;
58
63
  }
59
64
  }
@@ -61,26 +66,45 @@ $tagCls: 'triones-antm-tag';
61
66
  // Warning variant styles
62
67
  &-warning {
63
68
  &.#{$tagCls}-solid {
64
- background: $trionesColorWarning;
69
+ background: variable.$trionesColorWarning;
65
70
  color: #fff;
66
71
  }
72
+
67
73
  &.#{$tagCls}-outline {
68
- color: $trionesColorWarning;
69
- border: 1px solid $trionesColorWarning;
74
+ color: variable.$trionesColorWarning;
75
+ border: 1px solid variable.$trionesColorWarning;
70
76
  background: transparent;
71
77
  }
72
78
  }
73
79
 
74
80
  // Danger variant styles
75
- &-danger {
81
+ &-error {
76
82
  &.#{$tagCls}-solid {
77
- background: $trionesColorError;
83
+ background: variable.$trionesColorError;
78
84
  color: #fff;
79
85
  }
86
+
80
87
  &.#{$tagCls}-outline {
81
- color: $trionesColorError;
82
- border: 1px solid $trionesColorError;
88
+ color: variable.$trionesColorError;
89
+ border: 1px solid variable.$trionesColorError;
83
90
  background: transparent;
84
91
  }
85
92
  }
93
+
94
+ &-icon {
95
+ margin-inline-end: 4Px;
96
+
97
+ .triones-antm-icon {
98
+ font-size: 10Px;
99
+ }
100
+ }
101
+
102
+ &-close {
103
+ margin-inline-start: 4Px;
104
+ display: flex;
105
+
106
+ .triones-antm-icon {
107
+ font-size: 10Px;
108
+ }
109
+ }
86
110
  }
package/dist/Tag/tag.d.ts CHANGED
@@ -5,7 +5,7 @@ export type TagProps = {
5
5
  /**
6
6
  * 标签色
7
7
  */
8
- color?: 'default' | 'primary' | 'success' | 'warning' | 'danger' | string;
8
+ color?: 'default' | 'processing' | 'success' | 'warning' | 'error' | string;
9
9
  /**
10
10
  * 填充模式
11
11
  */
@@ -14,6 +14,8 @@ export type TagProps = {
14
14
  * 点击时的回调
15
15
  */
16
16
  onClick?: (e: React.MouseEvent<HTMLElement>) => void;
17
+ closeIcon?: boolean | React.ReactNode | null;
18
+ icon?: React.ReactNode;
17
19
  /**
18
20
  * 是否圆角
19
21
  */
@@ -26,5 +28,6 @@ export type TagProps = {
26
28
  * 自定义样式
27
29
  */
28
30
  style?: React.CSSProperties;
31
+ onClose?: (e: React.MouseEvent<HTMLElement>) => void;
29
32
  };
30
33
  export declare const Tag: FC<TagProps>;
package/dist/Tag/tag.js CHANGED
@@ -11,6 +11,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
11
11
  import classNames from 'classnames';
12
12
  import React from 'react';
13
13
  import "./style.scss";
14
+ import { CloseOutline } from "@trionesdev/antd-mobile-icons-react";
14
15
  export var Tag = function Tag(_ref) {
15
16
  var children = _ref.children,
16
17
  _ref$color = _ref.color,
@@ -26,7 +27,7 @@ export var Tag = function Tag(_ref) {
26
27
  var clsPrefix = 'triones-antm-tag';
27
28
 
28
29
  // 是否是预设颜色
29
- var isPresetColor = ['default', 'primary', 'success', 'warning', 'danger'].includes(color);
30
+ var isPresetColor = ['default', 'processing', 'success', 'warning', 'error'].includes(color);
30
31
  var customStyle = !isPresetColor ? _objectSpread(_objectSpread({}, fill === 'solid' ? {
31
32
  backgroundColor: color,
32
33
  color: '#fff'
@@ -40,5 +41,10 @@ export var Tag = function Tag(_ref) {
40
41
  style: customStyle
41
42
  }, props, {
42
43
  onClick: onClick
43
- }), children);
44
+ }), props.icon && /*#__PURE__*/React.createElement("div", {
45
+ className: "".concat(clsPrefix, "-icon")
46
+ }, props.icon), children, props.closeIcon && /*#__PURE__*/React.createElement("div", {
47
+ onClick: props.onClose,
48
+ className: "".concat(clsPrefix, "-close")
49
+ }, /*#__PURE__*/React.isValidElement(props.closeIcon) ? props.closeIcon : /*#__PURE__*/React.createElement(CloseOutline, null), " "));
44
50
  };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,4 @@
1
1
  import './style';
2
- export { default as ActionSheet } from "./ActionSheet";
3
- export type { ActionSheetProps } from './ActionSheet';
4
2
  export { default as Alert } from './Alert';
5
3
  export type { AlertProps } from './Alert';
6
4
  export { default as Avatar } from './Avatar';
@@ -9,8 +7,6 @@ export { default as Badge } from './Badge';
9
7
  export type { BadgeFill, BadgeProps } from './Badge';
10
8
  export { default as Card } from './Card';
11
9
  export type { CardProps } from './Card';
12
- export { default as CascaderPicker } from './CascaderPicker';
13
- export type { CascaderPickerProps } from './CascaderPicker';
14
10
  export { default as CascaderView } from './CascaderView';
15
11
  export type { CascaderViewProps } from './CascaderView';
16
12
  export { default as Cell } from './Cell';
@@ -31,28 +27,25 @@ export { default as ErrorBlock, createErrorBlock } from './ErrorBlock';
31
27
  export type { ErrorBlockStatus, ErrorBlockProps } from './ErrorBlock';
32
28
  export { default as Footer } from './Footer';
33
29
  export type { FooterProps, ChipItem, LinkItem } from './Footer';
34
- export { default as Form } from './Form';
35
- export type { FormItemProps, FormProps } from './Form';
30
+ export { default as Form, useFormContext, Field } from './Form';
31
+ export type { FormInstance } from "./Form/interface";
32
+ export type { FormProps, FormLayout, FormHorizontalAlign, FormItemVerticalAlign, FormItemLayout } from './Form';
33
+ export { default as FormCell } from "./FormCell";
34
+ export type { FormCellProps } from "./FormCell";
36
35
  export { default as Grid } from './Grid';
37
36
  export type { GridProps, GridItemProps } from './Grid';
38
- export { default as Input } from './Input';
39
- export type { InputOPTProps, InputPasswordProps, InputProps, InputTextareaProps } from './Input';
37
+ export { default as IndexedStack } from './IndexedStack';
38
+ export type { IndexedStackProps } from './IndexedStack';
40
39
  export { default as InputNumber } from './InputNumber';
41
40
  export type { InputNumberProps } from './InputNumber';
42
- export { default as Mask } from "./Mask";
43
- export type { MaskProps } from "./Mask";
44
41
  export { default as NavBar } from './NavBar';
45
42
  export type { NavBarProps } from './NavBar';
46
43
  export { default as NoticeBar } from './NoticeBar';
47
44
  export type { NoticeBarProps } from './NoticeBar';
48
45
  export { default as PageIndicator } from './PageIndicator';
49
46
  export type { PageIndicatorProps } from './PageIndicator';
50
- export { default as Picker } from './Picker';
51
- export type { PickerProps } from './Picker';
52
- export { default as PickerView } from './PickerView';
53
- export type { PickerViewProps, PickerColumnOption } from './PickerView';
54
- export { default as Popup } from './Popup';
55
- export type { PopupProps } from './Popup';
47
+ export { default as Progress } from './Progress';
48
+ export type { ProgressProps } from './Progress';
56
49
  export { default as Radio } from './Radio';
57
50
  export type { RadioGroupProps, RadioProps } from './Radio';
58
51
  export { default as Rate } from './Rate';
@@ -63,14 +56,16 @@ export { default as SafeArea } from './SafeArea';
63
56
  export type { SafeAreaProps } from './SafeArea';
64
57
  export { default as Scaffold } from './Scaffold';
65
58
  export type { ScaffoldProps } from './Scaffold';
66
- export { default as ScrollView } from './ScrollView';
67
- export type { ScrollViewProps } from './ScrollView';
68
- export { default as SideBar } from './SideBar';
69
- export type { SideBarProps } from './SideBar';
59
+ export { Segmented } from './Segmented';
60
+ export type { SegmentedProps } from './Segmented';
61
+ export { default as Skeleton } from './Skeleton';
62
+ export type { SkeletonProps, SkeletonAvatarProps, SkeletonTitleProps, SkeletonParagraphProps, SkeletonInputProps, SkeletonButtonProps, SkeletonBlockType, SkeletonAvatarShape, SkeletonAvatarSize, SkeletonButtonShape, } from './Skeleton';
70
63
  export { default as Space } from './Space';
71
64
  export type { SpaceProps } from './Space';
72
- export { default as SpinLoading } from './SpinLoading';
73
- export type { SpinLoadingProps } from './SpinLoading';
65
+ export { DotLoading, SpinLoading } from './Loading';
66
+ export type { DotLoadingProps, SpinLoadingProps } from './Loading';
67
+ export { default as Stepper } from './Stepper';
68
+ export type { StepperProps } from './Stepper';
74
69
  export { default as Steps } from './Steps';
75
70
  export type { StepsProps, StepsItemProps } from './Steps';
76
71
  export { default as Switch } from './Switch';
@@ -79,12 +74,8 @@ export { default as TabBar } from './TabBar';
79
74
  export type { TabBarProps } from './TabBar';
80
75
  export { default as Tag } from './Tag';
81
76
  export type { TagProps } from './Tag';
82
- export { default as Toast } from './Toast';
83
- export type { ToastProps } from './Toast';
84
77
  export { default as Tabs } from './Tabs';
85
78
  export type { TabsProps } from './Tabs';
86
- export { default as VerificationCodeInput } from './VerificationCodeInput';
87
- export type { ValidationCodeInputProps } from './VerificationCodeInput';
88
79
  export { default as WaterMark } from './WaterMark';
89
80
  export type { WaterMarkProps } from './WaterMark';
90
81
  export * from './types';
package/dist/index.js CHANGED
@@ -1,10 +1,8 @@
1
1
  import "./style";
2
- export { default as ActionSheet } from "./ActionSheet";
3
2
  export { default as Alert } from "./Alert";
4
3
  export { default as Avatar } from "./Avatar";
5
4
  export { default as Badge } from "./Badge";
6
5
  export { default as Card } from "./Card";
7
- export { default as CascaderPicker } from "./CascaderPicker";
8
6
  export { default as CascaderView } from "./CascaderView";
9
7
  export { default as Cell } from "./Cell";
10
8
  export { default as Checkbox } from "./Checkbox";
@@ -15,32 +13,29 @@ export { default as Ellipsis } from "./Ellipsis";
15
13
  export { default as Empty } from "./Empty";
16
14
  export { default as ErrorBlock, createErrorBlock } from "./ErrorBlock";
17
15
  export { default as Footer } from "./Footer";
18
- export { default as Form } from "./Form";
16
+ export { default as Form, useFormContext, Field } from "./Form";
17
+ export { default as FormCell } from "./FormCell";
19
18
  export { default as Grid } from "./Grid";
20
- export { default as Input } from "./Input";
19
+ export { default as IndexedStack } from "./IndexedStack";
21
20
  export { default as InputNumber } from "./InputNumber";
22
- export { default as Mask } from "./Mask";
23
21
  export { default as NavBar } from "./NavBar";
24
22
  export { default as NoticeBar } from "./NoticeBar";
25
23
  export { default as PageIndicator } from "./PageIndicator";
26
- export { default as Picker } from "./Picker";
27
- export { default as PickerView } from "./PickerView";
28
- export { default as Popup } from "./Popup";
24
+ export { default as Progress } from "./Progress";
29
25
  export { default as Radio } from "./Radio";
30
26
  export { default as Rate } from "./Rate";
31
27
  export { default as Result } from "./Result";
32
28
  export { default as SafeArea } from "./SafeArea";
33
29
  export { default as Scaffold } from "./Scaffold";
34
- export { default as ScrollView } from "./ScrollView";
35
- export { default as SideBar } from "./SideBar";
30
+ export { Segmented } from "./Segmented";
31
+ export { default as Skeleton } from "./Skeleton";
36
32
  export { default as Space } from "./Space";
37
- export { default as SpinLoading } from "./SpinLoading";
33
+ export { DotLoading, SpinLoading } from "./Loading";
34
+ export { default as Stepper } from "./Stepper";
38
35
  export { default as Steps } from "./Steps";
39
36
  export { default as Switch } from "./Switch";
40
37
  export { default as TabBar } from "./TabBar";
41
38
  export { default as Tag } from "./Tag";
42
- export { default as Toast } from "./Toast";
43
39
  export { default as Tabs } from "./Tabs";
44
- export { default as VerificationCodeInput } from "./VerificationCodeInput";
45
40
  export { default as WaterMark } from "./WaterMark";
46
41
  export * from "./types";
@@ -0,0 +1,6 @@
1
+ :root,page {
2
+ //--triones-blue: #1677FF;
3
+ //--trioens-color-primary: #1677FF;
4
+
5
+ --triones-safe-area-multiple:1;
6
+ }
@@ -1,5 +1,5 @@
1
- @use './theme-default.scss' as *;
2
- @use './theme-dark.scss' as *;
1
+ @use './theme-default.scss' as default;
2
+ @use './theme-dark.scss' as dark;
3
3
 
4
4
  :root {
5
5
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);