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, useEffect, useMemo, useRef, forwardRef, useState } from 'react';
4
5
  import { createPortal } from 'react-dom';
@@ -59,6 +60,7 @@ const Popup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
59
60
  if (!ref) {
60
61
  ref = useRef(null);
61
62
  }
63
+
62
64
  const [openState, setOpenState] = useState(open);
63
65
  const [custom, setCustom] = useState(null);
64
66
  const PopupContainer = css`
@@ -159,13 +161,16 @@ const Popup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
159
161
  color: ${theme.colors.secondary};
160
162
  cursor: pointer;
161
163
  `;
164
+
162
165
  const onShowPopup = (message, options = {}, cb, autoClose = true) => {
163
166
  if (!message && (!options || JSON.stringify(options) === '{}') && !cb) {
164
167
  setCustom(false);
165
168
  setOpenState(true);
166
169
  return;
167
170
  }
171
+
168
172
  message = message || title;
173
+
169
174
  if (Object.keys(options).length) {
170
175
  type = options.type || type;
171
176
  icon = options.icon || icon;
@@ -174,18 +179,23 @@ const Popup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
174
179
  yesText = options.yesText || yesText;
175
180
  noText = options.noText || noText;
176
181
  }
182
+
177
183
  const confirmHandler = () => {
178
184
  if (cb && typeof cb === 'function') cb(true);else onConfirmHandler();
185
+
179
186
  if (autoClose) {
180
187
  onClosePopup();
181
188
  }
182
189
  };
190
+
183
191
  const cancelHandler = () => {
184
192
  if (cb && typeof cb === 'function') cb(false);else onCancelHandler();
193
+
185
194
  if (autoClose) {
186
195
  onClosePopup();
187
196
  }
188
197
  };
198
+
189
199
  const newContent = jsx("div", {
190
200
  css: PopupContent
191
201
  }, jsx("div", {
@@ -216,6 +226,7 @@ const Popup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
216
226
  setCustom(newContent);
217
227
  setOpenState(true);
218
228
  };
229
+
219
230
  const onClosePopup = (action = false) => {
220
231
  if (onClose && action) {
221
232
  onClose();
@@ -226,24 +237,29 @@ const Popup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
226
237
  }, 300);
227
238
  ref.current.style.opacity = null;
228
239
  ref.current.firstChild.classList.remove('animate_fadeInDown');
240
+
229
241
  if (fullScreen) {
230
242
  document.body.style.overflow = null;
231
243
  }
232
244
  }
233
245
  }
234
246
  };
247
+
235
248
  const onConfirmHandler = () => {
236
249
  if (onConfirm) onConfirm();else setOpenState(false);
237
250
  };
251
+
238
252
  const onCancelHandler = () => {
239
253
  if (onCancel) onCancel();else setOpenState(false);
240
254
  };
255
+
241
256
  const pressESCHandler = event => {
242
257
  if (event.key === 'Escape') {
243
258
  onClosePopup(custom === null);
244
259
  document.removeEventListener('keydown', pressESCHandler);
245
260
  }
246
261
  };
262
+
247
263
  useEffect(() => {
248
264
  if (refs) refs(ref);
249
265
  }, []);
@@ -265,9 +281,11 @@ const Popup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
265
281
  ref.current.style.display = 'flex';
266
282
  const titleEl = ref.current.querySelector('.popup-title');
267
283
  const iconEl = ref.current.querySelector('.popup-icon');
284
+
268
285
  if (iconEl && titleEl) {
269
286
  titleEl.style.marginRight = '32px';
270
287
  const height = titleEl.offsetHeight;
288
+
271
289
  if (height && height > 39) {
272
290
  iconEl.style.height = '40px';
273
291
  iconEl.style.width = '40px';
@@ -275,21 +293,24 @@ const Popup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
275
293
  iconEl.firstChild.style.width = '40px';
276
294
  }
277
295
  }
296
+
278
297
  setTimeout(() => {
279
298
  ref.current.style.opacity = 1;
280
299
  ref.current.firstChild.classList.add('animate_fadeInDown');
281
- }, 0);
300
+ }, 0); // Allow press ESC to close popup
282
301
 
283
- // Allow press ESC to close popup
284
302
  if (pressESCToClose) {
285
303
  document.addEventListener('keydown', pressESCHandler);
286
304
  }
305
+
287
306
  if (autoFocusOKButton && type !== 'info' && ref.current.querySelector('button')) {
288
307
  ref.current.querySelector('button').focus();
289
308
  }
309
+
290
310
  if (fullScreen) {
291
311
  document.body.style.overflow = 'hidden';
292
312
  }
