tntd 2.7.30 → 2.7.32

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 (1024) hide show
  1. package/es/ellipsis/index.js +2 -0
  2. package/es/ellipsis/index.js.map +1 -1
  3. package/es/form/form.js +37 -38
  4. package/es/form/form.js.map +1 -1
  5. package/es/tntd-form/_util/context.js.map +1 -0
  6. package/es/tntd-form/_util/defaultRenderEmpty.js.map +1 -0
  7. package/es/tntd-form/_util/hooks/useFlexGapSupport.js +9 -0
  8. package/es/tntd-form/_util/hooks/useFlexGapSupport.js.map +1 -0
  9. package/es/tntd-form/_util/hooks/useForceUpdate.js +5 -0
  10. package/es/tntd-form/_util/hooks/useForceUpdate.js.map +1 -0
  11. package/es/tntd-form/_util/responsiveObserve.js +59 -0
  12. package/es/tntd-form/_util/responsiveObserve.js.map +1 -0
  13. package/es/tntd-form/_util/styleChecker.js +26 -0
  14. package/es/tntd-form/_util/styleChecker.js.map +1 -0
  15. package/es/tntd-form/grid/RowContext.js.map +1 -0
  16. package/es/{grid-v4 → tntd-form/grid}/col.js +1 -0
  17. package/es/tntd-form/grid/col.js.map +1 -0
  18. package/es/tntd-form/grid/hooks/useBreakpoint.js.map +1 -0
  19. package/es/tntd-form/grid/index.js.map +1 -0
  20. package/es/{grid-v4 → tntd-form/grid}/row.js +0 -1
  21. package/es/tntd-form/grid/row.js.map +1 -0
  22. package/es/tntd-form/grid/style/index.js.map +1 -0
  23. package/lib/ellipsis/index.d.ts.map +1 -1
  24. package/lib/ellipsis/index.js +2 -0
  25. package/lib/ellipsis/index.js.map +1 -1
  26. package/lib/form/form.d.ts +1 -2
  27. package/lib/form/form.d.ts.map +1 -1
  28. package/lib/form/form.js +41 -40
  29. package/lib/form/form.js.map +1 -1
  30. package/lib/tntd-form/_util/context.d.ts.map +1 -0
  31. package/lib/tntd-form/_util/context.js.map +1 -0
  32. package/lib/tntd-form/_util/defaultRenderEmpty.d.ts.map +1 -0
  33. package/lib/tntd-form/_util/defaultRenderEmpty.js.map +1 -0
  34. package/lib/tntd-form/_util/hooks/useFlexGapSupport.d.ts +3 -0
  35. package/lib/tntd-form/_util/hooks/useFlexGapSupport.d.ts.map +1 -0
  36. package/lib/{tntd-select/rc-select/hooks/useDelayReset.js → tntd-form/_util/hooks/useFlexGapSupport.js} +9 -25
  37. package/lib/tntd-form/_util/hooks/useFlexGapSupport.js.map +1 -0
  38. package/lib/tntd-form/_util/hooks/useForceUpdate.d.ts +3 -0
  39. package/lib/tntd-form/_util/hooks/useForceUpdate.d.ts.map +1 -0
  40. package/lib/{tntd-select/rc-select/hooks/useId.js → tntd-form/_util/hooks/useForceUpdate.js} +8 -32
  41. package/lib/tntd-form/_util/hooks/useForceUpdate.js.map +1 -0
  42. package/lib/tntd-form/_util/responsiveObserve.d.ts +22 -0
  43. package/lib/tntd-form/_util/responsiveObserve.d.ts.map +1 -0
  44. package/lib/tntd-form/_util/responsiveObserve.js +73 -0
  45. package/lib/tntd-form/_util/responsiveObserve.js.map +1 -0
  46. package/lib/tntd-form/_util/styleChecker.d.ts +5 -0
  47. package/lib/tntd-form/_util/styleChecker.d.ts.map +1 -0
  48. package/lib/tntd-form/_util/styleChecker.js +42 -0
  49. package/lib/tntd-form/_util/styleChecker.js.map +1 -0
  50. package/lib/tntd-form/grid/RowContext.d.ts.map +1 -0
  51. package/lib/tntd-form/grid/RowContext.js.map +1 -0
  52. package/lib/tntd-form/grid/col.d.ts.map +1 -0
  53. package/lib/tntd-form/grid/col.js.map +1 -0
  54. package/lib/tntd-form/grid/hooks/useBreakpoint.d.ts.map +1 -0
  55. package/lib/tntd-form/grid/hooks/useBreakpoint.js.map +1 -0
  56. package/lib/tntd-form/grid/index.d.ts.map +1 -0
  57. package/lib/tntd-form/grid/index.js.map +1 -0
  58. package/lib/tntd-form/grid/row.d.ts.map +1 -0
  59. package/lib/{grid-v4 → tntd-form/grid}/row.js +0 -1
  60. package/lib/tntd-form/grid/row.js.map +1 -0
  61. package/lib/tntd-form/grid/style/index.d.ts.map +1 -0
  62. package/lib/tntd-form/grid/style/index.js.map +1 -0
  63. package/lib/tntd-form/tntd-form.stories.d.ts +1 -1
  64. package/package.json +1 -1
  65. package/themes/common/index.less +3 -3
  66. package/es/affix/style/index.js.map +0 -1
  67. package/es/affix/style/index.less +0 -6
  68. package/es/alert/style/index.js +0 -2
  69. package/es/alert/style/index.js.map +0 -1
  70. package/es/alert/style/index.less +0 -188
  71. package/es/anchor/style/index.js +0 -4
  72. package/es/anchor/style/index.js.map +0 -1
  73. package/es/anchor/style/index.less +0 -82
  74. package/es/auto-complete/style/index.js +0 -5
  75. package/es/auto-complete/style/index.js.map +0 -1
  76. package/es/auto-complete/style/index.less +0 -92
  77. package/es/avatar/style/index.js +0 -2
  78. package/es/avatar/style/index.js.map +0 -1
  79. package/es/avatar/style/index.less +0 -59
  80. package/es/back-top/style/index.js +0 -2
  81. package/es/back-top/style/index.js.map +0 -1
  82. package/es/back-top/style/index.less +0 -42
  83. package/es/back-top/style/responsive.less +0 -11
  84. package/es/badge/style/index.js +0 -2
  85. package/es/badge/style/index.js.map +0 -1
  86. package/es/badge/style/index.less +0 -190
  87. package/es/breadcrumb/style/index.js +0 -4
  88. package/es/breadcrumb/style/index.js.map +0 -1
  89. package/es/breadcrumb/style/index.less +0 -51
  90. package/es/button/style/index.js +0 -2
  91. package/es/button/style/index.js.map +0 -1
  92. package/es/button/style/index.less +0 -224
  93. package/es/button/style/mixin.less +0 -357
  94. package/es/calendar/style/index.js +0 -5
  95. package/es/calendar/style/index.js.map +0 -1
  96. package/es/calendar/style/index.less +0 -278
  97. package/es/card/style/index.js +0 -6
  98. package/es/card/style/index.js.map +0 -1
  99. package/es/card/style/index.less +0 -263
  100. package/es/card/style/size.less +0 -25
  101. package/es/carousel/style/index.js +0 -2
  102. package/es/carousel/style/index.js.map +0 -1
  103. package/es/carousel/style/index.less +0 -238
  104. package/es/cascader/style/index.js +0 -5
  105. package/es/cascader/style/index.js.map +0 -1
  106. package/es/cascader/style/index.less +0 -227
  107. package/es/checkbox/style/index.js +0 -2
  108. package/es/checkbox/style/index.js.map +0 -1
  109. package/es/checkbox/style/index.less +0 -4
  110. package/es/checkbox/style/mixin.less +0 -220
  111. package/es/col/style/index.js +0 -4
  112. package/es/col/style/index.js.map +0 -1
  113. package/es/collapse/style/index.js +0 -2
  114. package/es/collapse/style/index.js.map +0 -1
  115. package/es/collapse/style/index.less +0 -134
  116. package/es/comment/style/index.js +0 -2
  117. package/es/comment/style/index.js.map +0 -1
  118. package/es/comment/style/index.less +0 -93
  119. package/es/config-provider/style/index.js +0 -1
  120. package/es/config-provider/style/index.js.map +0 -1
  121. package/es/config-provider/style/index.less +0 -2
  122. package/es/date-picker/style/Calendar.less +0 -402
  123. package/es/date-picker/style/DecadePanel.less +0 -81
  124. package/es/date-picker/style/MonthPanel.less +0 -86
  125. package/es/date-picker/style/MonthPicker.less +0 -11
  126. package/es/date-picker/style/Picker.less +0 -113
  127. package/es/date-picker/style/RangePicker.less +0 -248
  128. package/es/date-picker/style/TimePicker.less +0 -151
  129. package/es/date-picker/style/WeekPicker.less +0 -21
  130. package/es/date-picker/style/YearPanel.less +0 -85
  131. package/es/date-picker/style/index.js +0 -7
  132. package/es/date-picker/style/index.js.map +0 -1
  133. package/es/date-picker/style/index.less +0 -17
  134. package/es/descriptions/style/index.js +0 -2
  135. package/es/descriptions/style/index.js.map +0 -1
  136. package/es/descriptions/style/index.less +0 -144
  137. package/es/divider/style/index.js +0 -2
  138. package/es/divider/style/index.js.map +0 -1
  139. package/es/divider/style/index.less +0 -109
  140. package/es/drawer/style/drawer.less +0 -230
  141. package/es/drawer/style/index.js +0 -3
  142. package/es/drawer/style/index.js.map +0 -1
  143. package/es/drawer/style/index.less +0 -3
  144. package/es/dropdown/style/index.js +0 -4
  145. package/es/dropdown/style/index.js.map +0 -1
  146. package/es/dropdown/style/index.less +0 -282
  147. package/es/empty/style/index.js +0 -2
  148. package/es/empty/style/index.js.map +0 -1
  149. package/es/empty/style/index.less +0 -52
  150. package/es/form/style/index.js +0 -4
  151. package/es/form/style/index.js.map +0 -1
  152. package/es/form/style/index.less +0 -653
  153. package/es/form/style/mixin.less +0 -126
  154. package/es/grid-v4/RowContext.js.map +0 -1
  155. package/es/grid-v4/col.js.map +0 -1
  156. package/es/grid-v4/hooks/useBreakpoint.js.map +0 -1
  157. package/es/grid-v4/index.js.map +0 -1
  158. package/es/grid-v4/row.js.map +0 -1
  159. package/es/grid-v4/style/index.js +0 -2
  160. package/es/grid-v4/style/index.js.map +0 -1
  161. package/es/grid-v4/style/index.less +0 -124
  162. package/es/grid-v4/style/mixin.less +0 -57
  163. package/es/grid-v4/style/rtl.less +0 -69
  164. package/es/handle/handle.js +0 -138
  165. package/es/handle/handle.js.map +0 -1
  166. package/es/icon/style/index.js +0 -2
  167. package/es/icon/style/index.js.map +0 -1
  168. package/es/icon/style/index.less +0 -4
  169. package/es/input/style/index.js +0 -4
  170. package/es/input/style/index.js.map +0 -1
  171. package/es/input/style/index.less +0 -57
  172. package/es/input/style/mixin.less +0 -449
  173. package/es/input/style/search-input.less +0 -34
  174. package/es/input-number/style/index.js +0 -2
  175. package/es/input-number/style/index.js.map +0 -1
  176. package/es/input-number/style/index.less +0 -179
  177. package/es/layout/style/index.js +0 -2
  178. package/es/layout/style/index.js.map +0 -1
  179. package/es/layout/style/index.less +0 -124
  180. package/es/layout/style/light.less +0 -15
  181. package/es/list/style/bordered.less +0 -41
  182. package/es/list/style/index.js +0 -7
  183. package/es/list/style/index.js.map +0 -1
  184. package/es/list/style/index.less +0 -234
  185. package/es/list/style/responsive.less +0 -40
  186. package/es/locale-provider/style/index.js +0 -1
  187. package/es/locale-provider/style/index.js.map +0 -1
  188. package/es/locale-provider/style/index.less +0 -2
  189. package/es/mention/index.js +0 -4
  190. package/es/mention/index.js.map +0 -1
  191. package/es/mentions/style/index.js +0 -4
  192. package/es/mentions/style/index.js.map +0 -1
  193. package/es/mentions/style/index.less +0 -164
  194. package/es/menu/style/dark.less +0 -139
  195. package/es/menu/style/index.js +0 -5
  196. package/es/menu/style/index.js.map +0 -1
  197. package/es/menu/style/index.less +0 -515
  198. package/es/message/style/index.js +0 -2
  199. package/es/message/style/index.js.map +0 -1
  200. package/es/message/style/index.less +0 -75
  201. package/es/modal/style/confirm.less +0 -78
  202. package/es/modal/style/index.js +0 -4
  203. package/es/modal/style/index.js.map +0 -1
  204. package/es/modal/style/index.less +0 -4
  205. package/es/modal/style/modal.less +0 -165
  206. package/es/notification/style/index.js +0 -2
  207. package/es/notification/style/index.js.map +0 -1
  208. package/es/notification/style/index.less +0 -199
  209. package/es/page-header/style/index.js +0 -4
  210. package/es/page-header/style/index.js.map +0 -1
  211. package/es/page-header/style/index.less +0 -119
  212. package/es/pagination/style/index.js +0 -4
  213. package/es/pagination/style/index.js.map +0 -1
  214. package/es/pagination/style/index.less +0 -400
  215. package/es/popconfirm/style/index.js +0 -5
  216. package/es/popconfirm/style/index.js.map +0 -1
  217. package/es/popover/style/index.js +0 -4
  218. package/es/popover/style/index.js.map +0 -1
  219. package/es/popover/style/index.less +0 -205
  220. package/es/progress/style/index.js +0 -2
  221. package/es/progress/style/index.js.map +0 -1
  222. package/es/progress/style/index.less +0 -182
  223. package/es/radio/style/index.js +0 -2
  224. package/es/radio/style/index.js.map +0 -1
  225. package/es/radio/style/index.less +0 -327
  226. package/es/rate/style/index.js +0 -4
  227. package/es/rate/style/index.js.map +0 -1
  228. package/es/rate/style/index.less +0 -85
  229. package/es/result/style/index.js +0 -2
  230. package/es/result/style/index.js.map +0 -1
  231. package/es/result/style/index.less +0 -71
  232. package/es/row/style/index.js +0 -4
  233. package/es/row/style/index.js.map +0 -1
  234. package/es/select/style/index.js +0 -4
  235. package/es/select/style/index.js.map +0 -1
  236. package/es/select/style/index.less +0 -604
  237. package/es/skeleton/style/index.js +0 -2
  238. package/es/skeleton/style/index.js.map +0 -1
  239. package/es/skeleton/style/index.less +0 -130
  240. package/es/slider/style/index.js +0 -4
  241. package/es/slider/style/index.js.map +0 -1
  242. package/es/slider/style/index.less +0 -197
  243. package/es/spin/style/index.js +0 -2
  244. package/es/spin/style/index.js.map +0 -1
  245. package/es/spin/style/index.less +0 -214
  246. package/es/statistic/style/index.js +0 -2
  247. package/es/statistic/style/index.js.map +0 -1
  248. package/es/statistic/style/index.less +0 -40
  249. package/es/steps/style/compatibility.less +0 -50
  250. package/es/steps/style/custom-icon.less +0 -31
  251. package/es/steps/style/index.js +0 -2
  252. package/es/steps/style/index.js.map +0 -1
  253. package/es/steps/style/label-placement.less +0 -38
  254. package/es/steps/style/progress-dot.less +0 -80
  255. package/es/steps/style/vertical.less +0 -74
  256. package/es/style/color/bezierEasing.less +0 -110
  257. package/es/style/color/colorPalette.less +0 -75
  258. package/es/style/color/colors.less +0 -149
  259. package/es/style/color/tinyColor.less +0 -1184
  260. package/es/style/core/base.less +0 -510
  261. package/es/style/core/iconfont.less +0 -19
  262. package/es/style/core/index.less +0 -4
  263. package/es/style/core/motion/fade.less +0 -31
  264. package/es/style/core/motion/move.less +0 -120
  265. package/es/style/core/motion/other.less +0 -40
  266. package/es/style/core/motion/slide.less +0 -120
  267. package/es/style/core/motion/swing.less +0 -34
  268. package/es/style/core/motion/zoom.less +0 -162
  269. package/es/style/core/motion.less +0 -20
  270. package/es/style/index.js +0 -1
  271. package/es/style/index.js.map +0 -1
  272. package/es/style/index.less +0 -2
  273. package/es/style/mixins/clearfix.less +0 -13
  274. package/es/style/mixins/compatibility.less +0 -22
  275. package/es/style/mixins/iconfont.less +0 -43
  276. package/es/style/mixins/index.less +0 -10
  277. package/es/style/mixins/motion.less +0 -35
  278. package/es/style/mixins/operation-unit.less +0 -18
  279. package/es/style/mixins/reset.less +0 -13
  280. package/es/style/mixins/size.less +0 -10
  281. package/es/style/mixins/typography.less +0 -49
  282. package/es/style/themes/default.less +0 -699
  283. package/es/style/themes/index.less +0 -1
  284. package/es/style/v2-compatible-reset.js +0 -1
  285. package/es/style/v2-compatible-reset.js.map +0 -1
  286. package/es/style/v2-compatible-reset.less +0 -51
  287. package/es/switch/style/index.js +0 -2
  288. package/es/switch/style/index.js.map +0 -1
  289. package/es/switch/style/index.less +0 -178
  290. package/es/table/style/index.js +0 -10
  291. package/es/table/style/index.js.map +0 -1
  292. package/es/table/style/index.less +0 -800
  293. package/es/table/style/size.less +0 -179
  294. package/es/tabs/style/card-style.less +0 -186
  295. package/es/tabs/style/index.js +0 -2
  296. package/es/tabs/style/index.js.map +0 -1
  297. package/es/tabs/style/index.less +0 -436
  298. package/es/tag/style/index.js +0 -2
  299. package/es/tag/style/index.js.map +0 -1
  300. package/es/tag/style/index.less +0 -106
  301. package/es/time-picker/style/index.js +0 -2
  302. package/es/time-picker/style/index.js.map +0 -1
  303. package/es/time-picker/style/index.less +0 -246
  304. package/es/timeline/style/index.js +0 -2
  305. package/es/timeline/style/index.js.map +0 -1
  306. package/es/timeline/style/index.less +0 -167
  307. package/es/tntd-form/TntdForm/components/Item.js +0 -55
  308. package/es/tntd-form/TntdForm/components/Item.js.map +0 -1
  309. package/es/tntd-form/TntdForm/components/ItemComp.js +0 -186
  310. package/es/tntd-form/TntdForm/components/ItemComp.js.map +0 -1
  311. package/es/tntd-form/TntdForm/components/List.js +0 -102
  312. package/es/tntd-form/TntdForm/components/List.js.map +0 -1
  313. package/es/tntd-form/TntdForm/index.js +0 -55
  314. package/es/tntd-form/TntdForm/index.js.map +0 -1
  315. package/es/tntd-form/TntdForm/interface.js +0 -1
  316. package/es/tntd-form/TntdForm/interface.js.map +0 -1
  317. package/es/tntd-form/TntdForm/store.js +0 -2
  318. package/es/tntd-form/TntdForm/store.js.map +0 -1
  319. package/es/tntd-form/TntdForm/utils.js +0 -219
  320. package/es/tntd-form/TntdForm/utils.js.map +0 -1
  321. package/es/tntd-select/_util/DisabledContext.js +0 -12
  322. package/es/tntd-select/_util/DisabledContext.js.map +0 -1
  323. package/es/tntd-select/_util/FormItemInputContext.js +0 -2
  324. package/es/tntd-select/_util/FormItemInputContext.js.map +0 -1
  325. package/es/tntd-select/_util/PurePanel.js +0 -66
  326. package/es/tntd-select/_util/PurePanel.js.map +0 -1
  327. package/es/tntd-select/_util/SizeContext.js +0 -2
  328. package/es/tntd-select/_util/SizeContext.js.map +0 -1
  329. package/es/tntd-select/_util/context.js.map +0 -1
  330. package/es/tntd-select/_util/defaultRenderEmpty.js.map +0 -1
  331. package/es/tntd-select/_util/getIcons.js +0 -74
  332. package/es/tntd-select/_util/getIcons.js.map +0 -1
  333. package/es/tntd-select/_util/interface.js +0 -4
  334. package/es/tntd-select/_util/interface.js.map +0 -1
  335. package/es/tntd-select/_util/motion.js +0 -47
  336. package/es/tntd-select/_util/motion.js.map +0 -1
  337. package/es/tntd-select/_util/type.js +0 -3
  338. package/es/tntd-select/_util/type.js.map +0 -1
  339. package/es/tntd-select/_util/useCompactItemContext.js +0 -26
  340. package/es/tntd-select/_util/useCompactItemContext.js.map +0 -1
  341. package/es/tntd-select/_util/warning.js +0 -14
  342. package/es/tntd-select/_util/warning.js.map +0 -1
  343. package/es/tntd-select/rc-select/BaseSelect.js +0 -524
  344. package/es/tntd-select/rc-select/BaseSelect.js.map +0 -1
  345. package/es/tntd-select/rc-select/OptGroup.js +0 -4
  346. package/es/tntd-select/rc-select/OptGroup.js.map +0 -1
  347. package/es/tntd-select/rc-select/Option.js +0 -4
  348. package/es/tntd-select/rc-select/Option.js.map +0 -1
  349. package/es/tntd-select/rc-select/OptionList.js +0 -346
  350. package/es/tntd-select/rc-select/OptionList.js.map +0 -1
  351. package/es/tntd-select/rc-select/Select.js +0 -440
  352. package/es/tntd-select/rc-select/Select.js.map +0 -1
  353. package/es/tntd-select/rc-select/SelectContext.js +0 -3
  354. package/es/tntd-select/rc-select/SelectContext.js.map +0 -1
  355. package/es/tntd-select/rc-select/SelectTrigger.js +0 -130
  356. package/es/tntd-select/rc-select/SelectTrigger.js.map +0 -1
  357. package/es/tntd-select/rc-select/Selector/Input.js +0 -103
  358. package/es/tntd-select/rc-select/Selector/Input.js.map +0 -1
  359. package/es/tntd-select/rc-select/Selector/MultipleSelector.js +0 -171
  360. package/es/tntd-select/rc-select/Selector/MultipleSelector.js.map +0 -1
  361. package/es/tntd-select/rc-select/Selector/SingleSelector.js +0 -98
  362. package/es/tntd-select/rc-select/Selector/SingleSelector.js.map +0 -1
  363. package/es/tntd-select/rc-select/Selector/index.js +0 -158
  364. package/es/tntd-select/rc-select/Selector/index.js.map +0 -1
  365. package/es/tntd-select/rc-select/TransBtn.js +0 -36
  366. package/es/tntd-select/rc-select/TransBtn.js.map +0 -1
  367. package/es/tntd-select/rc-select/hooks/useAllowClear.js +0 -24
  368. package/es/tntd-select/rc-select/hooks/useAllowClear.js.map +0 -1
  369. package/es/tntd-select/rc-select/hooks/useBaseProps.js +0 -9
  370. package/es/tntd-select/rc-select/hooks/useBaseProps.js.map +0 -1
  371. package/es/tntd-select/rc-select/hooks/useCache.js +0 -38
  372. package/es/tntd-select/rc-select/hooks/useCache.js.map +0 -1
  373. package/es/tntd-select/rc-select/hooks/useDelayReset.js +0 -23
  374. package/es/tntd-select/rc-select/hooks/useDelayReset.js.map +0 -1
  375. package/es/tntd-select/rc-select/hooks/useFilterOptions.js +0 -55
  376. package/es/tntd-select/rc-select/hooks/useFilterOptions.js.map +0 -1
  377. package/es/tntd-select/rc-select/hooks/useId.js +0 -26
  378. package/es/tntd-select/rc-select/hooks/useId.js.map +0 -1
  379. package/es/tntd-select/rc-select/hooks/useLayoutEffect.js +0 -16
  380. package/es/tntd-select/rc-select/hooks/useLayoutEffect.js.map +0 -1
  381. package/es/tntd-select/rc-select/hooks/useLock.js +0 -25
  382. package/es/tntd-select/rc-select/hooks/useLock.js.map +0 -1
  383. package/es/tntd-select/rc-select/hooks/useOptions.js +0 -43
  384. package/es/tntd-select/rc-select/hooks/useOptions.js.map +0 -1
  385. package/es/tntd-select/rc-select/hooks/useRefFunc.js +0 -13
  386. package/es/tntd-select/rc-select/hooks/useRefFunc.js.map +0 -1
  387. package/es/tntd-select/rc-select/hooks/useSelectTriggerControl.js +0 -28
  388. package/es/tntd-select/rc-select/hooks/useSelectTriggerControl.js.map +0 -1
  389. package/es/tntd-select/rc-select/index.js +0 -7
  390. package/es/tntd-select/rc-select/index.js.map +0 -1
  391. package/es/tntd-select/rc-select/interface.js +0 -1
  392. package/es/tntd-select/rc-select/interface.js.map +0 -1
  393. package/es/tntd-select/rc-select/utils/commonUtil.js +0 -30
  394. package/es/tntd-select/rc-select/utils/commonUtil.js.map +0 -1
  395. package/es/tntd-select/rc-select/utils/keyUtil.js +0 -9
  396. package/es/tntd-select/rc-select/utils/keyUtil.js.map +0 -1
  397. package/es/tntd-select/rc-select/utils/legacyUtil.js +0 -55
  398. package/es/tntd-select/rc-select/utils/legacyUtil.js.map +0 -1
  399. package/es/tntd-select/rc-select/utils/platformUtil.js +0 -4
  400. package/es/tntd-select/rc-select/utils/platformUtil.js.map +0 -1
  401. package/es/tntd-select/rc-select/utils/valueUtil.js +0 -112
  402. package/es/tntd-select/rc-select/utils/valueUtil.js.map +0 -1
  403. package/es/tntd-select/rc-select/utils/warningPropsUtil.js +0 -112
  404. package/es/tntd-select/rc-select/utils/warningPropsUtil.js.map +0 -1
  405. package/es/tooltip/style/index.js +0 -2
  406. package/es/tooltip/style/index.js.map +0 -1
  407. package/es/tooltip/style/index.less +0 -187
  408. package/es/transfer/style/customize.less +0 -62
  409. package/es/transfer/style/index.js +0 -7
  410. package/es/transfer/style/index.js.map +0 -1
  411. package/es/transfer/style/index.less +0 -191
  412. package/es/tree/style/directory.less +0 -95
  413. package/es/tree/style/index.js +0 -2
  414. package/es/tree/style/index.js.map +0 -1
  415. package/es/tree/style/index.less +0 -280
  416. package/es/tree/style/mixin.less +0 -29
  417. package/es/tree-select/style/index.js +0 -6
  418. package/es/tree-select/style/index.js.map +0 -1
  419. package/es/tree-select/style/index.less +0 -191
  420. package/es/typography/style/index.js +0 -5
  421. package/es/typography/style/index.js.map +0 -1
  422. package/es/typography/style/index.less +0 -204
  423. package/es/upload/style/index.js +0 -5
  424. package/es/upload/style/index.js.map +0 -1
  425. package/es/upload/style/index.less +0 -542
  426. package/es/version/style/index.js +0 -2
  427. package/es/version/style/index.js.map +0 -1
  428. package/lib/affix/style/index.d.ts.map +0 -1
  429. package/lib/affix/style/index.js.map +0 -1
  430. package/lib/affix/style/index.less +0 -6
  431. package/lib/alert/style/index.d.ts +0 -3
  432. package/lib/alert/style/index.d.ts.map +0 -1
  433. package/lib/alert/style/index.js +0 -4
  434. package/lib/alert/style/index.js.map +0 -1
  435. package/lib/alert/style/index.less +0 -188
  436. package/lib/anchor/style/index.d.ts +0 -4
  437. package/lib/anchor/style/index.d.ts.map +0 -1
  438. package/lib/anchor/style/index.js +0 -5
  439. package/lib/anchor/style/index.js.map +0 -1
  440. package/lib/anchor/style/index.less +0 -82
  441. package/lib/auto-complete/style/index.d.ts +0 -5
  442. package/lib/auto-complete/style/index.d.ts.map +0 -1
  443. package/lib/auto-complete/style/index.js +0 -6
  444. package/lib/auto-complete/style/index.js.map +0 -1
  445. package/lib/auto-complete/style/index.less +0 -92
  446. package/lib/avatar/style/index.d.ts +0 -3
  447. package/lib/avatar/style/index.d.ts.map +0 -1
  448. package/lib/avatar/style/index.js +0 -4
  449. package/lib/avatar/style/index.js.map +0 -1
  450. package/lib/avatar/style/index.less +0 -59
  451. package/lib/back-top/style/index.d.ts +0 -3
  452. package/lib/back-top/style/index.d.ts.map +0 -1
  453. package/lib/back-top/style/index.js +0 -4
  454. package/lib/back-top/style/index.js.map +0 -1
  455. package/lib/back-top/style/index.less +0 -42
  456. package/lib/back-top/style/responsive.less +0 -11
  457. package/lib/badge/style/index.d.ts +0 -3
  458. package/lib/badge/style/index.d.ts.map +0 -1
  459. package/lib/badge/style/index.js +0 -4
  460. package/lib/badge/style/index.js.map +0 -1
  461. package/lib/badge/style/index.less +0 -190
  462. package/lib/breadcrumb/style/index.d.ts +0 -5
  463. package/lib/breadcrumb/style/index.d.ts.map +0 -1
  464. package/lib/breadcrumb/style/index.js +0 -6
  465. package/lib/breadcrumb/style/index.js.map +0 -1
  466. package/lib/breadcrumb/style/index.less +0 -51
  467. package/lib/button/style/index.d.ts +0 -3
  468. package/lib/button/style/index.d.ts.map +0 -1
  469. package/lib/button/style/index.js +0 -4
  470. package/lib/button/style/index.js.map +0 -1
  471. package/lib/button/style/index.less +0 -224
  472. package/lib/button/style/mixin.less +0 -357
  473. package/lib/calendar/style/index.d.ts +0 -5
  474. package/lib/calendar/style/index.d.ts.map +0 -1
  475. package/lib/calendar/style/index.js +0 -6
  476. package/lib/calendar/style/index.js.map +0 -1
  477. package/lib/calendar/style/index.less +0 -278
  478. package/lib/card/style/index.d.ts +0 -6
  479. package/lib/card/style/index.d.ts.map +0 -1
  480. package/lib/card/style/index.js +0 -7
  481. package/lib/card/style/index.js.map +0 -1
  482. package/lib/card/style/index.less +0 -263
  483. package/lib/card/style/size.less +0 -25
  484. package/lib/carousel/style/index.d.ts +0 -3
  485. package/lib/carousel/style/index.d.ts.map +0 -1
  486. package/lib/carousel/style/index.js +0 -4
  487. package/lib/carousel/style/index.js.map +0 -1
  488. package/lib/carousel/style/index.less +0 -238
  489. package/lib/cascader/style/index.d.ts +0 -5
  490. package/lib/cascader/style/index.d.ts.map +0 -1
  491. package/lib/cascader/style/index.js +0 -6
  492. package/lib/cascader/style/index.js.map +0 -1
  493. package/lib/cascader/style/index.less +0 -227
  494. package/lib/checkbox/style/index.d.ts +0 -3
  495. package/lib/checkbox/style/index.d.ts.map +0 -1
  496. package/lib/checkbox/style/index.js +0 -4
  497. package/lib/checkbox/style/index.js.map +0 -1
  498. package/lib/checkbox/style/index.less +0 -4
  499. package/lib/checkbox/style/mixin.less +0 -220
  500. package/lib/col/style/index.d.ts +0 -3
  501. package/lib/col/style/index.d.ts.map +0 -1
  502. package/lib/col/style/index.js +0 -4
  503. package/lib/col/style/index.js.map +0 -1
  504. package/lib/collapse/style/index.d.ts +0 -3
  505. package/lib/collapse/style/index.d.ts.map +0 -1
  506. package/lib/collapse/style/index.js +0 -4
  507. package/lib/collapse/style/index.js.map +0 -1
  508. package/lib/collapse/style/index.less +0 -134
  509. package/lib/comment/style/index.d.ts +0 -3
  510. package/lib/comment/style/index.d.ts.map +0 -1
  511. package/lib/comment/style/index.js +0 -4
  512. package/lib/comment/style/index.js.map +0 -1
  513. package/lib/comment/style/index.less +0 -93
  514. package/lib/config-provider/style/index.d.ts +0 -2
  515. package/lib/config-provider/style/index.d.ts.map +0 -1
  516. package/lib/config-provider/style/index.js +0 -3
  517. package/lib/config-provider/style/index.js.map +0 -1
  518. package/lib/config-provider/style/index.less +0 -2
  519. package/lib/date-picker/style/Calendar.less +0 -402
  520. package/lib/date-picker/style/DecadePanel.less +0 -81
  521. package/lib/date-picker/style/MonthPanel.less +0 -86
  522. package/lib/date-picker/style/MonthPicker.less +0 -11
  523. package/lib/date-picker/style/Picker.less +0 -113
  524. package/lib/date-picker/style/RangePicker.less +0 -248
  525. package/lib/date-picker/style/TimePicker.less +0 -151
  526. package/lib/date-picker/style/WeekPicker.less +0 -21
  527. package/lib/date-picker/style/YearPanel.less +0 -85
  528. package/lib/date-picker/style/index.d.ts +0 -6
  529. package/lib/date-picker/style/index.d.ts.map +0 -1
  530. package/lib/date-picker/style/index.js +0 -7
  531. package/lib/date-picker/style/index.js.map +0 -1
  532. package/lib/date-picker/style/index.less +0 -17
  533. package/lib/descriptions/style/index.d.ts +0 -3
  534. package/lib/descriptions/style/index.d.ts.map +0 -1
  535. package/lib/descriptions/style/index.js +0 -4
  536. package/lib/descriptions/style/index.js.map +0 -1
  537. package/lib/descriptions/style/index.less +0 -144
  538. package/lib/divider/style/index.d.ts +0 -3
  539. package/lib/divider/style/index.d.ts.map +0 -1
  540. package/lib/divider/style/index.js +0 -4
  541. package/lib/divider/style/index.js.map +0 -1
  542. package/lib/divider/style/index.less +0 -109
  543. package/lib/drawer/style/drawer.less +0 -230
  544. package/lib/drawer/style/index.d.ts +0 -3
  545. package/lib/drawer/style/index.d.ts.map +0 -1
  546. package/lib/drawer/style/index.js +0 -4
  547. package/lib/drawer/style/index.js.map +0 -1
  548. package/lib/drawer/style/index.less +0 -3
  549. package/lib/dropdown/style/index.d.ts +0 -4
  550. package/lib/dropdown/style/index.d.ts.map +0 -1
  551. package/lib/dropdown/style/index.js +0 -5
  552. package/lib/dropdown/style/index.js.map +0 -1
  553. package/lib/dropdown/style/index.less +0 -282
  554. package/lib/empty/style/index.d.ts +0 -3
  555. package/lib/empty/style/index.d.ts.map +0 -1
  556. package/lib/empty/style/index.js +0 -4
  557. package/lib/empty/style/index.js.map +0 -1
  558. package/lib/empty/style/index.less +0 -52
  559. package/lib/form/style/index.d.ts +0 -4
  560. package/lib/form/style/index.d.ts.map +0 -1
  561. package/lib/form/style/index.js +0 -5
  562. package/lib/form/style/index.js.map +0 -1
  563. package/lib/form/style/index.less +0 -653
  564. package/lib/form/style/mixin.less +0 -126
  565. package/lib/grid-v4/RowContext.d.ts.map +0 -1
  566. package/lib/grid-v4/RowContext.js.map +0 -1
  567. package/lib/grid-v4/col.d.ts.map +0 -1
  568. package/lib/grid-v4/col.js.map +0 -1
  569. package/lib/grid-v4/hooks/useBreakpoint.d.ts.map +0 -1
  570. package/lib/grid-v4/hooks/useBreakpoint.js.map +0 -1
  571. package/lib/grid-v4/index.d.ts.map +0 -1
  572. package/lib/grid-v4/index.js.map +0 -1
  573. package/lib/grid-v4/row.d.ts.map +0 -1
  574. package/lib/grid-v4/row.js.map +0 -1
  575. package/lib/grid-v4/style/index.d.ts +0 -2
  576. package/lib/grid-v4/style/index.d.ts.map +0 -1
  577. package/lib/grid-v4/style/index.js +0 -3
  578. package/lib/grid-v4/style/index.js.map +0 -1
  579. package/lib/grid-v4/style/index.less +0 -124
  580. package/lib/grid-v4/style/mixin.less +0 -57
  581. package/lib/grid-v4/style/rtl.less +0 -69
  582. package/lib/handle/handle.d.ts +0 -3
  583. package/lib/handle/handle.d.ts.map +0 -1
  584. package/lib/handle/handle.js +0 -181
  585. package/lib/handle/handle.js.map +0 -1
  586. package/lib/icon/style/index.d.ts +0 -3
  587. package/lib/icon/style/index.d.ts.map +0 -1
  588. package/lib/icon/style/index.js +0 -4
  589. package/lib/icon/style/index.js.map +0 -1
  590. package/lib/icon/style/index.less +0 -4
  591. package/lib/input/style/index.d.ts +0 -4
  592. package/lib/input/style/index.d.ts.map +0 -1
  593. package/lib/input/style/index.js +0 -5
  594. package/lib/input/style/index.js.map +0 -1
  595. package/lib/input/style/index.less +0 -57
  596. package/lib/input/style/mixin.less +0 -449
  597. package/lib/input/style/search-input.less +0 -34
  598. package/lib/input-number/style/index.d.ts +0 -3
  599. package/lib/input-number/style/index.d.ts.map +0 -1
  600. package/lib/input-number/style/index.js +0 -4
  601. package/lib/input-number/style/index.js.map +0 -1
  602. package/lib/input-number/style/index.less +0 -179
  603. package/lib/layout/style/index.d.ts +0 -3
  604. package/lib/layout/style/index.d.ts.map +0 -1
  605. package/lib/layout/style/index.js +0 -4
  606. package/lib/layout/style/index.js.map +0 -1
  607. package/lib/layout/style/index.less +0 -124
  608. package/lib/layout/style/light.less +0 -15
  609. package/lib/list/style/bordered.less +0 -41
  610. package/lib/list/style/index.d.ts +0 -7
  611. package/lib/list/style/index.d.ts.map +0 -1
  612. package/lib/list/style/index.js +0 -8
  613. package/lib/list/style/index.js.map +0 -1
  614. package/lib/list/style/index.less +0 -234
  615. package/lib/list/style/responsive.less +0 -40
  616. package/lib/locale-provider/style/index.d.ts +0 -2
  617. package/lib/locale-provider/style/index.d.ts.map +0 -1
  618. package/lib/locale-provider/style/index.js +0 -3
  619. package/lib/locale-provider/style/index.js.map +0 -1
  620. package/lib/locale-provider/style/index.less +0 -2
  621. package/lib/mention/index.js +0 -25
  622. package/lib/mentions/style/index.d.ts +0 -4
  623. package/lib/mentions/style/index.d.ts.map +0 -1
  624. package/lib/mentions/style/index.js +0 -5
  625. package/lib/mentions/style/index.js.map +0 -1
  626. package/lib/mentions/style/index.less +0 -164
  627. package/lib/menu/style/dark.less +0 -139
  628. package/lib/menu/style/index.d.ts +0 -4
  629. package/lib/menu/style/index.d.ts.map +0 -1
  630. package/lib/menu/style/index.js +0 -5
  631. package/lib/menu/style/index.js.map +0 -1
  632. package/lib/menu/style/index.less +0 -515
  633. package/lib/message/style/index.d.ts +0 -3
  634. package/lib/message/style/index.d.ts.map +0 -1
  635. package/lib/message/style/index.js +0 -4
  636. package/lib/message/style/index.js.map +0 -1
  637. package/lib/message/style/index.less +0 -75
  638. package/lib/modal/style/confirm.less +0 -78
  639. package/lib/modal/style/index.d.ts +0 -4
  640. package/lib/modal/style/index.d.ts.map +0 -1
  641. package/lib/modal/style/index.js +0 -5
  642. package/lib/modal/style/index.js.map +0 -1
  643. package/lib/modal/style/index.less +0 -4
  644. package/lib/modal/style/modal.less +0 -165
  645. package/lib/notification/style/index.d.ts +0 -3
  646. package/lib/notification/style/index.d.ts.map +0 -1
  647. package/lib/notification/style/index.js +0 -4
  648. package/lib/notification/style/index.js.map +0 -1
  649. package/lib/notification/style/index.less +0 -199
  650. package/lib/page-header/style/index.d.ts +0 -4
  651. package/lib/page-header/style/index.d.ts.map +0 -1
  652. package/lib/page-header/style/index.js +0 -5
  653. package/lib/page-header/style/index.js.map +0 -1
  654. package/lib/page-header/style/index.less +0 -119
  655. package/lib/pagination/style/index.d.ts +0 -4
  656. package/lib/pagination/style/index.d.ts.map +0 -1
  657. package/lib/pagination/style/index.js +0 -5
  658. package/lib/pagination/style/index.js.map +0 -1
  659. package/lib/pagination/style/index.less +0 -400
  660. package/lib/popconfirm/style/index.d.ts +0 -4
  661. package/lib/popconfirm/style/index.d.ts.map +0 -1
  662. package/lib/popconfirm/style/index.js +0 -5
  663. package/lib/popconfirm/style/index.js.map +0 -1
  664. package/lib/popover/style/index.d.ts +0 -3
  665. package/lib/popover/style/index.d.ts.map +0 -1
  666. package/lib/popover/style/index.js +0 -4
  667. package/lib/popover/style/index.js.map +0 -1
  668. package/lib/popover/style/index.less +0 -205
  669. package/lib/progress/style/index.d.ts +0 -3
  670. package/lib/progress/style/index.d.ts.map +0 -1
  671. package/lib/progress/style/index.js +0 -4
  672. package/lib/progress/style/index.js.map +0 -1
  673. package/lib/progress/style/index.less +0 -182
  674. package/lib/radio/style/index.d.ts +0 -3
  675. package/lib/radio/style/index.d.ts.map +0 -1
  676. package/lib/radio/style/index.js +0 -4
  677. package/lib/radio/style/index.js.map +0 -1
  678. package/lib/radio/style/index.less +0 -327
  679. package/lib/rate/style/index.d.ts +0 -4
  680. package/lib/rate/style/index.d.ts.map +0 -1
  681. package/lib/rate/style/index.js +0 -5
  682. package/lib/rate/style/index.js.map +0 -1
  683. package/lib/rate/style/index.less +0 -85
  684. package/lib/result/style/index.d.ts +0 -3
  685. package/lib/result/style/index.d.ts.map +0 -1
  686. package/lib/result/style/index.js +0 -4
  687. package/lib/result/style/index.js.map +0 -1
  688. package/lib/result/style/index.less +0 -71
  689. package/lib/row/style/index.d.ts +0 -3
  690. package/lib/row/style/index.d.ts.map +0 -1
  691. package/lib/row/style/index.js +0 -4
  692. package/lib/row/style/index.js.map +0 -1
  693. package/lib/select/style/index.d.ts +0 -4
  694. package/lib/select/style/index.d.ts.map +0 -1
  695. package/lib/select/style/index.js +0 -5
  696. package/lib/select/style/index.js.map +0 -1
  697. package/lib/select/style/index.less +0 -604
  698. package/lib/skeleton/style/index.d.ts +0 -3
  699. package/lib/skeleton/style/index.d.ts.map +0 -1
  700. package/lib/skeleton/style/index.js +0 -4
  701. package/lib/skeleton/style/index.js.map +0 -1
  702. package/lib/skeleton/style/index.less +0 -130
  703. package/lib/slider/style/index.d.ts +0 -4
  704. package/lib/slider/style/index.d.ts.map +0 -1
  705. package/lib/slider/style/index.js +0 -5
  706. package/lib/slider/style/index.js.map +0 -1
  707. package/lib/slider/style/index.less +0 -197
  708. package/lib/spin/style/index.d.ts +0 -3
  709. package/lib/spin/style/index.d.ts.map +0 -1
  710. package/lib/spin/style/index.js +0 -4
  711. package/lib/spin/style/index.js.map +0 -1
  712. package/lib/spin/style/index.less +0 -214
  713. package/lib/statistic/style/index.d.ts +0 -3
  714. package/lib/statistic/style/index.d.ts.map +0 -1
  715. package/lib/statistic/style/index.js +0 -4
  716. package/lib/statistic/style/index.js.map +0 -1
  717. package/lib/statistic/style/index.less +0 -40
  718. package/lib/steps/style/compatibility.less +0 -50
  719. package/lib/steps/style/custom-icon.less +0 -31
  720. package/lib/steps/style/index.d.ts +0 -3
  721. package/lib/steps/style/index.d.ts.map +0 -1
  722. package/lib/steps/style/index.js +0 -4
  723. package/lib/steps/style/index.js.map +0 -1
  724. package/lib/steps/style/label-placement.less +0 -38
  725. package/lib/steps/style/progress-dot.less +0 -80
  726. package/lib/steps/style/vertical.less +0 -74
  727. package/lib/style/color/bezierEasing.less +0 -110
  728. package/lib/style/color/colorPalette.less +0 -75
  729. package/lib/style/color/colors.less +0 -149
  730. package/lib/style/color/tinyColor.less +0 -1184
  731. package/lib/style/core/base.less +0 -510
  732. package/lib/style/core/iconfont.less +0 -19
  733. package/lib/style/core/index.less +0 -4
  734. package/lib/style/core/motion/fade.less +0 -31
  735. package/lib/style/core/motion/move.less +0 -120
  736. package/lib/style/core/motion/other.less +0 -40
  737. package/lib/style/core/motion/slide.less +0 -120
  738. package/lib/style/core/motion/swing.less +0 -34
  739. package/lib/style/core/motion/zoom.less +0 -162
  740. package/lib/style/core/motion.less +0 -20
  741. package/lib/style/index.d.ts +0 -2
  742. package/lib/style/index.d.ts.map +0 -1
  743. package/lib/style/index.js +0 -3
  744. package/lib/style/index.js.map +0 -1
  745. package/lib/style/index.less +0 -2
  746. package/lib/style/mixins/clearfix.less +0 -13
  747. package/lib/style/mixins/compatibility.less +0 -22
  748. package/lib/style/mixins/iconfont.less +0 -43
  749. package/lib/style/mixins/index.less +0 -10
  750. package/lib/style/mixins/motion.less +0 -35
  751. package/lib/style/mixins/operation-unit.less +0 -18
  752. package/lib/style/mixins/reset.less +0 -13
  753. package/lib/style/mixins/size.less +0 -10
  754. package/lib/style/mixins/typography.less +0 -49
  755. package/lib/style/themes/default.less +0 -699
  756. package/lib/style/themes/index.less +0 -1
  757. package/lib/style/v2-compatible-reset.d.ts +0 -2
  758. package/lib/style/v2-compatible-reset.d.ts.map +0 -1
  759. package/lib/style/v2-compatible-reset.js +0 -3
  760. package/lib/style/v2-compatible-reset.js.map +0 -1
  761. package/lib/style/v2-compatible-reset.less +0 -51
  762. package/lib/switch/style/index.d.ts +0 -3
  763. package/lib/switch/style/index.d.ts.map +0 -1
  764. package/lib/switch/style/index.js +0 -4
  765. package/lib/switch/style/index.js.map +0 -1
  766. package/lib/switch/style/index.less +0 -178
  767. package/lib/table/style/index.d.ts +0 -9
  768. package/lib/table/style/index.d.ts.map +0 -1
  769. package/lib/table/style/index.js +0 -10
  770. package/lib/table/style/index.js.map +0 -1
  771. package/lib/table/style/index.less +0 -800
  772. package/lib/table/style/size.less +0 -179
  773. package/lib/tabs/style/card-style.less +0 -186
  774. package/lib/tabs/style/index.d.ts +0 -3
  775. package/lib/tabs/style/index.d.ts.map +0 -1
  776. package/lib/tabs/style/index.js +0 -4
  777. package/lib/tabs/style/index.js.map +0 -1
  778. package/lib/tabs/style/index.less +0 -436
  779. package/lib/tag/style/index.d.ts +0 -3
  780. package/lib/tag/style/index.d.ts.map +0 -1
  781. package/lib/tag/style/index.js +0 -4
  782. package/lib/tag/style/index.js.map +0 -1
  783. package/lib/tag/style/index.less +0 -106
  784. package/lib/time-picker/style/index.d.ts +0 -3
  785. package/lib/time-picker/style/index.d.ts.map +0 -1
  786. package/lib/time-picker/style/index.js +0 -4
  787. package/lib/time-picker/style/index.js.map +0 -1
  788. package/lib/time-picker/style/index.less +0 -246
  789. package/lib/timeline/style/index.d.ts +0 -3
  790. package/lib/timeline/style/index.d.ts.map +0 -1
  791. package/lib/timeline/style/index.js +0 -4
  792. package/lib/timeline/style/index.js.map +0 -1
  793. package/lib/timeline/style/index.less +0 -167
  794. package/lib/tntd-form/TntdForm/components/Item.js +0 -65
  795. package/lib/tntd-form/TntdForm/components/ItemComp.js +0 -215
  796. package/lib/tntd-form/TntdForm/components/List.js +0 -123
  797. package/lib/tntd-form/TntdForm/index.js +0 -72
  798. package/lib/tntd-form/TntdForm/interface.js +0 -5
  799. package/lib/tntd-form/TntdForm/store.js +0 -10
  800. package/lib/tntd-form/TntdForm/utils.js +0 -239
  801. package/lib/tntd-select/_util/DisabledContext.d.ts +0 -10
  802. package/lib/tntd-select/_util/DisabledContext.d.ts.map +0 -1
  803. package/lib/tntd-select/_util/DisabledContext.js +0 -22
  804. package/lib/tntd-select/_util/DisabledContext.js.map +0 -1
  805. package/lib/tntd-select/_util/FormItemInputContext.d.ts +0 -4
  806. package/lib/tntd-select/_util/FormItemInputContext.d.ts.map +0 -1
  807. package/lib/tntd-select/_util/FormItemInputContext.js +0 -12
  808. package/lib/tntd-select/_util/FormItemInputContext.js.map +0 -1
  809. package/lib/tntd-select/_util/PurePanel.d.ts +0 -9
  810. package/lib/tntd-select/_util/PurePanel.d.ts.map +0 -1
  811. package/lib/tntd-select/_util/PurePanel.js +0 -90
  812. package/lib/tntd-select/_util/PurePanel.js.map +0 -1
  813. package/lib/tntd-select/_util/SizeContext.d.ts +0 -4
  814. package/lib/tntd-select/_util/SizeContext.d.ts.map +0 -1
  815. package/lib/tntd-select/_util/SizeContext.js +0 -12
  816. package/lib/tntd-select/_util/SizeContext.js.map +0 -1
  817. package/lib/tntd-select/_util/context.d.ts.map +0 -1
  818. package/lib/tntd-select/_util/context.js.map +0 -1
  819. package/lib/tntd-select/_util/defaultRenderEmpty.d.ts.map +0 -1
  820. package/lib/tntd-select/_util/defaultRenderEmpty.js.map +0 -1
  821. package/lib/tntd-select/_util/getIcons.d.ts +0 -25
  822. package/lib/tntd-select/_util/getIcons.d.ts.map +0 -1
  823. package/lib/tntd-select/_util/getIcons.js +0 -84
  824. package/lib/tntd-select/_util/getIcons.js.map +0 -1
  825. package/lib/tntd-select/_util/interface.d.ts +0 -25
  826. package/lib/tntd-select/_util/interface.d.ts.map +0 -1
  827. package/lib/tntd-select/_util/interface.js +0 -16
  828. package/lib/tntd-select/_util/interface.js.map +0 -1
  829. package/lib/tntd-select/_util/motion.d.ts +0 -9
  830. package/lib/tntd-select/_util/motion.d.ts.map +0 -1
  831. package/lib/tntd-select/_util/motion.js +0 -59
  832. package/lib/tntd-select/_util/motion.js.map +0 -1
  833. package/lib/tntd-select/_util/type.d.ts +0 -10
  834. package/lib/tntd-select/_util/type.d.ts.map +0 -1
  835. package/lib/tntd-select/_util/type.js +0 -21
  836. package/lib/tntd-select/_util/type.js.map +0 -1
  837. package/lib/tntd-select/_util/useCompactItemContext.d.ts +0 -9
  838. package/lib/tntd-select/_util/useCompactItemContext.d.ts.map +0 -1
  839. package/lib/tntd-select/_util/useCompactItemContext.js +0 -35
  840. package/lib/tntd-select/_util/useCompactItemContext.js.map +0 -1
  841. package/lib/tntd-select/_util/warning.d.ts +0 -4
  842. package/lib/tntd-select/_util/warning.d.ts.map +0 -1
  843. package/lib/tntd-select/_util/warning.js +0 -24
  844. package/lib/tntd-select/_util/warning.js.map +0 -1
  845. package/lib/tntd-select/rc-select/BaseSelect.d.ts +0 -114
  846. package/lib/tntd-select/rc-select/BaseSelect.d.ts.map +0 -1
  847. package/lib/tntd-select/rc-select/BaseSelect.js +0 -566
  848. package/lib/tntd-select/rc-select/BaseSelect.js.map +0 -1
  849. package/lib/tntd-select/rc-select/OptGroup.d.ts +0 -13
  850. package/lib/tntd-select/rc-select/OptGroup.d.ts.map +0 -1
  851. package/lib/tntd-select/rc-select/OptGroup.js +0 -13
  852. package/lib/tntd-select/rc-select/OptGroup.js.map +0 -1
  853. package/lib/tntd-select/rc-select/Option.d.ts +0 -15
  854. package/lib/tntd-select/rc-select/Option.d.ts.map +0 -1
  855. package/lib/tntd-select/rc-select/Option.js +0 -13
  856. package/lib/tntd-select/rc-select/Option.js.map +0 -1
  857. package/lib/tntd-select/rc-select/OptionList.d.ts +0 -11
  858. package/lib/tntd-select/rc-select/OptionList.d.ts.map +0 -1
  859. package/lib/tntd-select/rc-select/OptionList.js +0 -372
  860. package/lib/tntd-select/rc-select/OptionList.js.map +0 -1
  861. package/lib/tntd-select/rc-select/Select.d.ts +0 -115
  862. package/lib/tntd-select/rc-select/Select.d.ts.map +0 -1
  863. package/lib/tntd-select/rc-select/Select.js +0 -509
  864. package/lib/tntd-select/rc-select/Select.js.map +0 -1
  865. package/lib/tntd-select/rc-select/SelectContext.d.ts +0 -23
  866. package/lib/tntd-select/rc-select/SelectContext.d.ts.map +0 -1
  867. package/lib/tntd-select/rc-select/SelectContext.js +0 -13
  868. package/lib/tntd-select/rc-select/SelectContext.js.map +0 -1
  869. package/lib/tntd-select/rc-select/SelectTrigger.d.ts +0 -31
  870. package/lib/tntd-select/rc-select/SelectTrigger.d.ts.map +0 -1
  871. package/lib/tntd-select/rc-select/SelectTrigger.js +0 -149
  872. package/lib/tntd-select/rc-select/SelectTrigger.js.map +0 -1
  873. package/lib/tntd-select/rc-select/Selector/Input.d.ts +0 -27
  874. package/lib/tntd-select/rc-select/Selector/Input.d.ts.map +0 -1
  875. package/lib/tntd-select/rc-select/Selector/Input.js +0 -110
  876. package/lib/tntd-select/rc-select/Selector/Input.js.map +0 -1
  877. package/lib/tntd-select/rc-select/Selector/MultipleSelector.d.ts +0 -17
  878. package/lib/tntd-select/rc-select/Selector/MultipleSelector.d.ts.map +0 -1
  879. package/lib/tntd-select/rc-select/Selector/MultipleSelector.js +0 -193
  880. package/lib/tntd-select/rc-select/Selector/MultipleSelector.js.map +0 -1
  881. package/lib/tntd-select/rc-select/Selector/SingleSelector.d.ts +0 -9
  882. package/lib/tntd-select/rc-select/Selector/SingleSelector.d.ts.map +0 -1
  883. package/lib/tntd-select/rc-select/Selector/SingleSelector.js +0 -116
  884. package/lib/tntd-select/rc-select/Selector/SingleSelector.js.map +0 -1
  885. package/lib/tntd-select/rc-select/Selector/index.d.ts +0 -83
  886. package/lib/tntd-select/rc-select/Selector/index.d.ts.map +0 -1
  887. package/lib/tntd-select/rc-select/Selector/index.js +0 -159
  888. package/lib/tntd-select/rc-select/Selector/index.js.map +0 -1
  889. package/lib/tntd-select/rc-select/TransBtn.d.ts +0 -13
  890. package/lib/tntd-select/rc-select/TransBtn.d.ts.map +0 -1
  891. package/lib/tntd-select/rc-select/TransBtn.js +0 -48
  892. package/lib/tntd-select/rc-select/TransBtn.js.map +0 -1
  893. package/lib/tntd-select/rc-select/hooks/useAllowClear.d.ts +0 -9
  894. package/lib/tntd-select/rc-select/hooks/useAllowClear.d.ts.map +0 -1
  895. package/lib/tntd-select/rc-select/hooks/useAllowClear.js +0 -35
  896. package/lib/tntd-select/rc-select/hooks/useAllowClear.js.map +0 -1
  897. package/lib/tntd-select/rc-select/hooks/useBaseProps.d.ts +0 -14
  898. package/lib/tntd-select/rc-select/hooks/useBaseProps.d.ts.map +0 -1
  899. package/lib/tntd-select/rc-select/hooks/useBaseProps.js +0 -21
  900. package/lib/tntd-select/rc-select/hooks/useBaseProps.js.map +0 -1
  901. package/lib/tntd-select/rc-select/hooks/useCache.d.ts +0 -8
  902. package/lib/tntd-select/rc-select/hooks/useCache.d.ts.map +0 -1
  903. package/lib/tntd-select/rc-select/hooks/useCache.js +0 -49
  904. package/lib/tntd-select/rc-select/hooks/useCache.js.map +0 -1
  905. package/lib/tntd-select/rc-select/hooks/useDelayReset.d.ts +0 -6
  906. package/lib/tntd-select/rc-select/hooks/useDelayReset.d.ts.map +0 -1
  907. package/lib/tntd-select/rc-select/hooks/useDelayReset.js.map +0 -1
  908. package/lib/tntd-select/rc-select/hooks/useFilterOptions.d.ts +0 -4
  909. package/lib/tntd-select/rc-select/hooks/useFilterOptions.d.ts.map +0 -1
  910. package/lib/tntd-select/rc-select/hooks/useFilterOptions.js +0 -72
  911. package/lib/tntd-select/rc-select/hooks/useFilterOptions.js.map +0 -1
  912. package/lib/tntd-select/rc-select/hooks/useId.d.ts +0 -6
  913. package/lib/tntd-select/rc-select/hooks/useId.d.ts.map +0 -1
  914. package/lib/tntd-select/rc-select/hooks/useId.js.map +0 -1
  915. package/lib/tntd-select/rc-select/hooks/useLayoutEffect.d.ts +0 -6
  916. package/lib/tntd-select/rc-select/hooks/useLayoutEffect.d.ts.map +0 -1
  917. package/lib/tntd-select/rc-select/hooks/useLayoutEffect.js +0 -26
  918. package/lib/tntd-select/rc-select/hooks/useLayoutEffect.js.map +0 -1
  919. package/lib/tntd-select/rc-select/hooks/useLock.d.ts +0 -8
  920. package/lib/tntd-select/rc-select/hooks/useLock.d.ts.map +0 -1
  921. package/lib/tntd-select/rc-select/hooks/useLock.js +0 -39
  922. package/lib/tntd-select/rc-select/hooks/useLock.js.map +0 -1
  923. package/lib/tntd-select/rc-select/hooks/useOptions.d.ts +0 -12
  924. package/lib/tntd-select/rc-select/hooks/useOptions.d.ts.map +0 -1
  925. package/lib/tntd-select/rc-select/hooks/useOptions.js +0 -53
  926. package/lib/tntd-select/rc-select/hooks/useOptions.js.map +0 -1
  927. package/lib/tntd-select/rc-select/hooks/useRefFunc.d.ts +0 -6
  928. package/lib/tntd-select/rc-select/hooks/useRefFunc.d.ts.map +0 -1
  929. package/lib/tntd-select/rc-select/hooks/useRefFunc.js +0 -22
  930. package/lib/tntd-select/rc-select/hooks/useRefFunc.js.map +0 -1
  931. package/lib/tntd-select/rc-select/hooks/useSelectTriggerControl.d.ts +0 -2
  932. package/lib/tntd-select/rc-select/hooks/useSelectTriggerControl.d.ts.map +0 -1
  933. package/lib/tntd-select/rc-select/hooks/useSelectTriggerControl.js +0 -43
  934. package/lib/tntd-select/rc-select/hooks/useSelectTriggerControl.js.map +0 -1
  935. package/lib/tntd-select/rc-select/index.d.ts +0 -11
  936. package/lib/tntd-select/rc-select/index.d.ts.map +0 -1
  937. package/lib/tntd-select/rc-select/index.js +0 -38
  938. package/lib/tntd-select/rc-select/index.js.map +0 -1
  939. package/lib/tntd-select/rc-select/interface.d.ts +0 -23
  940. package/lib/tntd-select/rc-select/interface.d.ts.map +0 -1
  941. package/lib/tntd-select/rc-select/interface.js +0 -5
  942. package/lib/tntd-select/rc-select/interface.js.map +0 -1
  943. package/lib/tntd-select/rc-select/utils/commonUtil.d.ts +0 -10
  944. package/lib/tntd-select/rc-select/utils/commonUtil.d.ts.map +0 -1
  945. package/lib/tntd-select/rc-select/utils/commonUtil.js +0 -43
  946. package/lib/tntd-select/rc-select/utils/commonUtil.js.map +0 -1
  947. package/lib/tntd-select/rc-select/utils/keyUtil.d.ts +0 -3
  948. package/lib/tntd-select/rc-select/utils/keyUtil.d.ts.map +0 -1
  949. package/lib/tntd-select/rc-select/utils/keyUtil.js +0 -16
  950. package/lib/tntd-select/rc-select/utils/keyUtil.js.map +0 -1
  951. package/lib/tntd-select/rc-select/utils/legacyUtil.d.ts +0 -4
  952. package/lib/tntd-select/rc-select/utils/legacyUtil.d.ts.map +0 -1
  953. package/lib/tntd-select/rc-select/utils/legacyUtil.js +0 -60
  954. package/lib/tntd-select/rc-select/utils/legacyUtil.js.map +0 -1
  955. package/lib/tntd-select/rc-select/utils/platformUtil.d.ts +0 -2
  956. package/lib/tntd-select/rc-select/utils/platformUtil.d.ts.map +0 -1
  957. package/lib/tntd-select/rc-select/utils/platformUtil.js +0 -10
  958. package/lib/tntd-select/rc-select/utils/platformUtil.js.map +0 -1
  959. package/lib/tntd-select/rc-select/utils/valueUtil.d.ts +0 -24
  960. package/lib/tntd-select/rc-select/utils/valueUtil.d.ts.map +0 -1
  961. package/lib/tntd-select/rc-select/utils/valueUtil.js +0 -132
  962. package/lib/tntd-select/rc-select/utils/valueUtil.js.map +0 -1
  963. package/lib/tntd-select/rc-select/utils/warningPropsUtil.d.ts +0 -5
  964. package/lib/tntd-select/rc-select/utils/warningPropsUtil.d.ts.map +0 -1
  965. package/lib/tntd-select/rc-select/utils/warningPropsUtil.js +0 -127
  966. package/lib/tntd-select/rc-select/utils/warningPropsUtil.js.map +0 -1
  967. package/lib/tooltip/style/index.d.ts +0 -3
  968. package/lib/tooltip/style/index.d.ts.map +0 -1
  969. package/lib/tooltip/style/index.js +0 -4
  970. package/lib/tooltip/style/index.js.map +0 -1
  971. package/lib/tooltip/style/index.less +0 -187
  972. package/lib/transfer/style/customize.less +0 -62
  973. package/lib/transfer/style/index.d.ts +0 -7
  974. package/lib/transfer/style/index.d.ts.map +0 -1
  975. package/lib/transfer/style/index.js +0 -8
  976. package/lib/transfer/style/index.js.map +0 -1
  977. package/lib/transfer/style/index.less +0 -191
  978. package/lib/tree/style/directory.less +0 -95
  979. package/lib/tree/style/index.d.ts +0 -3
  980. package/lib/tree/style/index.d.ts.map +0 -1
  981. package/lib/tree/style/index.js +0 -4
  982. package/lib/tree/style/index.js.map +0 -1
  983. package/lib/tree/style/index.less +0 -280
  984. package/lib/tree/style/mixin.less +0 -29
  985. package/lib/tree-select/style/index.d.ts +0 -5
  986. package/lib/tree-select/style/index.d.ts.map +0 -1
  987. package/lib/tree-select/style/index.js +0 -6
  988. package/lib/tree-select/style/index.js.map +0 -1
  989. package/lib/tree-select/style/index.less +0 -191
  990. package/lib/typography/style/index.d.ts +0 -5
  991. package/lib/typography/style/index.d.ts.map +0 -1
  992. package/lib/typography/style/index.js +0 -6
  993. package/lib/typography/style/index.js.map +0 -1
  994. package/lib/typography/style/index.less +0 -204
  995. package/lib/upload/style/index.d.ts +0 -5
  996. package/lib/upload/style/index.d.ts.map +0 -1
  997. package/lib/upload/style/index.js +0 -6
  998. package/lib/upload/style/index.js.map +0 -1
  999. package/lib/upload/style/index.less +0 -542
  1000. package/lib/version/style/index.d.ts +0 -2
  1001. package/lib/version/style/index.d.ts.map +0 -1
  1002. package/lib/version/style/index.js +0 -3
  1003. package/lib/version/style/index.js.map +0 -1
  1004. /package/es/{tntd-select → tntd-form}/_util/context.js +0 -0
  1005. /package/es/{tntd-select → tntd-form}/_util/defaultRenderEmpty.js +0 -0
  1006. /package/es/{grid-v4 → tntd-form/grid}/RowContext.js +0 -0
  1007. /package/es/{grid-v4 → tntd-form/grid}/hooks/useBreakpoint.js +0 -0
  1008. /package/es/{grid-v4 → tntd-form/grid}/index.js +0 -0
  1009. /package/es/{affix → tntd-form/grid}/style/index.js +0 -0
  1010. /package/lib/{tntd-select → tntd-form}/_util/context.d.ts +0 -0
  1011. /package/lib/{tntd-select → tntd-form}/_util/context.js +0 -0
  1012. /package/lib/{tntd-select → tntd-form}/_util/defaultRenderEmpty.d.ts +0 -0
  1013. /package/lib/{tntd-select → tntd-form}/_util/defaultRenderEmpty.js +0 -0
  1014. /package/lib/{grid-v4 → tntd-form/grid}/RowContext.d.ts +0 -0
  1015. /package/lib/{grid-v4 → tntd-form/grid}/RowContext.js +0 -0
  1016. /package/lib/{grid-v4 → tntd-form/grid}/col.d.ts +0 -0
  1017. /package/lib/{grid-v4 → tntd-form/grid}/col.js +0 -0
  1018. /package/lib/{grid-v4 → tntd-form/grid}/hooks/useBreakpoint.d.ts +0 -0
  1019. /package/lib/{grid-v4 → tntd-form/grid}/hooks/useBreakpoint.js +0 -0
  1020. /package/lib/{grid-v4 → tntd-form/grid}/index.d.ts +0 -0
  1021. /package/lib/{grid-v4 → tntd-form/grid}/index.js +0 -0
  1022. /package/lib/{grid-v4 → tntd-form/grid}/row.d.ts +0 -0
  1023. /package/lib/{affix → tntd-form/grid}/style/index.d.ts +0 -0
  1024. /package/lib/{affix → tntd-form/grid}/style/index.js +0 -0
