diginet-core-ui 1.3.37 → 1.3.39

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 (251) 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 -13
  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 -11
  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/notify.js +16 -16
  195. package/components/avatar/index.js +19 -19
  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/divider/index.js +17 -15
  203. package/components/form-control/attachment/index.js +20 -20
  204. package/components/form-control/calendar/function.js +295 -289
  205. package/components/form-control/calendar/index.js +16 -16
  206. package/components/form-control/checkbox/index.js +5 -5
  207. package/components/form-control/date-picker/index.js +7 -3
  208. package/components/form-control/date-range-picker/index.js +12 -8
  209. package/components/form-control/dropdown/index.js +7 -3
  210. package/components/form-control/input-base/index.js +32 -27
  211. package/components/form-control/money-input/index.js +17 -17
  212. package/components/form-control/number-input/index.js +11 -11
  213. package/components/form-control/number-input/index2.js +432 -0
  214. package/components/form-control/phone-input/index.js +7 -7
  215. package/components/form-control/radio/index.js +98 -146
  216. package/components/form-control/text-input/index.js +4 -4
  217. package/components/form-control/time-picker/index.js +305 -300
  218. package/components/form-control/toggle/index.js +92 -90
  219. package/components/index.js +1 -1
  220. package/components/paging/page-selector.js +53 -49
  221. package/components/popover/index.js +21 -21
  222. package/components/popup/index.js +5 -1
  223. package/components/popup/proposals_popup.js +5 -1
  224. package/components/popup/v2/index.js +12 -8
  225. package/components/progress/circular.js +12 -12
  226. package/components/rating/index.js +3 -3
  227. package/components/tab/tab-container.js +2 -2
  228. package/components/tab/tab-header.js +2 -2
  229. package/components/tab/tab-panel.js +2 -2
  230. package/components/tab/tab.js +2 -2
  231. package/components/transfer/index.js +3 -3
  232. package/components/tree-view/index.js +38 -38
  233. package/components/typography/index.js +11 -11
  234. package/icons/effect.js +15 -15
  235. package/package.json +45 -45
  236. package/readme.md +677 -668
  237. package/styles/color-helper.js +103 -103
  238. package/styles/colors.js +7 -7
  239. package/styles/general.js +11 -11
  240. package/styles/utils.js +5 -5
  241. package/theme/set-theme.js +3 -3
  242. package/utils/array/array.js +36 -36
  243. package/utils/date.js +56 -56
  244. package/utils/error/error.js +2 -2
  245. package/utils/error/errors.js +99 -99
  246. package/utils/number.js +6 -6
  247. package/utils/render-portal.js +5 -1
  248. package/utils/renderIcon.js +5 -5
  249. package/utils/useOnClickOutside.js +2 -2
  250. package/utils/usePortal.js +9 -9
  251. package/utils/validate.js +33 -33
@@ -1,11 +1,11 @@
1
1
  /** @jsxRuntime classic */
2
2
 
3
3
  /** @jsx jsx */
4
- import { memo, useEffect, useRef, useContext, forwardRef } from 'react';
5
- import { any, oneOf, node, string, bool, oneOfType } from 'prop-types';
4
+ import { memo, useEffect, useRef, useContext, forwardRef, useMemo, useImperativeHandle } from 'react';
5
+ import PropTypes from 'prop-types';
6
6
  import { jsx } from '@emotion/core';
7
7
  import { renderIcon } from '../../utils';
8
- import { SummaryRoot } from './css';
8
+ import { SummaryRootCSS } from './css';
9
9
  import AccordionContext from './context';
10
10
  const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
11
11
  expandIcon,
@@ -16,12 +16,9 @@ const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
16
16
  onClick,
17
17
  children,
18
18
  expandIconProps,