313
+
293
314
  return () => {
294
315
  setCustom(null);
295
316
  };
@@ -361,54 +382,79 @@ Popup.defaultProps = {
361
382
  Popup.propTypes = {
362
383
  /** type of Popup, corresponding to the content inside */
363
384
  type: PropTypes.oneOf(['info', 'yes-no', 'confirm', 'custom']),
385
+
364
386
  /** the icon to display before content */
365
387
  icon: PropTypes.oneOf(['info', 'success', 'warning', 'danger']),
388
+
366
389
  /** the main content to display */
367
390
  title: PropTypes.node,
391
+
368
392
  /** class of Popup component */
369
393
  className: PropTypes.string,
394
+
370
395
  /** the text to display in agree button */
371
396
  yesText: PropTypes.string,
397
+
372
398
  /** the text to display in deny button */
373
399
  noText: PropTypes.string,
400
+
374
401
  /** the text to display in confirm button */
375
402
  confirmText: PropTypes.string,
403
+
376
404
  /** the text to display in cancel button */
377
405
  cancelText: PropTypes.string,
406
+
378
407
  /** the width of Popup */
379
408
  width: PropTypes.string,
409
+
380
410
  /** display clear icon if true */
381
411
  clearAble: PropTypes.bool,
412
+
382
413
  /** show Popup if true */
383
414
  open: PropTypes.bool,
415
+
384
416
  /** allow close Popup when press ESC */
385
417
  pressESCToClose: PropTypes.bool,
418
+
386
419
  /** auto focus in OK button */
387
420
  autoFocusOKButton: PropTypes.bool,
421
+
388
422
  /** style inline for Popup container */
389
423
  style: PropTypes.object,
424
+
390
425
  /** style inline for Popup */
391
426
  popupStyle: PropTypes.object,
427
+
392
428
  /** style inline for clear icon */
393
429
  clearIconStyle: PropTypes.object,
430
+
394
431
  /** the props of confirm button */
395
432
  confirmProps: PropTypes.object,
433
+
396
434
  /** the props of cancel button */
397
435
  cancelProps: PropTypes.object,
436
+
398
437
  /** the function to get ref of Popup */
399
438
  refs: PropTypes.func,
439
+
400
440
  /** the function to get events of Popup (show/close) */
401
441
  getPopup: PropTypes.func,
442
+
402
443
  /** the function run when close Popup */
403
444
  onClose: PropTypes.func,
445
+
404
446
  /** the function run when click confirm button */
405
447
  onConfirm: PropTypes.func,
448
+
406
449
  /** the function run when click cancel button */
407
450
  onCancel: PropTypes.func,
451
+
408
452
  /** set top position for Popup */
409
453
  top: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
454
+
410
455
  /** show a dark background under the popup if true */
411
456
  fullScreen: PropTypes.bool,
457
+
412
458
  /** the full content will display in Popup if set */
413
459
  children: PropTypes.any
414
460
  };
@@ -1,4 +1,5 @@
1
1
  /** @jsxRuntime classic */
2
+
2
3
  /** @jsx jsx */
3
4
  import { memo, useEffect, useMemo, useRef, forwardRef } from 'react';
4
5
  import PropTypes from 'prop-types';
@@ -39,6 +40,7 @@ const ProposalsPopup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
39
40
  if (!ref) {
40
41
  ref = useRef(null);
41
42
  }
43
+
42
44
  const PopupContainer = css`
43
45
  display: flex;
44
46
  position: fixed;
@@ -91,21 +93,26 @@ const ProposalsPopup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
91
93
  color: '#404456' !important;
92
94
  }
93
95
  `;
96
+
94
97
  const onClosePopup = () => {
95
98
  if (onClose) onClose();
96
99
  };
100
+
97
101
  const onProposals = () => {
98
102
  // eslint-disable-next-line no-undef
99
103
  const input = PopupInputRef.current.querySelector('input');
104
+
100
105
  if (/^cancel$/i.test(type)) {
101
106
  if (onCancel) onCancel(input);
102
107
  } else if (onConfirm) onConfirm(input);
103
108
  };
109
+
104
110
  const pressESCHandler = event => {
105
111
  if (event.key === 'Escape') {
106
112
  onClosePopup();
107
113
  }
108
114
  };
115
+
109
116
  const calPosition = (position, originBounding) => {
110
117
  switch (position) {
111
118
  case 'bottom':
@@ -113,41 +120,45 @@ const ProposalsPopup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
113
120
  {
114
121
  return [originBounding.height, originBounding.width];
115
122
  }
123
+
116
124
  case 'center':
117
125
  {
118
126
  return [originBounding.height / 2, originBounding.width / 2];
119
127
  }
128
+
120
129
  default:
121
130
  return [0, 0];
122
131
  }
123
132
  };
133
+
124
134
  useEffect(() => {
125
135
  if (refs) refs(ref);
126
136
  }, []);
127
137
  useEffect(() => {
128
138
  if (open && ref.current) {
129
139
  let top = 0,
130
- left = 0,
131
- vertical = 0,
132
- horizontal = 0;
140
+ left = 0,
141
+ vertical = 0,
142
+ horizontal = 0; // Position's anchor
133
143
 
134
- // Position's anchor
135
144
  if (anchorOrigin && anchor) {
136
145
  if (anchor.current) {
137
146
  anchor = anchor.current;
138
147
  }
148
+
139
149
  if (anchorOrigin === 'center') {
140
150
  anchorOrigin = {
141
151
  vertical: 'center',
142
152
  horizontal: 'center'
143
153
  };
144
154
  }
155
+
145
156
  const anchorBounding = anchor.getBoundingClientRect();
146
157
  vertical = anchorBounding.y + calPosition(anchorOrigin.vertical, anchorBounding)[0];
147
158
  horizontal = anchorBounding.x + calPosition(anchorOrigin.horizontal, anchorBounding)[1];
148
- }
159
+ } // Position's transform
160
+
149
161
 
150
- // Position's transform
151
162
  if (transformOrigin) {
152
163
  if (transformOrigin === 'center') {
153
164
  transformOrigin = {
@@ -155,54 +166,65 @@ const ProposalsPopup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
155
166
  horizontal: 'center'
156
167
  };
157
168
  }
169
+
158
170
  const offsetHeight = ref.current.offsetHeight;
159
171
  const offsetWidth = ref.current.offsetWidth;
172
+
160
173
  switch (transformOrigin.vertical) {
161
174
  case 'center':
162
175
  top = vertical - offsetHeight / 2;
163
176
  break;
177
+
164
178
  case 'bottom':
165
179
  top = vertical - offsetHeight;
166
180
  break;
181
+
167
182
  default:
168
183
  top = vertical;
169
184
  }
185
+
170
186
  switch (transformOrigin.horizontal) {
171
187
  case 'center':
172
188
  left = horizontal - offsetWidth / 2;
173
189
  break;
190
+
174
191
  case 'right':
175
192
  left = horizontal - offsetWidth;
176
193
  break;
194
+
177
195
  default:
178
196
  left = horizontal;
179
- }
197
+ } // Reset position if the element overflow window screen size
198
+
180
199
 
181
- // Reset position if the element overflow window screen size
182
200
  if (top < 0) {
183
201
  top = 0;
184
202
  } else if (top + offsetHeight > window.innerHeight) {
185
203
  top = window.innerHeight - offsetHeight;
186
204
  }
205
+
187
206
  if (left < 0) {
188
207
  left = 0;
189
208
  } else if (left + offsetWidth > window.innerWidth) {
190
209
  left = window.innerWidth - offsetWidth;
191
210
  }
211
+
192
212
  ref.current.style.top = top + 'px';
193
213
  ref.current.style.left = left + 'px';
194
214
  ref.current.style.transformOrigin = `${transformOrigin.horizontal || 'left'} ${transformOrigin.vertical || 'top'}`;
195
215
  }
196
- ref.current.classList.add('open');
197
216
 
198
- // Allow press ESC to close popup
217
+ ref.current.classList.add('open'); // Allow press ESC to close popup
218
+
199
219
  if (pressESCToClose) {
200
220
  document.addEventListener('keydown', pressESCHandler);
201
221
  }
202
222
  }
223
+
203
224
  return () => {
204
225
  if (open && ref.current) {
205
226
  ref.current.classList.remove('open');
227
+
206
228
  if (pressESCToClose) {
207
229
  document.removeEventListener('keydown', pressESCHandler);
208
230
  }
@@ -281,40 +303,57 @@ ProposalsPopup.defaultProps = {
281
303
  ProposalsPopup.propTypes = {
282
304
  /** type of Popup, corresponding to the button */
283
305
  type: PropTypes.oneOf(['confirm', 'cancel']),
306
+
284
307
  /** type of TextInput */
285
308
  viewType: PropTypes.oneOf(['underlined', 'outlined']),
309
+
286
310
  /** placeholder to display in TextInput */
287
311
  placeholder: PropTypes.string,
312
+
288
313
  /** label to display on TextInput */
289
314
  label: PropTypes.string,
315
+
290
316
  /** the content to display in button */
291
317
  buttonText: PropTypes.string,
318
+
292
319
  /** value to display in TextInput */
293
320
  value: PropTypes.string,
321
+
294
322
  /** display clear icon if true */
295
323
  clearAble: PropTypes.bool,
324
+
296
325
  /** show Popup if true */
297
326
  open: PropTypes.bool,
327
+
298
328
  /** allow close Popup when press ESC */
299
329
  pressESCToClose: PropTypes.bool,
330
+
300
331
  /** style inline for Popup container */
301
332
  style: PropTypes.object,
333
+
302
334
  /** style inline for Popup */
303
335
  popupStyle: PropTypes.object,
336
+
304
337
  /** positions are displayed under this object */
305
338
  anchor: PropTypes.object,
339
+
306
340
  /** The root is displayed according to the position of the anchor */
307
341
  anchorOrigin: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
308
342
  // {vertical: 'top', horizontal: 'left'}
343
+
309
344
  /** Popup's native display */
310
345
  transformOrigin: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
311
346
  // {vertical: 'bottom', horizontal: 'right'}
347
+
312
348
  /** the function to get ref of Popup */
313
349
  refs: PropTypes.func,
350
+
314
351
  /** the function run when close Popup */
315
352
  onClose: PropTypes.func,
353
+
316
354
  /** the function run when click confirm button */
317
355
  onConfirm: PropTypes.func,
356
+
318
357
  /** the function run when click cancel button */
319
358
  onCancel: PropTypes.func
320
359
  };
@@ -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, Icon, Typography } from "../..";
@@ -64,12 +65,15 @@ const Popup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
64
65
  const [showMoreDescription, setShowMoreDescription] = useState(false);
65
66
  const [descriptionLines, setDescriptionLines] = useState(0);
66
67
  const showPopup = useDelayUnmount(openState, 200);
68
+
67
69
  const _PopupRootCSS = PopupRootCSS(width, top, type, description, subtitle, showMoreDescription, descriptionLines);
70
+
68
71
  const pressESCHandler = event => {
69
72
  if (event.key === 'Escape') {
70
73
  onClosePopup('isClose');
71
74
  }
72
75
  };
76
+
73
77
  const onShowPopup = (options, cb) => {
74
78
  if (options && typeof options === 'object' && Object.keys(options).length) {
75
79
  const newProps = {
@@ -102,8 +106,10 @@ const Popup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
102
106
  } else {
103
107
  setCustom(false);
104
108
  }
109
+
105
110
  setOpenState(true);
106
111
  };
112
+
107
113
  const onClosePopup = mode => {
108
114
  if (onClose) {
109
115
  setOpenState(false);
@@ -114,9 +120,11 @@ const Popup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
114
120
  }
115
121
  }
116
122
  };
123
+
117
124
  const onRefChange = useCallback(node => {
118
125
  if (node) {
119
126
  setDescriptionLines(Math.round((node === null || node === void 0 ? void 0 : node.offsetHeight) / 18)); //18 is line-height of Typography p2
127
+
120
128
  setShowMoreDescription(false);
121
129
  }
122
130
  }, []);
@@ -139,6 +147,7 @@ const Popup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
139
147
  action: statusAction.current
140
148
  });
141
149
  }