@@ -1,1184 +0,0 @@
1
- /* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
2
- .tinyColorMixin() {
3
- @functions: ~`(function() {
4
- // TinyColor v1.4.1
5
- // https://github.com/bgrins/TinyColor
6
- // 2016-07-07, Brian Grinstead, MIT License
7
- var trimLeft = /^\s+/,
8
- trimRight = /\s+$/,
9
- tinyCounter = 0,
10
- mathRound = Math.round,
11
- mathMin = Math.min,
12
- mathMax = Math.max,
13
- mathRandom = Math.random;
14
-
15
- function tinycolor (color, opts) {
16
-
17
- color = (color) ? color : '';
18
- opts = opts || { };
19
-
20
- // If input is already a tinycolor, return itself
21
- if (color instanceof tinycolor) {
22
- return color;
23
- }
24
- // If we are called as a function, call using new instead
25
- if (!(this instanceof tinycolor)) {
26
- return new tinycolor(color, opts);
27
- }
28
-
29
- var rgb = inputToRGB(color);
30
- this._originalInput = color,
31
- this._r = rgb.r,
32
- this._g = rgb.g,
33
- this._b = rgb.b,
34
- this._a = rgb.a,
35
- this._roundA = mathRound(100*this._a) / 100,
36
- this._format = opts.format || rgb.format;
37
- this._gradientType = opts.gradientType;
38
-
39
- // Don't let the range of [0,255] come back in [0,1].
40
- // Potentially lose a little bit of precision here, but will fix issues where
41
- // .5 gets interpreted as half of the total, instead of half of 1
42
- // If it was supposed to be 128, this was already taken care of by inputToRgb
43
- if (this._r < 1) { this._r = mathRound(this._r); }
44
- if (this._g < 1) { this._g = mathRound(this._g); }
45
- if (this._b < 1) { this._b = mathRound(this._b); }
46
-
47
- this._ok = rgb.ok;
48
- this._tc_id = tinyCounter++;
49
- }
50
-
51
- tinycolor.prototype = {
52
- isDark: function() {
53
- return this.getBrightness() < 128;
54
- },
55
- isLight: function() {
56
- return !this.isDark();
57
- },
58
- isValid: function() {
59
- return this._ok;
60
- },
61
- getOriginalInput: function() {
62
- return this._originalInput;
63
- },
64
- getFormat: function() {
65
- return this._format;
66
- },
67
- getAlpha: function() {
68
- return this._a;
69
- },
70
- getBrightness: function() {
71
- //http://www.w3.org/TR/AERT#color-contrast
72
- var rgb = this.toRgb();
73
- return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;
74
- },
75
- getLuminance: function() {
76
- //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
77
- var rgb = this.toRgb();
78
- var RsRGB, GsRGB, BsRGB, R, G, B;
79
- RsRGB = rgb.r/255;
80
- GsRGB = rgb.g/255;
81
- BsRGB = rgb.b/255;
82
-
83
- if (RsRGB <= 0.03928) {R = RsRGB / 12.92;} else {R = Math.pow(((RsRGB + 0.055) / 1.055), 2.4);}
84
- if (GsRGB <= 0.03928) {G = GsRGB / 12.92;} else {G = Math.pow(((GsRGB + 0.055) / 1.055), 2.4);}
85
- if (BsRGB <= 0.03928) {B = BsRGB / 12.92;} else {B = Math.pow(((BsRGB + 0.055) / 1.055), 2.4);}
86
- return (0.2126 * R) + (0.7152 * G) + (0.0722 * B);
87
- },
88
- setAlpha: function(value) {
89
- this._a = boundAlpha(value);
90
- this._roundA = mathRound(100*this._a) / 100;
91
- return this;
92
- },
93
- toHsv: function() {
94
- var hsv = rgbToHsv(this._r, this._g, this._b);
95
- return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };
96
- },
97
- toHsvString: function() {
98
- var hsv = rgbToHsv(this._r, this._g, this._b);
99
- var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100);
100
- return (this._a == 1) ?
101
- "hsv(" + h + ", " + s + "%, " + v + "%)" :
102
- "hsva(" + h + ", " + s + "%, " + v + "%, "+ this._roundA + ")";
103
- },
104
- toHsl: function() {
105
- var hsl = rgbToHsl(this._r, this._g, this._b);
106
- return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };
107
- },
108
- toHslString: function() {
109
- var hsl = rgbToHsl(this._r, this._g, this._b);
110
- var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100);
111
- return (this._a == 1) ?
112
- "hsl(" + h + ", " + s + "%, " + l + "%)" :
113
- "hsla(" + h + ", " + s + "%, " + l + "%, "+ this._roundA + ")";
114
- },
115
- toHex: function(allow3Char) {
116
- return rgbToHex(this._r, this._g, this._b, allow3Char);
117
- },
118
- toHexString: function(allow3Char) {
119
- return '#' + this.toHex(allow3Char);
120
- },
121
- toHex8: function(allow4Char) {
122
- return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);
123
- },
124
- toHex8String: function(allow4Char) {
125
- return '#' + this.toHex8(allow4Char);
126
- },
127
- toRgb: function() {
128
- return { r: mathRound(this._r), g: mathRound(this._g), b: mathRound(this._b), a: this._a };
129
- },
130
- toRgbString: function() {
131
- return (this._a == 1) ?
132
- "rgb(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ")" :
133
- "rgba(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ", " + this._roundA + ")";
134
- },
135
- toPercentageRgb: function() {
136
- return { r: mathRound(bound01(this._r, 255) * 100) + "%", g: mathRound(bound01(this._g, 255) * 100) + "%", b: mathRound(bound01(this._b, 255) * 100) + "%", a: this._a };
137
- },
138
- toPercentageRgbString: function() {
139
- return (this._a == 1) ?
140
- "rgb(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%)" :
141
- "rgba(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")";
142
- },
143
- toName: function() {
144
- if (this._a === 0) {
145
- return "transparent";
146
- }
147
-
148
- if (this._a < 1) {
149
- return false;
150
- }
151
-
152
- return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
153
- },
154
- toFilter: function(secondColor) {
155
- var hex8String = '#' + rgbaToArgbHex(this._r, this._g, this._b, this._a);
156
- var secondHex8String = hex8String;
157
- var gradientType = this._gradientType ? "GradientType = 1, " : "";
158
-
159
- if (secondColor) {
160
- var s = tinycolor(secondColor);
161
- secondHex8String = '#' + rgbaToArgbHex(s._r, s._g, s._b, s._a);
162
- }
163
-
164
- return "progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr="+hex8String+",endColorstr="+secondHex8String+")";
165
- },
166
- toString: function(format) {
167
- var formatSet = !!format;
168
- format = format || this._format;
169
-
170
- var formattedString = false;
171
- var hasAlpha = this._a < 1 && this._a >= 0;
172
- var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name");
173
-
174
- if (needsAlphaFormat) {
175
- // Special case for "transparent", all other non-alpha formats
176
- // will return rgba when there is transparency.
177
- if (format === "name" && this._a === 0) {
178
- return this.toName();
179
- }
180
- return this.toRgbString();
181
- }
182
- if (format === "rgb") {
183
- formattedString = this.toRgbString();
184
- }
185
- if (format === "prgb") {
186
- formattedString = this.toPercentageRgbString();
187
- }
188
- if (format === "hex" || format === "hex6") {
189
- formattedString = this.toHexString();
190
- }
191
- if (format === "hex3") {
192
- formattedString = this.toHexString(true);
193
- }
194
- if (format === "hex4") {
195
- formattedString = this.toHex8String(true);
196
- }
197
- if (format === "hex8") {
198
- formattedString = this.toHex8String();
199
- }
200
- if (format === "name") {
201
- formattedString = this.toName();
202
- }
203
- if (format === "hsl") {
204
- formattedString = this.toHslString();
205
- }
206
- if (format === "hsv") {
207
- formattedString = this.toHsvString();
208
- }
209
-
210
- return formattedString || this.toHexString();
211
- },
212
- clone: function() {
213
- return tinycolor(this.toString());
214
- },
215
-
216
- _applyModification: function(fn, args) {
217
- var color = fn.apply(null, [this].concat([].slice.call(args)));
218
- this._r = color._r;
219
- this._g = color._g;
220
- this._b = color._b;
221
- this.setAlpha(color._a);
222
- return this;
223
- },
224
- lighten: function() {
225
- return this._applyModification(lighten, arguments);
226
- },
227
- brighten: function() {
228
- return this._applyModification(brighten, arguments);
229
- },
230
- darken: function() {
231
- return this._applyModification(darken, arguments);
232
- },
233
- desaturate: function() {
234
- return this._applyModification(desaturate, arguments);
235
- },
236
- saturate: function() {
237
- return this._applyModification(saturate, arguments);
238
- },
239
- greyscale: function() {
240
- return this._applyModification(greyscale, arguments);
241
- },
242
- spin: function() {
243
- return this._applyModification(spin, arguments);
244
- },
245
-
246
- _applyCombination: function(fn, args) {
247
- return fn.apply(null, [this].concat([].slice.call(args)));
248
- },
249
- analogous: function() {
250
- return this._applyCombination(analogous, arguments);
251
- },
252
- complement: function() {
253
- return this._applyCombination(complement, arguments);
254
- },
255
- monochromatic: function() {
256
- return this._applyCombination(monochromatic, arguments);
257
- },
258
- splitcomplement: function() {
259
- return this._applyCombination(splitcomplement, arguments);
260
- },
261
- triad: function() {
262
- return this._applyCombination(triad, arguments);
263
- },
264
- tetrad: function() {
265
- return this._applyCombination(tetrad, arguments);
266
- }
267
- };
268
-
269
- // If input is an object, force 1 into "1.0" to handle ratios properly
270
- // String input requires "1.0" as input, so 1 will be treated as 1
271
- tinycolor.fromRatio = function(color, opts) {
272
- if (typeof color == "object") {
273
- var newColor = {};
274
- for (var i in color) {
275
- if (color.hasOwnProperty(i)) {
276
- if (i === "a") {
277
- newColor[i] = color[i];
278
- }
279
- else {
280
- newColor[i] = convertToPercentage(color[i]);
281
- }
282
- }
283
- }
284
- color = newColor;
285
- }
286
-
287
- return tinycolor(color, opts);
288
- };
289
-
290
- // Given a string or object, convert that input to RGB
291
- // Possible string inputs:
292
- //
293
- // "red"
294
- // "#f00" or "f00"
295
- // "#ff0000" or "ff0000"
296
- // "#ff000000" or "ff000000"
297
- // "rgb 255 0 0" or "rgb (255, 0, 0)"
298
- // "rgb 1.0 0 0" or "rgb (1, 0, 0)"
299
- // "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
300
- // "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
301
- // "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
302
- // "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
303
- // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
304
- //
305
- function inputToRGB(color) {
306
-
307
- var rgb = { r: 0, g: 0, b: 0 };
308
- var a = 1;
309
- var s = null;
310
- var v = null;
311
- var l = null;
312
- var ok = false;
313
- var format = false;
314
-
315
- if (typeof color == "string") {
316
- color = stringInputToObject(color);
317
- }
318
-
319
- if (typeof color == "object") {
320
- if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
321
- rgb = rgbToRgb(color.r, color.g, color.b);
322
- ok = true;
323
- format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
324
- }
325
- else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
326
- s = convertToPercentage(color.s);
327
- v = convertToPercentage(color.v);
328
- rgb = hsvToRgb(color.h, s, v);
329
- ok = true;
330
- format = "hsv";
331
- }
332
- else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
333
- s = convertToPercentage(color.s);
334
- l = convertToPercentage(color.l);
335
- rgb = hslToRgb(color.h, s, l);
336
- ok = true;
337
- format = "hsl";
338
- }
339
-
340
- if (color.hasOwnProperty("a")) {
341
- a = color.a;
342
- }
343
- }
344
-
345
- a = boundAlpha(a);
346
-
347
- return {
348
- ok: ok,
349
- format: color.format || format,
350
- r: mathMin(255, mathMax(rgb.r, 0)),
351
- g: mathMin(255, mathMax(rgb.g, 0)),
352
- b: mathMin(255, mathMax(rgb.b, 0)),
353
- a: a
354
- };
355
- }
356
-
357
- // Conversion Functions
358
- // --------------------
359
-
360
- // rgbToHsl, rgbToHsv, hslToRgb, hsvToRgb modified from:
361
- // <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>
362
-
363
- // rgbToRgb
364
- // Handle bounds / percentage checking to conform to CSS color spec
365
- // <http://www.w3.org/TR/css3-color/>
366
- // *Assumes:* r, g, b in [0, 255] or [0, 1]
367
- // *Returns:* { r, g, b } in [0, 255]
368
- function rgbToRgb(r, g, b){
369
- return {
370
- r: bound01(r, 255) * 255,
371
- g: bound01(g, 255) * 255,
372
- b: bound01(b, 255) * 255
373
- };
374
- }
375
-
376
- // rgbToHsl
377
- // Converts an RGB color value to HSL.
378
- // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
379
- // *Returns:* { h, s, l } in [0,1]
380
- function rgbToHsl(r, g, b) {
381
-
382
- r = bound01(r, 255);
383
- g = bound01(g, 255);
384
- b = bound01(b, 255);
385
-
386
- var max = mathMax(r, g, b), min = mathMin(r, g, b);
387
- var h, s, l = (max + min) / 2;
388
-
389
- if(max == min) {
390
- h = s = 0; // achromatic
391
- }
392
- else {
393
- var d = max - min;
394
- s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
395
- switch(max) {
396
- case r: h = (g - b) / d + (g < b ? 6 : 0); break;
397
- case g: h = (b - r) / d + 2; break;
398
- case b: h = (r - g) / d + 4; break;
399
- }
400
-
401
- h /= 6;
402
- }
403
-
404
- return { h: h, s: s, l: l };
405
- }
406
-
407
- // hslToRgb
408
- // Converts an HSL color value to RGB.
409
- // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
410
- // *Returns:* { r, g, b } in the set [0, 255]
411
- function hslToRgb(h, s, l) {
412
- var r, g, b;
413
-
414
- h = bound01(h, 360);
415
- s = bound01(s, 100);
416
- l = bound01(l, 100);
417
-
418
- function hue2rgb(p, q, t) {
419
- if(t < 0) t += 1;
420
- if(t > 1) t -= 1;
421
- if(t < 1/6) return p + (q - p) * 6 * t;
422
- if(t < 1/2) return q;
423
- if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;
424
- return p;
425
- }
426
-
427
- if(s === 0) {
428
- r = g = b = l; // achromatic
429
- }
430
- else {
431
- var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
432
- var p = 2 * l - q;
433
- r = hue2rgb(p, q, h + 1/3);
434
- g = hue2rgb(p, q, h);
435
- b = hue2rgb(p, q, h - 1/3);
436
- }
437
-
438
- return { r: r * 255, g: g * 255, b: b * 255 };
439
- }
440
-
441
- // rgbToHsv
442
- // Converts an RGB color value to HSV
443
- // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
444
- // *Returns:* { h, s, v } in [0,1]
445
- function rgbToHsv(r, g, b) {
446
-
447
- r = bound01(r, 255);
448
- g = bound01(g, 255);
449
- b = bound01(b, 255);
450
-
451
- var max = mathMax(r, g, b), min = mathMin(r, g, b);
452
- var h, s, v = max;
453
-
454
- var d = max - min;
455
- s = max === 0 ? 0 : d / max;
456
-
457
- if(max == min) {
458
- h = 0; // achromatic
459
- }
460
- else {
461
- switch(max) {
462
- case r: h = (g - b) / d + (g < b ? 6 : 0); break;
463
- case g: h = (b - r) / d + 2; break;
464
- case b: h = (r - g) / d + 4; break;
465
- }
466
- h /= 6;
467
- }
468
- return { h: h, s: s, v: v };
469
- }
470
-
471
- // hsvToRgb
472
- // Converts an HSV color value to RGB.
473
- // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
474
- // *Returns:* { r, g, b } in the set [0, 255]
475
- function hsvToRgb(h, s, v) {
476
-
477
- h = bound01(h, 360) * 6;
478
- s = bound01(s, 100);
479
- v = bound01(v, 100);
480
-
481
- var i = Math.floor(h),
482
- f = h - i,
483
- p = v * (1 - s),
484
- q = v * (1 - f * s),
485
- t = v * (1 - (1 - f) * s),
486
- mod = i % 6,
487
- r = [v, q, p, p, t, v][mod],
488
- g = [t, v, v, q, p, p][mod],
489
- b = [p, p, t, v, v, q][mod];
490
-
491
- return { r: r * 255, g: g * 255, b: b * 255 };
492
- }
493
-
494
- // rgbToHex
495
- // Converts an RGB color to hex
496
- // Assumes r, g, and b are contained in the set [0, 255]
497
- // Returns a 3 or 6 character hex
498
- function rgbToHex(r, g, b, allow3Char) {
499
-
500
- var hex = [
501
- pad2(mathRound(r).toString(16)),
502
- pad2(mathRound(g).toString(16)),
503
- pad2(mathRound(b).toString(16))
504
- ];
505
-
506
- // Return a 3 character hex if possible
507
- if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {
508
- return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
509
- }
510
-
511
- return hex.join("");
512
- }
513
-
514
- // rgbaToHex
515
- // Converts an RGBA color plus alpha transparency to hex
516
- // Assumes r, g, b are contained in the set [0, 255] and
517
- // a in [0, 1]. Returns a 4 or 8 character rgba hex
518
- function rgbaToHex(r, g, b, a, allow4Char) {
519
-
520
- var hex = [
521
- pad2(mathRound(r).toString(16)),
522
- pad2(mathRound(g).toString(16)),
523
- pad2(mathRound(b).toString(16)),
524
- pad2(convertDecimalToHex(a))
525
- ];
526
-
527
- // Return a 4 character hex if possible
528
- if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {
529
- return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
530
- }
531
-
532
- return hex.join("");
533
- }
534
-
535
- // rgbaToArgbHex
536
- // Converts an RGBA color to an ARGB Hex8 string
537
- // Rarely used, but required for "toFilter()"
538
- function rgbaToArgbHex(r, g, b, a) {
539
-
540
- var hex = [
541
- pad2(convertDecimalToHex(a)),
542
- pad2(mathRound(r).toString(16)),
543
- pad2(mathRound(g).toString(16)),
544
- pad2(mathRound(b).toString(16))
545
- ];
546
-
547
- return hex.join("");
548
- }
549
-
550
- // equals
551
- // Can be called with any tinycolor input
552
- tinycolor.equals = function (color1, color2) {
553
- if (!color1 || !color2) { return false; }
554
- return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
555
- };
556
-
557
- tinycolor.random = function() {
558
- return tinycolor.fromRatio({
559
- r: mathRandom(),
560
- g: mathRandom(),
561
- b: mathRandom()
562
- });
563
- };
564
-
565
- // Modification Functions
566
- // ----------------------
567
- // Thanks to less.js for some of the basics here
568
- // <https://github.com/cloudhead/less.js/blob/master/lib/less/functions.js>
569
-
570
- function desaturate(color, amount) {
571
- amount = (amount === 0) ? 0 : (amount || 10);
572
- var hsl = tinycolor(color).toHsl();
573
- hsl.s -= amount / 100;
574
- hsl.s = clamp01(hsl.s);
575
- return tinycolor(hsl);
576
- }
577
-
578
- function saturate(color, amount) {
579
- amount = (amount === 0) ? 0 : (amount || 10);
580
- var hsl = tinycolor(color).toHsl();
581
- hsl.s += amount / 100;
582
- hsl.s = clamp01(hsl.s);
583
- return tinycolor(hsl);
584
- }
585
-
586
- function greyscale(color) {
587
- return tinycolor(color).desaturate(100);
588
- }
589
-
590
- function lighten (color, amount) {
591
- amount = (amount === 0) ? 0 : (amount || 10);
592
- var hsl = tinycolor(color).toHsl();
593
- hsl.l += amount / 100;
594
- hsl.l = clamp01(hsl.l);
595
- return tinycolor(hsl);
596
- }
597
-
598
- function brighten(color, amount) {
599
- amount = (amount === 0) ? 0 : (amount || 10);
600
- var rgb = tinycolor(color).toRgb();
601
- rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * - (amount / 100))));
602
- rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * - (amount / 100))));
603
- rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * - (amount / 100))));
604
- return tinycolor(rgb);
605
- }
606
-
607
- function darken (color, amount) {
608
- amount = (amount === 0) ? 0 : (amount || 10);
609
- var hsl = tinycolor(color).toHsl();
610
- hsl.l -= amount / 100;
611
- hsl.l = clamp01(hsl.l);
612
- return tinycolor(hsl);
613
- }
614
-
615
- // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
616
- // Values outside of this range will be wrapped into this range.
617
- function spin(color, amount) {
618
- var hsl = tinycolor(color).toHsl();
619
- var hue = (hsl.h + amount) % 360;
620
- hsl.h = hue < 0 ? 360 + hue : hue;
621
- return tinycolor(hsl);
622
- }
623
-
624
- // Combination Functions
625
- // ---------------------
626
- // Thanks to jQuery xColor for some of the ideas behind these
627
- // <https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js>
628
-
629
- function complement(color) {
630
- var hsl = tinycolor(color).toHsl();
631
- hsl.h = (hsl.h + 180) % 360;
632
- return tinycolor(hsl);
633
- }
634
-
635
- function triad(color) {
636
- var hsl = tinycolor(color).toHsl();
637
- var h = hsl.h;
638
- return [
639
- tinycolor(color),
640
- tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }),
641
- tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l })
642
- ];
643
- }
644
-
645
- function tetrad(color) {
646
- var hsl = tinycolor(color).toHsl();
647
- var h = hsl.h;
648
- return [
649
- tinycolor(color),
650
- tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }),
651
- tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }),
652
- tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l })
653
- ];
654
- }
655
-
656
- function splitcomplement(color) {
657
- var hsl = tinycolor(color).toHsl();
658
- var h = hsl.h;
659
- return [
660
- tinycolor(color),
661
- tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}),
662
- tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l})
663
- ];
664
- }
665
-
666
- function analogous(color, results, slices) {
667
- results = results || 6;
668
- slices = slices || 30;
669
-
670
- var hsl = tinycolor(color).toHsl();
671
- var part = 360 / slices;
672
- var ret = [tinycolor(color)];
673
-
674
- for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) {
675
- hsl.h = (hsl.h + part) % 360;
676
- ret.push(tinycolor(hsl));
677
- }
678
- return ret;
679
- }
680
-
681
- function monochromatic(color, results) {
682
- results = results || 6;
683
- var hsv = tinycolor(color).toHsv();
684
- var h = hsv.h, s = hsv.s, v = hsv.v;
685
- var ret = [];
686
- var modification = 1 / results;
687
-
688
- while (results--) {
689
- ret.push(tinycolor({ h: h, s: s, v: v}));
690
- v = (v + modification) % 1;
691
- }
692
-
693
- return ret;
694
- }
695
-
696
- // Utility Functions
697
- // ---------------------
698
-
699
- tinycolor.mix = function(color1, color2, amount) {
700
- amount = (amount === 0) ? 0 : (amount || 50);
701
-
702
- var rgb1 = tinycolor(color1).toRgb();
703
- var rgb2 = tinycolor(color2).toRgb();
704
-
705
- var p = amount / 100;
706
-
707
- var rgba = {
708
- r: ((rgb2.r - rgb1.r) * p) + rgb1.r,
709
- g: ((rgb2.g - rgb1.g) * p) + rgb1.g,
710
- b: ((rgb2.b - rgb1.b) * p) + rgb1.b,
711
- a: ((rgb2.a - rgb1.a) * p) + rgb1.a
712
- };
713
-
714
- return tinycolor(rgba);
715
- };
716
-
717
- // Readability Functions
718
- // ---------------------
719
- // <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)
720
-
721
- // contrast
722
- // Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)
723
- tinycolor.readability = function(color1, color2) {
724
- var c1 = tinycolor(color1);
725
- var c2 = tinycolor(color2);
726
- return (Math.max(c1.getLuminance(),c2.getLuminance())+0.05) / (Math.min(c1.getLuminance(),c2.getLuminance())+0.05);
727
- };
728
-
729
- // isReadable
730
- // Ensure that foreground and background color combinations meet WCAG2 guidelines.
731
- // The third argument is an optional Object.
732
- // the 'level' property states 'AA' or 'AAA' - if missing or invalid, it defaults to 'AA';
733
- // the 'size' property states 'large' or 'small' - if missing or invalid, it defaults to 'small'.
734
- // If the entire object is absent, isReadable defaults to {level:"AA",size:"small"}.
735
-
736
- // *Example*
737
- // tinycolor.isReadable("#000", "#111") => false
738
- // tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false
739
- tinycolor.isReadable = function(color1, color2, wcag2) {
740
- var readability = tinycolor.readability(color1, color2);
741
- var wcag2Parms, out;
742
-
743
- out = false;
744
-
745
- wcag2Parms = validateWCAG2Parms(wcag2);
746
- switch (wcag2Parms.level + wcag2Parms.size) {
747
- case "AAsmall":
748
- case "AAAlarge":
749
- out = readability >= 4.5;
750
- break;
751
- case "AAlarge":
752
- out = readability >= 3;
753
- break;
754
- case "AAAsmall":
755
- out = readability >= 7;
756
- break;
757
- }
758
- return out;
759
-
760
- };
761
-
762
- // mostReadable
763
- // Given a base color and a list of possible foreground or background
764
- // colors for that base, returns the most readable color.
765
- // Optionally returns Black or White if the most readable color is unreadable.
766
- // *Example*
767
- // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255"
768
- // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString(); // "#ffffff"
769
- // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3"
770
- // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff"
771
- tinycolor.mostReadable = function(baseColor, colorList, args) {
772
- var bestColor = null;
773
- var bestScore = 0;
774
- var readability;
775
- var includeFallbackColors, level, size ;
776
- args = args || {};
777
- includeFallbackColors = args.includeFallbackColors ;
778
- level = args.level;
779
- size = args.size;
780
-
781
- for (var i= 0; i < colorList.length ; i++) {
782
- readability = tinycolor.readability(baseColor, colorList[i]);
783
- if (readability > bestScore) {
784
- bestScore = readability;
785
- bestColor = tinycolor(colorList[i]);
786
- }
787
- }
788
-
789
- if (tinycolor.isReadable(baseColor, bestColor, {"level":level,"size":size}) || !includeFallbackColors) {
790
- return bestColor;
791
- }
792
- else {
793
- args.includeFallbackColors=false;
794
- return tinycolor.mostReadable(baseColor,["#fff", "#000"],args);
795
- }
796
- };
797
-
798
- // Big List of Colors
799
- // ------------------
800
- // <http://www.w3.org/TR/css3-color/#svg-color>
801
- var names = tinycolor.names = {
802
- aliceblue: "f0f8ff",
803
- antiquewhite: "faebd7",
804
- aqua: "0ff",
805
- aquamarine: "7fffd4",
806
- azure: "f0ffff",
807
- beige: "f5f5dc",
808
- bisque: "ffe4c4",
809
- black: "000",
810
- blanchedalmond: "ffebcd",
811
- blue: "00f",
812
- blueviolet: "8a2be2",
813
- brown: "a52a2a",
814
- burlywood: "deb887",
815
- burntsienna: "ea7e5d",
816
- cadetblue: "5f9ea0",
817
- chartreuse: "7fff00",
818
- chocolate: "d2691e",
819
- coral: "ff7f50",
820
- cornflowerblue: "6495ed",
821
- cornsilk: "fff8dc",
822
- crimson: "dc143c",
823
- cyan: "0ff",
824
- darkblue: "00008b",
825
- darkcyan: "008b8b",
826
- darkgoldenrod: "b8860b",
827
- darkgray: "a9a9a9",
828
- darkgreen: "006400",
829
- darkgrey: "a9a9a9",
830
- darkkhaki: "bdb76b",
831
- darkmagenta: "8b008b",
832
- darkolivegreen: "556b2f",
833
- darkorange: "ff8c00",
834
- darkorchid: "9932cc",
835
- darkred: "8b0000",
836
- darksalmon: "e9967a",
837
- darkseagreen: "8fbc8f",
838
- darkslateblue: "483d8b",
839
- darkslategray: "2f4f4f",
840
- darkslategrey: "2f4f4f",
841
- darkturquoise: "00ced1",
842
- darkviolet: "9400d3",
843
- deeppink: "ff1493",
844
- deepskyblue: "00bfff",
845
- dimgray: "696969",
846
- dimgrey: "696969",
847
- dodgerblue: "1e90ff",
848
- firebrick: "b22222",
849
- floralwhite: "fffaf0",
850
- forestgreen: "228b22",
851
- fuchsia: "f0f",
852
- gainsboro: "dcdcdc",
853
- ghostwhite: "f8f8ff",
854
- gold: "ffd700",
855
- goldenrod: "daa520",
856
- gray: "808080",
857
- green: "008000",
858
- greenyellow: "adff2f",
859
- grey: "808080",
860
- honeydew: "f0fff0",
861
- hotpink: "ff69b4",
862
- indianred: "cd5c5c",
863
- indigo: "4b0082",
864
- ivory: "fffff0",
865
- khaki: "f0e68c",
866
- lavender: "e6e6fa",
867
- lavenderblush: "fff0f5",
868
- lawngreen: "7cfc00",
869
- lemonchiffon: "fffacd",
870
- lightblue: "add8e6",
871
- lightcoral: "f08080",
872
- lightcyan: "e0ffff",
873
- lightgoldenrodyellow: "fafad2",
874
- lightgray: "d3d3d3",
875
- lightgreen: "90ee90",
876
- lightgrey: "d3d3d3",
877
- lightpink: "ffb6c1",
878
- lightsalmon: "ffa07a",
879
- lightseagreen: "20b2aa",
880
- lightskyblue: "87cefa",
881
- lightslategray: "789",
882
- lightslategrey: "789",
883
- lightsteelblue: "b0c4de",
884
- lightyellow: "ffffe0",
885
- lime: "0f0",
886
- limegreen: "32cd32",
887
- linen: "faf0e6",
888
- magenta: "f0f",
889
- maroon: "800000",
890
- mediumaquamarine: "66cdaa",
891
- mediumblue: "0000cd",
892
- mediumorchid: "ba55d3",
893
- mediumpurple: "9370db",
894
- mediumseagreen: "3cb371",
895
- mediumslateblue: "7b68ee",
896
- mediumspringgreen: "00fa9a",
897
- mediumturquoise: "48d1cc",
898
- mediumvioletred: "c71585",
899
- midnightblue: "191970",
900
- mintcream: "f5fffa",
901
- mistyrose: "ffe4e1",
902
- moccasin: "ffe4b5",
903
- navajowhite: "ffdead",
904
- navy: "000080",
905
- oldlace: "fdf5e6",
906
- olive: "808000",
907
- olivedrab: "6b8e23",
908
- orange: "ffa500",
909
- orangered: "ff4500",
910
- orchid: "da70d6",
911
- palegoldenrod: "eee8aa",
912
- palegreen: "98fb98",
913
- paleturquoise: "afeeee",
914
- palevioletred: "db7093",
915
- papayawhip: "ffefd5",
916
- peachpuff: "ffdab9",
917
- peru: "cd853f",
918
- pink: "ffc0cb",
919
- plum: "dda0dd",
920
- powderblue: "b0e0e6",
921
- purple: "800080",
922
- rebeccapurple: "663399",
923
- red: "f00",
924
- rosybrown: "bc8f8f",
925
- royalblue: "4169e1",
926
- saddlebrown: "8b4513",
927
- salmon: "fa8072",
928
- sandybrown: "f4a460",
929
- seagreen: "2e8b57",
930
- seashell: "fff5ee",
931
- sienna: "a0522d",
932
- silver: "c0c0c0",
933
- skyblue: "87ceeb",
934
- slateblue: "6a5acd",
935
- slategray: "708090",
936
- slategrey: "708090",
937
- snow: "fffafa",
938
- springgreen: "00ff7f",
939
- steelblue: "4682b4",
940
- tan: "d2b48c",
941
- teal: "008080",
942
- thistle: "d8bfd8",
943
- tomato: "ff6347",
944
- turquoise: "40e0d0",
945
- violet: "ee82ee",
946
- wheat: "f5deb3",
947
- white: "fff",
948
- whitesmoke: "f5f5f5",
949
- yellow: "ff0",
950
- yellowgreen: "9acd32"
951
- };
952
-
953
- // Make it easy to access colors via hexNames[hex]
954
- var hexNames = tinycolor.hexNames = flip(names);
955
-
956
- // Utilities
957
- // ---------
958
-
959
- // { 'name1': 'val1' } becomes { 'val1': 'name1' }
960
- function flip(o) {
961
- var flipped = { };
962
- for (var i in o) {
963
- if (o.hasOwnProperty(i)) {
964
- flipped[o[i]] = i;
965
- }
966
- }
967
- return flipped;
968
- }
969
-
970
- // Return a valid alpha value [0,1] with all invalid values being set to 1
971
- function boundAlpha(a) {
972
- a = parseFloat(a);
973
-
974
- if (isNaN(a) || a < 0 || a > 1) {
975
- a = 1;
976
- }
977
-
978
- return a;
979
- }
980
-
981
- // Take input from [0, n] and return it as [0, 1]
982
- function bound01(n, max) {
983
- if (isOnePointZero(n)) { n = "100%"; }
984
-
985
- var processPercent = isPercentage(n);
986
- n = mathMin(max, mathMax(0, parseFloat(n)));
987
-
988
- // Automatically convert percentage into number
989
- if (processPercent) {
990
- n = parseInt(n * max, 10) / 100;
991
- }
992
-
993
- // Handle floating point rounding errors
994
- if ((Math.abs(n - max) < 0.000001)) {
995
- return 1;
996
- }
997
-
998
- // Convert into [0, 1] range if it isn't already
999
- return (n % max) / parseFloat(max);
1000
- }
1001
-
1002
- // Force a number between 0 and 1
1003
- function clamp01(val) {
1004
- return mathMin(1, mathMax(0, val));
1005
- }
1006
-
1007
- // Parse a base-16 hex value into a base-10 integer
1008
- function parseIntFromHex(val) {
1009
- return parseInt(val, 16);
1010
- }
1011
-
1012
- // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
1013
- // <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
1014
- function isOnePointZero(n) {
1015
- return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1;
1016
- }
1017
-
1018
- // Check to see if string passed in is a percentage
1019
- function isPercentage(n) {
1020
- return typeof n === "string" && n.indexOf('%') != -1;
1021
- }
1022
-
1023
- // Force a hex value to have 2 characters
1024
- function pad2(c) {
1025
- return c.length == 1 ? '0' + c : '' + c;
1026
- }
1027
-
1028
- // Replace a decimal with it's percentage value
1029
- function convertToPercentage(n) {
1030
- if (n <= 1) {
1031
- n = (n * 100) + "%";
1032
- }
1033
-
1034
- return n;
1035
- }
1036
-
1037
- // Converts a decimal to a hex value
1038
- function convertDecimalToHex(d) {
1039
- return Math.round(parseFloat(d) * 255).toString(16);
1040
- }
1041
- // Converts a hex value to a decimal
1042
- function convertHexToDecimal(h) {
1043
- return (parseIntFromHex(h) / 255);
1044
- }
1045
-
1046
- var matchers = (function() {
1047
-
1048
- // <http://www.w3.org/TR/css3-values/#integers>
1049
- var CSS_INTEGER = "[-\\+]?\\d+%?";
1050
-
1051
- // <http://www.w3.org/TR/css3-values/#number-value>
1052
- var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
1053
-
1054
- // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
1055
- var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
1056
-
1057
- // Actual matching.
1058
- // Parentheses and commas are optional, but not required.
1059
- // Whitespace can take the place of commas or opening paren
1060
- var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
1061
- var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
1062
-
1063
- return {
1064
- CSS_UNIT: new RegExp(CSS_UNIT),
1065
- rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
1066
- rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
1067
- hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
1068
- hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
1069
- hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
1070
- hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
1071
- hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
1072
- hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
1073
- hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
1074
- hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
1075
- };
1076
- })();
1077
-
1078
- // isValidCSSUnit
1079
- // Take in a single string / number and check to see if it looks like a CSS unit
1080
- // (see matchers above for definition).
1081
- function isValidCSSUnit(color) {
1082
- return !!matchers.CSS_UNIT.exec(color);
1083
- }
1084
-
1085
- // stringInputToObject
1086
- // Permissive string parsing. Take in a number of formats, and output an object
1087
- // based on detected format. Returns { r, g, b } or { h, s, l } or { h, s, v}
1088
- function stringInputToObject(color) {
1089
-
1090
- color = color.replace(trimLeft, '').replace(trimRight, '').toLowerCase();
1091
- var named = false;
1092
- if (names[color]) {
1093
- color = names[color];
1094
- named = true;
1095
- }
1096
- else if (color == 'transparent') {
1097
- return { r: 0, g: 0, b: 0, a: 0, format: "name" };
1098
- }
1099
-
1100
- // Try to match string input using regular expressions.
1101
- // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]
1102
- // Just return an object and let the conversion functions handle that.
1103
- // This way the result will be the same whether the tinycolor is initialized with string or object.
1104
- var match;
1105
- if ((match = matchers.rgb.exec(color))) {
1106
- return { r: match[1], g: match[2], b: match[3] };
1107
- }
1108
- if ((match = matchers.rgba.exec(color))) {
1109
- return { r: match[1], g: match[2], b: match[3], a: match[4] };
1110
- }
1111
- if ((match = matchers.hsl.exec(color))) {
1112
- return { h: match[1], s: match[2], l: match[3] };
1113
- }
1114
- if ((match = matchers.hsla.exec(color))) {
1115
- return { h: match[1], s: match[2], l: match[3], a: match[4] };
1116
- }
1117
- if ((match = matchers.hsv.exec(color))) {
1118
- return { h: match[1], s: match[2], v: match[3] };
1119
- }
1120
- if ((match = matchers.hsva.exec(color))) {
1121
- return { h: match[1], s: match[2], v: match[3], a: match[4] };
1122
- }
1123
- if ((match = matchers.hex8.exec(color))) {
1124
- return {
1125
- r: parseIntFromHex(match[1]),
1126
- g: parseIntFromHex(match[2]),
1127
- b: parseIntFromHex(match[3]),
1128
- a: convertHexToDecimal(match[4]),
1129
- format: named ? "name" : "hex8"
1130
- };
1131
- }
1132
- if ((match = matchers.hex6.exec(color))) {
1133
- return {
1134
- r: parseIntFromHex(match[1]),
1135
- g: parseIntFromHex(match[2]),
1136
- b: parseIntFromHex(match[3]),
1137
- format: named ? "name" : "hex"
1138
- };
1139
- }
1140
- if ((match = matchers.hex4.exec(color))) {
1141
- return {
1142
- r: parseIntFromHex(match[1] + '' + match[1]),
1143
- g: parseIntFromHex(match[2] + '' + match[2]),
1144
- b: parseIntFromHex(match[3] + '' + match[3]),
1145
- a: convertHexToDecimal(match[4] + '' + match[4]),
1146
- format: named ? "name" : "hex8"
1147
- };
1148
- }
1149
- if ((match = matchers.hex3.exec(color))) {
1150
- return {
1151
- r: parseIntFromHex(match[1] + '' + match[1]),
1152
- g: parseIntFromHex(match[2] + '' + match[2]),
1153
- b: parseIntFromHex(match[3] + '' + match[3]),
1154
- format: named ? "name" : "hex"
1155
- };
1156
- }
1157
-
1158
- return false;
1159
- }
1160
-
1161
- function validateWCAG2Parms(parms) {
1162
- // return valid WCAG2 parms for isReadable.
1163
- // If input parms are invalid, return {"level":"AA", "size":"small"}
1164
- var level, size;
1165
- parms = parms || {"level":"AA", "size":"small"};
1166
- level = (parms.level || "AA").toUpperCase();
1167
- size = (parms.size || "small").toLowerCase();
1168
- if (level !== "AA" && level !== "AAA") {
1169
- level = "AA";
1170
- }
1171
- if (size !== "small" && size !== "large") {
1172
- size = "small";
1173
- }
1174
- return {"level":level, "size":size};
1175
- }
1176
-
1177
- this.tinycolor = tinycolor;
1178
-
1179
- })()`;
1180
- }
1181
- // It is hacky way to make this function will be compiled preferentially by less
1182
- // resolve error: `ReferenceError: colorPalette is not defined`
1183
- // https://github.com/ant-design/ant-motion/issues/44
1184
- .tinyColorMixin();