19
- ...props
20
- }, ref) => {
21
- if (!ref) {
22
- ref = useRef(null);
23
- }
24
-
19
+ style
20
+ }, reference) => {
21
+ const ref = useRef(null);
25
22
  const expandIconRef = useRef(null);
26
23
  const timer = useRef(null);
27
24
  const {
@@ -81,7 +78,7 @@ const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
81
78
  }, (detailsEl.firstChild.childNodes.length || 2.5) * 100);
82
79
  }
83
80
  } else {
84
- if (detailsEl) {
81
+ if (detailsEl && detailsEl.style.height) {
85
82
  detailsEl.style.height = detailsEl.scrollHeight + 'px';
86
83
 
87
84
  if (timer.current) {
@@ -116,59 +113,71 @@ const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
116
113
  showHideDetailHandler('hide');
117
114
  }
118
115
  }, [expandState]);
119
- return jsx("div", {
120
- css: SummaryRoot,
121
- ref: ref,
122
- tabIndex: "-1",
123
- ...props,
124
- onClick: onClickHandler,
125
- className: ['DGN-UI-Accordion-Summary', disabled ? 'disabled' : '', expandIcon ? expandIconAt : '', className, background === true ? 'background' : '', expandState ? 'expanding' : ''].join(' ').trim().replace(/\s+/g, ' ')
126
- }, jsx("div", {
127
- className: 'DGN-UI-Accordion-Summary-Content'
128
- }, children), !!expandIcon && jsx("div", {
129
- className: 'Accordion-Icon-Root'
130
- }, jsx("div", { ...expandIconProps,
131
- ref: expandIconRef,
132
- className: ['Accordion-Icon', collapseIcon ? '' : 'rotate-able', expandIconProps.className ? expandIconProps.className : ''].join(' ').trim()
133
- }, typeof expandIcon === 'string' ? renderIcon(expandIcon, 'effect', {
134
- className: 'Accordion-Expand-Icon'
135
- }) : jsx("span", {
136
- className: 'Accordion-Expand-Icon effect'
137
- }, expandIcon), !!collapseIcon && (typeof collapseIcon === 'string' ? renderIcon(collapseIcon, 'effect', {
138
- className: 'Accordion-Collapse-Icon'
139
- }) : jsx("span", {
140
- className: 'Accordion-Collapse-Icon effect'
141
- }, collapseIcon)))));
116
+ useImperativeHandle(reference, () => {
117
+ const currentRef = ref.current || {};
118
+ const _instance = {}; // methods
119
+
120
+ _instance.__proto__ = {}; // hidden methods
121
+
122
+ currentRef.instance = _instance;
123
+ return currentRef;
124
+ });
125
+ return useMemo(() => {
126
+ return jsx("div", {
127
+ css: SummaryRootCSS,
128
+ ref: ref,
129
+ tabIndex: "-1",
130
+ onClick: onClickHandler,
131
+ style: style,
132
+ className: ['DGN-UI-Accordion-Summary', disabled ? 'disabled' : '', expandIcon ? expandIconAt : '', className, background === true ? 'background' : '', expandState ? 'expanding' : ''].join(' ').trim().replace(/\s+/g, ' ')
133
+ }, jsx("div", {
134
+ className: 'DGN-UI-Accordion-Summary-Content'
135
+ }, children), !!expandIcon && jsx("div", {
136
+ className: 'Accordion-Icon-Root'
137
+ }, jsx("div", { ...expandIconProps,
138
+ ref: expandIconRef,
139
+ className: ['Accordion-Icon', collapseIcon ? '' : 'rotate-able', expandIconProps.className ? expandIconProps.className : ''].join(' ').trim()
140
+ }, typeof expandIcon === 'string' ? renderIcon(expandIcon, 'effect', {
141
+ className: 'Accordion-Expand-Icon'
142
+ }) : jsx("span", {
143
+ className: 'Accordion-Expand-Icon effect'
144
+ }, expandIcon), !!collapseIcon && (typeof collapseIcon === 'string' ? renderIcon(collapseIcon, 'effect', {
145
+ className: 'Accordion-Collapse-Icon'
146
+ }) : jsx("span", {
147
+ className: 'Accordion-Collapse-Icon effect'
148
+ }, collapseIcon)))));
149
+ }, [expandIcon, expandIconAt, className, background, children, collapseIcon, expandIconProps, expandState]);
142
150
  }));
