diginet-core-ui 1.3.42 → 1.3.43

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 (35) hide show
  1. package/assets/images/menu/dhr/MHRM00N0002.svg +22 -0
  2. package/assets/images/menu/dhr/MHRM00N0003.svg +17 -0
  3. package/assets/images/menu/dhr/MHRM00N0004.svg +12 -0
  4. package/assets/images/menu/dhr/MHRM13N0002.svg +13 -0
  5. package/assets/images/menu/dhr/MHRM13N0003.svg +12 -0
  6. package/assets/images/menu/dhr/MHRM29N0004.svg +18 -0
  7. package/assets/images/menu/dhr/MHRM39N0017.svg +14 -0
  8. package/assets/images/menu/dhr/MHRM39N0018.svg +5 -0
  9. package/assets/images/menu/dhr/MHRM39N0019.svg +11 -0
  10. package/components/alert/notify.js +16 -16
  11. package/components/badge/index.js +5 -5
  12. package/components/button/index.js +13 -13
  13. package/components/form-control/attachment/index.js +20 -20
  14. package/components/form-control/calendar/function.js +113 -113
  15. package/components/form-control/calendar/index.js +16 -16
  16. package/components/form-control/checkbox/index.js +152 -154
  17. package/components/form-control/date-range-picker/index.js +6 -6
  18. package/components/form-control/dropdown-box/index.js +3 -9
  19. package/components/form-control/form-group/index.js +40 -36
  20. package/components/form-control/label/index.js +12 -6
  21. package/components/form-control/number-input/index2.js +21 -19
  22. package/components/form-control/text-input/index.js +21 -19
  23. package/components/form-control/toggle/index.js +46 -56
  24. package/components/paging/page-info.js +9 -9
  25. package/components/popover/index.js +21 -21
  26. package/components/popup/v2/index.js +7 -7
  27. package/components/progress/circular.js +12 -12
  28. package/components/tab/tab-container.js +19 -11
  29. package/components/tab/tab-header.js +34 -31
  30. package/components/tab/tab-panel.js +15 -12
  31. package/components/tab/tab.js +60 -58
  32. package/icons/effect.js +15 -15
  33. package/package.json +1 -1
  34. package/readme.md +49 -33
  35. package/utils/number.js +6 -6
@@ -31,15 +31,15 @@ const {
31
31
  danger8,
32
32
  info8
33
33
  } = colors;
34
- /**
35
- * START STYLE
34
+ /**
35
+ * START STYLE
36
36
  */
37
37
 
38
- /**
39
- *
40
- * @param {Object} unique
41
- * @param {Boolean} boxShadow
42
- * @returns
38
+ /**
39
+ *
40
+ * @param {Object} unique
41
+ * @param {Boolean} boxShadow
42
+ * @returns
43
43
  */
44
44
 
45
45
  const generateCalendarCSS = (unique, boxShadow = true, onClickActive = true) => css`
@@ -243,15 +243,15 @@ const generateCalendarCSS = (unique, boxShadow = true, onClickActive = true) =>
243
243
  }
244
244
  }
245
245
  `;
246
- /**
247
- * END STYLE
246
+ /**
247
+ * END STYLE
248
248
  */
249
249
 
250
- /**
251
- *
252
- * @description return props of the typography.
253
- * @param {String} className
254
- * @returns {Object} props of the typography
250
+ /**
251
+ *
252
+ * @description return props of the typography.
253
+ * @param {String} className
254
+ * @returns {Object} props of the typography
255
255
  */
256
256
 
257
257
 
@@ -272,11 +272,11 @@ const typographyProps = className => {
272
272
  type: 'h6'
273
273
  };
274
274
  };
275
- /**
276
- *
277
- * @description return props of the button icon.
278
- * @param {String} className
279
- * @returns {Object} props of the button icon
275
+ /**
276
+ *
277
+ * @description return props of the button icon.
278
+ * @param {String} className
279
+ * @returns {Object} props of the button icon
280
280
  */
281
281
 
282
282
 
@@ -290,11 +290,11 @@ const buttonIconProps = className => {
290
290
  width: 28
291
291
  };
292
292
  };
293
- /**
294
- *
295
- * @description return props of the button icon.
296
- * @param {Function} fn
297
- * @returns {Object} props of the button text
293
+ /**
294
+ *
295
+ * @description return props of the button icon.
296
+ * @param {Function} fn
297
+ * @returns {Object} props of the button text
298
298
  */
299
299
 
300
300
 
@@ -311,21 +311,21 @@ const buttonTextProps = fn => {
311
311
  }
312
312
  };
313
313
  };
314
- /**
315
- * @description detect value is a Date object
316
- * @param {String | Number | Array} value
317
- * @returns boolean
314
+ /**
315
+ * @description detect value is a Date object
316
+ * @param {String | Number | Array} value
317
+ * @returns boolean
318
318
  */
