diginet-core-ui 1.3.87 → 1.3.88

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 (438) hide show
  1. package/assets/avatar/default.svg +3 -3
  2. package/assets/images/icons/wifi.svg +3 -3
  3. package/assets/images/menu/bem/WA3F0100.svg +6 -6
  4. package/assets/images/menu/bem/WA3F1025.svg +10 -10
  5. package/assets/images/menu/bem/WA3F2000.svg +10 -10
  6. package/assets/images/menu/bem/WA3F2020.svg +6 -6
  7. package/assets/images/menu/bem/WA3F2030.svg +14 -14
  8. package/assets/images/menu/bem/WA3F2040.svg +8 -8
  9. package/assets/images/menu/bem/WA3F2100.svg +6 -6
  10. package/assets/images/menu/dhr/ALL.svg +6 -6
  11. package/assets/images/menu/dhr/D00.svg +12 -12
  12. package/assets/images/menu/dhr/D09.svg +8 -8
  13. package/assets/images/menu/dhr/D13.svg +10 -10
  14. package/assets/images/menu/dhr/D15.svg +10 -10
  15. package/assets/images/menu/dhr/D21.svg +10 -10
  16. package/assets/images/menu/dhr/D25.svg +11 -11
  17. package/assets/images/menu/dhr/D29.svg +11 -11
  18. package/assets/images/menu/dhr/D38.svg +6 -6
  19. package/assets/images/menu/dhr/D39.svg +10 -10
  20. package/assets/images/menu/dhr/D51.svg +12 -12
  21. package/assets/images/menu/dhr/D52.svg +16 -16
  22. package/assets/images/menu/dhr/D77.svg +16 -16
  23. package/assets/images/menu/dhr/D84.svg +12 -12
  24. package/assets/images/menu/dhr/D89.svg +8 -8
  25. package/assets/images/menu/dhr/Default.svg +13 -13
  26. package/assets/images/menu/dhr/MHRM00N0001.svg +14 -14
  27. package/assets/images/menu/dhr/MHRM00N0002.svg +22 -22
  28. package/assets/images/menu/dhr/MHRM00N0003.svg +17 -17
  29. package/assets/images/menu/dhr/MHRM00N0004.svg +12 -12
  30. package/assets/images/menu/dhr/MHRM00N0005.svg +11 -11
  31. package/assets/images/menu/dhr/MHRM09N0002.svg +3 -3
  32. package/assets/images/menu/dhr/MHRM09N0003.svg +25 -25
  33. package/assets/images/menu/dhr/MHRM09N0004.svg +14 -14
  34. package/assets/images/menu/dhr/MHRM09N0005.svg +7 -7
  35. package/assets/images/menu/dhr/MHRM09N1010.svg +12 -12
  36. package/assets/images/menu/dhr/MHRM09N1015.svg +18 -18
  37. package/assets/images/menu/dhr/MHRM09N1020.svg +13 -13
  38. package/assets/images/menu/dhr/MHRM09N1025.svg +12 -12
  39. package/assets/images/menu/dhr/MHRM09N1030.svg +11 -11
  40. package/assets/images/menu/dhr/MHRM09N1035.svg +15 -15
  41. package/assets/images/menu/dhr/MHRM09N1040.svg +8 -8
  42. package/assets/images/menu/dhr/MHRM09N1400.svg +11 -11
  43. package/assets/images/menu/dhr/MHRM13N0001.svg +16 -16
  44. package/assets/images/menu/dhr/MHRM13N0002.svg +13 -13
  45. package/assets/images/menu/dhr/MHRM13N0003.svg +12 -12
  46. package/assets/images/menu/dhr/MHRM13N0004.svg +21 -21
  47. package/assets/images/menu/dhr/MHRM25N0001.svg +26 -26
  48. package/assets/images/menu/dhr/MHRM29N0001.svg +30 -30
  49. package/assets/images/menu/dhr/MHRM29N0002.svg +13 -13
  50. package/assets/images/menu/dhr/MHRM29N0003.svg +17 -17
  51. package/assets/images/menu/dhr/MHRM29N0004.svg +18 -18
  52. package/assets/images/menu/dhr/MHRM29N0005.svg +13 -13
  53. package/assets/images/menu/dhr/MHRM29N0015.svg +63 -63
  54. package/assets/images/menu/dhr/MHRM39N0012.svg +43 -43
  55. package/assets/images/menu/dhr/MHRM39N0013.svg +24 -24
  56. package/assets/images/menu/dhr/MHRM39N0014.svg +14 -14
  57. package/assets/images/menu/dhr/MHRM39N0015.svg +36 -36
  58. package/assets/images/menu/dhr/MHRM39N0016.svg +23 -23
  59. package/assets/images/menu/dhr/MHRM39N0017.svg +14 -14
  60. package/assets/images/menu/dhr/MHRM39N0018.svg +5 -5
  61. package/assets/images/menu/dhr/MHRM39N0019.svg +11 -11
  62. package/assets/images/menu/dhr/MHRM39N0020.svg +11 -11
  63. package/assets/images/menu/dhr/MHRM39N0021.svg +11 -11
  64. package/assets/images/menu/dhr/MHRM39N0022.svg +18 -18
  65. package/assets/images/menu/dhr/MHRM39N0023.svg +13 -13
  66. package/assets/images/menu/dhr/MHRM77N0001.svg +28 -28
  67. package/assets/images/menu/dhr/MHRM82N0001.svg +8 -8
  68. package/assets/images/menu/dhr/MHRM82N0002.svg +5 -5
  69. package/assets/images/menu/dhr/MHRM84N0001.svg +27 -27
  70. package/assets/images/menu/dhr/MHRM84N0002.svg +24 -24
  71. package/assets/images/menu/dhr/MHRM89N0001.svg +16 -16
  72. package/assets/images/menu/dhr/MHRP00N0001.svg +10 -10
  73. package/assets/images/menu/dhr/MHRP09N0001.svg +22 -22
  74. package/assets/images/menu/dhr/MHRP09N0002.svg +19 -19
  75. package/assets/images/menu/dhr/MHRP09N0003.svg +12 -12
  76. package/assets/images/menu/dhr/MHRP09N0004.svg +6 -6
  77. package/assets/images/menu/dhr/MHRP09N0005.svg +10 -10
  78. package/assets/images/menu/dhr/MHRP09N0006.svg +17 -17
  79. package/assets/images/menu/dhr/MHRP09N0007.svg +15 -15
  80. package/assets/images/menu/dhr/MHRP09N0008.svg +8 -8
  81. package/assets/images/menu/dhr/MHRP09N0009.svg +10 -10
  82. package/assets/images/menu/dhr/MHRP09N0010.svg +12 -12
  83. package/assets/images/menu/dhr/MHRP09N0011.svg +16 -16
  84. package/assets/images/menu/dhr/MHRP09N0012.svg +6 -6
  85. package/assets/images/menu/dhr/MHRP09N0013.svg +8 -8
  86. package/assets/images/menu/dhr/MHRP09N0014.svg +11 -11
  87. package/assets/images/menu/dhr/MHRP09N0015.svg +12 -12
  88. package/assets/images/menu/dhr/MHRP09N0016.svg +18 -18
  89. package/assets/images/menu/dhr/MHRP09N0017.svg +18 -18
  90. package/assets/images/menu/dhr/MHRP09N0018.svg +12 -12
  91. package/assets/images/menu/dhr/MHRP09N0019.svg +13 -13
  92. package/assets/images/menu/dhr/MHRP09N0020.svg +17 -17
  93. package/assets/images/menu/dhr/MHRP09N0021.svg +10 -10
  94. package/assets/images/menu/dhr/MHRP09N0022.svg +16 -16
  95. package/assets/images/menu/dhr/MHRP09N0023.svg +8 -8
  96. package/assets/images/menu/dhr/MHRP09N0024.svg +15 -15
  97. package/assets/images/menu/dhr/MHRP09N0025.svg +16 -16
  98. package/assets/images/menu/dhr/MHRP09N0026.svg +13 -13
  99. package/assets/images/menu/dhr/MHRP09N0027.svg +10 -10
  100. package/assets/images/menu/dhr/MHRP09N0028.svg +6 -6
  101. package/assets/images/menu/dhr/MHRP09N0029.svg +14 -14
  102. package/assets/images/menu/dhr/MHRP09N0030.svg +4 -4
  103. package/assets/images/menu/dhr/MHRP09N0031.svg +5 -5
  104. package/assets/images/menu/dhr/MHRP09N0032.svg +7 -7
  105. package/assets/images/menu/dhr/MHRP13N0001.svg +9 -9
  106. package/assets/images/menu/dhr/MHRP21N0001.svg +12 -12
  107. package/assets/images/menu/dhr/MHRP21N0002.svg +13 -13
  108. package/assets/images/menu/dhr/MHRP25L0101.svg +15 -15
  109. package/assets/images/menu/dhr/MHRP25L0501.svg +14 -14
  110. package/assets/images/menu/dhr/MHRP25N0001.svg +13 -13
  111. package/assets/images/menu/dhr/MHRP25N0002.svg +16 -16
  112. package/assets/images/menu/dhr/MHRP25N0003.svg +38 -38
  113. package/assets/images/menu/dhr/MHRP25N0004.svg +17 -17
  114. package/assets/images/menu/dhr/MHRP25N0005.svg +20 -20
  115. package/assets/images/menu/dhr/MHRP29N0001.svg +18 -18
  116. package/assets/images/menu/dhr/MHRP29N0002.svg +15 -15
  117. package/assets/images/menu/dhr/MHRP29N0003.svg +20 -20
  118. package/assets/images/menu/dhr/MHRP29N0004.svg +21 -21
  119. package/assets/images/menu/dhr/MHRP29N0005.svg +21 -21
  120. package/assets/images/menu/dhr/MHRP29N0006.svg +14 -14
  121. package/assets/images/menu/dhr/MHRP29N0007.svg +19 -19
  122. package/assets/images/menu/dhr/MHRP29N0008.svg +20 -20
  123. package/assets/images/menu/dhr/MHRP29N0009.svg +11 -11
  124. package/assets/images/menu/dhr/MHRP29N0010.svg +11 -11
  125. package/assets/images/menu/dhr/MHRP29N0011.svg +12 -12
  126. package/assets/images/menu/dhr/MHRP29N0012.svg +7 -7
  127. package/assets/images/menu/dhr/MHRP29N0013.svg +27 -27
  128. package/assets/images/menu/dhr/MHRP29N0014.svg +32 -32
  129. package/assets/images/menu/dhr/MHRP29N0016.svg +54 -54
  130. package/assets/images/menu/dhr/MHRP29N0017.svg +24 -24
  131. package/assets/images/menu/dhr/MHRP29N0018.svg +44 -44
  132. package/assets/images/menu/dhr/MHRP29N0019.svg +17 -17
  133. package/assets/images/menu/dhr/MHRP29N0020.svg +11 -11
  134. package/assets/images/menu/dhr/MHRP29N0021.svg +8 -8
  135. package/assets/images/menu/dhr/MHRP29N0022.svg +9 -9
  136. package/assets/images/menu/dhr/MHRP29N0023.svg +22 -22
  137. package/assets/images/menu/dhr/MHRP29N0026.svg +13 -13
  138. package/assets/images/menu/dhr/MHRP29N0027.svg +14 -14
  139. package/assets/images/menu/dhr/MHRP29N0028.svg +15 -15
  140. package/assets/images/menu/dhr/MHRP38N0001.svg +13 -13
  141. package/assets/images/menu/dhr/MHRP38N0002.svg +14 -14
  142. package/assets/images/menu/dhr/MHRP39N0001.svg +15 -15
  143. package/assets/images/menu/dhr/MHRP39N0002.svg +13 -13
  144. package/assets/images/menu/dhr/MHRP39N0003.svg +16 -16
  145. package/assets/images/menu/dhr/MHRP39N0004.svg +22 -22
  146. package/assets/images/menu/dhr/MHRP39N0005.svg +16 -16
  147. package/assets/images/menu/dhr/MHRP39N0006.svg +17 -17
  148. package/assets/images/menu/dhr/MHRP39N0007.svg +13 -13
  149. package/assets/images/menu/dhr/MHRP39N0008.svg +3 -3
  150. package/assets/images/menu/dhr/MHRP39N0009.svg +3 -3
  151. package/assets/images/menu/dhr/MHRP39N0010.svg +7 -7
  152. package/assets/images/menu/dhr/MHRP39N0011.svg +7 -7
  153. package/assets/images/menu/dhr/MHRP39N0013.svg +10 -10
  154. package/assets/images/menu/dhr/MHRP39N0014.svg +11 -11
  155. package/assets/images/menu/dhr/MHRP39N0015.svg +5 -5
  156. package/assets/images/menu/dhr/MHRP39N0017.svg +11 -11
  157. package/assets/images/menu/dhr/MHRP39N0018.svg +11 -11
  158. package/assets/images/menu/dhr/MHRP39N1222.svg +12 -12
  159. package/assets/images/menu/dhr/MHRP51N0001.svg +9 -9
  160. package/assets/images/menu/dhr/MHRP51N0002.svg +13 -13
  161. package/assets/images/menu/dhr/MHRP52N0001.svg +21 -21
  162. package/assets/images/menu/dhr/MHRP52N0002.svg +21 -21
  163. package/assets/images/menu/dhr/MHRP52N0003.svg +16 -16
  164. package/assets/images/menu/dhr/MHRP75N0001.svg +19 -19
  165. package/assets/images/menu/dhr/MHRP75N0002.svg +25 -25
  166. package/assets/images/menu/dhr/MHRP75N0003.svg +3 -3
  167. package/assets/images/menu/dhr/MHRP75N0006.svg +14 -14
  168. package/assets/images/menu/dhr/MHRP75N0007.svg +19 -19
  169. package/assets/images/menu/dhr/MHRP75N0008.svg +19 -19
  170. package/assets/images/menu/dhr/MHRP77N0007.svg +28 -28
  171. package/assets/images/menu/dhr/MHRP77N0008.svg +17 -17
  172. package/assets/images/menu/dhr/MHRP77N0009.svg +19 -19
  173. package/assets/images/menu/dhr/MHRP77N0010.svg +20 -20
  174. package/assets/images/menu/dhr/MHRP89N1000.svg +5 -5
  175. package/assets/images/menu/dhr/MHRP89N1001.svg +5 -5
  176. package/assets/images/menu/dhr/TASK.svg +9 -9
  177. package/assets/images/menu/dhr/W00F0001.svg +3 -3
  178. package/assets/images/menu/dhr/W00F0002.svg +3 -3
  179. package/assets/images/menu/dhr/W00F0003.svg +3 -3
  180. package/assets/images/menu/dhr/W00F0004.svg +3 -3
  181. package/assets/images/menu/dhr/W09F2000-WEB5.svg +17 -17
  182. package/assets/images/menu/dhr/W09F2000.svg +4 -4
  183. package/assets/images/menu/dhr/W09F2002-WEB5.svg +21 -21
  184. package/assets/images/menu/dhr/W09F2005-WEB5.svg +13 -13
  185. package/assets/images/menu/dhr/W09F2020-WEB5.svg +16 -16
  186. package/assets/images/menu/dhr/W09F2022-WEB5.svg +20 -20
  187. package/assets/images/menu/dhr/W09F2150-WEB5.svg +16 -16
  188. package/assets/images/menu/dhr/W09F2152-WEB5.svg +20 -20
  189. package/assets/images/menu/dhr/W09F2160-WEB5.svg +14 -14
  190. package/assets/images/menu/dhr/W09F2162-WEB5.svg +18 -18
  191. package/assets/images/menu/dhr/W29F4006-WEB5.svg +19 -19
  192. package/assets/images/menu/dhr/W75F2260-WEB5.svg +15 -15
  193. package/assets/images/menu/dhr/W75F2261-WEB5.svg +19 -19
  194. package/assets/images/menu/dhr/W75F3005-WEB5.svg +13 -13
  195. package/assets/images/menu/dhr/W75F4070-WEB5.svg +21 -21
  196. package/assets/images/menu/dhr/W75F4071-WEB5.svg +17 -17
  197. package/assets/images/menu/dhr/W75F4100-WEB5.svg +14 -14
  198. package/assets/images/menu/dhr/W77F1011.svg +19 -19
  199. package/assets/images/menu/dhr/W77F1013.svg +22 -22
  200. package/assets/images/menu/erp/D05.svg +8 -8
  201. package/assets/images/menu/erp/D06.svg +4 -4
  202. package/assets/images/menu/erp/D90R.svg +9 -9
  203. package/assets/images/menu/erp/DBC.svg +9 -9
  204. package/assets/images/menu/erp/W00F0001.svg +3 -3
  205. package/assets/images/menu/erp/W00F0002.svg +3 -3
  206. package/assets/images/menu/erp/W00F0003.svg +3 -3
  207. package/assets/images/menu/erp/W00F0004.svg +3 -3
  208. package/assets/images/menu/erp/W05F0001.svg +16 -16
  209. package/assets/images/menu/erp/W05F0001N0000.svg +16 -16
  210. package/assets/images/menu/erp/W05F0004N0000.svg +6 -6
  211. package/assets/images/menu/erp/W05F0006N0000.svg +30 -30
  212. package/assets/images/menu/erp/W05F0007N0000.svg +6 -6
  213. package/assets/images/menu/erp/W05F0008N0000.svg +14 -14
  214. package/assets/images/menu/erp/W05F0011N0000.svg +20 -20
  215. package/assets/images/menu/erp/W05F0013N0000.svg +9 -9
  216. package/assets/images/menu/erp/W05F4000N0000.svg +9 -9
  217. package/assets/images/menu/erp/W06F0001.svg +17 -17
  218. package/assets/images/menu/erp/W06F0001N0000.svg +17 -17
  219. package/assets/images/menu/erp/W06F0004N0000.svg +22 -22
  220. package/assets/images/menu/erp/W06F0005N0000.svg +22 -22
  221. package/assets/images/menu/erp/W06F0006N0000.svg +55 -55
  222. package/assets/images/menu/erp/W06F0008N0000.svg +17 -17
  223. package/assets/images/menu/erp/W94F1000N0000.svg +9 -9
  224. package/assets/images/menu/erp/W94F1000N0001.svg +9 -9
  225. package/assets/images/menu/erp/WA3F1025.svg +5 -5
  226. package/assets/images/menu/erp/WA3F2100.svg +10 -10
  227. package/assets/storybook/avatar01.svg +9 -9
  228. package/assets/storybook/cover01.svg +9 -9
  229. package/components/accordion/details.js +6 -2
  230. package/components/accordion/group.js +9 -2
  231. package/components/accordion/index.js +15 -2
  232. package/components/accordion/summary.js +27 -4
  233. package/components/alert/index.js +33 -2
  234. package/components/alert/notify.js +22 -12
  235. package/components/avatar/index.js +81 -22
  236. package/components/badge/index.js +45 -20
  237. package/components/button/icon.js +56 -25
  238. package/components/button/index.js +65 -16
  239. package/components/button/more.js +35 -15
  240. package/components/button/ripple-effect.js +10 -0
  241. package/components/card/body.js +7 -2
  242. package/components/card/extra.js +7 -2
  243. package/components/card/footer.js +7 -2
  244. package/components/card/header.js +7 -2
  245. package/components/card/index.js +22 -2
  246. package/components/chart/Pie/Circle.js +1 -0
  247. package/components/chart/Pie/Sector.js +19 -2
  248. package/components/chart/Pie/Sectors.js +10 -0
  249. package/components/chart/Pie/index.js +36 -4
  250. package/components/chart/Pie-v2/Circle.js +1 -0
  251. package/components/chart/Pie-v2/Sector.js +15 -2
  252. package/components/chart/Pie-v2/Sectors.js +20 -0
  253. package/components/chart/Pie-v2/index.js +38 -11
  254. package/components/chart/bar/Axis.js +12 -0
  255. package/components/chart/bar/Bar.js +35 -13
  256. package/components/chart/bar/Grid.js +18 -0
  257. package/components/chart/bar/Labels.js +18 -0
  258. package/components/chart/bar/Points.js +17 -0
  259. package/components/chart/bar/index.js +26 -6
  260. package/components/chart/bar-v2/Axis.js +12 -0
  261. package/components/chart/bar-v2/Bar.js +36 -15
  262. package/components/chart/bar-v2/Grid.js +18 -0
  263. package/components/chart/bar-v2/Labels.js +18 -0
  264. package/components/chart/bar-v2/Points.js +17 -0
  265. package/components/chart/bar-v2/index.js +26 -6
  266. package/components/chart/line/Axis.js +16 -4
  267. package/components/chart/line/Grid.js +19 -2
  268. package/components/chart/line/Labels.js +18 -0
  269. package/components/chart/line/Path.js +33 -23
  270. package/components/chart/line/Point.js +40 -6
  271. package/components/chart/line/Title.js +3 -0
  272. package/components/chart/line/index.js +35 -12
  273. package/components/chart/line-v2/Axis.js +13 -0
  274. package/components/chart/line-v2/Grid.js +18 -0
  275. package/components/chart/line-v2/Labels.js +18 -0
  276. package/components/chart/line-v2/Path.js +33 -23
  277. package/components/chart/line-v2/Point.js +35 -6
  278. package/components/chart/line-v2/Title.js +3 -0
  279. package/components/chart/line-v2/index.js +30 -12
  280. package/components/check-text/index.js +8 -0
  281. package/components/check-text/interview-confirmation.js +7 -0
  282. package/components/check-text/interview-status.js +7 -0
  283. package/components/chip/attach.js +22 -9
  284. package/components/chip/index.js +33 -6
  285. package/components/collapse/index.js +13 -0
  286. package/components/divider/index.js +13 -2
  287. package/components/form-control/attachment/index.js +202 -41
  288. package/components/form-control/calendar/function.js +207 -153
  289. package/components/form-control/calendar/index.js +46 -21
  290. package/components/form-control/calendar/range.js +28 -11
  291. package/components/form-control/checkbox/index.js +37 -4
  292. package/components/form-control/control/index.js +13 -3
  293. package/components/form-control/date-picker/index-old.js +0 -18
  294. package/components/form-control/date-picker/index.js +99 -23
  295. package/components/form-control/date-range-picker/index.js +180 -44
  296. package/components/form-control/dropdown/index.js +314 -101
  297. package/components/form-control/dropdown-box/index.js +35 -6
  298. package/components/form-control/form/index.js +2 -0
  299. package/components/form-control/form-group/index.js +6 -1
  300. package/components/form-control/helper-text/index.js +9 -2
  301. package/components/form-control/input-base/index.js +73 -9
  302. package/components/form-control/label/index.js +12 -2
  303. package/components/form-control/money-input/index.js +143 -54
  304. package/components/form-control/number-input/index.js +124 -26
  305. package/components/form-control/number-input/index2.js +119 -78
  306. package/components/form-control/phone-input/index.js +85 -23
  307. package/components/form-control/radio/index.js +28 -9
  308. package/components/form-control/text-input/index.js +46 -10
  309. package/components/form-control/time-picker/index.js +71 -14
  310. package/components/form-control/time-picker/swiper.js +73 -21
  311. package/components/form-control/toggle/index.js +23 -8
  312. package/components/form-view/helper-text.js +2 -2
  313. package/components/form-view/index.js +14 -0
  314. package/components/form-view/input.js +13 -2
  315. package/components/form-view/label.js +2 -0
  316. package/components/grid/Col.js +16 -2
  317. package/components/grid/Container.js +21 -2
  318. package/components/grid/Row.js +21 -2
  319. package/components/grid/index.js +44 -2
  320. package/components/image/index.js +22 -2
  321. package/components/index.js +31 -62
  322. package/components/list/list-item-action.js +9 -0
  323. package/components/list/list-item-icon.js +9 -0
  324. package/components/list/list-item-text.js +5 -0
  325. package/components/list/list-item.js +11 -0
  326. package/components/list/list.js +13 -0
  327. package/components/list/sub-header.js +4 -0
  328. package/components/modal/body.js +6 -2
  329. package/components/modal/footer.js +11 -2
  330. package/components/modal/header.js +12 -2
  331. package/components/modal/index.js +10 -2
  332. package/components/modal/modal.js +52 -11
  333. package/components/others/extra/index.js +10 -3
  334. package/components/others/import/index.js +7 -0
  335. package/components/others/option-wrapper/index.js +7 -4
  336. package/components/others/scrollbar/index.js +3 -0
  337. package/components/paging/page-info.js +99 -35
  338. package/components/paging/page-selector.js +35 -7
  339. package/components/paging/page-selector2.js +74 -35
  340. package/components/paper/index.js +11 -0
  341. package/components/popover/body.js +6 -2
  342. package/components/popover/footer.js +11 -2
  343. package/components/popover/header.js +7 -2
  344. package/components/popover/index.js +146 -54
  345. package/components/popup/danger_popup.js +19 -0
  346. package/components/popup/index.js +48 -2
  347. package/components/popup/proposals_popup.js +49 -10
  348. package/components/popup/v2/index.js +47 -13
  349. package/components/progress/circular.js +48 -10
  350. package/components/progress/linear.js +20 -4
  351. package/components/rating/index.js +32 -8
  352. package/components/slider/slider-container.js +40 -3
  353. package/components/slider/slider-item.js +25 -10
  354. package/components/status/index.js +14 -2
  355. package/components/tab/tab-container.js +18 -4
  356. package/components/tab/tab-header.js +24 -4
  357. package/components/tab/tab-panel.js +16 -4
  358. package/components/tab/tab.js +30 -6
  359. package/components/tooltip/index.js +97 -12
  360. package/components/tooltip/portal.js +2 -0
  361. package/components/transfer/index.js +70 -25
  362. package/components/tree-view/index.js +202 -62
  363. package/components/typography/index.js +70 -47
  364. package/global/index.js +8 -0
  365. package/icons/basic.js +232 -0
  366. package/icons/effect.js +32 -15
  367. package/icons/general/clock/clock.js +2 -0
  368. package/icons/general/color-handler/background.js +2 -0
  369. package/icons/general/color-handler/text.js +2 -0
  370. package/icons/general/emoji/emoji.js +2 -0
  371. package/icons/general/font-properties/bold.js +2 -0
  372. package/icons/general/font-properties/font-family.js +2 -0
  373. package/icons/general/font-properties/font-size.js +2 -0
  374. package/icons/general/font-properties/italic.js +2 -0
  375. package/icons/general/font-properties/underline.js +2 -0
  376. package/icons/general/hyperlink/hyperlink.js +2 -0
  377. package/icons/general/indent/decrease.js +2 -0
  378. package/icons/general/indent/increase.js +2 -0
  379. package/icons/general/list/bullets.js +2 -0
  380. package/icons/general/list/numbering.js +2 -0
  381. package/icons/general/picture/picture.js +2 -0
  382. package/icons/general/steps/redo.js +2 -0
  383. package/icons/general/steps/undo.js +2 -0
  384. package/icons/general/text-align/center.js +2 -0
  385. package/icons/general/text-align/justify.js +2 -0
  386. package/icons/general/text-align/left.js +2 -0
  387. package/icons/general/text-align/right.js +2 -0
  388. package/icons/menu/dhr.js +1 -2
  389. package/icons/menu/index.js +2 -2
  390. package/icons/menu/v2/index.js +15 -2
  391. package/package.json +42 -42
  392. package/readme.md +1027 -1022
  393. package/styles/animation.js +58 -15
  394. package/styles/color-helper.js +157 -127
  395. package/styles/colors.js +9 -17
  396. package/styles/general.js +80 -18
  397. package/styles/typography.js +4 -4
  398. package/styles/utils.js +20 -19
  399. package/theme/createBreakpoints.js +18 -7
  400. package/theme/make-styles.js +5 -2
  401. package/theme/set-theme.js +9 -6
  402. package/theme/settings.js +2 -3
  403. package/theme/theme-provider.js +1 -0
  404. package/utils/array/array.js +54 -45
  405. package/utils/{classNames.js → classNames/index.js} +5 -0
  406. package/utils/console.js +6 -0
  407. package/utils/date.js +138 -69
  408. package/utils/error/error.js +11 -3
  409. package/utils/error/errors.js +147 -100
  410. package/utils/getFileType.js +9 -0
  411. package/utils/handleBreakpoints.js +5 -0
  412. package/utils/intersectionObserver.js +5 -0
  413. package/utils/{isMobile.js → isMobile/index.js} +0 -0
  414. package/utils/iterator.js +9 -0
  415. package/utils/map-parent.js +10 -3
  416. package/utils/object/extend.js +10 -0
  417. package/utils/object/object.js +11 -12
  418. package/utils/parseHTML.js +1 -0
  419. package/utils/promisify.js +5 -0
  420. package/utils/randomString.js +7 -0
  421. package/utils/remove-unicode.js +1 -0
  422. package/utils/render-portal.js +9 -1
  423. package/utils/renderHTML.js +6 -4
  424. package/utils/renderIcon.js +19 -9
  425. package/utils/sb-template.js +5 -6
  426. package/utils/string/capitalize.js +1 -0
  427. package/utils/string/capitalizeSentenceCase.js +2 -0
  428. package/utils/string/string.js +13 -0
  429. package/utils/type.js +21 -0
  430. package/utils/updatePosition.js +5 -4
  431. package/utils/useDelayUnmount.js +4 -0
  432. package/utils/useElementSize.js +3 -9
  433. package/utils/useEventListener.js +6 -12
  434. package/utils/useInput.js +6 -0
  435. package/utils/{useMediaQuery.js → useMediaQuery/index.js} +10 -8
  436. package/utils/useOnClickOutside.js +4 -2
  437. package/utils/usePortal.js +19 -12
  438. package/utils/validate.js +53 -39
