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 { memo, useRef, useMemo, forwardRef, useImperativeHandle } from 'react';
4
5
  import PropTypes from 'prop-types';
@@ -57,12 +58,13 @@ const alphaArr = {
57
58
  focus: 0.2,
58
59
  active: 0.3
59
60
  };
60
- const alphaLoading = 0.2;
61
- // customIconSize calculated based on design size
61
+ const alphaLoading = 0.2; // customIconSize calculated based on design size
62
62
  // Button size <= 24 => icon size = Button size - 8
63
63
  // Button size > 24 && <= 32 => icon size = Button size - 12
64
64
  // Button size > 32 => icon size = Button size - 16
65
+
65
66
  const customIconSize = width => width <= 24 ? width - 8 : width <= 32 ? width - 12 : width - 16;
67
+
66
68
  const IconLoadingView = iconSize => {
67
69
  return jsx(CircularProgress, {
68
70
  size: 'extraSmall',
@@ -72,6 +74,7 @@ const IconLoadingView = iconSize => {
72
74
  width: parseInt(iconSize)
73
75
  });
74
76
  };
77
+
75
78
  const ButtonIcon = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
76
79
  action = {},
77
80
  children,
@@ -92,6 +95,7 @@ const ButtonIcon = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
92
95
  width
93
96
  }, reference) => {
94
97
  var _sizeMap$get, _sizeMap$get2;
98
+
95
99
  const ref = useRef(null);
96
100
  const rippleRef = useRef(null);
97
101
  const buttonSize = ((_sizeMap$get = sizeMap.get(size)) === null || _sizeMap$get === void 0 ? void 0 : _sizeMap$get.buttonSize) || '40px';
@@ -99,19 +103,25 @@ const ButtonIcon = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
99
103
  const isViewTypeGhost = viewType === 'ghost';
100
104
  const color = colors[colorProp] || colorProp;
101
105
  colorHover = colors[colorHover] || colorHover;
106
+
102
107
  const _ButtonRootCSS = ButtonRootCSS(circular, colorHover, color, name);
108
+
103
109
  const _ButtonSizeCSS = ButtonSizeCSS(width, height, buttonSize, iconSize);
110
+
104
111
  const _ButtonIconCSS = ButtonIconCSS(iconSize);
112
+
105
113
  useImperativeHandle(reference, () => {
106
114
  const currentRef = ref.current || {};
107
115
  currentRef.element = ref.current;
108
- const _instance = {
109
- ...action
116
+ const _instance = { ...action
110
117
  }; // methods
118
+
111
119
  _instance.__proto__ = {}; // hidden methods
120
+
112
121
  currentRef.instance = _instance;
113
122
  return currentRef;
114
123
  });
124
+
115
125
  const _onClick = event => {
116
126
  event.persist();
117
127
  onClick && event.stopPropagation();
@@ -119,6 +129,7 @@ const ButtonIcon = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
119
129
  if (!isViewTypeGhost) rippleRef.current.start(event);
120
130
  onClick && onClick(event);
121
131
  };
132
+
122
133
  return useMemo(() => {
123
134
  return jsx("button", {
124
135
  css: [_ButtonRootCSS, _ButtonSizeCSS, disabled && ButtonDisabledCSS],
@@ -143,6 +154,7 @@ const ButtonIcon = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
143
154
  }));
144
155
  }, [children, circular, className, colorProp, colorHover, disabled, height, id, loading, name, onClick, size, style, viewBox, viewType, width]);
145
156
  }));
157
+
146
158
  const ButtonIconCSS = iconSize => css`
147
159
  ${flexRow};
148
160
  ${positionRelative};
@@ -152,6 +164,7 @@ const ButtonIconCSS = iconSize => css`
152
164
  ${parseWidthHeight(iconSize)};
153
165
  ${parseMinWidthHeight(iconSize)};
154
166
  `;
167
+
155
168
  const ButtonDisabledCSS = `
156
169
  cursor: not-allowed !important;
157
170
  color: ${systemDisabled} !important;
@@ -167,6 +180,7 @@ const ButtonDisabledCSS = `
167
180
  background-color: transparent !important;
168
181
  }
169
182
  `;
