@wangxinowo/vue-datepicker-next 1.0.0

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 (571) hide show
  1. package/README.md +104 -0
  2. package/dist/vue-datepicker-next.min.css +3560 -0
  3. package/dist/vue-datepicker-next.min.js +11 -0
  4. package/package.json +84 -0
  5. package/src/components/_util/BaseMixin.js +40 -0
  6. package/src/components/_util/ContainerRender.jsx +98 -0
  7. package/src/components/_util/FormDecoratorDirective.js +10 -0
  8. package/src/components/_util/KeyCode.js +521 -0
  9. package/src/components/_util/Portal.js +51 -0
  10. package/src/components/_util/PortalWrapper.js +156 -0
  11. package/src/components/_util/StateMixin.js +10 -0
  12. package/src/components/_util/__tests__/easings.test.js +13 -0
  13. package/src/components/_util/__tests__/scrollTo.test.js +56 -0
  14. package/src/components/_util/antDirective.js +13 -0
  15. package/src/components/_util/antInputDirective.js +73 -0
  16. package/src/components/_util/callMoment.js +4 -0
  17. package/src/components/_util/colors.js +17 -0
  18. package/src/components/_util/createChainedFunction.js +22 -0
  19. package/src/components/_util/css-animation/Event.js +130 -0
  20. package/src/components/_util/css-animation/index.js +184 -0
  21. package/src/components/_util/easings.js +8 -0
  22. package/src/components/_util/env.js +14 -0
  23. package/src/components/_util/getLocale.js +30 -0
  24. package/src/components/_util/getRequestAnimationFrame.js +46 -0
  25. package/src/components/_util/getScroll.js +17 -0
  26. package/src/components/_util/getScrollBarSize.js +38 -0
  27. package/src/components/_util/getTransitionProps.js +34 -0
  28. package/src/components/_util/interopDefault.js +4 -0
  29. package/src/components/_util/isCssAnimationSupported.js +24 -0
  30. package/src/components/_util/isFlexSupported.js +12 -0
  31. package/src/components/_util/isNumeric.js +4 -0
  32. package/src/components/_util/isValid.js +4 -0
  33. package/src/components/_util/moment-util.js +75 -0
  34. package/src/components/_util/openAnimation.js +67 -0
  35. package/src/components/_util/portalDirective.js +24 -0
  36. package/src/components/_util/props-util.js +335 -0
  37. package/src/components/_util/proxyComponent.jsx +58 -0
  38. package/src/components/_util/raf.js +32 -0
  39. package/src/components/_util/requestAnimationTimeout.js +23 -0
  40. package/src/components/_util/responsiveObserve.js +94 -0
  41. package/src/components/_util/scrollTo.js +37 -0
  42. package/src/components/_util/setStyle.js +25 -0
  43. package/src/components/_util/store/PropTypes.js +7 -0
  44. package/src/components/_util/store/Provider.jsx +15 -0
  45. package/src/components/_util/store/connect.jsx +106 -0
  46. package/src/components/_util/store/create.js +30 -0
  47. package/src/components/_util/store/index.js +5 -0
  48. package/src/components/_util/styleChecker.js +13 -0
  49. package/src/components/_util/switchScrollingEffect.js +20 -0
  50. package/src/components/_util/throttleByAnimationFrame.js +45 -0
  51. package/src/components/_util/transButton.jsx +81 -0
  52. package/src/components/_util/triggerEvent.js +8 -0
  53. package/src/components/_util/type.js +4 -0
  54. package/src/components/_util/vnode.js +147 -0
  55. package/src/components/_util/vue-types/index.js +263 -0
  56. package/src/components/_util/vue-types/utils.js +200 -0
  57. package/src/components/_util/warning.js +7 -0
  58. package/src/components/_util/wave.jsx +169 -0
  59. package/src/components/base/index.js +9 -0
  60. package/src/components/base/style/index.js +2 -0
  61. package/src/components/button/__tests__/__snapshots__/demo.test.js.snap +103 -0
  62. package/src/components/button/__tests__/__snapshots__/index.test.js.snap +43 -0
  63. package/src/components/button/__tests__/demo.test.js +3 -0
  64. package/src/components/button/__tests__/index.test.js +239 -0
  65. package/src/components/button/button-group.jsx +52 -0
  66. package/src/components/button/button.jsx +186 -0
  67. package/src/components/button/buttonTypes.js +13 -0
  68. package/src/components/button/index.js +14 -0
  69. package/src/components/button/style/index.js +2 -0
  70. package/src/components/button/style/index.less +224 -0
  71. package/src/components/button/style/mixin.less +357 -0
  72. package/src/components/calendar/locale/en_US.js +2 -0
  73. package/src/components/config-provider/__tests__/index.test.js +44 -0
  74. package/src/components/config-provider/configConsumerProps.jsx +9 -0
  75. package/src/components/config-provider/index.jsx +91 -0
  76. package/src/components/config-provider/renderEmpty.jsx +42 -0
  77. package/src/components/config-provider/style/index.js +1 -0
  78. package/src/components/config-provider/style/index.less +2 -0
  79. package/src/components/date-picker/InputIcon.js +20 -0
  80. package/src/components/date-picker/PresetPanel.jsx +102 -0
  81. package/src/components/date-picker/RangePicker.jsx +1010 -0
  82. package/src/components/date-picker/WeekPicker.jsx +235 -0
  83. package/src/components/date-picker/__tests__/DatePicker.test.js +189 -0
  84. package/src/components/date-picker/__tests__/MonthPicker.test.js +29 -0
  85. package/src/components/date-picker/__tests__/RangePicker.test.js +417 -0
  86. package/src/components/date-picker/__tests__/WeekPicker.test.js +24 -0
  87. package/src/components/date-picker/__tests__/__snapshots__/DatePicker.test.js.snap +3 -0
  88. package/src/components/date-picker/__tests__/__snapshots__/RangePicker.test.js.snap +695 -0
  89. package/src/components/date-picker/__tests__/__snapshots__/WeekPicker.test.js.snap +3 -0
  90. package/src/components/date-picker/__tests__/__snapshots__/demo.test.js.snap +49 -0
  91. package/src/components/date-picker/__tests__/__snapshots__/other.test.js.snap +240 -0
  92. package/src/components/date-picker/__tests__/demo.test.js +3 -0
  93. package/src/components/date-picker/__tests__/mount.test.js +11 -0
  94. package/src/components/date-picker/__tests__/other.test.js +88 -0
  95. package/src/components/date-picker/__tests__/showTime.test.js +234 -0
  96. package/src/components/date-picker/__tests__/utils.js +34 -0
  97. package/src/components/date-picker/createPicker.js +273 -0
  98. package/src/components/date-picker/generate/dayjs.js +438 -0
  99. package/src/components/date-picker/generate/index.js +125 -0
  100. package/src/components/date-picker/generate/moment.js +357 -0
  101. package/src/components/date-picker/index.js +37 -0
  102. package/src/components/date-picker/interface.js +172 -0
  103. package/src/components/date-picker/locale/ar_EG.js +23 -0
  104. package/src/components/date-picker/locale/bg_BG.js +19 -0
  105. package/src/components/date-picker/locale/ca_ES.js +19 -0
  106. package/src/components/date-picker/locale/cs_CZ.js +19 -0
  107. package/src/components/date-picker/locale/da_DK.js +19 -0
  108. package/src/components/date-picker/locale/de_DE.js +19 -0
  109. package/src/components/date-picker/locale/el_GR.js +19 -0
  110. package/src/components/date-picker/locale/en_GB.js +19 -0
  111. package/src/components/date-picker/locale/en_US.js +19 -0
  112. package/src/components/date-picker/locale/es_ES.js +19 -0
  113. package/src/components/date-picker/locale/et_EE.js +19 -0
  114. package/src/components/date-picker/locale/example.json +39 -0
  115. package/src/components/date-picker/locale/fa_IR.js +19 -0
  116. package/src/components/date-picker/locale/fi_FI.js +19 -0
  117. package/src/components/date-picker/locale/fr_BE.js +19 -0
  118. package/src/components/date-picker/locale/fr_FR.js +19 -0
  119. package/src/components/date-picker/locale/ga_IE.js +19 -0
  120. package/src/components/date-picker/locale/he_IL.js +19 -0
  121. package/src/components/date-picker/locale/hi_IN.js +19 -0
  122. package/src/components/date-picker/locale/hr_HR.js +19 -0
  123. package/src/components/date-picker/locale/hu_HU.js +19 -0
  124. package/src/components/date-picker/locale/id_ID.js +19 -0
  125. package/src/components/date-picker/locale/is_IS.js +19 -0
  126. package/src/components/date-picker/locale/it_IT.js +19 -0
  127. package/src/components/date-picker/locale/ja_JP.js +18 -0
  128. package/src/components/date-picker/locale/kn_IN.js +19 -0
  129. package/src/components/date-picker/locale/ko_KR.js +19 -0
  130. package/src/components/date-picker/locale/ku_IQ.js +18 -0
  131. package/src/components/date-picker/locale/lv_LV.js +19 -0
  132. package/src/components/date-picker/locale/mk_MK.js +19 -0
  133. package/src/components/date-picker/locale/mn_MN.js +19 -0
  134. package/src/components/date-picker/locale/ms_MY.js +19 -0
  135. package/src/components/date-picker/locale/nb_NO.js +19 -0
  136. package/src/components/date-picker/locale/nl_BE.js +19 -0
  137. package/src/components/date-picker/locale/nl_NL.js +19 -0
  138. package/src/components/date-picker/locale/pl_PL.js +19 -0
  139. package/src/components/date-picker/locale/pt_BR.js +19 -0
  140. package/src/components/date-picker/locale/pt_PT.js +46 -0
  141. package/src/components/date-picker/locale/ro_RO.js +19 -0
  142. package/src/components/date-picker/locale/ru_RU.js +22 -0
  143. package/src/components/date-picker/locale/sk_SK.js +19 -0
  144. package/src/components/date-picker/locale/sl_SI.js +43 -0
  145. package/src/components/date-picker/locale/sr_RS.js +19 -0
  146. package/src/components/date-picker/locale/sv_SE.js +18 -0
  147. package/src/components/date-picker/locale/ta_IN.js +20 -0
  148. package/src/components/date-picker/locale/th_TH.js +19 -0
  149. package/src/components/date-picker/locale/tr_TR.js +19 -0
  150. package/src/components/date-picker/locale/uk_UA.js +18 -0
  151. package/src/components/date-picker/locale/vi_VN.js +19 -0
  152. package/src/components/date-picker/locale/zh_CN.js +21 -0
  153. package/src/components/date-picker/locale/zh_TW.js +20 -0
  154. package/src/components/date-picker/statusUtils.js +53 -0
  155. package/src/components/date-picker/style/Calendar.less +402 -0
  156. package/src/components/date-picker/style/DecadePanel.less +81 -0
  157. package/src/components/date-picker/style/MonthPanel.less +86 -0
  158. package/src/components/date-picker/style/MonthPicker.less +11 -0
  159. package/src/components/date-picker/style/Picker.less +113 -0
  160. package/src/components/date-picker/style/RangePicker.less +327 -0
  161. package/src/components/date-picker/style/TimePicker.less +151 -0
  162. package/src/components/date-picker/style/WeekPicker.less +21 -0
  163. package/src/components/date-picker/style/YearPanel.less +93 -0
  164. package/src/components/date-picker/style/index.js +8 -0
  165. package/src/components/date-picker/style/index.less +20 -0
  166. package/src/components/date-picker/style/presets.less +69 -0
  167. package/src/components/date-picker/style/status.less +94 -0
  168. package/src/components/date-picker/style/transitions.less +176 -0
  169. package/src/components/date-picker/utils.js +209 -0
  170. package/src/components/date-picker/wrapPicker.js +258 -0
  171. package/src/components/empty/__tests__/__snapshots__/demo.test.js.snap +195 -0
  172. package/src/components/empty/__tests__/demo.test.js +3 -0
  173. package/src/components/empty/__tests__/index.test.js +25 -0
  174. package/src/components/empty/empty.jsx +47 -0
  175. package/src/components/empty/index.jsx +78 -0
  176. package/src/components/empty/simple.jsx +20 -0
  177. package/src/components/empty/style/index.js +2 -0
  178. package/src/components/empty/style/index.less +52 -0
  179. package/src/components/icon/IconFont.jsx +52 -0
  180. package/src/components/icon/__tests__/__snapshots__/demo.test.js.snap +671 -0
  181. package/src/components/icon/__tests__/__snapshots__/index.test.js.snap +77 -0
  182. package/src/components/icon/__tests__/demo.test.js +3 -0
  183. package/src/components/icon/__tests__/index.test.js +236 -0
  184. package/src/components/icon/index.js +185 -0
  185. package/src/components/icon/style/index.js +2 -0
  186. package/src/components/icon/style/index.less +4 -0
  187. package/src/components/icon/twoTonePrimaryColor.js +12 -0
  188. package/src/components/icon/utils.js +77 -0
  189. package/src/components/input/ClearableLabeledInput.jsx +182 -0
  190. package/src/components/input/Group.jsx +41 -0
  191. package/src/components/input/Input.jsx +240 -0
  192. package/src/components/input/Password.jsx +117 -0
  193. package/src/components/input/ResizableTextArea.jsx +158 -0
  194. package/src/components/input/Search.jsx +185 -0
  195. package/src/components/input/TextArea.jsx +131 -0
  196. package/src/components/input/__tests__/Search.test.js +134 -0
  197. package/src/components/input/__tests__/__snapshots__/Search.test.js.snap +5 -0
  198. package/src/components/input/__tests__/__snapshots__/demo.test.js.snap +86 -0
  199. package/src/components/input/__tests__/__snapshots__/index.test.js.snap +9 -0
  200. package/src/components/input/__tests__/demo.test.js +3 -0
  201. package/src/components/input/__tests__/index.test.js +124 -0
  202. package/src/components/input/calculateNodeHeight.js +151 -0
  203. package/src/components/input/index.js +27 -0
  204. package/src/components/input/inputProps.js +36 -0
  205. package/src/components/input/style/index.js +5 -0
  206. package/src/components/input/style/index.less +52 -0
  207. package/src/components/input/style/mixin.less +453 -0
  208. package/src/components/input/style/search-input.less +34 -0
  209. package/src/components/locale/ar_EG.js +43 -0
  210. package/src/components/locale/bg_BG.js +43 -0
  211. package/src/components/locale/ca_ES.js +41 -0
  212. package/src/components/locale/cs_CZ.js +41 -0
  213. package/src/components/locale/da_DK.js +43 -0
  214. package/src/components/locale/de_DE.js +43 -0
  215. package/src/components/locale/default.js +62 -0
  216. package/src/components/locale/el_GR.js +43 -0
  217. package/src/components/locale/en_GB.js +43 -0
  218. package/src/components/locale/en_US.js +3 -0
  219. package/src/components/locale/es_ES.js +59 -0
  220. package/src/components/locale/et_EE.js +43 -0
  221. package/src/components/locale/fa_IR.js +43 -0
  222. package/src/components/locale/fi_FI.js +44 -0
  223. package/src/components/locale/fr_BE.js +47 -0
  224. package/src/components/locale/fr_FR.js +47 -0
  225. package/src/components/locale/ga_IE.js +43 -0
  226. package/src/components/locale/he_IL.js +43 -0
  227. package/src/components/locale/hi_IN.js +51 -0
  228. package/src/components/locale/hr_HR.js +57 -0
  229. package/src/components/locale/hu_HU.js +44 -0
  230. package/src/components/locale/hy_AM.js +109 -0
  231. package/src/components/locale/id_ID.js +45 -0
  232. package/src/components/locale/is_IS.js +43 -0
  233. package/src/components/locale/it_IT.js +56 -0
  234. package/src/components/locale/ja_JP.js +43 -0
  235. package/src/components/locale/kn_IN.js +51 -0
  236. package/src/components/locale/ko_KR.js +43 -0
  237. package/src/components/locale/ku_IQ.js +43 -0
  238. package/src/components/locale/lv_LV.js +43 -0
  239. package/src/components/locale/mk_MK.js +58 -0
  240. package/src/components/locale/mn_MN.js +43 -0
  241. package/src/components/locale/ms_MY.js +63 -0
  242. package/src/components/locale/nb_NO.js +43 -0
  243. package/src/components/locale/ne_NP.js +44 -0
  244. package/src/components/locale/nl_BE.js +43 -0
  245. package/src/components/locale/nl_NL.js +62 -0
  246. package/src/components/locale/pl_PL.js +43 -0
  247. package/src/components/locale/pt_BR.js +49 -0
  248. package/src/components/locale/pt_PT.js +44 -0
  249. package/src/components/locale/ro_RO.js +62 -0
  250. package/src/components/locale/ru_RU.js +53 -0
  251. package/src/components/locale/sk_SK.js +62 -0
  252. package/src/components/locale/sl_SI.js +43 -0
  253. package/src/components/locale/sr_RS.js +43 -0
  254. package/src/components/locale/sv_SE.js +47 -0
  255. package/src/components/locale/ta_IN.js +63 -0
  256. package/src/components/locale/th_TH.js +62 -0
  257. package/src/components/locale/tr_TR.js +57 -0
  258. package/src/components/locale/uk_UA.js +43 -0
  259. package/src/components/locale/vi_VN.js +43 -0
  260. package/src/components/locale/zh_CN.js +62 -0
  261. package/src/components/locale/zh_TW.js +49 -0
  262. package/src/components/locale-provider/LocaleReceiver.jsx +43 -0
  263. package/src/components/locale-provider/__tests__/__snapshots__/demo.test.js.snap +434 -0
  264. package/src/components/locale-provider/__tests__/__snapshots__/index.test.js.snap +22618 -0
  265. package/src/components/locale-provider/__tests__/demo.test.js +3 -0
  266. package/src/components/locale-provider/__tests__/index.test.js +271 -0
  267. package/src/components/locale-provider/ar_EG.js +3 -0
  268. package/src/components/locale-provider/bg_BG.js +3 -0
  269. package/src/components/locale-provider/ca_ES.js +3 -0
  270. package/src/components/locale-provider/cs_CZ.js +3 -0
  271. package/src/components/locale-provider/da_DK.js +3 -0
  272. package/src/components/locale-provider/de_DE.js +3 -0
  273. package/src/components/locale-provider/default.js +3 -0
  274. package/src/components/locale-provider/el_GR.js +3 -0
  275. package/src/components/locale-provider/en_GB.js +3 -0
  276. package/src/components/locale-provider/en_US.js +3 -0
  277. package/src/components/locale-provider/es_ES.js +3 -0
  278. package/src/components/locale-provider/et_EE.js +3 -0
  279. package/src/components/locale-provider/fa_IR.js +3 -0
  280. package/src/components/locale-provider/fi_FI.js +3 -0
  281. package/src/components/locale-provider/fr_BE.js +3 -0
  282. package/src/components/locale-provider/fr_FR.js +3 -0
  283. package/src/components/locale-provider/ga_IE.js +3 -0
  284. package/src/components/locale-provider/he_IL.js +3 -0
  285. package/src/components/locale-provider/hi_IN.js +3 -0
  286. package/src/components/locale-provider/hr_HR.js +3 -0
  287. package/src/components/locale-provider/hu_HU.js +3 -0
  288. package/src/components/locale-provider/hy_AM.js +3 -0
  289. package/src/components/locale-provider/id_ID.js +3 -0
  290. package/src/components/locale-provider/index.jsx +82 -0
  291. package/src/components/locale-provider/is_IS.js +3 -0
  292. package/src/components/locale-provider/it_IT.js +3 -0
  293. package/src/components/locale-provider/ja_JP.js +3 -0
  294. package/src/components/locale-provider/kn_IN.js +3 -0
  295. package/src/components/locale-provider/ko_KR.js +3 -0
  296. package/src/components/locale-provider/ku_IQ.js +3 -0
  297. package/src/components/locale-provider/lv_LV.js +3 -0
  298. package/src/components/locale-provider/mk_MK.js +3 -0
  299. package/src/components/locale-provider/mn_MN.js +3 -0
  300. package/src/components/locale-provider/ms_MY.js +3 -0
  301. package/src/components/locale-provider/nb_NO.js +3 -0
  302. package/src/components/locale-provider/ne-NP.js +3 -0
  303. package/src/components/locale-provider/ne_NP.js +3 -0
  304. package/src/components/locale-provider/nl_BE.js +3 -0
  305. package/src/components/locale-provider/nl_NL.js +3 -0
  306. package/src/components/locale-provider/pl_PL.js +3 -0
  307. package/src/components/locale-provider/pt_BR.js +3 -0
  308. package/src/components/locale-provider/pt_PT.js +3 -0
  309. package/src/components/locale-provider/ro_RO.js +3 -0
  310. package/src/components/locale-provider/ru_RU.js +3 -0
  311. package/src/components/locale-provider/sk_SK.js +3 -0
  312. package/src/components/locale-provider/sl_SI.js +3 -0
  313. package/src/components/locale-provider/sr_RS.js +3 -0
  314. package/src/components/locale-provider/style/index.js +1 -0
  315. package/src/components/locale-provider/style/index.less +2 -0
  316. package/src/components/locale-provider/sv_SE.js +3 -0
  317. package/src/components/locale-provider/ta_IN.js +62 -0
  318. package/src/components/locale-provider/th_TH.js +3 -0
  319. package/src/components/locale-provider/tr_TR.js +3 -0
  320. package/src/components/locale-provider/uk_UA.js +3 -0
  321. package/src/components/locale-provider/vi_VN.js +3 -0
  322. package/src/components/locale-provider/zh_CN.js +3 -0
  323. package/src/components/locale-provider/zh_TW.js +3 -0
  324. package/src/components/style/color/bezierEasing.less +110 -0
  325. package/src/components/style/color/colorPalette.less +75 -0
  326. package/src/components/style/color/colors.less +149 -0
  327. package/src/components/style/color/tinyColor.less +1184 -0
  328. package/src/components/style/core/base.less +510 -0
  329. package/src/components/style/core/iconfont.less +19 -0
  330. package/src/components/style/core/index.less +4 -0
  331. package/src/components/style/core/motion/fade.less +31 -0
  332. package/src/components/style/core/motion/move.less +120 -0
  333. package/src/components/style/core/motion/other.less +45 -0
  334. package/src/components/style/core/motion/slide.less +120 -0
  335. package/src/components/style/core/motion/swing.less +34 -0
  336. package/src/components/style/core/motion/zoom.less +162 -0
  337. package/src/components/style/core/motion.less +20 -0
  338. package/src/components/style/index.js +1 -0
  339. package/src/components/style/index.less +2 -0
  340. package/src/components/style/index.tsx +1 -0
  341. package/src/components/style/mixins/clearfix.less +13 -0
  342. package/src/components/style/mixins/compatibility.less +22 -0
  343. package/src/components/style/mixins/iconfont.less +43 -0
  344. package/src/components/style/mixins/index.less +10 -0
  345. package/src/components/style/mixins/motion.less +35 -0
  346. package/src/components/style/mixins/operation-unit.less +18 -0
  347. package/src/components/style/mixins/reset.less +13 -0
  348. package/src/components/style/mixins/size.less +10 -0
  349. package/src/components/style/mixins/typography.less +49 -0
  350. package/src/components/style/themes/default.less +701 -0
  351. package/src/components/style/themes/index.less +1 -0
  352. package/src/components/style/v2-compatible-reset.js +1 -0
  353. package/src/components/style/v2-compatible-reset.less +51 -0
  354. package/src/components/style/v2-compatible-reset.tsx +1 -0
  355. package/src/components/tag/CheckableTag.jsx +43 -0
  356. package/src/components/tag/Tag.jsx +145 -0
  357. package/src/components/tag/__tests__/__snapshots__/demo.test.js.snap +92 -0
  358. package/src/components/tag/__tests__/__snapshots__/index.test.js.snap +13 -0
  359. package/src/components/tag/__tests__/demo.test.js +3 -0
  360. package/src/components/tag/__tests__/index.test.js +82 -0
  361. package/src/components/tag/index.js +14 -0
  362. package/src/components/tag/style/index.js +2 -0
  363. package/src/components/tag/style/index.less +106 -0
  364. package/src/components/time-picker/__tests__/__snapshots__/demo.test.js.snap +39 -0
  365. package/src/components/time-picker/__tests__/__snapshots__/index.test.js.snap +5 -0
  366. package/src/components/time-picker/__tests__/demo.test.js +3 -0
  367. package/src/components/time-picker/__tests__/index.test.js +55 -0
  368. package/src/components/time-picker/index.jsx +267 -0
  369. package/src/components/time-picker/locale/ar_EG.js +5 -0
  370. package/src/components/time-picker/locale/bg_BG.js +5 -0
  371. package/src/components/time-picker/locale/ca_ES.js +5 -0
  372. package/src/components/time-picker/locale/cs_CZ.js +5 -0
  373. package/src/components/time-picker/locale/da_DK.js +5 -0
  374. package/src/components/time-picker/locale/de_DE.js +5 -0
  375. package/src/components/time-picker/locale/el_GR.js +5 -0
  376. package/src/components/time-picker/locale/en_GB.js +5 -0
  377. package/src/components/time-picker/locale/en_US.js +5 -0
  378. package/src/components/time-picker/locale/es_ES.js +5 -0
  379. package/src/components/time-picker/locale/et_EE.js +5 -0
  380. package/src/components/time-picker/locale/fa_IR.js +5 -0
  381. package/src/components/time-picker/locale/fi_FI.js +5 -0
  382. package/src/components/time-picker/locale/fr_BE.js +5 -0
  383. package/src/components/time-picker/locale/fr_FR.js +5 -0
  384. package/src/components/time-picker/locale/ga_IE.js +5 -0
  385. package/src/components/time-picker/locale/he_IL.js +5 -0
  386. package/src/components/time-picker/locale/hi_IN.js +5 -0
  387. package/src/components/time-picker/locale/hr_HR.js +5 -0
  388. package/src/components/time-picker/locale/hu_HU.js +5 -0
  389. package/src/components/time-picker/locale/id_ID.js +5 -0
  390. package/src/components/time-picker/locale/is_IS.js +5 -0
  391. package/src/components/time-picker/locale/it_IT.js +5 -0
  392. package/src/components/time-picker/locale/ja_JP.js +5 -0
  393. package/src/components/time-picker/locale/kn_IN.js +5 -0
  394. package/src/components/time-picker/locale/ko_KR.js +5 -0
  395. package/src/components/time-picker/locale/ku_IQ.js +5 -0
  396. package/src/components/time-picker/locale/lv_LV.js +5 -0
  397. package/src/components/time-picker/locale/mk_MK.js +5 -0
  398. package/src/components/time-picker/locale/mn_MN.js +5 -0
  399. package/src/components/time-picker/locale/ms_MY.js +5 -0
  400. package/src/components/time-picker/locale/nb_NO.js +5 -0
  401. package/src/components/time-picker/locale/nl_BE.js +5 -0
  402. package/src/components/time-picker/locale/nl_NL.js +5 -0
  403. package/src/components/time-picker/locale/pl_PL.js +5 -0
  404. package/src/components/time-picker/locale/pt_BR.js +5 -0
  405. package/src/components/time-picker/locale/pt_PT.js +5 -0
  406. package/src/components/time-picker/locale/ro_RO.js +5 -0
  407. package/src/components/time-picker/locale/ru_RU.js +8 -0
  408. package/src/components/time-picker/locale/sk_SK.js +5 -0
  409. package/src/components/time-picker/locale/sl_SI.js +5 -0
  410. package/src/components/time-picker/locale/sr_RS.js +5 -0
  411. package/src/components/time-picker/locale/sv_SE.js +5 -0
  412. package/src/components/time-picker/locale/ta_IN.js +5 -0
  413. package/src/components/time-picker/locale/th_TH.js +5 -0
  414. package/src/components/time-picker/locale/tr_TR.js +5 -0
  415. package/src/components/time-picker/locale/uk_UA.js +5 -0
  416. package/src/components/time-picker/locale/vi_VN.js +5 -0
  417. package/src/components/time-picker/locale/zh_CN.js +5 -0
  418. package/src/components/time-picker/locale/zh_TW.js +5 -0
  419. package/src/components/time-picker/style/index.js +2 -0
  420. package/src/components/time-picker/style/index.less +246 -0
  421. package/src/components/tooltip/Tooltip.jsx +219 -0
  422. package/src/components/tooltip/__tests__/__snapshots__/demo.test.js.snap +20 -0
  423. package/src/components/tooltip/__tests__/demo.test.js +3 -0
  424. package/src/components/tooltip/__tests__/tooltip.test.js +204 -0
  425. package/src/components/tooltip/abstractTooltipProps.js +34 -0
  426. package/src/components/tooltip/index.js +10 -0
  427. package/src/components/tooltip/placements.js +96 -0
  428. package/src/components/tooltip/style/index.js +2 -0
  429. package/src/components/tooltip/style/index.less +187 -0
  430. package/src/components/vc-align/Align.jsx +149 -0
  431. package/src/components/vc-align/index.js +3 -0
  432. package/src/components/vc-align/util.js +52 -0
  433. package/src/components/vc-calendar/assets/common/Calendar.less +106 -0
  434. package/src/components/vc-calendar/assets/common/FullCalendar.less +91 -0
  435. package/src/components/vc-calendar/assets/common/Picker.less +10 -0
  436. package/src/components/vc-calendar/assets/common/RangeCalendar.less +131 -0
  437. package/src/components/vc-calendar/assets/common/index.less +16 -0
  438. package/src/components/vc-calendar/assets/index/Calendar.less +301 -0
  439. package/src/components/vc-calendar/assets/index/DecadePanel.less +122 -0
  440. package/src/components/vc-calendar/assets/index/Input.less +23 -0
  441. package/src/components/vc-calendar/assets/index/MonthPanel.less +143 -0
  442. package/src/components/vc-calendar/assets/index/Picker.less +110 -0
  443. package/src/components/vc-calendar/assets/index/Time.less +6 -0
  444. package/src/components/vc-calendar/assets/index/TimePanel.less +72 -0
  445. package/src/components/vc-calendar/assets/index/YearPanel.less +136 -0
  446. package/src/components/vc-calendar/assets/index.less +10 -0
  447. package/src/components/vc-calendar/index.js +8 -0
  448. package/src/components/vc-calendar/src/Calendar.jsx +390 -0
  449. package/src/components/vc-calendar/src/FullCalendar.jsx +166 -0
  450. package/src/components/vc-calendar/src/MonthCalendar.jsx +125 -0
  451. package/src/components/vc-calendar/src/Picker.jsx +244 -0
  452. package/src/components/vc-calendar/src/RangeCalendar.jsx +1031 -0
  453. package/src/components/vc-calendar/src/calendar/CalendarFooter.jsx +86 -0
  454. package/src/components/vc-calendar/src/calendar/CalendarHeader.jsx +264 -0
  455. package/src/components/vc-calendar/src/calendar/OkButton.jsx +18 -0
  456. package/src/components/vc-calendar/src/calendar/TimePickerButton.jsx +22 -0
  457. package/src/components/vc-calendar/src/calendar/TodayButton.jsx +33 -0
  458. package/src/components/vc-calendar/src/date/DateConstants.js +4 -0
  459. package/src/components/vc-calendar/src/date/DateInput.jsx +226 -0
  460. package/src/components/vc-calendar/src/date/DateTBody.jsx +261 -0
  461. package/src/components/vc-calendar/src/date/DateTHead.jsx +49 -0
  462. package/src/components/vc-calendar/src/date/DateTable.jsx +20 -0
  463. package/src/components/vc-calendar/src/decade/DecadePanel.jsx +131 -0
  464. package/src/components/vc-calendar/src/full-calendar/CalendarHeader.jsx +134 -0
  465. package/src/components/vc-calendar/src/index.js +3 -0
  466. package/src/components/vc-calendar/src/locale/ar_EG.js +27 -0
  467. package/src/components/vc-calendar/src/locale/bg_BG.js +27 -0
  468. package/src/components/vc-calendar/src/locale/ca_ES.js +27 -0
  469. package/src/components/vc-calendar/src/locale/cs_CZ.js +27 -0
  470. package/src/components/vc-calendar/src/locale/da_DK.js +27 -0
  471. package/src/components/vc-calendar/src/locale/de_DE.js +27 -0
  472. package/src/components/vc-calendar/src/locale/el_GR.js +27 -0
  473. package/src/components/vc-calendar/src/locale/en_GB.js +27 -0
  474. package/src/components/vc-calendar/src/locale/en_US.js +28 -0
  475. package/src/components/vc-calendar/src/locale/es_ES.js +27 -0
  476. package/src/components/vc-calendar/src/locale/et_EE.js +27 -0
  477. package/src/components/vc-calendar/src/locale/fa_IR.js +27 -0
  478. package/src/components/vc-calendar/src/locale/fi_FI.js +27 -0
  479. package/src/components/vc-calendar/src/locale/fr_BE.js +27 -0
  480. package/src/components/vc-calendar/src/locale/fr_FR.js +27 -0
  481. package/src/components/vc-calendar/src/locale/ga_IE.js +28 -0
  482. package/src/components/vc-calendar/src/locale/he_IL.js +28 -0
  483. package/src/components/vc-calendar/src/locale/hi_IN.js +28 -0
  484. package/src/components/vc-calendar/src/locale/hr_HR.js +28 -0
  485. package/src/components/vc-calendar/src/locale/hu_HU.js +27 -0
  486. package/src/components/vc-calendar/src/locale/id_ID.js +28 -0
  487. package/src/components/vc-calendar/src/locale/is_IS.js +27 -0
  488. package/src/components/vc-calendar/src/locale/it_IT.js +27 -0
  489. package/src/components/vc-calendar/src/locale/ja_JP.js +26 -0
  490. package/src/components/vc-calendar/src/locale/kn_IN.js +28 -0
  491. package/src/components/vc-calendar/src/locale/ko_KR.js +27 -0
  492. package/src/components/vc-calendar/src/locale/ku_IQ.js +27 -0
  493. package/src/components/vc-calendar/src/locale/lv_LV.js +27 -0
  494. package/src/components/vc-calendar/src/locale/mk_MK.js +27 -0
  495. package/src/components/vc-calendar/src/locale/mm_MM.js +28 -0
  496. package/src/components/vc-calendar/src/locale/mn_MN.js +28 -0
  497. package/src/components/vc-calendar/src/locale/ms_MY.js +27 -0
  498. package/src/components/vc-calendar/src/locale/nb_NO.js +27 -0
  499. package/src/components/vc-calendar/src/locale/nl_BE.js +27 -0
  500. package/src/components/vc-calendar/src/locale/nl_NL.js +27 -0
  501. package/src/components/vc-calendar/src/locale/pl_PL.js +27 -0
  502. package/src/components/vc-calendar/src/locale/pt_BR.js +27 -0
  503. package/src/components/vc-calendar/src/locale/pt_PT.js +27 -0
  504. package/src/components/vc-calendar/src/locale/ro_RO.js +28 -0
  505. package/src/components/vc-calendar/src/locale/ru_RU.js +27 -0
  506. package/src/components/vc-calendar/src/locale/sk_SK.js +28 -0
  507. package/src/components/vc-calendar/src/locale/sl_SI.js +27 -0
  508. package/src/components/vc-calendar/src/locale/sr_RS.js +27 -0
  509. package/src/components/vc-calendar/src/locale/sv_SE.js +27 -0
  510. package/src/components/vc-calendar/src/locale/ta_IN.js +28 -0
  511. package/src/components/vc-calendar/src/locale/th_TH.js +27 -0
  512. package/src/components/vc-calendar/src/locale/tr_TR.js +27 -0
  513. package/src/components/vc-calendar/src/locale/ug_CN.js +26 -0
  514. package/src/components/vc-calendar/src/locale/uk_UA.js +27 -0
  515. package/src/components/vc-calendar/src/locale/vi_VN.js +28 -0
  516. package/src/components/vc-calendar/src/locale/zh_CN.js +27 -0
  517. package/src/components/vc-calendar/src/locale/zh_TW.js +26 -0
  518. package/src/components/vc-calendar/src/mixin/CalendarMixin.js +122 -0
  519. package/src/components/vc-calendar/src/mixin/CommonMixin.js +26 -0
  520. package/src/components/vc-calendar/src/month/MonthPanel.jsx +123 -0
  521. package/src/components/vc-calendar/src/month/MonthTable.jsx +138 -0
  522. package/src/components/vc-calendar/src/picker/placements.js +35 -0
  523. package/src/components/vc-calendar/src/range-calendar/CalendarPart.jsx +171 -0
  524. package/src/components/vc-calendar/src/util/index.js +113 -0
  525. package/src/components/vc-calendar/src/util/toTime.js +15 -0
  526. package/src/components/vc-calendar/src/year/YearPanel.jsx +167 -0
  527. package/src/components/vc-pagination/locale/en_US.js +15 -0
  528. package/src/components/vc-select/DropdownMenu.jsx +216 -0
  529. package/src/components/vc-select/OptGroup.jsx +8 -0
  530. package/src/components/vc-select/Option.jsx +11 -0
  531. package/src/components/vc-select/PropTypes.js +59 -0
  532. package/src/components/vc-select/Select.jsx +1716 -0
  533. package/src/components/vc-select/SelectTrigger.jsx +259 -0
  534. package/src/components/vc-select/assets/index.less +541 -0
  535. package/src/components/vc-select/index.js +11 -0
  536. package/src/components/vc-select/util.js +223 -0
  537. package/src/components/vc-time-picker/Combobox.jsx +214 -0
  538. package/src/components/vc-time-picker/Header.jsx +187 -0
  539. package/src/components/vc-time-picker/Panel.jsx +225 -0
  540. package/src/components/vc-time-picker/Select.jsx +140 -0
  541. package/src/components/vc-time-picker/TimePicker.jsx +386 -0
  542. package/src/components/vc-time-picker/assets/index/Header.less +22 -0
  543. package/src/components/vc-time-picker/assets/index/Panel.less +29 -0
  544. package/src/components/vc-time-picker/assets/index/Picker.less +25 -0
  545. package/src/components/vc-time-picker/assets/index/Select.less +62 -0
  546. package/src/components/vc-time-picker/assets/index.less +44 -0
  547. package/src/components/vc-time-picker/index.js +2 -0
  548. package/src/components/vc-time-picker/placements.js +35 -0
  549. package/src/components/vc-tooltip/Content.jsx +23 -0
  550. package/src/components/vc-tooltip/Tooltip.jsx +106 -0
  551. package/src/components/vc-tooltip/assets/boostrap/anim.less +61 -0
  552. package/src/components/vc-tooltip/assets/bootstrap.less +171 -0
  553. package/src/components/vc-tooltip/assets/bootstrap_white.less +190 -0
  554. package/src/components/vc-tooltip/index.js +4 -0
  555. package/src/components/vc-tooltip/placements.js +83 -0
  556. package/src/components/vc-trigger/LazyRenderBox.jsx +22 -0
  557. package/src/components/vc-trigger/Popup.jsx +336 -0
  558. package/src/components/vc-trigger/PopupInner.jsx +25 -0
  559. package/src/components/vc-trigger/Trigger.jsx +663 -0
  560. package/src/components/vc-trigger/assets/index.less +72 -0
  561. package/src/components/vc-trigger/assets/mask.less +65 -0
  562. package/src/components/vc-trigger/index.js +3 -0
  563. package/src/components/vc-trigger/index.md +160 -0
  564. package/src/components/vc-trigger/t.js +665 -0
  565. package/src/components/vc-trigger/utils.js +27 -0
  566. package/src/components/vc-util/Dom/addEventListener.js +5 -0
  567. package/src/components/vc-util/Dom/class.js +28 -0
  568. package/src/components/vc-util/Dom/contains.js +11 -0
  569. package/src/components/vc-util/warning.js +38 -0
  570. package/src/index.js +44 -0
  571. package/types/index.d.ts +112 -0