@@ -1,4 +1,5 @@
1
1
  /** @jsxRuntime classic */
2
+
2
3
  /** @jsx jsx */
3
4
  import { css, jsx } from '@emotion/core';
4
5
  import { Button, ButtonIcon, Divider, HelperText, InputBase, Label, Typography } from "../..";
@@ -24,58 +25,76 @@ const {
24
25
  spacing,
25
26
  zIndex: zIndexCORE
26
27
  } = useTheme();
28
+
27
29
  const toLocalTimestamp = t => {
28
30
  if (typeof t === 'object' && t.getTime) {
29
31
  t = t.getTime();
30
32
  }
33
+
31
34
  if (typeof t === 'string' && !t.match(/\d{13}/)) {
32
35
  t = Date.parse(t).getTime();
33
36
  }
37
+
34
38
  t = parseInt(t, 10) - new Date().getTimezoneOffset() * 60 * 1000;
35
39
  return t;
36
40
  };
41
+
37
42
  const getDaysFrom1970 = t => {
38
43
  return Math.floor(toLocalTimestamp(t) / 86400000);
39
44
  };
45
+
40
46
  const countDays = (start, end, startFromZero) => {
41
47
  return Math.abs(getDaysFrom1970(start) - getDaysFrom1970(end)) + (startFromZero ? 0 : 1);
42
48
  };
