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

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/dist/ActionSheet/style.scss +52 -52
  3. package/dist/Avatar/demo/base.js +2 -2
  4. package/dist/Avatar/demo/style.scss +6 -6
  5. package/dist/Badge/demo/base.js +2 -2
  6. package/dist/Badge/demo/base.scss +6 -6
  7. package/dist/Button/button.d.ts +2 -1
  8. package/dist/Button/button.js +1 -1
  9. package/dist/Button/demo/base.js +2 -2
  10. package/dist/Button/style.scss +234 -234
  11. package/dist/Calendar/style.scss +85 -85
  12. package/dist/Calendar/touchable-calendar-grid.js +9 -9
  13. package/dist/CalendarDatetimePicker/style.scss +54 -54
  14. package/dist/CalendarDatetimePickerCell/CalendarDatetimePickerCell.d.ts +5 -4
  15. package/dist/CalendarDatetimePickerCell/CalendarDatetimePickerCell.js +7 -6
  16. package/dist/CalendarDatetimePickerCell/demo/base.js +2 -3
  17. package/dist/CalendarDatetimePickerCell/index.d.ts +1 -1
  18. package/dist/CalendarDatetimePickerCell/index.js +1 -1
  19. package/dist/CalendarDatetimePickerCell/style.scss +10 -10
  20. package/dist/CalendarPicker/style.scss +31 -31
  21. package/dist/CalendarPickerCell/CalendarPickerCell.d.ts +2 -2
  22. package/dist/CalendarPickerCell/CalendarPickerCell.js +3 -3
  23. package/dist/CalendarPickerCell/CalendarRangePickerCell.d.ts +2 -2
  24. package/dist/CalendarPickerCell/CalendarRangePickerCell.js +3 -3
  25. package/dist/CalendarPickerCell/demo/base.js +2 -4
  26. package/dist/Card/demo/base.js +2 -2
  27. package/dist/Card/demo/base.scss +18 -18
  28. package/dist/CascaderPicker/style.scss +45 -45
  29. package/dist/CascaderPickerCell/CascaderPickerCell.d.ts +2 -2
  30. package/dist/CascaderPickerCell/CascaderPickerCell.js +3 -3
  31. package/dist/CascaderPickerCell/demo/base.js +1 -2
  32. package/dist/CascaderPickerCell/style.scss +24 -24
  33. package/dist/Cell/demo/base.js +1 -1
  34. package/dist/Checkbox/demo/base.js +2 -2
  35. package/dist/ConfigProvider/demo/base.js +2 -2
  36. package/dist/DemoBlock/index.scss +20 -20
  37. package/dist/DemoDescription/index.scss +3 -3
  38. package/dist/Divider/demo/base.js +2 -2
  39. package/dist/Ellipsis/demo/base.js +2 -2
  40. package/dist/Empty/demo/base.js +2 -2
  41. package/dist/ErrorBlock/demo/base.js +2 -2
  42. package/dist/FloatButton/style.scss +123 -123
  43. package/dist/Footer/demo/base.js +2 -2
  44. package/dist/Form/FormItem/{form-item-input.d.ts → form-item-content.d.ts} +3 -1
  45. package/dist/Form/FormItem/{form-item-input.js → form-item-content.js} +1 -1
  46. package/dist/Form/FormItem/form-item-label.d.ts +3 -3
  47. package/dist/Form/FormItem/form-item-label.js +10 -8
  48. package/dist/Form/FormItem/form-item.d.ts +33 -4
  49. package/dist/Form/FormItem/form-item.js +22 -21
  50. package/dist/Form/demo/input.js +6 -2
  51. package/dist/Form/demo/vertical.js +45 -0
  52. package/dist/Form/index.d.ts +2 -2
  53. package/dist/Form/style.scss +106 -67
  54. package/dist/FormCell/index.d.ts +3 -0
  55. package/dist/FormCell/index.js +2 -0
  56. package/dist/Grid/demo/base.js +2 -2
  57. package/dist/Grid/demo/base.scss +7 -7
  58. package/dist/Icon/demo/base.js +2 -2
  59. package/dist/Image/demo/base.js +2 -2
  60. package/dist/Image/demo/base.scss +4 -4
  61. package/dist/Image/style.scss +30 -30
  62. package/dist/ImagesPreview/style.scss +34 -34
  63. package/dist/ImagesWall/style.scss +70 -70
  64. package/dist/Input/demo/base.js +28 -2
  65. package/dist/Input/index.scss +240 -223
  66. package/dist/Input/input-affix-wrapper.d.ts +3 -1
  67. package/dist/Input/input-affix-wrapper.js +4 -4
  68. package/dist/Input/input.d.ts +3 -1
  69. package/dist/Input/input.js +5 -2
  70. package/dist/Loading/DotLoading.d.ts +1 -0
  71. package/dist/Loading/DotLoading.js +1 -0
  72. package/dist/Loading/SpinLoading.d.ts +1 -0
  73. package/dist/Loading/SpinLoading.js +1 -0
  74. package/dist/Loading/demo/base.d.ts +3 -0
  75. package/dist/{SpinLoading → Loading}/demo/base.js +8 -2
  76. package/dist/Loading/demo/dot-loading.d.ts +3 -0
  77. package/dist/Loading/demo/dot-loading.js +25 -0
  78. package/dist/Loading/index.d.ts +5 -0
  79. package/dist/Loading/index.js +3 -0
  80. package/dist/NavBar/demo/base.scss +5 -5
  81. package/dist/NoticeBar/demo/base.js +2 -2
  82. package/dist/Overlay/style.scss +20 -20
  83. package/dist/PageIndicator/demo/base.js +2 -2
  84. package/dist/Picker/style.scss +44 -44
  85. package/dist/PickerView/style.scss +72 -72
  86. package/dist/Popup/demo/base.js +2 -2
  87. package/dist/Popup/style.scss +129 -129
  88. package/dist/Radio/demo/base.scss +4 -4
  89. package/dist/Result/demo/base.js +2 -2
  90. package/dist/SafeArea/demo/base.scss +18 -18
  91. package/dist/ScrollView/style.scss +19 -19
  92. package/dist/SideBar/side-bar.js +6 -6
  93. package/dist/SideBar/style.scss +85 -85
  94. package/dist/Skeleton/demo/base.d.ts +3 -0
  95. package/dist/Skeleton/demo/base.js +8 -0
  96. package/dist/Skeleton/index.d.ts +3 -0
  97. package/dist/Skeleton/index.js +2 -0
  98. package/dist/Space/demo/base.js +2 -2
  99. package/dist/Swiper/style.scss +54 -54
  100. package/dist/Switch/demo/base.js +2 -2
  101. package/dist/TabBar/demo/base.js +2 -2
  102. package/dist/Tag/demo/base.js +2 -2
  103. package/dist/Tag/demo/style.scss +8 -8
  104. package/dist/Toast/style.scss +63 -63
  105. package/dist/VerificationCodeInput/style.scss +20 -20
  106. package/dist/WaterMark/demo/demo1.js +2 -2
  107. package/dist/WaterMark/demo/demo1.scss +6 -6
  108. package/dist/WaterMark/demo/demo2.js +2 -2
  109. package/dist/index.d.ts +20 -18
  110. package/dist/index.js +2 -1
  111. package/dist/style/variable.scss +1 -1
  112. package/dist/utils/type.js +36 -36
  113. package/dist/utils/with-default-props.js +4 -4
  114. package/package.json +9 -13
  115. package/readme.md +43 -43
  116. package/dist/SpinLoading/index.d.ts +0 -3
  117. package/dist/SpinLoading/index.js +0 -2
  118. /package/dist/{SpinLoading/demo/base.d.ts → Form/demo/vertical.d.ts} +0 -0