143
151
  AccordionSummary.defaultProps = {
144
152
  expandIconAt: 'start',
145
153
  expandIconProps: {},
146
154
  className: '',
147
- expandIcon: 'ArrowRight'
155
+ expandIcon: 'ArrowRight',
156
+ style: {}
148
157
  };
149
158
  AccordionSummary.propTypes = {
150
159
  /** the icon to display for expand icon */
151
- expandIcon: any,
160
+ expandIcon: PropTypes.any,
152
161
 
153
162
  /** the icon to display for collapse icon */
154
- collapseIcon: any,
163
+ collapseIcon: PropTypes.any,
155
164
 
156
165
  /** the position to render expand icon */
157
- expandIconAt: oneOf(['start', 'end']),
166
+ expandIconAt: PropTypes.oneOf(['start', 'end']),
158
167
 
159
168
  /** background for label summary */
160
- background: oneOfType([string, bool]),
169
+ background: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
161
170
 
162
171
  /** class for Summary component */
163
- className: string,
172
+ className: PropTypes.string,
164
173
 
165
174
  /** The element to display in alert like text props (priority) */
166
- children: node,
175
+ children: PropTypes.node,
167
176
 
168
177
  /** props of expand and collapse icons */
169
- expandIconProps: any,
178
+ expandIconProps: PropTypes.any,
170
179
 
171
- /** any props else */
172
- props: any
180
+ /** style inline of component */
181
+ style: PropTypes.object
173
182
  };
174
183
  export default AccordionSummary;
@@ -152,28 +152,28 @@ AlertNotify.defaultProps = {
152
152
  }
153
153
  };