49
+
43
50
  const formatValue = (value, format, utc = false) => {
44
51
  return moment(value).format(format, utc);
45
52
  };
53
+
46
54
  const getDateOfWeek = date => {
47
55
  let day = date.getDay();
48
56
  if (day === 0) day = 7;
49
57
  return day - 1;
50
58
  };
59
+
51
60
  const isValidDate = v => {
52
61
  if (!v) return false;
62
+
53
63
  if (Object.prototype.toString.call(v) === '[object Date]') {
54
64
  return true;
55
65
  }
66
+
56
67
  return !isNaN(Date.parse(new Date(v)));
57
68
  };
69
+
58
70
  const isValidValues = v => {
59
71
  if (!v || !Array.isArray(v) || v.length !== 2) {
60
72
  return false;
61
73
  }
74
+
62
75
  return !!(isValidDate(v[0]) && isValidDate(v[1]) && +moment(v[0]).diff(v[1]) <= 0);
63
76
  };
77
+
64
78
  const isToday = day => {
65
79
  return +moment(day).diff(new Date().setHours(0, 0, 0, 0)) === 0 ? unique.day.today : '';
66
80
  };
81
+
67
82
  const isLimit = (day, max, min) => {
68
83
  return isBefore(min, day) || isAfter(max, day) ? unique.day.limit : '';
69
84
  };