319
319
 
320
320
 
321
321
  const isValidDate = value => {
322
322
  return new Date(value) instanceof Date && !isNaN(new Date(value));
323
323
  };
324
- /**
325
- *
326
- * @description set Sunday (0) to the last day of week.
327
- * @param {Date} date
328
- * @returns number of day from 0 (Monday) to 6 (Sunday).
324
+ /**
325
+ *
326
+ * @description set Sunday (0) to the last day of week.
327
+ * @param {Date} date
328
+ * @returns number of day from 0 (Monday) to 6 (Sunday).
329
329
  */
330
330
 
331
331
 
@@ -334,26 +334,26 @@ const getDateOfWeek = date => {
334
334
  if (day === 0) day = 7;
335
335
  return day - 1;
336
336
  };
337
- /**
338
- *
339
- * @description check day is today.
340
- * @param {Date} day
341
- * @param {Date} today
342
- * @param {String} className
343
- * @returns {Boolean} is today
337
+ /**
338
+ *
339
+ * @description check day is today.
340
+ * @param {Date} day
341
+ * @param {Date} today
342
+ * @param {String} className
343
+ * @returns {Boolean} is today
344
344
  */
345
345
 
346
346
 
347
347
  const isToday = (day, today, className) => {
348
348
  return +moment(day).diff(today) === 0 ? className : '';
349
349
  };
350
- /**
351
- *
352
- * @description check day is active day.
353
- * @param {Date} day
354
- * @param {Date} active
355
- * @param {String} className
356
- * @returns {Boolean} is active day
350
+ /**
351
+ *
352
+ * @description check day is active day.
353
+ * @param {Date} day
354
+ * @param {Date} active
355
+ * @param {String} className
356
+ * @returns {Boolean} is active day
357
357
  */
358
358
 
359
359
 
@@ -370,14 +370,14 @@ const isActive = (day, active, className) => {
370
370
 
371
371
  return '';
372
372
  };
373
- /**
374
- *
375
- * @description check day is min/max day.
376
- * @param {Date} day
377
- * @param {Date} max
378
- * @param {Date} min
379
- * @param {Object} className
380
- * @returns {Boolean} is limited day
373
+ /**
374
+ *
375
+ * @description check day is min/max day.
376
+ * @param {Date} day
377
+ * @param {Date} max
378
+ * @param {Date} min
379
+ * @param {Object} className
380
+ * @returns {Boolean} is limited day
381
381
  */
382
382
 
383
383
 
@@ -408,17 +408,17 @@ const isBeforeLimit = (min, time) => {
408
408
  const isAfterLimit = (max, time) => {
409
409
  return max && isValidDate(max) && moment(time).diff(new Date(max).setHours(0, 0, 0, 0)) > 0;
410
410
  };
411
- /**
412
- *
413
- * @description return the table body of the calendar.
414
- * @param {Date} time
415
- * @param {Date} activeValue
416
- * @param {Object} className
417
- * @param {Boolean} displayAnotherMonth
418
- * @param {Function} onTableDataClick
419
- * @param {Date} min
420
- * @param {Date} max
421
- * @returns {Element}
411
+ /**
412
+ *
413
+ * @description return the table body of the calendar.
414
+ * @param {Date} time
415
+ * @param {Date} activeValue
416
+ * @param {Object} className
417
+ * @param {Boolean} displayAnotherMonth
418
+ * @param {Function} onTableDataClick
419
+ * @param {Date} min
420
+ * @param {Date} max
421
+ * @returns {Element}
422
422
  */
423
423
 
424
424
 
@@ -438,8 +438,8 @@ const renderTableBody = (time, activeValue, className, displayAnotherMonth, onTa
438
438
  weekDateLast = getDateOfWeek(lastDay);
439
439
 
440
440
  if (activeValue && Array.isArray(activeValue) && activeValue.length === 2 && activeValue[0] !== activeValue[1]) {
441
- /**
442
- * days of previous month
441
+ /**
442
+ * days of previous month
443
443
  */
444
444
  active = activeValue;
445
445
 
@@ -455,8 +455,8 @@ const renderTableBody = (time, activeValue, className, displayAnotherMonth, onTa
455
455
  }, jsx(Typography, { ...typographyProps(className.day.day)
456
456
  }, '')));
457
457
  }
458
- /**
459
- * days of this month
458
+ /**
459
+ * days of this month
460
460
  */
461
461
 
462
462
 
@@ -470,8 +470,8 @@ const renderTableBody = (time, activeValue, className, displayAnotherMonth, onTa
470
470
  }, jsx(Typography, { ...typographyProps(className.day.day)
471
471
  }, i + 1)));
472
472
  }
