@zohodesk/components 1.0.0-temp-203.2 → 1.0.0-temp-204
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/.cli/propValidation_report.html +1 -1
- package/README.md +25 -0
- package/es/CheckBox/CheckBox.js +3 -2
- package/es/CheckBox/props/propTypes.js +2 -1
- package/es/DateTime/DateWidget.js +8 -3
- package/es/DateTime/DateWidget.module.css +1 -0
- package/es/DateTime/__tests__/__snapshots__/DateTime.spec.js.snap +3 -3
- package/es/DateTime/__tests__/__snapshots__/DateWidget.spec.js.snap +1 -1
- package/es/DateTime/__tests__/__snapshots__/Time.spec.js.snap +3 -3
- package/es/DropBox/DropBoxElement/DropBoxElement.js +1 -1
- package/es/DropBox/DropBoxPositionMapping.js +142 -0
- package/es/ListItem/ListItemWithAvatar.js +9 -5
- package/es/ListItem/props/defaultProps.js +1 -0
- package/es/ListItem/props/propTypes.js +4 -1
- package/es/MultiSelect/MultiSelect.js +11 -3
- package/es/MultiSelect/MultiSelect.module.css +4 -0
- package/es/MultiSelect/Suggestions.js +2 -0
- package/es/MultiSelect/__tests__/__snapshots__/MultiSelect.spec.js.snap +1 -1
- package/es/MultiSelect/__tests__/__snapshots__/MultiSelectWithAvatar.spec.js.snap +1 -1
- package/es/MultiSelect/props/defaultProps.js +2 -1
- package/es/MultiSelect/props/propTypes.js +5 -1
- package/es/Popup/Popup.js +1 -1
- package/es/Popup/PositionMapping.js +72 -0
- package/es/Provider/LibraryContext.js +15 -3
- package/es/Provider/LibraryContextInit.js +1 -1
- package/es/Tab/Tabs.js +124 -20
- package/es/Tab/Tabs.module.css +33 -2
- package/es/Tab/props/defaultProps.js +3 -1
- package/es/Tab/props/propTypes.js +6 -1
- package/es/Tag/Tag.js +3 -1
- package/es/Tag/__tests__/Tag.spec.js +10 -0
- package/es/Tag/__tests__/__snapshots__/Tag.spec.js.snap +20 -0
- package/es/Tag/props/defaultProps.js +1 -0
- package/es/Tag/props/propTypes.js +1 -0
- package/es/TextBoxIcon/TextBoxIcon.js +13 -3
- package/es/TextBoxIcon/props/defaultProps.js +1 -0
- package/es/TextBoxIcon/props/propTypes.js +3 -1
- package/es/{Select → select}/Select.js +13 -8
- package/es/{Select → select}/Select.module.css +3 -0
- package/es/{Select → select}/SelectWithIcon.js +24 -4
- package/es/{Select → select}/__tests__/__snapshots__/Select.spec.js.snap +1 -1
- package/{lib/Select → es/select}/__tests__/__snapshots__/SelectWithIcon.spec.js.snap +1 -1
- package/es/{Select → select}/props/defaultProps.js +2 -1
- package/es/{Select → select}/props/propTypes.js +7 -1
- package/es/v1/DropBox/DropBoxElement/DropBoxElement.js +1 -1
- package/es/v1/ListItem/ListItemWithAvatar.js +9 -5
- package/es/v1/ListItem/props/defaultProps.js +1 -0
- package/es/v1/ListItem/props/propTypes.js +4 -1
- package/es/v1/MultiSelect/Suggestions.js +2 -0
- package/es/v1/MultiSelect/props/propTypes.js +1 -0
- package/es/v1/Popup/Popup.js +1 -1
- package/es/v1/Select/Select.js +3 -1
- package/es/v1/Select/props/propTypes.js +1 -0
- package/es/v1/Tag/Tag.js +3 -1
- package/es/v1/Tag/props/defaultProps.js +1 -0
- package/es/v1/Tag/props/propTypes.js +1 -0
- package/es/v1/TextBoxIcon/TextBoxIcon.js +9 -1
- package/es/v1/TextBoxIcon/props/defaultProps.js +1 -0
- package/es/v1/TextBoxIcon/props/propTypes.js +1 -0
- package/lib/CheckBox/CheckBox.js +3 -2
- package/lib/CheckBox/props/propTypes.js +2 -1
- package/lib/DateTime/DateWidget.js +11 -4
- package/lib/DateTime/DateWidget.module.css +1 -0
- package/lib/DateTime/__tests__/__snapshots__/DateTime.spec.js.snap +3 -3
- package/lib/DateTime/__tests__/__snapshots__/DateWidget.spec.js.snap +1 -1
- package/lib/DateTime/__tests__/__snapshots__/Time.spec.js.snap +3 -3
- package/lib/DropBox/DropBoxElement/DropBoxElement.js +1 -1
- package/lib/DropBox/DropBoxPositionMapping.js +149 -0
- package/lib/ListItem/ListItemWithAvatar.js +9 -5
- package/lib/ListItem/props/defaultProps.js +1 -0
- package/lib/ListItem/props/propTypes.js +4 -2
- package/lib/MultiSelect/MultiSelect.js +12 -4
- package/lib/MultiSelect/MultiSelect.module.css +4 -0
- package/lib/MultiSelect/Suggestions.js +2 -0
- package/lib/MultiSelect/__tests__/__snapshots__/MultiSelect.spec.js.snap +1 -1
- package/lib/MultiSelect/__tests__/__snapshots__/MultiSelectWithAvatar.spec.js.snap +1 -1
- package/lib/MultiSelect/props/defaultProps.js +2 -1
- package/lib/MultiSelect/props/propTypes.js +5 -1
- package/lib/Popup/Popup.js +1 -1
- package/lib/Popup/PositionMapping.js +81 -0
- package/lib/Provider/LibraryContext.js +15 -5
- package/lib/Provider/LibraryContextInit.js +1 -1
- package/lib/Tab/Tabs.js +125 -27
- package/lib/Tab/Tabs.module.css +33 -2
- package/lib/Tab/props/defaultProps.js +3 -1
- package/lib/Tab/props/propTypes.js +6 -1
- package/lib/Tag/Tag.js +5 -2
- package/lib/Tag/__tests__/Tag.spec.js +10 -0
- package/lib/Tag/__tests__/__snapshots__/Tag.spec.js.snap +20 -0
- package/lib/Tag/props/defaultProps.js +1 -0
- package/lib/Tag/props/propTypes.js +1 -0
- package/lib/TextBoxIcon/TextBoxIcon.js +14 -3
- package/lib/TextBoxIcon/props/defaultProps.js +1 -0
- package/lib/TextBoxIcon/props/propTypes.js +3 -1
- package/lib/{Select → select}/Select.js +14 -9
- package/lib/{Select → select}/Select.module.css +3 -0
- package/lib/{Select → select}/SelectWithIcon.js +33 -6
- package/lib/{Select → select}/__tests__/__snapshots__/Select.spec.js.snap +1 -1
- package/{es/Select → lib/select}/__tests__/__snapshots__/SelectWithIcon.spec.js.snap +1 -1
- package/lib/{Select → select}/props/defaultProps.js +1 -1
- package/lib/{Select → select}/props/propTypes.js +7 -1
- package/lib/v1/DropBox/DropBoxElement/DropBoxElement.js +1 -1
- package/lib/v1/ListItem/ListItemWithAvatar.js +9 -5
- package/lib/v1/ListItem/props/defaultProps.js +1 -0
- package/lib/v1/ListItem/props/propTypes.js +4 -2
- package/lib/v1/MultiSelect/Suggestions.js +2 -0
- package/lib/v1/MultiSelect/props/propTypes.js +1 -0
- package/lib/v1/Popup/Popup.js +1 -1
- package/lib/v1/Select/Select.js +4 -2
- package/lib/v1/Select/props/propTypes.js +1 -0
- package/lib/v1/Tag/Tag.js +5 -2
- package/lib/v1/Tag/props/defaultProps.js +1 -0
- package/lib/v1/Tag/props/propTypes.js +1 -0
- package/lib/v1/TextBoxIcon/TextBoxIcon.js +9 -1
- package/lib/v1/TextBoxIcon/props/defaultProps.js +1 -0
- package/lib/v1/TextBoxIcon/props/propTypes.js +1 -0
- package/package.json +1 -1
- package/propValidationArg.json +1 -1
- package/result.json +1 -1
- package/es/DropBox/DropBoxPositionMapping.json +0 -145
- package/es/Popup/PositionMapping.json +0 -74
- package/lib/DropBox/DropBoxPositionMapping.json +0 -145
- package/lib/Popup/PositionMapping.json +0 -74
- /package/es/{Select → select}/GroupSelect.js +0 -0
- /package/es/{Select → select}/SelectWithAvatar.js +0 -0
- /package/es/{Select → select}/__tests__/GroupSelect.spec.js +0 -0
- /package/es/{Select → select}/__tests__/Select.spec.js +0 -0
- /package/es/{Select → select}/__tests__/SelectWithAvatar.spec.js +0 -0
- /package/es/{Select → select}/__tests__/SelectWithIcon.spec.js +0 -0
- /package/es/{Select → select}/__tests__/__snapshots__/GroupSelect.spec.js.snap +0 -0
- /package/es/{Select → select}/__tests__/__snapshots__/SelectWithAvatar.spec.js.snap +0 -0
- /package/es/{Select → select}/index.js +0 -0
- /package/lib/{Select → select}/GroupSelect.js +0 -0
- /package/lib/{Select → select}/SelectWithAvatar.js +0 -0
- /package/lib/{Select → select}/__tests__/GroupSelect.spec.js +0 -0
- /package/lib/{Select → select}/__tests__/Select.spec.js +0 -0
- /package/lib/{Select → select}/__tests__/SelectWithAvatar.spec.js +0 -0
- /package/lib/{Select → select}/__tests__/SelectWithIcon.spec.js +0 -0
- /package/lib/{Select → select}/__tests__/__snapshots__/GroupSelect.spec.js.snap +0 -0
- /package/lib/{Select → select}/__tests__/__snapshots__/SelectWithAvatar.spec.js.snap +0 -0
- /package/lib/{Select → select}/index.js +0 -0
package/README.md
CHANGED
|
@@ -32,6 +32,31 @@ In this Package, we Provide Some Basic Components to Build Web App
|
|
|
32
32
|
- TextBoxIcon
|
|
33
33
|
- Tooltip
|
|
34
34
|
|
|
35
|
+
# 1.2.39
|
|
36
|
+
|
|
37
|
+
- **LibraryContext** - coloredTagVariant, hasTagColorInheritedToText properties added
|
|
38
|
+
- **Tag** - customAttributes prop supported
|
|
39
|
+
- **TextBoxIcon** - needInputFocusOnParentClick prop supported
|
|
40
|
+
|
|
41
|
+
# 1.2.38
|
|
42
|
+
|
|
43
|
+
- **renderRightPlaceholderNode**
|
|
44
|
+
- renderRightPlaceholderNode support given for `CheckBox` `Textarea` `Select` `MultiSelect` `TextBoxIcon`.
|
|
45
|
+
- Json File Import Changed to JS modules in `Popup/PositionMapping` `DropBox/DropBoxPositionMapping`.
|
|
46
|
+
- **DateWidget**
|
|
47
|
+
- TextBoxIconProps key supported in customProps prop
|
|
48
|
+
- **MultiSelect**
|
|
49
|
+
- customProps prop added and TextBoxIconProps customization given (Prop Spreaded).
|
|
50
|
+
- **Select**
|
|
51
|
+
- TextBoxIconProps key supported in customProps prop
|
|
52
|
+
- **SelectWithIcon**
|
|
53
|
+
- customProps prop added and tooltip supported for dotted case
|
|
54
|
+
|
|
55
|
+
# 1.2.37
|
|
56
|
+
|
|
57
|
+
- **Tabs**
|
|
58
|
+
- dataID prop import missing for more menu dropdown issue fix (v0 and v1)
|
|
59
|
+
|
|
35
60
|
# 1.2.36
|
|
36
61
|
|
|
37
62
|
- **dataID & dataTestID**
|
package/es/CheckBox/CheckBox.js
CHANGED
|
@@ -52,7 +52,8 @@ export default class CheckBox extends React.Component {
|
|
|
52
52
|
a11y,
|
|
53
53
|
customClass,
|
|
54
54
|
customProps,
|
|
55
|
-
dataSelectorId
|
|
55
|
+
dataSelectorId,
|
|
56
|
+
renderRightPlaceholderNode
|
|
56
57
|
} = this.props;
|
|
57
58
|
let {
|
|
58
59
|
CheckBoxProps = {},
|
|
@@ -157,7 +158,7 @@ export default class CheckBox extends React.Component {
|
|
|
157
158
|
${accessMode} ${customLabel}`,
|
|
158
159
|
title: toolTip ? toolTip : text,
|
|
159
160
|
...LabelProps
|
|
160
|
-
})));
|
|
161
|
+
})), renderRightPlaceholderNode ? renderRightPlaceholderNode : null);
|
|
161
162
|
}
|
|
162
163
|
|
|
163
164
|
}
|
|
@@ -1008,7 +1008,8 @@ class DateWidgetComponent extends React.Component {
|
|
|
1008
1008
|
} = this.props;
|
|
1009
1009
|
const {
|
|
1010
1010
|
DateTimeProps = {},
|
|
1011
|
-
TextBoxProps = {}
|
|
1011
|
+
TextBoxProps = {},
|
|
1012
|
+
TextBoxIconProps = {}
|
|
1012
1013
|
} = customProps;
|
|
1013
1014
|
const {
|
|
1014
1015
|
selected: value = '',
|
|
@@ -1062,11 +1063,15 @@ class DateWidgetComponent extends React.Component {
|
|
|
1062
1063
|
isFocus: isPopupReady,
|
|
1063
1064
|
autoComplete: false,
|
|
1064
1065
|
a11y: a11y,
|
|
1065
|
-
customProps: TextBoxProps
|
|
1066
|
+
customProps: TextBoxProps,
|
|
1067
|
+
...TextBoxIconProps
|
|
1066
1068
|
}, /*#__PURE__*/React.createElement(Container, {
|
|
1069
|
+
isInline: true,
|
|
1067
1070
|
align: "both",
|
|
1071
|
+
isCover: false,
|
|
1068
1072
|
onClick: isDisabled || isReadOnly ? null : this.handleDateIconClick,
|
|
1069
|
-
dataId: `${dataId}_datePicker
|
|
1073
|
+
dataId: `${dataId}_datePicker`,
|
|
1074
|
+
className: style.datePickIcon
|
|
1070
1075
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
1071
1076
|
name: "ZD-datepicker",
|
|
1072
1077
|
size: "12"
|
|
@@ -670,7 +670,7 @@ exports[`DateTime rendering the isActive is true and isDefaultPosition is true 1
|
|
|
670
670
|
data-test-id="boxComponent"
|
|
671
671
|
>
|
|
672
672
|
<div
|
|
673
|
-
class="
|
|
673
|
+
class="rightPlaceholder inflex rowdir both"
|
|
674
674
|
data-id="containerComponent"
|
|
675
675
|
data-selector-id="container"
|
|
676
676
|
data-test-id="containerComponent"
|
|
@@ -770,7 +770,7 @@ exports[`DateTime rendering the isActive is true and isDefaultPosition is true 1
|
|
|
770
770
|
data-test-id="boxComponent"
|
|
771
771
|
>
|
|
772
772
|
<div
|
|
773
|
-
class="
|
|
773
|
+
class="rightPlaceholder inflex rowdir both"
|
|
774
774
|
data-id="containerComponent"
|
|
775
775
|
data-selector-id="container"
|
|
776
776
|
data-test-id="containerComponent"
|
|
@@ -870,7 +870,7 @@ exports[`DateTime rendering the isActive is true and isDefaultPosition is true 1
|
|
|
870
870
|
data-test-id="boxComponent"
|
|
871
871
|
>
|
|
872
872
|
<div
|
|
873
|
-
class="
|
|
873
|
+
class="rightPlaceholder inflex rowdir both"
|
|
874
874
|
data-id="containerComponent"
|
|
875
875
|
data-selector-id="container"
|
|
876
876
|
data-test-id="containerComponent"
|
|
@@ -52,7 +52,7 @@ exports[`DateWidget rendering the defult props 1`] = `
|
|
|
52
52
|
data-test-id="boxComponent"
|
|
53
53
|
>
|
|
54
54
|
<div
|
|
55
|
-
class="
|
|
55
|
+
class="datePickIcon inflex coldir both"
|
|
56
56
|
data-id="dateWidget_datePicker"
|
|
57
57
|
data-selector-id="container"
|
|
58
58
|
data-test-id="dateWidget_datePicker"
|
|
@@ -77,7 +77,7 @@ exports[`Time rendering the defult props 1`] = `
|
|
|
77
77
|
data-test-id="boxComponent"
|
|
78
78
|
>
|
|
79
79
|
<div
|
|
80
|
-
class="
|
|
80
|
+
class="rightPlaceholder inflex rowdir both"
|
|
81
81
|
data-id="containerComponent"
|
|
82
82
|
data-selector-id="container"
|
|
83
83
|
data-test-id="containerComponent"
|
|
@@ -175,7 +175,7 @@ exports[`Time rendering the defult props 1`] = `
|
|
|
175
175
|
data-test-id="boxComponent"
|
|
176
176
|
>
|
|
177
177
|
<div
|
|
178
|
-
class="
|
|
178
|
+
class="rightPlaceholder inflex rowdir both"
|
|
179
179
|
data-id="containerComponent"
|
|
180
180
|
data-selector-id="container"
|
|
181
181
|
data-test-id="containerComponent"
|
|
@@ -273,7 +273,7 @@ exports[`Time rendering the defult props 1`] = `
|
|
|
273
273
|
data-test-id="boxComponent"
|
|
274
274
|
>
|
|
275
275
|
<div
|
|
276
|
-
class="
|
|
276
|
+
class="rightPlaceholder inflex rowdir both"
|
|
277
277
|
data-id="containerComponent"
|
|
278
278
|
data-selector-id="container"
|
|
279
279
|
data-test-id="containerComponent"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import useDropboxPosCalc from './useDropboxPosCalc';
|
|
3
3
|
import cssJSLogic from './css/cssJSLogic';
|
|
4
|
-
import { positionMapping } from '../DropBoxPositionMapping.
|
|
4
|
+
import { positionMapping } from '../DropBoxPositionMapping.js';
|
|
5
5
|
import { DropBoxElementDefaultProps } from './props/defaultProps';
|
|
6
6
|
import { DropBoxElementPropTypes } from './props/propTypes';
|
|
7
7
|
import { mergeStyle } from '@zohodesk/utils';
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
export const positionMapping = {
|
|
2
|
+
"bottomCenter": {
|
|
3
|
+
"direction": "bottom",
|
|
4
|
+
"arrowPosition": "mid",
|
|
5
|
+
"positionStyle": "bottomMid"
|
|
6
|
+
},
|
|
7
|
+
"bottomLeftToRight": {
|
|
8
|
+
"direction": "bottom",
|
|
9
|
+
"arrowPosition": "start",
|
|
10
|
+
"positionStyle": "bottomEnd"
|
|
11
|
+
},
|
|
12
|
+
"bottomCenterToRight": {
|
|
13
|
+
"direction": "bottom",
|
|
14
|
+
"arrowPosition": "start",
|
|
15
|
+
"positionStyle": "bottomEnd"
|
|
16
|
+
},
|
|
17
|
+
"bottomRightToLeft": {
|
|
18
|
+
"direction": "bottom",
|
|
19
|
+
"arrowPosition": "end",
|
|
20
|
+
"positionStyle": "bottomStart"
|
|
21
|
+
},
|
|
22
|
+
"bottomCenterToLeft": {
|
|
23
|
+
"direction": "bottom",
|
|
24
|
+
"arrowPosition": "end",
|
|
25
|
+
"positionStyle": "bottomStart"
|
|
26
|
+
},
|
|
27
|
+
"topCenter": {
|
|
28
|
+
"direction": "top",
|
|
29
|
+
"arrowPosition": "mid",
|
|
30
|
+
"positionStyle": "topMid"
|
|
31
|
+
},
|
|
32
|
+
"topLeftToRight": {
|
|
33
|
+
"direction": "top",
|
|
34
|
+
"arrowPosition": "start",
|
|
35
|
+
"positionStyle": "topEnd"
|
|
36
|
+
},
|
|
37
|
+
"topCenterToRight": {
|
|
38
|
+
"direction": "top",
|
|
39
|
+
"arrowPosition": "start",
|
|
40
|
+
"positionStyle": "topEnd"
|
|
41
|
+
},
|
|
42
|
+
"topRightToLeft": {
|
|
43
|
+
"direction": "top",
|
|
44
|
+
"arrowPosition": "end",
|
|
45
|
+
"positionStyle": "topStart"
|
|
46
|
+
},
|
|
47
|
+
"topCenterToLeft": {
|
|
48
|
+
"direction": "top",
|
|
49
|
+
"arrowPosition": "end",
|
|
50
|
+
"positionStyle": "topStart"
|
|
51
|
+
},
|
|
52
|
+
"rightCenter": {
|
|
53
|
+
"direction": "right",
|
|
54
|
+
"arrowPosition": "mid",
|
|
55
|
+
"positionStyle": "rightMid"
|
|
56
|
+
},
|
|
57
|
+
"rightTopToBottom": {
|
|
58
|
+
"direction": "right",
|
|
59
|
+
"arrowPosition": "start",
|
|
60
|
+
"positionStyle": "rightEnd"
|
|
61
|
+
},
|
|
62
|
+
"rightCenterToBottom": {
|
|
63
|
+
"direction": "right",
|
|
64
|
+
"arrowPosition": "start",
|
|
65
|
+
"positionStyle": "rightEnd"
|
|
66
|
+
},
|
|
67
|
+
"rightBottomToTop": {
|
|
68
|
+
"direction": "right",
|
|
69
|
+
"arrowPosition": "end",
|
|
70
|
+
"positionStyle": "rightStart"
|
|
71
|
+
},
|
|
72
|
+
"rightCenterToTop": {
|
|
73
|
+
"direction": "right",
|
|
74
|
+
"arrowPosition": "end",
|
|
75
|
+
"positionStyle": "rightStart"
|
|
76
|
+
},
|
|
77
|
+
"leftCenter": {
|
|
78
|
+
"direction": "left",
|
|
79
|
+
"arrowPosition": "mid",
|
|
80
|
+
"positionStyle": "leftMid"
|
|
81
|
+
},
|
|
82
|
+
"leftTopToBottom": {
|
|
83
|
+
"direction": "left",
|
|
84
|
+
"arrowPosition": "start",
|
|
85
|
+
"positionStyle": "leftEnd"
|
|
86
|
+
},
|
|
87
|
+
"leftCenterToBottom": {
|
|
88
|
+
"direction": "left",
|
|
89
|
+
"arrowPosition": "start",
|
|
90
|
+
"positionStyle": "leftEnd"
|
|
91
|
+
},
|
|
92
|
+
"leftBottomToTop": {
|
|
93
|
+
"direction": "left",
|
|
94
|
+
"arrowPosition": "end",
|
|
95
|
+
"positionStyle": "leftStart"
|
|
96
|
+
},
|
|
97
|
+
"leftCenterToTop": {
|
|
98
|
+
"direction": "left",
|
|
99
|
+
"arrowPosition": "end",
|
|
100
|
+
"positionStyle": "leftStart"
|
|
101
|
+
},
|
|
102
|
+
"bottomRight": {
|
|
103
|
+
"direction": "bottom",
|
|
104
|
+
"arrowPosition": "start",
|
|
105
|
+
"positionStyle": "bottomEnd"
|
|
106
|
+
},
|
|
107
|
+
"bottomLeft": {
|
|
108
|
+
"direction": "bottom",
|
|
109
|
+
"arrowPosition": "end",
|
|
110
|
+
"positionStyle": "bottomStart"
|
|
111
|
+
},
|
|
112
|
+
"topRight": {
|
|
113
|
+
"direction": "top",
|
|
114
|
+
"arrowPosition": "start",
|
|
115
|
+
"positionStyle": "topEnd"
|
|
116
|
+
},
|
|
117
|
+
"topLeft": {
|
|
118
|
+
"direction": "top",
|
|
119
|
+
"arrowPosition": "end",
|
|
120
|
+
"positionStyle": "topStart"
|
|
121
|
+
},
|
|
122
|
+
"rightBottom": {
|
|
123
|
+
"direction": "right",
|
|
124
|
+
"arrowPosition": "start",
|
|
125
|
+
"positionStyle": "rightEnd"
|
|
126
|
+
},
|
|
127
|
+
"rightTop": {
|
|
128
|
+
"direction": "right",
|
|
129
|
+
"arrowPosition": "end",
|
|
130
|
+
"positionStyle": "rightStart"
|
|
131
|
+
},
|
|
132
|
+
"leftBottom": {
|
|
133
|
+
"direction": "left",
|
|
134
|
+
"arrowPosition": "start",
|
|
135
|
+
"positionStyle": "leftEnd"
|
|
136
|
+
},
|
|
137
|
+
"leftTop": {
|
|
138
|
+
"direction": "left",
|
|
139
|
+
"arrowPosition": "end",
|
|
140
|
+
"positionStyle": "leftStart"
|
|
141
|
+
}
|
|
142
|
+
};
|
|
@@ -74,7 +74,9 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
74
74
|
a11y,
|
|
75
75
|
customClass,
|
|
76
76
|
customProps,
|
|
77
|
-
needMultiLineText
|
|
77
|
+
needMultiLineText,
|
|
78
|
+
onAvatarClick,
|
|
79
|
+
avatarSize
|
|
78
80
|
} = this.props;
|
|
79
81
|
let {
|
|
80
82
|
ListItemProps = {},
|
|
@@ -119,7 +121,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
119
121
|
className: style.leftAvatar
|
|
120
122
|
}, isTeam ? /*#__PURE__*/React.createElement(AvatarTeam, {
|
|
121
123
|
name: name,
|
|
122
|
-
size:
|
|
124
|
+
size: avatarSize,
|
|
123
125
|
src: imgSrc,
|
|
124
126
|
needTitle: needAvatarTitle,
|
|
125
127
|
textPalette: isDarkPalette ? 'white' : '',
|
|
@@ -127,16 +129,18 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
127
129
|
customClass: {
|
|
128
130
|
customAvatar: customAvatar,
|
|
129
131
|
customAvatarTeam: customAvatarTeam
|
|
130
|
-
}
|
|
132
|
+
},
|
|
133
|
+
onClick: onAvatarClick
|
|
131
134
|
}) : /*#__PURE__*/React.createElement(Avatar, {
|
|
132
135
|
name: name,
|
|
133
|
-
size:
|
|
136
|
+
size: avatarSize,
|
|
134
137
|
src: imgSrc,
|
|
135
138
|
initial: initial,
|
|
136
139
|
textPalette: isDarkPalette ? 'white' : '',
|
|
137
140
|
needTitle: needAvatarTitle,
|
|
138
141
|
palette: isDarkPalette ? 'info' : avatarPalette,
|
|
139
|
-
customClass: customAvatar
|
|
142
|
+
customClass: customAvatar,
|
|
143
|
+
onClick: onAvatarClick
|
|
140
144
|
})) : null, value ? /*#__PURE__*/React.createElement(Box, {
|
|
141
145
|
flexible: true,
|
|
142
146
|
shrink: true,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
+
import { propTypes as AvatarProps } from '../../Avatar/props/propTypes.js';
|
|
2
3
|
export const ListContainer_Props = {
|
|
3
4
|
active: PropTypes.bool,
|
|
4
5
|
autoHover: PropTypes.bool,
|
|
@@ -87,6 +88,7 @@ export const ListItemWithAvatar_Props = {
|
|
|
87
88
|
onMouseEnter: PropTypes.func,
|
|
88
89
|
palette: PropTypes.oneOf(['dark']),
|
|
89
90
|
size: PropTypes.string,
|
|
91
|
+
avatarSize: AvatarProps.size,
|
|
90
92
|
title: PropTypes.string,
|
|
91
93
|
value: PropTypes.string,
|
|
92
94
|
a11y: PropTypes.shape({
|
|
@@ -102,7 +104,8 @@ export const ListItemWithAvatar_Props = {
|
|
|
102
104
|
needMultiLineText: PropTypes.bool,
|
|
103
105
|
customProps: PropTypes.shape({
|
|
104
106
|
ListItemProps: PropTypes.object
|
|
105
|
-
})
|
|
107
|
+
}),
|
|
108
|
+
onAvatarClick: PropTypes.func
|
|
106
109
|
};
|
|
107
110
|
export const ListItemWithCheckBox_Props = {
|
|
108
111
|
active: PropTypes.bool,
|
|
@@ -864,7 +864,8 @@ export class MultiSelectComponent extends React.Component {
|
|
|
864
864
|
dataId,
|
|
865
865
|
setAriaId,
|
|
866
866
|
isPopupOpen,
|
|
867
|
-
ariaErrorId
|
|
867
|
+
ariaErrorId,
|
|
868
|
+
customProps
|
|
868
869
|
} = this.props;
|
|
869
870
|
let {
|
|
870
871
|
isActive,
|
|
@@ -886,6 +887,9 @@ export class MultiSelectComponent extends React.Component {
|
|
|
886
887
|
disabledOptions
|
|
887
888
|
});
|
|
888
889
|
const isShowClearIcon = !isReadOnly && !isDisabled && !disableAction && isShowClear;
|
|
890
|
+
let {
|
|
891
|
+
TextBoxIconProps = {}
|
|
892
|
+
} = customProps;
|
|
889
893
|
return /*#__PURE__*/React.createElement(Container, {
|
|
890
894
|
align: "vertical",
|
|
891
895
|
alignBox: "row",
|
|
@@ -941,10 +945,14 @@ export class MultiSelectComponent extends React.Component {
|
|
|
941
945
|
ariaDescribedby: ariaErrorId,
|
|
942
946
|
ariaLabelledby: ariaLabelledby
|
|
943
947
|
},
|
|
944
|
-
autoComplete: autoComplete
|
|
948
|
+
autoComplete: autoComplete,
|
|
949
|
+
...TextBoxIconProps
|
|
945
950
|
}, /*#__PURE__*/React.createElement(Container, {
|
|
951
|
+
isInline: true,
|
|
952
|
+
isCover: false,
|
|
946
953
|
alignBox: "row",
|
|
947
|
-
align: "vertical"
|
|
954
|
+
align: "vertical",
|
|
955
|
+
className: style.rightPlaceholder
|
|
948
956
|
}, isShowClearIcon ? /*#__PURE__*/React.createElement(Box, {
|
|
949
957
|
className: `${style.delete} ${style[`${palette}Delete`]}`,
|
|
950
958
|
dataId: `${dataId}_clearIcon`,
|
|
@@ -15,6 +15,7 @@ export default class Suggestions extends React.PureComponent {
|
|
|
15
15
|
getRef,
|
|
16
16
|
hoverOption,
|
|
17
17
|
onClick,
|
|
18
|
+
onAvatarClick,
|
|
18
19
|
onMouseEnter,
|
|
19
20
|
needTick,
|
|
20
21
|
needBorder,
|
|
@@ -83,6 +84,7 @@ export default class Suggestions extends React.PureComponent {
|
|
|
83
84
|
key: `${id}avatarListItem`,
|
|
84
85
|
name: value,
|
|
85
86
|
onClick: onClick,
|
|
87
|
+
onAvatarClick: onAvatarClick,
|
|
86
88
|
onMouseEnter: onMouseEnter,
|
|
87
89
|
value: value,
|
|
88
90
|
title: value,
|
|
@@ -70,7 +70,7 @@ exports[`MultiSelect rendering the defult props 1`] = `
|
|
|
70
70
|
data-test-id="boxComponent"
|
|
71
71
|
>
|
|
72
72
|
<div
|
|
73
|
-
class="
|
|
73
|
+
class="rightPlaceholder inflex rowdir vCenter"
|
|
74
74
|
data-id="containerComponent"
|
|
75
75
|
data-selector-id="container"
|
|
76
76
|
data-test-id="containerComponent"
|
|
@@ -69,7 +69,7 @@ exports[`MultiSelectWithAvatar rendering the defult props 1`] = `
|
|
|
69
69
|
data-test-id="boxComponent"
|
|
70
70
|
>
|
|
71
71
|
<div
|
|
72
|
-
class="
|
|
72
|
+
class="rightPlaceholder inflex rowdir vCenter"
|
|
73
73
|
data-id="containerComponent"
|
|
74
74
|
data-selector-id="container"
|
|
75
75
|
data-test-id="containerComponent"
|
|
@@ -111,7 +111,8 @@ export const MultiSelect_defaultProps = {
|
|
|
111
111
|
keepSelectedOptions: false,
|
|
112
112
|
selectedOptionsCount: 0,
|
|
113
113
|
cardHeaderName: '',
|
|
114
|
-
needResponsive: true
|
|
114
|
+
needResponsive: true,
|
|
115
|
+
customProps: {}
|
|
115
116
|
};
|
|
116
117
|
export const MultiSelectHeader_defaultProps = {
|
|
117
118
|
dataId: 'MultiSelectHeader'
|
|
@@ -104,7 +104,10 @@ export const MultiSelect_propTypes = {
|
|
|
104
104
|
needSelectAll: PropTypes.bool,
|
|
105
105
|
selectAllText: PropTypes.string,
|
|
106
106
|
setAriaId: PropTypes.string,
|
|
107
|
-
ariaErrorId: PropTypes.string
|
|
107
|
+
ariaErrorId: PropTypes.string,
|
|
108
|
+
customProps: PropTypes.shape({
|
|
109
|
+
TextBoxIconProps: PropTypes.object
|
|
110
|
+
})
|
|
108
111
|
};
|
|
109
112
|
export const MultiSelectHeader_propTypes = {
|
|
110
113
|
dataId: PropTypes.string,
|
|
@@ -158,6 +161,7 @@ export const Suggestions_propTypes = {
|
|
|
158
161
|
needBorder: PropTypes.bool,
|
|
159
162
|
needTick: PropTypes.bool,
|
|
160
163
|
onClick: PropTypes.func,
|
|
164
|
+
onAvatarClick: PropTypes.func,
|
|
161
165
|
onMouseEnter: PropTypes.func,
|
|
162
166
|
palette: PropTypes.string,
|
|
163
167
|
selectedOptions: PropTypes.array,
|
package/es/Popup/Popup.js
CHANGED
|
@@ -6,7 +6,7 @@ import hoistStatics from 'hoist-non-react-statics';
|
|
|
6
6
|
|
|
7
7
|
import { debounce, isDescendant, isTextSelected, cancelBubblingEffect } from '../utils/Common.js';
|
|
8
8
|
import viewPort from './viewPort';
|
|
9
|
-
import { absolutePositionMapping, rtlAbsolutePositionMapping, rtlFixedPositionMapping } from './PositionMapping.
|
|
9
|
+
import { absolutePositionMapping, rtlAbsolutePositionMapping, rtlFixedPositionMapping } from './PositionMapping.js';
|
|
10
10
|
import ResizeObserver from '@zohodesk/virtualizer/lib/commons/ResizeObserver.js';
|
|
11
11
|
let lastOpenedGroup = [];
|
|
12
12
|
let popups = {};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export const absolutePositionMapping = {
|
|
2
|
+
"bottomCenter": "bottomCenter",
|
|
3
|
+
"bottomRight": "bottomLeftToRight",
|
|
4
|
+
"bottomLeft": "bottomRightToLeft",
|
|
5
|
+
"topCenter": "topCenter",
|
|
6
|
+
"topRight": "topLeftToRight",
|
|
7
|
+
"topLeft": "topRightToLeft",
|
|
8
|
+
"rightCenter": "rightCenter",
|
|
9
|
+
"rightBottom": "rightTopToBottom",
|
|
10
|
+
"rightTop": "rightBottomToTop",
|
|
11
|
+
"leftCenter": "leftCenter",
|
|
12
|
+
"leftBottom": "leftTopToBottom",
|
|
13
|
+
"leftTop": "leftBottomToTop",
|
|
14
|
+
"bottomLeftToRight": "bottomLeftToRight",
|
|
15
|
+
"bottomRightToLeft": "bottomRightToLeft",
|
|
16
|
+
"topLeftToRight": "topLeftToRight",
|
|
17
|
+
"topRightToLeft": "topRightToLeft",
|
|
18
|
+
"rightTopToBottom": "rightTopToBottom",
|
|
19
|
+
"rightBottomToTop": "rightBottomToTop",
|
|
20
|
+
"leftTopToBottom": "leftTopToBottom"
|
|
21
|
+
};
|
|
22
|
+
export const rtlAbsolutePositionMapping = {
|
|
23
|
+
"bottomCenter": "bottomCenter",
|
|
24
|
+
"bottomRight": "bottomRightToLeft",
|
|
25
|
+
"bottomLeft": "bottomLeftToRight",
|
|
26
|
+
"topCenter": "topCenter",
|
|
27
|
+
"topRight": "topRightToLeft",
|
|
28
|
+
"topLeft": "topLeftToRight",
|
|
29
|
+
"rightCenter": "leftCenter",
|
|
30
|
+
"rightBottom": "leftTopToBottom",
|
|
31
|
+
"rightTop": "leftBottomToTop",
|
|
32
|
+
"leftCenter": "rightCenter",
|
|
33
|
+
"leftBottom": "rightTopToBottom",
|
|
34
|
+
"leftTop": "rightBottomToTop",
|
|
35
|
+
"bottomLeftToRight": "bottomLeftToRight",
|
|
36
|
+
"bottomRightToLeft": "bottomRightToLeft",
|
|
37
|
+
"topLeftToRight": "topLeftToRight",
|
|
38
|
+
"topRightToLeft": "topRightToLeft",
|
|
39
|
+
"rightTopToBottom": "rightTopToBottom",
|
|
40
|
+
"rightBottomToTop": "rightBottomToTop",
|
|
41
|
+
"leftTopToBottom": "leftTopToBottom"
|
|
42
|
+
};
|
|
43
|
+
export const rtlFixedPositionMapping = {
|
|
44
|
+
"bottomCenter": "bottomCenter",
|
|
45
|
+
"bottomLeftToRight": "bottomRightToLeft",
|
|
46
|
+
"bottomCenterToRight": "bottomCenterToLeft",
|
|
47
|
+
"bottomRightToLeft": "bottomLeftToRight",
|
|
48
|
+
"bottomCenterToLeft": "bottomCenterToRight",
|
|
49
|
+
"topCenter": "topCenter",
|
|
50
|
+
"topLeftToRight": "topRightToLeft",
|
|
51
|
+
"topCenterToRight": "topCenterToLeft",
|
|
52
|
+
"topRightToLeft": "topLeftToRight",
|
|
53
|
+
"topCenterToLeft": "topCenterToRight",
|
|
54
|
+
"rightTopToBottom": "leftTopToBottom",
|
|
55
|
+
"rightCenterToBottom": "leftCenterToBottom",
|
|
56
|
+
"rightCenter": "leftCenter",
|
|
57
|
+
"rightBottomToTop": "leftBottomToTop",
|
|
58
|
+
"rightCenterToTop": "leftCenterToTop",
|
|
59
|
+
"leftTopToBottom": "rightTopToBottom",
|
|
60
|
+
"leftCenterToBottom": "rightCenterToBottom",
|
|
61
|
+
"leftCenter": "rightCenter",
|
|
62
|
+
"leftBottomToTop": "rightBottomToTop",
|
|
63
|
+
"leftCenterToTop": "rightCenterToTop",
|
|
64
|
+
"bottomRight": "bottomLeft",
|
|
65
|
+
"bottomLeft": "bottomRight",
|
|
66
|
+
"topRight": "topLeft",
|
|
67
|
+
"topLeft": "topRight",
|
|
68
|
+
"rightBottom": "leftBottom",
|
|
69
|
+
"rightTop": "leftTop",
|
|
70
|
+
"leftBottom": "rightBottom",
|
|
71
|
+
"leftTop": "rightTop"
|
|
72
|
+
};
|
|
@@ -5,13 +5,17 @@ import { getLibraryConfig } from './Config';
|
|
|
5
5
|
|
|
6
6
|
const LibraryContextProvider = _ref => {
|
|
7
7
|
let {
|
|
8
|
-
isReducedMotion
|
|
9
|
-
direction
|
|
8
|
+
isReducedMotion,
|
|
9
|
+
direction,
|
|
10
|
+
coloredTagVariant,
|
|
11
|
+
hasTagColorInheritedToText,
|
|
10
12
|
children
|
|
11
13
|
} = _ref;
|
|
12
14
|
const [value, setValue] = useState({
|
|
13
15
|
isReducedMotion,
|
|
14
|
-
direction
|
|
16
|
+
direction,
|
|
17
|
+
coloredTagVariant,
|
|
18
|
+
hasTagColorInheritedToText
|
|
15
19
|
});
|
|
16
20
|
|
|
17
21
|
function setGlobalContext(key, data) {
|
|
@@ -32,6 +36,14 @@ const LibraryContextProvider = _ref => {
|
|
|
32
36
|
LibraryContextProvider.propTypes = {
|
|
33
37
|
children: PropTypes.node.isRequired,
|
|
34
38
|
isReducedMotion: PropTypes.bool,
|
|
39
|
+
coloredTagVariant: PropTypes.oneOf(['bold', 'subtle', 'minimal']),
|
|
40
|
+
hasTagColorInheritedToText: PropTypes.bool,
|
|
35
41
|
direction: PropTypes.string
|
|
36
42
|
};
|
|
43
|
+
LibraryContextProvider.defaultProps = {
|
|
44
|
+
isReducedMotion: getLibraryConfig('isReducedMotion'),
|
|
45
|
+
direction: getLibraryConfig('direction'),
|
|
46
|
+
coloredTagVariant: 'bold',
|
|
47
|
+
hasTagColorInheritedToText: true
|
|
48
|
+
};
|
|
37
49
|
export default LibraryContextProvider;
|