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

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 (262) hide show
  1. package/LICENSE +21 -21
  2. package/dist/ActionSheet/ActionSheet.d.ts +25 -0
  3. package/dist/ActionSheet/ActionSheet.js +77 -0
  4. package/dist/ActionSheet/index.d.ts +1 -1
  5. package/dist/ActionSheet/index.js +1 -1
  6. package/dist/ActionSheet/style.scss +52 -0
  7. package/dist/Avatar/demo/base.js +2 -2
  8. package/dist/Avatar/demo/style.scss +6 -6
  9. package/dist/Badge/demo/base.js +2 -2
  10. package/dist/Badge/demo/base.scss +6 -6
  11. package/dist/Button/button.d.ts +2 -1
  12. package/dist/Button/button.js +1 -1
  13. package/dist/Button/demo/base.js +2 -2
  14. package/dist/Button/style.scss +234 -232
  15. package/dist/Calendar/calendar-grid.d.ts +10 -9
  16. package/dist/Calendar/calendar-grid.js +41 -64
  17. package/dist/Calendar/calendar-header.d.ts +3 -2
  18. package/dist/Calendar/calendar-header.js +6 -6
  19. package/dist/Calendar/calendar-range.d.ts +4 -3
  20. package/dist/Calendar/calendar-range.js +12 -11
  21. package/dist/Calendar/calendar.d.ts +5 -4
  22. package/dist/Calendar/calendar.js +23 -14
  23. package/dist/Calendar/style.scss +85 -85
  24. package/dist/Calendar/touchable-calendar-grid.d.ts +6 -5
  25. package/dist/Calendar/touchable-calendar-grid.js +67 -59
  26. package/dist/CalendarDatetimePicker/CalendarDatetimePicker.d.ts +3 -2
  27. package/dist/CalendarDatetimePicker/CalendarDatetimePicker.js +14 -28
  28. package/dist/CalendarDatetimePicker/DateTimeSwitch.d.ts +3 -2
  29. package/dist/CalendarDatetimePicker/DateTimeSwitch.js +4 -3
  30. package/dist/CalendarDatetimePicker/demo/base.js +1 -1
  31. package/dist/CalendarDatetimePicker/style.scss +54 -54
  32. package/dist/CalendarDatetimePicker/types.d.ts +1 -1
  33. package/dist/CalendarDatetimePicker/types.js +1 -1
  34. package/dist/CalendarDatetimePickerCell/CalendarDatetimePickerCell.d.ts +11 -0
  35. package/dist/CalendarDatetimePickerCell/CalendarDatetimePickerCell.js +61 -0
  36. package/dist/{Mask → CalendarDatetimePickerCell}/demo/base.js +9 -15
  37. package/dist/CalendarDatetimePickerCell/index.d.ts +3 -0
  38. package/dist/CalendarDatetimePickerCell/index.js +2 -0
  39. package/dist/CalendarDatetimePickerCell/style.scss +10 -0
  40. package/dist/CalendarDatetimePickerCell/types.d.ts +1 -0
  41. package/dist/CalendarDatetimePickerCell/types.js +1 -0
  42. package/dist/CalendarPicker/calendar-picker.js +2 -2
  43. package/dist/CalendarPicker/calendar-range-picker.d.ts +4 -4
  44. package/dist/CalendarPicker/calendar-range-picker.js +11 -9
  45. package/dist/CalendarPicker/demo/base.js +6 -6
  46. package/dist/CalendarPicker/index.d.ts +2 -2
  47. package/dist/CalendarPicker/index.js +3 -3
  48. package/dist/CalendarPicker/style.scss +31 -31
  49. package/dist/CalendarPicker/types.d.ts +8 -7
  50. package/dist/CalendarPickerCell/CalendarPickerCell.d.ts +11 -0
  51. package/dist/CalendarPickerCell/CalendarPickerCell.js +54 -0
  52. package/dist/CalendarPickerCell/CalendarRangePickerCell.d.ts +11 -0
  53. package/dist/CalendarPickerCell/CalendarRangePickerCell.js +56 -0
  54. package/dist/CalendarPickerCell/demo/base.d.ts +3 -0
  55. package/dist/CalendarPickerCell/demo/base.js +31 -0
  56. package/dist/CalendarPickerCell/index.d.ts +8 -0
  57. package/dist/CalendarPickerCell/index.js +5 -0
  58. package/dist/Card/demo/base.js +2 -2
  59. package/dist/Card/demo/base.scss +18 -18
  60. package/dist/CascaderPicker/cascader-picker.d.ts +27 -0
  61. package/dist/CascaderPicker/cascader-picker.js +90 -0
  62. package/dist/CascaderPicker/demo/base.js +1 -4
  63. package/dist/CascaderPicker/index.d.ts +1 -1
  64. package/dist/CascaderPicker/index.js +1 -1
  65. package/dist/CascaderPicker/style.scss +45 -0
  66. package/dist/CascaderPickerCell/CascaderPickerCell.d.ts +21 -0
  67. package/dist/CascaderPickerCell/CascaderPickerCell.js +70 -0
  68. package/dist/CascaderPickerCell/demo/base.js +71 -0
  69. package/dist/CascaderPickerCell/index.d.ts +3 -0
  70. package/dist/CascaderPickerCell/index.js +2 -0
  71. package/dist/CascaderPickerCell/style.scss +24 -0
  72. package/dist/Cell/demo/base.js +41 -2
  73. package/dist/Checkbox/demo/base.js +11 -6
  74. package/dist/Checkbox/demo/disabled.js +2 -1
  75. package/dist/ConfigProvider/demo/base.js +2 -2
  76. package/dist/DemoBlock/index.d.ts +6 -0
  77. package/dist/DemoBlock/index.js +9 -2
  78. package/dist/DemoBlock/index.scss +20 -20
  79. package/dist/DemoDescription/index.scss +3 -3
  80. package/dist/Divider/demo/base.js +2 -2
  81. package/dist/Ellipsis/demo/base.js +2 -2
  82. package/dist/Empty/demo/base.js +2 -2
  83. package/dist/ErrorBlock/demo/base.js +2 -2
  84. package/dist/FetchPicker/FetchPicker.d.ts +113 -0
  85. package/dist/FetchPicker/FetchPicker.js +319 -0
  86. package/dist/FetchPicker/index.d.ts +4 -0
  87. package/dist/FetchPicker/index.js +3 -0
  88. package/dist/FetchPicker/styles.scss +118 -0
  89. package/dist/FloatButton/FloatButton.d.ts +21 -0
  90. package/dist/FloatButton/FloatButton.js +66 -0
  91. package/dist/FloatButton/FloatButtonGroup.d.ts +21 -0
  92. package/dist/FloatButton/FloatButtonGroup.js +120 -0
  93. package/dist/FloatButton/context.d.ts +13 -0
  94. package/dist/FloatButton/context.js +2 -0
  95. package/dist/FloatButton/demo/base.d.ts +3 -0
  96. package/dist/FloatButton/demo/base.js +10 -0
  97. package/dist/FloatButton/demo/group.d.ts +3 -0
  98. package/dist/FloatButton/demo/group.js +20 -0
  99. package/dist/FloatButton/demo/square.d.ts +3 -0
  100. package/dist/FloatButton/demo/square.js +12 -0
  101. package/dist/FloatButton/index.d.ts +10 -0
  102. package/dist/FloatButton/index.js +5 -0
  103. package/dist/FloatButton/style.scss +123 -0
  104. package/dist/Footer/demo/base.js +2 -2
  105. package/dist/Form/FormItem/form-item-content.d.ts +17 -0
  106. package/dist/Form/FormItem/form-item-content.js +39 -0
  107. package/dist/Form/FormItem/form-item-label.d.ts +13 -0
  108. package/dist/Form/FormItem/form-item-label.js +29 -0
  109. package/dist/Form/FormItem/form-item.d.ts +51 -0
  110. package/dist/Form/FormItem/form-item.js +74 -0
  111. package/dist/Form/FormItem/index.d.ts +5 -0
  112. package/dist/Form/FormItem/index.js +3 -0
  113. package/dist/Form/demo/input.js +7 -3
  114. package/dist/Form/demo/vertical.d.ts +3 -0
  115. package/dist/Form/demo/vertical.js +45 -0
  116. package/dist/Form/index.d.ts +9 -2
  117. package/dist/Form/index.js +5 -1
  118. package/dist/Form/style.scss +106 -0
  119. package/dist/FormCell/index.d.ts +3 -0
  120. package/dist/FormCell/index.js +2 -0
  121. package/dist/Grid/demo/base.js +2 -2
  122. package/dist/Grid/demo/base.scss +7 -7
  123. package/dist/Icon/demo/base.js +2 -2
  124. package/dist/Image/demo/base.js +2 -2
  125. package/dist/Image/demo/base.scss +4 -4
  126. package/dist/Image/style.scss +30 -30
  127. package/dist/ImagesPreview/ImagesPreview.js +2 -2
  128. package/dist/ImagesPreview/style.scss +34 -34
  129. package/dist/ImagesWall/CameraModal.js +2 -2
  130. package/dist/ImagesWall/style.scss +70 -70
  131. package/dist/Input/base-input.d.ts +13 -0
  132. package/dist/Input/base-input.js +41 -0
  133. package/dist/Input/demo/base.js +115 -13
  134. package/dist/Input/index.d.ts +14 -2
  135. package/dist/Input/index.js +11 -1
  136. package/dist/Input/index.scss +240 -0
  137. package/dist/Input/input-affix-wrapper.d.ts +13 -0
  138. package/dist/Input/input-affix-wrapper.js +37 -0
  139. package/dist/Input/input-opt.d.ts +16 -0
  140. package/dist/Input/input-opt.js +87 -0
  141. package/dist/Input/input-password.d.ts +7 -0
  142. package/dist/Input/input-password.js +48 -0
  143. package/dist/Input/input.d.ts +20 -0
  144. package/dist/Input/input.js +66 -0
  145. package/dist/Input/textarea.d.ts +15 -0
  146. package/dist/Input/textarea.js +51 -0
  147. package/dist/Input/types.d.ts +3 -0
  148. package/dist/Input/types.js +2 -0
  149. package/dist/Loading/DotLoading.d.ts +1 -0
  150. package/dist/Loading/DotLoading.js +1 -0
  151. package/dist/Loading/SpinLoading.d.ts +1 -0
  152. package/dist/Loading/SpinLoading.js +1 -0
  153. package/dist/Loading/demo/base.d.ts +3 -0
  154. package/dist/{SpinLoading → Loading}/demo/base.js +8 -2
  155. package/dist/Loading/demo/dot-loading.d.ts +3 -0
  156. package/dist/Loading/demo/dot-loading.js +25 -0
  157. package/dist/Loading/index.d.ts +5 -0
  158. package/dist/Loading/index.js +3 -0
  159. package/dist/NavBar/demo/base.scss +5 -5
  160. package/dist/NoticeBar/demo/base.js +2 -2
  161. package/dist/Overlay/Overlay.d.ts +16 -0
  162. package/dist/Overlay/Overlay.js +117 -0
  163. package/dist/Overlay/demo/base.d.ts +3 -0
  164. package/dist/Overlay/demo/base.js +27 -0
  165. package/dist/Overlay/index.d.ts +4 -0
  166. package/dist/Overlay/index.js +3 -0
  167. package/dist/Overlay/style.scss +20 -0
  168. package/dist/PageIndicator/demo/base.js +2 -2
  169. package/dist/Picker/index.d.ts +1 -1
  170. package/dist/Picker/index.js +1 -1
  171. package/dist/Picker/picker.d.ts +20 -0
  172. package/dist/Picker/picker.js +94 -0
  173. package/dist/Picker/style.scss +44 -0
  174. package/dist/PickerView/index.d.ts +2 -1
  175. package/dist/PickerView/index.js +1 -1
  176. package/dist/PickerView/picker-view-column-item.d.ts +7 -0
  177. package/dist/PickerView/picker-view-column-item.js +11 -0
  178. package/dist/PickerView/picker-view-column.d.ts +10 -0
  179. package/dist/PickerView/picker-view-column.js +117 -0
  180. package/dist/PickerView/picker-view.d.ts +12 -0
  181. package/dist/PickerView/picker-view.js +60 -0
  182. package/dist/PickerView/style.scss +72 -0
  183. package/dist/PickerView/types.d.ts +4 -0
  184. package/dist/PickerView/types.js +1 -0
  185. package/dist/Popup/demo/base.js +109 -27
  186. package/dist/Popup/index.d.ts +2 -1
  187. package/dist/Popup/index.js +2 -1
  188. package/dist/Popup/popup.d.ts +31 -0
  189. package/dist/Popup/popup.js +87 -0
  190. package/dist/Popup/style.scss +129 -0
  191. package/dist/Progress/index.d.ts +1 -1
  192. package/dist/Progress/index.js +1 -1
  193. package/dist/Radio/demo/base.js +2 -2
  194. package/dist/Radio/demo/base.scss +4 -4
  195. package/dist/Result/demo/base.js +2 -2
  196. package/dist/SafeArea/demo/base.scss +18 -18
  197. package/dist/ScrollView/index.d.ts +2 -1
  198. package/dist/ScrollView/index.js +1 -1
  199. package/dist/ScrollView/scroll-view.d.ts +4 -0
  200. package/dist/ScrollView/scroll-view.js +55 -0
  201. package/dist/ScrollView/style.scss +19 -0
  202. package/dist/ScrollView/types.d.ts +26 -0
  203. package/dist/ScrollView/types.js +1 -0
  204. package/dist/Segmented/demo/base.d.ts +3 -0
  205. package/dist/Segmented/demo/base.js +33 -0
  206. package/dist/Segmented/index.d.ts +3 -0
  207. package/dist/Segmented/index.js +2 -0
  208. package/dist/SideBar/index.d.ts +1 -1
  209. package/dist/SideBar/side-bar.js +6 -6
  210. package/dist/SideBar/style.scss +85 -85
  211. package/dist/Skeleton/demo/base.d.ts +3 -0
  212. package/dist/Skeleton/demo/base.js +8 -0
  213. package/dist/Skeleton/index.d.ts +3 -0
  214. package/dist/Skeleton/index.js +2 -0
  215. package/dist/Space/demo/base.js +2 -2
  216. package/dist/Stepper/demo/base.d.ts +3 -0
  217. package/dist/Stepper/demo/base.js +23 -0
  218. package/dist/Stepper/index.d.ts +3 -0
  219. package/dist/Stepper/index.js +2 -0
  220. package/dist/Swiper/style.scss +54 -54
  221. package/dist/Switch/demo/base.js +2 -2
  222. package/dist/TabBar/demo/base.js +2 -2
  223. package/dist/Tag/demo/base.js +2 -2
  224. package/dist/Tag/demo/style.scss +8 -8
  225. package/dist/Toast/style.scss +63 -63
  226. package/dist/Toast/toast-modal.js +4 -4
  227. package/dist/VerificationCodeInput/demo/base.js +2 -2
  228. package/dist/VerificationCodeInput/index.d.ts +2 -2
  229. package/dist/VerificationCodeInput/index.js +1 -1
  230. package/dist/VerificationCodeInput/style.scss +20 -0
  231. package/dist/VerificationCodeInput/verification-code-input.d.ts +24 -0
  232. package/dist/VerificationCodeInput/verification-code-input.js +99 -0
  233. package/dist/WaterMark/demo/demo1.js +2 -2
  234. package/dist/WaterMark/demo/demo1.scss +6 -6
  235. package/dist/WaterMark/demo/demo2.js +2 -2
  236. package/dist/index.d.ts +33 -19
  237. package/dist/index.js +9 -2
  238. package/dist/style/variable.scss +1 -1
  239. package/dist/types.d.ts +0 -8
  240. package/dist/types.js +0 -1
  241. package/dist/utils/dayjs.d.ts +4 -0
  242. package/dist/utils/dayjs.js +42 -0
  243. package/dist/utils/type.js +36 -36
  244. package/dist/utils/use-isomorphic-update-layout-effect.d.ts +1 -1
  245. package/dist/utils/with-default-props.js +4 -4
  246. package/package.json +11 -16
  247. package/readme.md +43 -43
  248. package/dist/Mask/index.d.ts +0 -3
  249. package/dist/Mask/index.js +0 -2
  250. package/dist/Progress/Progress.d.ts +0 -37
  251. package/dist/Progress/Progress.js +0 -52
  252. package/dist/Progress/ProgressCircle.d.ts +0 -17
  253. package/dist/Progress/ProgressCircle.js +0 -148
  254. package/dist/Progress/ProgressLine.d.ts +0 -15
  255. package/dist/Progress/ProgressLine.js +0 -87
  256. package/dist/Progress/style.scss +0 -33
  257. package/dist/Progress/types.d.ts +0 -4
  258. package/dist/Progress/types.js +0 -2
  259. package/dist/SpinLoading/index.d.ts +0 -3
  260. package/dist/SpinLoading/index.js +0 -2
  261. /package/dist/{Mask → CalendarDatetimePickerCell}/demo/base.d.ts +0 -0
  262. /package/dist/{SpinLoading → CascaderPickerCell}/demo/base.d.ts +0 -0