85
+
70
86
  const isBefore = (min, time) => {
71
87
  return min && isValidDate(min) && moment(time).diff(min) < 0;
72
88
  };
89
+
73
90
  const isAfter = (max, time) => {
74
91
  return max && isValidDate(max) && moment(time).diff(max) > 0;
75
92
  };
93
+
76
94
  const parseDate = day => {
77
95
  return Date.parse(new Date(day));
78
96
  };
97
+
79
98
  const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
80
99
  action = {},
81
100
  actionIconAt,
@@ -166,6 +185,7 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
166
185
  valueTo.current = v;
167
186
  setValueTo();
168
187
  }, [valueTo]);
188
+
169
189
  const isActive = day => {
170
190
  if (values.current[0] && +moment(values.current[0]).diff(day) === 0) {
171
191
  if (values.current[1] && +moment(values.current[0]).diff(values.current[1]) < 0) {
@@ -176,20 +196,26 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
176
196
  } else if (values.current[1] && parseDate(values.current[1]) === parseDate(day)) {
177
197
  return `${unique.day.to + ' ' + unique.day.active}`;
178
198
  }
199
+
179
200
  return '';
180
201
  };
202
+
181
203
  const isBetween = dayParsed => {
182
204
  if (values.current[0] && values.current[1] && parseDate(values.current[0]) < dayParsed && dayParsed < parseDate(values.current[1])) {
183
205
  return unique.day.between;
184
206
  }
207
+
185
208
  return '';
186
209
  };
210
+
187
211
  const countDay = v => {
188
212
  if ((v === null || v === void 0 ? void 0 : v.length) === 2) {
189
213
  return Number(+moment(v[1]).diff(v[0]) + (startFromZero ? 0 : 1));
190
214
  }
215
+
191
216
  return Number(startFromZero ? 0 : 1);
192
217
  };
218
+
193
219
  const onChangeValue = v => {
194
220
  setInputValue(v[0], true);
195
221
  setInputValue(v[1], false);
@@ -197,9 +223,11 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
197
223
  value: [formatValue(v[0], returnFormat), formatValue(v[1], returnFormat), selected.current]
198
224
  });