150
+
142
151
  return () => {
143
152
  document.removeEventListener('keydown', pressESCHandler);
144
153
  };
@@ -150,12 +159,15 @@ const Popup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
150
159
  close: onClosePopup,
151
160
  ...action
152
161
  }; // methods
162
+
153
163
  _instance.__proto__ = {}; // hidden methods
164
+
154
165
  currentRef.instance = _instance;
155
166
  currentRef.show = onShowPopup;
156
167
  currentRef.close = onClosePopup;
157
168
  return currentRef;
158
169
  });
170
+
159
171
  const PopupHeaderView = (title, type) => {
160
172
  return jsx("div", {
161
173
  className: 'DGN-UI-Popup-Header'
@@ -171,6 +183,7 @@ const Popup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
171
183
  onClick: () => onClosePopup('isClose')
172
184
  }));
173
185
  };
186
+
174
187
  const PopupBodyView = (icon, type, subtitle, description) => {
175
188
  return jsx("div", {
176
189
  className: 'DGN-UI-Popup-Body'
@@ -197,6 +210,7 @@ const Popup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
197
210
  onClick: () => setShowMoreDescription(!showMoreDescription)
198
211
  }, getGlobal(showMoreDescription ? 'showLess' : 'showMore')))));
199
212
  };
213
+
200
214
  const PopupActionView = (onConfirm, confirmProps, onCancel, cancelProps, type, yesText, noText) => {
201
215
  return onConfirm || onCancel || type === 'yesno' ? jsx("div", {
202
216
  className: 'DGN-UI-Popup-Action'
@@ -220,6 +234,7 @@ const Popup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
220
234
  ...cancelProps
221
235
  }) : null) : null;
