diginet-core-ui 1.3.36 → 1.3.38

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 (256) hide show
  1. package/assets/avatar/default.svg +3 -3
  2. package/assets/images/icons/wifi.svg +3 -3
  3. package/assets/images/menu/dhr/ALL.svg +6 -6
  4. package/assets/images/menu/dhr/D00.svg +12 -12
  5. package/assets/images/menu/dhr/D09.svg +8 -8
  6. package/assets/images/menu/dhr/D13.svg +10 -10
  7. package/assets/images/menu/dhr/D15.svg +10 -10
  8. package/assets/images/menu/dhr/D21.svg +10 -10
  9. package/assets/images/menu/dhr/D25.svg +11 -11
  10. package/assets/images/menu/dhr/D29.svg +11 -11
  11. package/assets/images/menu/dhr/D38.svg +6 -6
  12. package/assets/images/menu/dhr/D39.svg +10 -10
  13. package/assets/images/menu/dhr/D51.svg +12 -12
  14. package/assets/images/menu/dhr/D52.svg +16 -16
  15. package/assets/images/menu/dhr/D77.svg +16 -16
  16. package/assets/images/menu/dhr/D84.svg +12 -12
  17. package/assets/images/menu/dhr/D89.svg +8 -8
  18. package/assets/images/menu/dhr/Default.svg +13 -13
  19. package/assets/images/menu/dhr/MHRM00N0001.svg +14 -14
  20. package/assets/images/menu/dhr/MHRM09N0002.svg +3 -3
  21. package/assets/images/menu/dhr/MHRM09N0003.svg +25 -25
  22. package/assets/images/menu/dhr/MHRM09N0004.svg +14 -14
  23. package/assets/images/menu/dhr/MHRM09N0005.svg +7 -7
  24. package/assets/images/menu/dhr/MHRM13N0001.svg +16 -16
  25. package/assets/images/menu/dhr/MHRM25N0001.svg +26 -26
  26. package/assets/images/menu/dhr/MHRM29N0001.svg +30 -30
  27. package/assets/images/menu/dhr/MHRM29N0002.svg +13 -0
  28. package/assets/images/menu/dhr/MHRM29N0003.svg +17 -0
  29. package/assets/images/menu/dhr/MHRM29N0015.svg +63 -63
  30. package/assets/images/menu/dhr/MHRM39N0012.svg +43 -43
  31. package/assets/images/menu/dhr/MHRM39N0013.svg +24 -24
  32. package/assets/images/menu/dhr/MHRM39N0014.svg +14 -14
  33. package/assets/images/menu/dhr/MHRM39N0015.svg +36 -36
  34. package/assets/images/menu/dhr/MHRM39N0016.svg +23 -23
  35. package/assets/images/menu/dhr/MHRM77N0001.svg +28 -28
  36. package/assets/images/menu/dhr/MHRM84N0001.svg +27 -27
  37. package/assets/images/menu/dhr/MHRM84N0002.svg +24 -24
  38. package/assets/images/menu/dhr/MHRM89N0001.svg +16 -16
  39. package/assets/images/menu/dhr/MHRP00N0001.svg +10 -10
  40. package/assets/images/menu/dhr/MHRP09N0001.svg +22 -22
  41. package/assets/images/menu/dhr/MHRP09N0002.svg +19 -19
  42. package/assets/images/menu/dhr/MHRP09N0003.svg +12 -12
  43. package/assets/images/menu/dhr/MHRP09N0004.svg +6 -6
  44. package/assets/images/menu/dhr/MHRP09N0005.svg +10 -10
  45. package/assets/images/menu/dhr/MHRP09N0006.svg +17 -17
  46. package/assets/images/menu/dhr/MHRP09N0007.svg +15 -15
  47. package/assets/images/menu/dhr/MHRP09N0008.svg +8 -8
  48. package/assets/images/menu/dhr/MHRP09N0009.svg +10 -10
  49. package/assets/images/menu/dhr/MHRP09N0010.svg +12 -12
  50. package/assets/images/menu/dhr/MHRP09N0011.svg +16 -16
  51. package/assets/images/menu/dhr/MHRP09N0012.svg +6 -6
  52. package/assets/images/menu/dhr/MHRP09N0013.svg +8 -8
  53. package/assets/images/menu/dhr/MHRP09N0014.svg +11 -11
  54. package/assets/images/menu/dhr/MHRP09N0015.svg +12 -12
  55. package/assets/images/menu/dhr/MHRP09N0016.svg +18 -18
  56. package/assets/images/menu/dhr/MHRP09N0017.svg +18 -18
  57. package/assets/images/menu/dhr/MHRP09N0018.svg +12 -12
  58. package/assets/images/menu/dhr/MHRP09N0019.svg +13 -13
  59. package/assets/images/menu/dhr/MHRP09N0020.svg +17 -17
  60. package/assets/images/menu/dhr/MHRP09N0021.svg +10 -10
  61. package/assets/images/menu/dhr/MHRP09N0022.svg +16 -16
  62. package/assets/images/menu/dhr/MHRP09N0023.svg +8 -8
  63. package/assets/images/menu/dhr/MHRP09N0024.svg +15 -15
  64. package/assets/images/menu/dhr/MHRP09N0025.svg +16 -16
  65. package/assets/images/menu/dhr/MHRP09N0026.svg +13 -13
  66. package/assets/images/menu/dhr/MHRP09N0027.svg +10 -10
  67. package/assets/images/menu/dhr/MHRP09N0028.svg +6 -6
  68. package/assets/images/menu/dhr/MHRP09N0029.svg +14 -14
  69. package/assets/images/menu/dhr/MHRP09N0030.svg +4 -4
  70. package/assets/images/menu/dhr/MHRP09N0031.svg +5 -5
  71. package/assets/images/menu/dhr/MHRP09N0032.svg +7 -7
  72. package/assets/images/menu/dhr/MHRP13N0001.svg +9 -9
  73. package/assets/images/menu/dhr/MHRP21N0001.svg +12 -12
  74. package/assets/images/menu/dhr/MHRP21N0002.svg +13 -13
  75. package/assets/images/menu/dhr/MHRP25N0001.svg +13 -13
  76. package/assets/images/menu/dhr/MHRP25N0002.svg +16 -16
  77. package/assets/images/menu/dhr/MHRP25N0003.svg +38 -38
  78. package/assets/images/menu/dhr/MHRP25N0004.svg +17 -17
  79. package/assets/images/menu/dhr/MHRP25N0005.svg +20 -20
  80. package/assets/images/menu/dhr/MHRP29N0001.svg +18 -18
  81. package/assets/images/menu/dhr/MHRP29N0002.svg +15 -15
  82. package/assets/images/menu/dhr/MHRP29N0003.svg +20 -20
  83. package/assets/images/menu/dhr/MHRP29N0004.svg +21 -21
  84. package/assets/images/menu/dhr/MHRP29N0005.svg +21 -21
  85. package/assets/images/menu/dhr/MHRP29N0006.svg +14 -14
  86. package/assets/images/menu/dhr/MHRP29N0007.svg +19 -19
  87. package/assets/images/menu/dhr/MHRP29N0008.svg +20 -20
  88. package/assets/images/menu/dhr/MHRP29N0009.svg +11 -11
  89. package/assets/images/menu/dhr/MHRP29N0010.svg +11 -11
  90. package/assets/images/menu/dhr/MHRP29N0011.svg +12 -12
  91. package/assets/images/menu/dhr/MHRP29N0012.svg +7 -7
  92. package/assets/images/menu/dhr/MHRP29N0013.svg +27 -27
  93. package/assets/images/menu/dhr/MHRP29N0014.svg +32 -32
  94. package/assets/images/menu/dhr/MHRP29N0016.svg +54 -54
  95. package/assets/images/menu/dhr/MHRP29N0017.svg +24 -24
  96. package/assets/images/menu/dhr/MHRP29N0018.svg +44 -44
  97. package/assets/images/menu/dhr/MHRP29N0019.svg +17 -17
  98. package/assets/images/menu/dhr/MHRP29N0020.svg +11 -11
  99. package/assets/images/menu/dhr/MHRP29N0021.svg +8 -8
  100. package/assets/images/menu/dhr/MHRP29N0022.svg +9 -9
  101. package/assets/images/menu/dhr/MHRP29N0023.svg +22 -22
  102. package/assets/images/menu/dhr/MHRP38N0001.svg +13 -13
  103. package/assets/images/menu/dhr/MHRP38N0002.svg +14 -14
  104. package/assets/images/menu/dhr/MHRP39N0001.svg +15 -15
  105. package/assets/images/menu/dhr/MHRP39N0002.svg +13 -13
  106. package/assets/images/menu/dhr/MHRP39N0003.svg +16 -16
  107. package/assets/images/menu/dhr/MHRP39N0004.svg +22 -22
  108. package/assets/images/menu/dhr/MHRP39N0005.svg +16 -16
  109. package/assets/images/menu/dhr/MHRP39N0006.svg +17 -17
  110. package/assets/images/menu/dhr/MHRP39N0007.svg +13 -13
  111. package/assets/images/menu/dhr/MHRP39N0008.svg +3 -3
  112. package/assets/images/menu/dhr/MHRP39N0009.svg +3 -3
  113. package/assets/images/menu/dhr/MHRP39N0010.svg +7 -7
  114. package/assets/images/menu/dhr/MHRP39N0011.svg +14 -14
  115. package/assets/images/menu/dhr/MHRP39N0013.svg +10 -10
  116. package/assets/images/menu/dhr/MHRP39N0014.svg +11 -11
  117. package/assets/images/menu/dhr/MHRP39N0015.svg +5 -5
  118. package/assets/images/menu/dhr/MHRP39N0017.svg +11 -11
  119. package/assets/images/menu/dhr/MHRP39N0018.svg +11 -0
  120. package/assets/images/menu/dhr/MHRP39N1222.svg +12 -12
  121. package/assets/images/menu/dhr/MHRP51N0001.svg +9 -9
  122. package/assets/images/menu/dhr/MHRP51N0002.svg +13 -13
  123. package/assets/images/menu/dhr/MHRP52N0001.svg +21 -21
  124. package/assets/images/menu/dhr/MHRP52N0002.svg +21 -21
  125. package/assets/images/menu/dhr/MHRP52N0003.svg +16 -16
  126. package/assets/images/menu/dhr/MHRP75N0001.svg +19 -19
  127. package/assets/images/menu/dhr/MHRP75N0002.svg +25 -25
  128. package/assets/images/menu/dhr/MHRP75N0003.svg +3 -3
  129. package/assets/images/menu/dhr/MHRP75N0006.svg +14 -14
  130. package/assets/images/menu/dhr/MHRP75N0007.svg +19 -19
  131. package/assets/images/menu/dhr/MHRP75N0008.svg +19 -19
  132. package/assets/images/menu/dhr/MHRP77N0007.svg +28 -28
  133. package/assets/images/menu/dhr/MHRP77N0008.svg +17 -17
  134. package/assets/images/menu/dhr/MHRP77N0009.svg +19 -19
  135. package/assets/images/menu/dhr/MHRP77N0010.svg +20 -20
  136. package/assets/images/menu/dhr/MHRP89N1000.svg +6 -6
  137. package/assets/images/menu/dhr/MHRP89N1001.svg +6 -6
  138. package/assets/images/menu/dhr/TASK.svg +9 -9
  139. package/assets/images/menu/dhr/W00F0001.svg +3 -3
  140. package/assets/images/menu/dhr/W00F0002.svg +3 -3
  141. package/assets/images/menu/dhr/W00F0003.svg +3 -3
  142. package/assets/images/menu/dhr/W00F0004.svg +3 -3
  143. package/assets/images/menu/dhr/W09F2000-WEB5.svg +17 -17
  144. package/assets/images/menu/dhr/W09F2000.svg +6 -6
  145. package/assets/images/menu/dhr/W09F2002-WEB5.svg +21 -21
  146. package/assets/images/menu/dhr/W09F2005-WEB5.svg +13 -13
  147. package/assets/images/menu/dhr/W09F2020-WEB5.svg +16 -16
  148. package/assets/images/menu/dhr/W09F2022-WEB5.svg +20 -20
  149. package/assets/images/menu/dhr/W09F2150-WEB5.svg +16 -16
  150. package/assets/images/menu/dhr/W09F2152-WEB5.svg +20 -20
  151. package/assets/images/menu/dhr/W09F2160-WEB5.svg +14 -14
  152. package/assets/images/menu/dhr/W09F2162-WEB5.svg +18 -18
  153. package/assets/images/menu/dhr/W29F4006-WEB5.svg +19 -19
  154. package/assets/images/menu/dhr/W75F2260-WEB5.svg +15 -15
  155. package/assets/images/menu/dhr/W75F2261-WEB5.svg +19 -19
  156. package/assets/images/menu/dhr/W75F3005-WEB5.svg +13 -13
  157. package/assets/images/menu/dhr/W75F4070-WEB5.svg +21 -21
  158. package/assets/images/menu/dhr/W75F4071-WEB5.svg +17 -17
  159. package/assets/images/menu/dhr/W75F4100-WEB5.svg +14 -14
  160. package/assets/images/menu/dhr/W77F1011.svg +19 -19
  161. package/assets/images/menu/dhr/W77F1013.svg +22 -22
  162. package/assets/images/menu/erp/D05.svg +8 -8
  163. package/assets/images/menu/erp/D06.svg +4 -4
  164. package/assets/images/menu/erp/D90R.svg +9 -9
  165. package/assets/images/menu/erp/DBC.svg +9 -9
  166. package/assets/images/menu/erp/W00F0001.svg +3 -3
  167. package/assets/images/menu/erp/W00F0002.svg +3 -3
  168. package/assets/images/menu/erp/W00F0003.svg +3 -3
  169. package/assets/images/menu/erp/W00F0004.svg +3 -3
  170. package/assets/images/menu/erp/W05F0001.svg +16 -16
  171. package/assets/images/menu/erp/W05F0001N0000.svg +16 -16
  172. package/assets/images/menu/erp/W05F0004N0000.svg +6 -6
  173. package/assets/images/menu/erp/W05F0006N0000.svg +30 -30
  174. package/assets/images/menu/erp/W05F0007N0000.svg +6 -6
  175. package/assets/images/menu/erp/W05F0008N0000.svg +14 -14
  176. package/assets/images/menu/erp/W05F0011N0000.svg +20 -20
  177. package/assets/images/menu/erp/W05F0013N0000.svg +9 -9
  178. package/assets/images/menu/erp/W05F4000N0000.svg +9 -9
  179. package/assets/images/menu/erp/W06F0001.svg +17 -17
  180. package/assets/images/menu/erp/W06F0001N0000.svg +17 -17
  181. package/assets/images/menu/erp/W06F0004N0000.svg +22 -22
  182. package/assets/images/menu/erp/W06F0005N0000.svg +22 -22
  183. package/assets/images/menu/erp/W06F0006N0000.svg +55 -55
  184. package/assets/images/menu/erp/W06F0008N0000.svg +17 -17
  185. package/assets/images/menu/erp/W94F1000N0000.svg +9 -9
  186. package/assets/images/menu/erp/W94F1000N0001.svg +9 -9
  187. package/assets/images/menu/erp/WA3F1025.svg +5 -5
  188. package/assets/images/menu/erp/WA3F2100.svg +10 -10
  189. package/components/accordion/css.js +42 -35
  190. package/components/accordion/details.js +48 -42
  191. package/components/accordion/group.js +88 -82
  192. package/components/accordion/index.js +54 -48
  193. package/components/accordion/summary.js +52 -43
  194. package/components/alert/index.js +115 -103
  195. package/components/alert/notify.js +16 -18
  196. package/components/badge/index.js +5 -5
  197. package/components/button/icon.js +21 -21
  198. package/components/button/index.js +13 -13
  199. package/components/chart/Pie/Sector.js +2 -2
  200. package/components/chart/Pie-v2/Sector.js +2 -2
  201. package/components/chip/attach.js +5 -5
  202. package/components/chip/index.js +13 -10
  203. package/components/divider/index.js +17 -15
  204. package/components/form-control/attachment/index.js +1 -0
  205. package/components/form-control/calendar/function.js +295 -289
  206. package/components/form-control/calendar/index.js +16 -16
  207. package/components/form-control/checkbox/index.js +5 -5
  208. package/components/form-control/date-picker/index.js +7 -3
  209. package/components/form-control/date-range-picker/index.js +12 -8
  210. package/components/form-control/dropdown/index.js +139 -81
  211. package/components/form-control/input-base/index.js +32 -27
  212. package/components/form-control/money-input/index.js +17 -17
  213. package/components/form-control/number-input/index.js +11 -11
  214. package/components/form-control/number-input/index2.js +432 -0
  215. package/components/form-control/phone-input/index.js +7 -7
  216. package/components/form-control/radio/index.js +98 -146
  217. package/components/form-control/text-input/index.js +4 -4
  218. package/components/form-control/time-picker/index.js +305 -300
  219. package/components/form-control/toggle/index.js +92 -90
  220. package/components/index.js +1 -1
  221. package/components/modal/header.js +63 -65
  222. package/components/modal/modal.js +84 -130
  223. package/components/paging/page-selector.js +53 -49
  224. package/components/popup/index.js +5 -1
  225. package/components/popup/proposals_popup.js +5 -1
  226. package/components/popup/v2/index.js +12 -8
  227. package/components/progress/circular.js +12 -12
  228. package/components/rating/index.js +3 -3
  229. package/components/slider/slider-item.js +65 -25
  230. package/components/tab/tab-container.js +2 -2
  231. package/components/tab/tab-header.js +2 -2
  232. package/components/tab/tab-panel.js +2 -2
  233. package/components/tab/tab.js +2 -2
  234. package/components/transfer/index.js +3 -3
  235. package/components/tree-view/index.js +38 -38
  236. package/components/typography/index.js +10 -10
  237. package/icons/basic.js +75 -408
  238. package/icons/effect.js +15 -15
  239. package/package.json +45 -45
  240. package/readme.md +677 -654
  241. package/styles/color-helper.js +103 -103
  242. package/styles/colors.js +7 -7
  243. package/styles/general.js +40 -12
  244. package/styles/utils.js +5 -5
  245. package/theme/set-theme.js +3 -3
  246. package/theme/settings.js +3 -2
  247. package/utils/array/array.js +36 -36
  248. package/utils/date.js +56 -56
  249. package/utils/error/error.js +2 -2
  250. package/utils/error/errors.js +99 -99
  251. package/utils/number.js +6 -6
  252. package/utils/render-portal.js +5 -1
  253. package/utils/renderIcon.js +5 -5
  254. package/utils/useOnClickOutside.js +2 -2
  255. package/utils/usePortal.js +9 -9
  256. package/utils/validate.js +33 -33