199
225
  };
226
+
200
227
  const onDayClick = e => {
201
228
  const el = e.currentTarget;
202
229
  const v = parseInt(el.dataset.time, 10);
230
+
203
231
  if (values.current.length === 0) {
204
232
  //push
205
233
  el.classList.add(unique.day.active);
@@ -240,21 +268,23 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
240
268
  }
241
269
  }
242
270
  };
271
+
243
272
  const renderCalendar = (time, type) => {
244
273
  time = new Date(time);
245
274
  const firstDay = new Date(new Date(time).setDate(1)),
246
- lastDay = new Date(firstDay.getFullYear(), firstDay.getMonth() + 1, 0),
247
- prevDay = new Date(firstDay.getFullYear(), firstDay.getMonth(), 0),
248
- lastDate = lastDay.getDate(),
249
- prevDate = prevDay.getDate();
275
+ lastDay = new Date(firstDay.getFullYear(), firstDay.getMonth() + 1, 0),
276
+ prevDay = new Date(firstDay.getFullYear(), firstDay.getMonth(), 0),
277
+ lastDate = lastDay.getDate(),
278
+ prevDate = prevDay.getDate();
250
279
  let tableBody = [],
251
- tableRaw = [],
252
- tableData = [],
253
- weekDateFirst = getDateOfWeek(firstDay),
254
- weekDateLast = getDateOfWeek(lastDay);
255
- /**
256
- * days of previous month
280
+ tableRaw = [],
281
+ tableData = [],
282
+ weekDateFirst = getDateOfWeek(firstDay),
283
+ weekDateLast = getDateOfWeek(lastDay);
284
+ /**
285
+ * days of previous month
257
286
  */
287
+
258
288
  for (let i = weekDateFirst; i > 0; i--) {
259
289
  const day = Date.parse(new Date(time.getFullYear(), time.getMonth(), 1));
260
290
  tableData.push(jsx("td", {
@@ -265,9 +295,11 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
265
295
  className: unique.day.day
266
296
  })));
267
297
  }
268
- /**
269
- * days of current month
298
+ /**
299
+ * days of current month
270
300
  */
301
+
302
+
271
303
  for (let i = 0; i < lastDate; i++) {
272
304
  const day = new Date(time.getFullYear(), time.getMonth(), i + 1);
273
305
  tableData.push(jsx("td", {
@@ -292,9 +324,11 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
292
324
  type: 'h6'
293
325
  }, i + 1)));
294
326
  }
295
- /**
296
- * days of next month
327
+ /**
328
+ * days of next month
297
329
  */
330
+
331
+
298
332
  for (let i = 0; i < 13 - weekDateLast; i++) {
299
333
  const day = Date.parse(new Date(time.getFullYear(), time.getMonth() + 1, 0));
300
334
  tableData.push(jsx("td", {
@@ -305,6 +339,7 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
305
339
  className: unique.day.day
306
340
  })));
307
341
  }
342
+
308
343
  for (let i = 0; i < 6; i++) {
309
344
  for (let j = 0; j < 7; j++) {
310
345
  tableRaw.push(tableData[7 * i + j] || jsx("td", {
@@ -312,26 +347,31 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
312
347
  className: classNames(unique.table.data, 'next_month')
313
348
  }));
314
349
  }
350
+
315
351
  tableBody.push(jsx("tr", {
316
352
  key: i,
317
353
  className: unique.day.week
318
354
  }, tableRaw));
319
355
  tableRaw = [];
320
356
  }
357
+
321
358
  if (type === 'from') {
322
359
  onUpdateNavigator(time, navigatorFromRefs);
360
+
323
361
  if (tableFrRef.current) {
324
362
  tableFrRef.current.querySelector('tbody').remove();
325
363
  render(tableBody, tableFrRef.current.appendChild(document.createElement('tbody')));
326
364
  }
327
365
  } else if (type === 'to') {
328
366
  onUpdateNavigator(time, navigatorToRefs);
367
+
329
368
  if (tableToRef.current) {
330
369
  tableToRef.current.querySelector('tbody').remove();
331
370
  render(tableBody, tableToRef.current.appendChild(document.createElement('tbody')));
332
371
  }
333
372
  }
334
373
  };
374
+
335
375
  const updateFromTo = (times = [new Date(), new Date()]) => {
336
376
  const timeFr = new Date(times[0]);
337
377
  const timeTo = new Date(times[1]);
@@ -340,6 +380,7 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
340
380
  updateValueFr(from);
341
381
  updateValueTo(to);
342
382
  };
383
+
343
384
  const update = v => {
344
385
  if (v) {
345
386
  if (isValidValues(v)) {
@@ -355,8 +396,7 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
355
396
  } else {
356
397
  updateValues([new Date().setHours(0, 0, 0, 0), new Date().setHours(0, 0, 0, 0)]);
357
398
  updateSelected(0);
358
- updateFromTo(values.current);
359
- // setInputValue(values.current[0], true);
399
+ updateFromTo(values.current); // setInputValue(values.current[0], true);
360
400
  // setInputValue(values.current[1], false);
361
401
  }
362
402
  };
@@ -377,6 +417,7 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
377
417
  style.left = left;
378
418
  style.top = top + height + 4;
379
419
  style.transformOrigin = '50% 20%';
420
+
380
421
  if (style.top + pickerHeight > innerHeight) {
381
422
  if (top > pickerHeight) {
382
423
  style.top = innerHeight - pickerHeight - 4;
@@ -386,71 +427,88 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
386
427
  style.transformOrigin = 'center';
387
428
  }
388
429
  }
430
+
389
431
  const pickerWidth = window.innerWidth <= 633 ? 300 : 633;
432
+
390
433
  if (left + pickerWidth > innerWidth) {
391
434
  if (innerWidth > pickerWidth) {
392
435
  style.left = (innerWidth - pickerWidth) / 2;
393
436
  }
394
437
  }
438
+
395
439
  return pickerCSS.picker(style, width).styles;
396
440
  };
