tntd 2.8.0-beta.5 → 2.8.0-beta.7

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 (280) hide show
  1. package/es/check-card/index.js +2 -3
  2. package/es/check-card/index.js.map +1 -1
  3. package/es/color-picker/ColorPicker.js +4 -6
  4. package/es/color-picker/ColorPicker.js.map +1 -1
  5. package/es/index.js +2 -0
  6. package/es/index.js.map +1 -1
  7. package/es/locale/en_US.js +3 -0
  8. package/es/locale/en_US.js.map +1 -1
  9. package/es/locale/zh_CN.js +3 -0
  10. package/es/locale/zh_CN.js.map +1 -1
  11. package/es/page-container/index.js +13 -0
  12. package/es/page-container/index.js.map +1 -0
  13. package/es/page-container/index.less +38 -0
  14. package/es/page-loading/index.js +25 -0
  15. package/es/page-loading/index.js.map +1 -0
  16. package/es/page-loading/index.less +22 -0
  17. package/es/page-loading/loading.gif +0 -0
  18. package/es/table/table.js +1 -2
  19. package/es/table/table.js.map +1 -1
  20. package/es/table-container/index.less +1 -0
  21. package/es/tabs/tabs.js +4 -2
  22. package/es/tabs/tabs.js.map +1 -1
  23. package/es/tntd-cascader/AntdCascader/component/getIcons.js +7 -8
  24. package/es/tntd-cascader/AntdCascader/component/getIcons.js.map +1 -1
  25. package/es/tntd-cascader/AntdCascader/index.js +4 -5
  26. package/es/tntd-cascader/AntdCascader/index.js.map +1 -1
  27. package/es/tntd-rc-select/_util/getIcons.js +7 -8
  28. package/es/tntd-rc-select/_util/getIcons.js.map +1 -1
  29. package/lib/check-card/index.js +1 -2
  30. package/lib/check-card/index.js.map +1 -1
  31. package/lib/color-picker/ColorPicker.d.ts.map +1 -1
  32. package/lib/color-picker/ColorPicker.js +2 -4
  33. package/lib/color-picker/ColorPicker.js.map +1 -1
  34. package/lib/index.d.ts +2 -0
  35. package/lib/index.d.ts.map +1 -1
  36. package/lib/index.js +14 -0
  37. package/lib/index.js.map +1 -1
  38. package/lib/locale/default.d.ts +3 -0
  39. package/lib/locale/default.d.ts.map +1 -1
  40. package/lib/locale/en_US.d.ts +3 -0
  41. package/lib/locale/en_US.d.ts.map +1 -1
  42. package/lib/locale/en_US.js +3 -0
  43. package/lib/locale/en_US.js.map +1 -1
  44. package/lib/locale/zh_CN.d.ts +3 -0
  45. package/lib/locale/zh_CN.d.ts.map +1 -1
  46. package/lib/locale/zh_CN.js +3 -0
  47. package/lib/locale/zh_CN.js.map +1 -1
  48. package/lib/page-container/index.d.ts +4 -0
  49. package/lib/page-container/index.d.ts.map +1 -0
  50. package/lib/page-container/index.js +22 -0
  51. package/lib/page-container/index.js.map +1 -0
  52. package/lib/page-container/index.less +38 -0
  53. package/lib/{query-form/Field/Composition/Select.d.ts → page-loading/index.d.ts} +1 -1
  54. package/lib/page-loading/index.d.ts.map +1 -0
  55. package/lib/page-loading/index.js +30 -0
  56. package/lib/page-loading/index.js.map +1 -0
  57. package/lib/page-loading/index.less +22 -0
  58. package/lib/page-loading/loading.gif +0 -0
  59. package/lib/table/table.d.ts.map +1 -1
  60. package/lib/table/table.js +2 -3
  61. package/lib/table/table.js.map +1 -1
  62. package/lib/table-container/index.less +1 -0
  63. package/lib/tabs/tabs.d.ts.map +1 -1
  64. package/lib/tabs/tabs.js +3 -1
  65. package/lib/tabs/tabs.js.map +1 -1
  66. package/lib/tntd-cascader/AntdCascader/component/getIcons.js +2 -3
  67. package/lib/tntd-cascader/AntdCascader/component/getIcons.js.map +1 -1
  68. package/lib/tntd-cascader/AntdCascader/index.d.ts.map +1 -1
  69. package/lib/tntd-cascader/AntdCascader/index.js +1 -2
  70. package/lib/tntd-cascader/AntdCascader/index.js.map +1 -1
  71. package/lib/tntd-rc-select/_util/getIcons.js +2 -3
  72. package/lib/tntd-rc-select/_util/getIcons.js.map +1 -1
  73. package/package.json +2 -2
  74. package/es/alert/alert.js +0 -70
  75. package/es/alert/alert.js.map +0 -1
  76. package/es/alert/alert.less +0 -128
  77. package/es/button/button.less +0 -72
  78. package/es/checkbox/check.png +0 -0
  79. package/es/checkbox/checkbox.js +0 -48
  80. package/es/checkbox/checkbox.js.map +0 -1
  81. package/es/checkbox/checkbox.less +0 -69
  82. package/es/date-picker/DatePicker.js +0 -101
  83. package/es/date-picker/DatePicker.js.map +0 -1
  84. package/es/date-picker/index.less +0 -294
  85. package/es/drawer/index.less +0 -154
  86. package/es/form/form.less +0 -36
  87. package/es/grid/RowContext.js +0 -3
  88. package/es/grid/RowContext.js.map +0 -1
  89. package/es/grid/col.js +0 -103
  90. package/es/grid/col.js.map +0 -1
  91. package/es/grid/hooks/useBreakpoint.js +0 -18
  92. package/es/grid/hooks/useBreakpoint.js.map +0 -1
  93. package/es/grid/row.js +0 -154
  94. package/es/grid/row.js.map +0 -1
  95. package/es/grid/style/rtl.less +0 -69
  96. package/es/input-number/inputNumber.js +0 -29
  97. package/es/input-number/inputNumber.js.map +0 -1
  98. package/es/input-number/inputNumber.less +0 -12
  99. package/es/modal/index.less +0 -36
  100. package/es/notification/assets/index.js +0 -2
  101. package/es/notification/assets/index.js.map +0 -1
  102. package/es/notification/assets/svg-error-tip.js +0 -145
  103. package/es/notification/assets/svg-error-tip.js.map +0 -1
  104. package/es/notification/assets/svg-success-tip.js +0 -162
  105. package/es/notification/assets/svg-success-tip.js.map +0 -1
  106. package/es/notification/notification.js +0 -80
  107. package/es/notification/notification.js.map +0 -1
  108. package/es/notification/notification.less +0 -59
  109. package/es/popconfirm/index.less +0 -32
  110. package/es/popconfirm/popconfirm.js +0 -43
  111. package/es/popconfirm/popconfirm.js.map +0 -1
  112. package/es/popover/index.less +0 -57
  113. package/es/popover/popover.js +0 -34
  114. package/es/popover/popover.js.map +0 -1
  115. package/es/progress/progress.js +0 -132
  116. package/es/progress/progress.js.map +0 -1
  117. package/es/progress/progress.less +0 -82
  118. package/es/query-form/Field/Composition/FieldPopover.js +0 -284
  119. package/es/query-form/Field/Composition/FieldPopover.js.map +0 -1
  120. package/es/query-form/Field/Composition/FieldPopover.less +0 -35
  121. package/es/query-form/Field/Composition/Select.js +0 -108
  122. package/es/query-form/Field/Composition/Select.js.map +0 -1
  123. package/es/query-form/Field/Composition/index.js +0 -275
  124. package/es/query-form/Field/Composition/index.js.map +0 -1
  125. package/es/query-form/Field/Composition/index.less +0 -106
  126. package/es/query-form/Field/Composition/utils.js +0 -19
  127. package/es/query-form/Field/Composition/utils.js.map +0 -1
  128. package/es/radio/radio.js +0 -57
  129. package/es/radio/radio.js.map +0 -1
  130. package/es/radio/radio.less +0 -43
  131. package/es/steps/assets/background_left.svg +0 -12
  132. package/es/steps/assets/background_right.svg +0 -12
  133. package/es/steps/assets/horizontal_line.svg +0 -3
  134. package/es/steps/assets/vertical_line.svg +0 -3
  135. package/es/steps/stepStyle/icon.less +0 -51
  136. package/es/steps/stepStyle/progress-dot.less +0 -10
  137. package/es/steps/stepStyle/variables.less +0 -8
  138. package/es/steps/stepStyle/vertical.less +0 -41
  139. package/es/switch/index.less +0 -46
  140. package/es/tabs/tabs.less +0 -116
  141. package/es/tag/color.less +0 -43
  142. package/es/tag/tag.js +0 -171
  143. package/es/tag/tag.js.map +0 -1
  144. package/es/tag/tag.less +0 -193
  145. package/es/time-picker/TimePicker.js +0 -36
  146. package/es/time-picker/TimePicker.js.map +0 -1
  147. package/es/time-picker/index.less +0 -38
  148. package/es/tntd-action/Action.js +0 -66
  149. package/es/tntd-action/Action.js.map +0 -1
  150. package/es/tntd-action/index.less +0 -53
  151. package/es/tooltip/index.less +0 -29
  152. package/es/tooltip/tooltip.js +0 -33
  153. package/es/tooltip/tooltip.js.map +0 -1
  154. package/lib/alert/alert.d.ts +0 -12
  155. package/lib/alert/alert.d.ts.map +0 -1
  156. package/lib/alert/alert.js +0 -92
  157. package/lib/alert/alert.js.map +0 -1
  158. package/lib/alert/alert.less +0 -128
  159. package/lib/button/button.less +0 -72
  160. package/lib/checkbox/check.png +0 -0
  161. package/lib/checkbox/checkbox.d.ts +0 -16
  162. package/lib/checkbox/checkbox.d.ts.map +0 -1
  163. package/lib/checkbox/checkbox.js +0 -65
  164. package/lib/checkbox/checkbox.js.map +0 -1
  165. package/lib/checkbox/checkbox.less +0 -69
  166. package/lib/date-picker/DatePicker.d.ts +0 -21
  167. package/lib/date-picker/DatePicker.d.ts.map +0 -1
  168. package/lib/date-picker/DatePicker.js +0 -128
  169. package/lib/date-picker/DatePicker.js.map +0 -1
  170. package/lib/date-picker/index.less +0 -294
  171. package/lib/drawer/index.less +0 -154
  172. package/lib/form/form.less +0 -36
  173. package/lib/grid/RowContext.d.ts +0 -9
  174. package/lib/grid/RowContext.d.ts.map +0 -1
  175. package/lib/grid/RowContext.js +0 -9
  176. package/lib/grid/RowContext.js.map +0 -1
  177. package/lib/grid/col.d.ts +0 -29
  178. package/lib/grid/col.d.ts.map +0 -1
  179. package/lib/grid/col.js +0 -100
  180. package/lib/grid/col.js.map +0 -1
  181. package/lib/grid/hooks/useBreakpoint.d.ts +0 -4
  182. package/lib/grid/hooks/useBreakpoint.d.ts.map +0 -1
  183. package/lib/grid/hooks/useBreakpoint.js +0 -28
  184. package/lib/grid/hooks/useBreakpoint.js.map +0 -1
  185. package/lib/grid/row.d.ts +0 -21
  186. package/lib/grid/row.d.ts.map +0 -1
  187. package/lib/grid/row.js +0 -183
  188. package/lib/grid/row.js.map +0 -1
  189. package/lib/grid/style/rtl.less +0 -69
  190. package/lib/input-number/inputNumber.d.ts +0 -10
  191. package/lib/input-number/inputNumber.d.ts.map +0 -1
  192. package/lib/input-number/inputNumber.js +0 -48
  193. package/lib/input-number/inputNumber.js.map +0 -1
  194. package/lib/input-number/inputNumber.less +0 -12
  195. package/lib/modal/index.less +0 -36
  196. package/lib/notification/assets/index.d.ts +0 -3
  197. package/lib/notification/assets/index.d.ts.map +0 -1
  198. package/lib/notification/assets/index.js +0 -20
  199. package/lib/notification/assets/index.js.map +0 -1
  200. package/lib/notification/assets/svg-error-tip.d.ts +0 -4
  201. package/lib/notification/assets/svg-error-tip.d.ts.map +0 -1
  202. package/lib/notification/assets/svg-error-tip.js +0 -154
  203. package/lib/notification/assets/svg-error-tip.js.map +0 -1
  204. package/lib/notification/assets/svg-success-tip.d.ts +0 -4
  205. package/lib/notification/assets/svg-success-tip.d.ts.map +0 -1
  206. package/lib/notification/assets/svg-success-tip.js +0 -171
  207. package/lib/notification/assets/svg-success-tip.js.map +0 -1
  208. package/lib/notification/notification.d.ts +0 -9
  209. package/lib/notification/notification.d.ts.map +0 -1
  210. package/lib/notification/notification.js +0 -105
  211. package/lib/notification/notification.js.map +0 -1
  212. package/lib/notification/notification.less +0 -59
  213. package/lib/popconfirm/index.less +0 -32
  214. package/lib/popconfirm/popconfirm.d.ts +0 -8
  215. package/lib/popconfirm/popconfirm.d.ts.map +0 -1
  216. package/lib/popconfirm/popconfirm.js +0 -61
  217. package/lib/popconfirm/popconfirm.js.map +0 -1
  218. package/lib/popover/index.less +0 -57
  219. package/lib/popover/popover.d.ts +0 -14
  220. package/lib/popover/popover.d.ts.map +0 -1
  221. package/lib/popover/popover.js +0 -55
  222. package/lib/popover/popover.js.map +0 -1
  223. package/lib/progress/progress.d.ts +0 -12
  224. package/lib/progress/progress.d.ts.map +0 -1
  225. package/lib/progress/progress.js +0 -148
  226. package/lib/progress/progress.js.map +0 -1
  227. package/lib/progress/progress.less +0 -82
  228. package/lib/query-form/Field/Composition/FieldPopover.d.ts +0 -17
  229. package/lib/query-form/Field/Composition/FieldPopover.d.ts.map +0 -1
  230. package/lib/query-form/Field/Composition/FieldPopover.js +0 -319
  231. package/lib/query-form/Field/Composition/FieldPopover.js.map +0 -1
  232. package/lib/query-form/Field/Composition/FieldPopover.less +0 -35
  233. package/lib/query-form/Field/Composition/Select.d.ts.map +0 -1
  234. package/lib/query-form/Field/Composition/Select.js +0 -132
  235. package/lib/query-form/Field/Composition/Select.js.map +0 -1
  236. package/lib/query-form/Field/Composition/index.d.ts +0 -14
  237. package/lib/query-form/Field/Composition/index.d.ts.map +0 -1
  238. package/lib/query-form/Field/Composition/index.js +0 -330
  239. package/lib/query-form/Field/Composition/index.js.map +0 -1
  240. package/lib/query-form/Field/Composition/index.less +0 -106
  241. package/lib/query-form/Field/Composition/utils.d.ts +0 -6
  242. package/lib/query-form/Field/Composition/utils.d.ts.map +0 -1
  243. package/lib/query-form/Field/Composition/utils.js +0 -27
  244. package/lib/query-form/Field/Composition/utils.js.map +0 -1
  245. package/lib/radio/radio.d.ts +0 -17
  246. package/lib/radio/radio.d.ts.map +0 -1
  247. package/lib/radio/radio.js +0 -75
  248. package/lib/radio/radio.js.map +0 -1
  249. package/lib/radio/radio.less +0 -43
  250. package/lib/steps/assets/background_left.svg +0 -12
  251. package/lib/steps/assets/background_right.svg +0 -12
  252. package/lib/steps/assets/horizontal_line.svg +0 -3
  253. package/lib/steps/assets/vertical_line.svg +0 -3
  254. package/lib/steps/stepStyle/icon.less +0 -51
  255. package/lib/steps/stepStyle/progress-dot.less +0 -10
  256. package/lib/steps/stepStyle/variables.less +0 -8
  257. package/lib/steps/stepStyle/vertical.less +0 -41
  258. package/lib/switch/index.less +0 -46
  259. package/lib/tabs/tabs.less +0 -116
  260. package/lib/tag/color.less +0 -43
  261. package/lib/tag/tag.d.ts +0 -41
  262. package/lib/tag/tag.d.ts.map +0 -1
  263. package/lib/tag/tag.js +0 -183
  264. package/lib/tag/tag.js.map +0 -1
  265. package/lib/tag/tag.less +0 -193
  266. package/lib/time-picker/TimePicker.d.ts +0 -9
  267. package/lib/time-picker/TimePicker.d.ts.map +0 -1
  268. package/lib/time-picker/TimePicker.js +0 -55
  269. package/lib/time-picker/TimePicker.js.map +0 -1
  270. package/lib/time-picker/index.less +0 -38
  271. package/lib/tntd-action/Action.d.ts +0 -6
  272. package/lib/tntd-action/Action.d.ts.map +0 -1
  273. package/lib/tntd-action/Action.js +0 -86
  274. package/lib/tntd-action/Action.js.map +0 -1
  275. package/lib/tntd-action/index.less +0 -53
  276. package/lib/tooltip/index.less +0 -29
  277. package/lib/tooltip/tooltip.d.ts +0 -9
  278. package/lib/tooltip/tooltip.d.ts.map +0 -1
  279. package/lib/tooltip/tooltip.js +0 -53
  280. package/lib/tooltip/tooltip.js.map +0 -1
