@aloudata/aloudata-design 2.19.5 → 3.0.0-beta.2

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 (1047) hide show
  1. package/dist/AMenu/index.d.ts +34 -3
  2. package/dist/AMenu/index.js +53 -2
  3. package/dist/AMenu/index.js.map +1 -0
  4. package/dist/AProgress/index.d.ts +17 -2
  5. package/dist/AProgress/index.js +82 -2
  6. package/dist/AProgress/index.js.map +1 -0
  7. package/dist/Alert/index.d.ts +16 -3
  8. package/dist/Alert/index.js +91 -2
  9. package/dist/Alert/index.js.map +1 -0
  10. package/dist/App/index.d.ts +6 -2
  11. package/dist/App/index.js +22 -31
  12. package/dist/App/index.js.map +1 -0
  13. package/dist/Avatar/component/Avatar/helper.d.ts +1 -1
  14. package/dist/Avatar/component/Avatar/helper.js +49 -82
  15. package/dist/Avatar/component/Avatar/helper.js.map +1 -0
  16. package/dist/Avatar/component/Avatar/index.d.ts +7 -69
  17. package/dist/Avatar/component/Avatar/index.js +71 -66
  18. package/dist/Avatar/component/Avatar/index.js.map +1 -0
  19. package/dist/Avatar/component/Avatar/type.d.ts +10 -1
  20. package/dist/Avatar/component/Avatar/type.js +19 -15
  21. package/dist/Avatar/component/Avatar/type.js.map +1 -0
  22. package/dist/Avatar/index.d.ts +14 -1
  23. package/dist/Avatar/index.js +32 -4
  24. package/dist/Avatar/index.js.map +1 -0
  25. package/dist/Badge/index.d.ts +2 -2
  26. package/dist/Badge/index.js +46 -24
  27. package/dist/Badge/index.js.map +1 -0
  28. package/dist/Breadcrumb/index.d.ts +20 -4
  29. package/dist/Breadcrumb/index.js +62 -31
  30. package/dist/Breadcrumb/index.js.map +1 -0
  31. package/dist/Button/index.d.ts +17 -39
  32. package/dist/Button/index.js +175 -94
  33. package/dist/Button/index.js.map +1 -0
  34. package/dist/Card/index.d.ts +35 -2
  35. package/dist/Card/index.js +72 -2
  36. package/dist/Card/index.js.map +1 -0
  37. package/dist/Carousel/index.d.ts +34 -3
  38. package/dist/Carousel/index.js +103 -2
  39. package/dist/Carousel/index.js.map +1 -0
  40. package/dist/Checkbox/component/CheckboxGroup/index.d.ts +1 -4
  41. package/dist/Checkbox/component/CheckboxGroup/index.js +2 -22
  42. package/dist/Checkbox/index.d.ts +6 -6
  43. package/dist/Checkbox/index.js +110 -37
  44. package/dist/Checkbox/index.js.map +1 -0
  45. package/dist/Checkbox/type.d.ts +24 -83
  46. package/dist/Checkbox/type.js +2 -5
  47. package/dist/Col/index.d.ts +21 -3
  48. package/dist/Col/index.js +111 -2
  49. package/dist/Col/index.js.map +1 -0
  50. package/dist/Collapse/index.d.ts +42 -5
  51. package/dist/Collapse/index.js +130 -19
  52. package/dist/Collapse/index.js.map +1 -0
  53. package/dist/ColorPicker/ComplexColorPicker/ColorAlphaInput.d.ts +2 -2
  54. package/dist/ColorPicker/ComplexColorPicker/ColorAlphaInput.js +29 -42
  55. package/dist/ColorPicker/ComplexColorPicker/ColorAlphaInput.js.map +1 -0
  56. package/dist/ColorPicker/ComplexColorPicker/ColorHexInput.d.ts +2 -2
  57. package/dist/ColorPicker/ComplexColorPicker/ColorHexInput.js +29 -44
  58. package/dist/ColorPicker/ComplexColorPicker/ColorHexInput.js.map +1 -0
  59. package/dist/ColorPicker/ComplexColorPicker/ColorHsbInput.d.ts +2 -2
  60. package/dist/ColorPicker/ComplexColorPicker/ColorHsbInput.js +54 -72
  61. package/dist/ColorPicker/ComplexColorPicker/ColorHsbInput.js.map +1 -0
  62. package/dist/ColorPicker/ComplexColorPicker/ColorInput.d.ts +3 -3
  63. package/dist/ColorPicker/ComplexColorPicker/ColorInput.js +74 -74
  64. package/dist/ColorPicker/ComplexColorPicker/ColorInput.js.map +1 -0
  65. package/dist/ColorPicker/ComplexColorPicker/ColorRgbInput.d.ts +2 -2
  66. package/dist/ColorPicker/ComplexColorPicker/ColorRgbInput.js +51 -63
  67. package/dist/ColorPicker/ComplexColorPicker/ColorRgbInput.js.map +1 -0
  68. package/dist/ColorPicker/ComplexColorPicker/ColorSteppers.d.ts +2 -3
  69. package/dist/ColorPicker/ComplexColorPicker/ColorSteppers.js +27 -44
  70. package/dist/ColorPicker/ComplexColorPicker/ColorSteppers.js.map +1 -0
  71. package/dist/ColorPicker/ComplexColorPicker/index.d.ts +1 -2
  72. package/dist/ColorPicker/ComplexColorPicker/index.js +72 -89
  73. package/dist/ColorPicker/ComplexColorPicker/index.js.map +1 -0
  74. package/dist/ColorPicker/color.d.ts +2 -2
  75. package/dist/ColorPicker/color.js +72 -125
  76. package/dist/ColorPicker/color.js.map +1 -0
  77. package/dist/ColorPicker/constant.js +47 -3
  78. package/dist/ColorPicker/constant.js.map +1 -0
  79. package/dist/ColorPicker/hooks/useColor.d.ts +2 -2
  80. package/dist/ColorPicker/hooks/useColor.js +21 -31
  81. package/dist/ColorPicker/hooks/useColor.js.map +1 -0
  82. package/dist/ColorPicker/index.d.ts +3 -3
  83. package/dist/ColorPicker/index.js +159 -204
  84. package/dist/ColorPicker/index.js.map +1 -0
  85. package/dist/ColorPicker/interface.d.ts +8 -5
  86. package/dist/ColorPicker/interface.js +9 -6
  87. package/dist/ColorPicker/interface.js.map +1 -0
  88. package/dist/ColorPicker/util.d.ts +3 -3
  89. package/dist/ColorPicker/util.js +20 -61
  90. package/dist/ColorPicker/util.js.map +1 -0
  91. package/dist/ConfigProvider/DisabledContext.d.ts +3 -0
  92. package/dist/ConfigProvider/DisabledContext.js +7 -0
  93. package/dist/ConfigProvider/DisabledContext.js.map +1 -0
  94. package/dist/ConfigProvider/getUserList.d.ts +1 -1
  95. package/dist/ConfigProvider/getUserList.js +12 -24
  96. package/dist/ConfigProvider/getUserList.js.map +1 -0
  97. package/dist/ConfigProvider/hooks/useGetUserList.d.ts +4 -4
  98. package/dist/ConfigProvider/hooks/useGetUserList.js +14 -14
  99. package/dist/ConfigProvider/hooks/useGetUserList.js.map +1 -0
  100. package/dist/ConfigProvider/index.d.ts +33 -13
  101. package/dist/ConfigProvider/index.js +34 -44
  102. package/dist/ConfigProvider/index.js.map +1 -0
  103. package/dist/ConfigProvider/sizeContext.js +12 -12
  104. package/dist/ConfigProvider/sizeContext.js.map +1 -0
  105. package/dist/DataPreviewTable/components/Body/Cell.d.ts +3 -3
  106. package/dist/DataPreviewTable/components/Body/Cell.js +35 -37
  107. package/dist/DataPreviewTable/components/Body/Cell.js.map +1 -0
  108. package/dist/DataPreviewTable/components/Body/Error.d.ts +2 -2
  109. package/dist/DataPreviewTable/components/Body/Error.js +21 -19
  110. package/dist/DataPreviewTable/components/Body/Error.js.map +1 -0
  111. package/dist/DataPreviewTable/components/Body/index.d.ts +2 -2
  112. package/dist/DataPreviewTable/components/Body/index.js +37 -51
  113. package/dist/DataPreviewTable/components/Body/index.js.map +1 -0
  114. package/dist/DataPreviewTable/components/DragBar/Mask.d.ts +1 -2
  115. package/dist/DataPreviewTable/components/DragBar/Mask.js +31 -29
  116. package/dist/DataPreviewTable/components/DragBar/Mask.js.map +1 -0
  117. package/dist/DataPreviewTable/components/DragBar/index.d.ts +2 -2
  118. package/dist/DataPreviewTable/components/DragBar/index.js +58 -76
  119. package/dist/DataPreviewTable/components/DragBar/index.js.map +1 -0
  120. package/dist/DataPreviewTable/components/Header/index.d.ts +1 -2
  121. package/dist/DataPreviewTable/components/Header/index.js +43 -50
  122. package/dist/DataPreviewTable/components/Header/index.js.map +1 -0
  123. package/dist/DataPreviewTable/constant.js +2 -6
  124. package/dist/DataPreviewTable/constant.js.map +1 -0
  125. package/dist/DataPreviewTable/hooks/useDirection.js +164 -215
  126. package/dist/DataPreviewTable/hooks/useDirection.js.map +1 -0
  127. package/dist/DataPreviewTable/index.d.ts +2 -2
  128. package/dist/DataPreviewTable/index.js +105 -131
  129. package/dist/DataPreviewTable/index.js.map +1 -0
  130. package/dist/DataPreviewTable/interface.d.ts +1 -1
  131. package/dist/DataPreviewTable/interface.js +14 -9
  132. package/dist/DataPreviewTable/interface.js.map +1 -0
  133. package/dist/DataPreviewTable/utils/findRange.js +41 -63
  134. package/dist/DataPreviewTable/utils/findRange.js.map +1 -0
  135. package/dist/DataPreviewTable/utils/getColumnOffsetsFromWidths.js +13 -8
  136. package/dist/DataPreviewTable/utils/getColumnOffsetsFromWidths.js.map +1 -0
  137. package/dist/DataPreviewTable/utils/getColumnRange.js +11 -21
  138. package/dist/DataPreviewTable/utils/getColumnRange.js.map +1 -0
  139. package/dist/DataPreviewTable/utils/getRowRange.js +15 -22
  140. package/dist/DataPreviewTable/utils/getRowRange.js.map +1 -0
  141. package/dist/DataPreviewTable/utils/getTableLayout.js +19 -17
  142. package/dist/DataPreviewTable/utils/getTableLayout.js.map +1 -0
  143. package/dist/DatePicker/index.d.ts +39 -67
  144. package/dist/DatePicker/index.js +77 -206
  145. package/dist/DatePicker/index.js.map +1 -0
  146. package/dist/Divider/index.d.ts +1 -2
  147. package/dist/Divider/index.js +34 -19
  148. package/dist/Divider/index.js.map +1 -0
  149. package/dist/DoubleCircleIcon/index.d.ts +6 -7
  150. package/dist/DoubleCircleIcon/index.js +2 -34
  151. package/dist/Drawer/index.d.ts +27 -3
  152. package/dist/Drawer/index.js +93 -2
  153. package/dist/Drawer/index.js.map +1 -0
  154. package/dist/Dropdown/index.d.ts +4 -5
  155. package/dist/Dropdown/index.js +145 -189
  156. package/dist/Dropdown/index.js.map +1 -0
  157. package/dist/Empty/image/Data.d.ts +1 -2
  158. package/dist/Empty/image/Data.js +267 -219
  159. package/dist/Empty/image/Data.js.map +1 -0
  160. package/dist/Empty/image/Search.d.ts +1 -2
  161. package/dist/Empty/image/Search.js +15 -10
  162. package/dist/Empty/image/Search.js.map +1 -0
  163. package/dist/Empty/image/SearchSmall.d.ts +1 -2
  164. package/dist/Empty/image/SearchSmall.js +34 -27
  165. package/dist/Empty/image/SearchSmall.js.map +1 -0
  166. package/dist/Empty/image/User.d.ts +1 -2
  167. package/dist/Empty/image/User.js +249 -196
  168. package/dist/Empty/image/User.js.map +1 -0
  169. package/dist/Empty/image/WorkBook.d.ts +1 -2
  170. package/dist/Empty/image/WorkBook.js +246 -202
  171. package/dist/Empty/image/WorkBook.js.map +1 -0
  172. package/dist/Empty/index.js +62 -70
  173. package/dist/Empty/index.js.map +1 -0
  174. package/dist/Form/FormItemContext.d.ts +27 -0
  175. package/dist/Form/FormItemContext.js +8 -0
  176. package/dist/Form/FormItemContext.js.map +1 -0
  177. package/dist/Form/hooks/useFormItemStatus.d.ts +6 -0
  178. package/dist/Form/hooks/useFormItemStatus.js +2 -0
  179. package/dist/Form/index.d.ts +95 -19
  180. package/dist/Form/index.js +257 -60
  181. package/dist/Form/index.js.map +1 -0
  182. package/dist/HighlightText/index.d.ts +2 -2
  183. package/dist/HighlightText/index.js +27 -28
  184. package/dist/HighlightText/index.js.map +1 -0
  185. package/dist/Icon/components/AlertTriangleDuotone.d.ts +1 -1
  186. package/dist/Icon/components/AlertTriangleDuotone.js +35 -35
  187. package/dist/Icon/components/AlertTriangleDuotone.js.map +1 -0
  188. package/dist/Icon/components/AlertTriangleLine.d.ts +1 -1
  189. package/dist/Icon/components/AlertTriangleLine.js +35 -35
  190. package/dist/Icon/components/AlertTriangleLine.js.map +1 -0
  191. package/dist/Icon/components/ArrowDownFill.d.ts +1 -1
  192. package/dist/Icon/components/ArrowDownFill.js +35 -35
  193. package/dist/Icon/components/ArrowDownFill.js.map +1 -0
  194. package/dist/Icon/components/ArrowDownLightLine.d.ts +1 -1
  195. package/dist/Icon/components/ArrowDownLightLine.js +35 -35
  196. package/dist/Icon/components/ArrowDownLightLine.js.map +1 -0
  197. package/dist/Icon/components/ArrowDownRightFill.js +35 -35
  198. package/dist/Icon/components/ArrowDownRightFill.js.map +1 -0
  199. package/dist/Icon/components/ArrowRightLightLine.d.ts +1 -1
  200. package/dist/Icon/components/ArrowRightLightLine.js +35 -35
  201. package/dist/Icon/components/ArrowRightLightLine.js.map +1 -0
  202. package/dist/Icon/components/AttentionCircleFill.d.ts +1 -1
  203. package/dist/Icon/components/AttentionCircleFill.js +35 -35
  204. package/dist/Icon/components/AttentionCircleFill.js.map +1 -0
  205. package/dist/Icon/components/AttentionTriangleFill.d.ts +1 -1
  206. package/dist/Icon/components/AttentionTriangleFill.js +35 -35
  207. package/dist/Icon/components/AttentionTriangleFill.js.map +1 -0
  208. package/dist/Icon/components/AttentionTriangleLightLine.d.ts +1 -1
  209. package/dist/Icon/components/AttentionTriangleLightLine.js +35 -35
  210. package/dist/Icon/components/AttentionTriangleLightLine.js.map +1 -0
  211. package/dist/Icon/components/CancelCircleDuotone.d.ts +1 -1
  212. package/dist/Icon/components/CancelCircleDuotone.js +39 -38
  213. package/dist/Icon/components/CancelCircleDuotone.js.map +1 -0
  214. package/dist/Icon/components/CancelledCircleFill.js +35 -35
  215. package/dist/Icon/components/CancelledCircleFill.js.map +1 -0
  216. package/dist/Icon/components/CheckCircleDuotone.d.ts +1 -1
  217. package/dist/Icon/components/CheckCircleDuotone.js +39 -38
  218. package/dist/Icon/components/CheckCircleDuotone.js.map +1 -0
  219. package/dist/Icon/components/CheckCircleFill.d.ts +1 -1
  220. package/dist/Icon/components/CheckCircleFill.js +35 -35
  221. package/dist/Icon/components/CheckCircleFill.js.map +1 -0
  222. package/dist/Icon/components/CheckCircleLightLine.d.ts +1 -1
  223. package/dist/Icon/components/CheckCircleLightLine.js +37 -38
  224. package/dist/Icon/components/CheckCircleLightLine.js.map +1 -0
  225. package/dist/Icon/components/CheckLightLine.d.ts +1 -1
  226. package/dist/Icon/components/CheckLightLine.js +35 -35
  227. package/dist/Icon/components/CheckLightLine.js.map +1 -0
  228. package/dist/Icon/components/ChevronDownLine.d.ts +1 -1
  229. package/dist/Icon/components/ChevronDownLine.js +35 -35
  230. package/dist/Icon/components/ChevronDownLine.js.map +1 -0
  231. package/dist/Icon/components/ChevronLeftLine.d.ts +1 -1
  232. package/dist/Icon/components/ChevronLeftLine.js +35 -35
  233. package/dist/Icon/components/ChevronLeftLine.js.map +1 -0
  234. package/dist/Icon/components/ChevronRightLine.d.ts +1 -1
  235. package/dist/Icon/components/ChevronRightLine.js +35 -35
  236. package/dist/Icon/components/ChevronRightLine.js.map +1 -0
  237. package/dist/Icon/components/CircleLightLine.d.ts +1 -1
  238. package/dist/Icon/components/CircleLightLine.js +37 -38
  239. package/dist/Icon/components/CircleLightLine.js.map +1 -0
  240. package/dist/Icon/components/CloseCircleFill.d.ts +1 -1
  241. package/dist/Icon/components/CloseCircleFill.js +35 -35
  242. package/dist/Icon/components/CloseCircleFill.js.map +1 -0
  243. package/dist/Icon/components/CloseCircleLightLine.d.ts +1 -1
  244. package/dist/Icon/components/CloseCircleLightLine.js +35 -35
  245. package/dist/Icon/components/CloseCircleLightLine.js.map +1 -0
  246. package/dist/Icon/components/CloseCircleRightFill.js +35 -35
  247. package/dist/Icon/components/CloseCircleRightFill.js.map +1 -0
  248. package/dist/Icon/components/CloseLLine.d.ts +1 -1
  249. package/dist/Icon/components/CloseLLine.js +35 -35
  250. package/dist/Icon/components/CloseLLine.js.map +1 -0
  251. package/dist/Icon/components/CloseLightLine.d.ts +1 -1
  252. package/dist/Icon/components/CloseLightLine.js +35 -35
  253. package/dist/Icon/components/CloseLightLine.js.map +1 -0
  254. package/dist/Icon/components/CloseMLine.d.ts +1 -1
  255. package/dist/Icon/components/CloseMLine.js +35 -35
  256. package/dist/Icon/components/CloseMLine.js.map +1 -0
  257. package/dist/Icon/components/DangerFill.d.ts +1 -1
  258. package/dist/Icon/components/DangerFill.js +35 -35
  259. package/dist/Icon/components/DangerFill.js.map +1 -0
  260. package/dist/Icon/components/DragLightLine.d.ts +1 -1
  261. package/dist/Icon/components/DragLightLine.js +35 -35
  262. package/dist/Icon/components/DragLightLine.js.map +1 -0
  263. package/dist/Icon/components/DragLine.d.ts +1 -1
  264. package/dist/Icon/components/DragLine.js +35 -35
  265. package/dist/Icon/components/DragLine.js.map +1 -0
  266. package/dist/Icon/components/Ellipsis.js +35 -35
  267. package/dist/Icon/components/Ellipsis.js.map +1 -0
  268. package/dist/Icon/components/EyeOffLine.d.ts +1 -1
  269. package/dist/Icon/components/EyeOffLine.js +35 -35
  270. package/dist/Icon/components/EyeOffLine.js.map +1 -0
  271. package/dist/Icon/components/EyeOnLine.d.ts +1 -1
  272. package/dist/Icon/components/EyeOnLine.js +45 -42
  273. package/dist/Icon/components/EyeOnLine.js.map +1 -0
  274. package/dist/Icon/components/FoldDownFill.d.ts +1 -1
  275. package/dist/Icon/components/FoldDownFill.js +36 -38
  276. package/dist/Icon/components/FoldDownFill.js.map +1 -0
  277. package/dist/Icon/components/FoldUpFill.d.ts +1 -1
  278. package/dist/Icon/components/FoldUpFill.js +36 -38
  279. package/dist/Icon/components/FoldUpFill.js.map +1 -0
  280. package/dist/Icon/components/InProgressFill.js +37 -38
  281. package/dist/Icon/components/InProgressFill.js.map +1 -0
  282. package/dist/Icon/components/InfoCircleDuotone.d.ts +1 -1
  283. package/dist/Icon/components/InfoCircleDuotone.js +35 -35
  284. package/dist/Icon/components/InfoCircleDuotone.js.map +1 -0
  285. package/dist/Icon/components/InfoCircleLine.d.ts +1 -1
  286. package/dist/Icon/components/InfoCircleLine.js +35 -35
  287. package/dist/Icon/components/InfoCircleLine.js.map +1 -0
  288. package/dist/Icon/components/InformationCircleFill.d.ts +1 -1
  289. package/dist/Icon/components/InformationCircleFill.js +35 -35
  290. package/dist/Icon/components/InformationCircleFill.js.map +1 -0
  291. package/dist/Icon/components/InformationCircleLightLine.d.ts +1 -1
  292. package/dist/Icon/components/InformationCircleLightLine.js +37 -38
  293. package/dist/Icon/components/InformationCircleLightLine.js.map +1 -0
  294. package/dist/Icon/components/Loading2Line.d.ts +1 -1
  295. package/dist/Icon/components/Loading2Line.js +35 -35
  296. package/dist/Icon/components/Loading2Line.js.map +1 -0
  297. package/dist/Icon/components/LoadingDuotone.js +38 -39
  298. package/dist/Icon/components/LoadingDuotone.js.map +1 -0
  299. package/dist/Icon/components/LoadingLine.d.ts +1 -1
  300. package/dist/Icon/components/LoadingLine.js +35 -35
  301. package/dist/Icon/components/LoadingLine.js.map +1 -0
  302. package/dist/Icon/components/MoreVerticalLine.d.ts +1 -1
  303. package/dist/Icon/components/MoreVerticalLine.js +35 -35
  304. package/dist/Icon/components/MoreVerticalLine.js.map +1 -0
  305. package/dist/Icon/components/SearchLine.d.ts +1 -1
  306. package/dist/Icon/components/SearchLine.js +35 -35
  307. package/dist/Icon/components/SearchLine.js.map +1 -0
  308. package/dist/Icon/components/SignLightLine.d.ts +1 -1
  309. package/dist/Icon/components/SignLightLine.js +35 -35
  310. package/dist/Icon/components/SignLightLine.js.map +1 -0
  311. package/dist/Icon/components/SortAscendingOrderColor.js +37 -36
  312. package/dist/Icon/components/SortAscendingOrderColor.js.map +1 -0
  313. package/dist/Icon/components/SortColor.js +33 -33
  314. package/dist/Icon/components/SortColor.js.map +1 -0
  315. package/dist/Icon/components/SortDescendingOrderColor.js +37 -36
  316. package/dist/Icon/components/SortDescendingOrderColor.js.map +1 -0
  317. package/dist/Icon/components/TimesLightLine.d.ts +1 -1
  318. package/dist/Icon/components/TimesLightLine.js +35 -35
  319. package/dist/Icon/components/TimesLightLine.js.map +1 -0
  320. package/dist/Icon/components/TrashLightLine.d.ts +1 -1
  321. package/dist/Icon/components/TrashLightLine.js +37 -38
  322. package/dist/Icon/components/TrashLightLine.js.map +1 -0
  323. package/dist/Icon/components/TriangleLightLine.d.ts +1 -1
  324. package/dist/Icon/components/TriangleLightLine.js +35 -35
  325. package/dist/Icon/components/TriangleLightLine.js.map +1 -0
  326. package/dist/Icon/components/User.d.ts +1 -1
  327. package/dist/Icon/components/User.js +42 -41
  328. package/dist/Icon/components/User.js.map +1 -0
  329. package/dist/Icon/components/UserGroup.d.ts +1 -1
  330. package/dist/Icon/components/UserGroup.js +40 -39
  331. package/dist/Icon/components/UserGroup.js.map +1 -0
  332. package/dist/Icon/components/createFromScripts.js +2 -29
  333. package/dist/Icon/index.d.ts +52 -52
  334. package/dist/Icon/index.js +52 -52
  335. package/dist/IconButton/index.d.ts +1 -1
  336. package/dist/IconButton/index.js +92 -106
  337. package/dist/IconButton/index.js.map +1 -0
  338. package/dist/Input/components/Input/index.d.ts +19 -53
  339. package/dist/Input/components/Input/index.js +115 -62
  340. package/dist/Input/components/Input/index.js.map +1 -0
  341. package/dist/Input/components/Password/index.d.ts +4 -13
  342. package/dist/Input/components/Password/index.js +34 -37
  343. package/dist/Input/components/Password/index.js.map +1 -0
  344. package/dist/Input/components/TextArea/index.d.ts +16 -44
  345. package/dist/Input/components/TextArea/index.js +78 -44
  346. package/dist/Input/components/TextArea/index.js.map +1 -0
  347. package/dist/Input/index.d.ts +6 -7
  348. package/dist/Input/index.js +11 -7
  349. package/dist/Input/index.js.map +1 -0
  350. package/dist/InputNumber/index.d.ts +2 -3
  351. package/dist/InputNumber/index.js +123 -44
  352. package/dist/InputNumber/index.js.map +1 -0
  353. package/dist/InputNumber/type.d.ts +7 -126
  354. package/dist/InputNumber/type.js +2 -1
  355. package/dist/InputSearch/index.d.ts +3 -2
  356. package/dist/InputSearch/index.js +107 -154
  357. package/dist/InputSearch/index.js.map +1 -0
  358. package/dist/Layout/index.d.ts +28 -3
  359. package/dist/Layout/index.js +74 -2
  360. package/dist/Layout/index.js.map +1 -0
  361. package/dist/List/Item.d.ts +1 -1
  362. package/dist/List/Item.js +56 -73
  363. package/dist/List/Item.js.map +1 -0
  364. package/dist/List/index.d.ts +2 -2
  365. package/dist/List/index.js +93 -129
  366. package/dist/List/index.js.map +1 -0
  367. package/dist/LogicTree/DisplayLogicTree.d.ts +3 -3
  368. package/dist/LogicTree/DisplayLogicTree.js +16 -14
  369. package/dist/LogicTree/DisplayLogicTree.js.map +1 -0
  370. package/dist/LogicTree/components/DisplayLogicItem/index.d.ts +2 -2
  371. package/dist/LogicTree/components/DisplayLogicItem/index.js +69 -85
  372. package/dist/LogicTree/components/DisplayLogicItem/index.js.map +1 -0
  373. package/dist/LogicTree/components/LogicItem/index.d.ts +1 -2
  374. package/dist/LogicTree/components/LogicItem/index.js +296 -388
  375. package/dist/LogicTree/components/LogicItem/index.js.map +1 -0
  376. package/dist/LogicTree/helper.d.ts +1 -1
  377. package/dist/LogicTree/helper.js +119 -182
  378. package/dist/LogicTree/helper.js.map +1 -0
  379. package/dist/LogicTree/index.d.ts +5 -6
  380. package/dist/LogicTree/index.js +100 -143
  381. package/dist/LogicTree/index.js.map +1 -0
  382. package/dist/LogicTree/type.js +14 -9
  383. package/dist/LogicTree/type.js.map +1 -0
  384. package/dist/MemberPicker/components/MemberSelection.d.ts +2 -2
  385. package/dist/MemberPicker/components/MemberSelection.js +138 -169
  386. package/dist/MemberPicker/components/MemberSelection.js.map +1 -0
  387. package/dist/MemberPicker/components/MultipleOption.d.ts +1 -2
  388. package/dist/MemberPicker/components/MultipleOption.js +66 -70
  389. package/dist/MemberPicker/components/MultipleOption.js.map +1 -0
  390. package/dist/MemberPicker/components/NickLabel.d.ts +1 -1
  391. package/dist/MemberPicker/components/NickLabel.js +25 -23
  392. package/dist/MemberPicker/components/NickLabel.js.map +1 -0
  393. package/dist/MemberPicker/components/Panel.d.ts +2 -2
  394. package/dist/MemberPicker/components/Panel.js +158 -192
  395. package/dist/MemberPicker/components/Panel.js.map +1 -0
  396. package/dist/MemberPicker/components/PanelWrapper.d.ts +3 -3
  397. package/dist/MemberPicker/components/PanelWrapper.js +99 -151
  398. package/dist/MemberPicker/components/PanelWrapper.js.map +1 -0
  399. package/dist/MemberPicker/components/SelectedMemberTags.d.ts +2 -2
  400. package/dist/MemberPicker/components/SelectedMemberTags.js +81 -82
  401. package/dist/MemberPicker/components/SelectedMemberTags.js.map +1 -0
  402. package/dist/MemberPicker/components/SelectorFooter.d.ts +2 -2
  403. package/dist/MemberPicker/components/SelectorFooter.js +36 -43
  404. package/dist/MemberPicker/components/SelectorFooter.js.map +1 -0
  405. package/dist/MemberPicker/components/SingleOption.d.ts +1 -2
  406. package/dist/MemberPicker/components/SingleOption.js +62 -66
  407. package/dist/MemberPicker/components/SingleOption.js.map +1 -0
  408. package/dist/MemberPicker/components/UserGroupSelection.d.ts +2 -2
  409. package/dist/MemberPicker/components/UserGroupSelection.js +163 -229
  410. package/dist/MemberPicker/components/UserGroupSelection.js.map +1 -0
  411. package/dist/MemberPicker/index.d.ts +3 -3
  412. package/dist/MemberPicker/index.js +279 -380
  413. package/dist/MemberPicker/index.js.map +1 -0
  414. package/dist/MemberPicker/interface.d.ts +2 -2
  415. package/dist/MemberPicker/interface.js +11 -6
  416. package/dist/MemberPicker/interface.js.map +1 -0
  417. package/dist/MemberPicker/tests/mockPort.js +2 -147
  418. package/dist/MemberPicker/utils/getUsersWithUserId.js +10 -23
  419. package/dist/MemberPicker/utils/getUsersWithUserId.js.map +1 -0
  420. package/dist/MemberPicker/utils/index.d.ts +1 -2
  421. package/dist/MemberPicker/utils/index.js +18 -14
  422. package/dist/MemberPicker/utils/index.js.map +1 -0
  423. package/dist/Menu/index.d.ts +2 -2
  424. package/dist/Menu/index.js +113 -125
  425. package/dist/Menu/index.js.map +1 -0
  426. package/dist/Modal/index.d.ts +69 -25
  427. package/dist/Modal/index.js +329 -339
  428. package/dist/Modal/index.js.map +1 -0
  429. package/dist/OverflowCount/index.d.ts +2 -17
  430. package/dist/OverflowCount/index.js +88 -75
  431. package/dist/OverflowCount/index.js.map +1 -0
  432. package/dist/Pagination/PageSizeChanger.d.ts +1 -1
  433. package/dist/Pagination/PageSizeChanger.js +30 -49
  434. package/dist/Pagination/PageSizeChanger.js.map +1 -0
  435. package/dist/Pagination/index.d.ts +2 -3
  436. package/dist/Pagination/index.js +144 -196
  437. package/dist/Pagination/index.js.map +1 -0
  438. package/dist/Pagination/types.js +2 -1
  439. package/dist/Popconfirm/index.d.ts +17 -5
  440. package/dist/Popconfirm/index.js +100 -50
  441. package/dist/Popconfirm/index.js.map +1 -0
  442. package/dist/Popover/index.d.ts +22 -4
  443. package/dist/Popover/index.js +92 -17
  444. package/dist/Popover/index.js.map +1 -0
  445. package/dist/Progress/index.d.ts +1 -1
  446. package/dist/Progress/index.js +46 -74
  447. package/dist/Progress/index.js.map +1 -0
  448. package/dist/Radio/components/Group/index.d.ts +3 -3
  449. package/dist/Radio/components/Group/index.js +51 -63
  450. package/dist/Radio/components/Group/index.js.map +1 -0
  451. package/dist/Radio/components/Radio/index.d.ts +1 -2
  452. package/dist/Radio/components/Radio/index.js +84 -109
  453. package/dist/Radio/components/Radio/index.js.map +1 -0
  454. package/dist/Radio/index.d.ts +4 -5
  455. package/dist/Radio/index.js +9 -4
  456. package/dist/Radio/index.js.map +1 -0
  457. package/dist/Radio/interface/radio.js +2 -1
  458. package/dist/Radio/interface/radioGroup.d.ts +1 -1
  459. package/dist/Radio/interface/radioGroup.js +2 -1
  460. package/dist/RenameInput/index.d.ts +2 -2
  461. package/dist/RenameInput/index.js +94 -129
  462. package/dist/RenameInput/index.js.map +1 -0
  463. package/dist/Result/index.d.ts +5 -5
  464. package/dist/Result/index.js +122 -116
  465. package/dist/Result/index.js.map +1 -0
  466. package/dist/Result/noFound.d.ts +1 -1
  467. package/dist/Result/noFound.js +36 -33
  468. package/dist/Result/noFound.js.map +1 -0
  469. package/dist/Result/serverError.d.ts +1 -1
  470. package/dist/Result/serverError.js +36 -33
  471. package/dist/Result/serverError.js.map +1 -0
  472. package/dist/Result/unauthorized.d.ts +1 -1
  473. package/dist/Result/unauthorized.js +36 -34
  474. package/dist/Result/unauthorized.js.map +1 -0
  475. package/dist/Row/index.d.ts +11 -2
  476. package/dist/Row/index.js +42 -2
  477. package/dist/Row/index.js.map +1 -0
  478. package/dist/ScrollArea/index.d.ts +1 -1
  479. package/dist/ScrollArea/index.js +44 -58
  480. package/dist/ScrollArea/index.js.map +1 -0
  481. package/dist/{AldSelect → Select}/BaseSelect.d.ts +13 -3
  482. package/dist/Select/BaseSelect.js +206 -0
  483. package/dist/Select/BaseSelect.js.map +1 -0
  484. package/dist/{AldSelect → Select}/SelectTrigger.d.ts +3 -3
  485. package/dist/Select/SelectTrigger.js +60 -0
  486. package/dist/Select/SelectTrigger.js.map +1 -0
  487. package/dist/{AldSelect → Select}/Selector/MultipleResponsiveSelectedSection.d.ts +2 -2
  488. package/dist/Select/Selector/MultipleResponsiveSelectedSection.js +48 -0
  489. package/dist/Select/Selector/MultipleResponsiveSelectedSection.js.map +1 -0
  490. package/dist/{AldSelect → Select}/Selector/MultipleSelector.d.ts +3 -3
  491. package/dist/Select/Selector/MultipleSelector.js +128 -0
  492. package/dist/Select/Selector/MultipleSelector.js.map +1 -0
  493. package/dist/{AldSelect → Select}/Selector/index.d.ts +2 -2
  494. package/dist/Select/Selector/index.js +25 -0
  495. package/dist/Select/Selector/index.js.map +1 -0
  496. package/dist/{AldSelect → Select}/components/PopupContent.d.ts +2 -2
  497. package/dist/Select/components/PopupContent.js +25 -0
  498. package/dist/Select/components/PopupContent.js.map +1 -0
  499. package/dist/{AldSelect → Select}/components/SearchBox.d.ts +2 -2
  500. package/dist/Select/components/SearchBox.js +23 -0
  501. package/dist/Select/components/SearchBox.js.map +1 -0
  502. package/dist/{AldSelect → Select}/components/Suffix.d.ts +2 -2
  503. package/dist/Select/components/Suffix.js +36 -0
  504. package/dist/Select/components/Suffix.js.map +1 -0
  505. package/dist/Select/hooks/useCache.js +35 -0
  506. package/dist/Select/hooks/useCache.js.map +1 -0
  507. package/dist/Select/hooks/useDisplayMenu.js +42 -0
  508. package/dist/Select/hooks/useDisplayMenu.js.map +1 -0
  509. package/dist/{AldSelect → Select}/hooks/useLayoutEffect.d.ts +2 -1
  510. package/dist/Select/hooks/useLayoutEffect.js +2 -0
  511. package/dist/{AldSelect → Select}/hooks/useOptions.d.ts +1 -1
  512. package/dist/Select/hooks/useOptions.js +60 -0
  513. package/dist/Select/hooks/useOptions.js.map +1 -0
  514. package/dist/{AldSelect → Select}/index.d.ts +2 -2
  515. package/dist/Select/index.js +151 -0
  516. package/dist/Select/index.js.map +1 -0
  517. package/dist/{AldSelect → Select}/interface.d.ts +2 -2
  518. package/dist/Select/interface.js +2 -0
  519. package/dist/{AldSelect → Select}/utils/commonUtil.d.ts +0 -1
  520. package/dist/Select/utils/commonUtil.js +38 -0
  521. package/dist/Select/utils/commonUtil.js.map +1 -0
  522. package/dist/Select/utils/getWidthStyle.js +11 -0
  523. package/dist/Select/utils/getWidthStyle.js.map +1 -0
  524. package/dist/Select/utils/keyUtil.js +2 -0
  525. package/dist/{AldSelect → Select}/utils/valueUtil.d.ts +2 -3
  526. package/dist/Select/utils/valueUtil.js +16 -0
  527. package/dist/Select/utils/valueUtil.js.map +1 -0
  528. package/dist/Skeleton/index.d.ts +56 -2
  529. package/dist/Skeleton/index.js +130 -2
  530. package/dist/Skeleton/index.js.map +1 -0
  531. package/dist/Slider/index.d.ts +34 -4
  532. package/dist/Slider/index.js +98 -8
  533. package/dist/Slider/index.js.map +1 -0
  534. package/dist/Space/CompactContext.d.ts +20 -0
  535. package/dist/Space/CompactContext.js +24 -0
  536. package/dist/Space/CompactContext.js.map +1 -0
  537. package/dist/Space/index.d.ts +28 -3
  538. package/dist/Space/index.js +64 -2
  539. package/dist/Space/index.js.map +1 -0
  540. package/dist/Spin/CustomIcon/index.d.ts +3 -3
  541. package/dist/Spin/CustomIcon/index.js +27 -38
  542. package/dist/Spin/CustomIcon/index.js.map +1 -0
  543. package/dist/Spin/index.d.ts +2 -2
  544. package/dist/Spin/index.js +47 -62
  545. package/dist/Spin/index.js.map +1 -0
  546. package/dist/StatusLight/index.d.ts +2 -2
  547. package/dist/StatusLight/index.js +73 -58
  548. package/dist/StatusLight/index.js.map +1 -0
  549. package/dist/Steps/components/CustomDot/index.d.ts +4 -2
  550. package/dist/Steps/components/CustomDot/index.js +2 -8
  551. package/dist/Steps/components/ProcessIcon/index.d.ts +1 -2
  552. package/dist/Steps/components/ProcessIcon/index.js +39 -24
  553. package/dist/Steps/components/ProcessIcon/index.js.map +1 -0
  554. package/dist/Steps/components/Step/index.d.ts +2 -14
  555. package/dist/Steps/components/Step/index.js +28 -41
  556. package/dist/Steps/components/Step/index.js.map +1 -0
  557. package/dist/Steps/index.d.ts +13 -33
  558. package/dist/Steps/index.js +79 -30
  559. package/dist/Steps/index.js.map +1 -0
  560. package/dist/Steps/matchMedia.mock.js +2 -18
  561. package/dist/Switch/index.d.ts +5 -36
  562. package/dist/Switch/index.js +62 -67
  563. package/dist/Switch/index.js.map +1 -0
  564. package/dist/Switch/test/index.js +2 -43
  565. package/dist/Table/components/Cell.d.ts +1 -2
  566. package/dist/Table/components/Cell.js +40 -41
  567. package/dist/Table/components/Cell.js.map +1 -0
  568. package/dist/Table/components/DndWrapper.d.ts +1 -1
  569. package/dist/Table/components/DndWrapper.js +27 -35
  570. package/dist/Table/components/DndWrapper.js.map +1 -0
  571. package/dist/Table/components/ErrorBoundary.d.ts +4 -2
  572. package/dist/Table/components/ErrorBoundary.js +33 -61
  573. package/dist/Table/components/ErrorBoundary.js.map +1 -0
  574. package/dist/Table/components/ExpandCell.d.ts +2 -2
  575. package/dist/Table/components/ExpandCell.js +61 -62
  576. package/dist/Table/components/ExpandCell.js.map +1 -0
  577. package/dist/Table/components/Footer/index.d.ts +1 -2
  578. package/dist/Table/components/Footer/index.js +75 -81
  579. package/dist/Table/components/Footer/index.js.map +1 -0
  580. package/dist/Table/components/Header.d.ts +1 -2
  581. package/dist/Table/components/Header.js +62 -68
  582. package/dist/Table/components/Header.js.map +1 -0
  583. package/dist/Table/helper.d.ts +6 -7
  584. package/dist/Table/helper.js +101 -155
  585. package/dist/Table/helper.js.map +1 -0
  586. package/dist/Table/hooks/useExpandable.d.ts +1 -1
  587. package/dist/Table/hooks/useExpandable.js +125 -172
  588. package/dist/Table/hooks/useExpandable.js.map +1 -0
  589. package/dist/Table/hooks/useFixed.d.ts +1 -2
  590. package/dist/Table/hooks/useFixed.js +45 -54
  591. package/dist/Table/hooks/useFixed.js.map +1 -0
  592. package/dist/Table/hooks/useRowDnd.d.ts +1 -1
  593. package/dist/Table/hooks/useRowDnd.js +156 -260
  594. package/dist/Table/hooks/useRowDnd.js.map +1 -0
  595. package/dist/Table/hooks/useRowSelection.d.ts +1 -1
  596. package/dist/Table/hooks/useRowSelection.js +268 -389
  597. package/dist/Table/hooks/useRowSelection.js.map +1 -0
  598. package/dist/Table/hooks/useScroll.d.ts +3 -4
  599. package/dist/Table/hooks/useScroll.js +92 -137
  600. package/dist/Table/hooks/useScroll.js.map +1 -0
  601. package/dist/Table/index.d.ts +3 -3
  602. package/dist/Table/index.js +442 -514
  603. package/dist/Table/index.js.map +1 -0
  604. package/dist/Table/tests/helper.d.ts +1 -1
  605. package/dist/Table/tests/helper.js +2 -41
  606. package/dist/Table/types.d.ts +1 -1
  607. package/dist/Table/types.js +2 -1
  608. package/dist/Tabs/TabPane.d.ts +2 -14
  609. package/dist/Tabs/TabPane.js +13 -6
  610. package/dist/Tabs/TabPane.js.map +1 -0
  611. package/dist/Tabs/index.d.ts +26 -52
  612. package/dist/Tabs/index.js +187 -78
  613. package/dist/Tabs/index.js.map +1 -0
  614. package/dist/Tag/index.d.ts +3 -3
  615. package/dist/Tag/index.js +119 -144
  616. package/dist/Tag/index.js.map +1 -0
  617. package/dist/TextLink/index.d.ts +10 -2
  618. package/dist/TextLink/index.js +49 -24
  619. package/dist/TextLink/index.js.map +1 -0
  620. package/dist/Tooltip/index.d.ts +2 -47
  621. package/dist/Tooltip/index.js +124 -34
  622. package/dist/Tooltip/index.js.map +1 -0
  623. package/dist/Tour/index.d.ts +29 -3
  624. package/dist/Tour/index.js +79 -2
  625. package/dist/Tour/index.js.map +1 -0
  626. package/dist/Tree/DirectoryTree.d.ts +3 -4
  627. package/dist/Tree/DirectoryTree.js +91 -161
  628. package/dist/Tree/DirectoryTree.js.map +1 -0
  629. package/dist/Tree/Tree.d.ts +3 -4
  630. package/dist/Tree/Tree.js +2 -205
  631. package/dist/Tree/Tree2.js +146 -0
  632. package/dist/Tree/Tree2.js.map +1 -0
  633. package/dist/Tree/index.d.ts +7 -10
  634. package/dist/Tree/index.js +10 -6
  635. package/dist/Tree/index.js.map +1 -0
  636. package/dist/Tree/utils/dictUtil.d.ts +1 -1
  637. package/dist/Tree/utils/dictUtil.js +49 -69
  638. package/dist/Tree/utils/dictUtil.js.map +1 -0
  639. package/dist/Tree/utils/dropIndicator.d.ts +1 -2
  640. package/dist/Tree/utils/dropIndicator.js +31 -35
  641. package/dist/Tree/utils/dropIndicator.js.map +1 -0
  642. package/dist/Tree/utils/iconUtil.d.ts +1 -1
  643. package/dist/Tree/utils/iconUtil.js +61 -65
  644. package/dist/Tree/utils/iconUtil.js.map +1 -0
  645. package/dist/Typography/index.d.ts +53 -2
  646. package/dist/Typography/index.js +85 -2
  647. package/dist/Typography/index.js.map +1 -0
  648. package/dist/Upload/index.d.ts +78 -4
  649. package/dist/Upload/index.js +334 -2
  650. package/dist/Upload/index.js.map +1 -0
  651. package/dist/User/index.d.ts +4 -2
  652. package/dist/User/index.js +31 -26
  653. package/dist/User/index.js.map +1 -0
  654. package/dist/Watermark/index.d.ts +2 -2
  655. package/dist/Watermark/index.js +61 -4
  656. package/dist/Watermark/index.js.map +1 -0
  657. package/dist/_utils/SimpleOverflow.d.ts +14 -0
  658. package/dist/_utils/SimpleOverflow.js +61 -0
  659. package/dist/_utils/SimpleOverflow.js.map +1 -0
  660. package/dist/_utils/getUniqId.js +12 -11
  661. package/dist/_utils/getUniqId.js.map +1 -0
  662. package/dist/_utils/hooks/useControlledState.js +2 -42
  663. package/dist/_utils/hooks/useId.js +15 -18
  664. package/dist/_utils/hooks/useId.js.map +1 -0
  665. package/dist/_utils/motion.d.ts +2 -3
  666. package/dist/_utils/motion.js +28 -49
  667. package/dist/_utils/motion.js.map +1 -0
  668. package/dist/_utils/prefixCls.d.ts +1 -3
  669. package/dist/_utils/prefixCls.js +13 -14
  670. package/dist/_utils/prefixCls.js.map +1 -0
  671. package/dist/_utils/reactNode.js +17 -15
  672. package/dist/_utils/reactNode.js.map +1 -0
  673. package/dist/_utils/statusUtils.d.ts +3 -0
  674. package/dist/_utils/statusUtils.js +2 -0
  675. package/dist/_utils/type.js +2 -22
  676. package/dist/aloudata-design.css +2 -0
  677. package/dist/index.d.ts +125 -113
  678. package/dist/index.js +73 -70
  679. package/dist/lib/utils.d.ts +2 -0
  680. package/dist/lib/utils.js +10 -0
  681. package/dist/lib/utils.js.map +1 -0
  682. package/dist/locale/default.d.ts +5 -3
  683. package/dist/locale/default.js +18 -17
  684. package/dist/locale/default.js.map +1 -0
  685. package/dist/locale/en_US.d.ts +1 -0
  686. package/dist/locale/en_US.js +63 -69
  687. package/dist/locale/en_US.js.map +1 -0
  688. package/dist/locale/zh_CN.d.ts +1 -0
  689. package/dist/locale/zh_CN.js +63 -69
  690. package/dist/locale/zh_CN.js.map +1 -0
  691. package/dist/message/index.js +91 -81
  692. package/dist/message/index.js.map +1 -0
  693. package/dist/notification/index.d.ts +1 -1
  694. package/dist/notification/index.js +209 -218
  695. package/dist/notification/index.js.map +1 -0
  696. package/dist/select_structure.png +0 -0
  697. package/dist/select_use_tip1.png +0 -0
  698. package/dist/select_use_tip2.png +0 -0
  699. package/dist/select_use_tip3.png +0 -0
  700. package/dist/select_use_tip4.png +0 -0
  701. package/package.json +58 -56
  702. package/dist/AMenu/style/index.d.ts +0 -2
  703. package/dist/AMenu/style/index.js +0 -2
  704. package/dist/AMenu/style/index.less +0 -1
  705. package/dist/AProgress/style/index.d.ts +0 -2
  706. package/dist/AProgress/style/index.js +0 -2
  707. package/dist/AProgress/style/index.less +0 -1
  708. package/dist/AldSelect/BaseSelect.js +0 -275
  709. package/dist/AldSelect/SelectTrigger.js +0 -76
  710. package/dist/AldSelect/Selector/MultipleResponsiveSelectedSection.js +0 -52
  711. package/dist/AldSelect/Selector/MultipleSelector.js +0 -171
  712. package/dist/AldSelect/Selector/index.js +0 -30
  713. package/dist/AldSelect/components/PopupContent.js +0 -28
  714. package/dist/AldSelect/components/SearchBox.js +0 -23
  715. package/dist/AldSelect/components/Suffix.js +0 -37
  716. package/dist/AldSelect/hooks/useCache.js +0 -50
  717. package/dist/AldSelect/hooks/useDisplayMenu.js +0 -61
  718. package/dist/AldSelect/hooks/useLayoutEffect.js +0 -17
  719. package/dist/AldSelect/hooks/useOptions.js +0 -74
  720. package/dist/AldSelect/index.js +0 -259
  721. package/dist/AldSelect/interface.js +0 -1
  722. package/dist/AldSelect/style/color.less +0 -71
  723. package/dist/AldSelect/style/index.d.ts +0 -1
  724. package/dist/AldSelect/style/index.js +0 -1
  725. package/dist/AldSelect/style/index.less +0 -180
  726. package/dist/AldSelect/style/size.less +0 -72
  727. package/dist/AldSelect/utils/commonUtil.js +0 -46
  728. package/dist/AldSelect/utils/getWidthStyle.js +0 -18
  729. package/dist/AldSelect/utils/keyUtil.js +0 -10
  730. package/dist/AldSelect/utils/valueUtil.js +0 -131
  731. package/dist/Alert/style/index.d.ts +0 -2
  732. package/dist/Alert/style/index.js +0 -2
  733. package/dist/Alert/style/index.less +0 -1
  734. package/dist/App/style/index.d.ts +0 -2
  735. package/dist/App/style/index.js +0 -2
  736. package/dist/App/style/index.less +0 -1
  737. package/dist/Avatar/style/index.d.ts +0 -2
  738. package/dist/Avatar/style/index.js +0 -2
  739. package/dist/Avatar/style/index.less +0 -23
  740. package/dist/Badge/style/index.d.ts +0 -2
  741. package/dist/Badge/style/index.js +0 -2
  742. package/dist/Badge/style/index.less +0 -50
  743. package/dist/Breadcrumb/style/index.d.ts +0 -2
  744. package/dist/Breadcrumb/style/index.js +0 -2
  745. package/dist/Breadcrumb/style/index.less +0 -37
  746. package/dist/Button/style/index.d.ts +0 -2
  747. package/dist/Button/style/index.js +0 -2
  748. package/dist/Button/style/index.less +0 -24
  749. package/dist/Button/style/reset.less +0 -9
  750. package/dist/Button/style/size.less +0 -102
  751. package/dist/Button/style/type.less +0 -286
  752. package/dist/Button/style/variables.less +0 -124
  753. package/dist/Card/style/index.d.ts +0 -2
  754. package/dist/Card/style/index.js +0 -2
  755. package/dist/Card/style/index.less +0 -1
  756. package/dist/Carousel/style/index.d.ts +0 -2
  757. package/dist/Carousel/style/index.js +0 -2
  758. package/dist/Carousel/style/index.less +0 -1
  759. package/dist/Checkbox/style/index.d.ts +0 -2
  760. package/dist/Checkbox/style/index.js +0 -2
  761. package/dist/Checkbox/style/index.less +0 -235
  762. package/dist/Col/style/index.d.ts +0 -2
  763. package/dist/Col/style/index.js +0 -2
  764. package/dist/Col/style/index.less +0 -1
  765. package/dist/Collapse/style/index.d.ts +0 -2
  766. package/dist/Collapse/style/index.js +0 -2
  767. package/dist/Collapse/style/index.less +0 -107
  768. package/dist/ColorPicker/alpha.svg +0 -54
  769. package/dist/ColorPicker/style/complex.less +0 -199
  770. package/dist/ColorPicker/style/index.d.ts +0 -2
  771. package/dist/ColorPicker/style/index.js +0 -2
  772. package/dist/ColorPicker/style/index.less +0 -190
  773. package/dist/ConfigProvider/defaultRenderEmpty.d.ts +0 -4
  774. package/dist/ConfigProvider/defaultRenderEmpty.js +0 -34
  775. package/dist/ConfigProvider/style/index.d.ts +0 -2
  776. package/dist/ConfigProvider/style/index.js +0 -2
  777. package/dist/ConfigProvider/style/index.less +0 -1
  778. package/dist/DONT-USE-THIS-FILE-NAME +0 -7
  779. package/dist/DataPreviewTable/style/index.d.ts +0 -2
  780. package/dist/DataPreviewTable/style/index.js +0 -2
  781. package/dist/DataPreviewTable/style/index.less +0 -158
  782. package/dist/DatePicker/style/index.d.ts +0 -2
  783. package/dist/DatePicker/style/index.js +0 -2
  784. package/dist/DatePicker/style/index.less +0 -14
  785. package/dist/Divider/style/index.d.ts +0 -2
  786. package/dist/Divider/style/index.js +0 -2
  787. package/dist/Divider/style/index.less +0 -40
  788. package/dist/DoubleCircleIcon/style/index.less +0 -55
  789. package/dist/Drawer/style/index.d.ts +0 -2
  790. package/dist/Drawer/style/index.js +0 -2
  791. package/dist/Drawer/style/index.less +0 -1
  792. package/dist/Dropdown/style/index.d.ts +0 -2
  793. package/dist/Dropdown/style/index.js +0 -2
  794. package/dist/Dropdown/style/index.less +0 -24
  795. package/dist/Empty/style/index.d.ts +0 -1
  796. package/dist/Empty/style/index.js +0 -1
  797. package/dist/Empty/style/index.less +0 -74
  798. package/dist/Form/style/index.d.ts +0 -3
  799. package/dist/Form/style/index.js +0 -3
  800. package/dist/Form/style/index.less +0 -130
  801. package/dist/HighlightText/style/index.d.ts +0 -2
  802. package/dist/HighlightText/style/index.js +0 -2
  803. package/dist/HighlightText/style/index.less +0 -5
  804. package/dist/Icon/antdIconfont.d.ts +0 -4
  805. package/dist/Icon/antdIconfont.js +0 -2
  806. package/dist/Icon/index.less +0 -24
  807. package/dist/Icon/style/index.d.ts +0 -2
  808. package/dist/Icon/style/index.js +0 -2
  809. package/dist/Icon/style/index.less +0 -24
  810. package/dist/Icon/svg/Arrow-Right-light-line.svg +0 -5
  811. package/dist/Icon/svg/Cancelled-Circle-fill.svg +0 -6
  812. package/dist/Icon/svg/Close-Circle-light-line.svg +0 -5
  813. package/dist/Icon/svg/In-Progress-fill.svg +0 -8
  814. package/dist/Icon/svg/Loading-duotone.svg +0 -7
  815. package/dist/Icon/svg/Sign-light-line.svg +0 -3
  816. package/dist/Icon/svg/Sort-Ascending-order-Color.svg +0 -5
  817. package/dist/Icon/svg/Sort-Color.svg +0 -5
  818. package/dist/Icon/svg/Sort-Descending-order-Color.svg +0 -5
  819. package/dist/Icon/svg/Times-light-line.svg +0 -5
  820. package/dist/Icon/svg/Trash-light-line.svg +0 -8
  821. package/dist/Icon/svg/alert-triangle-duotone.svg +0 -5
  822. package/dist/Icon/svg/alert-triangle-line.svg +0 -5
  823. package/dist/Icon/svg/arrow-down-fill.svg +0 -5
  824. package/dist/Icon/svg/arrow-down-light-line.svg +0 -5
  825. package/dist/Icon/svg/arrow-down-right-fill.svg +0 -5
  826. package/dist/Icon/svg/attention-circle-fill.svg +0 -5
  827. package/dist/Icon/svg/attention-triangle-fill.svg +0 -5
  828. package/dist/Icon/svg/attention-triangle-light-line.svg +0 -5
  829. package/dist/Icon/svg/cancel-circle-duotone.svg +0 -8
  830. package/dist/Icon/svg/check-circle-duotone.svg +0 -8
  831. package/dist/Icon/svg/check-circle-fill.svg +0 -5
  832. package/dist/Icon/svg/check-circle-light-line.svg +0 -8
  833. package/dist/Icon/svg/check-light-line.svg +0 -5
  834. package/dist/Icon/svg/chevron-down-line.svg +0 -7
  835. package/dist/Icon/svg/chevron-left-line.svg +0 -7
  836. package/dist/Icon/svg/chevron-right-line.svg +0 -7
  837. package/dist/Icon/svg/circle-light-line.svg +0 -9
  838. package/dist/Icon/svg/close-L-line.svg +0 -3
  839. package/dist/Icon/svg/close-circle-fill.svg +0 -5
  840. package/dist/Icon/svg/close-circle-right-fill.svg +0 -5
  841. package/dist/Icon/svg/close-light-line.svg +0 -5
  842. package/dist/Icon/svg/close-m-line.svg +0 -7
  843. package/dist/Icon/svg/danger-fill.svg +0 -5
  844. package/dist/Icon/svg/drag-light-line.svg +0 -5
  845. package/dist/Icon/svg/drag-line.svg +0 -7
  846. package/dist/Icon/svg/ellipsis.svg +0 -6
  847. package/dist/Icon/svg/eye-off-line.svg +0 -7
  848. package/dist/Icon/svg/eye-on-line.svg +0 -15
  849. package/dist/Icon/svg/fold-down-fill.svg +0 -8
  850. package/dist/Icon/svg/fold-up-fill.svg +0 -8
  851. package/dist/Icon/svg/info-circle-duotone.svg +0 -5
  852. package/dist/Icon/svg/info-circle-line.svg +0 -5
  853. package/dist/Icon/svg/information-circle-fill.svg +0 -5
  854. package/dist/Icon/svg/information-circle-light-line.svg +0 -9
  855. package/dist/Icon/svg/loading-2-line.svg +0 -8
  856. package/dist/Icon/svg/loading-line.svg +0 -7
  857. package/dist/Icon/svg/more-vertical-line.svg +0 -7
  858. package/dist/Icon/svg/search-line.svg +0 -7
  859. package/dist/Icon/svg/triangle-light-line.svg +0 -5
  860. package/dist/Icon/svg/user.svg +0 -4
  861. package/dist/Icon/svg/userGroup.svg +0 -7
  862. package/dist/IconButton/style/index.d.ts +0 -2
  863. package/dist/IconButton/style/index.js +0 -2
  864. package/dist/IconButton/style/index.less +0 -148
  865. package/dist/Input/style/index.d.ts +0 -2
  866. package/dist/Input/style/index.js +0 -2
  867. package/dist/Input/style/index.less +0 -13
  868. package/dist/Input/style/reset.less +0 -22
  869. package/dist/Input/style/size.less +0 -82
  870. package/dist/Input/style/status.less +0 -99
  871. package/dist/InputNumber/style/index.d.ts +0 -2
  872. package/dist/InputNumber/style/index.js +0 -2
  873. package/dist/InputNumber/style/index.less +0 -330
  874. package/dist/InputSearch/style/index.d.ts +0 -2
  875. package/dist/InputSearch/style/index.js +0 -2
  876. package/dist/InputSearch/style/index.less +0 -91
  877. package/dist/Layout/style/index.d.ts +0 -2
  878. package/dist/Layout/style/index.js +0 -2
  879. package/dist/Layout/style/index.less +0 -1
  880. package/dist/List/style/index.d.ts +0 -2
  881. package/dist/List/style/index.js +0 -2
  882. package/dist/List/style/index.less +0 -120
  883. package/dist/LogicTree/style/DisplayLogicItem.less +0 -54
  884. package/dist/LogicTree/style/LoginItem.less +0 -206
  885. package/dist/LogicTree/style/index.d.ts +0 -2
  886. package/dist/LogicTree/style/index.js +0 -2
  887. package/dist/LogicTree/style/index.less +0 -12
  888. package/dist/MemberPicker/assets/default_user_photo.svg +0 -7
  889. package/dist/MemberPicker/style/index.d.ts +0 -2
  890. package/dist/MemberPicker/style/index.js +0 -2
  891. package/dist/MemberPicker/style/index.less +0 -365
  892. package/dist/Menu/style/index.d.ts +0 -2
  893. package/dist/Menu/style/index.js +0 -2
  894. package/dist/Menu/style/index.less +0 -146
  895. package/dist/Modal/style/index.d.ts +0 -2
  896. package/dist/Modal/style/index.js +0 -2
  897. package/dist/Modal/style/index.less +0 -7
  898. package/dist/Modal/style/modal.less +0 -191
  899. package/dist/Modal/style/modalConfirm.less +0 -89
  900. package/dist/Modal/style/polyfill/animate.less +0 -244
  901. package/dist/Modal/style/polyfill/index.less +0 -54
  902. package/dist/OverflowCount/style/index.d.ts +0 -2
  903. package/dist/OverflowCount/style/index.js +0 -2
  904. package/dist/OverflowCount/style/index.less +0 -52
  905. package/dist/Pagination/style/index.d.ts +0 -2
  906. package/dist/Pagination/style/index.js +0 -2
  907. package/dist/Pagination/style/index.less +0 -45
  908. package/dist/Popconfirm/style/index.d.ts +0 -2
  909. package/dist/Popconfirm/style/index.js +0 -2
  910. package/dist/Popconfirm/style/index.less +0 -81
  911. package/dist/Popover/style/index.d.ts +0 -2
  912. package/dist/Popover/style/index.js +0 -2
  913. package/dist/Popover/style/index.less +0 -73
  914. package/dist/Progress/style/index.d.ts +0 -2
  915. package/dist/Progress/style/index.js +0 -2
  916. package/dist/Progress/style/index.less +0 -57
  917. package/dist/Radio/style/index.d.ts +0 -2
  918. package/dist/Radio/style/index.js +0 -2
  919. package/dist/Radio/style/index.less +0 -603
  920. package/dist/RenameInput/style/index.d.ts +0 -2
  921. package/dist/RenameInput/style/index.js +0 -2
  922. package/dist/RenameInput/style/index.less +0 -66
  923. package/dist/Result/style/index.d.ts +0 -2
  924. package/dist/Result/style/index.js +0 -2
  925. package/dist/Result/style/index.less +0 -104
  926. package/dist/Row/style/index.d.ts +0 -2
  927. package/dist/Row/style/index.js +0 -2
  928. package/dist/Row/style/index.less +0 -1
  929. package/dist/ScrollArea/style/index.d.ts +0 -2
  930. package/dist/ScrollArea/style/index.js +0 -2
  931. package/dist/ScrollArea/style/index.less +0 -54
  932. package/dist/Skeleton/style/index.d.ts +0 -2
  933. package/dist/Skeleton/style/index.js +0 -2
  934. package/dist/Skeleton/style/index.less +0 -91
  935. package/dist/Slider/style/index.d.ts +0 -2
  936. package/dist/Slider/style/index.js +0 -2
  937. package/dist/Slider/style/index.less +0 -68
  938. package/dist/Space/style/index.d.ts +0 -2
  939. package/dist/Space/style/index.js +0 -2
  940. package/dist/Space/style/index.less +0 -1
  941. package/dist/Spin/style/customIcon.less +0 -69
  942. package/dist/Spin/style/index.d.ts +0 -2
  943. package/dist/Spin/style/index.js +0 -2
  944. package/dist/Spin/style/index.less +0 -24
  945. package/dist/StatusLight/style/index.d.ts +0 -2
  946. package/dist/StatusLight/style/index.js +0 -2
  947. package/dist/StatusLight/style/index.less +0 -99
  948. package/dist/Steps/style/index.d.ts +0 -2
  949. package/dist/Steps/style/index.js +0 -2
  950. package/dist/Steps/style/index.less +0 -350
  951. package/dist/Switch/style/index.d.ts +0 -2
  952. package/dist/Switch/style/index.js +0 -2
  953. package/dist/Switch/style/index.less +0 -212
  954. package/dist/Switch/style/status.less +0 -12
  955. package/dist/Table/style/index.d.ts +0 -2
  956. package/dist/Table/style/index.js +0 -2
  957. package/dist/Table/style/index.less +0 -421
  958. package/dist/Tabs/style/index.d.ts +0 -2
  959. package/dist/Tabs/style/index.js +0 -2
  960. package/dist/Tabs/style/index.less +0 -262
  961. package/dist/Tag/style/index.d.ts +0 -2
  962. package/dist/Tag/style/index.js +0 -2
  963. package/dist/Tag/style/index.less +0 -69
  964. package/dist/TextLink/style/index.d.ts +0 -2
  965. package/dist/TextLink/style/index.js +0 -2
  966. package/dist/TextLink/style/index.less +0 -15
  967. package/dist/TextLink/style/size.less +0 -37
  968. package/dist/TextLink/style/type.less +0 -60
  969. package/dist/Tooltip/style/index.d.ts +0 -2
  970. package/dist/Tooltip/style/index.js +0 -2
  971. package/dist/Tooltip/style/index.less +0 -25
  972. package/dist/Tour/style/index.d.ts +0 -2
  973. package/dist/Tour/style/index.js +0 -2
  974. package/dist/Tour/style/index.less +0 -1
  975. package/dist/Tree/demo/asyncLoad/index.d.ts +0 -3
  976. package/dist/Tree/demo/asyncLoad/index.js +0 -76
  977. package/dist/Tree/demo/basic/index.d.ts +0 -3
  978. package/dist/Tree/demo/basic/index.js +0 -42
  979. package/dist/Tree/demo/directoryTree/index.d.ts +0 -3
  980. package/dist/Tree/demo/directoryTree/index.js +0 -40
  981. package/dist/Tree/demo/drag/index.d.ts +0 -3
  982. package/dist/Tree/demo/drag/index.js +0 -118
  983. package/dist/Tree/demo/filter/index.d.ts +0 -3
  984. package/dist/Tree/demo/filter/index.js +0 -64
  985. package/dist/Tree/style/checkbox.less +0 -237
  986. package/dist/Tree/style/directory.less +0 -68
  987. package/dist/Tree/style/indent.less +0 -11
  988. package/dist/Tree/style/index.d.ts +0 -2
  989. package/dist/Tree/style/index.js +0 -2
  990. package/dist/Tree/style/index.less +0 -173
  991. package/dist/Tree/style/mixin.less +0 -322
  992. package/dist/Tree/style/reset.less +0 -26
  993. package/dist/Tree/style/rtl.less +0 -68
  994. package/dist/Tree/style/var.less +0 -42
  995. package/dist/Typography/style/index.d.ts +0 -2
  996. package/dist/Typography/style/index.js +0 -2
  997. package/dist/Typography/style/index.less +0 -1
  998. package/dist/Upload/style/index.d.ts +0 -2
  999. package/dist/Upload/style/index.js +0 -2
  1000. package/dist/Upload/style/index.less +0 -1
  1001. package/dist/User/style/index.d.ts +0 -2
  1002. package/dist/User/style/index.js +0 -2
  1003. package/dist/User/style/index.less +0 -49
  1004. package/dist/Watermark/style/index.d.ts +0 -2
  1005. package/dist/Watermark/style/index.js +0 -2
  1006. package/dist/Watermark/style/index.less +0 -1
  1007. package/dist/_utils/hooks/usePrefixCls.d.ts +0 -2
  1008. package/dist/_utils/hooks/usePrefixCls.js +0 -10
  1009. package/dist/_utils/transformIconToBase64Url.d.ts +0 -2
  1010. package/dist/_utils/transformIconToBase64Url.js +0 -6
  1011. package/dist/ald.min.css +0 -5
  1012. package/dist/index.less +0 -64
  1013. package/dist/message/style/index.d.ts +0 -2
  1014. package/dist/message/style/index.js +0 -2
  1015. package/dist/message/style/index.less +0 -73
  1016. package/dist/notification/demo/index.d.ts +0 -3
  1017. package/dist/notification/demo/index.js +0 -43
  1018. package/dist/notification/style/index.d.ts +0 -2
  1019. package/dist/notification/style/index.js +0 -2
  1020. package/dist/notification/style/index.less +0 -53
  1021. package/dist/style/color/bezierEasing.less +0 -110
  1022. package/dist/style/color/colorPalette.less +0 -84
  1023. package/dist/style/color/colors.less +0 -162
  1024. package/dist/style/color/tinyColor.less +0 -1184
  1025. package/dist/style/components/toastify.css +0 -855
  1026. package/dist/style/core/index.less +0 -2
  1027. package/dist/style/core/motion/fade.less +0 -34
  1028. package/dist/style/core/motion/move.less +0 -129
  1029. package/dist/style/core/motion/other.less +0 -48
  1030. package/dist/style/core/motion/slide.less +0 -131
  1031. package/dist/style/core/motion/zoom.less +0 -179
  1032. package/dist/style/core/motion.less +0 -22
  1033. package/dist/style/index.d.ts +0 -1
  1034. package/dist/style/index.js +0 -1
  1035. package/dist/style/index.less +0 -31
  1036. package/dist/style/mixins/index.less +0 -27
  1037. package/dist/style/mixins/motion.less +0 -33
  1038. package/dist/style/themes/default/default.less +0 -24
  1039. package/dist/style/themes/default/index.less +0 -34
  1040. package/dist/style/themes/default/scrollBar.less +0 -21
  1041. package/dist/style/themes/default/themeColor.module.less +0 -437
  1042. package/dist/style/themes/default/themeColor.module.less.d.ts +0 -182
  1043. package/dist/style/var/default.css +0 -1271
  1044. /package/dist/{AldSelect → Select}/hooks/useCache.d.ts +0 -0
  1045. /package/dist/{AldSelect → Select}/hooks/useDisplayMenu.d.ts +0 -0
  1046. /package/dist/{AldSelect → Select}/utils/getWidthStyle.d.ts +0 -0
  1047. /package/dist/{AldSelect → Select}/utils/keyUtil.d.ts +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();