441
+
397
442
  const clearDayHovering = arr => {
398
443
  if (values.current.length !== 2) {
399
444
  for (let i in arr) {
400
445
  arr[i].classList.remove(unique.day.from, unique.day.to, unique.day.between);
401
446
  }
447
+
402
448
  tooltipRef.current.style.visibility = 'hidden';
403
449
  }
404
450
  };
451
+
405
452
  const createBackground = () => {
406
453
  let background = document.getElementById(unique.backGr);
454
+
407
455
  if (!background) {
408
456
  background = document.createElement('div');
409
457
  background.id = unique.backGr;
410
458
  background.classList.add(unique.portal, unique.backGr);
411
459
  document.body.appendChild(background);
412
460
  }
461
+
413
462
  background.style.cssText = pickerCSS.backGr;
414
463
  return background;
415
464
  };
465
+
416
466
  const createPicker = anchor => {
417
467
  const picker = document.createElement('div');
418
468
  picker.id = unique.picker;
419
469
  picker.style.cssText = getPickerStyle(anchor);
420
470
  return picker;
421
471
  };
472
+
422
473
  const setPrevTime = (e, level, time, type) => {
423
474
  if (!valueFr.current || !time) return;
424
475
  const firstDayOfMin = min && new Date(new Date(min).setDate(1)).setHours(0, 0, 0, 0);
425
476
  const firstDayOfTime = new Date(new Date(time).setDate(1)).setHours(0, 0, 0, 0);
477
+
426
478
  if (level === 'month') {
427
479
  if (firstDayOfMin) {
428
480
  if (type === 'to' && getDaysFrom1970(firstDayOfTime) - getDaysFrom1970(firstDayOfMin) < 59) {
429
481
  e.currentTarget.disabled = true;
430
482
  return;
431
483
  }
484
+
432
485
  if (getDaysFrom1970(firstDayOfTime) - getDaysFrom1970(firstDayOfMin) < 28) {
433
486
  e.currentTarget.disabled = true;
434
487
  return;
435
488
  }
436
489
  }
490
+
437
491
  time.setMonth(time.getMonth() - 1);
438
492
  renderCalendar(time, type);
439
493
  }
494
+
440
495
  if (level === 'year') {
441
496
  if (firstDayOfMin) {
442
497
  if (type === 'to' && getDaysFrom1970(firstDayOfTime) - getDaysFrom1970(firstDayOfMin) < 396) {
443
498
  e.currentTarget.disabled = true;
444
499
  return;
445
500
  }
501
+
446
502
  if (getDaysFrom1970(firstDayOfTime) - getDaysFrom1970(firstDayOfMin) < 365) {
447
503
  e.currentTarget.disabled = true;
448
504
  return;
449
505
  }
450
506
  }
507
+
451
508
  time.setFullYear(time.getFullYear() - 1);
452
509
  renderCalendar(time, type);
453
510
  }
511
+
454
512
  if (type === 'to') {
455
513
  if (+moment(time).diff(valueFr.current, 'months') < 1) {
456
514
  valueFr.current.setFullYear(time.getFullYear());
@@ -459,38 +517,46 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
459
517
  }
460
518
  }
461
519
  };
520
+
462
521
  const setNextTime = (e, level, time, type) => {
463
522
  if (!valueTo.current || !time) return;
464
523
  const firstDayOfMax = max && new Date(new Date(max).setDate(1)).setHours(0, 0, 0, 0);
465
524
  const firstDayOfTime = new Date(new Date(time).setDate(1)).setHours(0, 0, 0, 0);
525
+
466
526
  if (level === 'month') {
467
527
  if (firstDayOfMax) {
468
528
  if (type === 'from' && getDaysFrom1970(firstDayOfTime) - getDaysFrom1970(firstDayOfMax) > -59) {
469
529
  e.currentTarget.disabled = true;
470
530
  return;
471
531
  }
532
+
472
533
  if (getDaysFrom1970(firstDayOfTime) - getDaysFrom1970(firstDayOfMax) > -28) {
473
534
  e.currentTarget.disabled = true;
474
535
  return;
475
536
  }
476
537
  }
538
+
477
539
  time.setMonth(time.getMonth() + 1);
478
540
  renderCalendar(time, type);
479
541
  }
542
+
480
543
  if (level === 'year') {
481
544
  if (firstDayOfMax) {
482
545
  if (type === 'from' && getDaysFrom1970(firstDayOfTime) - getDaysFrom1970(firstDayOfMax) > -396) {
483
546
  e.currentTarget.disabled = true;
484
547
  return;
485
548
  }
549
+
486
550
  if (getDaysFrom1970(firstDayOfTime) - getDaysFrom1970(firstDayOfMax) > -365) {
487
551
  e.currentTarget.disabled = true;
488
552
  return;
489
553
  }
490
554
  }
555
+
491
556
  time.setFullYear(time.getFullYear() + 1);
492
557
  renderCalendar(time, type);
493
558
  }
559
+
494
560
  if (type === 'from') {
495
561
  if (+moment(time).diff(valueTo.current, 'months') >= 0) {
496
562
  valueTo.current.setFullYear(time.getFullYear());
@@ -499,11 +565,14 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
499
565
  }
500
566
  }
501
567
  };
568
+
502
569
  const setButtonState = () => {
503
570
  const isVisible = isEqual(values.current, tempValues.current);
571
+
504
572
  const query = function (selector) {
505
573
  return footerRef.current.querySelector(selector);
506
574
  };
575
+
507
576
  const close = query(`.${unique.close}`);
508
577
  const cancel = query(`.${unique.cancel}`);
509
578
  const confirm = query(`.${unique.confirm}`);
@@ -515,6 +584,7 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
515
584
  display: 'inline-flex',
516
585
  visibility: 'visible'
517
586
  };
587
+
518
588
  if (isVisible) {
519
589
  Object.assign(close.style, visible);
520
590
  Object.assign(cancel.style, hidden);
@@ -525,72 +595,84 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
525
595
  Object.assign(close.style, hidden);
526
596
  }
527
597
  };
598
+
528
599
  const onCancel = () => {
529
600
  updateValues(tempValues.current);
530
601
  setButtonState();
531
602
  closePicker();
532
603
  };
604
+
533
605
  const onConfirm = () => {
534
606
  setButtonState();
607
+
535
608
  if (values.current.length === 1) {
536
609
  onChangeValue([values.current[0], values.current[0]]);
537
610
  } else {
538
611
  onChangeValue(values.current);
539
612
  }
613
+
540
614
  closePicker();
541
615
  };