473
- /**
474
- * days of next month
473
+ /**
474
+ * days of next month
475
475
  */
476
476
 
477
477
 
@@ -488,8 +488,8 @@ const renderTableBody = (time, activeValue, className, displayAnotherMonth, onTa
488
488
  }, '')));
489
489
  }
490
490
  } else {
491
- /**
492
- * days of previous month
491
+ /**
492
+ * days of previous month
493
493
  */
494
494
  for (let i = weekDateFirst; i > 0; i--) {
495
495
  const day = new Date(time.getFullYear(), time.getMonth() - 1, displayAnotherMonth ? prevDate - i + 1 : 1);
@@ -501,8 +501,8 @@ const renderTableBody = (time, activeValue, className, displayAnotherMonth, onTa
501
501
  }, jsx(Typography, { ...typographyProps(className.day.day)
502
502
  }, displayAnotherMonth ? prevDate - i + 1 : '')));
503
503
  }
504
- /**
505
- * days of this month
504
+ /**
505
+ * days of this month
506
506
  */
507
507
 
508
508
 
@@ -516,8 +516,8 @@ const renderTableBody = (time, activeValue, className, displayAnotherMonth, onTa
516
516
  }, jsx(Typography, { ...typographyProps(className.day.day)
517
517
  }, i + 1)));
518
518
  }
519
- /**
520
- * days of next month
519
+ /**
520
+ * days of next month
521
521
  */
522
522
 
523
523
 
@@ -547,10 +547,10 @@ const renderTableBody = (time, activeValue, className, displayAnotherMonth, onTa
547
547
 
548
548
  return tableBody;
549
549
  };
550
- /**
551
- *
552
- * @param {Object} className
553
- * @returns
550
+ /**
551
+ *
552
+ * @param {Object} className
553
+ * @returns
554
554
  */
555
555
 
556
556
 
@@ -573,15 +573,15 @@ const renderHeader = className => {
573
573
  }, tableHeader));
574
574
  return header;
575
575
  };
576
- /**
577
- *
578
- * @param {Object} className
579
- * @param {Object} refs
580
- * @param {Function} dbLeftFn
581
- * @param {Function} leftFn
582
- * @param {Function} rightFn
583
- * @param {Function} dbRightFn
584
- * @returns navigator
576
+ /**
577
+ *
578
+ * @param {Object} className
579
+ * @param {Object} refs
580
+ * @param {Function} dbLeftFn
581
+ * @param {Function} leftFn
582
+ * @param {Function} rightFn
583
+ * @param {Function} dbRightFn
584
+ * @returns navigator
585
585
  */
586
586
 
587
587
 
@@ -615,10 +615,10 @@ const renderNavigator = (className, refs, dbLeftFn, leftFn, rightFn, dbRightFn,
615
615
  onClick: dbRightFn,
616
616
  ref: refs.doubleRight
617
617
  })));
618
- /**
619
- *
620
- * @param {Date} time
621
- * @returns {String} month year
618
+ /**
619
+ *
620
+ * @param {Date} time
621
+ * @returns {String} month year
622
622
  */
623
623
 
624
624
 
@@ -627,12 +627,12 @@ const renderNavigatorContent = time => {
627
627
  const months = getGlobal(['months', 'full']);
628
628
  return [months[value.getMonth()], value.getFullYear()];
629
629
  };
630
- /**
631
- *
632
- * @param {Date} time
633
- * @param {Object} refs
634
- * @param {Date} min
635
- * @param {Date} max
630
+ /**
631
+ *
632
+ * @param {Date} time
633
+ * @param {Object} refs
634
+ * @param {Date} min
635
+ * @param {Date} max
636
636
  */
637
637
 
638
638
 
@@ -674,18 +674,18 @@ const onUpdateNavigator = (time, refs, min, max) => {
674
674
  }
675
675
  }
676
676
  };
677
- /**
678
- *
679
- * @param {Date} time
680
- * @param {Object} navigatorRefs
681
- * @param {Date} min
682
- * @param {Date} max
683
- * @param {Element} table
684
- * @param {Date} activeValue
685
- * @param {Object} className
686
- * @param {Boolean} displayAnotherMonth
687
- * @param {Function} onTableDataClick
688
- * @param {Function} onUpdateNavigatorValue
677
+ /**
678
+ *
679
+ * @param {Date} time
680
+ * @param {Object} navigatorRefs
681
+ * @param {Date} min
682
+ * @param {Date} max
683
+ * @param {Element} table
684
+ * @param {Date} activeValue
685
+ * @param {Object} className
686
+ * @param {Boolean} displayAnotherMonth
687
+ * @param {Function} onTableDataClick
688
+ * @param {Function} onUpdateNavigatorValue
689
689
  */
690
690
 
691
691
 
@@ -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,