@@ -1,232 +1,234 @@
1
- @use "../style/variable" as *;
2
-
3
- $trionesButtonPendingInlineSm: 7Px;
4
- $trionesButtonHeightSm: 24Px;
5
-
6
- $trionesButtonPendingInline: 15Px;
7
- $trionesButtonHeight: 32Px;
8
-
9
- $trionesButtonContentFontSizeLg: $trionesFontSizeLg;
10
- $trionesButtonPendingInlineLg: 15Px;
11
- $trionesButtonHeightLg: 40Px;
12
-
13
- // 定义常用颜色变量以提高可维护性
14
- $buttonBackgroundColor: #ffffff;
15
- $buttonDarkTextColor: rgba(0, 0, 0, 0.75);
16
- $buttonLightTextColor: rgba(0, 0, 0, 0.06);
17
-
18
- button::after {
19
- content: none;
20
- width: 100%;
21
- }
22
-
23
- $buttonCls: 'triones-antm-button';
24
- .#{$buttonCls} {
25
- width: auto;
26
- position: relative;
27
- display: inline-flex;
28
- flex-direction: column;
29
- justify-self: center;
30
- align-items: center;
31
- justify-content: center;
32
- height: auto;
33
- line-height: normal;
34
- border-radius: 4Px;
35
- border: 1Px none;
36
- box-sizing: border-box;
37
- font-size: 14Px;
38
- z-index: 2;
39
- margin-top: 0;
40
-
41
- &:active {
42
- filter: brightness(92%);
43
- }
44
- &::after{
45
- content: none;
46
- }
47
-
48
- &[disabled] {
49
- opacity: 0.4;
50
-
51
- &:active {
52
- filter: none;
53
- }
54
- }
55
-
56
- &-color {
57
- &-default {
58
- background-color: $buttonBackgroundColor;
59
-
60
- &.#{$buttonCls} {
61
- &-variant {
62
- &-solid {
63
- color: $buttonBackgroundColor;
64
- background-color: $buttonDarkTextColor;
65
- box-shadow: inset 0 0 0 1px $buttonDarkTextColor;
66
- }
67
-
68
- &-outlined {
69
- color: $buttonDarkTextColor;
70
- border: 1px solid $buttonDarkTextColor;
71
- background-color: $buttonBackgroundColor;
72
- }
73
-
74
- &-dashed {
75
- color: $buttonDarkTextColor;
76
- border: 1px dashed $buttonDarkTextColor;
77
- background-color: $buttonBackgroundColor;
78
- }
79
-
80
- &-filled {
81
- color: $buttonDarkTextColor;
82
- background-color: $buttonLightTextColor;
83
- }
84
-
85
- &-text {
86
- color: $buttonDarkTextColor;
87
- background-color: $buttonBackgroundColor;
88
- }
89
-
90
- &-link {
91
- color: $buttonDarkTextColor;
92
- background-color: $buttonBackgroundColor;
93
-
94
- &:active {
95
- filter: none;
96
- }
97
- }
98
- }
99
- }
100
- }
101
-
102
- &-primary {
103
- &.#{$buttonCls} {
104
- &-variant {
105
- &-solid {
106
- color: $buttonBackgroundColor;
107
- background-color: $trionesColorPrimaryText;
108
- box-shadow: inset 0 0 0 1px $trionesColorPrimaryText;
109
- }
110
-
111
- &-outlined {
112
- color: #1677ff;
113
- background-color: $buttonBackgroundColor;
114
- border: 1px solid $trionesColorPrimaryText;
115
- }
116
-
117
- &-dashed {
118
- color: $trionesColorPrimaryText;
119
- border: 1px dashed $trionesColorPrimaryText;
120
- background-color: $buttonBackgroundColor;
121
- }
122
-
123
- &-filled {
124
- color: $trionesColorPrimaryText;
125
- background-color: $trionesColorPrimaryBg;
126
- }
127
-
128
- &-text {
129
- color: $trionesColorPrimaryText;
130
- background-color: $buttonBackgroundColor;
131
- }
132
-
133
- &-link {
134
- color: $trionesColorPrimaryText;
135
- background-color: $buttonBackgroundColor;
136
-
137
- &:active {
138
- filter: none;
139
- }
140
- }
141
- }
142
- }
143
- }
144
-
145
- &-danger {
146
- &.#{$buttonCls} {
147
- &-variant {
148
- &-solid {
149
- color: $buttonBackgroundColor;
150
- background-color: $trionesColorErrorText;
151
- box-shadow: inset 0 0 0 1px $trionesColorErrorText;
152
- }
153
-
154
- &-outlined {
155
- color: $trionesColorErrorText;
156
- background-color: $buttonBackgroundColor;
157
- border: 1px solid $trionesColorErrorText;
158
- }
159
-
160
- &-dashed {
161
- color: $trionesColorErrorText;
162
- border: 1px dashed $trionesColorErrorText;
163
- background-color: $buttonBackgroundColor;
164
- }
165
-
166
- &-filled {
167
- color: $trionesColorErrorText;
168
- background-color: #ffdfdc;
169
- }
170
-
171
- &-text {
172
- color: $trionesColorErrorText;
173
- background-color: $buttonBackgroundColor;
174
- }
175
-
176
- &-link {
177
- color: $trionesColorErrorText;
178
- background-color: $buttonBackgroundColor;
179
-
180
- &:active {
181
- filter: none;
182
- }
183
- }
184
- }
185
- }
186
- }
187
- }
188
-
189
- &-variant {
190
- &-outlined {
191
- background-color: $buttonBackgroundColor;
192
- }
193
-
194
- &-dashed {
195
- border: 1px dashed #d9d9d9;
196
- background-color: $buttonBackgroundColor;
197
- }
198
-
199
- &-text {
200
- background-color: $buttonBackgroundColor;
201
- }
202
-
203
- &-link {
204
- background-color: $buttonBackgroundColor;
205
- }
206
- }
207
-
208
- &-block {
209
- display: flex;
210
- width: 100%;
211
- }
212
-
213
- &-small {
214
- font-size: $trionesFontSizeSm;
215
- padding-inline: $trionesButtonPendingInlineSm;
216
- height: $trionesButtonHeightSm;
217
- border-radius: $trionesBorderRadiusSm;
218
- }
219
-
220
- &-middle {
221
- padding-inline: $trionesButtonPendingInline;
222
- height: $trionesButtonHeight;
223
- border-radius: $trionesBorderRadius;
224
- }
225
-
226
- &-large {
227
- font-size: $trionesButtonContentFontSizeLg;
228
- padding-inline: $trionesButtonPendingInlineLg;
229
- height: $trionesButtonHeightLg;
230
- border-radius: $trionesBorderRadiusLg;
231
- }
232
- }
1
+ @use "../style/variable" as variable;
2
+
3
+ $trionesButtonPendingInlineSm: 7Px;
4
+ $trionesButtonHeightSm: 24Px;
5
+
6
+ $trionesButtonPendingInline: 15Px;
7
+ $trionesButtonHeight: 32Px;
8
+
9
+ $trionesButtonContentFontSizeLg: variable.$trionesFontSizeLg;
10
+ $trionesButtonPendingInlineLg: 15Px;
11
+ $trionesButtonHeightLg: 40Px;
12
+
13
+ // 定义常用颜色变量以提高可维护性
14
+ $buttonBackgroundColor: #ffffff;
15
+ $buttonColorPrimary: variable.$trionesColorPrimary!default;
16
+ $buttonColorError: variable.$trionesColorError!default;
17
+ $buttonDarkColor: rgba(0, 0, 0, 0.75);
18
+ $buttonLightColor: rgba(0, 0, 0, 0.06);
19
+
20
+ button::after {
21
+ content: none;
22
+ width: 100%;
23
+ }
24
+
25
+ $buttonCls: 'triones-antm-button';
26
+ .#{$buttonCls} {
27
+ width: auto;
28
+ position: relative;
29
+ display: inline-flex;
30
+ flex-direction: column;
31
+ justify-self: center;
32
+ align-items: center;
33
+ justify-content: center;
34
+ height: auto;
35
+ line-height: normal;
36
+ border-radius: 4Px;
37
+ border: 1Px none;
38
+ box-sizing: border-box;
39
+ font-size: 14Px;
40
+ z-index: 2;
41
+ margin-top: 0;
42
+
43
+ &:active {
44
+ filter: brightness(92%);
45
+ }
46
+ &::after{
47
+ content: none;
48
+ }
49
+
50
+ &[disabled] {
51
+ opacity: 0.4;
52
+
53
+ &:active {
54
+ filter: none;
55
+ }
56
+ }
57
+
58
+ &-color {
59
+ &-default {
60
+ background-color: $buttonBackgroundColor;
61
+
62
+ &.#{$buttonCls} {
63
+ &-variant {
64
+ &-solid {
65
+ color: $buttonBackgroundColor;
66
+ background-color: $buttonDarkColor;
67
+ box-shadow: inset 0 0 0 1px $buttonDarkColor;
68
+ }
69
+
70
+ &-outlined {
71
+ color: $buttonDarkColor;
72
+ border: 1px solid $buttonDarkColor;
73
+ background-color: $buttonBackgroundColor;
74
+ }
75
+
76
+ &-dashed {
77
+ color: $buttonDarkColor;
78
+ border: 1px dashed $buttonDarkColor;
79
+ background-color: $buttonBackgroundColor;
80
+ }
81
+
82
+ &-filled {
83
+ color: $buttonDarkColor;
84
+ background-color: $buttonLightColor;
85
+ }
86
+
87
+ &-text {
88
+ color: $buttonDarkColor;
89
+ background-color: $buttonBackgroundColor;
90
+ }
91
+
92
+ &-link {
93
+ color: $buttonDarkColor;
94
+ background-color: $buttonBackgroundColor;
95
+
96
+ &:active {
97
+ filter: none;
98
+ }
99
+ }
100
+ }
101
+ }
102
+ }
103
+
104
+ &-primary {
105
+ &.#{$buttonCls} {
106
+ &-variant {
107
+ &-solid {
108
+ color: $buttonBackgroundColor;
109
+ background-color: $buttonColorPrimary;
110
+ box-shadow: inset 0 0 0 1px $buttonColorPrimary;
111
+ }
112
+
113
+ &-outlined {
114
+ color: $buttonColorPrimary;
115
+ background-color: $buttonBackgroundColor;
116
+ border: 1px solid $buttonColorPrimary;
117
+ }
118
+
119
+ &-dashed {
120
+ color: $buttonColorPrimary;
121
+ border: 1px dashed $buttonColorPrimary;
122
+ background-color: $buttonBackgroundColor;
123
+ }
124
+
125
+ &-filled {
126
+ color: $buttonColorPrimary;
127
+ background-color: variable.$trionesColorPrimaryBg;
128
+ }
129
+
130
+ &-text {
131
+ color: $buttonColorPrimary;
132
+ background-color: $buttonBackgroundColor;
133
+ }
134
+
135
+ &-link {
136
+ color: $buttonColorPrimary;
137
+ background-color: $buttonBackgroundColor;
138
+
139
+ &:active {
140
+ filter: none;
141
+ }
142
+ }
143
+ }
144
+ }
145
+ }
146
+
147
+ &-danger {
148
+ &.#{$buttonCls} {
149
+ &-variant {
150
+ &-solid {
151
+ color: $buttonBackgroundColor;
152
+ background-color: $buttonColorError;
153
+ box-shadow: inset 0 0 0 1px $buttonColorError;
154
+ }
155
+
156
+ &-outlined {
157
+ color: $buttonColorError;
158
+ background-color: $buttonBackgroundColor;
159
+ border: 1px solid $buttonColorError;
160
+ }
161
+
162
+ &-dashed {
163
+ color: $buttonColorError;
164
+ border: 1px dashed $buttonColorError;
165
+ background-color: $buttonBackgroundColor;
166
+ }
167
+
168
+ &-filled {
169
+ color: $buttonColorError;
170
+ background-color: #ffdfdc;
171
+ }
172
+
173
+ &-text {
174
+ color: $buttonColorError;
175
+ background-color: $buttonBackgroundColor;
176
+ }
177
+
178
+ &-link {
179
+ color: $buttonColorError;
180
+ background-color: $buttonBackgroundColor;
181
+
182
+ &:active {
183
+ filter: none;
184
+ }
185
+ }
186
+ }
187
+ }
188
+ }
189
+ }
190
+
191
+ &-variant {
192
+ &-outlined {
193
+ background-color: $buttonBackgroundColor;
194
+ }
195
+
196
+ &-dashed {
197
+ border: 1px dashed #d9d9d9;
198
+ background-color: $buttonBackgroundColor;
199
+ }
200
+
201
+ &-text {
202
+ background-color: $buttonBackgroundColor;
203
+ }
204
+
205
+ &-link {
206
+ background-color: $buttonBackgroundColor;
207
+ }
208
+ }
209
+
210
+ &-block {
211
+ display: flex;
212
+ width: 100%;
213
+ }
214
+
215
+ &-small {
216
+ font-size: variable.$trionesFontSizeSm;
217
+ padding-inline: $trionesButtonPendingInlineSm;
218
+ height: $trionesButtonHeightSm;
219
+ border-radius: variable.$trionesBorderRadiusSm;
220
+ }
221
+
222
+ &-medium {
223
+ padding-inline: $trionesButtonPendingInline;
224
+ height: $trionesButtonHeight;
225
+ border-radius: variable.$trionesBorderRadius;
226
+ }
227
+
228
+ &-large {
229
+ font-size: $trionesButtonContentFontSizeLg;
230
+ padding-inline: $trionesButtonPendingInlineLg;
231
+ height: $trionesButtonHeightLg;
232
+ border-radius: variable.$trionesBorderRadiusLg;
233
+ }
234
+ }
@@ -1,27 +1,28 @@
1
1
  import { FC } from 'react';
