diginet-core-ui 1.3.24 → 1.3.29
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.
- package/assets/fonts/SF-Pro-Display-Bold.otf +0 -0
- package/assets/fonts/SF-Pro-Display-Medium.otf +0 -0
- package/assets/fonts/SF-Pro-Display-Regular.otf +0 -0
- package/assets/images/icons/wifi.svg +3 -0
- package/assets/images/menu/dhr/MHRM09N0004.svg +14 -0
- package/assets/images/menu/dhr/MHRP09N0028.svg +6 -0
- package/assets/images/menu/dhr/MHRP09N0029.svg +14 -0
- package/assets/images/menu/dhr/MHRP09N0030.svg +4 -0
- package/assets/images/menu/dhr/MHRP09N0031.svg +5 -0
- package/assets/images/menu/dhr/MHRP29N0012.svg +7 -0
- package/assets/images/menu/dhr/MHRP29N0021.svg +8 -0
- package/assets/images/menu/dhr/MHRP29N0022.svg +9 -0
- package/assets/images/menu/dhr/MHRP29N0023.svg +22 -0
- package/assets/images/menu/dhr/MHRP39N0015.svg +5 -0
- package/assets/images/menu/dhr/TASK.svg +9 -0
- package/assets/images/menu/erp/D05.svg +8 -0
- package/assets/images/menu/erp/D06.svg +4 -0
- package/assets/images/menu/erp/D90R.svg +9 -0
- package/assets/images/menu/erp/DBC.svg +9 -0
- package/assets/images/menu/erp/{W05F0006.svg → W05F0006N0000.svg} +0 -0
- package/assets/images/menu/erp/{W05F0008.svg → W05F0008N0000.svg} +0 -0
- package/assets/images/menu/erp/{W05F4000.svg → W05F4000N0000.svg} +0 -0
- package/assets/images/menu/erp/{W06F0005.svg → W06F0005N0000.svg} +0 -0
- package/assets/images/menu/erp/{W06F0006.svg → W06F0006N0000.svg} +0 -0
- package/assets/images/menu/erp/{W06F0008.svg → W06F0008N0000.svg} +0 -0
- package/assets/images/menu/erp/W94F1000N0000.svg +9 -0
- package/assets/images/menu/erp/W94F1000N0001.svg +9 -0
- package/components/accordion/css.js +42 -33
- package/components/accordion/details.js +29 -17
- package/components/accordion/group.js +23 -23
- package/components/accordion/index.js +36 -27
- package/components/accordion/summary.js +10 -11
- package/components/alert/index.js +97 -91
- package/components/alert/notify.js +10 -8
- package/components/avatar/index.js +19 -17
- package/components/badge/index.js +122 -139
- package/components/button/icon.js +242 -334
- package/components/button/index.js +272 -427
- package/components/button/more.js +4 -5
- package/components/button/ripple-effect.js +4 -6
- package/components/card/body-card.js +4 -6
- package/components/card/card.js +4 -8
- package/components/card/index.js +4 -5
- package/components/chart/Pie/Sector.js +4 -5
- package/components/chart/Pie/Sectors.js +5 -5
- package/components/chart/Pie/index.js +8 -9
- package/components/chart/Pie-v2/Sector.js +4 -5
- package/components/chart/Pie-v2/Sectors.js +7 -8
- package/components/chart/Pie-v2/index.js +11 -16
- package/components/chart/bar/Bar.js +2 -3
- package/components/chart/bar/Labels.js +9 -11
- package/components/chart/bar/index.js +17 -9
- package/components/chart/bar-v2/Bar.js +2 -3
- package/components/chart/bar-v2/Labels.js +9 -11
- package/components/chart/bar-v2/index.js +17 -9
- package/components/chart/line/Labels.js +8 -10
- package/components/chart/line/Point.js +2 -3
- package/components/chart/line/index.js +17 -9
- package/components/chart/line-v2/Labels.js +8 -10
- package/components/chart/line-v2/Point.js +2 -3
- package/components/chart/line-v2/index.js +17 -9
- package/components/chip/attach.js +12 -16
- package/components/chip/index.js +8 -11
- package/components/collapse/index.js +4 -5
- package/components/divider/index.js +27 -14
- package/components/form-control/attachment/index.js +143 -87
- package/components/form-control/calendar/function.js +24 -23
- package/components/form-control/calendar/index.js +2 -4
- package/components/form-control/calendar/range.js +3 -4
- package/components/form-control/checkbox/index.js +85 -71
- package/components/form-control/control/index.js +4 -6
- package/components/form-control/date-picker/index-old.js +0 -2
- package/components/form-control/date-picker/index.js +39 -43
- package/components/form-control/date-range-picker/index.js +26 -28
- package/components/form-control/dropdown/index.js +173 -202
- package/components/form-control/dropdown-box/index.js +72 -49
- package/components/form-control/form-group/index.js +4 -5
- package/components/form-control/helper-text/index.js +4 -5
- package/components/form-control/input-base/index.js +28 -38
- package/components/form-control/label/index.js +23 -13
- package/components/form-control/money-input/index.js +6 -6
- package/components/form-control/number-input/index.js +12 -14
- package/components/form-control/phone-input/index.js +4 -5
- package/components/form-control/radio/index.js +7 -15
- package/components/form-control/text-input/index.js +14 -24
- package/components/form-control/time-picker/index.js +15 -26
- package/components/form-control/time-picker/swiper.js +2 -4
- package/components/form-control/toggle/index.js +22 -18
- package/components/form-view/helper-text.js +4 -5
- package/components/form-view/index.js +4 -5
- package/components/form-view/input.js +5 -7
- package/components/form-view/label.js +2 -6
- package/components/list/list-item-action.js +7 -8
- package/components/list/list-item-icon.js +4 -5
- package/components/list/list-item-text.js +4 -5
- package/components/list/list-item.js +4 -5
- package/components/list/list.js +4 -5
- package/components/list/sub-header.js +4 -5
- package/components/modal/body.js +4 -6
- package/components/modal/footer.js +4 -6
- package/components/modal/header.js +8 -14
- package/components/modal/index.js +4 -5
- package/components/modal/modal.js +6 -13
- package/components/others/extra/index.js +4 -8
- package/components/others/option-wrapper/index.js +57 -0
- package/components/others/scrollbar/index.js +4 -5
- package/components/paging/page-info.js +282 -231
- package/components/paging/page-selector.js +4 -7
- package/components/popover/index.js +6 -7
- package/components/popup/danger_popup.js +8 -18
- package/components/popup/index.js +26 -34
- package/components/popup/proposals_popup.js +9 -16
- package/components/popup/v2/danger-popup.js +4 -6
- package/components/popup/v2/index.js +116 -98
- package/components/popup/v2/info-popup.js +4 -6
- package/components/popup/v2/success-popup.js +4 -6
- package/components/popup/v2/warning-popup.js +4 -6
- package/components/popup/v2/yes-no-popup.js +4 -6
- package/components/progress/circular.js +17 -26
- package/components/progress/linear.js +11 -13
- package/components/rating/index.js +114 -233
- package/components/slider/slider-container.js +15 -10
- package/components/slider/slider-item.js +10 -12
- package/components/status/index.js +63 -57
- package/components/tab/tab-container.js +26 -24
- package/components/tab/tab-header.js +36 -27
- package/components/tab/tab-panel.js +32 -15
- package/components/tab/tab.js +79 -80
- package/components/tooltip/index.js +4 -4
- package/components/transfer/index.js +10 -11
- package/components/tree-view/css.js +2 -0
- package/components/tree-view/index.js +14 -13
- package/components/typography/index.js +6 -112
- package/css/styles.css +1 -1
- package/css/styles.css.map +1 -1
- package/global/index.js +2 -0
- package/icons/basic.js +1648 -959
- package/icons/effect.js +45 -103
- package/package.json +1 -1
- package/readme.md +66 -0
- package/styles/color-helper.js +7 -146
- package/styles/colors.js +6 -2
- package/styles/font.js +9 -0
- package/styles/general.js +100 -7
- package/styles/typography.js +25 -26
- package/theme/settings.js +9 -2
- package/theme/theme-provider.js +15 -7
- package/theme/with-styles.js +2 -4
- package/theme/with-theme.js +2 -4
- package/utils/isMobile.js +21 -0
- package/utils/renderHTML.js +4 -5
- package/utils/renderIcon.js +15 -11
- package/utils/updatePosition.js +2 -2
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
/** @jsxRuntime classic */
|
|
4
2
|
|
|
5
3
|
/** @jsx jsx */
|
|
@@ -12,10 +10,10 @@ import { date as moment, capitalizeSentenceCase, randomString, updatePosition }
|
|
|
12
10
|
import CalendarComp from '../calendar';
|
|
13
11
|
import ControlComp from '../control';
|
|
14
12
|
import theme from '../../../theme/settings';
|
|
15
|
-
import
|
|
16
|
-
import { HelperText, InputBase, Label } from '../../index';
|
|
13
|
+
import { ButtonIcon, HelperText, InputBase, Label } from '../../index';
|
|
17
14
|
import Button from '../../button';
|
|
18
15
|
import Tooltip from '../../tooltip';
|
|
16
|
+
import { isValidDate } from '../calendar/function';
|
|
19
17
|
const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
20
18
|
actionIconAt,
|
|
21
19
|
clearAble,
|
|
@@ -95,33 +93,26 @@ const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
95
93
|
align-items : center;
|
|
96
94
|
color : inherit;
|
|
97
95
|
display : flex;
|
|
98
|
-
width : 24px;
|
|
99
|
-
& span {
|
|
100
|
-
padding: 0;
|
|
101
|
-
}
|
|
102
96
|
.${unique.icon} {
|
|
103
97
|
cursor : pointer;
|
|
104
98
|
opacity : 0;
|
|
105
|
-
transition :
|
|
106
|
-
|
|
107
|
-
will-change:
|
|
108
|
-
}
|
|
109
|
-
.${unique.icon}-cancel {
|
|
110
|
-
transform : translateX(-100%);
|
|
99
|
+
transition : display 50ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, opacity 300ms cubic-bezier(0.4, 0, 0.2, 1) 50ms;
|
|
100
|
+
display : none;
|
|
101
|
+
will-change: display, opacity;
|
|
111
102
|
}
|
|
112
103
|
.${unique.icon}-accept {
|
|
113
104
|
opacity : 1;
|
|
114
|
-
|
|
105
|
+
display: block;
|
|
115
106
|
}
|
|
116
107
|
`;
|
|
117
108
|
const hiddenStyle = {
|
|
118
109
|
opacity: 0,
|
|
119
|
-
|
|
110
|
+
display: 'none'
|
|
120
111
|
};
|
|
121
112
|
const activeStyle = {
|
|
122
113
|
opacity: 1,
|
|
123
114
|
pointerEvents: 'none',
|
|
124
|
-
|
|
115
|
+
display: 'block'
|
|
125
116
|
};
|
|
126
117
|
const pickerCSS = {
|
|
127
118
|
backGr: 'background-color: transparent; inset: 0px; pointer-events: auto; position: fixed; z-index: 9001;',
|
|
@@ -162,11 +153,6 @@ const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
162
153
|
padding: '7px 8px'
|
|
163
154
|
}
|
|
164
155
|
};
|
|
165
|
-
|
|
166
|
-
const isValid = time => {
|
|
167
|
-
return !isNaN(Date.parse(typeof time !== 'date' ? new Date(time) : time));
|
|
168
|
-
};
|
|
169
|
-
|
|
170
156
|
const handleDisplayValue = useCallback(value => {
|
|
171
157
|
displayValue.current = new Date(value);
|
|
172
158
|
setDisplayValue();
|
|
@@ -177,7 +163,7 @@ const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
177
163
|
}, [focusedValue]);
|
|
178
164
|
|
|
179
165
|
const setButtonState = () => {
|
|
180
|
-
if (!footerRef.current || focusedValue.current === undefined || !
|
|
166
|
+
if (!footerRef.current || focusedValue.current === undefined || !isValidDate(focusedValue.current)) return;
|
|
181
167
|
const isEqual = focusedValue.current === null || Date.parse(new Date(focusedValue.current)) === Date.parse(new Date(displayValue.current));
|
|
182
168
|
footerRef.current.querySelector(`.${unique.cancel}`).disabled = isEqual;
|
|
183
169
|
footerRef.current.querySelector(`.${unique.confirm}`).disabled = isEqual;
|
|
@@ -449,12 +435,14 @@ const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
449
435
|
const iconComp = jsx("div", {
|
|
450
436
|
css: iconAreaCSS,
|
|
451
437
|
ref: iconRef
|
|
452
|
-
}, jsx(
|
|
438
|
+
}, jsx(ButtonIcon, {
|
|
439
|
+
viewType: 'ghost',
|
|
453
440
|
onClick: triggerFocus,
|
|
454
441
|
className: `${unique.icon} ${unique.icon}-accept`,
|
|
455
442
|
viewBox: true,
|
|
456
443
|
name: 'CalendarNew'
|
|
457
|
-
}), jsx(
|
|
444
|
+
}), jsx(ButtonIcon, {
|
|
445
|
+
viewType: 'ghost',
|
|
458
446
|
onClick: onClear,
|
|
459
447
|
className: `${unique.icon} ${unique.icon}-cancel`,
|
|
460
448
|
viewBox: true,
|
|
@@ -466,17 +454,17 @@ const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
466
454
|
css: controlContainerCSS,
|
|
467
455
|
className: unique.footer,
|
|
468
456
|
ref: footerRef
|
|
469
|
-
}, jsx(Button,
|
|
457
|
+
}, jsx(Button, { ...buttonProps,
|
|
470
458
|
className: unique.cancel,
|
|
471
459
|
onClick: onCancel
|
|
472
|
-
}
|
|
460
|
+
}, cancelText), jsx(Button, { ...buttonProps,
|
|
473
461
|
color: 'info',
|
|
474
462
|
className: unique.confirm,
|
|
475
463
|
onClick: onConfirm
|
|
476
|
-
}
|
|
477
|
-
const isError = !!error && (!value || !
|
|
464
|
+
}, confirmText));
|
|
465
|
+
const isError = !!error && (!value || !isValidDate(value));
|
|
478
466
|
useEffect(() => {
|
|
479
|
-
if (defaultValue &&
|
|
467
|
+
if (defaultValue && isValidDate(defaultValue)) {
|
|
480
468
|
handleDisplayValue(defaultValue);
|
|
481
469
|
setInputValue({
|
|
482
470
|
value: displayValue.current
|
|
@@ -488,7 +476,7 @@ const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
488
476
|
};
|
|
489
477
|
}, []);
|
|
490
478
|
useEffect(() => {
|
|
491
|
-
if (value &&
|
|
479
|
+
if (value && isValidDate(value)) {
|
|
492
480
|
handleFocusedValue(value);
|
|
493
481
|
handleDisplayValue(value);
|
|
494
482
|
setInputValue({
|
|
@@ -496,6 +484,14 @@ const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
496
484
|
});
|
|
497
485
|
setButtonState();
|
|
498
486
|
closePicker();
|
|
487
|
+
} else if (defaultValue && isValidDate(defaultValue)) {
|
|
488
|
+
handleFocusedValue(defaultValue);
|
|
489
|
+
handleDisplayValue(defaultValue);
|
|
490
|
+
setInputValue({
|
|
491
|
+
value: displayValue.current
|
|
492
|
+
});
|
|
493
|
+
setButtonState();
|
|
494
|
+
closePicker();
|
|
499
495
|
} else {
|
|
500
496
|
if (ipRef.current) ipRef.current.value = '';
|
|
501
497
|
|
|
@@ -552,22 +548,22 @@ const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
552
548
|
closePicker();
|
|
553
549
|
};
|
|
554
550
|
}, [actionIconAt, clearAble, controls, disabled, displayFormat, displayAnotherMonth, max, min, readOnly, returnFormat, viewType]);
|
|
555
|
-
return jsx(ControlComp,
|
|
551
|
+
return jsx(ControlComp, { ...props,
|
|
556
552
|
disabled: disabled,
|
|
557
553
|
error: isError,
|
|
558
554
|
ref: ref,
|
|
559
555
|
style: style
|
|
560
|
-
}
|
|
556
|
+
}, !!label && jsx(Label, { ...labelProps,
|
|
561
557
|
disabled: disabled,
|
|
562
558
|
required: required
|
|
563
|
-
}
|
|
559
|
+
}, label), jsx(Tooltip, {
|
|
564
560
|
title: (ipRef === null || ipRef === void 0 ? void 0 : (_ipRef$current = ipRef.current) === null || _ipRef$current === void 0 ? void 0 : _ipRef$current.clientWidth) < 200 ? ipRef === null || ipRef === void 0 ? void 0 : (_ipRef$current2 = ipRef.current) === null || _ipRef$current2 === void 0 ? void 0 : _ipRef$current2.value : '',
|
|
565
561
|
style: {
|
|
566
562
|
width: 'none'
|
|
567
563
|
}
|
|
568
|
-
}, jsx(InputBase,
|
|
569
|
-
placeholder: placeholder
|
|
570
|
-
|
|
564
|
+
}, jsx(InputBase, {
|
|
565
|
+
placeholder: placeholder,
|
|
566
|
+
...inputProps,
|
|
571
567
|
readOnly: true,
|
|
572
568
|
ref: ipConRef,
|
|
573
569
|
inputRef: ipRef,
|
|
@@ -582,9 +578,9 @@ const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
582
578
|
className: 'non-effect allow-disabled'
|
|
583
579
|
},
|
|
584
580
|
endIcon: endIcon
|
|
585
|
-
}))
|
|
581
|
+
})), isError && jsx(HelperText, { ...errorProps,
|
|
586
582
|
disabled: disabled
|
|
587
|
-
}
|
|
583
|
+
}, error));
|
|
588
584
|
}));
|
|
589
585
|
DatePicker.defaultProps = {
|
|
590
586
|
actionIconAt: 'end',
|
|
@@ -611,7 +607,7 @@ DatePicker.propTypes = {
|
|
|
611
607
|
controls: PropTypes.bool,
|
|
612
608
|
|
|
613
609
|
/** the default value of the component */
|
|
614
|
-
defaultValue: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string]),
|
|
610
|
+
defaultValue: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string, PropTypes.object]),
|
|
615
611
|
|
|
616
612
|
/** if 'true' the form control will be disabled */
|
|
617
613
|
disabled: PropTypes.bool,
|
|
@@ -638,10 +634,10 @@ DatePicker.propTypes = {
|
|
|
638
634
|
labelProps: PropTypes.object,
|
|
639
635
|
|
|
640
636
|
/** min value of date picker */
|
|
641
|
-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string]),
|
|
637
|
+
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string, PropTypes.object]),
|
|
642
638
|
|
|
643
639
|
/** max value of date picker */
|
|
644
|
-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string]),
|
|
640
|
+
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string, PropTypes.object]),
|
|
645
641
|
|
|
646
642
|
/** a callback function when value input change */
|
|
647
643
|
onChange: PropTypes.func,
|
|
@@ -668,7 +664,7 @@ DatePicker.propTypes = {
|
|
|
668
664
|
textAlign: PropTypes.oneOf(['center', 'end', 'start']),
|
|
669
665
|
|
|
670
666
|
/** value of the component */
|
|
671
|
-
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string, PropTypes.array]),
|
|
667
|
+
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string, PropTypes.array, PropTypes.object]),
|
|
672
668
|
|
|
673
669
|
/** view type of the form control */
|
|
674
670
|
viewType: PropTypes.oneOf(['outlined', 'underlined'])
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
/** @jsxRuntime classic */
|
|
4
2
|
|
|
5
3
|
/** @jsx jsx */
|
|
6
4
|
import { css, jsx } from '@emotion/core';
|
|
7
5
|
import { useImperativeHandle, useRef, memo, forwardRef, useEffect, useState, useCallback } from 'react';
|
|
8
|
-
import { Button, Divider, HelperText, InputBase, Label, Typography } from '../..';
|
|
6
|
+
import { Button, ButtonIcon, Divider, HelperText, InputBase, Label, Typography } from '../..';
|
|
9
7
|
import ControlComp from '../control';
|
|
10
8
|
import PropTypes from 'prop-types';
|
|
11
9
|
import theme from '../../../theme/settings';
|
|
12
|
-
import Icon from '../../../icons';
|
|
13
10
|
import { render } from 'react-dom';
|
|
14
11
|
import { randomString, updatePosition, date as moment, capitalizeSentenceCase, isEqual } from '../../../utils';
|
|
15
12
|
import { getGlobal } from '../../../global';
|
|
@@ -139,26 +136,23 @@ const DateRangePickerV2 = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
139
136
|
.${unique.icon} {
|
|
140
137
|
cursor : pointer;
|
|
141
138
|
opacity : 0;
|
|
142
|
-
transition :
|
|
143
|
-
|
|
144
|
-
will-change:
|
|
145
|
-
}
|
|
146
|
-
.${unique.icon}-cancel {
|
|
147
|
-
transform : translateX(-100%);
|
|
139
|
+
transition : display 50ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, opacity 300ms cubic-bezier(0.4, 0, 0.2, 1) 50ms;
|
|
140
|
+
display : none;
|
|
141
|
+
will-change: display, opacity;
|
|
148
142
|
}
|
|
149
143
|
.${unique.icon}-accept {
|
|
150
144
|
opacity : 1;
|
|
151
|
-
|
|
145
|
+
display: block;
|
|
152
146
|
}
|
|
153
147
|
`;
|
|
154
148
|
const hiddenStyle = {
|
|
155
149
|
opacity: 0,
|
|
156
|
-
|
|
150
|
+
display: 'none'
|
|
157
151
|
};
|
|
158
152
|
const activeStyle = {
|
|
159
153
|
opacity: 1,
|
|
160
154
|
pointerEvents: 'none',
|
|
161
|
-
|
|
155
|
+
display: 'block'
|
|
162
156
|
};
|
|
163
157
|
const controlContainerCSS = css`
|
|
164
158
|
display : flex;
|
|
@@ -488,7 +482,8 @@ const DateRangePickerV2 = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
488
482
|
"data-time": Date.parse(day),
|
|
489
483
|
className: `${[unique.table.data, 'this_month', isToday(day), isActive(day), (max && max !== undefined || min && min !== undefined) && isLimit(day, new Date(max).setHours(0, 0, 0, 0), new Date(min).setHours(0, 0, 0, 0)), isBetween(Date.parse(day))].join(' ').trim().replace(/ +(?= )/g, '')}`,
|
|
490
484
|
onClick: onDayClick
|
|
491
|
-
}, jsx(Typography, typographyProps(unique.day.day)
|
|
485
|
+
}, jsx(Typography, { ...typographyProps(unique.day.day)
|
|
486
|
+
}, i + 1)));
|
|
492
487
|
}
|
|
493
488
|
/**
|
|
494
489
|
* days of next month
|
|
@@ -1121,12 +1116,14 @@ const DateRangePickerV2 = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
1121
1116
|
const iconComp = jsx("div", {
|
|
1122
1117
|
css: iconAreaCSS,
|
|
1123
1118
|
ref: iconRef
|
|
1124
|
-
}, jsx(
|
|
1119
|
+
}, jsx(ButtonIcon, {
|
|
1120
|
+
viewType: 'ghost',
|
|
1125
1121
|
onClick: triggerFocus,
|
|
1126
1122
|
className: `${unique.icon} ${unique.icon}-accept`,
|
|
1127
1123
|
viewBox: true,
|
|
1128
1124
|
name: 'CalendarNew'
|
|
1129
|
-
}), jsx(
|
|
1125
|
+
}), jsx(ButtonIcon, {
|
|
1126
|
+
viewType: 'ghost',
|
|
1130
1127
|
onClick: onClear,
|
|
1131
1128
|
className: `${unique.icon} ${unique.icon}-cancel`,
|
|
1132
1129
|
viewBox: true,
|
|
@@ -1138,19 +1135,19 @@ const DateRangePickerV2 = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
1138
1135
|
css: controlContainerCSS,
|
|
1139
1136
|
className: unique.footer,
|
|
1140
1137
|
ref: footerRef
|
|
1141
|
-
}, jsx(Button,
|
|
1138
|
+
}, jsx(Button, { ...buttonProps,
|
|
1142
1139
|
className: unique.close,
|
|
1143
1140
|
onClick: () => onClickOutside({
|
|
1144
1141
|
target: null
|
|
1145
1142
|
})
|
|
1146
|
-
}
|
|
1143
|
+
}, closeText), jsx(Button, { ...buttonProps,
|
|
1147
1144
|
className: unique.cancel,
|
|
1148
1145
|
onClick: onCancel
|
|
1149
|
-
}
|
|
1146
|
+
}, cancelText), jsx(Button, { ...buttonProps,
|
|
1150
1147
|
color: 'info',
|
|
1151
1148
|
className: unique.confirm,
|
|
1152
1149
|
onClick: onConfirm
|
|
1153
|
-
}
|
|
1150
|
+
}, confirmText));
|
|
1154
1151
|
const leftCalendarComp = jsx("div", {
|
|
1155
1152
|
css: generateCalendarCSS(unique, false, false)
|
|
1156
1153
|
}, renderNavigator(unique, navigatorFromRefs, e => setPrevTime(e, 'year', valueFr.current, 'from'), e => setPrevTime(e, 'month', valueFr.current, 'from'), e => setNextTime(e, 'month', valueFr.current, 'from'), e => setNextTime(e, 'year', valueFr.current, 'from')), jsx("div", {
|
|
@@ -1179,18 +1176,19 @@ const DateRangePickerV2 = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
1179
1176
|
ref: pickerRef
|
|
1180
1177
|
}, jsx("div", {
|
|
1181
1178
|
className: unique.wrapper
|
|
1182
|
-
}, leftCalendarComp, jsx(Divider, dividerProps
|
|
1183
|
-
|
|
1179
|
+
}, leftCalendarComp, jsx(Divider, { ...dividerProps
|
|
1180
|
+
}), rightCalendarComp), tooltipComp, !!controls && footerMemo);
|
|
1181
|
+
return jsx(ControlComp, { ...props,
|
|
1184
1182
|
disabled: disabled,
|
|
1185
1183
|
error: error,
|
|
1186
1184
|
ref: ref,
|
|
1187
1185
|
style: style
|
|
1188
|
-
}
|
|
1186
|
+
}, !!label && jsx(Label, { ...labelProps,
|
|
1189
1187
|
disabled: disabled,
|
|
1190
1188
|
required: required
|
|
1191
|
-
}
|
|
1192
|
-
placeholder: placeholder
|
|
1193
|
-
|
|
1189
|
+
}, label), jsx(InputBase, {
|
|
1190
|
+
placeholder: placeholder,
|
|
1191
|
+
...inputProps,
|
|
1194
1192
|
readOnly: true,
|
|
1195
1193
|
ref: ipConRef,
|
|
1196
1194
|
inputRef: ipRef,
|
|
@@ -1206,9 +1204,9 @@ const DateRangePickerV2 = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
1206
1204
|
className: 'non-effect allow-disabled'
|
|
1207
1205
|
},
|
|
1208
1206
|
endIcon: endIcon
|
|
1209
|
-
})
|
|
1207
|
+
}), !!error && jsx(HelperText, { ...errorProps,
|
|
1210
1208
|
disabled: disabled
|
|
1211
|
-
}
|
|
1209
|
+
}, error));
|
|
1212
1210
|
}));
|
|
1213
1211
|
DateRangePickerV2.defaultProps = {
|
|
1214
1212
|
actionIconAt: 'end',
|