@@ -1,223 +1,240 @@
1
- @use "../style/variable" as variable;
2
-
3
- $inputCls: 'triones-antm-input';
4
- $inputAffixWrapperCls: 'triones-antm-input-affix-wrapper';
5
- $inputGroupWrapperCls: 'triones-antm-input-group-wrapper';
6
- $inputPotCls: 'triones-antm-pot';
7
-
8
- $inputSm: 24Px;
9
- $inputMd: 32Px;
10
- $inputLg: 40Px;
11
-
12
- $placeholderColor: #808080;
13
-
14
- .#{$inputCls} {
15
- box-sizing: border-box;
16
- display: inline-block;
17
- position: relative;
18
- width: 100%;
19
- min-width: 0;
20
- transition: all .2s;
21
- outline: none;
22
- box-shadow: none;
23
- border: none;
24
- border-radius: variable.$trionesBorderRadius;
25
- font-size: variable.$trionesInputInputFontSize;
26
- padding: variable.$trionesInputPaddingBlock 0;
27
-
28
- &-sm {
29
- max-height: $inputSm;
30
- }
31
-
32
- &-lg {
33
- max-height: $inputLg;
34
- }
35
-
36
- &::placeholder {
37
- font-size: variable.$trionesInputInputFontSize;
38
- color: $placeholderColor
39
- }
40
-
41
-
42
- }
43
-
44
-
45
- .#{$inputAffixWrapperCls} {
46
- box-sizing: border-box;
47
- position: relative;
48
- display: inline-flex;
49
- align-items: center;
50
- width: 100%;
51
- min-width: 0;
52
- //line-height: variable.$trionesLineHeight;
53
- padding: variable.$trionesInputPaddingBlock 0;
54
- gap: 4Px;
55
-
56
- .#{$inputCls} {
57
- padding: 0;
58
- background-color: transparent;
59
-
60
- &-prifix {
61
- }
62
-
63
- &-suffix {
64
- display: inline-flex;
65
- align-items: center;
66
- flex-shrink: 0;
67
- gap: 4Px;
68
-
69
- .clear-icon {
70
- color: rgba(0, 0, 0, 0.25);
71
-
72
-
73
- &:hover {
74
- color: rgba(0, 0, 0, 0.45);
75
- }
76
- }
77
-
78
- .triones-antm-icon {
79
- cursor: pointer;
80
- }
81
- }
82
- }
83
-
84
- input {
85
- // height: 1.47059em;
86
- line-height: 1.47059;
87
-
88
- &::placeholder {
89
- font-size: variable.$trionesInputInputFontSize;
90
- color: $placeholderColor
91
- }
92
- }
93
- }
94
-
95
- .#{$inputCls} {
96
- &-outlined {
97
- border-radius: variable.$trionesBorderRadius;
98
- border: 1Px solid variable.$trionesBorderColor;
99
- padding-inline: 4Px;
100
- }
101
-
102
- &-filled {
103
- border-radius: variable.$trionesBorderRadius;
104
- background-color: variable.$trionesColorFillTertiary;
105
- padding-inline: 4Px;
106
- border: 0;
107
- }
108
- &-borderless {
109
- border: 0;
110
- }
111
-
112
- &-underlined {
113
- border-top: 0;
114
- border-left: 0;
115
- border-right: 0;
116
- border-bottom: 1Px solid variable.$trionesBorderColor;
117
- }
118
- }
119
-
120
- .#{$inputGroupWrapperCls} {
121
- }
122
-
123
-
124
- .#{$inputPotCls} {
125
- position: relative;
126
- display: inline-flex;
127
- vertical-align: middle;
128
-
129
- &-wrapper {
130
- position: relative;
131
- display: inline-flex;
132
- align-items: center;
133
- flex-wrap: nowrap;
134
- column-gap: 8Px;
135
- }
136
-
137
- &-input {
138
- position: absolute;
139
- background-color: transparent;
140
- z-index: -1;
141
- left: 0;
142
- top: 0;
143
- right: 0;
144
- bottom: 0;
145
- opacity: 0;
146
- -moz-appearance: textfield;
147
-
148
- &::-webkit-outer-spin-button,
149
- &::-webkit-inner-spin-button {
150
- -webkit-appearance: none;
151
- margin: 0;
152
- }
153
- }
154
-
155
- &-item {
156
- text-align: center;
157
- font-size: variable.$trionesInputInputFontSize;
158
- height: 32Px;
159
- width: 32Px;
160
- display: inline-flex;
161
- align-items: center;
162
- justify-content: center;
163
-
164
- &-sm {
165
- width: $inputSm;
166
- height: $inputSm;
167
- }
168
-
169
- &-lg {
170
- width: $inputLg;
171
- height: $inputLg;
172
- }
173
-
174
- &::placeholder {
175
- font-size: variable.$trionesInputInputFontSize;
176
- color: $placeholderColor
177
- }
178
-
179
- &-focus {
180
- &::after {
181
- content: ' ';
182
- height: 100%;
183
- width: 0.5Px;
184
- background-color: #0a0a0a;
185
- transition: transform 0.1s ease;
186
- animation: blink 1s step-end infinite;
187
- }
188
- }
189
-
190
- }
191
-
192
- .#{$inputCls}-outlined {
193
- font-size: variable.$trionesInputInputFontSize;
194
- color: rgba(0, 0, 0, 0.88);
195
- background: #ffffff;
196
- border-width: 1Px;
197
- border-style: solid;
198
- border-color: #d9d9d9;
199
- -webkit-appearance: none;
200
- -moz-appearance: none;
201
- appearance: none;
202
- }
203
- }
204
-
205
-
206
- .#{$inputCls}-textarea {
207
- box-sizing: border-box;
208
- width: 100%;
209
- outline: 0;
210
- padding-block: variable.$trionesInputPaddingBlock;
211
- font-size: variable.$trionesInputInputFontSize;
212
-
213
- &::placeholder {
214
- font-size: variable.$trionesInputInputFontSize;
215
- color: $placeholderColor
216
- }
217
- }
218
-
219
- @keyframes blink {
220
- 50% {
221
- background-color: transparent;
222
- }
223
- }
1
+ @use "../style/variable" as variable;
2
+
3
+ $inputCls: 'triones-antm-input';
4
+ $inputAffixWrapperCls: 'triones-antm-input-affix-wrapper';
5
+ $inputGroupWrapperCls: 'triones-antm-input-group-wrapper';
6
+ $inputPotCls: 'triones-antm-pot';
7
+
8
+ $inputSm: 24Px;
9
+ $inputMd: 32Px;
10
+ $inputLg: 40Px;
11
+
12
+ $placeholderColor: #CCCCCC;
13
+
14
+ .#{$inputCls} {
15
+ box-sizing: border-box;
16
+ display: inline-block;
17
+ position: relative;
18
+ width: 100%;
19
+ min-width: 0;
20
+ transition: all .2s;
21
+ outline: none;
22
+ box-shadow: none;
23
+ border: none;
24
+ border-radius: variable.$trionesBorderRadius;
25
+ font-size: variable.$trionesInputInputFontSize;
26
+ //padding: variable.$trionesInputPaddingBlock 0;
27
+
28
+ &-sm {
29
+ max-height: $inputSm;
30
+ //font-size: variable.$trionesInputPaddingInlineSm 0;
31
+ }
32
+
33
+ &-lg {
34
+ max-height: $inputLg;
35
+ //font-size: variable.$trionesInputPaddingInlineLg 0;
36
+ }
37
+
38
+ &::placeholder {
39
+ font-size: variable.$trionesInputInputFontSize;
40
+ color: $placeholderColor
41
+ }
42
+
43
+
44
+ }
45
+
46
+
47
+ .#{$inputAffixWrapperCls} {
48
+ box-sizing: border-box;
49
+ position: relative;
50
+ display: inline-flex;
51
+ align-items: center;
52
+ width: 100%;
53
+ min-width: 0;
54
+ //line-height: variable.$trionesLineHeight;
55
+ //padding: variable.$trionesInputPaddingBlock 0;
56
+ gap: 4Px;
57
+
58
+ &-small {
59
+ padding: variable.$trionesInputPaddingBlockSm 0;
60
+ font-size: variable.$trionesInputInputFontSizeSm;
61
+ }
62
+
63
+ &-large {
64
+ padding: variable.$trionesInputPaddingBlockLg 0;
65
+ font-size: variable.$trionesInputInputFontSizeLg;
66
+ }
67
+
68
+ .#{$inputCls} {
69
+ padding: 0;
70
+ background-color: transparent;
71
+
72
+ &-prifix {
73
+ }
74
+
75
+ &-suffix {
76
+ display: inline-flex;
77
+ align-items: center;
78
+ flex-shrink: 0;
79
+ gap: 4Px;
80
+
81
+ .clear-icon {
82
+ color: rgba(0, 0, 0, 0.25);
83
+
84
+
85
+ &:hover {
86
+ color: rgba(0, 0, 0, 0.45);
87
+ }
88
+ }
89
+
90
+ .triones-antm-icon {
91
+ cursor: pointer;
92
+ }
93
+ }
94
+ }
95
+
96
+ input {
97
+ // height: 1.47059em;
98
+ line-height: 1.47059;
99
+
100
+ &::placeholder {
101
+ font-size: variable.$trionesInputInputFontSize;
102
+ color: $placeholderColor
103
+ }
104
+ }
105
+ }
106
+
107
+ .#{$inputCls} {
108
+ &-outlined {
109
+ padding-block: variable.$trionesInputPaddingBlock;
110
+ border-radius: variable.$trionesBorderRadius;
111
+ border: 1Px solid variable.$trionesBorderColor;
112
+ padding-inline: 4Px;
113
+ box-sizing: border-box;
114
+ }
115
+
116
+ &-filled {
117
+ border-radius: variable.$trionesBorderRadius;
118
+ background-color: variable.$trionesColorFillTertiary;
119
+ padding-inline: variable.$trionesInputPaddingBlock;
120
+ padding-block: variable.$trionesInputPaddingBlock;
121
+ box-sizing: border-box;
122
+ border: 0;
123
+ }
124
+
125
+ &-borderless {
126
+ border: 0;
127
+ }
128
+
129
+ &-underlined {
130
+ border-top: 0;
131
+ border-left: 0;
132
+ border-right: 0;
133
+ border-bottom: 1Px solid variable.$trionesBorderColor;
134
+ padding-block: variable.$trionesInputPaddingBlock;
135
+ box-sizing: border-box;
136
+ }
137
+ }
138
+
139
+
140
+
141
+ .#{$inputPotCls} {
142
+ position: relative;
143
+ display: inline-flex;
144
+ vertical-align: middle;
145
+
146
+ &-wrapper {
147
+ position: relative;
148
+ display: inline-flex;
149
+ align-items: center;
150
+ flex-wrap: nowrap;
151
+ column-gap: 8Px;
152
+ }
153
+
154
+ &-input {
155
+ position: absolute;
156
+ background-color: transparent;
157
+ z-index: -1;
158
+ left: 0;
159
+ top: 0;
160
+ right: 0;
161
+ bottom: 0;
162
+ opacity: 0;
163
+ -moz-appearance: textfield;
164
+
165
+ &::-webkit-outer-spin-button,
166
+ &::-webkit-inner-spin-button {
167
+ -webkit-appearance: none;
168
+ margin: 0;
169
+ }
170
+ }
171
+
172
+ &-item {
173
+ text-align: center;
174
+ font-size: variable.$trionesInputInputFontSize;
175
+ height: variable.$trionesControlHeight;
176
+ width: variable.$trionesControlHeight;
177
+ display: inline-flex;
178
+ align-items: center;
179
+ justify-content: center;
180
+
181
+ &-sm {
182
+ width: variable.$trionesControlHeightSm;
183
+ height: variable.$trionesControlHeightSm;
184
+ }
185
+
186
+ &-lg {
187
+ width: variable.$trionesControlHeightLg;
188
+ height: variable.$trionesControlHeightLg;
189
+ }
190
+
191
+ &::placeholder {
192
+ font-size: variable.$trionesInputInputFontSize;
193
+ color: $placeholderColor
194
+ }
195
+
196
+ &-focus {
197
+ &::after {
198
+ content: ' ';
199
+ height: 100%;
200
+ width: 0.5Px;
201
+ background-color: #0a0a0a;
202
+ transition: transform 0.1s ease;
203
+ animation: blink 1s step-end infinite;
204
+ }
205
+ }
206
+
207
+ }
208
+
209
+ .#{$inputCls}-outlined {
210
+ font-size: variable.$trionesInputInputFontSize;
211
+ color: rgba(0, 0, 0, 0.88);
212
+ background: #ffffff;
213
+ border-width: 1Px;
214
+ border-style: solid;
215
+ border-color: #d9d9d9;
216
+ -webkit-appearance: none;
217
+ -moz-appearance: none;
218
+ appearance: none;
219
+ }
220
+ }
221
+
222
+
223
+ .#{$inputCls}-textarea {
224
+ box-sizing: border-box;
225
+ width: 100%;
226
+ outline: 0;
227
+ //padding-block: variable.$trionesInputPaddingBlock;
228
+ font-size: variable.$trionesInputInputFontSize;
229
+
230
+ &::placeholder {
231
+ font-size: variable.$trionesInputInputFontSize;
232
+ color: $placeholderColor
233
+ }
234
+ }
235
+
236
+ @keyframes blink {
237
+ 50% {
238
+ background-color: transparent;
239
+ }
240
+ }
@@ -1,7 +1,9 @@
1
1
  import React, { FC, PropsWithChildren } from 'react';