package/es/tag/tag.less DELETED
@@ -1,193 +0,0 @@
1
- @import '../style/mixins/index';
2
- @import './color.less';
3
- @tag-prefix-cls: ~'@{ant-prefix}-tag';
4
- // 默认
5
- @tag-height: 20px;
6
- @tag-small-size: 0 8px;
7
- @tag-middle-size: 1px 10px;
8
- @tag-large-size: 3px 12px;
9
-
10
- // img tag
11
- @tag-img-small-size: 1px 5px 1px 3px;
12
- @tag-img-middle-size: 2px 6px 2px 3px;
13
- @tag-img-large-size: 3px 12px 3px 4px;
14
-
15
- // 只有icon的尺寸
16
- @tag-only-icon-small-size: 5px;
17
- @tag-only-icon-middle-size: 6px;
18
- @tag-only-icon-large-size: 7px;
19
-
20
- .tnt-tag.@{tag-prefix-cls} {
21
- line-height: @tag-height;
22
-
23
- .@{iconfont-css-prefix}-close {
24
- .iconfont-size-under-12px(12px);
25
- vertical-align: middle;
26
- line-height: 1;
27
- }
28
-
29
- .anticon{
30
- font-size: @font-size-sm;
31
- }
32
-
33
- // 头像插件 可以为icon 图片
34
- .@{tag-prefix-cls}-addon-wrap{
35
- display: inline-block;
36
- vertical-align: middle;
37
- margin-top: -1px;
38
- .@{tag-prefix-cls}-addon{
39
- .iconfont-size-under-12px(12px);
40
- display: flex;
41
- align-items: center;
42
- justify-content: center;
43
- }
44
-
45
- .tntd-ellipsis,.tnt-ellipsis{
46
- align-items: center;
47
- .@{tag-prefix-cls}-addon{
48
- >*{
49
- border-radius: 100%;
50
- overflow: hidden;
51
- display: block;
52
- }
53
- +*{
54
- margin-left: 4px;
55
- }
56
- }
57
- }
58
- }
59
-
60
- &-small{
61
- padding: @tag-small-size;
62
- }
63
- &-middle{
64
- padding: @tag-middle-size;
65
- }
66
- &-large{
67
- padding: @tag-large-size;
68
- font-size: 14px;
69
- }
70
-
71
- // 不带边框
72
- &.@{tag-prefix-cls}-no-border{
73
- border-color:transparent;
74
- }
75
-
76
- // 只有一个icon
77
- &.@{tag-prefix-cls}-only-child{
78
- line-height: @font-size-sm;
79
- &.@{tag-prefix-cls}-small{
80
- padding: @tag-only-icon-small-size;
81
- }
82
- &.@{tag-prefix-cls}-middle{
83
- padding: @tag-only-icon-middle-size;
84
- }
85
- &.@{tag-prefix-cls}-large{
86
- padding: @tag-only-icon-large-size;
87
- }
88
- }
89
-
90
- // 带图片
91
- &.@{tag-prefix-cls}-addon-img{
92
- &.@{tag-prefix-cls}-small{
93
- padding: @tag-img-small-size;
94
- .@{tag-prefix-cls}-addon{
95
- width: 16px;
96
- height: 16px;
97
- }
98
- }
99
- &.@{tag-prefix-cls}-middle{
100
- padding: @tag-img-middle-size;
101
- .@{tag-prefix-cls}-addon{
102
- width: 18px;
103
- height: 18px;
104
- }
105
- }
106
- &.@{tag-prefix-cls}-large{
107
- padding: @tag-img-large-size;
108
- .@{tag-prefix-cls}-addon{
109
- width: 20px;
110
- height: 20px;
111
- }
112
- }
113
- }
114
-
115
- // mixin to iterate over colors and create CSS class for each one
116
- .make-color-classes(@i: length(@preset-colors-custom)) when (@i > 0) {
117
- .make-color-classes(@i - 1);
118
- @color: extract(@preset-colors-custom, @i);
119
- @lightColor: '@{color}-1';
120
- @lightBorderColor: '@{color}-4';
121
- @darkColor: '@{color}-7';
122
- &.@{tag-prefix-cls}-@{color} {
123
- color: @@darkColor;
124
- background: @@lightColor;
125
- border-color: @@lightBorderColor;
126
- >.@{iconfont-css-prefix}-close {
127
- color: @@darkColor;//fade(@@darkColor,80%);
128
- opacity: .8;
129
- }
130
- &.@{tag-prefix-cls}-no-border{
131
- border-color:transparent;
132
- }
133
- }
134
- &.@{tag-prefix-cls}-@{color}-inverse {
135
- color: @text-color-inverse;
136
- background: @@darkColor;
137
- border-color: @@darkColor;
138
-
139
- &.@{tag-prefix-cls}-no-border{
140
- border-color:transparent;
141
- }
142
- }
143
- }
144
-
145
- .make-color-classes();
146
-
147
-
148
-
149
- // 可选
150
- &.@{tag-prefix-cls}-checkable {
151
- background-color: @tag-default-bg;
152
- border-color: transparent;
153
- padding: 2px 12px;
154
- cursor: pointer;
155
- &-border{
156
- border-color: @border-color-base;
157
- }
158
-
159
- &:active,
160
- &-checked {
161
- color: @primary-7;
162
- background-color: @primary-1;
163
- &.@{tag-prefix-cls}-checkable-border{
164
- border-color: @primary-3;
165
- }
166
- }
167
-
168
- &-checked {
169
- &.@{tag-prefix-cls}-checkable-disabled:hover {
170
- color: @primary-color;
171
- }
172
- }
173
-
174
- &:not(&-checked){
175
- &.@{tag-prefix-cls}-checkable-disabled:hover {
176
- color: inherit;
177
- }
178
- }
179
-
180
- &-disabled{
181
- opacity: 0.5;
182
- cursor: not-allowed;
183
- &:hover{
184
- opacity: 0.5;
185
- color: inherit;
186
- }
187
- }
188
- }
189
-
190
- }
191
-
192
-
193
-
@@ -1,36 +0,0 @@
1
- var __rest = this && this.__rest || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
4
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
5
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
6
- }
7
- return t;
8
- };
9
- import React from 'react';
10
- import Icon from '../icon';
11
- import { ConfigConsumer } from 'antd/es/config-provider';
12
- import AntTimePicker from 'antd/es/time-picker';
13
- import classNames from 'classnames';
14
- export * from 'antd/es/time-picker';
15
- const TimePicker = props => {
16
- //theme样式类型 outline | fill 默认 outline
17
- const {
18
- theme = 'outline',
19
- className,
20
- suffixIcon
21
- } = props,
22
- restProps = __rest(props, ["theme", "className", "suffixIcon"]);
23
- const defaultIcon = React.createElement(Icon, {
24
- type: "clock-circle"
25
- });
26
- return React.createElement(ConfigConsumer, null, ({
27
- getPrefixCls
28
- }) => {
29
- const prefixCls = getPrefixCls('time-picker');
30
- return React.createElement(AntTimePicker, Object.assign({
31
- suffixIcon: suffixIcon || defaultIcon,
32
- className: classNames(className, `${prefixCls}-${theme}`)
33
- }, restProps));
34
- });
35
- };
36
- export default TimePicker;
@@ -1 +0,0 @@
1
- {"version":3,"file":"TimePicker.js","sourceRoot":"","sources":["../../src/time-picker/TimePicker.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AACvC,OAAO,IAAI,MAAM,SAAS,CAAA;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,aAAa,MAAM,qBAAqB,CAAA;AAC/C,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,MAAM,UAAU,GAA2E,CACzF,KAAK,EACL,EAAE;IACF,sCAAsC;IACtC,MAAM,EAAE,KAAK,GAAG,SAAS,EAAE,SAAS,EAAE,UAAU,KAAmB,KAAK,EAAnB,SAAS,UAAK,KAAK,EAAlE,oCAA0D,CAAQ,CAAA;IACxE,MAAM,WAAW,GAAG,oBAAC,IAAI,IAAC,IAAI,EAAC,cAAc,GAAG,CAAA;IAEhD,OAAO,CACL,oBAAC,cAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,MAAM,SAAS,GAAG,YAAY,CAAC,aAAa,CAAC,CAAA;QAC7C,OAAO,CACL,oBAAC,aAAa,kBACZ,UAAU,EAAE,UAAU,IAAI,WAAW,EACrC,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,GAAG,SAAS,IAAI,KAAK,EAAE,CAAC,IACrD,SAAS,EACb,CACH,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAA;AAED,eAAe,UAAU,CAAA","sourcesContent":["import React, { useState } from 'react'\nimport Icon from '../icon'\nimport type { TimePickerProps as AntdTimePickerProps } from 'antd/es/time-picker'\nimport { ConfigConsumer } from 'antd/es/config-provider'\nimport AntTimePicker from 'antd/es/time-picker'\nimport classNames from 'classnames'\nexport * from 'antd/es/time-picker'\nconst TimePicker: React.FC<AntdTimePickerProps & { theme?: string; readonly?: boolean }> = (\n props\n) => {\n //theme样式类型 outline | fill 默认 outline\n const { theme = 'outline', className, suffixIcon, ...restProps } = props\n const defaultIcon = <Icon type=\"clock-circle\" />\n\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('time-picker')\n return (\n <AntTimePicker\n suffixIcon={suffixIcon || defaultIcon}\n className={classNames(className, `${prefixCls}-${theme}`)}\n {...restProps}\n />\n )\n }}\n </ConfigConsumer>\n )\n}\n\nexport default TimePicker\n"]}
@@ -1,38 +0,0 @@
1
- @import '../style/themes/index';
2
-
3
- @timepicker-prefix-cls: ~'@{ant-prefix}-time-picker';
4
- .@{timepicker-prefix-cls} {
5
- input{
6
- border-color: @border-color-secondary;
7
- }
8
- &:has(input:not([value=''])),&:hover {
9
- .@{timepicker-prefix-cls}-icon{
10
- i{
11
- color: @text-color-secondary;
12
- }
13
- }
14
- }
15
- &:has(input[disabled]){
16
- .@{timepicker-prefix-cls}-icon{
17
- i{
18
- color: @disabled-color;
19
- }
20
- }
21
- }
22
- &-fill{
23
- input {
24
- background-color: @fill-color-quaternary;
25
- border-color: @fill-color-quaternary;
26
- &[disabled] {
27
- border: none;
28
- }
29
- &:focus{
30
- background-color: @white;
31
- }
32
- &:not([value='']):hover {
33
- background-color: @white;
34
- }
35
- }
36
- }
37
- }
38
-
@@ -1,66 +0,0 @@
1
- var __rest = this && this.__rest || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
4
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
5
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
6
- }
7
- return t;
8
- };
9
- import React, { useState, useEffect, useRef } from 'react';
10
- import ReactDOM from 'react-dom';
11
- import { ConfigConsumer } from 'antd/es/config-provider';
12
- import LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver';
13
- import classNames from 'classnames';
14
- import { Button } from '../button';
15
- const defaultGetContainer = () => document.body;
16
- export default function WarpAction(_a) {
17
- var {
18
- getContainer = defaultGetContainer
19
- } = _a,
20
- other = __rest(_a, ["getContainer"]);
21
- return React.createElement(ConfigConsumer, null, ({
22
- getPrefixCls,
23
- getPopupContainer: getContextPopupContainer
24
- }) => {
25
- const _getContainer = getContainer === undefined ? getContextPopupContainer : getContainer;
26
- return React.createElement(LocaleReceiver, {
27
- componentName: "TntdAction"
28
- }, locale => {
29
- return React.createElement(Action, Object.assign({}, other, {
30
- locale: locale,
31
- getContainer: _getContainer
32
- }));
33
- });
34
- });
35
- }
36
- function Action({
37
- title,
38
- data,
39
- locale,
40
- className,
41
- getContainer
42
- }) {
43
- const [visible, setVisible] = useState(false);
44
- const ref = useRef();
45
- useEffect(() => {
46
- ref.current = getContainer();
47
- }, [getContainer]);
48
- useEffect(() => {
49
- setVisible(data.length > 0);
50
- }, [data]);
51
- if (ref.current && visible) {
52
- return ReactDOM.createPortal(React.createElement("div", {
53
- className: classNames('tnt-action', className)
54
- }, React.createElement("div", {
55
- className: "fr"
56
- }, data), React.createElement(Button, {
57
- shape: "circle",
58
- icon: "close",
59
- type: "tertiary",
60
- onClick: () => setVisible(false)
61
- }), React.createElement("span", {
62
- className: "tnt-action-text"
63
- }, title)), ref.current);
64
- }
65
- return null;
66
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"Action.js","sourceRoot":"","sources":["../../src/tntd-action/Action.js"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAC1D,OAAO,QAAQ,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,cAAc,MAAM,wCAAwC,CAAA;AACnE,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAElC,MAAM,mBAAmB,GAAG,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAA;AAE/C,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAAgD;QAAhD,EAAE,YAAY,GAAG,mBAAmB,OAAY,EAAP,KAAK,cAA9C,gBAAgD,CAAF;IAC/E,OAAO,CACL,oBAAC,cAAc,QACZ,CAAC,EAAE,YAAY,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,EAAE,EAAE;QACjE,MAAM,aAAa,GAAG,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,YAAY,CAAA;QAE1F,OAAO,CACL,oBAAC,cAAc,IAAC,aAAa,EAAC,YAAY,IACvC,CAAC,MAAM,EAAE,EAAE;YACV,OAAO,oBAAC,MAAM,oBAAK,KAAK,IAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,aAAa,IAAI,CAAA;QAC3E,CAAC,CACc,CAClB,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC;AAED,SAAS,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE;IAC9D,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC7C,MAAM,GAAG,GAAG,MAAM,EAAE,CAAA;IAEpB,SAAS,CAAC,GAAG,EAAE;QACb,GAAG,CAAC,OAAO,GAAG,YAAY,EAAE,CAAA;IAC9B,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAA;IAElB,SAAS,CAAC,GAAG,EAAE;QACb,UAAU,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;IAC7B,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAA;IAEV,IAAI,GAAG,CAAC,OAAO,IAAI,OAAO,EAAE;QAC1B,OAAO,QAAQ,CAAC,YAAY,CAC1B,6BAAK,SAAS,EAAE,UAAU,CAAC,YAAY,EAAE,SAAS,CAAC;YACjD,6BAAK,SAAS,EAAC,IAAI,IAAE,IAAI,CAAO;YAChC,oBAAC,MAAM,IAAC,KAAK,EAAC,QAAQ,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,UAAU,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,GAAI;YACxF,8BAAM,SAAS,EAAC,iBAAiB,IAAE,KAAK,CAAQ,CAC5C,EACN,GAAG,CAAC,OAAO,CACZ,CAAA;KACF;IACD,OAAO,IAAI,CAAA;AACb,CAAC","sourcesContent":["import React, { useState, useEffect, useRef } from 'react'\nimport ReactDOM from 'react-dom'\nimport { ConfigConsumer } from 'antd/es/config-provider'\nimport LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver'\nimport classNames from 'classnames'\nimport { Button } from '../button'\n\nconst defaultGetContainer = () => document.body\n\nexport default function WarpAction({ getContainer = defaultGetContainer, ...other }) {\n return (\n <ConfigConsumer>\n {({ getPrefixCls, getPopupContainer: getContextPopupContainer }) => {\n const _getContainer = getContainer === undefined ? getContextPopupContainer : getContainer\n\n return (\n <LocaleReceiver componentName=\"TntdAction\">\n {(locale) => {\n return <Action {...other} locale={locale} getContainer={_getContainer} />\n }}\n </LocaleReceiver>\n )\n }}\n </ConfigConsumer>\n )\n}\n\nfunction Action({ title, data, locale, className, getContainer }) {\n const [visible, setVisible] = useState(false)\n const ref = useRef()\n\n useEffect(() => {\n ref.current = getContainer()\n }, [getContainer])\n\n useEffect(() => {\n setVisible(data.length > 0)\n }, [data])\n\n if (ref.current && visible) {\n return ReactDOM.createPortal(\n <div className={classNames('tnt-action', className)}>\n <div className=\"fr\">{data}</div>\n <Button shape=\"circle\" icon=\"close\" type=\"tertiary\" onClick={() => setVisible(false)} />\n <span className=\"tnt-action-text\">{title}</span>\n </div>,\n ref.current\n )\n }\n return null\n}\n"]}
@@ -1,53 +0,0 @@
1
- .tnt-action {
2
- position: fixed;
3
- bottom: 100px;
4
- width: @tnt-action-width;
5
- left: calc(50vw - @tnt-action-width / 2);
6
- padding: 10px 16px;
7
- background-color: @text-color;
8
- border-radius: @border-radius-base;
9
- z-index: 200;
10
- &-text {
11
- color: @white;
12
- margin-left: 20px;
13
- font-size: 14px;
14
- .num {
15
- display: inline-block;
16
- width: 16px;
17
- height: 16px;
18
- background: #454f64;
19
- border-radius: 8px;
20
- font-size: 10px;
21
- margin-right: 4px;
22
- vertical-align: text-bottom;
23
- text-align: center;
24
- }
25
- }
26
- > .tnt-btn-tertiary {
27
- opacity: 0.5;
28
- background: #454f64;
29
- color: @white;
30
- border-width: 0;
31
- width: @tnt-action-close-width;
32
- height: @tnt-action-close-width;
33
- min-width: @tnt-action-close-width;
34
- line-height: @tnt-action-close-width;
35
- margin-top: 4px;
36
- font-size: 14px;
37
- &:hover {
38
- opacity: 0.8;
39
- }
40
- }
41
- .fr {
42
- float: right;
43
- .ant-btn {
44
- margin-left: 10px;
45
- background: rgba(69, 79, 100, 0.5);
46
- color: @white;
47
- border-width: 0;
48
- &:hover {
49
- background: rgba(69, 79, 100, 0.8);
50
- }
51
- }
52
- }
53
- }
@@ -1,29 +0,0 @@
1
- @tooltip-prefix-cls: ~'@{ant-prefix}-tooltip';
2
-
3
- // Base class
4
- .tnt-tooltip.@{tooltip-prefix-cls} {
5
-
6
- &-light {
7
- .@{tooltip-prefix-cls}-inner {
8
- background-color: @tooltip-bg-light;
9
- color: @tooltip-color-light;
10
- }
11
-
12
- .@{tooltip-prefix-cls}-arrow {
13
- &::before {
14
- background-color: @tooltip-bg-light;
15
- }
16
- }
17
- }
18
-
19
- // Arrows
20
- &-arrow {
21
- border-radius: 1px;
22
- }
23
- }
24
-
25
- .@{tooltip-prefix-cls}-arrow-hidden {
26
- .@{tooltip-prefix-cls}-arrow {
27
- display: none;
28
- }
29
- }
@@ -1,33 +0,0 @@
1
- var __rest = this && this.__rest || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
4
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
5
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
6
- }
7
- return t;
8
- };
9
- import React from 'react';
10
- import { ConfigConsumer } from 'antd/es/config-provider';
11
- import AntdTooltip from 'antd/es/tooltip';
12
- import classNames from 'classnames';
13
- export * from 'antd/es/tooltip';
14
- const themeMap = (prefixCls, themeColor) => {
15
- return `${prefixCls}-${themeColor}`;
16
- };
17
- const Tooltip = props => {
18
- const {
19
- overlayClassName,
20
- theme = '',
21
- hiddenArrow = false
22
- } = props,
23
- restProps = __rest(props, ["overlayClassName", "theme", "hiddenArrow"]);
24
- return React.createElement(ConfigConsumer, null, ({
25
- getPrefixCls
26
- }) => {
27
- const prefixCls = getPrefixCls('tooltip');
28
- return React.createElement(AntdTooltip, Object.assign({
29
- overlayClassName: classNames(prefixCls, 'tnt-tooltip', themeMap(prefixCls, theme), hiddenArrow ? prefixCls + '-arrow-hidden' : '', overlayClassName)
30
- }, restProps));
31
- });
32
- };
33
- export default Tooltip;
@@ -1 +0,0 @@
1
- {"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../src/tooltip/tooltip.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,WAAW,MAAM,iBAAiB,CAAA;AACzC,OAAO,UAAU,MAAM,YAAY,CAAA;AAEnC,cAAc,iBAAiB,CAAA;AAC/B,MAAM,QAAQ,GAAG,CAAC,SAAiB,EAAE,UAAkB,EAAE,EAAE;IACzD,OAAO,GAAG,SAAS,IAAI,UAAU,EAAE,CAAA;AACrC,CAAC,CAAA;AAED,MAAM,OAAO,GAAuE,CAAC,KAAK,EAAE,EAAE;IAC5F,MAAM,EAAE,gBAAgB,EAAE,KAAK,GAAG,EAAE,EAAE,WAAW,GAAG,KAAK,KAAmB,KAAK,EAAnB,SAAS,UAAK,KAAK,EAA3E,4CAAmE,CAAQ,CAAA;IAEjF,OAAO,CACL,oBAAC,cAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,MAAM,SAAS,GAAG,YAAY,CAAC,SAAS,CAAC,CAAA;QAEzC,OAAO,CACL,oBAAC,WAAW,kBACV,gBAAgB,EAAE,UAAU,CAC1B,SAAS,EACT,aAAa,EACb,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC,EAC1B,WAAW,CAAC,CAAC,CAAC,SAAS,GAAG,eAAe,CAAC,CAAC,CAAC,EAAE,EAC9C,gBAAgB,CACjB,IACG,SAAS,EACb,CACH,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAA;AAED,eAAe,OAAO,CAAA","sourcesContent":["import React from 'react'\nimport type { TooltipProps } from 'antd/es/tooltip'\nimport { ConfigConsumer } from 'antd/es/config-provider'\nimport AntdTooltip from 'antd/es/tooltip'\nimport classNames from 'classnames'\n\nexport * from 'antd/es/tooltip'\nconst themeMap = (prefixCls: string, themeColor: string) => {\n return `${prefixCls}-${themeColor}`\n}\n\nconst Tooltip: React.FC<TooltipProps & { theme?: string; hiddenArrow?: boolean }> = (props) => {\n const { overlayClassName, theme = '', hiddenArrow = false, ...restProps } = props\n\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('tooltip')\n\n return (\n <AntdTooltip\n overlayClassName={classNames(\n prefixCls,\n 'tnt-tooltip',\n themeMap(prefixCls, theme),\n hiddenArrow ? prefixCls + '-arrow-hidden' : '',\n overlayClassName\n )}\n {...restProps}\n />\n )\n }}\n </ConfigConsumer>\n )\n}\n\nexport default Tooltip\n"]}
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import type { AlertProps as AntdAlertProps } from 'antd/lib/alert';
3
- import { default as AntdAlert } from 'antd/lib/alert';
4
- export * from 'antd/lib/alert';
5
- export interface AlertProps extends AntdAlertProps {
6
- action: React.ReactNode;
7
- }
8
- interface AlertComponent extends React.ForwardRefExoticComponent<AntdAlertProps & React.RefAttributes<AntdAlert>> {
9
- }
10
- export declare const Alert: AlertComponent;
11
- export default Alert;
12
- //# sourceMappingURL=alert.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../src/alert/alert.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,eAAe,CAAA;AAIjE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,eAAe,CAAA;AAEpD,cAAc,eAAe,CAAA;AAE7B,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD,MAAM,EAAE,KAAK,CAAC,SAAS,CAAA;CACxB;AAED,UAAU,cACR,SAAQ,KAAK,CAAC,yBAAyB,CAAC,cAAc,GAAG,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;CAAG;AAI7F,eAAO,MAAM,KAAK,gBAiDE,CAAA;AAEpB,eAAe,KAAK,CAAA"}
@@ -1,92 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _exportNames = {
7
- Alert: true
8
- };
9
- exports["default"] = exports.Alert = void 0;
10
- var _react = _interopRequireWildcard(require("react"));
11
- var _icon = _interopRequireDefault(require("antd/lib/icon"));
12
- var _configProvider = require("antd/lib/config-provider");
13
- var _alert = _interopRequireWildcard(require("antd/lib/alert"));
14
- Object.keys(_alert).forEach(function (key) {
15
- if (key === "default" || key === "__esModule") return;
16
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
17
- if (key in exports && exports[key] === _alert[key]) return;
18
- Object.defineProperty(exports, key, {
19
- enumerable: true,
20
- get: function get() {
21
- return _alert[key];
22
- }
23
- });
24
- });
25
- var _classnames = _interopRequireDefault(require("classnames"));
26
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
27
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
28
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
29
- 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); }
30
- 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; }
31
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
32
- 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); }
33
- var __rest = void 0 && (void 0).__rest || function (s, e) {
34
- var t = {};
35
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
36
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
37
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
38
- }
39
- return t;
40
- };
41
- /*
42
- * @Author: 周泽飞 zefei.zhou@tongdun.net
43
- * @Date: 2024-03-21 19:43:36
44
- * @LastEditors: 周泽飞 zefei.zhou@tongdun.net
45
- * @LastEditTime: 2024-03-21 19:46:23
46
- * @FilePath: /tntd/packages/tntd/src/alert/alert.tsx
47
- * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
48
- */
49
-
50
- var prefix = 'tnt-alert';
51
- var Alert = exports.Alert = (0, _react.forwardRef)(function (_a, ref) {
52
- var action = _a.action,
53
- message = _a.message,
54
- rest = __rest(_a, ["action", "message"]);
55
- var fragment = _react["default"].createElement(_react["default"].Fragment, null, message, !!action && _react["default"].createElement("span", {
56
- className: "action-btn"
57
- }, action));
58
- var iconTheme = 'filled';
59
- var iconType = 'default';
60
- switch (rest === null || rest === void 0 ? void 0 : rest.type) {
61
- case 'success':
62
- iconType = 'check-circle';
63
- break;
64
- case 'info':
65
- iconType = 'info-circle';
66
- break;
67
- case 'error':
68
- iconType = 'close-circle';
69
- break;
70
- case 'warning':
71
- iconType = 'exclamation-circle';
72
- break;
73
- default:
74
- iconType = 'default';
75
- }
76
- var iconNode = rest.type ? _react["default"].createElement(_icon["default"], {
77
- className: "".concat(prefix, "-icon"),
78
- type: iconType,
79
- theme: iconTheme
80
- }) : null;
81
- return _react["default"].createElement(_configProvider.ConfigConsumer, null, function (_ref) {
82
- var getPrefixCls = _ref.getPrefixCls;
83
- return _react["default"].createElement(_alert["default"], Object.assign({
84
- ref: ref
85
- }, rest, {
86
- message: fragment,
87
- icon: iconNode,
88
- className: (0, _classnames["default"])(rest === null || rest === void 0 ? void 0 : rest.className, 'tnt-alert', _defineProperty({}, "".concat(prefix, "-with-action"), action))
89
- }));
90
- });
91
- });
92
- var _default = exports["default"] = Alert;
@@ -1 +0,0 @@
1
- {"version":3,"file":"alert.js","sourceRoot":"","sources":["../../src/alert/alert.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;GAOG;AACH,+CAAyC;AAGzC,wDAA+B;AAC/B,6DAAwD;AACxD,0DAAoD;AACpD,4DAAkC;AAClC,gDAA6B;AAS7B,MAAM,MAAM,GAAG,WAAW,CAAA;AAEb,QAAA,KAAK,GAAG,IAAA,kBAAU,EAAwB,CAAC,EAA4B,EAAE,GAAG,EAAE,EAAE;QAArC,EAAE,MAAM,EAAE,OAAO,OAAW,EAAN,IAAI,cAA1B,qBAA4B,CAAF;IAChF,MAAM,QAAQ,GAAG,CACf;QACG,OAAO;QACP,CAAC,CAAC,MAAM,IAAI,wCAAM,SAAS,EAAC,YAAY,IAAE,MAAM,CAAQ,CACxD,CACJ,CAAA;IAED,MAAM,SAAS,GAAc,QAAQ,CAAA;IACrC,IAAI,QAAQ,GAAG,SAAS,CAAA;IAExB,QAAQ,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,EAAE;QAClB,KAAK,SAAS;YACZ,QAAQ,GAAG,cAAc,CAAA;YACzB,MAAK;QACP,KAAK,MAAM;YACT,QAAQ,GAAG,aAAa,CAAA;YACxB,MAAK;QACP,KAAK,OAAO;YACV,QAAQ,GAAG,cAAc,CAAA;YACzB,MAAK;QACP,KAAK,SAAS;YACZ,QAAQ,GAAG,oBAAoB,CAAA;YAC/B,MAAK;QACP;YACE,QAAQ,GAAG,SAAS,CAAA;KACvB;IAED,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAC3B,8BAAC,cAAI,IAAC,SAAS,EAAE,GAAG,MAAM,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,GAAI,CACxE,CAAC,CAAC,CAAC,IAAI,CAAA;IAER,OAAO,CACL,8BAAC,gCAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,OAAO,CACL,8BAAC,eAAS,kBACR,GAAG,EAAE,GAAG,IACJ,IAAI,IACR,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,QAAQ,EACd,SAAS,EAAE,IAAA,oBAAS,EAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,SAAS,EAAE,WAAW,EAAE;gBACjD,CAAC,GAAG,MAAM,cAAc,CAAC,EAAE,MAAM;aAClC,CAAC,IACF,CACH,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAmB,CAAA;AAEpB,kBAAe,aAAK,CAAA","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2024-03-21 19:43:36\n * @LastEditors: 周泽飞 zefei.zhou@tongdun.net\n * @LastEditTime: 2024-03-21 19:46:23\n * @FilePath: /tntd/packages/tntd/src/alert/alert.tsx\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\nimport React, { forwardRef } from 'react'\nimport type { AlertProps as AntdAlertProps } from 'antd/lib/alert'\nimport type { ThemeType } from 'antd/lib/icon'\nimport Icon from 'antd/lib/icon'\nimport { ConfigConsumer } from 'antd/lib/config-provider'\nimport { default as AntdAlert } from 'antd/lib/alert'\nimport classname from 'classnames'\nexport * from 'antd/lib/alert'\n\nexport interface AlertProps extends AntdAlertProps {\n action: React.ReactNode\n}\n\ninterface AlertComponent\n extends React.ForwardRefExoticComponent<AntdAlertProps & React.RefAttributes<AntdAlert>> {}\n\nconst prefix = 'tnt-alert'\n\nexport const Alert = forwardRef<AntdAlert, AlertProps>(({ action, message, ...rest }, ref) => {\n const fragment = (\n <>\n {message}\n {!!action && <span className=\"action-btn\">{action}</span>}\n </>\n )\n\n const iconTheme: ThemeType = 'filled'\n let iconType = 'default'\n\n switch (rest?.type) {\n case 'success':\n iconType = 'check-circle'\n break\n case 'info':\n iconType = 'info-circle'\n break\n case 'error':\n iconType = 'close-circle'\n break\n case 'warning':\n iconType = 'exclamation-circle'\n break\n default:\n iconType = 'default'\n }\n\n const iconNode = rest.type ? (\n <Icon className={`${prefix}-icon`} type={iconType} theme={iconTheme} />\n ) : null\n\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n return (\n <AntdAlert\n ref={ref}\n {...rest}\n message={fragment}\n icon={iconNode}\n className={classname(rest?.className, 'tnt-alert', {\n [`${prefix}-with-action`]: action,\n })}\n />\n )\n }}\n </ConfigConsumer>\n )\n}) as AlertComponent\n\nexport default Alert\n"]}