@@ -41,8 +41,8 @@ const Calendar = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
41
41
  limit: 'DGN-UI-Calendar-Day-limit'
42
42
  }
43
43
  };
44
- /**
45
- * START REFERENCE
44
+ /**
45
+ * START REFERENCE
46
46
  */
47
47
 
48
48
  const ref = useRef(null);
@@ -61,12 +61,12 @@ const Calendar = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
61
61
  };
62
62
  const firstDayOfMax = new Date(new Date(max).setDate(1)).setHours(0, 0, 0, 0);
63
63
  const firstDayOfMin = new Date(new Date(min).setDate(1)).setHours(0, 0, 0, 0);
64
- /**
65
- * END REFERENCE
64
+ /**
65
+ * END REFERENCE
66
66
  */
67
67
 
68
- /**
69
- * START FUNCTION
68
+ /**
69
+ * START FUNCTION
70
70
  */
71
71
 
72
72
  const onUpdateNavigatorValue = useCallback(value => {
@@ -152,12 +152,12 @@ const Calendar = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
152
152
  onUpdateCalendar(time, navigatorRefs, min, max, tableRef.current, activeValue.current, unique, displayAnotherMonth, onDayClick, onUpdateNavigatorValue);
153
153
  }
154
154
  };
155
- /**
156
- * END FUNCTION
155
+ /**
156
+ * END FUNCTION
157
157
  */