2
2
  import { BaseInputProps } from './base-input';
3
- import { variantType } from "./types";
3
+ import { variantType } from './types';
4
+ import { AntSize } from "@trionesdev/antd-mobile-base-react";
4
5
  export type InputAffixWrapperProps = BaseInputProps & {
6
+ size?: AntSize;
5
7
  prefix?: React.ReactNode;
6
8
  suffix?: React.ReactNode;
7
9
  variant?: variantType;
@@ -1,28 +1,28 @@
1
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
- var _excluded = ["children", "prefix", "suffix", "variant", "allowClear", "value", "onChange", "onClear"];
2
+ var _excluded = ["children", "size", "prefix", "suffix", "variant", "allowClear", "value", "onClear"];
3
3
  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; }
4
4
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
5
5
  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); }
6
6
  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; }
7
7
  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; }
8
- import { CloseCircleFill } from "../../../antd-mobile-icons-react";
9
8
  import classNames from 'classnames';
10
9
  import React from 'react';
11
10
  import { inputAffixWrapperCls, inputCls } from "./types";
11
+ import { CloseCircleFill } from "@trionesdev/antd-mobile-icons-react";
12
12
  export var InputAffixWrapper = function InputAffixWrapper(_ref) {
13
13
  var children = _ref.children,
14
+ size = _ref.size,
14
15
  prefix = _ref.prefix,
15
16
  suffix = _ref.suffix,
16
17
  _ref$variant = _ref.variant,
17
18
  variant = _ref$variant === void 0 ? 'borderless' : _ref$variant,
18
19
  allowClear = _ref.allowClear,
19
20
  value = _ref.value,
20
- onChange = _ref.onChange,
21
21
  onClear = _ref.onClear,
22
22
  rest = _objectWithoutProperties(_ref, _excluded);
23
23
  var innerStyle = rest.style || {};
24
24
  return /*#__PURE__*/React.createElement("div", {
25
- className: classNames([inputAffixWrapperCls, _defineProperty({}, "".concat(inputCls, "-").concat(variant), variant), rest.className]),
25
+ className: classNames([inputAffixWrapperCls, "".concat(inputAffixWrapperCls, "-").concat(size), _defineProperty({}, "".concat(inputCls, "-").concat(variant), variant), rest.className]),
26
26
  style: innerStyle
27
27
  }, prefix && /*#__PURE__*/React.createElement("div", {
28
28
  className: classNames(["".concat(inputCls, "-prefix")])
@@ -1,9 +1,11 @@
1
+ import { AntSize } from '@trionesdev/antd-mobile-base-react';
1
2
  import React, { FC } from 'react';
2
3
  import './index.scss';
3
- import { variantType } from "./types";
4
+ import { variantType } from './types';
4
5
  export type InputProps = {
5
6
  className?: string;
6
7
  style?: React.CSSProperties;
8
+ size?: AntSize;
7
9
  placeholder?: string;
8
10
  type?: 'text' | 'password' | 'textarea';
9
11
  variant?: variantType;
@@ -1,4 +1,4 @@
1
- var _excluded = ["className", "style", "placeholder", "type", "disabled", "allowClear", "prefix", "suffix", "defaultValue", "value", "onChange"];
1
+ var _excluded = ["className", "style", "size", "placeholder", "type", "disabled", "allowClear", "prefix", "suffix", "defaultValue", "value", "onChange"];
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
4
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -15,6 +15,8 @@ import { InputAffixWrapper } from "./input-affix-wrapper";
15
15
  export var Input = function Input(_ref) {
16
16
  var className = _ref.className,
17
17
  style = _ref.style,
18
+ _ref$size = _ref.size,
19
+ size = _ref$size === void 0 ? 'medium' : _ref$size,
18
20
  placeholder = _ref.placeholder,
19
21
  type = _ref.type,
20
22
  disabled = _ref.disabled,
@@ -25,7 +27,7 @@ export var Input = function Input(_ref) {
25
27
  value = _ref.value,
26
28
  _onChange = _ref.onChange,
27
29
  rest = _objectWithoutProperties(_ref, _excluded);
28
- var _React$useState = React.useState(value),
30
+ var _React$useState = React.useState(value || defaultValue),
29
31
  _React$useState2 = _slicedToArray(_React$useState, 2),
30
32
  innerValue = _React$useState2[0],
31
33
  setInnerValue = _React$useState2[1];
@@ -40,6 +42,7 @@ export var Input = function Input(_ref) {
40
42
  return /*#__PURE__*/React.createElement(InputAffixWrapper, _extends({}, rest, {
41
43
  className: className,
42
44
  style: style,
45
+ size: size,
43
46
  placeholder: placeholder,
44
47
  prefix: prefix,
45
48
  suffix: suffix,
@@ -0,0 +1 @@
1
+ export { DotLoading } from '@trionesdev/antd-mobile-base-react';
@@ -0,0 +1 @@
1
+ export { DotLoading } from '@trionesdev/antd-mobile-base-react';
@@ -0,0 +1 @@
1
+ export { SpinLoading } from '@trionesdev/antd-mobile-base-react';
@@ -0,0 +1 @@
1
+ export { SpinLoading } from '@trionesdev/antd-mobile-base-react';
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const _default: () => React.JSX.Element;
3
+ export default _default;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { DemoBlock } from "../../DemoBlock";
3
- import SpinLoading from "../index";
4
3
  import Space from "../../Space";
4
+ import { SpinLoading } from "../../index";
5
5
  export default (function () {
6
6
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DemoBlock, {
7
7
  title: "\u57FA\u7840\u4F7F\u7528"
@@ -9,8 +9,14 @@ export default (function () {
9
9
  title: "\u989C\u8272"
10
10
  }, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(SpinLoading, null), /*#__PURE__*/React.createElement(SpinLoading, {
11
11
  color: "primary"
12
- }), /*#__PURE__*/React.createElement(SpinLoading, {
12
+ }), /*#__PURE__*/React.createElement("div", {
13
+ style: {
14
+ backgroundColor: "#333"
15
+ }
16
+ }, /*#__PURE__*/React.createElement(SpinLoading, {
13
17
  color: "white"
18
+ })), /*#__PURE__*/React.createElement(SpinLoading, {
19
+ color: "red"
14
20
  }))), /*#__PURE__*/React.createElement(DemoBlock, {
15
21
  title: "\u5927\u5C0F"
16
22
  }, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(SpinLoading, {
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const _default: () => React.JSX.Element;
3
+ export default _default;
@@ -0,0 +1,25 @@
1
+ import { DemoBlock } from "../../DemoBlock";
2
+ import React from "react";
3
+ import { DotLoading } from "../../index";
4
+ export default (function () {
5
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DemoBlock, {
6
+ title: "\u57FA\u7840\u4F7F\u7528"
7
+ }, /*#__PURE__*/React.createElement(DotLoading, null)), /*#__PURE__*/React.createElement(DemoBlock, {
8
+ title: "\u57FA\u7840\u4F7F\u7528"
9
+ }, /*#__PURE__*/React.createElement(DotLoading, {
10
+ color: "primary"
11
+ })), /*#__PURE__*/React.createElement(DemoBlock, {
12
+ title: "\u57FA\u7840\u4F7F\u7528"
13
+ }, /*#__PURE__*/React.createElement("div", {
14
+ style: {
15
+ backgroundColor: '#0000004a',
16
+ padding: '10px'
17
+ }
18
+ }, /*#__PURE__*/React.createElement(DotLoading, {
19
+ color: "white"
20
+ }))), /*#__PURE__*/React.createElement(DemoBlock, {
21
+ title: "\u57FA\u7840\u4F7F\u7528"
22
+ }, /*#__PURE__*/React.createElement(DotLoading, {
23
+ color: "red"
24
+ })));
25
+ });
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import type { DotLoadingProps, SpinLoadingProps } from '@trionesdev/antd-mobile-base-react';
3
+ export declare const SpinLoading: import("react").FC<SpinLoadingProps>;
4
+ export declare const DotLoading: import("react").FC<DotLoadingProps>;
5
+ export type { SpinLoadingProps, DotLoadingProps };
@@ -0,0 +1,3 @@
1
+ import { DotLoading as BaseDotLoading, SpinLoading as BaseSpinLoading } from '@trionesdev/antd-mobile-base-react';
2
+ export var SpinLoading = BaseSpinLoading;
3
+ export var DotLoading = BaseDotLoading;
@@ -1,5 +1,5 @@
1
- .my-nav-bar {
2
- &-subtitle {
3
- font-size: 12px;
4
- }
5
- }
1
+ .my-nav-bar {
2
+ &-subtitle {
3
+ font-size: 12px;
4
+ }
5
+ }