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

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 (207) 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/avatar.d.ts +4 -1
  5. package/dist/Avatar/avatar.js +19 -6
  6. package/dist/Avatar/style.scss +17 -16
  7. package/dist/Badge/style.scss +100 -100
  8. package/dist/Card/style.scss +35 -35
  9. package/dist/CascaderView/cascader-view.js +1 -1
  10. package/dist/CascaderView/style.scss +22 -22
  11. package/dist/Cell/CellGroup.js +39 -17
  12. package/dist/Cell/cell.js +70 -16
  13. package/dist/Cell/context.d.ts +17 -0
  14. package/dist/Cell/context.js +2 -0
  15. package/dist/Cell/styles.scss +51 -52
  16. package/dist/Cell/types.d.ts +28 -7
  17. package/dist/Checkbox/checkbox-button.d.ts +6 -2
  18. package/dist/Checkbox/checkbox-button.js +5 -17
  19. package/dist/Checkbox/checkbox-group.js +19 -3
  20. package/dist/Checkbox/checkbox-round.d.ts +8 -0
  21. package/dist/Checkbox/checkbox-round.js +35 -0
  22. package/dist/Checkbox/checkbox.js +49 -34
  23. package/dist/Checkbox/index.d.ts +0 -2
  24. package/dist/Checkbox/index.js +0 -2
  25. package/dist/Checkbox/index.scss +165 -151
  26. package/dist/Checkbox/types.d.ts +11 -1
  27. package/dist/DemoBlock/index.scss +20 -20
  28. package/dist/DemoDescription/index.scss +3 -3
  29. package/dist/Descriptions/style.scss +65 -65
  30. package/dist/Divider/style.scss +62 -62
  31. package/dist/Ellipsis/style.scss +13 -13
  32. package/dist/Empty/style.scss +29 -29
  33. package/dist/ErrorBlock/demo/base.js +2 -2
  34. package/dist/ErrorBlock/style.scss +62 -62
  35. package/dist/Footer/style.scss +55 -55
  36. package/dist/Form/context.d.ts +2 -1
  37. package/dist/Form/form.d.ts +2 -7
  38. package/dist/Form/form.js +4 -3
  39. package/dist/Form/index.d.ts +5 -3
  40. package/dist/Form/index.js +4 -2
  41. package/dist/Form/types.d.ts +7 -0
  42. package/dist/Grid/style.scss +17 -17
  43. package/dist/Icon/demo/base.js +3 -3
  44. package/dist/IndexedStack/IndexedStack.d.ts +9 -0
  45. package/dist/IndexedStack/IndexedStack.js +27 -0
  46. package/dist/IndexedStack/index.d.ts +3 -0
  47. package/dist/IndexedStack/index.js +2 -0
  48. package/dist/InputNumber/input-number.d.ts +3 -0
  49. package/dist/InputNumber/input-number.js +7 -3
  50. package/dist/InputNumber/style.scss +63 -43
  51. package/dist/NavBar/nav-bar.d.ts +1 -0
  52. package/dist/NavBar/nav-bar.js +2 -1
  53. package/dist/NavBar/style.scss +64 -61
  54. package/dist/NoticeBar/style.scss +130 -130
  55. package/dist/PageIndicator/style.scss +59 -59
  56. package/dist/Progress/Progress.d.ts +39 -0
  57. package/dist/Progress/Progress.js +56 -0
  58. package/dist/Progress/ProgressCircle.d.ts +15 -0
  59. package/dist/Progress/ProgressCircle.js +114 -0
  60. package/dist/Progress/ProgressLine.d.ts +15 -0
  61. package/dist/Progress/ProgressLine.js +87 -0
  62. package/dist/Progress/index.d.ts +3 -0
  63. package/dist/Progress/index.js +2 -0
  64. package/dist/Progress/style.scss +33 -0
  65. package/dist/Progress/types.d.ts +6 -0
  66. package/dist/Progress/types.js +2 -0
  67. package/dist/Radio/RadioGroup.js +3 -3
  68. package/dist/Radio/style.scss +141 -138
  69. package/dist/Radio/types.d.ts +6 -4
  70. package/dist/Rate/style.scss +37 -37
  71. package/dist/Result/demo/base.js +2 -2
  72. package/dist/Result/style.scss +73 -73
  73. package/dist/SafeArea/style.scss +20 -18
  74. package/dist/Scaffold/style.scss +17 -16
  75. package/dist/Skeleton/Skeleton.d.ts +27 -0
  76. package/dist/Skeleton/Skeleton.js +72 -0
  77. package/dist/Skeleton/index.d.ts +1 -0
  78. package/dist/Skeleton/index.js +1 -0
  79. package/dist/Skeleton/style.scss +48 -0
  80. package/dist/Space/space.d.ts +1 -0
  81. package/dist/Space/space.js +17 -6
  82. package/dist/Space/style.scss +80 -77
  83. package/dist/SpinLoading/spin-loading.scss +40 -40
  84. package/dist/Steps/HorizontalSteps.js +5 -1
  85. package/dist/Steps/style.scss +153 -146
  86. package/dist/Switch/style.scss +128 -128
  87. package/dist/TabBar/demo/base.js +2 -2
  88. package/dist/TabBar/index.js +2 -1
  89. package/dist/TabBar/index.scss +37 -36
  90. package/dist/TabBar/tab-bar.d.ts +1 -1
  91. package/dist/TabBar/tab-bar.js +3 -2
  92. package/dist/Tabs/style.scss +108 -108
  93. package/dist/Tabs/tabs.js +1 -1
  94. package/dist/Tag/style.scss +108 -86
  95. package/dist/Tag/tag.d.ts +3 -0
  96. package/dist/Tag/tag.js +8 -1
  97. package/dist/WaterMark/style.scss +17 -17
  98. package/dist/index.d.ts +6 -24
  99. package/dist/index.js +3 -12
  100. package/dist/style/css-variable.scss +6 -0
  101. package/dist/style/style.scss +52 -52
  102. package/dist/style/theme-dark.scss +24 -24
  103. package/dist/style/theme-default.scss +54 -54
  104. package/dist/style/variable.scss +173 -168
  105. package/dist/types.d.ts +5 -1
  106. package/dist/utils/type.js +36 -36
  107. package/dist/utils/with-default-props.js +4 -4
  108. package/package.json +7 -8
  109. package/dist/ActionSheet/ActionSheet.d.ts +0 -25
  110. package/dist/ActionSheet/ActionSheet.js +0 -77
  111. package/dist/ActionSheet/index.d.ts +0 -3
  112. package/dist/ActionSheet/index.js +0 -2
  113. package/dist/ActionSheet/style.scss +0 -51
  114. package/dist/CascaderPicker/cascader-picker.d.ts +0 -27
  115. package/dist/CascaderPicker/cascader-picker.js +0 -88
  116. package/dist/CascaderPicker/index.d.ts +0 -3
  117. package/dist/CascaderPicker/index.js +0 -2
  118. package/dist/CascaderPicker/style.scss +0 -42
  119. package/dist/Form/FormItem/form-item-input.d.ts +0 -15
  120. package/dist/Form/FormItem/form-item-input.js +0 -39
  121. package/dist/Form/FormItem/form-item-label.d.ts +0 -13
  122. package/dist/Form/FormItem/form-item-label.js +0 -25
  123. package/dist/Form/FormItem/form-item.d.ts +0 -21
  124. package/dist/Form/FormItem/form-item.js +0 -70
  125. package/dist/Form/FormItem/index.d.ts +0 -5
  126. package/dist/Form/FormItem/index.js +0 -3
  127. package/dist/Form/style.scss +0 -45
  128. package/dist/Input/base-input.d.ts +0 -14
  129. package/dist/Input/base-input.js +0 -63
  130. package/dist/Input/index.d.ts +0 -12
  131. package/dist/Input/index.js +0 -9
  132. package/dist/Input/index.scss +0 -173
  133. package/dist/Input/input-affix-wrapper.d.ts +0 -8
  134. package/dist/Input/input-affix-wrapper.js +0 -50
  135. package/dist/Input/input-opt.d.ts +0 -16
  136. package/dist/Input/input-opt.js +0 -93
  137. package/dist/Input/input-password.d.ts +0 -7
  138. package/dist/Input/input-password.js +0 -47
  139. package/dist/Input/input.d.ts +0 -15
  140. package/dist/Input/input.js +0 -47
  141. package/dist/Input/textarea.d.ts +0 -13
  142. package/dist/Input/textarea.js +0 -45
  143. package/dist/Input/types.d.ts +0 -1
  144. package/dist/Input/types.js +0 -1
  145. package/dist/Mask/index.d.ts +0 -3
  146. package/dist/Mask/index.js +0 -2
  147. package/dist/Mask/mask-modal.d.ts +0 -45
  148. package/dist/Mask/mask-modal.js +0 -32
  149. package/dist/Mask/mask.d.ts +0 -5
  150. package/dist/Mask/mask.js +0 -19
  151. package/dist/Mask/style.scss +0 -20
  152. package/dist/Picker/index.d.ts +0 -3
  153. package/dist/Picker/index.js +0 -2
  154. package/dist/Picker/picker.d.ts +0 -19
  155. package/dist/Picker/picker.js +0 -97
  156. package/dist/Picker/style.scss +0 -41
  157. package/dist/PickerView/index.d.ts +0 -4
  158. package/dist/PickerView/index.js +0 -2
  159. package/dist/PickerView/picker-view-column-item.d.ts +0 -7
  160. package/dist/PickerView/picker-view-column-item.js +0 -11
  161. package/dist/PickerView/picker-view-column.d.ts +0 -10
  162. package/dist/PickerView/picker-view-column.js +0 -117
  163. package/dist/PickerView/picker-view.d.ts +0 -12
  164. package/dist/PickerView/picker-view.js +0 -60
  165. package/dist/PickerView/style.scss +0 -72
  166. package/dist/PickerView/types.d.ts +0 -4
  167. package/dist/Popup/index.d.ts +0 -3
  168. package/dist/Popup/index.js +0 -2
  169. package/dist/Popup/popup-modal.d.ts +0 -52
  170. package/dist/Popup/popup-modal.js +0 -74
  171. package/dist/Popup/popup.d.ts +0 -4
  172. package/dist/Popup/popup.js +0 -56
  173. package/dist/Popup/style.scss +0 -53
  174. package/dist/ScrollView/index.d.ts +0 -4
  175. package/dist/ScrollView/index.js +0 -2
  176. package/dist/ScrollView/scroll-view.d.ts +0 -4
  177. package/dist/ScrollView/scroll-view.js +0 -55
  178. package/dist/ScrollView/style.scss +0 -19
  179. package/dist/ScrollView/types.d.ts +0 -26
  180. package/dist/ScrollView/types.js +0 -1
  181. package/dist/SideBar/SideBarContext.d.ts +0 -18
  182. package/dist/SideBar/SideBarContext.js +0 -2
  183. package/dist/SideBar/index.d.ts +0 -3
  184. package/dist/SideBar/index.js +0 -2
  185. package/dist/SideBar/side-bar.d.ts +0 -25
  186. package/dist/SideBar/side-bar.js +0 -351
  187. package/dist/SideBar/style.scss +0 -85
  188. package/dist/SideBar/types.d.ts +0 -7
  189. package/dist/SideBar/types.js +0 -1
  190. package/dist/Tag/demo/base.d.ts +0 -7
  191. package/dist/Tag/demo/base.js +0 -67
  192. package/dist/Tag/demo/style.scss +0 -8
  193. package/dist/Toast/index.d.ts +0 -5
  194. package/dist/Toast/index.js +0 -3
  195. package/dist/Toast/style.scss +0 -63
  196. package/dist/Toast/toast-modal.d.ts +0 -18
  197. package/dist/Toast/toast-modal.js +0 -112
  198. package/dist/Toast/toast.d.ts +0 -7
  199. package/dist/Toast/toast.js +0 -78
  200. package/dist/VerificationCodeInput/demo/base.d.ts +0 -3
  201. package/dist/VerificationCodeInput/demo/base.js +0 -11
  202. package/dist/VerificationCodeInput/index.d.ts +0 -3
  203. package/dist/VerificationCodeInput/index.js +0 -2
  204. package/dist/VerificationCodeInput/style.scss +0 -20
  205. package/dist/VerificationCodeInput/verification-code-input.d.ts +0 -24
  206. package/dist/VerificationCodeInput/verification-code-input.js +0 -99
  207. /package/dist/{PickerView → Form}/types.js +0 -0