158
158
 
159
- /**
160
- * START EFFECT
159
+ /**
160
+ * START EFFECT
161
161
  */
162
162
 
163
163
 
@@ -198,12 +198,12 @@ const Calendar = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
198
198
  onUpdate(activeValue.current);
199
199
  }
200
200
  }, [onClick, min, max]);
201
- /**
202
- * END FUNCTION
201
+ /**
202
+ * END FUNCTION
203
203
  */
204
204
 
205
- /**
206
- * START COMPONENT
205
+ /**
206
+ * START COMPONENT
207
207
  */
208
208
 
209
209
  const tableMemo = jsx("div", {
@@ -212,8 +212,8 @@ const Calendar = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
212
212
  className: unique.table.table,
213
213
  ref: tableRef
214
214
  }, renderHeader(unique), jsx("tbody", null)));
215
- /**
216
- * END COMPONENT
215
+ /**
216
+ * END COMPONENT
217
217
  */
218
218
 
219
219
  return jsx("div", { ...props,
@@ -318,11 +318,11 @@ Checkbox.propTypes = {
318
318
  /** The function will run to return a true or false value of Radio Component */
319
319
  onChange: PropTypes.func,
320
320
 
321
- /**
322
- * ref methods
323
- *
324
- * * setChecked: Set check for input
325
- * * getChecked: Get check of input
321
+ /**
322
+ * ref methods
323
+ *
324
+ * * setChecked: Set check for input
325
+ * * getChecked: Get check of input
326
326
  */
327
327
  ref: PropTypes.any
328
328
  };
@@ -14,6 +14,10 @@ import { ButtonIcon, HelperText, InputBase, Label } from '../../index';
14
14
  import Button from '../../button';
15
15
  import Tooltip from '../../tooltip';
16
16
  import { isValidDate } from '../calendar/function';
17
+ import { useTheme } from '../../../theme';
18
+ const {
19
+ zIndex
20
+ } = useTheme();
17
21
  const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
18
22
  actionIconAt,
19
23
  clearAble,
@@ -116,7 +120,7 @@ const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
116
120
  display: 'block'
117
121
  };
118
122
  const pickerCSS = {
119
- backGr: 'background-color: transparent; inset: 0px; pointer-events: auto; position: fixed; z-index: 9001;',
123
+ backGr: `background-color: transparent; inset: 0px; pointer-events: auto; position: fixed; z-index: ${zIndex(1)};`,
120
124
  picker: (position, left, width) => css`
121
125
  background-color: ${theme.colors.white};
122
126
  border-radius: ${theme.border.radius};
@@ -132,7 +136,7 @@ const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
132
136
  transition: opacity 120ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
133
137
  transform 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
134
138
  width: ${width}px;
135
- z-index: 9002;
139
+ z-index: ${zIndex(2)};
136
140
  `,
137
141
  active: {
138
142
  opacity: 1,
@@ -399,7 +403,7 @@ const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
399
403
 
400
404
  if (!el.classList.contains(unique.focus)) {
401
405
  el.classList.add(unique.focus);
402
- el.style.zIndex = 9001;
406
+ el.style.zIndex = zIndex(2);
403
407
  openPicker();
404
408
  }
405
409
  };
@@ -12,6 +12,10 @@ import { randomString, updatePosition, date as moment, capitalizeSentenceCase, i
12
12
  import { getGlobal } from '../../../global';
13
13
  import { generateCalendarCSS, onUpdateNavigator, renderHeader, renderNavigator } from '../calendar/function';
14
14
  import locale from '../../../locale';
15
+ import { useTheme } from '../../../theme';
16
+ const {
17
+ zIndex
18
+ } = useTheme();
15
19
  const DateRangePickerV2 = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
16
20
  actionIconAt,
17
21
  controls,
@@ -224,7 +228,7 @@ const DateRangePickerV2 = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
224
228
  visibility: hidden;
225
229
  white-space: nowrap;
226
230
  will-change: left top visibility;
227
- z-index: 9003;
231
+ z-index: ${zIndex(3)};
228
232
  }
229
233
  @media only screen and (max-width: 599px) {
230
234
  max-width: 400px;
@@ -253,7 +257,7 @@ const DateRangePickerV2 = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
253
257
  transition: opacity 120ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
254
258
  transform 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
255
259
  width: ${width}px;
256
- z-index: 9002;
260
+ z-index: ${zIndex(2)};
257
261
  `,
258
262
  active: {
259
263
  opacity: 1,
@@ -458,8 +462,8 @@ const DateRangePickerV2 = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
458
462
  tableData = [],
459
463
  weekDateFirst = getDateOfWeek(firstDay),
460
464
  weekDateLast = getDateOfWeek(lastDay);
461
- /**
462
- * days of previous month
465
+ /**
466
+ * days of previous month
463
467
  */
464
468
 
465
469
  for (let i = weekDateFirst; i > 0; i--) {
@@ -472,8 +476,8 @@ const DateRangePickerV2 = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
472
476
  className: unique.day.day
473
477
  })));
474
478
  }
475
- /**
476
- * days of current month
479
+ /**
480
+ * days of current month
477
481
  */
478
482
 
479
483
 
@@ -487,8 +491,8 @@ const DateRangePickerV2 = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
487
491
  }, jsx(Typography, { ...typographyProps(unique.day.day)
488
492
  }, i + 1)));
489
493
  }
490
- /**
491
- * days of next month
494
+ /**
495
+ * days of next month
492
496
  */
493
497
 
494
498
 
@@ -8,13 +8,17 @@ import PropTypes from 'prop-types';
8
8
  import { jsx, css } from '@emotion/core';
9
9
  import { Account } from '../../../icons';
10
10
  import AvatarDefault from '../../../assets/avatar/default.svg';
11
- import { InputBase, Chip, CircularProgress, Checkbox, TreeView, HelperText, Label, ButtonIcon } from '../../';
11
+ import { InputBase, Chip, CircularProgress, Checkbox, TreeView, HelperText, Label, ButtonIcon, Typography } from '../../';
12
12
  import { mapParent, randomString, updatePosition } from '../../../utils';
13
13
  import { getGlobal } from '../../../global';
14
14
  import { color as colors } from '../../../styles/colors';
15
15
  import { typography } from '../../../styles/typography';
16
16
  import { alignCenter, backgroundTransparent, border, borderBox, borderNone, borderRadius4px, breakWord, cursorPointer, displayBlock, flexRow, flexWrap, inlineFlex, justifyCenter, justifyStart, outlineNone, overflowHidden, pointerEventsNone, positionAbsolute, positionRelative, userSelectNone } from '../../../styles/general';
17
17
  import isMobile from '../../../utils/isMobile';
18
+ import { useTheme } from '../../../theme';
19
+ const {
20
+ zIndex
21
+ } = useTheme();
18
22
  const {
19
23
  paragraph1,
20
24
  paragraph3
@@ -88,6 +92,7 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
88
92
  onInput,
89
93
  onChange,
90
94
  onLoadMore,
95
+ onClosed,
91
96
  renderItem,
92
97
  renderSelectedItem,
93
98
  valueObjectDefault,
@@ -97,10 +102,9 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
97
102
  formStyle,
98
103
  labelProps,
99
104
  errorStyle,
100
- refs,
101
105
  children,
102
106
  dropdownItemStyle
103
- }, ref) => {
107
+ }, reference) => {
104
108
  const dropdownRef = useRef(null);
105
109
  const timerRef = useRef(null);
106
110
  const formRef = useRef(null);
@@ -115,7 +119,6 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
115
119
  allowSymbol: false
116
120
  }));
117
121
  const [openState, setOpenState] = useState(false);
118
- const [errorState, setErrorState] = useState(error && !valueProp && valueProp !== 0);
119
122
  const [showClear, setShowClear] = useState(false);
120
123
 
121
124
  const _isMobile = isMobile.any();
@@ -230,7 +233,7 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
230
233
  left: `${left}px`,
231
234
  width: `${width}px`,
232
235
  backgroundColor: '#FFF',
233
- zIndex: 9001
236
+ zIndex: zIndex(1)
234
237
  };
235
238
  if (_isMobile && allowSearch) dropdownStyle = { ...dropdownStyle,
236
239
  bottom: 0,
@@ -249,7 +252,7 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
249
252
  height: '100%',
250
253
  backgroundColor: 'rgba(255, 255, 255, 0.6)',
251
254
  borderRadius: 4,
252
- zIndex: 9002
255
+ zIndex: zIndex(2)
253
256
  };
254
257
  const defaultSearch = lastSearchRef.current || (onInput ? (_searchRef$current = searchRef.current) === null || _searchRef$current === void 0 ? void 0 : _searchRef$current.value : '');
255
258
  const el = jsx("div", {
@@ -377,6 +380,7 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
377
380
  }
378
381
 
379
382
  document.documentElement.style.overflow = 'auto';
383
+ onClosed === null || onClosed === void 0 ? void 0 : onClosed();
380
384
  };
381
385
 
382
386
  const renderDropdown = pattern => {
@@ -838,10 +842,12 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
838
842
  startIcon: icon,
839
843
  label: displayText,
840
844
  size: itemMultipleSize,
845
+ disabled: disabled,
841
846
  clearAble: true,
842
847
  onRemove: e => onRemove(e, value),
843
848
  style: {
844
- margin: '3px 0'
849
+ margin: '3px 0',
850
+ width: '100%'
845
851
  }
846
852
  });
847
853
  }
@@ -1049,10 +1055,12 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
1049
1055
  startIcon: icon,
1050
1056
  label: text,
1051
1057
  size: itemMultipleSize,
1058
+ disabled: disabled,
1052
1059
  clearAble: true,
1053
1060
  onRemove: e => onRemove(e, value),
1054
1061
  style: {
1055
- margin: '3px 0'
1062
+ margin: '3px 0',
1063
+ width: '100%'
1056
1064
  }
1057
1065
  });
1058
1066
  }
@@ -1081,8 +1089,10 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
1081
1089
  const icon = getIconFromData(data);
1082
1090
  const valueWithIcon = jsx(Fragment, null, icon && jsx("div", {
1083
1091
  css: DropdownIconCSS
1084
- }, icon), jsx("div", {
1085
- css: DropdownTextCSS
1092
+ }, icon), jsx(Typography, {
1093
+ type: 'p1',
1094
+ lineClamp: 1,
1095
+ hoverTooltip: !_isMobile
1086
1096
  }, text));
1087
1097
  const el = document.createElement('div');
1088
1098
  el.style.cssText = 'display: flex; align-items: center; min-height:24px;';
@@ -1092,17 +1102,43 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
1092
1102
  }
1093
1103
  };
1094
1104
 
1095
- useImperativeHandle(ref, () => ({
1096
- closeDropdown: () => {
1097
- closeDropdown();
1098
- },
1099
- showDropdown: () => {
1100
- showDropdown();
1101
- },
1102
- onClear,
1103
- setPreviousValue,
1104
- DOM: dropdownRef.current
1105
- }));
1105
+ useImperativeHandle(reference, () => {
1106
+ const currentRef = dropdownRef.current || {};
1107
+ const _instance = {
1108
+ closeDropdown: () => {
1109
+ closeDropdown();
1110
+ },
1111
+ showDropdown: () => {
1112
+ showDropdown();
1113
+ },
1114
+ onClear,
1115
+ setPreviousValue,
1116
+ setValue: value => {
1117
+ if (allValue[unique][allValue[unique].length - 1] !== value) {
1118
+ allValue[unique].push(value);
1119
+ }
1120
+
1121
+ setValueIntoInput(value);
1122
+ }
1123
+ }; // methods
1124
+
1125
+ _instance.__proto__ = {}; // hidden methods
1126
+
1127
+ currentRef.instance = _instance; // keep old method
1128
+
1129
+ currentRef.closeDropdown = () => closeDropdown();
1130
+
1131
+ currentRef.showDropdown = () => showDropdown();
1132
+
1133
+ currentRef.onClear = onClear, currentRef.setPreviousValue = setPreviousValue, currentRef.setValue = value => {
1134
+ if (allValue[unique][allValue[unique].length - 1] !== value) {
1135
+ allValue[unique].push(value);
1136
+ }
1137
+
1138
+ setValueIntoInput(value);
1139
+ }, currentRef.DOM = dropdownRef.current;
1140
+ return currentRef;
1141
+ });
1106
1142
  useEffect(() => {
1107
1143
  setShowClear(clearAble && checkHasValue(valueProp) && !disabled && !readOnly && !loading);
1108
1144
  }, [clearAble, valueProp, disabled, readOnly, loading]);
@@ -1122,7 +1158,6 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
1122
1158
  };
1123
1159
  }, [valueObjectDefault]);
1124
1160
  useEffect(() => {
1125
- !!refs && refs(dropdownRef);
1126
1161
  allValue[unique] = [];
1127
1162
 
1128
1163
  if (defaultValue !== undefined && JSON.stringify(defaultValue) !== '[]') {
@@ -1186,9 +1221,6 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
1186
1221
  };
1187
1222
  }
1188
1223
  }, [loading]);
1189
- useEffect(() => {
1190
- setErrorState(error && (!valueProp && valueProp !== 0 || (valueProp === null || valueProp === void 0 ? void 0 : valueProp.length) === 0));
1191
- }, [error, valueProp]);
1192
1224
  useEffect(() => {
1193
1225
  if (valueProp !== undefined && (!boxRef.current || children || JSON.stringify(valueProp) !== JSON.stringify(currentValue[unique]))) {
1194
1226
  setValueIntoInput(valueProp);
@@ -1295,7 +1327,7 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
1295
1327
  const inputComp = useMemo(() => {
1296
1328
  const _InputCSS = InputCSS(multiple, renderSelectedItem, clearAble);
1297
1329
 
1298
- const _DropdownFormCSS = DropdownFormCSS(viewType, multiple, placeholder, itemMultipleSize, renderSelectedItem);
1330
+ const _DropdownFormCSS = DropdownFormCSS(viewType, multiple, placeholder, itemMultipleSize, renderSelectedItem, disabled);
1299
1331
 
1300
1332
  const _DropdownInputCSS = DropdownInputCSS(viewType, multiple, placeholder, itemMultipleSize, renderSelectedItem);
1301
1333
 
@@ -1305,7 +1337,8 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
1305
1337
  className: ['DGN-UI-Dropdown-Form', openState && 'dropdown-showing'].join(' ').trim().replace(/\s+/g, ' '),
1306
1338
  style: formStyle
1307
1339
  }, jsx("div", {
1308
- css: _InputCSS
1340
+ css: _InputCSS,
1341
+ className: 'DGN-UI-Dropdown-Form-Input'
1309
1342
  }, multiple ? jsx("div", { ...inputProps,
1310
1343
  style: {
1311
1344
  cursor: 'text',
@@ -1337,7 +1370,8 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
1337
1370
  ref: inputRef,
1338
1371
  css: _DropdownInputCSS,
1339
1372
  type: "text",
1340
- placeholder: placeholder
1373
+ placeholder: placeholder,
1374
+ disabled: disabled
1341
1375
  })), jsx("div", {
1342
1376
  ref: iconRef,
1343
1377
  css: IconCSS(viewType, loading, showClear),
@@ -1363,7 +1397,7 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
1363
1397
  disabled: disabled || readOnly
1364
1398
  })));
1365
1399
  }, [viewType, inputProps, inputStyle, multiple, clearAble, onChange, disabled, readOnly, loading, renderSelectedItem, placeholder, itemMultipleSize, openState, showClear]);
1366
- const errorComp = useMemo(() => errorState && jsx(HelperText, {
1400
+ const errorComp = useMemo(() => error && jsx(HelperText, {
1367
1401
  disabled: disabled,
1368
1402
  style: {
1369
1403
  minHeight: '16px',
@@ -1371,13 +1405,13 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
1371
1405
  top: '100%',
1372
1406
  ...errorStyle
1373
1407
  }
1374
- }, error), [error, valueProp, disabled, errorStyle, errorState]);
1408
+ }, error), [error, disabled, errorStyle]);
1375
1409
  /* End component */
1376
1410
 
1377
1411
  return jsx(Fragment, null, jsx("div", {
1378
1412
  ref: dropdownRef,
1379
1413
  css: DropdownRootCSS(viewType, multiple, placeholder, itemMultipleSize, renderSelectedItem, loading, showClear),
1380
- className: ['DGN-UI-Dropdown', className, errorState && 'error', loading && 'dgn-dropdown-loading', disabled ? 'disabled' : readOnly && 'readOnly'].join(' ').trim().replace(/\s+/g, ' '),
1414
+ className: ['DGN-UI-Dropdown', className, error && 'error', loading && 'dgn-dropdown-loading', disabled ? 'disabled' : readOnly && 'readOnly'].join(' ').trim().replace(/\s+/g, ' '),
1381
1415
  style: style
1382
1416
  }, labelComp, inputComp, errorComp), openState ? /*#__PURE__*/createPortal(showDropdown(), document.body) : null);
1383
1417
  }));
@@ -1385,7 +1419,7 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
1385
1419
 
1386
1420
  const InputCSS = (multiple, renderSelectedItem, clearAble) => css`
1387
1421
  ${flexRow};
1388
- flex: 1 1 auto;
1422
+ width: 100%;
1389
1423
  ${!multiple && renderSelectedItem ? `width: calc(100% - 34px${clearAble ? ' - 18px' : ''})` : ''}
1390
1424
  `;
1391
1425
 
@@ -1397,11 +1431,15 @@ const DropdownIconCSS = css`
1397
1431
  height: inherit;
1398
1432
  margin-right: 8px;
1399
1433
  height: 32px;
1434
+ min-height: 32px;
1400
1435
  width: 32px;
1436
+ min-width: 32px;
1401
1437
  border-radius: 16px;
1402
1438
  img {
1403
1439
  height: 32px;
1440
+ min-height: 32px;
1404
1441
  width: 32px;
1442
+ min-width: 32px;
1405
1443
  object-fit: cover;
1406
1444
  }
1407
1445
  `;
@@ -1423,8 +1461,7 @@ const DropdownInputCSS = (viewType, multiple, placeholder, itemMultipleSize, ren
1423
1461
  ${flexWrap};
1424
1462
  ${overflowHidden};
1425
1463
  ${breakWord};
1426
- /* max-height: max-content; */
1427
- ${!multiple ? 'min-height: 24px; max-width: 100%; white-space: nowrap;' : ''}
1464
+ ${!multiple ? 'min-height: 24px; max-width: 100%;' : ''}
1428
1465
  &::after {
1429
1466
  ${flexRow};
1430
1467
  ${positionAbsolute};
@@ -1455,10 +1492,14 @@ const DropdownInputCSS = (viewType, multiple, placeholder, itemMultipleSize, ren
1455
1492
  min-width: 24px;
1456
1493
  ` : `
1457
1494
  height: 24px;
1495
+ min-height: 24px;
1458
1496
  width: 24px;
1497
+ min-width: 24px;
1459
1498
  img {
1460
1499
  height: 24px;
1500
+ min-height: 24px;
1461
1501
  width: 24px;
1502
+ min-width: 24px;
1462
1503
  }
1463
1504
  `}
1464
1505
  }
@@ -1479,22 +1520,25 @@ const IconCSS = (viewType, loading, showClear) => css`
1479
1520
  }
1480
1521
  `;
1481
1522
 
1482
- const DropdownFormCSS = (viewType, multiple, placeholder, itemMultipleSize, renderSelectedItem) => viewType !== 'outlined' ? css`
1523
+ const DropdownFormCSS = (viewType, multiple, placeholder, itemMultipleSize, renderSelectedItem, disabled) => viewType !== 'outlined' ? css`
1483
1524
  ${flexRow};
1484
1525
  ${alignCenter};
1485
1526
  ${positionRelative};
1486
1527
  ${borderBox};
1487
- flex: 1 1 auto;
1528
+ width: 100%;
1488
1529
  padding-bottom: ${multiple ? 1 : 4}px;
1489
1530
  padding-top: ${multiple ? 1 : 4}px;
1490
- &:not(:focus-within):hover {
1491
- &::before {
1492
- border-bottom-color: ${active};
1493
- }
1494
- .css-${DropdownInputCSS(viewType, multiple, placeholder, itemMultipleSize, renderSelectedItem).name} {
1495
- color: ${active};
1496
- }
1531
+ ${!disabled && `
1532
+ &:not(:focus-within):hover {
1533
+ &::before {
1534
+ border-bottom-color: ${active};
1535
+ }
1536
+ .css-${DropdownInputCSS(viewType, multiple, placeholder, itemMultipleSize, renderSelectedItem).name} {
1537
+ color: ${active};
1538
+ }
1497
1539
  }
1540
+ `}
1541
+
1498
1542
  &:focus-within {
1499
1543
  border-bottom-color: ${focus};
1500
1544
  &::after {
@@ -1539,15 +1583,17 @@ const DropdownFormCSS = (viewType, multiple, placeholder, itemMultipleSize, rend
1539
1583
  ${borderRadius4px};
1540
1584
  ${borderBox};
1541
1585
  ${border(1, rest)};
1542
- flex: 1 1 auto;
1586
+ width: 100%;
1543
1587
  min-height: 40px;
1544
- &:not(:focus-within):hover {
1545
- background-color: ${hover};
1546
- border-color: ${active};
1547
- input {
1548
- background-color: ${hover};
1549
- }
1550
- }
1588
+ ${!disabled && `
1589
+ &:not(:focus-within):hover {
1590
+ background-color: ${hover};
1591
+ border-color: ${active};
1592
+ input {
1593
+ background-color: ${hover};
1594
+ }
1595
+ }
1596
+ `}
1551
1597
  &:focus-within {
1552
1598
  border-color: ${focus};
1553
1599
  }
@@ -1582,7 +1628,7 @@ const DropdownBoxCSS = css`
1582
1628
  overflow: auto;
1583
1629
  background-color: ${white};
1584
1630
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
1585
- z-index: 9001;
1631
+ z-index: ${zIndex(1)};
1586
1632
  &::-webkit-scrollbar {
1587
1633
  ${borderRadius4px};
1588
1634
  width: 24px;
@@ -1644,7 +1690,6 @@ const DropdownRootCSS = (viewType, multiple, placeholder, itemMultipleSize, rend
1644
1690
  ${displayBlock};
1645
1691
  ${positionRelative};
1646
1692
  margin-bottom: 20px;
1647
- /* min-width: 150px; */
1648
1693
  height: max-content;
1649
1694
  &.error {
1650
1695
  .css-${DropdownFormCSS(viewType, multiple, placeholder, itemMultipleSize, renderSelectedItem).name} {
@@ -1659,8 +1704,6 @@ const DropdownRootCSS = (viewType, multiple, placeholder, itemMultipleSize, rend
1659
1704
  }
1660
1705
  &.dgn-dropdown-loading,
1661
1706
  &.disabled {
1662
- ${pointerEventsNone};
1663
- ${userSelectNone};
1664
1707
  .css-${DropdownFormCSS(viewType, multiple, placeholder, itemMultipleSize, renderSelectedItem).name} {
1665
1708
  border-color: ${systemDisabled};
1666
1709
  .css-${IconCSS(viewType, loading, showClear).name} {
@@ -1754,14 +1797,14 @@ Dropdown.propTypes = {
1754
1797
  /** display this icon if not found the icon follow iconExpr */
1755
1798
  iconDefault: PropTypes.string,
1756
1799
 
1757
- /** field name used for icon display<br/>
1758
- * Example:<br/>
1759
- * &nbsp;&nbsp;string: 'icon'<br/>
1760
- * &nbsp;&nbsp;object: {<br/>
1761
- * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;key: 'icon',<br/>
1762
- * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;prefix: 'https://imglink.com',<br/>
1763
- * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;suffix: '.jpg'<br/>
1764
- * &nbsp;&nbsp;}
1800
+ /** field name used for icon display<br/>
1801
+ * Example:<br/>
1802
+ * &nbsp;&nbsp;string: 'icon'<br/>
1803
+ * &nbsp;&nbsp;object: {<br/>
1804
+ * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;key: 'icon',<br/>
1805
+ * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;prefix: 'https://imglink.com',<br/>
1806
+ * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;suffix: '.jpg'<br/>
1807
+ * &nbsp;&nbsp;}
1765
1808
  */
1766
1809
  iconExpr: PropTypes.oneOfType([PropTypes.string, PropTypes.shape({
1767
1810
  key: PropTypes.string,
@@ -1779,9 +1822,9 @@ Dropdown.propTypes = {
1779
1822
  /** field name used for text display in input */
1780
1823
  keyExpr: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.array]),
1781
1824
 
1782
- /** field name used for text display<br/>
1783
- * Example: 'name', '{id} - {name}', '{age} age(s)'<br/>
1784
- * Note: don't use 'id - name', return undefined
1825
+ /** field name used for text display<br/>
1826
+ * Example: 'name', '{id} - {name}', '{age} age(s)'<br/>
1827
+ * Note: don't use 'id - name', return undefined
1785
1828
  */
1786
1829
  displayExpr: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.array]),
1787
1830
 
@@ -1791,9 +1834,9 @@ Dropdown.propTypes = {
1791
1834
  /** the field name used for the returned result */
1792
1835
  valueExpr: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
1793
1836
 
1794
- /**
1795
- * duration wait enter search content on search<br/>
1796
- * Example: 700 -> 700ms, '700ms' -> 700ms, '0.7s' -> 700ms, '1m' -> 60000ms
1837
+ /**
1838
+ * duration wait enter search content on search<br/>
1839
+ * Example: 700 -> 700ms, '700ms' -> 700ms, '0.7s' -> 700ms, '1m' -> 60000ms
1797
1840
  */
1798
1841
  searchDelayTime: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
1799
1842
 
@@ -1860,22 +1903,19 @@ Dropdown.propTypes = {
1860
1903
  /** The array of elements that appear in the dropdown */
1861
1904
  dataSource: PropTypes.array,
1862
1905
 
1863
- /** The function to get ref of Dropdown component */
1864
- refs: PropTypes.func,
1865
-
1866
- /** function displays items by custom<br/>
1867
- * renderItem={(data, index) => data.name + ' - ' + data.role}<br/>
1868
- * --> such as: displayExpr={'name - role'}
1906
+ /** function displays items by custom<br/>
1907
+ * renderItem={(data, index) => data.name + ' - ' + data.role}<br/>
1908
+ * --> such as: displayExpr={'name - role'}
1869
1909
  */
1870
1910
  renderItem: PropTypes.func,
1871
1911
 
1872
- /** function displays selected items by custom, example:<br/>
1873
- * renderItem={(data, index) => index + ' - ' + data.name}<br/>
1912
+ /** function displays selected items by custom, example:<br/>
1913
+ * renderItem={(data, index) => index + ' - ' + data.name}<br/>
1874
1914
  */
1875
1915
  renderSelectedItem: PropTypes.func,
1876
1916
 
1877
- /** the function will run when entering input<br/>
1878
- * if undefined: the filter function will run (default)
1917
+ /** the function will run when entering input<br/>
1918
+ * if undefined: the filter function will run (default)
1879
1919
  */
1880
1920
  onInput: PropTypes.func,
1881
1921
 
@@ -1888,10 +1928,28 @@ Dropdown.propTypes = {
1888
1928
  /** the function will run when scroll near the end */
1889
1929
  onLoadMore: PropTypes.func,
1890
1930
 
1931
+ /** the function will run when dropdown closed */
1932
+ onClosed: PropTypes.func,
1933
+
1891
1934
  /** the contents in Dropdown box (Exp: TreeView) */
1892
1935
  children: PropTypes.node,
1893
1936
 
1894
- /** any props else */
1895
- props: PropTypes.any
1937
+ /**
1938
+ * ref methods
1939
+ *
1940
+ * how to get component element? ref.current
1941
+ *
1942
+ * how to call method? ref.current.instance.{method}
1943
+ *
1944
+ * * showDropdown(): Show dropdown
1945
+ * * closeDropdown(): Close dropdown
1946
+ * * onClear(): Clear selected value
1947
+ * * setPreviousValue(): Set value to previous value
1948
+ * * setValue(value): Set value of dropdown
1949
+ * * @param {value} - string || number || array
1950
+ */
1951
+ reference: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
1952
+ current: PropTypes.instanceOf(Element)
1953
+ })])
1896
1954
  };
1897
1955
  export default Dropdown;