2
2
  import './style.scss';
3
+ import dayjs from "dayjs";
3
4
  export type CalendarGridProps = {
4
- mouth?: Date;
5
+ month?: dayjs.Dayjs;
5
6
  /**
6
7
  * @description 值,如果是区间模式,则 0,1 索引的值有效,0是开始时间,1是结束时间
7
8
  */
8
- value?: Date[];
9
+ value?: (dayjs.Dayjs | Date)[];
9
10
  /**
10
11
  * @description 默认值,如果是区间模式,则 0,1 索引的值有效,0是开始时间,1是结束时间
11
12
  */
12
- defaultValue?: Date[];
13
- onChange?: (value: Date[]) => void;
13
+ defaultValue?: (dayjs.Dayjs | Date)[];
14
+ onChange?: (value: dayjs.Dayjs[]) => void;
14
15
  /**
15
16
  * @description 是否为范围选择
16
17
  */
17
18
  range?: boolean;
18
- onSelect?: (date: Date) => void;
19
+ onSelect?: (date: dayjs.Dayjs) => void;
19
20
  };
20
21
  export type CalendarCellProps = {
21
- mouth?: Date;
22
- date?: Date;
23
- value?: Date[];
22
+ month?: dayjs.Dayjs;
23
+ date?: dayjs.Dayjs;
24
+ value?: dayjs.Dayjs[];
24
25
  range?: boolean;
25
- onSelect?: (date: Date) => void;
26
+ onSelect?: (date: dayjs.Dayjs) => void;
26
27
  };
27
28
  export declare const CalendarGrid: FC<CalendarGridProps>;