@zohodesk/components 1.0.0-alpha-264 → 1.0.0-alpha-266
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/README.md +12 -0
- package/assets/Appearance/dark/mode/darkMode.module.css +181 -180
- package/assets/Appearance/dark/themes/blue/blueDarkCTAModifyCategory.module.css +452 -0
- package/assets/Appearance/dark/themes/blue/blueDarkCTATheme.module.css +31 -31
- package/assets/Appearance/dark/themes/green/greenDarkCTAModifyCategory.module.css +452 -0
- package/assets/Appearance/dark/themes/green/greenDarkCTATheme.module.css +30 -30
- package/assets/Appearance/dark/themes/orange/orangeDarkCTAModifyCategory.module.css +452 -0
- package/assets/Appearance/dark/themes/orange/orangeDarkCTATheme.module.css +30 -30
- package/assets/Appearance/dark/themes/red/redDarkCTAModifyCategory.module.css +452 -0
- package/assets/Appearance/dark/themes/red/redDarkCTATheme.module.css +30 -30
- package/assets/Appearance/dark/themes/yellow/yellowDarkCTAModifyCategory.module.css +452 -0
- package/assets/Appearance/dark/themes/yellow/yellowDarkCTATheme.module.css +30 -30
- package/assets/Appearance/default/mode/defaultMode.module.css +177 -176
- package/assets/Appearance/default/themes/blue/blueDefaultCTAModifyCategory.module.css +452 -0
- package/assets/Appearance/default/themes/blue/blueDefaultCTATheme.module.css +31 -31
- package/assets/Appearance/default/themes/green/greenDefaultCTAModifyCategory.module.css +452 -0
- package/assets/Appearance/default/themes/green/greenDefaultCTATheme.module.css +30 -30
- package/assets/Appearance/default/themes/orange/orangeDefaultCTAModifyCategory.module.css +452 -0
- package/assets/Appearance/default/themes/orange/orangeDefaultCTATheme.module.css +30 -30
- package/assets/Appearance/default/themes/red/redDefaultCTAModifyCategory.module.css +452 -0
- package/assets/Appearance/default/themes/red/redDefaultCTATheme.module.css +30 -30
- package/assets/Appearance/default/themes/yellow/yellowDefaultCTAModifyCategory.module.css +452 -0
- package/assets/Appearance/default/themes/yellow/yellowDefaultCTATheme.module.css +30 -30
- package/assets/Appearance/pureDark/mode/pureDarkMode.module.css +182 -181
- package/assets/Appearance/pureDark/themes/blue/bluePureDarkCTAModifyCategory.module.css +452 -0
- package/assets/Appearance/pureDark/themes/blue/bluePureDarkCTATheme.module.css +31 -31
- package/assets/Appearance/pureDark/themes/green/greenPureDarkCTAModifyCategory.module.css +452 -0
- package/assets/Appearance/pureDark/themes/green/greenPureDarkCTATheme.module.css +30 -30
- package/assets/Appearance/pureDark/themes/orange/orangePureDarkCTAModifyCategory.module.css +452 -0
- package/assets/Appearance/pureDark/themes/orange/orangePureDarkCTATheme.module.css +30 -30
- package/assets/Appearance/pureDark/themes/red/redPureDarkCTAModifyCategory.module.css +452 -0
- package/assets/Appearance/pureDark/themes/red/redPureDarkCTATheme.module.css +30 -30
- package/assets/Appearance/pureDark/themes/yellow/yellowPureDarkCTAModifyCategory.module.css +452 -0
- package/assets/Appearance/pureDark/themes/yellow/yellowPureDarkCTATheme.module.css +30 -30
- package/assets/Contrast/darkContrastLightness.module.css +39 -0
- package/assets/Contrast/defaultContrastLightness.module.css +39 -0
- package/assets/Contrast/pureDarkContrastLightness.module.css +39 -0
- package/es/AppContainer/AppContainer.js +1 -0
- package/es/Avatar/Avatar.module.css +48 -13
- package/es/Button/Button.js +44 -47
- package/es/Button/{Button.module.css → css/Button.module.css} +6 -6
- package/es/Button/css/cssJSLogic.js +53 -0
- package/es/Button/index.js +2 -0
- package/es/Button/props/propTypes.js +3 -1
- package/es/Buttongroup/Buttongroup.module.css +36 -18
- package/es/DateTime/DateTime.js +26 -65
- package/es/DateTime/DateTime.module.css +1 -1
- package/es/DateTime/dateFormatUtils/dateFormats.js +43 -0
- package/es/DateTime/dateFormatUtils/index.js +27 -0
- package/es/DateTime/props/propTypes.js +2 -1
- package/es/DropBox/DropBox.js +3 -5
- package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +6 -10
- package/es/DropBox/css/DropBox.module.css +1 -1
- package/es/MultiSelect/AdvancedMultiSelect.js +0 -2
- package/es/MultiSelect/MultiSelect.js +0 -3
- package/es/Popup/Popup.js +2 -3
- package/es/Ribbon/Ribbon.module.css +102 -24
- package/es/Switch/Switch.module.css +26 -9
- package/es/Tab/Tab.js +1 -1
- package/es/Tab/Tabs.js +10 -5
- package/es/Tab/Tabs.module.css +6 -2
- package/es/Tab/__tests__/Tab.spec.js +5 -11
- package/es/Tab/props/propTypes.js +1 -1
- package/es/Tooltip/Tooltip.module.css +28 -3
- package/es/common/a11y.module.css +3 -3
- package/es/common/boxShadow.module.css +34 -0
- package/es/utils/Common.js +4 -0
- package/es/utils/css/mergeStyle.js +23 -10
- package/lib/AppContainer/AppContainer.js +1 -0
- package/lib/Avatar/Avatar.module.css +48 -13
- package/lib/Button/Button.js +43 -72
- package/lib/Button/{Button.module.css → css/Button.module.css} +6 -6
- package/lib/Button/css/cssJSLogic.js +40 -0
- package/lib/Button/index.js +20 -0
- package/lib/Button/props/propTypes.js +5 -2
- package/lib/Buttongroup/Buttongroup.module.css +36 -18
- package/lib/DateTime/DateTime.js +25 -61
- package/lib/DateTime/DateTime.module.css +1 -1
- package/lib/DateTime/dateFormatUtils/dateFormats.js +51 -0
- package/lib/DateTime/dateFormatUtils/index.js +31 -3
- package/lib/DateTime/props/propTypes.js +8 -1
- package/lib/DropBox/DropBox.js +3 -5
- package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +6 -10
- package/lib/DropBox/css/DropBox.module.css +1 -1
- package/lib/MultiSelect/AdvancedMultiSelect.js +0 -1
- package/lib/MultiSelect/MultiSelect.js +0 -2
- package/lib/Popup/Popup.js +1 -2
- package/lib/Ribbon/Ribbon.module.css +102 -24
- package/lib/Switch/Switch.module.css +26 -9
- package/lib/Tab/Tabs.js +7 -2
- package/lib/Tab/Tabs.module.css +6 -2
- package/lib/Tab/__tests__/Tab.spec.js +17 -22
- package/lib/Tab/props/propTypes.js +1 -1
- package/lib/Tooltip/Tooltip.module.css +28 -3
- package/lib/common/a11y.module.css +3 -3
- package/lib/common/boxShadow.module.css +34 -0
- package/lib/utils/Common.js +7 -1
- package/lib/utils/css/mergeStyle.js +23 -10
- package/package.json +8 -8
- package/es/Button/__tests__/Button.spec.js +0 -190
- package/es/Button/__tests__/__snapshots__/Button.spec.js.snap +0 -191
- package/lib/Button/__tests__/Button.spec.js +0 -193
- package/lib/Button/__tests__/__snapshots__/Button.spec.js.snap +0 -191
package/es/DateTime/DateTime.js
CHANGED
|
@@ -15,9 +15,8 @@ import { formatDate, getMonthEnd } from '../utils/datetime/common';
|
|
|
15
15
|
import { getIsEmptyValue } from '../utils/Common';
|
|
16
16
|
import { monthNamesDefault, monthNamesShortDefault, dayNamesDefault, dayNamesShortDefault, ampmTextDefault } from './constants';
|
|
17
17
|
import ResponsiveDropBox from '../ResponsiveDropBox/ResponsiveDropBox';
|
|
18
|
-
import { ResponsiveReceiver } from '../Responsive/CustomResponsive';
|
|
19
18
|
import { Box } from '../Layout';
|
|
20
|
-
import {
|
|
19
|
+
import { getHourSuggestions, getMinuteSuggestions, addZeroIfNeeded } from './dateFormatUtils';
|
|
21
20
|
function title(date, year, month) {
|
|
22
21
|
let monthNames = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
|
|
23
22
|
const HeadingText = `${monthNames[month] || ''} ${year}`;
|
|
@@ -48,26 +47,6 @@ export default class DateTime extends React.PureComponent {
|
|
|
48
47
|
const {
|
|
49
48
|
ampmText = ampmTextDefault
|
|
50
49
|
} = props.i18nKeys;
|
|
51
|
-
const {
|
|
52
|
-
startPoint: hourStart,
|
|
53
|
-
endPoint: hourEnd
|
|
54
|
-
} = getHourDetails(props.is24Hour);
|
|
55
|
-
this.hourSuggestions = (() => {
|
|
56
|
-
const hourArr = [];
|
|
57
|
-
for (let hour = hourStart; hour <= hourEnd; hour++) {
|
|
58
|
-
const htxt = hour < 10 ? `0${hour}` : `${hour}`;
|
|
59
|
-
hourArr.push(htxt);
|
|
60
|
-
}
|
|
61
|
-
return hourArr;
|
|
62
|
-
})();
|
|
63
|
-
this.minSuggestions = (() => {
|
|
64
|
-
const minArr = [];
|
|
65
|
-
for (let minute = 0; minute <= 59; minute++) {
|
|
66
|
-
const mtxt = minute < 10 ? `0${minute}` : `${minute}`;
|
|
67
|
-
minArr.push(mtxt);
|
|
68
|
-
}
|
|
69
|
-
return minArr;
|
|
70
|
-
})();
|
|
71
50
|
this.ampmSuggestions = (() => {
|
|
72
51
|
const ampmSuggestions = [];
|
|
73
52
|
ampmText.forEach((text, index) => {
|
|
@@ -140,7 +119,7 @@ export default class DateTime extends React.PureComponent {
|
|
|
140
119
|
year = dateObj.getFullYear();
|
|
141
120
|
hours = defaultHour ? defaultHour : dateObj.getHours();
|
|
142
121
|
mins = !getIsEmptyValue(defaultMin) ? defaultMin : dateObj.getMinutes();
|
|
143
|
-
mins = mins
|
|
122
|
+
mins = addZeroIfNeeded(mins);
|
|
144
123
|
amPm = defaultAmPm ? defaultAmPm : hours < 12 ? 'AM' : 'PM';
|
|
145
124
|
hours = this.getHours(hours, is24Hour);
|
|
146
125
|
return {
|
|
@@ -164,7 +143,7 @@ export default class DateTime extends React.PureComponent {
|
|
|
164
143
|
hours -= 12;
|
|
165
144
|
}
|
|
166
145
|
}
|
|
167
|
-
hours = hours
|
|
146
|
+
hours = addZeroIfNeeded(hours);
|
|
168
147
|
return hours;
|
|
169
148
|
}
|
|
170
149
|
handleGetSelectedDate() {
|
|
@@ -563,16 +542,6 @@ export default class DateTime extends React.PureComponent {
|
|
|
563
542
|
isMonthOpen: false
|
|
564
543
|
});
|
|
565
544
|
}
|
|
566
|
-
responsiveFunc(_ref) {
|
|
567
|
-
let {
|
|
568
|
-
mediaQueryOR
|
|
569
|
-
} = _ref;
|
|
570
|
-
return {
|
|
571
|
-
tabletMode: mediaQueryOR([{
|
|
572
|
-
maxWidth: 700
|
|
573
|
-
}])
|
|
574
|
-
};
|
|
575
|
-
}
|
|
576
545
|
render() {
|
|
577
546
|
const {
|
|
578
547
|
date,
|
|
@@ -653,12 +622,12 @@ export default class DateTime extends React.PureComponent {
|
|
|
653
622
|
}), isDateTimeField ? /*#__PURE__*/React.createElement(Time, {
|
|
654
623
|
timeText: timeText,
|
|
655
624
|
dataId: dataId,
|
|
656
|
-
hourSuggestions:
|
|
625
|
+
hourSuggestions: getHourSuggestions(),
|
|
657
626
|
onHourSelect: this.hoursSelect,
|
|
658
627
|
hours: hours,
|
|
659
628
|
hourEmptyText: hourEmptyText,
|
|
660
629
|
needResponsive: needResponsive,
|
|
661
|
-
minSuggestions:
|
|
630
|
+
minSuggestions: getMinuteSuggestions(),
|
|
662
631
|
onMinutesSelect: this.minutesSelect,
|
|
663
632
|
mins: mins,
|
|
664
633
|
minuteEmptyText: minuteEmptyText,
|
|
@@ -686,35 +655,27 @@ export default class DateTime extends React.PureComponent {
|
|
|
686
655
|
return isDefaultPosition ? /*#__PURE__*/React.createElement("div", {
|
|
687
656
|
className: `${style.dropBox} ${className}`,
|
|
688
657
|
"data-id": `${dataId}_dateBoxContainer`
|
|
689
|
-
}, childEle) : isReady ? /*#__PURE__*/React.createElement(
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
},
|
|
711
|
-
isPadding: isPadding,
|
|
712
|
-
positionsOffset: positionsOffset,
|
|
713
|
-
targetOffset: targetOffset,
|
|
714
|
-
isRestrictScroll: isRestrictScroll,
|
|
715
|
-
portalId: dropBoxPortalId
|
|
716
|
-
}, /*#__PURE__*/React.createElement(Box, null, childEle));
|
|
717
|
-
}) : null;
|
|
658
|
+
}, childEle) : isReady ? /*#__PURE__*/React.createElement(ResponsiveDropBox, {
|
|
659
|
+
size: boxSize,
|
|
660
|
+
boxPosition: position,
|
|
661
|
+
isActive: isActive,
|
|
662
|
+
isArrow: false,
|
|
663
|
+
isAnimate: isAnimate,
|
|
664
|
+
animationStyle: "bounce",
|
|
665
|
+
getRef: getRef,
|
|
666
|
+
onClick: onClick,
|
|
667
|
+
dataId: `${dataId}_dateBoxContainer`,
|
|
668
|
+
needResponsive: needResponsive,
|
|
669
|
+
isAbsolutePositioningNeeded: isAbsolute,
|
|
670
|
+
customClass: {
|
|
671
|
+
customDropBoxWrap: className
|
|
672
|
+
},
|
|
673
|
+
isPadding: isPadding,
|
|
674
|
+
positionsOffset: positionsOffset,
|
|
675
|
+
targetOffset: targetOffset,
|
|
676
|
+
isRestrictScroll: isRestrictScroll,
|
|
677
|
+
portalId: dropBoxPortalId
|
|
678
|
+
}, /*#__PURE__*/React.createElement(Box, null, childEle)) : null;
|
|
718
679
|
}
|
|
719
680
|
}
|
|
720
681
|
DateTime.propTypes = DateTime_propTypes;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// Date Pattern Letters And its Meanings :-
|
|
2
|
+
// 1. d/D: day without 0 prefix on single digit.
|
|
3
|
+
// 2. dd/DD: day with 0 prefix if single digit.
|
|
4
|
+
// 3. M: Month without 0 prefix on single digit.
|
|
5
|
+
// 4. MM: Month with 0 prefix if single digit.
|
|
6
|
+
// 5. yy/YY: Last two digit of year.
|
|
7
|
+
// 6. yyyy/YYYY: represents full year.
|
|
8
|
+
// 7. HH: 24 hour based hour. ie. 13:00. **H** will display hour without prefix 0 if single digit
|
|
9
|
+
// 8. hh: 12 hour based hour. ie. 01:00. **h** will display hour without prefix 0 if single digit
|
|
10
|
+
// 9. m: minute without 0 prefix on single digit.
|
|
11
|
+
// 10.mm: minute with 0 prefix if single digit.
|
|
12
|
+
// 11.s: second without 0 prefix on single digit.
|
|
13
|
+
// 12.ss: second with 0 prefix if single digit.
|
|
14
|
+
// 13.S: milliseconds with 0 prefix if single digit.
|
|
15
|
+
// 14.a: represent the AM or PM
|
|
16
|
+
// 15.A: represent the AM or PM
|
|
17
|
+
// 16.Z: represent the timezone (Asia/Kolkata)
|
|
18
|
+
// 17. (O) : Offset Of the timezone (GMT+00:00)
|
|
19
|
+
|
|
20
|
+
export const dateSymbols = {
|
|
21
|
+
d: 'date',
|
|
22
|
+
dd: 'date',
|
|
23
|
+
DD: 'date',
|
|
24
|
+
M: 'month',
|
|
25
|
+
MM: 'month',
|
|
26
|
+
yy: 'year',
|
|
27
|
+
YY: 'year',
|
|
28
|
+
YYYY: 'year',
|
|
29
|
+
yyyy: 'year',
|
|
30
|
+
h: 'hour',
|
|
31
|
+
hh: 'hour',
|
|
32
|
+
H: 'hour',
|
|
33
|
+
HH: 'hour',
|
|
34
|
+
m: 'minute',
|
|
35
|
+
mm: 'minute',
|
|
36
|
+
s: 'second',
|
|
37
|
+
ss: 'second',
|
|
38
|
+
S: 'millisecond',
|
|
39
|
+
a: 'AMPM',
|
|
40
|
+
Z: 'timezone',
|
|
41
|
+
O: 'offset'
|
|
42
|
+
};
|
|
43
|
+
export const dataFormatList = ['yyyy/MM/dd', 'yyyy-MM-dd', 'yyyy.MM.dd', 'yyyy MM dd', 'MM/dd/yyyy', 'MM-dd-yyyy', 'MM.dd.yyyy', 'MM dd yyyy', 'dd/MM/yyyy', 'dd-MM-yyyy', 'dd.MM.yyyy', 'dd MM yyyy', 'yyyy/MMM/dd', 'yyyy-MMM-dd', 'yyyy.MMM.dd', 'yyyy MMM dd', 'MMM/dd/yyyy', 'MMM-dd-yyyy', 'MMM.dd.yyyy', 'MMM dd yyyy', 'dd/MMM/yyyy', 'dd-MMM-yyyy', 'dd.MMM.yyyy', 'dd MMM yyyy', 'dd/MMMM/yyyy', 'dd-MMMM-yyyy', 'dd-MMMM-yyyy', 'dd MMMM yyyy', 'MMMM/dd/yyyy', 'MMMM-dd-yyyy', 'MMMM.dd.yyyy', 'MMMM dd yyyy', 'yyyy/MMMM/dd', 'yyyy-MMMM-dd', 'yyyy.MMMM.dd', 'yyyy MMMM dd', 'dd/MM/YY', 'dd-MM-YY', 'dd.MM.YY', 'dd MM YY', 'MM/dd/YY', 'MM-dd-YY', 'MM.dd.YY', 'MM dd YY', 'YY/MM/dd', 'YY-MM-dd', 'YY.MM.dd', 'YY MM dd', 'dd/MMM/YY', 'dd-MMM-YY', 'dd.MMM.YY', 'dd MMM YY', 'MMM/dd/YY', 'MMM-dd-YY', 'MMM.dd.YY', 'MMM dd YY', 'YY/MMM/dd', 'YY-MMM-dd', 'YY.MMM.dd', 'YY MMM dd', 'dd/MMMM/YY', 'dd-MMMM-YY', 'dd.MMMM.YY', 'dd MMMM YY', 'MMMM/dd/YY', 'MMMM-dd-YY', 'MMMM.dd.YY', 'MMMM dd YY', 'YY/MMMM/dd', 'YY-MMMM-dd', 'YY.MMMM.dd', 'YY MMMM dd'];
|
|
@@ -109,12 +109,39 @@ export function getHourDetails(is24Hour) {
|
|
|
109
109
|
endPoint: is24Hour ? 23 : 12
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
|
+
export function getHourSuggestions(is24Hour) {
|
|
113
|
+
const {
|
|
114
|
+
startPoint,
|
|
115
|
+
endPoint
|
|
116
|
+
} = getHourDetails(is24Hour);
|
|
117
|
+
const hourArr = [];
|
|
118
|
+
for (let hour = startPoint; hour <= endPoint; hour++) {
|
|
119
|
+
const htxt = addZeroIfNeeded(hour);
|
|
120
|
+
hourArr.push(htxt);
|
|
121
|
+
}
|
|
122
|
+
return hourArr;
|
|
123
|
+
}
|
|
112
124
|
export function getMinuteDetails() {
|
|
113
125
|
return {
|
|
114
126
|
startPoint: 0,
|
|
115
127
|
endPoint: 59
|
|
116
128
|
};
|
|
117
129
|
}
|
|
130
|
+
export function getMinuteSuggestions() {
|
|
131
|
+
const {
|
|
132
|
+
startPoint,
|
|
133
|
+
endPoint
|
|
134
|
+
} = getMinuteDetails();
|
|
135
|
+
const minArr = [];
|
|
136
|
+
for (let minute = startPoint; minute <= endPoint; minute++) {
|
|
137
|
+
const mtxt = addZeroIfNeeded(minute);
|
|
138
|
+
minArr.push(mtxt);
|
|
139
|
+
}
|
|
140
|
+
return minArr;
|
|
141
|
+
}
|
|
142
|
+
export function addZeroIfNeeded(value) {
|
|
143
|
+
return value < 10 ? `0${value}` : value;
|
|
144
|
+
}
|
|
118
145
|
export function getIsNoonValueTyped(event) {
|
|
119
146
|
const {
|
|
120
147
|
keyCode
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
+
import { dataFormatList } from '../dateFormatUtils/dateFormats';
|
|
2
3
|
export const CalendarView_propTypes = {
|
|
3
4
|
dataId: PropTypes.string,
|
|
4
5
|
date: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
@@ -71,7 +72,7 @@ export const DateWidget_propTypes = {
|
|
|
71
72
|
className: PropTypes.string,
|
|
72
73
|
closePopupOnly: PropTypes.func,
|
|
73
74
|
dataId: PropTypes.string,
|
|
74
|
-
dateFormat: PropTypes.oneOf([
|
|
75
|
+
dateFormat: PropTypes.oneOf([...dataFormatList]),
|
|
75
76
|
defaultPosition: PropTypes.oneOf(['top', 'bottom', 'right', 'left']),
|
|
76
77
|
defaultTime: PropTypes.string,
|
|
77
78
|
getContainerRef: PropTypes.func,
|
package/es/DropBox/DropBox.js
CHANGED
|
@@ -8,13 +8,11 @@ import cssJSLogic from './css/cssJSLogic';
|
|
|
8
8
|
import DropBoxElement from './DropBoxElement/DropBoxElement';
|
|
9
9
|
import { DropBoxDefaultProps } from './props/defaultProps';
|
|
10
10
|
import { DropBoxPropTypes } from './props/propTypes';
|
|
11
|
+
import { cancelBubblingEffect } from './../utils/Common';
|
|
11
12
|
import style from './css/DropBox.module.css';
|
|
12
13
|
export default function DropBox(props) {
|
|
13
14
|
const focusRef = useRef(null);
|
|
14
15
|
const DropBoxContext = useContext(LibraryContext);
|
|
15
|
-
const onFreezeClick = e => {
|
|
16
|
-
e && e.stopPropagation();
|
|
17
|
-
};
|
|
18
16
|
const {
|
|
19
17
|
needResponsive,
|
|
20
18
|
portalId,
|
|
@@ -64,13 +62,13 @@ export default function DropBox(props) {
|
|
|
64
62
|
}, /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
65
63
|
className: `${style.freezeLayer} ${style.freeze}`,
|
|
66
64
|
style: zIndexStyle,
|
|
67
|
-
onClick:
|
|
65
|
+
onClick: cancelBubblingEffect
|
|
68
66
|
}), dropBoxEle)) : !isAbsolutePositioningNeeded && isActive ? /*#__PURE__*/React.createElement(Modal, {
|
|
69
67
|
portalId: portalId
|
|
70
68
|
}, /*#__PURE__*/React.createElement(Fragment, null, isRestrictScroll ? /*#__PURE__*/React.createElement("div", {
|
|
71
69
|
className: style.freezeLayer,
|
|
72
70
|
style: zIndexStyle,
|
|
73
|
-
onClick:
|
|
71
|
+
onClick: cancelBubblingEffect
|
|
74
72
|
}) : null, dropBoxEle)) : dropBoxEle;
|
|
75
73
|
}
|
|
76
74
|
DropBox.propTypes = DropBoxPropTypes;
|
|
@@ -74,27 +74,23 @@
|
|
|
74
74
|
|
|
75
75
|
/* shadow */
|
|
76
76
|
.top_shadow {
|
|
77
|
-
--dropbox_box_shadow:
|
|
77
|
+
--dropbox_box_shadow: var(--zd_bs_dropbox_top);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
.left_shadow {
|
|
81
|
-
--dropbox_box_shadow:
|
|
81
|
+
--dropbox_box_shadow: var(--zd_bs_dropbox_left);
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
.right_shadow {
|
|
85
|
-
--dropbox_box_shadow:
|
|
85
|
+
--dropbox_box_shadow: var(--zd_bs_dropbox_right);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
.bottom_shadow {
|
|
89
|
-
--dropbox_box_shadow:
|
|
89
|
+
--dropbox_box_shadow: var(--zd_bs_dropbox_bottom);
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
|
|
93
|
-
box-shadow:
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
[dir=rtl] .defaultShadow {
|
|
97
|
-
box-shadow: -4px 3px 30px var(--zdt_dropbox_default_box_shadow);
|
|
92
|
+
.defaultShadow {
|
|
93
|
+
box-shadow: var(--zd_bs_dropbox_default);
|
|
98
94
|
}
|
|
99
95
|
|
|
100
96
|
/* box direction styles */
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
--dropbox_bg_color: var(--zdt_dropbox_default_bg);
|
|
4
4
|
--dropbox_border_radius: 0;
|
|
5
5
|
--dropbox_padding: 0;
|
|
6
|
-
--dropbox_box_shadow:
|
|
6
|
+
--dropbox_box_shadow: var(--zd_bs_dropbox_bottom);
|
|
7
7
|
|
|
8
8
|
/* dropbox arrow default variables */
|
|
9
9
|
--dropbox_arrow_box_shadow_color: var(--zdt_dropbox_arrow_shadow);
|
|
@@ -125,9 +125,7 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
125
125
|
} else {
|
|
126
126
|
this.handleChange([...selectedOptions, option], e);
|
|
127
127
|
}
|
|
128
|
-
// e && e.stopPropagation && this.handlePopupClose(e);
|
|
129
128
|
}
|
|
130
|
-
|
|
131
129
|
handleFormatOptions(props) {
|
|
132
130
|
const {
|
|
133
131
|
options,
|
|
@@ -469,10 +469,7 @@ export class MultiSelectComponent extends React.Component {
|
|
|
469
469
|
} else {
|
|
470
470
|
this.handleChange([...selectedOptions, option], e);
|
|
471
471
|
}
|
|
472
|
-
|
|
473
|
-
// e && e.stopPropagation && this.handlePopupClose(e);
|
|
474
472
|
}
|
|
475
|
-
|
|
476
473
|
handleRemoveOption(options) {
|
|
477
474
|
const newOptions = !getIsEmptyValue(options) && !Array.isArray(options) ? [options] : options;
|
|
478
475
|
const {
|
package/es/Popup/Popup.js
CHANGED
|
@@ -5,7 +5,7 @@ import PropTypes from 'prop-types';
|
|
|
5
5
|
import hoistStatics from 'hoist-non-react-statics';
|
|
6
6
|
|
|
7
7
|
/**** Methods ****/
|
|
8
|
-
import { debounce, isDescendant, isTextSelected } from '../utils/Common.js';
|
|
8
|
+
import { debounce, isDescendant, isTextSelected, cancelBubblingEffect } from '../utils/Common.js';
|
|
9
9
|
import viewPort from './viewPort';
|
|
10
10
|
import { absolutePositionMapping, rtlAbsolutePositionMapping, rtlFixedPositionMapping } from './PositionMapping.json';
|
|
11
11
|
import ResizeObserver from '@zohodesk/virtualizer/lib/commons/ResizeObserver.js';
|
|
@@ -376,8 +376,7 @@ const Popup = function (Component) {
|
|
|
376
376
|
}
|
|
377
377
|
removeClose(e) {
|
|
378
378
|
// e && e.preventDefault && e.preventDefault();
|
|
379
|
-
e
|
|
380
|
-
e && e.nativeEvent && e.nativeEvent.stopImmediatePropagation && e.nativeEvent.stopImmediatePropagation();
|
|
379
|
+
cancelBubblingEffect(e);
|
|
381
380
|
}
|
|
382
381
|
handlePopupPosition() {
|
|
383
382
|
let defaultPosition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'bottomCenter';
|