183
+
170
184
  const ButtonSizeCSS = (width, height, buttonSize, iconSize) => css`
171
185
  ${parseWidthHeight(width || buttonSize, height || buttonSize)};
172
186
  ${parseMinWidthHeight(width || buttonSize, height || buttonSize)};
@@ -175,6 +189,7 @@ const ButtonSizeCSS = (width, height, buttonSize, iconSize) => css`
175
189
  ${parseMinWidthHeight(width || iconSize, height || iconSize)};
176
190
  }
177
191
  `;
192
+
178
193
  const ButtonRootCSS = (circular, colorHover, color, name) => css`
179
194
  ${displayInlineFlex};
180
195
  ${positionRelative};
@@ -289,6 +304,7 @@ const ButtonRootCSS = (circular, colorHover, color, name) => css`
289
304
  }
290
305
  }
291
306
  `;
307
+
292
308
  ButtonIcon.defaultProps = {
293
309
  circular: false,
294
310
  className: '',
@@ -302,55 +318,70 @@ ButtonIcon.defaultProps = {
302
318
  ButtonIcon.propTypes = {
303
319
  /** The content of the component. */
304
320
  children: PropTypes.node,
321
+
305
322
  /** If `true`, component is circular. */
306
323
  circular: PropTypes.bool,
324
+
307
325
  /** Class for component. */
308
326
  className: PropTypes.string,
327
+
309
328
  /** The color of the component. */
310
329
  color: PropTypes.string,
330
+
311
331
  /** Custom hover color for button with color 'default'. */
312
332
  colorHover: PropTypes.string,
333
+
313
334
  /** If `true`, the component is disabled. */
314
335
  disabled: PropTypes.bool,
336
+
315
337
  /** Height oof the component. */
316
338
  height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
339
+
317
340
  /** If `true`, the loading indicator is shown. */
318
341
  loading: PropTypes.bool,
342
+
319
343
  /** Callback fired when the component is clicked. */
320
344
  onClick: PropTypes.func,
345
+
321
346
  /** Name of [icon](https://core.diginet.com.vn/ui/?path=/story/icon-basic). */
322
347
  name: PropTypes.string,
323
- /**
324
- * The size of the component.
325
- *
326
- * * tiny (button 24px, icon 16px)
327
- * * small (button 32px, icon 20px)
328
- * * medium (button 40px, icon 24px)
329
- * * large (button 48px, icon 32px)
330
- * * giant (button 56px, icon 40px)
348
+
349
+ /**
350
+ * The size of the component.
351
+ *
352
+ * * tiny (button 24px, icon 16px)
353
+ * * small (button 32px, icon 20px)
354
+ * * medium (button 40px, icon 24px)
355
+ * * large (button 48px, icon 32px)
356
+ * * giant (button 56px, icon 40px)
331
357
  * */
332
358
  size: PropTypes.oneOf(['tiny', 'small', 'medium', 'large', 'giant', 'extraGiant']),
359
+
333
360
  /** Style inline of component. */
334
361
  style: PropTypes.object,
362
+
335
363
  /** If `true`, icon has view box. */
336
364
  viewBox: PropTypes.bool,
365
+
337
366
  /** The variant to use. */
338
367
  viewType: PropTypes.oneOf(['text', 'outlined', 'filled', 'ghost']),
368
+
339
369
  /** Width of the component. */
340
370
  width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
341
- /**
342
- * ref methods (ref.current.instance.*method*)
343
- *
344
- * * option(): Gets all UI component properties
345
- * * Returns value - object
346
- * * option(optionName): Gets the value of a single property
347
- * * @param {optionName} - string
348
- * * Returns value - any
349
- * * option(optionName, optionValue): Updates the value of a single property
350
- * * @param {optionName} - string
351
- * * @param {optionValue} - any
352
- * * option(options): Updates the values of several properties
353
- * * @param {options} - object
371
+
372
+ /**
373
+ * ref methods (ref.current.instance.*method*)
374
+ *
375
+ * * option(): Gets all UI component properties
376
+ * * Returns value - object
377
+ * * option(optionName): Gets the value of a single property
378
+ * * @param {optionName} - string
379
+ * * Returns value - any
380
+ * * option(optionName, optionValue): Updates the value of a single property
381
+ * * @param {optionName} - string
382
+ * * @param {optionValue} - any
383
+ * * option(options): Updates the values of several properties
384
+ * * @param {options} - object
354
385
  */
355
386
  reference: ref
356
387
  };
@@ -1,4 +1,5 @@
1
1
  /** @jsxRuntime classic */
2
+
2
3
  /** @jsx jsx */
3
4
  import { css, jsx } from '@emotion/core';
4
5
  import { CircularProgress, Icon, Typography } from "./..";
@@ -35,31 +36,42 @@ export const getRippleColor = (color, viewType, colors) => {
35
36
  if (!isColor(color) && !isColorName(color)) {
36
37
  let level = 3;
37
38
  let name = color;
39
+
38
40
  if (name === 'primary') {
39
41
  name = 'formal';
40
42
  }
43
+
41
44
  const isSystemColor = colors[name + level];
45
+
42
46
  if (isSystemColor) {
43
47
  if (viewType === 'filled') {
44
48
  level = 7;
45
49
  }
50
+
46
51
  return colors[name + level];
47
52
  }
48
53
  }
54
+
49
55
  if (isColorName(color)) {
50
56
  return fade(isColorName(color), 0.5);
51
57
  }
58
+
52
59
  const colorType = detectColor(color);
60
+
53
61
  switch (colorType) {
54
62
  case 'hex':
55
63
  case 'hexa':
56
64
  return rgbaToHexA(fade(color, 0.5));
65
+
57
66
  case 'rgb':
58
67
  return rgbToHex(fade(color, 0.5));
68
+
59
69
  case 'rgba':
60
70
  return rgbaToHexA(fade(color, 0.5));
71
+
61
72
  case 'hsl':
62
73
  return rgbToHex(hslToRgb(fade(color, 0.5)));
74
+
63
75
  case 'hsla':
64
76
  return rgbaToHexA(hslToRgb(fade(color, 0.5)));
65
77
  }
@@ -116,17 +128,24 @@ const Button = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
116
128
  const color = colors[colorProp] || colorProp;
117
129
  const isViewTypeLink = viewType === 'link';
118
130
  const TagName = href ? 'a' : 'button';
131
+
119
132
  const _ButtonRootCSS = ButtonRootCSS(color);
133
+
120
134
  const _ButtonIcon = ButtonIconCSS(endIcon, label, startIcon, iconMarginSize, iconSize);
135
+
121
136
  const _ButtonTextCSS = ButtonTextCSS(loading, iconMarginSize);
137
+
122
138
  const _ButtonSizeCSS = ButtonSizeCSS(paddingSize, minHeightSize, minHeightSizeLink, outlinedPaddingSize, iconSize);
139
+
123
140
  const _onClick = e => {
124
141
  if (href) e.preventDefault(); //Prevent open link when click
142
+
125
143
  onClick && stopPropagation && e.stopPropagation();
126
144
  if (disabled || loading) return;
127
145
  if (!isViewTypeLink) rippleRef.current.start(e);
128
146
  onClick && onClick(e);
129
147
  };
148
+
130
149
  useEffect(() => {
131
150
  if (href) {
132
151
  const qs = urlParams ? '?' + new URLSearchParams(urlParams).toString() : '';
@@ -137,15 +156,17 @@ const Button = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
137
156
  useImperativeHandle(reference, () => {
138
157
  const currentRef = ref.current || {};
139
158
  currentRef.element = ref.current;
140
- const _instance = {
141
- ...action
159
+ const _instance = { ...action
142
160
  }; // methods
161
+
143
162
  _instance.__proto__ = {}; // hidden methods
163
+
144
164
  currentRef.instance = _instance;
145
165
  return currentRef;
146
166
  });
147
167
  const StartIcon = useMemo(() => {
148
168
  let node = startIcon;
169
+
149
170
  if (typeof node === 'string') {
150
171
  node = jsx(Icon, {
151
172
  name: node,
@@ -159,6 +180,7 @@ const Button = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
159
180
  className: 'DGN-UI-Button-Start-Icon'
160
181
  }, node);
161
182
  }
183
+
162
184
  return jsx("span", {
163
185
  css: _ButtonIcon,
164
186
  className: 'DGN-UI-Button-Custom-Start-Icon'
@@ -166,6 +188,7 @@ const Button = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
166
188
  }, [startIcon, size]);
167
189
  const EndIcon = useMemo(() => {
168
190
  let node = endIcon;
191
+
169
192
  if (typeof node === 'string') {
170
193
  node = jsx(Icon, {
171
194
  name: node,
@@ -179,11 +202,13 @@ const Button = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
179
202
  className: 'DGN-UI-Button-End-Icon'
180
203
  }, node);
181
204
  }
205
+
182
206
  return jsx("span", {
183
207
  css: _ButtonIcon,
184
208
  className: 'DGN-UI-Button-Custom-End-Icon'
185
209
  }, node);
186
210
  }, [endIcon, size]);
211
+
187
212
  const iconLoading = () => {
188
213
  return jsx(CircularProgress, {
189
214
  className: 'DGN-UI-Button-Loading',
@@ -192,25 +217,29 @@ const Button = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
192
217
  size: parseInt(iconSize)
193
218
  });
194
219
  };
220
+
195
221
  return useMemo(() => {
196
222
  // 1. Có StartIcon => thay StartIcon
197
223
  // 2. Có EndIcon => thay EndIcon
198
224
  // 3. Có StartIcon + EndIcon => thay StartIcon
199
225
  // 4. Không có Icon => hiện thêm icon loading ở đầu
200
-
201
226
  let start = startIcon ? StartIcon : jsx("span", {
202
227
  className: 'no-icon'
203
228
  });
204
229
  let end = endIcon ? EndIcon : null;
230
+
205
231
  if (loading) {
206
232
  if (startIcon) start = iconLoading();
207
233
  if (endIcon) end = iconLoading();
234
+
208
235
  if (startIcon && endIcon) {
209
236
  start = iconLoading();
210
237
  end = EndIcon;
211
238
  }
239
+
212
240
  if (!startIcon && !endIcon) start = iconLoading();
213
241
  }
242
+
214
243
  return jsx(TagName, {
215
244
  css: [_ButtonRootCSS, _ButtonSizeCSS, disabled && ButtonDisabledCSS],
216
245
  ref: ref,
@@ -232,6 +261,7 @@ const Button = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
232
261
  }) : null);
233
262
  }, [children, className, colorProp, disabled, endIcon, href, id, label, loading, onClick, size, startIcon, stopPropagation, type, urlParams, viewType, urlState]);
234
263
  }));
264
+
235
265
  const ButtonIconCSS = (endIcon, label, startIcon, iconMarginSize, iconSize) => css`
236
266
  ${flexRow};
237
267
  ${itemsCenter};
@@ -249,11 +279,13 @@ const ButtonIconCSS = (endIcon, label, startIcon, iconMarginSize, iconSize) => c
249
279
  ${parseWidthHeight(iconSize)};
250
280
  }
251
281
  `;
282
+
252
283
  const ButtonTextCSS = (loading, iconMarginSize) => css`
253
284
  white-space: nowrap;
254
285
  color: inherit;
255
286
  margin: 0 ${loading ? iconMarginSize : 0};
256
287
  `;
288
+
257
289
  const ButtonDisabledCSS = css`
258
290
  cursor: not-allowed !important;
259
291
  color: ${systemDisabled} !important;
@@ -269,6 +301,7 @@ const ButtonDisabledCSS = css`
269
301
  background-color: transparent !important;
270
302
  }
271
303
  `;
304
+
272
305
  const ButtonSizeCSS = (paddingSize, minHeightSize, minHeightSizeLink, outlinedPaddingSize, iconSize) => css`
273
306
  padding: ${paddingSize};
274
307
  ${parseMinWidthHeight('max-content', minHeightSize)};
@@ -284,6 +317,7 @@ const ButtonSizeCSS = (paddingSize, minHeightSize, minHeightSizeLink, outlinedPa
284
317
  ${parseMinWidth(0)};
285
318
  }
286
319
  `;
320
+
287
321
  const ButtonRootCSS = color => css`
288
322
  ${displayInlineFlex};
289
323
  ${itemsCenter};
@@ -399,6 +433,7 @@ const ButtonRootCSS = color => css`
399
433
  }
400
434
  }
401
435
  `;
436
+
402
437
  Button.defaultProps = {
403
438
  className: '',
404
439
  color: 'default',
@@ -412,45 +447,59 @@ Button.defaultProps = {
412
447
  Button.propTypes = {
413
448
  /** The content of the component. */
414
449
  children: PropTypes.node,
450
+
415
451
  /** Class for component. */
416
452
  className: PropTypes.string,
453
+
417
454
  /** The color of the component. */
418
455
  color: PropTypes.string,
456
+
419
457
  /** If `true`, the component is disabled. */
420
458
  disabled: PropTypes.bool,
459
+
421
460
  /** [Icon](https://core.diginet.com.vn/ui/?path=/story/icon-basic--basic) or element placed after the children. */
422
461
  endIcon: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
462
+
423
463
  /** The URL to link to when the button is clicked. If defined, an `a` element will be used as the root node. */
424
464
  href: PropTypes.string,
465
+
425
466
  /** The content of the component. */
426
467
  label: PropTypes.string,
468
+
427
469
  /** [Props](https://core.diginet.com.vn/ui/?path=/docs/typography--title) applied to the `Typography` label. */
428
470
  labelProps: PropTypes.object,
471
+
429
472
  /** If `true`, the loading indicator is shown. */
430
473
  loading: PropTypes.bool,
474
+
431
475
  /** Callback fired when the component is clicked. */
432
476
  onClick: PropTypes.func,
477
+
433
478
  /** The size of the component. */
434
479
  size: PropTypes.oneOf(['tiny', 'small', 'medium', 'large', 'giant']),
480
+
435
481
  /** [Icon](https://core.diginet.com.vn/ui/?path=/story/icon-basic--basic) or element placed before the children. */
436
482
  startIcon: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
483
+
437
484
  /** Query params pass to url. */
438
485
  urlParams: PropTypes.object,
486
+
439
487
  /** The variant to use. */
440
488
  viewType: PropTypes.oneOf(['text', 'outlined', 'filled', 'link']),
441
- /**
442
- * ref methods (ref.current.instance.*method*)
443
- *
444
- * * option(): Gets all UI component properties
445
- * * Returns value - object
446
- * * option(optionName): Gets the value of a single property
447
- * * @param {optionName} - string
448
- * * Returns value - any
449
- * * option(optionName, optionValue): Updates the value of a single property
450
- * * @param {optionName} - string
451
- * * @param {optionValue} - any
452
- * * option(options): Updates the values of several properties
453
- * * @param {options} - object
489
+
490
+ /**
491
+ * ref methods (ref.current.instance.*method*)
492
+ *
493
+ * * option(): Gets all UI component properties
494
+ * * Returns value - object
495
+ * * option(optionName): Gets the value of a single property
496
+ * * @param {optionName} - string
497
+ * * Returns value - any
498
+ * * option(optionName, optionValue): Updates the value of a single property
499
+ * * @param {optionName} - string
500
+ * * @param {optionValue} - any
501
+ * * option(options): Updates the values of several properties
502
+ * * @param {options} - object
454
503
  */
455
504
  reference: ref
456
505
  };
@@ -1,4 +1,5 @@
1
1
  /** @jsxRuntime classic */
2
+
2
3
  /** @jsx jsx */
3
4
  import { css, jsx } from '@emotion/core';
4
5
  import PropTypes from 'prop-types';
@@ -37,32 +38,40 @@ const ButtonMore = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
37
38
  const ref = useRef(null);
38
39
  const [openState, setOpenState] = useState(false);
39
40
  const [iconState, setIconState] = useState(false);
41
+
40
42
  const _PopoverCSS = PopoverCSS(isOptionFull);
43
+
41
44
  const openPopover = () => {
42
45
  setOpenState(true);
43
46
  };
47
+
44
48
  const closePopover = () => {
45
49
  setOpenState(false);
46
50
  };
51
+
47
52
  useImperativeHandle(reference, () => {
48
53
  const currentRef = ref.current || {};
49
54
  currentRef.element = ref.current;
50
- const _instance = {
51
- ...action
55
+ const _instance = { ...action
52
56
  }; // methods
57
+
53
58
  _instance.__proto__ = {}; // hidden methods
59
+
54
60
  currentRef.instance = _instance;
55
61
  return currentRef;
56
62
  });
63
+
57
64
  const renderOptions = () => {
58
65
  return options.map((item, idx) => {
59
66
  if ( /*#__PURE__*/isValidElement(item)) return item;else {
60
67
  const icon = item === null || item === void 0 ? void 0 : item.icon;
61
68
  const label = item === null || item === void 0 ? void 0 : item.label;
69
+
62
70
  const action = () => {
63
71
  closePopover();
64
72
  if (typeof (item === null || item === void 0 ? void 0 : item.action) === 'function') item === null || item === void 0 ? void 0 : item.action();
65
73
  };
74
+
66
75
  if (icon && !iconState) setIconState(true);
67
76
  return isOptionFull ? jsx("button", {
68
77
  key: idx,
@@ -90,6 +99,7 @@ const ButtonMore = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
90
99
  }
91
100
  });
92
101
  };
102
+
93
103
  return useMemo(() => {
94
104
  return jsx(Popover, {
95
105
  css: _PopoverCSS,
@@ -119,10 +129,12 @@ const ButtonMore = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
119
129
  }, renderOptions());
120
130
  }, [buttonProps, className, disabled, id, options, optionType, popoverProp, style, iconState, openState]);
121
131
  }));
132
+
122
133
  const PopoverCSS = isOptionFull => css`
123
134
  ${isOptionFull ? flexCol : flexRow};
124
135
  padding: ${isOptionFull ? spacing([1, 0]) : spacing([0, 2])};
125
136
  `;
137
+
126
138
  const OptionFullCSS = css`
127
139
  ${flexRow};
128
140
  ${itemsCenter};
@@ -156,37 +168,45 @@ ButtonMore.defaultProps = {
156
168
  ButtonMore.propTypes = {
157
169
  /** [Props](https://core.diginet.com.vn/ui/?path=/docs/buttonicon) applied to the main `ButtonIcon`. */
158
170
  buttonProps: PropTypes.object,
171
+
159
172
  /** Class for component. */
160
173
  className: PropTypes.string,
174
+
161
175
  /** If `true`, the component is disabled. */
162
176
  disabled: PropTypes.bool,
177
+
163
178
  /** [Props](https://core.diginet.com.vn/ui/?path=/docs/typography) applied to the `Typography` label. */
164
179
  labelProp: PropTypes.object,
180
+
165
181
  /** Option(s) in popover. */
166
182
  option: PropTypes.arrayOf(PropTypes.shape({
167
183
  label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
168
184
  icon: PropTypes.string,
169
185
  action: PropTypes.func
170
186
  })),
187
+
171
188
  /** The variant of option's type. */
172
189
  optionType: PropTypes.oneOf(['full', 'icon']),
190
+
173
191
  /** [Props](https://core.diginet.com.vn/ui/?path=/docs/overplay-popover) applied to the main `Popover`. */
174
192
  popoverProp: PropTypes.object,
193
+
175
194
  /** Style inline of component. */
176
195
  style: PropTypes.object,
177
- /**
178
- * ref methods (ref.current.instance.*method*)
179
- *
180
- * * option(): Gets all UI component properties
181
- * * Returns value - object
182
- * * option(optionName): Gets the value of a single property
183
- * * @param {optionName} - string
184
- * * Returns value - any
185
- * * option(optionName, optionValue): Updates the value of a single property
186
- * * @param {optionName} - string
187
- * * @param {optionValue} - any
188
- * * option(options): Updates the values of several properties
189
- * * @param {options} - object
196
+
197
+ /**
198
+ * ref methods (ref.current.instance.*method*)
199
+ *
200
+ * * option(): Gets all UI component properties
201
+ * * Returns value - object
202
+ * * option(optionName): Gets the value of a single property
203
+ * * @param {optionName} - string
204
+ * * Returns value - any
205
+ * * option(optionName, optionValue): Updates the value of a single property
206
+ * * @param {optionName} - string
207
+ * * @param {optionValue} - any
208
+ * * option(options): Updates the values of several properties
209
+ * * @param {options} - object
190
210
  */
191
211
  reference: ref
192
212
  };
@@ -1,5 +1,7 @@
1
1
  /* eslint-disable react/prop-types */
2
+
2
3
  /** @jsxRuntime classic */
4
+
3
5
  /** @jsx jsx */
4
6
  import { css, jsx, keyframes } from '@emotion/core';
5
7
  import { forwardRef, memo, useImperativeHandle, useLayoutEffect, useState } from 'react';
@@ -12,15 +14,18 @@ const {
12
14
  }
13
15
  }
14
16
  } = useTheme();
17
+
15
18
  const useDebouncedRippleCleanUp = (rippleCount, duration, cleanUpFunction) => {
16
19
  useLayoutEffect(() => {
17
20
  if (rippleCount > 0) {
18
21
  const bounce = setTimeout(() => cleanUpFunction(), duration);
19
22
  return () => clearTimeout(bounce);
20
23
  }
24
+
21
25
  return undefined;
22
26
  }, [rippleCount, duration, cleanUpFunction]);
23
27
  };
28
+
24
29
  const Ripple = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
25
30
  duration = 850,
26
31
  color = systemWhite,
@@ -31,7 +36,9 @@ const Ripple = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
31
36
  useDebouncedRippleCleanUp(rippleArray.length, duration, () => {
32
37
  setRippleArray([]);
33
38
  });
39
+
34
40
  const _RippleChildCSS = RippleChildCSS(circular, color, duration);
41
+
35
42
  const addRipple = event => {
36
43
  const rippleContainer = event.currentTarget.getBoundingClientRect();
37
44
  const size = rippleContainer.width > rippleContainer.height ? rippleContainer.width : rippleContainer.height;
@@ -44,6 +51,7 @@ const Ripple = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
44
51
  };
45
52
  setRippleArray(prevState => [...prevState, newRippleArray]);
46
53
  };
54
+
47
55
  useImperativeHandle(ref, () => ({
48
56
  start: addRipple
49
57
  }));
@@ -78,6 +86,7 @@ const RippleContainerCSS = css`
78
86
  inset: 0px;
79
87
  border-radius: inherit;
80
88
  `;
89
+
81
90
  const RippleChildCSS = (circular, color, duration) => css`
82
91
  ${positionAbsolute};
83
92
  ${circular ? borderRadius50 : borderRadius100};
@@ -86,4 +95,5 @@ const RippleChildCSS = (circular, color, duration) => css`
86
95
  background-color: ${color};
87
96
  animation: ${rippleKeyframes} ${duration}ms;
88
97
  `;
98
+
89
99
  export default Ripple;
@@ -1,4 +1,5 @@
1
1
  /** @jsxRuntime classic */
2
+
2
3
  /** @jsx jsx */
3
4
  import { memo, useRef, useMemo, forwardRef, useImperativeHandle } from 'react';
4
5
  import PropTypes from 'prop-types';
@@ -17,10 +18,11 @@ const CardBody = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
17
18
  useImperativeHandle(reference, () => {
18
19
  const currentRef = ref.current || {};
19
20
  currentRef.element = ref.current;
20
- const _instance = {
21
- ...action
21
+ const _instance = { ...action
22
22
  }; // methods
23
+
23
24
  _instance.__proto__ = {}; // hidden methods
25
+
24
26
  currentRef.instance = _instance;
25
27
  return currentRef;
26
28
  });
@@ -40,10 +42,13 @@ CardBody.defaultProps = {
40
42
  CardBody.propTypes = {
41
43
  /** The content of the component. */
42
44
  children: PropTypes.node,
45
+
43
46
  /** Class for component. ({container: '', header: '', body: '', footer: ''}) */
44
47
  className: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
48
+
45
49
  /** If `true`, will have divider between body and footer. */
46
50
  style: PropTypes.object,
51
+
47
52
  /** The title of the component's header. */
48
53
  title: PropTypes.string
49
54
  };