616
+
542
617
  const onSwap = open => {
543
618
  if (!isEnable) return;
544
619
  const t = iconRef.current.childNodes[+open];
620
+
545
621
  if (open) {
546
- Object.assign(t.style, {
547
- ...hiddenStyle
622
+ Object.assign(t.style, { ...hiddenStyle
548
623
  });
549
- Object.assign(t.previousSibling.style, {
550
- ...activeStyle
624
+ Object.assign(t.previousSibling.style, { ...activeStyle
551
625
  });
552
626
  setTimeout(() => {
553
627
  t.previousSibling.style.pointerEvents = null;
554
628
  }, 200);
555
629
  } else {
556
- Object.assign(t.style, {
557
- ...hiddenStyle
630
+ Object.assign(t.style, { ...hiddenStyle
558
631
  });
559
- Object.assign(t.nextSibling.style, {
560
- ...activeStyle
632
+ Object.assign(t.nextSibling.style, { ...activeStyle
561
633
  });
562
634
  setTimeout(() => {
563
635
  t.nextSibling.style.pointerEvents = null;
564
636
  }, 200);
565
637
  }
566
638
  };
639
+
567
640
  const onScroll = () => {
568
641
  const node = document.getElementById(unique.picker);
642
+
569
643
  if (!ipConRef.current || !node) {
570
644
  window.removeEventListener('scroll', onScroll);
571
645
  return;
572
646
  }
647
+
573
648
  updatePosition(ipConRef.current, node, closePicker);
574
649
  };
650
+
575
651
  const onResize = () => {
576
652
  if (!ref.current) return;
577
653
  const {
578
654
  width
579
655
  } = ref.current.getBoundingClientRect();
580
656
  const node = document.getElementById(unique.picker);
657
+
581
658
  if (node) {
582
659
  node.style.width = width + 'px';
583
660
  }
661
+
584
662
  onScroll();
585
663
  };
664
+
586
665
  const onDayHover = (e, arr) => {
587
666
  const currentTime = parseInt(e.target.dataset.time, 10);
588
667
  let tooltipContent = '';
589
668
  if (e.target.classList.contains(unique.day.limit)) return;
669
+
590
670
  for (let i in arr) {
591
671
  const time = parseInt(arr[i].dataset.time, 10);
672
+
592
673
  if (values.current[0] && !values.current[1]) {
593
674
  const firstValue = Number(values.current[0]);
675
+
594
676
  if (firstValue <= time && currentTime >= time && currentTime !== firstValue) {
595
677
  if (time === firstValue) {
596
678
  arr[i].classList.remove(unique.day.between, unique.day.to);
@@ -618,12 +700,15 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
618
700
  }
619
701
  }
620
702
  }
703
+
621
704
  if (values.current[0] && !values.current[1]) {
622
705
  const dates = Math.abs(countDays(new Date(values.current), new Date(currentTime), startFromZero));
623
706
  const tooltip = tooltipRef.current;
707
+
624
708
  if (onShowTooltip && dates > 0) {
625
709
  tooltipContent = dates + ' ' + unitText;
626
710
  }
711
+
627
712
  if (tooltipContent) {
628
713
  const tooltipBounding = tooltip.getBoundingClientRect();
629
714
  const dayBounding = e.target.getBoundingClientRect();
@@ -643,14 +728,17 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
643
728
  tooltipRef.current.style.visibility = 'hidden';
644
729
  }
645
730
  };
731
+
646
732
  const onPickerHover = (e, arr) => {
647
733
  arr = Array.from(arr);
734
+
648
735
  if (e.target.tagName && e.target.tagName.toLowerCase() === 'td') {
649
736
  onDayHover(e, arr);
650
737
  } else {
651
738
  clearDayHovering(arr);
652
739
  }
653
740
  };
741
+
654
742
  const pressESCHandler = event => {
655
743
  if (event.key === 'Escape') {
656
744
  onClickOutside({
@@ -658,10 +746,12 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
658
746
  });
659
747
  }
660
748
  };
749
+
661
750
  const renderPicker = () => {
662
751
  renderCalendar(valueFr.current, 'from');
663
752
  renderCalendar(valueTo.current, 'to');
664
753
  };
754
+
665
755
  const openPicker = anchor => {
666
756
  const backGr = createBackground();
667
757
  const picker = createPicker(anchor);
@@ -669,31 +759,34 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
669
759
  const arr = pickerRef.current.getElementsByTagName('td');
670
760
  updateTempValues(values.current.length === 1 ? [values.current[0], values.current[0]] : values.current);
671
761
  setTimeout(() => {
672
- Object.assign(picker.style, {
673
- ...pickerCSS.active
762
+ Object.assign(picker.style, { ...pickerCSS.active
674
763
  });
675
764
  renderPicker();
676
765
  pickerRef.current.addEventListener('mouseover', e => onPickerHover(e, arr));
677
766
  window.addEventListener('resize', onResize);
678
767
  window.addEventListener('scroll', onScroll);
679
768
  document.addEventListener('mousedown', onClickOutside);
769
+
680
770
  if (pressESCToClose) {
681
771
  document.addEventListener('keydown', pressESCHandler);
682
772
  }
773
+
683
774
  controls && setButtonState();
684
775
  });
685
776
  };
777
+
686
778
  const closePicker = () => {
687
779
  const backGr = document.getElementById(unique.backGr);
688
780
  if (!backGr) return;
689
781
  const picker = backGr.querySelector(`#${unique.picker}`);
690
782
  if (!picker) return;
691
- Object.assign(picker.style, {
692
- ...pickerCSS.remove
783
+ Object.assign(picker.style, { ...pickerCSS.remove
693
784
  });
785
+
694
786
  if (pressESCToClose) {
695
787
  document.removeEventListener('keydown', pressESCHandler);
696
788
  }
789
+
697
790
  document.removeEventListener('mousedown', onClickOutside);
698
791
  window.removeEventListener('scroll', onScroll);
699
792
  window.removeEventListener('resize', onResize);
@@ -701,18 +794,22 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
701
794
  backGr.remove();
702
795
  }, 200);
703
796
  pickerRef.current && pickerRef.current.removeEventListener('mouseover', onPickerHover);
797
+
704
798
  if (ipConRef.current) {
705
799
  ipConRef.current.classList.remove(unique.focus);
706
800
  ipConRef.current.style.zIndex = null;
707
801
  }
802
+
708
803
  ipRef.current && ipRef.current.blur();
709
804
  updateTempValues([]);
710
805
  };
806
+
711
807
  const onClickOutside = e => {
712
808
  if (ipConRef.current && !ipConRef.current.contains(e.target) && ipRef.current && !ipRef.current.contains(e.target) && pickerRef.current && !pickerRef.current.contains(e.target)) {
713
809
  controls ? onCancel() : closePicker();
714
810
  }
715
811
  };
812
+
716
813
  const triggerFocus = () => {
717
814
  if (!ipConRef.current.classList.contains(unique.focus)) {
718
815
  ipRef.current.focus();
@@ -722,18 +819,22 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
722
819
  });
723
820
  }
724
821
  };
822
+
725
823
  const onInputFocus = () => {
726
824
  const el = ipConRef.current;
825
+
727
826
  if (!el.classList.contains(unique.focus)) {
728
827
  el.classList.add(unique.focus);
729
828
  openPicker();
730
829
  }
731
830
  };
831
+
732
832
  const setInputValue = (time, reset, unshift = false) => {
733
833
  if (!ipRef.current) return;
734
834
  const el = ipRef.current;
735
835
  let enUnitText = locale.get() === 'en' && selected.current > 1 ? unitText + 's' : unitText;
736
836
  let tempValue;
837
+
737
838
  if (!reset) {
738
839
  if (unshift) {
739
840
  tempValue = formatValue(time, displayFormat) + ' - ' + el.value + (showUnitCount ? ` (${selected.current} ${enUnitText})` : '');
@@ -743,9 +844,11 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
743
844
  } else {
744
845
  tempValue = formatValue(time, displayFormat);
745
846
  }
847
+
746
848
  el.value = capitalizeSentenceCase(tempValue);
747
849
  clearAble && onSwap(false);
748
850
  };
851
+
749
852
  const onClear = () => {
750
853
  if (!clearAble || !ipRef.current) return;
751
854
  ipRef.current.value = '';
@@ -756,6 +859,7 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
756
859
  !!onChange && onChange(e);
757
860
  onSwap(true);
758
861
  };
862
+
759
863
  useEffect(() => {
760
864
  update(defaultValue);
761
865
  return () => {
@@ -772,8 +876,10 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
772
876
  if (!readOnly) {
773
877
  ipRef.current.addEventListener('focus', onInputFocus);
774
878
  }
879
+
775
880
  return () => {
776
881
  if (!ipRef.current) return;
882
+
777
883
  if (!readOnly) {
778
884
  ipRef.current.removeEventListener('focus', onInputFocus);
779
885
  }
@@ -783,26 +889,33 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
783
889
  if (min) {
784
890
  let arr = [];
785
891
  const newMin = new Date(min).setHours(0, 0, 0, 0);
892
+
786
893
  if (isBefore(newMin, values.current[0])) {
787
894
  arr.push(newMin);
895
+
788
896
  if (isBefore(newMin, values.current[1])) {
789
897
  arr.push(newMin);
790
898
  } else {
791
899
  arr.push(values.current[1]);
792
900
  }
901
+
793
902
  update(arr);
794
903
  }
795
904
  }
905
+
796
906
  if (max) {
797
907
  let arr = [];
798
908
  const newMax = max && new Date(max).setHours(0, 0, 0, 0);
909
+
799
910
  if (isAfter(newMax, values.current[1])) {
800
911
  arr.push(newMax);
912
+
801
913
  if (isAfter(newMax, values.current[0])) {
802
914
  arr.push(newMax);
803
915
  } else {
804
916
  arr.unshift(values.current[0]);
805
917
  }
918
+
806
919
  update(arr);
807
920
  }
808
921
  }
@@ -810,8 +923,7 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
810
923
  useEffect(() => {
811
924
  if (ipRef.current.value !== '') {
812
925
  update(values.current);
813
- }
814
- // if (disabled) {
926
+ } // if (disabled) {
815
927
  // iconRef.current.childNodes[0].style.pointerEvents = 'none';
816
928
  // closePicker();
817
929
  // } else if (!readOnly) {
@@ -821,13 +933,14 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
821
933
  // closePicker();
822
934
  // }
823
935
 
936
+
824
937
  if (isEnable) {
825
938
  // iconRef.current.childNodes[0].style.pointerEvents = 'none';
826
939
  closePicker();
827
940
  }
941
+
828
942
  return () => {
829
- if (!iconRef.current || !ipRef.current) return;
830
- // if (disabled) {
943
+ if (!iconRef.current || !ipRef.current) return; // if (disabled) {
831
944
  // iconRef.current.childNodes[0].style.pointerEvents = null;
832
945
  // } else if (!readOnly) {
833
946
  // ipRef.current.removeEventListener('focus', onInputFocus);
@@ -837,6 +950,7 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
837
950
  // if (isEnable) {
838
951
  // iconRef.current.childNodes[0].style.pointerEvents = null;
839
952
  // }
953
+
840
954
  closePicker();
841
955
  };
842
956
  }, [actionIconAt, clearAble, controls, disabled, displayFormat, max, min, pressESCToClose, readOnly, startFromZero, unitCount, viewType]);
@@ -849,7 +963,9 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
849
963
  close: closePicker,
850
964
  ...action
851
965
  }; // methods
966
+
852
967
  _instance.__proto__ = {}; // hidden methods
968
+
853
969
  currentRef.instance = _instance;
854
970
  return currentRef;
855
971
  });
@@ -875,18 +991,15 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
875
991
  css: ControlContainerCSS,
876
992
  className: unique.footer,
877
993
  ref: footerRef
878
- }, jsx(Button, {
879
- ...buttonProps,
994
+ }, jsx(Button, { ...buttonProps,
880
995
  className: unique.close,
881
996
  onClick: () => onClickOutside({
882
997
  target: null
883
998
  })
884
- }, closeText), jsx(Button, {
885
- ...buttonProps,
999
+ }, closeText), jsx(Button, { ...buttonProps,
886
1000
  className: unique.cancel,
887
1001
  onClick: onCancel
888
- }, cancelText), jsx(Button, {
889
- ...buttonProps,
1002
+ }, cancelText), jsx(Button, { ...buttonProps,
890
1003
  color: 'info',
891
1004
  className: unique.confirm,
892
1005
  onClick: onConfirm
@@ -928,14 +1041,12 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
928
1041
  margin: spacing([4.5, 0.5, 0])
929
1042
  }
930
1043
  }), rightCalendarComp), tooltipComp, controls ? footerMemo : null);
931
- return jsx(ControlComp, {
932
- ...props,
1044
+ return jsx(ControlComp, { ...props,
933
1045
  disabled: disabled,
934
1046
  error: error,
935
1047
  ref: ref,
936
1048
  style: style
937
- }, label ? jsx(Label, {
938
- ...labelProps,
1049
+ }, label ? jsx(Label, { ...labelProps,
939
1050
  disabled: disabled,
940
1051
  required: required
941
1052
  }, label) : null, jsx(InputBase, {
@@ -958,8 +1069,7 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
958
1069
  className: 'non-effect allow-disabled'
959
1070
  },
960
1071
  endIcon: endIcon
961
- }), error ? jsx(HelperText, {
962
- ...helperTextProps,
1072
+ }), error ? jsx(HelperText, { ...helperTextProps,
963
1073
  disabled: disabled
964
1074
  }, error) : null);
965
1075
  }));
@@ -1134,56 +1244,82 @@ DateRangePicker.defaultProps = {
1134
1244
  DateRangePicker.propTypes = {
1135
1245
  /** Position of action icons. */
1136
1246
  actionIconAt: PropTypes.oneOf(['end', 'start']),
1247
+
1137
1248
  /** If `true`, display the clear icon. */
1138
1249
  clearAble: PropTypes.bool,
1250
+
1139
1251
  /** If `true`, the calendar will have a footer controls. */
1140
1252
  controls: PropTypes.bool,
1253
+
1141
1254
  /** The count unit when select. */
1142
1255
  unitCount: PropTypes.oneOf(['day', 'night']),
1256
+
1143
1257
  /** Default value of the component. */
1144
1258
  defaultValue: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.instanceOf(Date)), PropTypes.arrayOf(PropTypes.string)]),
1259
+
1145
1260
  /** If `true`, the component is disabled. */
1146
1261
  disabled: PropTypes.bool,
1262
+
1147
1263
  /** Format to display value. */
1148
1264
  displayFormat: PropTypes.oneOfType([PropTypes.oneOf(['DD/MM/YYYY', 'MM/DD/YYYY', 'YYYY/MM/DD', 'DD-MM-YYYY', 'MM-DD-YYYY', 'YYYY-MM-DD']), PropTypes.string]),
1265
+
1149
1266
  /** Error displayed below input. */
1150
1267
  error: PropTypes.string,
1268
+
1151
1269
  /** [Props](https://core.diginet.com.vn/ui/?path=/story/form-control-text-helpertext) of helper text. */
1152
1270
  helperTextProps: PropTypes.object,
1271
+
1153
1272
  /** [Props](https://core.diginet.com.vn/ui/?path=/story/form-control-input-inputbase) of input base */
1154
1273
  inputProps: PropTypes.object,
1274
+
1155
1275
  /** Consult [InputBase's](https://core.diginet.com.vn/ui/?path=/story/form-control-input-inputbase) documents. */
1156
1276
  inputStyle: PropTypes.object,
1277
+
1157
1278
  /** The label of the component. */
1158
1279
  label: PropTypes.string,
1280
+
1159
1281
  /** [Props](https://core.diginet.com.vn/ui/?path=/docs/form-control-text-label--simple) of label. */
1160
1282
  labelProps: PropTypes.object,
1283
+
1161
1284
  /** Min value of date picker. */
1162
1285
  min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string]),
1286
+
1163
1287
  /** Max value of date picker. */
1164
1288
  max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string]),
1289
+
1165
1290
  /** Callback fired when the value is changed. */
1166
1291
  onChange: PropTypes.func,
1292
+
1167
1293
  /** The short hint displayed in the input before the user enters a value. */
1168
1294
  placeholder: PropTypes.string,
1295
+
1169
1296
  /** If `true`, hitting escape will close component. */
1170
1297
  pressESCToClose: PropTypes.bool,
1298
+
1171
1299
  /** If `true`, the component is readOnly. */
1172
1300
  readOnly: PropTypes.bool,
1301
+
1173
1302
  /** If `true`, the input element is required. */
1174
1303
  required: PropTypes.bool,
1304
+
1175
1305
  /** Format of the returned value. */
1176
1306
  returnFormat: PropTypes.oneOfType([PropTypes.oneOf(['DD/MM/YYYY', 'MM/DD/YYYY', 'YYYY/MM/DD', 'DD-MM-YYYY', 'MM-DD-YYYY', 'YYYY-MM-DD']), PropTypes.string]),
1307
+
1177
1308
  /** If `true`, show unit count. */
1178
1309
  showUnitCount: PropTypes.bool,
1310
+
1179
1311
  /** Counter with start with 0 or 1. */
1180
1312
  startFromZero: PropTypes.bool,
1313
+
1181
1314
  /** Style inline of component. */
1182
1315
  style: PropTypes.object,
1316
+
1183
1317
  /** Text align of the input. */
1184
1318
  textAlign: PropTypes.oneOf(['center', 'end', 'start']),
1319
+
1185
1320
  /** The value of the input element, required for a controlled component. */
1186
1321
  value: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string])),
1322
+
1187
1323
  /** The variant to use. */
1188
1324
  viewType: PropTypes.oneOf(['outlined', 'underlined'])
1189
1325
  };