222
236
  };
237
+
223
238
  return showPopup && /*#__PURE__*/createPortal(jsx("div", {
224
239
  css: _PopupRootCSS,
225
240
  ref: ref,
@@ -230,6 +245,7 @@ const Popup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
230
245
  ...props
231
246
  }, custom ? custom : jsx(Fragment, null, PopupHeaderView(title, type), PopupBodyView(icon, type, subtitle, description), PopupActionView(onConfirm, confirmProps, onCancel, cancelProps, type, yesText, noText)))), document.body);
232
247
  }));
248
+
233
249
  const PopupRootCSS = (width, top, type, description, subtitle, showMoreDescription, descriptionLines) => css`
234
250
  ${flexRow};
235
251
  ${positionFixed};
@@ -343,6 +359,7 @@ const PopupRootCSS = (width, top, type, description, subtitle, showMoreDescripti
343
359
  }
344
360
  }
345
361
  `;
362
+
346
363
  Popup.defaultProps = {
347
364
  className: '',
348
365
  icon: true,
@@ -356,51 +373,68 @@ Popup.defaultProps = {
356
373
  Popup.propTypes = {
357
374
  /** If `true`, the component is shown. */
358
375
  open: PropTypes.bool,
376
+
359
377
  /** [Props](https://core.diginet.com.vn/ui/?path=/story/button) applied to the cancel `Button`. */
360
378
  cancelProps: PropTypes.object,
379
+
361
380
  /** Class for component. */
362
381
  className: PropTypes.string,
382
+
363
383
  /** [Props](https://core.diginet.com.vn/ui/?path=/story/button) applied to the confirm `Button`. */
364
384
  confirmProps: PropTypes.object,
385
+
365
386
  /** Details content of the component. */
366
387
  description: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
388
+
367
389
  /** [Icon](https://core.diginet.com.vn/ui/?path=/story/icon-basic) display before content. */
368
390
  icon: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
391
+
369
392
  /** Label of cancel button. */
370
393
  noText: PropTypes.string,
394
+
371
395
  /** Callback fired when click on cancel button. */
372
396
  onCancel: PropTypes.func,
397
+
373
398
  /** Callback fired when click on confirm button. */
374
399
  onConfirm: PropTypes.func,
400
+
375
401
  /** If `true`, hitting escape will close component. */
376
402
  pressESCToClose: PropTypes.bool,
403
+
377
404
  /** Style inline of component. */
378
405
  style: PropTypes.object,
406
+
379
407
  /** Main content of the component. */
380
408
  subtitle: PropTypes.node,
409
+
381
410
  /** Title of the component. */
382
411
  title: PropTypes.node,
412
+
383
413
  /** Top position of the component. */
384
414
  top: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
415
+
385
416
  /** Type of the component. */
386
417
  type: PropTypes.oneOf(['info', 'success', 'warning', 'danger', 'yesno']),
418
+
387
419
  /** Width of the component. */
388
420
  width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
421
+
389
422
  /** Label of confirm button. */
390
423
  yesText: PropTypes.string,
391
- /**
392
- * ref methods
393
- *
394
- * how to get component element? ref.current
395
- *
396
- * how to call method? ref.current.instance.{method}
397
- *
398
- * * show(options, callback): Show popup
399
- * * @param {options} - object
400
- * * {type, title, icon, yesNo, description, confirmProps, cancelProps, onCancel, onConfirm}
401
- * * @param {callback} - func
402
- * * Callback fired after click on button (callback(true) with confirm Button and callback(false) with cancel Button). Alternate both onCancel, onConfirm methods of options
403
- * * close(): Close popup
424
+
425
+ /**
426
+ * ref methods
427
+ *
428
+ * how to get component element? ref.current
429
+ *
430
+ * how to call method? ref.current.instance.{method}
431
+ *
432
+ * * show(options, callback): Show popup
433
+ * * @param {options} - object
434
+ * * {type, title, icon, yesNo, description, confirmProps, cancelProps, onCancel, onConfirm}
435
+ * * @param {callback} - func
436
+ * * Callback fired after click on button (callback(true) with confirm Button and callback(false) with cancel Button). Alternate both onCancel, onConfirm methods of options
437
+ * * close(): Close popup
404
438
  */
405
439
  reference: ref
406
440
  };