154
154
  AlertNotify.propTypes = {
155
- /**
156
- * used to set position of Alert (is a string or an object)
157
- * string is center (obligatory) as {vertical: 'center', horizontal: 'center'}
155
+ /**
156
+ * used to set position of Alert (is a string or an object)
157
+ * string is center (obligatory) as {vertical: 'center', horizontal: 'center'}
158
158
  */
159
159
  position: PropTypes.oneOfType([PropTypes.oneOf(['center']), PropTypes.shape({
160
160
  vertical: PropTypes.oneOf(['top', 'center', 'bottom']).isRequired,
161
161
  horizontal: PropTypes.oneOf(['left', 'center', 'right']).isRequired
162
162
  })]),
163
163
 
164
- /**
165
- * get the function used to add a new alert<br />
166
- * 2 parameters:<br />
167
- * + message: message for notify<br />
168
- * + options: is an object insist {<br />
169
- * position: position other than the default (if necessary)<br />
170
- * duration: new duration,<br />
171
- * color: new color,<br />
172
- * progressing: new progressing value,<br />
173
- * autoDisappear: new autoDisappear value,<br />
174
- * size: new autoDisappear,<br />
175
- * and any props else in Alert component <br />
176
- * }
164
+ /**
165
+ * get the function used to add a new alert<br />
166
+ * 2 parameters:<br />
167
+ * + message: message for notify<br />
168
+ * + options: is an object insist {<br />
169
+ * position: position other than the default (if necessary)<br />
170
+ * duration: new duration,<br />
171
+ * color: new color,<br />
172
+ * progressing: new progressing value,<br />
173
+ * autoDisappear: new autoDisappear value,<br />
174
+ * size: new autoDisappear,<br />
175
+ * and any props else in Alert component <br />
176
+ * }
177
177
  */
178
178
  getAddNotify: PropTypes.func.isRequired,
179
179
 
@@ -498,18 +498,18 @@ Avatar.propTypes = {
498
498
  /** source of file (http:// or https://) */
499
499
  src: PropTypes.string,
500
500
 
501
- /**
502
- * it is used to display the default if there is no src<br />
503
- * if undefined, will display icons available in the icons store
501
+ /**
502
+ * it is used to display the default if there is no src<br />
503
+ * if undefined, will display icons available in the icons store
504
504
  */
505
505
  defaultSrc: PropTypes.string,
506
506
 
507
507
  /** the direction to display more info */
508
508
  direction: PropTypes.oneOf(['top', 'down', 'left', 'right']),
509
509
 
510
- /**
511
- * data to display when hoverAble is true<br />
512
- * data is an object or function return a jsx element
510
+ /**
511
+ * data to display when hoverAble is true<br />
512
+ * data is an object or function return a jsx element
513
513
  */
514
514
  data: PropTypes.oneOfType([PropTypes.object, PropTypes.func]),
515
515
 
@@ -525,19 +525,19 @@ Avatar.propTypes = {
525
525
  /** any props else */
526
526
  props: PropTypes.any,
527
527
 
528
- /**
529
- * ref methods
530
- *
531
- * * option(): Gets all UI component properties
532
- * * Returns value - object
533
- * * option(optionName): Gets the value of a single property
534
- * * @param {optionName} - string
535
- * * Returns value - any
536
- * * option(optionName, optionValue): Updates the value of a single property
537
- * * @param {optionName} - string
538
- * * @param {optionValue} - any
539
- * * option(options): Updates the values of several properties
540
- * * @param {options} - object
528
+ /**
529
+ * ref methods
530
+ *
531
+ * * option(): Gets all UI component properties
532
+ * * Returns value - object
533
+ * * option(optionName): Gets the value of a single property
534
+ * * @param {optionName} - string
535
+ * * Returns value - any
536
+ * * option(optionName, optionValue): Updates the value of a single property
537
+ * * @param {optionName} - string
538
+ * * @param {optionValue} - any
539
+ * * option(options): Updates the values of several properties
540
+ * * @param {options} - object
541
541
  */
542
542
  reference: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
543
543
  current: PropTypes.instanceOf(Element)
@@ -210,11 +210,11 @@ Badge.propTypes = {
210
210
  /** other icon props when use prop name */
211
211
  iconProps: PropTypes.object,
212
212
 
213
- /** size of Badge
214
- *
215
- * * medium (dot 8px, typography p3)
216
- * * large (button 10px, typography p2)
217
- * * giant (button 12px, typography p1)
213
+ /** size of Badge
214
+ *
215
+ * * medium (dot 8px, typography p3)
216
+ * * large (button 10px, typography p2)
217
+ * * giant (button 12px, typography p1)
218
218
  * */
219
219
  size: PropTypes.oneOf(['medium', 'large', 'giant']),
220
220
 
@@ -359,14 +359,14 @@ ButtonIcon.propTypes = {
359
359
  /** custom hover color for button with color 'default' */
360
360
  colorHover: PropTypes.string,
361
361
 
362
- /**
363
- * size of button
364
- *
365
- * * tiny (button 24px, icon 16px)
366
- * * small (button 32px, icon 20px)
367
- * * medium (button 40px, icon 24px)
368
- * * large (button 48px, icon 32px)
369
- * * giant (button 56px, icon 40px)
362
+ /**
363
+ * size of button
364
+ *
365
+ * * tiny (button 24px, icon 16px)
366
+ * * small (button 32px, icon 20px)
367
+ * * medium (button 40px, icon 24px)
368
+ * * large (button 48px, icon 32px)
369
+ * * giant (button 56px, icon 40px)
370
370
  * */
371
371
  size: PropTypes.oneOf(['tiny', 'small', 'medium', 'large', 'giant']),
372
372
 
@@ -403,19 +403,19 @@ ButtonIcon.propTypes = {
403
403
  /** status loading of button */
404
404
  loading: PropTypes.bool,
405
405
 
406
- /**
407
- * ref methods
408
- *
409
- * * option(): Gets all UI component properties
410
- * * Returns value - object
411
- * * option(optionName): Gets the value of a single property
412
- * * @param {optionName} - string
413
- * * Returns value - any
414
- * * option(optionName, optionValue): Updates the value of a single property
415
- * * @param {optionName} - string
416
- * * @param {optionValue} - any
417
- * * option(options): Updates the values of several properties
418
- * * @param {options} - object
406
+ /**
407
+ * ref methods
408
+ *
409
+ * * option(): Gets all UI component properties
410
+ * * Returns value - object
411
+ * * option(optionName): Gets the value of a single property
412
+ * * @param {optionName} - string
413
+ * * Returns value - any
414
+ * * option(optionName, optionValue): Updates the value of a single property
415
+ * * @param {optionName} - string
416
+ * * @param {optionValue} - any
417
+ * * option(options): Updates the values of several properties
418
+ * * @param {options} - object
419
419
  */
420
420
  reference: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
421
421
  current: PropTypes.instanceOf(Element)
@@ -484,19 +484,19 @@ Button.propTypes = {
484
484
  /** status loading of button */
485
485
  loading: PropTypes.bool,
486
486
 
487
- /**
488
- * ref methods
489
- *
490
- * * option(): Gets all UI component properties
491
- * * Returns value - object
492
- * * option(optionName): Gets the value of a single property
493
- * * @param {optionName} - string
494
- * * Returns value - any
495
- * * option(optionName, optionValue): Updates the value of a single property
496
- * * @param {optionName} - string
497
- * * @param {optionValue} - any
498
- * * option(options): Updates the values of several properties
499
- * * @param {options} - object
487
+ /**
488
+ * ref methods
489
+ *
490
+ * * option(): Gets all UI component properties
491
+ * * Returns value - object
492
+ * * option(optionName): Gets the value of a single property
493
+ * * @param {optionName} - string
494
+ * * Returns value - any
495
+ * * option(optionName, optionValue): Updates the value of a single property
496
+ * * @param {optionName} - string
497
+ * * @param {optionValue} - any
498
+ * * option(options): Updates the values of several properties
499
+ * * @param {options} - object
500
500
  */
501
501
  reference: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
502
502
  current: PropTypes.instanceOf(Element)
@@ -111,8 +111,8 @@ Sector.propTypes = {
111
111
  onTouchEnd: PropTypes.func,
112
112
  onTouchStart: PropTypes.func,
113
113
 
114
- /** function displays selected items by custom, example:<br/>
115
- * renderItem={(data, index) => index + ' - ' + data.name}<br/>
114
+ /** function displays selected items by custom, example:<br/>
115
+ * renderItem={(data, index) => index + ' - ' + data.name}<br/>
116
116
  */
117
117
  renderSelectedItem: PropTypes.func,
118
118
  path: PropTypes.string.isRequired,
@@ -97,8 +97,8 @@ Sector.propTypes = {
97
97
  onTouchEnd: PropTypes.func,
98
98
  onTouchStart: PropTypes.func,
99
99
 
100
- /** function displays selected items by custom, example:<br/>
101
- * renderItem={(data, index) => index + ' - ' + data.name}<br/>
100
+ /** function displays selected items by custom, example:<br/>
101
+ * renderItem={(data, index) => index + ' - ' + data.name}<br/>
102
102
  */
103
103
  renderSelectedItem: PropTypes.func,
104
104
  path: PropTypes.string.isRequired,
@@ -156,11 +156,11 @@ const AttachChip = /*#__PURE__*/memo(({
156
156
  }))), attachView);
157
157
  });
158
158
  AttachChip.propTypes = {
159
- /** the file info, such as:<br/>
160
- * {<br/>
161
- * URL: https://url.com/pathname,<br/>
162
- * FileName: file.name,<br/>
163
- * }
159
+ /** the file info, such as:<br/>
160
+ * {<br/>
161
+ * URL: https://url.com/pathname,<br/>
162
+ * FileName: file.name,<br/>
163
+ * }
164
164
  */
165
165
  file: PropTypes.shape({
166
166
  URL: PropTypes.string.isRequired,
@@ -24,22 +24,24 @@ const Divider = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
24
24
  ref = useRef(null);
25
25
  }
26
26
 
27
+ if (typeof width === 'number') width = `${width}px`;
28
+ if (typeof height === 'number') height = `${height}px`;
27
29
  const DividerRoot = css`
28
- ${noBorder}
29
- flex-shrink: 0;
30
- margin: 0;
31
- background-color: ${colors.semantic[color] || color};
32
- &.vertical {
33
- width: ${width ? isNaN(width) ? width : width + 'px' : '1px'};
34
- height: ${height ? isNaN(height) ? height : height + 'px' : '100%'};
35
- /* margin: auto 5px; */
36
- }
37
- &.horizontal {
38
- width: ${width ? isNaN(width) ? height : width + 'px' : '100%'};
39
- height: ${height ? isNaN(height) ? height : height + 'px' : '1px'};
40
- /* margin: 5px auto; */
41
- }
42
- `;
30
+ ${noBorder}
31
+ flex-shrink: 0;
32
+ margin: 0;
33
+ background-color: ${colors.semantic[color] || color};
34
+ &.vertical {
35
+ width: ${width || '1px'};
36
+ height: ${height || '100%'};
37
+ /* margin: auto 5px; */
38
+ }
39
+ &.horizontal {
40
+ width: ${width || '100%'};
41
+ height: ${height || '1px'};
42
+ /* margin: 5px auto; */
43
+ }
44
+ `;
43
45
  useEffect(() => {
44
46
  if (direction === 'vertical' && !height && ref.current && ref.current.parentNode) {
45
47
  ref.current.style.height = ref.current.parentNode.offsetHeight + 'px';
@@ -1881,17 +1881,17 @@ Attachment.defaultProps = {
1881
1881
  uploadErrorInfo: {}
1882
1882
  };
1883
1883
  Attachment.propTypes = {
1884
- /** List attachment:<br />
1885
- * [{<br />
1886
- * &nbsp;&nbsp;&nbsp;&nbsp;"AttachmentID": "ATT2U8O7YPTF1KSNCW3X",<br />
1887
- * &nbsp;&nbsp;&nbsp;&nbsp;"URL": "https://apricot.diginet.com.vn/cdn-dev/file/8a07bee1eeff17a14eee.jpg?path=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmaWxlUGF0aCI6Ii8yMDIwLzA4LzQ0YjNhYjQ4LTMwNGQtNDQ3NC05ZDk0LWNkNGVlMDQwOGNlMy5qcGciLCJmaWxlTmFtZSI6IjhhMDdiZWUxZWVmZjE3YTE0ZWVlLmpwZyIsImZpbGVTaXplIjoyNDg4MzcsImZpbGVUeXBlIjoiaW1hZ2UvanBlZyIsImlhdCI6MTU5ODI0NDMwMiwiZXhwIjo4Nzk5ODI0NDMwMn0.fow6O5fp2z3vieA9gom5RRwQ7xxwBx9_7X2Fe8T2YI0",<br />
1888
- * &nbsp;&nbsp;&nbsp;&nbsp;"FileName": "8a07bee1eeff17a14eee.jpg",<br />
1889
- * &nbsp;&nbsp;&nbsp;&nbsp;"FileSize": 248837,<br />
1890
- * &nbsp;&nbsp;&nbsp;&nbsp;"KeyID": "W39OAD3YGLCWAQKV1D6PGEKNW4RLGVTZTUWLYEVFQ2QG8AOCXW",<br />
1891
- * &nbsp;&nbsp;&nbsp;&nbsp;"CreateUserID": "LEMONADMIN",<br />
1892
- * &nbsp;&nbsp;&nbsp;&nbsp;"CreateDate": "2020-08-24T11:54:04.307Z",<br />
1893
- * &nbsp;&nbsp;&nbsp;&nbsp;"UserName": "Quản trị hệ thống"<br />
1894
- * }, ...]
1884
+ /** List attachment:<br />
1885
+ * [{<br />
1886
+ * &nbsp;&nbsp;&nbsp;&nbsp;"AttachmentID": "ATT2U8O7YPTF1KSNCW3X",<br />
1887
+ * &nbsp;&nbsp;&nbsp;&nbsp;"URL": "https://apricot.diginet.com.vn/cdn-dev/file/8a07bee1eeff17a14eee.jpg?path=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmaWxlUGF0aCI6Ii8yMDIwLzA4LzQ0YjNhYjQ4LTMwNGQtNDQ3NC05ZDk0LWNkNGVlMDQwOGNlMy5qcGciLCJmaWxlTmFtZSI6IjhhMDdiZWUxZWVmZjE3YTE0ZWVlLmpwZyIsImZpbGVTaXplIjoyNDg4MzcsImZpbGVUeXBlIjoiaW1hZ2UvanBlZyIsImlhdCI6MTU5ODI0NDMwMiwiZXhwIjo4Nzk5ODI0NDMwMn0.fow6O5fp2z3vieA9gom5RRwQ7xxwBx9_7X2Fe8T2YI0",<br />
1888
+ * &nbsp;&nbsp;&nbsp;&nbsp;"FileName": "8a07bee1eeff17a14eee.jpg",<br />
1889
+ * &nbsp;&nbsp;&nbsp;&nbsp;"FileSize": 248837,<br />
1890
+ * &nbsp;&nbsp;&nbsp;&nbsp;"KeyID": "W39OAD3YGLCWAQKV1D6PGEKNW4RLGVTZTUWLYEVFQ2QG8AOCXW",<br />
1891
+ * &nbsp;&nbsp;&nbsp;&nbsp;"CreateUserID": "LEMONADMIN",<br />
1892
+ * &nbsp;&nbsp;&nbsp;&nbsp;"CreateDate": "2020-08-24T11:54:04.307Z",<br />
1893
+ * &nbsp;&nbsp;&nbsp;&nbsp;"UserName": "Quản trị hệ thống"<br />
1894
+ * }, ...]
1895
1895
  */
1896
1896
  data: PropTypes.array,
1897
1897
 
@@ -1964,15 +1964,15 @@ Attachment.propTypes = {
1964
1964
  /** event when uploading file failed */
1965
1965
  onUploadError: PropTypes.func,
1966
1966
 
1967
- /**
1968
- * event when removed file(s)<br/>
1969
- * return data: {<br/>
1970
- * &nbsp;&nbsp;&nbsp;&nbsp;attached: [Files] (insist old and all new files )<br/>
1971
- * &nbsp;&nbsp;&nbsp;&nbsp;allNewAttached: [Files]<br/>
1972
- * &nbsp;&nbsp;&nbsp;&nbsp;oldAttached: [Files]<br/>
1973
- * &nbsp;&nbsp;&nbsp;&nbsp;removedAttached: [Files]<br/>
1974
- * &nbsp;&nbsp;&nbsp;&nbsp;element: [NodeList (just removed)]<br/>
1975
- * }
1967
+ /**
1968
+ * event when removed file(s)<br/>
1969
+ * return data: {<br/>
1970
+ * &nbsp;&nbsp;&nbsp;&nbsp;attached: [Files] (insist old and all new files )<br/>
1971
+ * &nbsp;&nbsp;&nbsp;&nbsp;allNewAttached: [Files]<br/>
1972
+ * &nbsp;&nbsp;&nbsp;&nbsp;oldAttached: [Files]<br/>
1973
+ * &nbsp;&nbsp;&nbsp;&nbsp;removedAttached: [Files]<br/>
1974
+ * &nbsp;&nbsp;&nbsp;&nbsp;element: [NodeList (just removed)]<br/>
1975
+ * }
1976
1976
  */
1977
1977
  onRemove: PropTypes.func,
1978
1978