@@ -1,13 +1,13 @@
1
- $class-prefix-ellipsis: 'triones-antm-ellipsis';
2
- /* prettier-ignore */
3
- .#{$class-prefix-ellipsis} {
4
- overflow: hidden;
5
- line-height: 1.5;
6
- word-break: break-word;
7
-
8
- &-icon {
9
- display: inline-block;
10
- color: #1677ff;
11
- cursor: pointer;
12
- }
13
- }
1
+ $class-prefix-ellipsis: 'triones-antm-ellipsis';
2
+ /* prettier-ignore */
3
+ .#{$class-prefix-ellipsis} {
4
+ overflow: hidden;
5
+ line-height: 1.5;
6
+ word-break: break-word;
7
+
8
+ &-icon {
9
+ display: inline-block;
10
+ color: #1677ff;
11
+ cursor: pointer;
12
+ }
13
+ }
@@ -1,29 +1,29 @@
1
- .triones-antm-empty {
2
- text-align: center;
3
-
4
- &-wrapper {
5
- width: 100%;
6
- height: 100%;
7
- display: flex;
8
- align-items: center;
9
- justify-content: space-around;
10
- }
11
-
12
- &-image {
13
- //margin-bottom: 8Px;
14
- :global {
15
- img,
16
- image {
17
- width: 100%;
18
- height: 100%;
19
- object-fit: cover;
20
- }
21
- }
22
- }
23
-
24
- &-description {
25
- color: rgba(0, 0, 0, 45%);
26
- font-size: 14Px;
27
- padding: 8Px;
28
- }
29
- }
1
+ .triones-antm-empty {
2
+ text-align: center;
3
+
4
+ &-wrapper {
5
+ width: 100%;
6
+ height: 100%;
7
+ display: flex;
8
+ align-items: center;
9
+ justify-content: space-around;
10
+ }
11
+
12
+ &-image {
13
+ //margin-bottom: 8Px;
14
+ :global {
15
+ img,
16
+ image {
17
+ width: 100%;
18
+ height: 100%;
19
+ object-fit: cover;
20
+ }
21
+ }
22
+ }
23
+
24
+ &-description {
25
+ color: rgba(0, 0, 0, 45%);
26
+ font-size: 14Px;
27
+ padding: 8Px;
28
+ }
29
+ }
@@ -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,62 +1,62 @@
1
- $class-prefix-error-block: 'triones-antm-error-block';
2
- /* prettier-ignore */
3
- .#{$class-prefix-error-block} {
4
- --color: var(--triones-antm-color-text);
5
- --image-height: var(--triones-antm-error-block-image-height, 100PX);
6
- --image-height-full-page: var(
7
- --triones-antm-error-block-image-height-full-page,
8
- 200PX
9
- );
10
- --image-width: var(--triones-antm-error-block-image-width, auto);
11
- --image-width-full-page: var(
12
- --triones-antm-error-block-image-width-full-page,
13
- auto
14
- );
15
- width: 100%;
16
- box-sizing: border-box;
17
- text-align: center;
18
-
19
- &-image {
20
- height: var(--image-height);
21
- width: var(--image-width);
22
- max-width: 100%;
23
-
24
- & svg,
25
- img {
26
- height: 100%;
27
- }
28
- }
29
-
30
- &-description {
31
- font-size: var(--triones-antm-font-size-4);
32
- color: var(--triones-antm-color-weak);
33
- line-height: 1.4;
34
- margin-top: 12PX;
35
- &-title {
36
- font-size: var(--triones-antm-font-size-7);
37
- }
38
- &-subtitle {
39
- margin-top: 8PX;
40
- }
41
- }
42
-
43
- &-content {
44
- margin-top: 12PX;
45
- }
46
-
47
- &-full-page {
48
- padding-top: calc(50vh - var(--image-height-full-page));
49
- .#{$class-prefix-error-block}-image {
50
- height: var(--image-height-full-page);
51
- width: var(--image-width-full-page);
52
- }
53
- .#{$class-prefix-error-block}-description {
54
- margin-top: 20PX;
55
- font-size: var(--triones-antm-font-size-main);
56
- &-title {
57
- font-size: 20PX;
58
- color: var(--triones-antm-color-text);
59
- }
60
- }
61
- }
62
- }
1
+ $class-prefix-error-block: 'triones-antm-error-block';
2
+ /* prettier-ignore */
3
+ .#{$class-prefix-error-block} {
4
+ --color: var(--triones-antm-color-text);
5
+ --image-height: var(--triones-antm-error-block-image-height, 100PX);
6
+ --image-height-full-page: var(
7
+ --triones-antm-error-block-image-height-full-page,
8
+ 200PX
9
+ );
10
+ --image-width: var(--triones-antm-error-block-image-width, auto);
11
+ --image-width-full-page: var(
12
+ --triones-antm-error-block-image-width-full-page,
13
+ auto
14
+ );
15
+ width: 100%;
16
+ box-sizing: border-box;
17
+ text-align: center;
18
+
19
+ &-image {
20
+ height: var(--image-height);
21
+ width: var(--image-width);
22
+ max-width: 100%;
23
+
24
+ & svg,
25
+ img {
26
+ height: 100%;
27
+ }
28
+ }
29
+
30
+ &-description {
31
+ font-size: var(--triones-antm-font-size-4);
32
+ color: var(--triones-antm-color-weak);
33
+ line-height: 1.4;
34
+ margin-top: 12PX;
35
+ &-title {
36
+ font-size: var(--triones-antm-font-size-7);
37
+ }
38
+ &-subtitle {
39
+ margin-top: 8PX;
40
+ }
41
+ }
42
+
43
+ &-content {
44
+ margin-top: 12PX;
45
+ }
46
+
47
+ &-full-page {
48
+ padding-top: calc(50vh - var(--image-height-full-page));
49
+ .#{$class-prefix-error-block}-image {
50
+ height: var(--image-height-full-page);
51
+ width: var(--image-width-full-page);
52
+ }
53
+ .#{$class-prefix-error-block}-description {
54
+ margin-top: 20PX;
55
+ font-size: var(--triones-antm-font-size-main);
56
+ &-title {
57
+ font-size: 20PX;
58
+ color: var(--triones-antm-color-text);
59
+ }
60
+ }
61
+ }
62
+ }
@@ -1,55 +1,55 @@
1
- $class-prefix-footer: 'triones-antm-footer';
2
- /* prettier-ignore */
3
- .#{$class-prefix-footer} {
4
- --background-color: #ffffff;
5
-
6
- color: #333333;
7
- display: flex;
8
- flex-direction: column;
9
- align-items: center;
10
- background-color: var(--background-color);
11
-
12
- &-label {
13
- width: 100%;
14
- .triones-antm-divider {
15
- color: #cccccc;
16
- }
17
- }
18
- &-links {
19
- margin: 8PX 0;
20
- color: #1677ff;
21
- white-space: nowrap;
22
- &-item {
23
- display: inline-block;
24
- }
25
- }
26
- &-content {
27
- display: flex;
28
- align-items: center;
29
- margin: 8PX 0;
30
- color: #cccccc;
31
- }
32
- &-chips {
33
- display: flex;
34
- align-items: center;
35
- white-space: nowrap;
36
- margin: 8PX 0;
37
- }
38
- &-chip {
39
- white-space: nowrap;
40
- margin-right: 20PX;
41
- font-size: 12PX;
42
- background-color: #f5f5f5;
43
- color: #999999;
44
- padding: 4PX 12PX;
45
- border-radius: 100PX;
46
- &-link {
47
- cursor: pointer;
48
- background-color: #e7f1ff;
49
- color: #1677ff;
50
- }
51
- &:last-child {
52
- margin-right: 0;
53
- }
54
- }
55
- }
1
+ $class-prefix-footer: 'triones-antm-footer';
2
+ /* prettier-ignore */
3
+ .#{$class-prefix-footer} {
4
+ --background-color: #ffffff;
5
+
6
+ color: #333333;
7
+ display: flex;
8
+ flex-direction: column;
9
+ align-items: center;
10
+ background-color: var(--background-color);
11
+
12
+ &-label {
13
+ width: 100%;
14
+ .triones-antm-divider {
15
+ color: #cccccc;
16
+ }
17
+ }
18
+ &-links {
19
+ margin: 8PX 0;
20
+ color: #1677ff;
21
+ white-space: nowrap;
22
+ &-item {
23
+ display: inline-block;
24
+ }
25
+ }
26
+ &-content {
27
+ display: flex;
28
+ align-items: center;
29
+ margin: 8PX 0;
30
+ color: #cccccc;
31
+ }
32
+ &-chips {
33
+ display: flex;
34
+ align-items: center;
35
+ white-space: nowrap;
36
+ margin: 8PX 0;
37
+ }
38
+ &-chip {
39
+ white-space: nowrap;
40
+ margin-right: 20PX;
41
+ font-size: 12PX;
42
+ background-color: #f5f5f5;
43
+ color: #999999;
44
+ padding: 4PX 12PX;
45
+ border-radius: 100PX;
46
+ &-link {
47
+ cursor: pointer;
48
+ background-color: #e7f1ff;
49
+ color: #1677ff;
50
+ }
51
+ &:last-child {
52
+ margin-right: 0;
53
+ }
54
+ }
55
+ }
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { FormLayout, FormLayoutAlign, RequiredMark } from "./form";
2
+ import { FormLayout, FormLayoutAlign, RequiredMark } from "./types";
3
3
  export interface FormContextProps {
4
4
  colon?: boolean;
5
5
  layout?: FormLayout;
@@ -8,5 +8,6 @@ export interface FormContextProps {
8
8
  requiredMark?: RequiredMark;
9
9
  form?: any;
10
10
  hiddenError?: boolean;
11
+ extra?: React.ReactNode;
11
12
  }
12
13
  export declare const FormContext: React.Context<FormContextProps>;
@@ -3,13 +3,7 @@ import type { FormProps as RcFormProps } from 'rc-field-form/lib/Form';
3
3
  import type { FormRef } from 'rc-field-form/lib/interface';
4
4
  import React from 'react';
5
5
  import { FormInstance } from './interface';
6
- import './style.scss';
7
- export type RequiredMark = boolean | 'optional' | ((labelNode: React.ReactNode, info: {
8
- required: boolean;
9
- }) => React.ReactNode);
10
- export type FormLayout = 'horizontal' | 'inline' | 'vertical';
11
- export type FormItemLayout = 'horizontal' | 'vertical';
12
- export type FormLayoutAlign = 'left' | 'right';
6
+ import { FormLayout, FormLayoutAlign, RequiredMark } from "./types";
13
7
  export interface FormProps<Values = any> extends Omit<RcFormProps<Values>, 'form' | 'component'> {
14
8
  /**
15
9
  * @description 配置 Form.Item 的 colon 的默认值。表示是否显示 label 后面的冒号 (只有在属性 layout 为 horizontal 时有效)
@@ -38,6 +32,7 @@ export interface FormProps<Values = any> extends Omit<RcFormProps<Values>, 'form
38
32
  * @default false
39
33
  */
40
34
  hiddenError?: boolean;
35
+ extra?: React.ReactNode;
41
36
  }
42
37
  export declare const InternalForm: React.ForwardRefRenderFunction<FormRef, FormProps>;
43
38
  export { useWatch };
package/dist/Form/form.js CHANGED
@@ -1,11 +1,10 @@
1
- var _excluded = ["children", "layout", "labelAlign", "labelWidth", "requiredMark", "hiddenError"];
1
+ var _excluded = ["children", "layout", "labelAlign", "labelWidth", "requiredMark", "hiddenError", "extra"];
2
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
5
  import FieldForm, { useWatch } from 'rc-field-form';
6
6
  import React from 'react';
7
7
  import { FormContext } from "./context";
8
- import "./style.scss";
9
8
  export var InternalForm = function InternalForm(_ref, ref) {
10
9
  var children = _ref.children,
11
10
  layout = _ref.layout,
@@ -14,6 +13,7 @@ export var InternalForm = function InternalForm(_ref, ref) {
14
13
  requiredMark = _ref.requiredMark,
15
14
  _ref$hiddenError = _ref.hiddenError,
16
15
  hiddenError = _ref$hiddenError === void 0 ? false : _ref$hiddenError,
16
+ extra = _ref.extra,
17
17
  props = _objectWithoutProperties(_ref, _excluded);
18
18
  return /*#__PURE__*/React.createElement(FormContext.Provider, {
19
19
  value: {
@@ -21,7 +21,8 @@ export var InternalForm = function InternalForm(_ref, ref) {
21
21
  labelAlign: labelAlign || 'left',
22
22
  labelWidth: labelWidth,
23
23
  requiredMark: requiredMark || true,
24
- hiddenError: hiddenError
24
+ hiddenError: hiddenError,
25
+ extra: extra
25
26
  }
26
27
  }, /*#__PURE__*/React.createElement(FieldForm, _extends({}, props, {
27
28
  component: false
@@ -1,12 +1,14 @@
1
+ import FieldForm from 'rc-field-form';
1
2
  import InternalForm, { FormProps, useWatch } from "./form";
2
- import FormItem, { FormItemProps } from "./FormItem";
3
3
  import useForm from "./hooks/useForm";
4
+ import { FormItemLayout, FormLayout, FormLayoutAlign } from "./types";
5
+ export { useFormContext } from "./hooks/useFormContext";
4
6
  type InternalFormType = typeof InternalForm;
5
7
  type CompoundedComponent = InternalFormType & {
6
8
  useForm: typeof useForm;
7
- Item: typeof FormItem;
9
+ List: typeof FieldForm.List;
8
10
  useWatch: typeof useWatch;
9
11
  };
10
12
  declare const Form: CompoundedComponent;
11
- export type { FormProps, FormItemProps };
13
+ export type { FormProps, FormLayout, FormLayoutAlign, FormItemLayout };
12
14
  export default Form;
@@ -1,8 +1,10 @@
1
+ import FieldForm from 'rc-field-form';
1
2
  import InternalForm, { useWatch } from "./form";
2
- import FormItem from "./FormItem";
3
3
  import useForm from "./hooks/useForm";
4
+ export { useFormContext } from "./hooks/useFormContext";
4
5
  var Form = InternalForm;
6
+ Form.List = FieldForm.List;
5
7
  Form.useForm = useForm;
6
- Form.Item = FormItem;
8
+ // Form.Item = FormItem;
7
9
  Form.useWatch = useWatch;
8
10
  export default Form;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ export type RequiredMark = boolean | 'optional' | ((labelNode: React.ReactNode, info: {
3
+ required: boolean;
4
+ }) => React.ReactNode);
5
+ export type FormLayout = 'horizontal' | 'inline' | 'vertical';
6
+ export type FormItemLayout = 'horizontal' | 'vertical';
7
+ export type FormLayoutAlign = 'left' | 'right';
@@ -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,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 { map, omit } from "lodash";
6
+ import { map, omit } from "lodash-es";
7
7
  import { DemoBlock } from "../../DemoBlock";
8
8
  export default (function () {
9
9
  return /*#__PURE__*/React.createElement(DemoBlock, {
@@ -0,0 +1,9 @@
1
+ import React, { ReactNode } from 'react';
2
+ export interface IndexedStackProps {
3
+ children: ReactNode[];
4
+ activeIndex: number;
5
+ className?: string;
6
+ style?: React.CSSProperties;
7
+ }
8
+ declare const IndexedStack: React.FC<IndexedStackProps>;
9
+ export { IndexedStack };
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ var IndexedStack = function IndexedStack(_ref) {
3
+ var children = _ref.children,
4
+ _ref$activeIndex = _ref.activeIndex,
5
+ activeIndex = _ref$activeIndex === void 0 ? 0 : _ref$activeIndex,
6
+ className = _ref.className,
7
+ style = _ref.style;
8
+ // 确保 activeIndex 在有效范围内
9
+ var validActiveIndex = Math.max(0, Math.min(activeIndex, children.length - 1));
10
+ return /*#__PURE__*/React.createElement("div", {
11
+ className: className,
12
+ style: style
13
+ }, React.Children.map(children, function (child, index) {
14
+ if (! /*#__PURE__*/React.isValidElement(child)) {
15
+ return null;
16
+ }
17
+ return /*#__PURE__*/React.createElement("div", {
18
+ key: index,
19
+ style: {
20
+ display: index === validActiveIndex ? 'block' : 'none',
21
+ width: '100%',
22
+ height: '100%'
23
+ }
24
+ }, child);
25
+ }));
26
+ };
27
+ export { IndexedStack };
@@ -0,0 +1,3 @@
1
+ import { IndexedStack, IndexedStackProps } from './IndexedStack';
2
+ export type { IndexedStackProps };
3
+ export default IndexedStack;
@@ -0,0 +1,2 @@
1
+ import { IndexedStack } from "./IndexedStack";
2
+ export default IndexedStack;
@@ -1,12 +1,15 @@
1
1
  import React from "react";
2
2
  import { FC } from "react";
3
3
  import "./style.scss";
4
+ import { SizeType } from "../types";
4
5
  export type InputNumberProps = {
6
+ size?: SizeType;
5
7
  value?: number;
6
8
  onChange?: (value: number) => void;
7
9
  step?: number;
8
10
  min?: number;
9
11
  max?: number;
12
+ disabled?: boolean;
10
13
  className?: string;
11
14
  style?: React.CSSProperties;
12
15
  };
@@ -13,11 +13,14 @@ import classNames from "classnames";
13
13
  import { AddOutline, MinusOutline } from "../../../antd-mobile-icons-react";
14
14
  import "./style.scss";
15
15
  export var InputNumber = function InputNumber(_ref) {
16
- var value = _ref.value,
16
+ var size = _ref.size,
17
+ value = _ref.value,
17
18
  _onChange = _ref.onChange,
18
19
  step = _ref.step,
19
20
  min = _ref.min,
20
21
  max = _ref.max,
22
+ _ref$disabled = _ref.disabled,
23
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
21
24
  className = _ref.className,
22
25
  style = _ref.style;
23
26
  var _React$useState = React.useState(value || 0),
@@ -38,7 +41,7 @@ export var InputNumber = function InputNumber(_ref) {
38
41
  className: classNames(trionesInputNumberCls, className),
39
42
  style: style
40
43
  }, /*#__PURE__*/React.createElement("div", {
41
- className: classNames("".concat(trionesInputNumberCls, "-button"), _defineProperty({}, "".concat(trionesInputNumberCls, "-button-disabled"), minMatch)),
44
+ className: classNames("".concat(trionesInputNumberCls, "-button"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(trionesInputNumberCls, "-button-sm"), size == 'small'), "".concat(trionesInputNumberCls, "-button-lg"), size == 'large'), "".concat(trionesInputNumberCls, "-button-disabled"), minMatch || disabled)),
42
45
  onClick: function onClick() {
43
46
  if (minMatch) {
44
47
  return;
@@ -49,6 +52,7 @@ export var InputNumber = function InputNumber(_ref) {
49
52
  }
50
53
  }, /*#__PURE__*/React.createElement(MinusOutline, null)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("input", {
51
54
  type: "number",
55
+ disabled: disabled,
52
56
  value: internalValue,
53
57
  onChange: function onChange(e) {
54
58
  var newVal = Number(e.target.value);
@@ -56,7 +60,7 @@ export var InputNumber = function InputNumber(_ref) {
56
60
  _onChange === null || _onChange === void 0 || _onChange(newVal);
57
61
  }
58
62
  })), /*#__PURE__*/React.createElement("div", {
59
- className: classNames("".concat(trionesInputNumberCls, "-button"), _defineProperty({}, "".concat(trionesInputNumberCls, "-button-disabled"), maxMatch)),
63
+ className: classNames("".concat(trionesInputNumberCls, "-button"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(trionesInputNumberCls, "-button-sm"), size == 'small'), "".concat(trionesInputNumberCls, "-button-lg"), size == 'large'), "".concat(trionesInputNumberCls, "-button-disabled"), maxMatch || disabled)),
60
64
  onClick: function onClick() {
61
65
  if (maxMatch) {
62
66
  return;