@zohodesk/components 1.0.0-alpha-217 → 1.0.0-alpha-221
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 +36 -20
- package/es/AppContainer/AppContainer.js +46 -5
- package/es/Appearance/dark/themes/blue/blueDarkCTATheme.module.css +1 -1
- package/es/Appearance/dark/themes/blue/blueDarkComponentTheme.module.css +1 -1
- package/es/Appearance/default/mode/defaultMode.module.css +1 -1
- package/es/Appearance/default/themes/blue/blueDefaultCTATheme.module.css +1 -1
- package/es/Appearance/default/themes/blue/blueDefaultComponentTheme.module.css +1 -1
- package/es/Provider/Config.js +2 -1
- package/es/Responsive/ResizeComponent.js +1 -1
- package/es/Select/Select.js +1 -1
- package/es/common/animation.module.css +12 -0
- package/es/utils/ContextOptimizer.js +1 -1
- package/es/utils/shallowEqual.js +32 -0
- package/lib/AppContainer/AppContainer.js +55 -6
- package/lib/Appearance/dark/themes/blue/blueDarkCTATheme.module.css +1 -1
- package/lib/Appearance/dark/themes/blue/blueDarkComponentTheme.module.css +1 -1
- package/lib/Appearance/default/mode/defaultMode.module.css +1 -1
- package/lib/Appearance/default/themes/blue/blueDefaultCTATheme.module.css +1 -1
- package/lib/Appearance/default/themes/blue/blueDefaultComponentTheme.module.css +1 -1
- package/lib/Provider/Config.js +2 -1
- package/lib/Responsive/ResizeComponent.js +1 -1
- package/lib/Select/Select.js +2 -1
- package/lib/common/animation.module.css +12 -0
- package/lib/utils/ContextOptimizer.js +2 -2
- package/lib/utils/shallowEqual.js +41 -0
- package/package.json +1 -1
- package/es/deprecated/Theme/darkTheme.module.css +0 -393
- package/es/deprecated/Theme/defaultTheme.module.css +0 -393
- package/es/deprecated/Theme/palette/darkCTAPalette.module.css +0 -116
- package/es/deprecated/Theme/palette/darkPalette.module.css +0 -155
- package/es/deprecated/Theme/palette/defaultCTAPalette.module.css +0 -116
- package/es/deprecated/Theme/palette/defaultPalette.module.css +0 -155
- package/es/deprecated/customscroll_Old.module.css +0 -46
- package/lib/deprecated/Theme/darkTheme.module.css +0 -393
- package/lib/deprecated/Theme/defaultTheme.module.css +0 -393
- package/lib/deprecated/Theme/palette/darkCTAPalette.module.css +0 -116
- package/lib/deprecated/Theme/palette/darkPalette.module.css +0 -155
- package/lib/deprecated/Theme/palette/defaultCTAPalette.module.css +0 -116
- package/lib/deprecated/Theme/palette/defaultPalette.module.css +0 -155
- package/lib/deprecated/customscroll_Old.module.css +0 -46
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# DOT Style Guide
|
|
2
2
|
|
|
3
|
-
In this Package we Provide Some Basic Components to Build Web App
|
|
3
|
+
In this Package, we Provide Some Basic Components to Build Web App
|
|
4
4
|
|
|
5
5
|
- Avatar
|
|
6
6
|
- AvatarTeam
|
|
@@ -32,6 +32,22 @@ In this Package we Provide Some Basic Components to Build Web App
|
|
|
32
32
|
- TextBoxIcon
|
|
33
33
|
- Tooltip
|
|
34
34
|
|
|
35
|
+
# 1.0.0-alpha-221
|
|
36
|
+
|
|
37
|
+
- blueDefaultTheme & blueDarkTheme class name added in Blue CTATheme & ComponentTheme files
|
|
38
|
+
|
|
39
|
+
# 1.0.0-alpha-220
|
|
40
|
+
|
|
41
|
+
- Tooltip Delay Controlled to Improve Perf
|
|
42
|
+
|
|
43
|
+
# 1.0.0-alpha-219
|
|
44
|
+
|
|
45
|
+
- ContextOptimizer => ShallowEqal function issue solved
|
|
46
|
+
|
|
47
|
+
# 1.0.0-alpha-218
|
|
48
|
+
|
|
49
|
+
- Select => Custom props undefined issue solved
|
|
50
|
+
|
|
35
51
|
# 1.0.0-alpha-217
|
|
36
52
|
|
|
37
53
|
- TextBox, Multiselect, Tag missing dark palette variables moved under Themes folder file
|
|
@@ -61,7 +77,7 @@ In this Package we Provide Some Basic Components to Build Web App
|
|
|
61
77
|
|
|
62
78
|
# 1.0.0-alpha-211
|
|
63
79
|
|
|
64
|
-
- Lato font reference changed from local to Zoho URL(
|
|
80
|
+
- Lato font reference changed from local to Zoho URL(web fonts)
|
|
65
81
|
|
|
66
82
|
# 1.0.0-alpha-210
|
|
67
83
|
|
|
@@ -105,7 +121,7 @@ In this Package we Provide Some Basic Components to Build Web App
|
|
|
105
121
|
|
|
106
122
|
# 1.0.0-alpha-202
|
|
107
123
|
|
|
108
|
-
- MultiSelect -
|
|
124
|
+
- MultiSelect - scroll top issue fix
|
|
109
125
|
|
|
110
126
|
# 1.0.0-alpha-201
|
|
111
127
|
|
|
@@ -166,7 +182,7 @@ In this Package we Provide Some Basic Components to Build Web App
|
|
|
166
182
|
|
|
167
183
|
# 1.0.0-alpha-188
|
|
168
184
|
|
|
169
|
-
- Popup => popup
|
|
185
|
+
- Popup => popup within popup open body click issue fixed
|
|
170
186
|
|
|
171
187
|
# 1.0.0-alpha-187
|
|
172
188
|
|
|
@@ -182,7 +198,7 @@ In this Package we Provide Some Basic Components to Build Web App
|
|
|
182
198
|
|
|
183
199
|
# 1.0.0-alpha-184
|
|
184
200
|
|
|
185
|
-
- Palette
|
|
201
|
+
- Palette-Based Folder Structure Changed.
|
|
186
202
|
- data-theme changed to data-mode
|
|
187
203
|
- data-palette changed to data-theme
|
|
188
204
|
|
|
@@ -236,7 +252,7 @@ In this Package we Provide Some Basic Components to Build Web App
|
|
|
236
252
|
|
|
237
253
|
# 1.0.0-alpha-173
|
|
238
254
|
|
|
239
|
-
- code
|
|
255
|
+
- code-based issue fixed ( const to let)
|
|
240
256
|
|
|
241
257
|
# 1.0.0-alpha-172
|
|
242
258
|
|
|
@@ -388,7 +404,7 @@ In this Package we Provide Some Basic Components to Build Web App
|
|
|
388
404
|
# 1.0.0-alpha-144
|
|
389
405
|
|
|
390
406
|
- PortalLayer Moved to deprecated folder
|
|
391
|
-
- A11y Id Added For Select,MultiSelect Based Components
|
|
407
|
+
- A11y Id Added For Select, MultiSelect Based Components
|
|
392
408
|
- Semantic Button Default Font and Padding Resetted.
|
|
393
409
|
- LisItem - dataId setted default
|
|
394
410
|
|
|
@@ -451,7 +467,7 @@ In this Package we Provide Some Basic Components to Build Web App
|
|
|
451
467
|
# 1.0.0-alpha-137
|
|
452
468
|
|
|
453
469
|
- ally Fixes
|
|
454
|
-
- htmlId prop added in select component
|
|
470
|
+
- htmlId prop added in the select component
|
|
455
471
|
- AdvancedGroupMultiSelect => scroll fetch issue fix
|
|
456
472
|
|
|
457
473
|
# 1.0.0-alpha-136
|
|
@@ -469,7 +485,7 @@ In this Package we Provide Some Basic Components to Build Web App
|
|
|
469
485
|
|
|
470
486
|
# 1.0.0-alpha-134
|
|
471
487
|
|
|
472
|
-
- Reset Code
|
|
488
|
+
- Reset Code Splitting
|
|
473
489
|
|
|
474
490
|
# 1.0.0-alpha-133
|
|
475
491
|
|
|
@@ -504,7 +520,7 @@ In this Package we Provide Some Basic Components to Build Web App
|
|
|
504
520
|
|
|
505
521
|
# 1.0.0-alpha-126
|
|
506
522
|
|
|
507
|
-
- AllY implementation for button, textbox
|
|
523
|
+
- AllY implementation for the button, textbox
|
|
508
524
|
- Semantic button added
|
|
509
525
|
|
|
510
526
|
# 1.0.0-alpha-125
|
|
@@ -671,7 +687,7 @@ In this Package we Provide Some Basic Components to Build Web App
|
|
|
671
687
|
|
|
672
688
|
# 1.0.0-alpha-94
|
|
673
689
|
|
|
674
|
-
- Tab
|
|
690
|
+
- Tab Mapping Fix
|
|
675
691
|
|
|
676
692
|
# 1.0.0-alpha-93
|
|
677
693
|
|
|
@@ -680,7 +696,7 @@ In this Package we Provide Some Basic Components to Build Web App
|
|
|
680
696
|
# 1.0.0-alpha-92
|
|
681
697
|
|
|
682
698
|
- Tab Custom Element Fix
|
|
683
|
-
- Avatar xlarge
|
|
699
|
+
- Avatar xlarge size changes
|
|
684
700
|
|
|
685
701
|
# 1.0.0-alpha-91
|
|
686
702
|
|
|
@@ -706,7 +722,7 @@ In this Package we Provide Some Basic Components to Build Web App
|
|
|
706
722
|
# 1.0.0-alpha-87
|
|
707
723
|
|
|
708
724
|
- Date Component TimeZone Fix
|
|
709
|
-
- Unwanted
|
|
725
|
+
- Unwanted Functions Removed from utils/Common
|
|
710
726
|
|
|
711
727
|
# 1.0.0-alpha-86
|
|
712
728
|
|
|
@@ -736,7 +752,7 @@ In this Package we Provide Some Basic Components to Build Web App
|
|
|
736
752
|
|
|
737
753
|
# 1.0.0-alpha-81
|
|
738
754
|
|
|
739
|
-
- variant - secondary type removed in Label component
|
|
755
|
+
- variant - secondary type removed in a Label component
|
|
740
756
|
- customClass Added For Label component
|
|
741
757
|
- Radio, CheckBox SVG Updated, and Palette Danger Added, isFilled Added For Transparent BG
|
|
742
758
|
- MultiSelect Avatar DataId Changes
|
|
@@ -747,7 +763,7 @@ In this Package we Provide Some Basic Components to Build Web App
|
|
|
747
763
|
|
|
748
764
|
# 1.0.0-alpha-79
|
|
749
765
|
|
|
750
|
-
- Tag danger,default color changed to dot_bg_hawkesBlue
|
|
766
|
+
- Tag danger, default color changed to dot_bg_hawkesBlue
|
|
751
767
|
- MultiSelectWithAvatar size prop passed for tags Parent
|
|
752
768
|
|
|
753
769
|
# 1.0.0-alpha-78
|
|
@@ -812,7 +828,7 @@ In this Package we Provide Some Basic Components to Build Web App
|
|
|
812
828
|
# 1.0.0-alpha-67
|
|
813
829
|
|
|
814
830
|
- Adding TourId and isAbsolutePositioningNeeded key in DropBox
|
|
815
|
-
- Adding TourId in Box, Container and Tab components
|
|
831
|
+
- Adding TourId in Box, Container, and Tab components
|
|
816
832
|
|
|
817
833
|
# 1.0.0-alpha-66
|
|
818
834
|
|
|
@@ -828,7 +844,7 @@ In this Package we Provide Some Basic Components to Build Web App
|
|
|
828
844
|
|
|
829
845
|
- isDisabled Option added for List Item Based Atoms
|
|
830
846
|
- needBorder and disableAction Option added for MultiSelect
|
|
831
|
-
- Select BoxSize Added for
|
|
847
|
+
- Select BoxSize Added for DropBox
|
|
832
848
|
|
|
833
849
|
# 1.0.0-alpha-62
|
|
834
850
|
|
|
@@ -856,7 +872,7 @@ In this Package we Provide Some Basic Components to Build Web App
|
|
|
856
872
|
# 1.0.0-alpha-57
|
|
857
873
|
|
|
858
874
|
- Base Font Version 3 Updated
|
|
859
|
-
- Advanced Group Multi
|
|
875
|
+
- Advanced Group Multi-Select Added
|
|
860
876
|
|
|
861
877
|
# 1.0.0-alpha-56
|
|
862
878
|
|
|
@@ -875,14 +891,14 @@ In this Package we Provide Some Basic Components to Build Web App
|
|
|
875
891
|
|
|
876
892
|
# 1.0.0-alpha-53
|
|
877
893
|
|
|
878
|
-
- CustomScroll
|
|
894
|
+
- CustomScroll Make Optional
|
|
879
895
|
- Reset Code Implemented in Portal
|
|
880
896
|
- Icon Line-Height Remove
|
|
881
897
|
- New Reports Icons Added
|
|
882
898
|
|
|
883
899
|
# 1.0.0-alpha-52
|
|
884
900
|
|
|
885
|
-
- Advance Multi
|
|
901
|
+
- Advance Multi-Select Added
|
|
886
902
|
|
|
887
903
|
# 1.0.0-alpha-51
|
|
888
904
|
|
|
@@ -13,30 +13,71 @@ import '@zohodesk/variables/lib/fontFamilyVariables.module.css';
|
|
|
13
13
|
import '@zohodesk/variables/lib/transitionVariables.module.css';
|
|
14
14
|
import '@zohodesk/variables/lib/no_transitionVariables.module.css';
|
|
15
15
|
import style from './AppContainer.module.css';
|
|
16
|
+
import { getLibraryConfig } from '../Provider/Config';
|
|
16
17
|
export default class AppContainer extends React.Component {
|
|
17
18
|
constructor(props) {
|
|
18
19
|
super(props);
|
|
19
20
|
this.setTooltipRef = this.setTooltipRef.bind(this);
|
|
20
21
|
this.handleOver = this.handleOver.bind(this);
|
|
22
|
+
this.mouseOverDispatch = this.mouseOverDispatch.bind(this);
|
|
23
|
+
this.removeTimeout = this.removeTimeout.bind(this);
|
|
24
|
+
this.getContainerRef = this.getContainerRef.bind(this);
|
|
25
|
+
this.timer = null;
|
|
26
|
+
this.tooltipDebounce = getLibraryConfig('tooltipDebounce');
|
|
21
27
|
}
|
|
22
28
|
|
|
23
|
-
|
|
29
|
+
mouseOverDispatch(e) {
|
|
24
30
|
if (this.tooltipRef) {
|
|
25
31
|
this.tooltipRef.handleOver(e);
|
|
26
32
|
}
|
|
27
33
|
}
|
|
28
34
|
|
|
35
|
+
removeTimeout() {
|
|
36
|
+
if (this.timer) {
|
|
37
|
+
this.timer = clearTimeout(this.timer);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
handleOver(e) {
|
|
42
|
+
if (this.timer) {
|
|
43
|
+
this.timer = clearTimeout(this.timer);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
this.timer = setTimeout(() => this.mouseOverDispatch(e), this.tooltipDebounce);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
getContainerRef(ref) {
|
|
50
|
+
let {
|
|
51
|
+
eleRef
|
|
52
|
+
} = this.props;
|
|
53
|
+
this.containerElement = ref;
|
|
54
|
+
eleRef && eleRef(ref);
|
|
55
|
+
}
|
|
56
|
+
|
|
29
57
|
setTooltipRef(ref) {
|
|
30
58
|
this.tooltipRef = ref;
|
|
31
59
|
}
|
|
32
60
|
|
|
61
|
+
componentDidMount() {
|
|
62
|
+
if (this.containerElement) {
|
|
63
|
+
this.containerElement.addEventListener('mouseover', this.handleOver, false);
|
|
64
|
+
this.containerElement.addEventListener('mouseout', this.removeTimeout, false);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
componentWillUnmount() {
|
|
69
|
+
if (this.containerElement) {
|
|
70
|
+
this.containerElement.removeEventListener('mouseover', this.handleOver, false);
|
|
71
|
+
this.containerElement.addEventListener('mouseout', this.removeTimeout, false);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
33
75
|
render() {
|
|
34
76
|
let {
|
|
35
77
|
className,
|
|
36
78
|
children,
|
|
37
79
|
tagName,
|
|
38
80
|
dataId,
|
|
39
|
-
eleRef,
|
|
40
81
|
tooltipClass,
|
|
41
82
|
tooltipParentClass,
|
|
42
83
|
customProps
|
|
@@ -47,11 +88,11 @@ export default class AppContainer extends React.Component {
|
|
|
47
88
|
ExtraProps = {}
|
|
48
89
|
} = customProps;
|
|
49
90
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Container, _extends({
|
|
50
|
-
className: `${style.container} ${className}
|
|
51
|
-
|
|
91
|
+
className: `${style.container} ${className}` //onMouseOver={this.handleOver}
|
|
92
|
+
,
|
|
52
93
|
dataId: dataId,
|
|
53
94
|
tagName: tagName,
|
|
54
|
-
eleRef:
|
|
95
|
+
eleRef: this.getContainerRef
|
|
55
96
|
}, ContainerProps, ExtraProps), /*#__PURE__*/React.createElement(Box, {
|
|
56
97
|
flexible: true
|
|
57
98
|
}, children)), /*#__PURE__*/React.createElement("div", _extends({}, ExtraProps, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[data-mode='default'][data-theme='blue'] {
|
|
1
|
+
[data-mode='default'][data-theme='blue'], :global(.blueDefaultTheme) [data-desk-theme="blue"] {
|
|
2
2
|
--zdt_cta_primary_text: var(--dot_text_primary);
|
|
3
3
|
--zdt_cta_primary_hover_text: var(--dot_text_cobalt);
|
|
4
4
|
--zdt_cta_primary_bg: var(--dot_bg_primary);
|
package/es/Provider/Config.js
CHANGED
|
@@ -42,7 +42,7 @@ export default class ResizeComponent extends React.Component {
|
|
|
42
42
|
let newAdded = false;
|
|
43
43
|
mutation.addedNodes.forEach(mut => {
|
|
44
44
|
// Here we can listen for icon nodes. Confirm with bk
|
|
45
|
-
if (mut.attributes['data-responsive'] && (childrenList.length !== this.querySelector().length || this.childrenCurrentList.length !== this.querySelector().length)) {
|
|
45
|
+
if (mut.attributes && mut.attributes['data-responsive'] && (childrenList.length !== this.querySelector().length || this.childrenCurrentList.length !== this.querySelector().length)) {
|
|
46
46
|
newAdded = true;
|
|
47
47
|
}
|
|
48
48
|
});
|
package/es/Select/Select.js
CHANGED
|
@@ -21,6 +21,18 @@
|
|
|
21
21
|
-webkit-animation-iteration-count: infinite;
|
|
22
22
|
-ms-animation-iteration-count: infinite;
|
|
23
23
|
}
|
|
24
|
+
[dir=ltr] .both {
|
|
25
|
+
animation-fill-mode: both;
|
|
26
|
+
-webkit-animation-fill-mode: both;
|
|
27
|
+
-ms-animation-fill-mode: both;
|
|
28
|
+
-moz-animation-fill-mode: both;
|
|
29
|
+
}
|
|
30
|
+
[dir=rtl] .both {
|
|
31
|
+
animation-fill-mode: both;
|
|
32
|
+
-webkit-animation-fill-mode: both;
|
|
33
|
+
-ms-animation-fill-mode: both;
|
|
34
|
+
-moz-animation-fill-mode: both;
|
|
35
|
+
}
|
|
24
36
|
.fadeIn {
|
|
25
37
|
opacity: 0;
|
|
26
38
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** ** Libraries *** */
|
|
2
2
|
import { useContext, useRef } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import
|
|
4
|
+
import shallowEqual from './shallowEqual'; // Please use this component with children as inline function for force this components rerender when parent rerender regardless of reason
|
|
5
5
|
// Because below componends only rerender when children or calculation are changed, unless no changes will update below
|
|
6
6
|
// this component logic based on return same children reference to stop rerender.
|
|
7
7
|
// Think before change logic
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
function is(x, y) {
|
|
2
|
+
if (x === y) {
|
|
3
|
+
return x !== 0 || y !== 0 || 1 / x === 1 / y;
|
|
4
|
+
} else {
|
|
5
|
+
return x !== x && y !== y;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default function shallowEqual(objA, objB) {
|
|
10
|
+
if (is(objA, objB)) {
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const keysA = Object.keys(objA);
|
|
19
|
+
const keysB = Object.keys(objB);
|
|
20
|
+
|
|
21
|
+
if (keysA.length !== keysB.length) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
for (let i = 0; i < keysA.length; i++) {
|
|
26
|
+
if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
@@ -33,6 +33,8 @@ require("@zohodesk/variables/lib/no_transitionVariables.module.css");
|
|
|
33
33
|
|
|
34
34
|
var _AppContainerModule = _interopRequireDefault(require("./AppContainer.module.css"));
|
|
35
35
|
|
|
36
|
+
var _Config = require("../Provider/Config");
|
|
37
|
+
|
|
36
38
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
37
39
|
|
|
38
40
|
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); }
|
|
@@ -70,21 +72,69 @@ var AppContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
70
72
|
_this = _super.call(this, props);
|
|
71
73
|
_this.setTooltipRef = _this.setTooltipRef.bind(_assertThisInitialized(_this));
|
|
72
74
|
_this.handleOver = _this.handleOver.bind(_assertThisInitialized(_this));
|
|
75
|
+
_this.mouseOverDispatch = _this.mouseOverDispatch.bind(_assertThisInitialized(_this));
|
|
76
|
+
_this.removeTimeout = _this.removeTimeout.bind(_assertThisInitialized(_this));
|
|
77
|
+
_this.getContainerRef = _this.getContainerRef.bind(_assertThisInitialized(_this));
|
|
78
|
+
_this.timer = null;
|
|
79
|
+
_this.tooltipDebounce = (0, _Config.getLibraryConfig)('tooltipDebounce');
|
|
73
80
|
return _this;
|
|
74
81
|
}
|
|
75
82
|
|
|
76
83
|
_createClass(AppContainer, [{
|
|
77
|
-
key: "
|
|
78
|
-
value: function
|
|
84
|
+
key: "mouseOverDispatch",
|
|
85
|
+
value: function mouseOverDispatch(e) {
|
|
79
86
|
if (this.tooltipRef) {
|
|
80
87
|
this.tooltipRef.handleOver(e);
|
|
81
88
|
}
|
|
82
89
|
}
|
|
90
|
+
}, {
|
|
91
|
+
key: "removeTimeout",
|
|
92
|
+
value: function removeTimeout() {
|
|
93
|
+
if (this.timer) {
|
|
94
|
+
this.timer = clearTimeout(this.timer);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}, {
|
|
98
|
+
key: "handleOver",
|
|
99
|
+
value: function handleOver(e) {
|
|
100
|
+
var _this2 = this;
|
|
101
|
+
|
|
102
|
+
if (this.timer) {
|
|
103
|
+
this.timer = clearTimeout(this.timer);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
this.timer = setTimeout(function () {
|
|
107
|
+
return _this2.mouseOverDispatch(e);
|
|
108
|
+
}, this.tooltipDebounce);
|
|
109
|
+
}
|
|
110
|
+
}, {
|
|
111
|
+
key: "getContainerRef",
|
|
112
|
+
value: function getContainerRef(ref) {
|
|
113
|
+
var eleRef = this.props.eleRef;
|
|
114
|
+
this.containerElement = ref;
|
|
115
|
+
eleRef && eleRef(ref);
|
|
116
|
+
}
|
|
83
117
|
}, {
|
|
84
118
|
key: "setTooltipRef",
|
|
85
119
|
value: function setTooltipRef(ref) {
|
|
86
120
|
this.tooltipRef = ref;
|
|
87
121
|
}
|
|
122
|
+
}, {
|
|
123
|
+
key: "componentDidMount",
|
|
124
|
+
value: function componentDidMount() {
|
|
125
|
+
if (this.containerElement) {
|
|
126
|
+
this.containerElement.addEventListener('mouseover', this.handleOver, false);
|
|
127
|
+
this.containerElement.addEventListener('mouseout', this.removeTimeout, false);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}, {
|
|
131
|
+
key: "componentWillUnmount",
|
|
132
|
+
value: function componentWillUnmount() {
|
|
133
|
+
if (this.containerElement) {
|
|
134
|
+
this.containerElement.removeEventListener('mouseover', this.handleOver, false);
|
|
135
|
+
this.containerElement.addEventListener('mouseout', this.removeTimeout, false);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
88
138
|
}, {
|
|
89
139
|
key: "render",
|
|
90
140
|
value: function render() {
|
|
@@ -93,7 +143,6 @@ var AppContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
93
143
|
children = _this$props.children,
|
|
94
144
|
tagName = _this$props.tagName,
|
|
95
145
|
dataId = _this$props.dataId,
|
|
96
|
-
eleRef = _this$props.eleRef,
|
|
97
146
|
tooltipClass = _this$props.tooltipClass,
|
|
98
147
|
tooltipParentClass = _this$props.tooltipParentClass,
|
|
99
148
|
customProps = _this$props.customProps;
|
|
@@ -104,11 +153,11 @@ var AppContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
104
153
|
_customProps$ExtraPro = customProps.ExtraProps,
|
|
105
154
|
ExtraProps = _customProps$ExtraPro === void 0 ? {} : _customProps$ExtraPro;
|
|
106
155
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_Layout.Container, _extends({
|
|
107
|
-
className: "".concat(_AppContainerModule["default"].container, " ").concat(className)
|
|
108
|
-
|
|
156
|
+
className: "".concat(_AppContainerModule["default"].container, " ").concat(className) //onMouseOver={this.handleOver}
|
|
157
|
+
,
|
|
109
158
|
dataId: dataId,
|
|
110
159
|
tagName: tagName,
|
|
111
|
-
eleRef:
|
|
160
|
+
eleRef: this.getContainerRef
|
|
112
161
|
}, ContainerProps, ExtraProps), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
113
162
|
flexible: true
|
|
114
163
|
}, children)), /*#__PURE__*/_react["default"].createElement("div", _extends({}, ExtraProps, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[data-mode='default'][data-theme='blue'] {
|
|
1
|
+
[data-mode='default'][data-theme='blue'], :global(.blueDefaultTheme) [data-desk-theme="blue"] {
|
|
2
2
|
--zdt_cta_primary_text: var(--dot_text_primary);
|
|
3
3
|
--zdt_cta_primary_hover_text: var(--dot_text_cobalt);
|
|
4
4
|
--zdt_cta_primary_bg: var(--dot_bg_primary);
|
package/lib/Provider/Config.js
CHANGED
|
@@ -97,7 +97,7 @@ var ResizeComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
97
97
|
var newAdded = false;
|
|
98
98
|
mutation.addedNodes.forEach(function (mut) {
|
|
99
99
|
// Here we can listen for icon nodes. Confirm with bk
|
|
100
|
-
if (mut.attributes['data-responsive'] && (childrenList.length !== _this2.querySelector().length || _this2.childrenCurrentList.length !== _this2.querySelector().length)) {
|
|
100
|
+
if (mut.attributes && mut.attributes['data-responsive'] && (childrenList.length !== _this2.querySelector().length || _this2.childrenCurrentList.length !== _this2.querySelector().length)) {
|
|
101
101
|
newAdded = true;
|
|
102
102
|
}
|
|
103
103
|
});
|
package/lib/Select/Select.js
CHANGED
|
@@ -295,7 +295,8 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
|
|
|
295
295
|
var options = props.options,
|
|
296
296
|
valueField = props.valueField,
|
|
297
297
|
textField = props.textField,
|
|
298
|
-
customProps = props.customProps
|
|
298
|
+
_props$customProps = props.customProps,
|
|
299
|
+
customProps = _props$customProps === void 0 ? {} : _props$customProps;
|
|
299
300
|
var _customProps$listItem = customProps.listItemProps,
|
|
300
301
|
listItemProps = _customProps$listItem === void 0 ? {} : _customProps$listItem;
|
|
301
302
|
return this.formatOptions({
|
|
@@ -21,6 +21,18 @@
|
|
|
21
21
|
-webkit-animation-iteration-count: infinite;
|
|
22
22
|
-ms-animation-iteration-count: infinite;
|
|
23
23
|
}
|
|
24
|
+
[dir=ltr] .both {
|
|
25
|
+
animation-fill-mode: both;
|
|
26
|
+
-webkit-animation-fill-mode: both;
|
|
27
|
+
-ms-animation-fill-mode: both;
|
|
28
|
+
-moz-animation-fill-mode: both;
|
|
29
|
+
}
|
|
30
|
+
[dir=rtl] .both {
|
|
31
|
+
animation-fill-mode: both;
|
|
32
|
+
-webkit-animation-fill-mode: both;
|
|
33
|
+
-ms-animation-fill-mode: both;
|
|
34
|
+
-moz-animation-fill-mode: both;
|
|
35
|
+
}
|
|
24
36
|
.fadeIn {
|
|
25
37
|
opacity: 0;
|
|
26
38
|
}
|
|
@@ -9,7 +9,7 @@ var _react = require("react");
|
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _shallowEqual = _interopRequireDefault(require("./shallowEqual"));
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
15
|
|
|
@@ -33,7 +33,7 @@ function ContextOptimizer(props) {
|
|
|
33
33
|
}),
|
|
34
34
|
local = _useRef.current;
|
|
35
35
|
|
|
36
|
-
if (!(0,
|
|
36
|
+
if (!(0, _shallowEqual["default"])(data, local.data) || local.renderF !== renderF) {
|
|
37
37
|
local.children = renderF(data);
|
|
38
38
|
local.data = data;
|
|
39
39
|
local.renderF = renderF;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = shallowEqual;
|
|
7
|
+
|
|
8
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
9
|
+
|
|
10
|
+
function is(x, y) {
|
|
11
|
+
if (x === y) {
|
|
12
|
+
return x !== 0 || y !== 0 || 1 / x === 1 / y;
|
|
13
|
+
} else {
|
|
14
|
+
return x !== x && y !== y;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function shallowEqual(objA, objB) {
|
|
19
|
+
if (is(objA, objB)) {
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (_typeof(objA) !== 'object' || objA === null || _typeof(objB) !== 'object' || objB === null) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var keysA = Object.keys(objA);
|
|
28
|
+
var keysB = Object.keys(objB);
|
|
29
|
+
|
|
30
|
+
if (keysA.length !== keysB.length) {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
for (var i = 0; i < keysA.length; i++) {
|
|
35
|
+
if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return true;
|
|
41
|
+
}
|