@@ -0,0 +1,51 @@
1
+ // For 2.x reset compatibility
2
+ // import 'antd/style/v2-compatible-reset';
3
+ // or
4
+ // @import '~antd/style/v2-compatible-reset.css';
5
+ // unify the setting of elements's margin and padding for browsers
6
+ body,
7
+ div,
8
+ dl,
9
+ dt,
10
+ dd,
11
+ ul,
12
+ ol,
13
+ li,
14
+ h1,
15
+ h2,
16
+ h3,
17
+ h4,
18
+ h5,
19
+ h6,
20
+ pre,
21
+ code,
22
+ form,
23
+ fieldset,
24
+ legend,
25
+ input,
26
+ textarea,
27
+ p,
28
+ blockquote,
29
+ th,
30
+ td,
31
+ hr,
32
+ button,
33
+ article,
34
+ aside,
35
+ details,
36
+ figcaption,
37
+ figure,
38
+ footer,
39
+ header,
40
+ hgroup,
41
+ menu,
42
+ nav,
43
+ section {
44
+ margin: 0;
45
+ padding: 0;
46
+ }
47
+
48
+ ul,
49
+ ol {
50
+ list-style: none;
51
+ }
@@ -0,0 +1 @@
1
+ import './v2-compatible-reset.less';
@@ -0,0 +1,43 @@
1
+ import PropTypes from '../_util/vue-types';
2
+ import { ConfigConsumerProps } from '../config-provider/configConsumerProps';
3
+
4
+ export default {
5
+ name: 'ACheckableTag',
6
+ model: {
7
+ prop: 'checked',
8
+ },
9
+ props: {
10
+ prefixCls: PropTypes.string,
11
+ checked: Boolean,
12
+ },
13
+ inject: {
14
+ configProvider: { default: () => ConfigConsumerProps },
15
+ },
16
+ computed: {
17
+ classes() {
18
+ const { checked, prefixCls: customizePrefixCls } = this;
19
+ const getPrefixCls = this.configProvider.getPrefixCls;
20
+ const prefixCls = getPrefixCls('tag', customizePrefixCls);
21
+ return {
22
+ [`${prefixCls}`]: true,
23
+ [`${prefixCls}-checkable`]: true,
24
+ [`${prefixCls}-checkable-checked`]: checked,
25
+ };
26
+ },
27
+ },
28
+ methods: {
29
+ handleClick() {
30
+ const { checked } = this;
31
+ this.$emit('input', !checked);
32
+ this.$emit('change', !checked);
33
+ },
34
+ },
35
+ render() {
36
+ const { classes, handleClick, $slots } = this;
37
+ return (
38
+ <div class={classes} onClick={handleClick}>
39
+ {$slots.default}
40
+ </div>
41
+ );
42
+ },
43
+ };
@@ -0,0 +1,145 @@
1
+ import PropTypes from '../_util/vue-types';
2
+ import Icon from '../icon';
3
+ import getTransitionProps from '../_util/getTransitionProps';
4
+ import omit from 'omit.js';
5
+ import Wave from '../_util/wave';
6
+ import { hasProp, getListeners, getOptionProps } from '../_util/props-util';
7
+ import BaseMixin from '../_util/BaseMixin';
8
+ import { ConfigConsumerProps } from '../config-provider/configConsumerProps';
9
+ import warning from '../_util/warning';
10
+
11
+ const PresetColorTypes = [
12
+ 'pink',
13
+ 'red',
14
+ 'yellow',
15
+ 'orange',
16
+ 'cyan',
17
+ 'green',
18
+ 'blue',
19
+ 'purple',
20
+ 'geekblue',
21
+ 'magenta',
22
+ 'volcano',
23
+ 'gold',
24
+ 'lime',
25
+ ];
26
+ const PresetColorRegex = new RegExp(`^(${PresetColorTypes.join('|')})(-inverse)?$`);
27
+
28
+ export default {
29
+ name: 'ATag',
30
+ mixins: [BaseMixin],
31
+ model: {
32
+ prop: 'visible',
33
+ event: 'close.visible',
34
+ },
35
+ props: {
36
+ prefixCls: PropTypes.string,
37
+ color: PropTypes.string,
38
+ closable: PropTypes.bool.def(false),
39
+ visible: PropTypes.bool,
40
+ afterClose: PropTypes.func,
41
+ },
42
+ inject: {
43
+ configProvider: { default: () => ConfigConsumerProps },
44
+ },
45
+ data() {
46
+ let _visible = true;
47
+ const props = getOptionProps(this);
48
+ if ('visible' in props) {
49
+ _visible = this.visible;
50
+ }
51
+ warning(
52
+ !('afterClose' in props),
53
+ 'Tag',
54
+ "'afterClose' will be deprecated, please use 'close' event, we will remove this in the next version.",
55
+ );
56
+ return {
57
+ _visible,
58
+ };
59
+ },
60
+ watch: {
61
+ visible(val) {
62
+ this.setState({
63
+ _visible: val,
64
+ });
65
+ },
66
+ },
67
+ methods: {
68
+ setVisible(visible, e) {
69
+ this.$emit('close', e);
70
+ this.$emit('close.visible', false);
71
+ const afterClose = this.afterClose;
72
+ if (afterClose) {
73
+ // next version remove.
74
+ afterClose();
75
+ }
76
+ if (e.defaultPrevented) {
77
+ return;
78
+ }
79
+ if (!hasProp(this, 'visible')) {
80
+ this.setState({ _visible: visible });
81
+ }
82
+ },
83
+
84
+ handleIconClick(e) {
85
+ e.stopPropagation();
86
+ this.setVisible(false, e);
87
+ },
88
+
89
+ isPresetColor() {
90
+ const { color } = this.$props;
91
+ if (!color) {
92
+ return false;
93
+ }
94
+ return PresetColorRegex.test(color);
95
+ },
96
+ getTagStyle() {
97
+ const { color } = this.$props;
98
+ const isPresetColor = this.isPresetColor();
99
+ return {
100
+ backgroundColor: color && !isPresetColor ? color : undefined,
101
+ };
102
+ },
103
+
104
+ getTagClassName(prefixCls) {
105
+ const { color } = this.$props;
106
+ const isPresetColor = this.isPresetColor();
107
+ return {
108
+ [prefixCls]: true,
109
+ [`${prefixCls}-${color}`]: isPresetColor,
110
+ [`${prefixCls}-has-color`]: color && !isPresetColor,
111
+ };
112
+ },
113
+
114
+ renderCloseIcon() {
115
+ const { closable } = this.$props;
116
+ return closable ? <Icon type="close" onClick={this.handleIconClick} /> : null;
117
+ },
118
+ },
119
+
120
+ render() {
121
+ const { prefixCls: customizePrefixCls } = this.$props;
122
+ const getPrefixCls = this.configProvider.getPrefixCls;
123
+ const prefixCls = getPrefixCls('tag', customizePrefixCls);
124
+ const { _visible: visible } = this.$data;
125
+ const tag = (
126
+ <span
127
+ v-show={visible}
128
+ {...{ on: omit(getListeners(this), ['close']) }}
129
+ class={this.getTagClassName(prefixCls)}
130
+ style={this.getTagStyle()}
131
+ >
132
+ {this.$slots.default}
133
+ {this.renderCloseIcon()}
134
+ </span>
135
+ );
136
+ const transitionProps = getTransitionProps(`${prefixCls}-zoom`, {
137
+ appear: false,
138
+ });
139
+ return (
140
+ <Wave>
141
+ <transition {...transitionProps}>{tag}</transition>
142
+ </Wave>
143
+ );
144
+ },
145
+ };
@@ -0,0 +1,92 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`renders ./antdv-demo/docs/tag/demo/basic.md correctly 1`] = `
4
+ <div><span class="ant-tag">Tag 1</span> <span class="ant-tag"><a href="https://github.com/vueComponent/ant-design">Link</a></span> <span class="ant-tag">
5
+ Tag 2
6
+ <i aria-label="icon: close" tabindex="-1" class="anticon anticon-close"><svg viewBox="64 64 896 896" data-icon="close" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"></path></svg></i></span> <span class="ant-tag">
7
+ Prevent Default
8
+ <i aria-label="icon: close" tabindex="-1" class="anticon anticon-close"><svg viewBox="64 64 896 896" data-icon="close" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"></path></svg></i></span></div>
9
+ `;
10
+
11
+ exports[`renders ./antdv-demo/docs/tag/demo/checkable.md correctly 1`] = `
12
+ <div>
13
+ <div class="ant-tag ant-tag-checkable">
14
+ Tag1
15
+ </div>
16
+ <div class="ant-tag ant-tag-checkable">
17
+ Tag2
18
+ </div>
19
+ <div class="ant-tag ant-tag-checkable">
20
+ Tag3
21
+ </div>
22
+ </div>
23
+ `;
24
+
25
+ exports[`renders ./antdv-demo/docs/tag/demo/colorful.md correctly 1`] = `
26
+ <div>
27
+ <h4 style="margin-bottom: 16px;">
28
+ Presets:
29
+ </h4>
30
+ <div><span class="ant-tag ant-tag-pink">
31
+ pink
32
+ </span> <span class="ant-tag ant-tag-red">
33
+ red
34
+ </span> <span class="ant-tag ant-tag-orange">
35
+ orange
36
+ </span> <span class="ant-tag ant-tag-green">
37
+ green
38
+ </span> <span class="ant-tag ant-tag-cyan">
39
+ cyan
40
+ </span> <span class="ant-tag ant-tag-blue">
41
+ blue
42
+ </span> <span class="ant-tag ant-tag-purple">
43
+ purple
44
+ </span></div>
45
+ <h4>
46
+ Custom:
47
+ </h4>
48
+ <div><span class="ant-tag ant-tag-has-color" style="background-color: rgb(255, 85, 0);">
49
+ #f50
50
+ </span> <span class="ant-tag ant-tag-has-color" style="background-color: rgb(45, 183, 245);">
51
+ #2db7f5
52
+ </span> <span class="ant-tag ant-tag-has-color" style="background-color: rgb(135, 208, 104);">
53
+ #87d068
54
+ </span> <span class="ant-tag ant-tag-has-color" style="background-color: rgb(16, 142, 233);">
55
+ #108ee9
56
+ </span></div>
57
+ </div>
58
+ `;
59
+
60
+ exports[`renders ./antdv-demo/docs/tag/demo/control.md correctly 1`] = `
61
+ <div><span class="ant-tag">
62
+ Unremovable
63
+ </span><span class="ant-tag">
64
+ Tag 2
65
+ <i aria-label="icon: close" tabindex="-1" class="anticon anticon-close"><svg viewBox="64 64 896 896" data-icon="close" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"></path></svg></i></span><span class="ant-tag">
66
+ Tag 3Tag 3Tag 3Tag 3...
67
+ <i aria-label="icon: close" tabindex="-1" class="anticon anticon-close"><svg viewBox="64 64 896 896" data-icon="close" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"></path></svg></i></span> <span class="ant-tag" style="border-style: dashed; background: rgb(255, 255, 255);"><i aria-label="icon: plus" class="anticon anticon-plus"><svg viewBox="64 64 896 896" data-icon="plus" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"></path><path d="M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"></path></svg></i> New Tag
68
+ </span></div>
69
+ `;
70
+
71
+ exports[`renders ./antdv-demo/docs/tag/demo/controlled.md correctly 1`] = `
72
+ <div><span class="ant-tag">
73
+ Movies
74
+ <i aria-label="icon: close" tabindex="-1" class="anticon anticon-close"><svg viewBox="64 64 896 896" data-icon="close" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"></path></svg></i></span> <br> <button type="button" class="ant-btn ant-btn-sm"><span>Toggle</span></button></div>
75
+ `;
76
+
77
+ exports[`renders ./antdv-demo/docs/tag/demo/hot-tags.md correctly 1`] = `
78
+ <div><span>Categories:</span>
79
+ <div class="ant-tag ant-tag-checkable">
80
+ Movies
81
+ </div>
82
+ <div class="ant-tag ant-tag-checkable">
83
+ Books
84
+ </div>
85
+ <div class="ant-tag ant-tag-checkable">
86
+ Music
87
+ </div>
88
+ <div class="ant-tag ant-tag-checkable">
89
+ Sports
90
+ </div>
91
+ </div>
92
+ `;
@@ -0,0 +1,13 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`Tag visibility can be controlled by visible with hidden as initial value 1`] = `<span class="ant-tag" style="display: none;"></span>`;
4
+
5
+ exports[`Tag visibility can be controlled by visible with hidden as initial value 2`] = `<span class="ant-tag" style=""></span>`;
6
+
7
+ exports[`Tag visibility can be controlled by visible with hidden as initial value 3`] = `<span class="ant-tag" style="display: none;"></span>`;
8
+
9
+ exports[`Tag visibility can be controlled by visible with visible as initial value 1`] = `<span class="ant-tag"></span>`;
10
+
11
+ exports[`Tag visibility can be controlled by visible with visible as initial value 2`] = `<span class="ant-tag" style="display: none;"></span>`;
12
+
13
+ exports[`Tag visibility can be controlled by visible with visible as initial value 3`] = `<span class="ant-tag" style=""></span>`;
@@ -0,0 +1,3 @@
1
+ import demoTest from '../../../tests/shared/demoTest';
2
+
3
+ demoTest('tag');
@@ -0,0 +1,82 @@
1
+ import { mount } from '@vue/test-utils';
2
+ import { asyncExpect } from '@/tests/utils';
3
+ import Tag from '..';
4
+ import mountTest from '../../../tests/shared/mountTest';
5
+
6
+ describe('Tag', () => {
7
+ mountTest(Tag);
8
+ mountTest(Tag.CheckableTag);
9
+ it('should be closable', async () => {
10
+ const onClose = jest.fn();
11
+ const wrapper = mount(
12
+ {
13
+ render() {
14
+ return <Tag closable onClose={onClose} />;
15
+ },
16
+ },
17
+ { sync: false, attachToDocument: true },
18
+ );
19
+ await asyncExpect(() => {
20
+ expect(wrapper.findAll('.anticon-close').length).toBe(1);
21
+ expect(wrapper.findAll('.ant-tag').filter(w => w.isVisible()).length).toBe(1);
22
+ wrapper.find('.anticon-close').trigger('click');
23
+ expect(onClose).toBeCalled();
24
+ });
25
+ await asyncExpect(() => {
26
+ expect(wrapper.findAll('.ant-tag').filter(w => w.isVisible()).length).toBe(0);
27
+ });
28
+ });
29
+
30
+ it('should not be closed when prevent default', async () => {
31
+ const onClose = e => {
32
+ e.preventDefault();
33
+ };
34
+ const wrapper = mount(
35
+ {
36
+ render() {
37
+ return <Tag closable onClose={onClose} />;
38
+ },
39
+ },
40
+ { sync: false },
41
+ );
42
+ await asyncExpect(() => {
43
+ expect(wrapper.findAll('.anticon-close').length).toBe(1);
44
+ expect(wrapper.findAll('.ant-tag').filter(w => w.isVisible()).length).toBe(1);
45
+ wrapper.find('.anticon-close').trigger('click');
46
+ });
47
+ await asyncExpect(() => {
48
+ expect(wrapper.findAll('.ant-tag').filter(w => w.isVisible()).length).toBe(1);
49
+ }, 0);
50
+ });
51
+ describe('visibility', () => {
52
+ it('can be controlled by visible with visible as initial value', async () => {
53
+ const wrapper = mount(Tag, { propsData: { visible: true }, sync: false });
54
+ await asyncExpect(() => {
55
+ expect(wrapper.html()).toMatchSnapshot();
56
+ wrapper.setProps({ visible: false });
57
+ });
58
+ await asyncExpect(() => {
59
+ expect(wrapper.html()).toMatchSnapshot();
60
+ wrapper.setProps({ visible: true });
61
+ });
62
+ await asyncExpect(() => {
63
+ expect(wrapper.html()).toMatchSnapshot();
64
+ });
65
+ });
66
+
67
+ it('can be controlled by visible with hidden as initial value', async () => {
68
+ const wrapper = mount(Tag, { propsData: { visible: false }, sync: false });
69
+ await asyncExpect(() => {
70
+ expect(wrapper.html()).toMatchSnapshot();
71
+ wrapper.setProps({ visible: true });
72
+ });
73
+ await asyncExpect(() => {
74
+ expect(wrapper.html()).toMatchSnapshot();
75
+ wrapper.setProps({ visible: false });
76
+ });
77
+ await asyncExpect(() => {
78
+ expect(wrapper.html()).toMatchSnapshot();
79
+ });
80
+ });
81
+ });
82
+ });
@@ -0,0 +1,14 @@
1
+ import Tag from './Tag';
2
+ import CheckableTag from './CheckableTag';
3
+ import Base from '../base';
4
+
5
+ Tag.CheckableTag = CheckableTag;
6
+
7
+ /* istanbul ignore next */
8
+ Tag.install = function(Vue) {
9
+ Vue.use(Base);
10
+ Vue.component(Tag.name, Tag);
11
+ Vue.component(Tag.CheckableTag.name, Tag.CheckableTag);
12
+ };
13
+
14
+ export default Tag;
@@ -0,0 +1,2 @@
1
+ import '../../style/index.less';
2
+ import './index.less';
@@ -0,0 +1,106 @@
1
+ @import '../../style/themes/index';
2
+ @import '../../style/mixins/index';
3
+
4
+ @tag-prefix-cls: ~'@{ant-prefix}-tag';
5
+
6
+ .@{tag-prefix-cls} {
7
+ .reset-component;
8
+
9
+ display: inline-block;
10
+ height: auto;
11
+ margin-right: 8px;
12
+ padding: 0 7px;
13
+ font-size: @tag-font-size;
14
+ line-height: 20px;
15
+ white-space: nowrap;
16
+ background: @tag-default-bg;
17
+ border: @border-width-base @border-style-base @border-color-base;
18
+ border-radius: @border-radius-base;
19
+ cursor: default;
20
+ opacity: 1;
21
+ transition: all 0.3s @ease-in-out-circ;
22
+
23
+ &:hover {
24
+ opacity: 0.85;
25
+ }
26
+
27
+ &,
28
+ a,
29
+ a:hover {
30
+ color: @tag-default-color;
31
+ }
32
+
33
+ > a:first-child:last-child {
34
+ display: inline-block;
35
+ margin: 0 -8px;
36
+ padding: 0 8px;
37
+ }
38
+
39
+ .@{iconfont-css-prefix}-close {
40
+ .iconfont-size-under-12px(10px);
41
+
42
+ margin-left: 3px;
43
+ color: @text-color-secondary;
44
+ font-weight: bold;
45
+ cursor: pointer;
46
+ transition: all 0.3s @ease-in-out-circ;
47
+
48
+ &:hover {
49
+ color: @heading-color;
50
+ }
51
+ }
52
+
53
+ &-has-color {
54
+ border-color: transparent;
55
+ &,
56
+ a,
57
+ a:hover,
58
+ .@{iconfont-css-prefix}-close,
59
+ .@{iconfont-css-prefix}-close:hover {
60
+ color: @text-color-inverse;
61
+ }
62
+ }
63
+
64
+ &-checkable {
65
+ background-color: transparent;
66
+ border-color: transparent;
67
+ &:not(&-checked):hover {
68
+ color: @primary-color;
69
+ }
70
+ &:active,
71
+ &-checked {
72
+ color: @text-color-inverse;
73
+ }
74
+ &-checked {
75
+ background-color: @primary-6;
76
+ }
77
+ &:active {
78
+ background-color: @primary-7;
79
+ }
80
+ }
81
+
82
+ &-hidden {
83
+ display: none;
84
+ }
85
+
86
+ // mixin to iterate over colors and create CSS class for each one
87
+ .make-color-classes(@i: length(@preset-colors)) when (@i > 0) {
88
+ .make-color-classes(@i - 1);
89
+ @color: extract(@preset-colors, @i);
90
+ @lightColor: '@{color}-1';
91
+ @lightBorderColor: '@{color}-3';
92
+ @darkColor: '@{color}-6';
93
+ &-@{color} {
94
+ color: @@darkColor;
95
+ background: @@lightColor;
96
+ border-color: @@lightBorderColor;
97
+ }
98
+ &-@{color}-inverse {
99
+ color: @text-color-inverse;
100
+ background: @@darkColor;
101
+ border-color: @@darkColor;
102
+ }
103
+ }
104
+
105
+ .make-color-classes();
106
+ }
@@ -0,0 +1,39 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`renders ./antdv-demo/docs/time-picker/demo/12hours.md correctly 1`] = `<div><span class="ant-time-picker"><input type="text" placeholder="Select time" readonly="true" class="ant-time-picker-input"><span class="ant-time-picker-icon"><i aria-label="icon: clock-circle" class="anticon anticon-clock-circle ant-time-picker-clock-icon"><svg viewBox="64 64 896 896" data-icon="clock-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"></path></svg></i></span></span> <span class="ant-time-picker"><input type="text" placeholder="Select time" readonly="true" class="ant-time-picker-input"><span class="ant-time-picker-icon"><i aria-label="icon: clock-circle" class="anticon anticon-clock-circle ant-time-picker-clock-icon"><svg viewBox="64 64 896 896" data-icon="clock-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"></path></svg></i></span></span> <span class="ant-time-picker"><input type="text" placeholder="Select time" readonly="true" class="ant-time-picker-input"><span class="ant-time-picker-icon"><i aria-label="icon: clock-circle" class="anticon anticon-clock-circle ant-time-picker-clock-icon"><svg viewBox="64 64 896 896" data-icon="clock-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"></path></svg></i></span></span></div>`;
4
+
5
+ exports[`renders ./antdv-demo/docs/time-picker/demo/addon.md correctly 1`] = `<div><span class="ant-time-picker"><input type="text" placeholder="Select time" readonly="true" class="ant-time-picker-input"><span class="ant-time-picker-icon"><i aria-label="icon: clock-circle" class="anticon anticon-clock-circle ant-time-picker-clock-icon"><svg viewBox="64 64 896 896" data-icon="clock-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"></path></svg></i></span></span> <span class="ant-time-picker"><input type="text" placeholder="Select time" readonly="true" class="ant-time-picker-input"><span class="ant-time-picker-icon"><i aria-label="icon: clock-circle" class="anticon anticon-clock-circle ant-time-picker-clock-icon"><svg viewBox="64 64 896 896" data-icon="clock-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"></path></svg></i></span></span></div>`;
6
+
7
+ exports[`renders ./antdv-demo/docs/time-picker/demo/basic.md correctly 1`] = `<span class="ant-time-picker"><input type="text" placeholder="Select time" readonly="true" class="ant-time-picker-input"><span class="ant-time-picker-icon"><i aria-label="icon: clock-circle" class="anticon anticon-clock-circle ant-time-picker-clock-icon"><svg viewBox="64 64 896 896" data-icon="clock-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"></path></svg></i></span></span>`;
8
+
9
+ exports[`renders ./antdv-demo/docs/time-picker/demo/disabled.md correctly 1`] = `<span class="ant-time-picker"><input type="text" placeholder="Select time" disabled="disabled" readonly="true" class="ant-time-picker-input"><span class="ant-time-picker-icon"><i aria-label="icon: clock-circle" class="anticon anticon-clock-circle ant-time-picker-clock-icon"><svg viewBox="64 64 896 896" data-icon="clock-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"></path></svg></i></span></span>`;
10
+
11
+ exports[`renders ./antdv-demo/docs/time-picker/demo/hide-column.md correctly 1`] = `
12
+ <span class="ant-time-picker"><input type="text" placeholder="Select time" readonly="true" class="ant-time-picker-input"><span class="ant-time-picker-icon"><i aria-label="icon: clock-circle" class="anticon anticon-clock-circle ant-time-picker-clock-icon"><svg viewBox="64 64 896 896" data-icon="clock-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"></path></svg></i></span><i aria-label="icon: close-circle" tabindex="-1" class="anticon anticon-close-circle ant-time-picker-clear"><svg viewBox="64 64 896 896" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="">
13
+ <path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 0 1-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path>
14
+ </svg></i></span>
15
+ `;
16
+
17
+ exports[`renders ./antdv-demo/docs/time-picker/demo/interval-options.md correctly 1`] = `<span class="ant-time-picker"><input type="text" placeholder="Select time" readonly="true" class="ant-time-picker-input"><span class="ant-time-picker-icon"><i aria-label="icon: clock-circle" class="anticon anticon-clock-circle ant-time-picker-clock-icon"><svg viewBox="64 64 896 896" data-icon="clock-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"></path></svg></i></span></span>`;
18
+
19
+ exports[`renders ./antdv-demo/docs/time-picker/demo/size.md correctly 1`] = `
20
+ <div><span class="ant-time-picker ant-time-picker-large"><input type="text" placeholder="Select time" readonly="true" class="ant-time-picker-input"><span class="ant-time-picker-icon"><i aria-label="icon: clock-circle" class="anticon anticon-clock-circle ant-time-picker-clock-icon"><svg viewBox="64 64 896 896" data-icon="clock-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"></path></svg></i></span><i aria-label="icon: close-circle" tabindex="-1" class="anticon anticon-close-circle ant-time-picker-clear"><svg viewBox="64 64 896 896" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="">
21
+ <path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 0 1-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path>
22
+ </svg></i></span> <span class="ant-time-picker"><input type="text" placeholder="Select time" readonly="true" class="ant-time-picker-input"><span class="ant-time-picker-icon"><i aria-label="icon: clock-circle" class="anticon anticon-clock-circle ant-time-picker-clock-icon"><svg viewBox="64 64 896 896" data-icon="clock-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"></path></svg></i></span><i aria-label="icon: close-circle" tabindex="-1" class="anticon anticon-close-circle ant-time-picker-clear"><svg viewBox="64 64 896 896" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="">
23
+ <path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 0 1-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path>
24
+ </svg></i></span> <span class="ant-time-picker ant-time-picker-small"><input type="text" placeholder="Select time" readonly="true" class="ant-time-picker-input"><span class="ant-time-picker-icon"><i aria-label="icon: clock-circle" class="anticon anticon-clock-circle ant-time-picker-clock-icon"><svg viewBox="64 64 896 896" data-icon="clock-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"></path></svg></i></span><i aria-label="icon: close-circle" tabindex="-1" class="anticon anticon-close-circle ant-time-picker-clear"><svg viewBox="64 64 896 896" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="">
25
+ <path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 0 1-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path>
26
+ </svg></i></span></div>
27
+ `;
28
+
29
+ exports[`renders ./antdv-demo/docs/time-picker/demo/suffix.md correctly 1`] = `<span class="ant-time-picker"><input type="text" placeholder="Select time" readonly="true" class="ant-time-picker-input"><span class="ant-time-picker-icon"><i aria-label="icon: smile" class="anticon anticon-smile ant-time-picker-clock-icon"><svg viewBox="64 64 896 896" data-icon="smile" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M288 421a48 48 0 1 0 96 0 48 48 0 1 0-96 0zm352 0a48 48 0 1 0 96 0 48 48 0 1 0-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 0 1 248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 0 1 249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 0 1 775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 0 1 775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 0 0-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 0 0-8-8.4z"></path></svg></i></span></span>`;
30
+
31
+ exports[`renders ./antdv-demo/docs/time-picker/demo/value.md correctly 1`] = `
32
+ <div>
33
+ <p>use value and @change</p> <span class="ant-time-picker"><input type="text" placeholder="Select time" readonly="true" class="ant-time-picker-input"><span class="ant-time-picker-icon"><i aria-label="icon: clock-circle" class="anticon anticon-clock-circle ant-time-picker-clock-icon"><svg viewBox="64 64 896 896" data-icon="clock-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"></path></svg></i></span></span> <br> <br>
34
+ <p>v-model</p> <span class="ant-time-picker"><input type="text" placeholder="Select time" readonly="true" class="ant-time-picker-input"><span class="ant-time-picker-icon"><i aria-label="icon: clock-circle" class="anticon anticon-clock-circle ant-time-picker-clock-icon"><svg viewBox="64 64 896 896" data-icon="clock-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"></path></svg></i></span></span> <br> <br>
35
+ <p>Do not change</p> <span class="ant-time-picker"><input type="text" placeholder="Select time" readonly="true" class="ant-time-picker-input"><span class="ant-time-picker-icon"><i aria-label="icon: clock-circle" class="anticon anticon-clock-circle ant-time-picker-clock-icon"><svg viewBox="64 64 896 896" data-icon="clock-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"></path></svg></i></span><i aria-label="icon: close-circle" tabindex="-1" class="anticon anticon-close-circle ant-time-picker-clear"><svg viewBox="64 64 896 896" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="">
36
+ <path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 0 1-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path>
37
+ </svg></i></span>
38
+ </div>
39
+ `;
@@ -0,0 +1,5 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`TimePicker not render clean icon when allowClear is false 1`] = `<span class="ant-time-picker"><input type="text" placeholder="Select time" readonly="true" class="ant-time-picker-input"><span class="ant-time-picker-icon"><i aria-label="icon: clock-circle" class="anticon anticon-clock-circle ant-time-picker-clock-icon"><svg viewBox="64 64 896 896" data-icon="clock-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"></path></svg></i></span></span>`;
4
+
5
+ exports[`TimePicker renders addon correctly 1`] = `<div class="ant-time-picker-panel-addon"><button type="button">Ok</button></div>`;
@@ -0,0 +1,3 @@
1
+ import demoTest from '../../../tests/shared/demoTest';
2
+
3
+ demoTest('time-picker');