@zohodesk/components 1.0.0-temp-220.6 → 1.0.0-temp-223
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/config/variables/variableMapping.json +6 -0
- package/.cli/propValidation_report.html +1 -1
- package/README.md +8 -0
- package/assets/Appearance/dark/mode/Component_DarkMode.module.css +1 -0
- package/assets/Appearance/light/mode/Component_LightMode.module.css +1 -0
- package/assets/Appearance/pureDark/mode/Component_PureDarkMode.module.css +1 -0
- package/es/ListItem/ListContainer.js +3 -2
- package/es/ListItem/ListItem.module.css +52 -6
- package/es/ListItem/ListItemWithAvatar.js +17 -6
- package/es/ListItem/ListItemWithCheckBox.js +18 -6
- package/es/ListItem/ListItemWithIcon.js +20 -7
- package/es/ListItem/ListItemWithRadio.js +19 -6
- package/es/ListItem/__tests__/ListContainer.spec.js +8 -0
- package/es/ListItem/__tests__/ListItemWithAvatar.spec.js +35 -0
- package/es/ListItem/__tests__/ListItemWithCheckBox.spec.js +35 -0
- package/es/ListItem/__tests__/ListItemWithIcon.spec.js +35 -0
- package/es/ListItem/__tests__/ListItemWithRadio.spec.js +35 -0
- package/es/ListItem/__tests__/__snapshots__/ListContainer.spec.js.snap +13 -0
- package/es/ListItem/__tests__/__snapshots__/ListItemWithAvatar.spec.js.snap +200 -2
- package/es/ListItem/__tests__/__snapshots__/ListItemWithCheckBox.spec.js.snap +451 -30
- package/es/ListItem/__tests__/__snapshots__/ListItemWithIcon.spec.js.snap +202 -4
- package/es/ListItem/__tests__/__snapshots__/ListItemWithRadio.spec.js.snap +447 -30
- package/es/ListItem/props/defaultProps.js +13 -5
- package/es/ListItem/props/propTypes.js +13 -1
- package/es/MultiSelect/AdvancedMultiSelect.js +10 -4
- package/es/MultiSelect/MultiSelect.js +8 -4
- package/es/MultiSelect/MultiSelect.module.css +9 -1
- package/es/MultiSelect/MultiSelectWithAvatar.js +6 -2
- package/es/MultiSelect/Suggestions.js +5 -2
- package/es/MultiSelect/__tests__/__snapshots__/MultiSelectHeader.spec.js.snap +34 -13
- package/es/MultiSelect/props/propTypes.js +3 -0
- package/es/Popup/Popup.js +37 -116
- package/es/Provider/Config.js +1 -2
- package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +21 -2
- package/es/VelocityAnimation/VelocityAnimationGroup/props/defaultProps.js +2 -1
- package/es/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +2 -1
- package/es/common/common.module.css +10 -0
- package/es/utils/dropDownUtils.js +33 -8
- package/lib/ListItem/ListContainer.js +3 -2
- package/lib/ListItem/ListItem.module.css +52 -6
- package/lib/ListItem/ListItemWithAvatar.js +16 -5
- package/lib/ListItem/ListItemWithCheckBox.js +17 -5
- package/lib/ListItem/ListItemWithIcon.js +19 -6
- package/lib/ListItem/ListItemWithRadio.js +18 -5
- package/lib/ListItem/__tests__/ListContainer.spec.js +8 -0
- package/lib/ListItem/__tests__/ListItemWithAvatar.spec.js +35 -0
- package/lib/ListItem/__tests__/ListItemWithCheckBox.spec.js +35 -0
- package/lib/ListItem/__tests__/ListItemWithIcon.spec.js +35 -0
- package/lib/ListItem/__tests__/ListItemWithRadio.spec.js +35 -0
- package/lib/ListItem/__tests__/__snapshots__/ListContainer.spec.js.snap +13 -0
- package/lib/ListItem/__tests__/__snapshots__/ListItemWithAvatar.spec.js.snap +200 -2
- package/lib/ListItem/__tests__/__snapshots__/ListItemWithCheckBox.spec.js.snap +451 -30
- package/lib/ListItem/__tests__/__snapshots__/ListItemWithIcon.spec.js.snap +202 -4
- package/lib/ListItem/__tests__/__snapshots__/ListItemWithRadio.spec.js.snap +447 -30
- package/lib/ListItem/props/defaultProps.js +13 -5
- package/lib/ListItem/props/propTypes.js +12 -2
- package/lib/MultiSelect/AdvancedMultiSelect.js +76 -69
- package/lib/MultiSelect/MultiSelect.js +8 -4
- package/lib/MultiSelect/MultiSelect.module.css +9 -1
- package/lib/MultiSelect/MultiSelectWithAvatar.js +6 -2
- package/lib/MultiSelect/Suggestions.js +5 -2
- package/lib/MultiSelect/__tests__/__snapshots__/MultiSelectHeader.spec.js.snap +34 -13
- package/lib/MultiSelect/props/propTypes.js +4 -1
- package/lib/Popup/Popup.js +90 -181
- package/lib/Provider/Config.js +1 -2
- package/lib/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +49 -9
- package/lib/VelocityAnimation/VelocityAnimationGroup/props/defaultProps.js +2 -1
- package/lib/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +2 -1
- package/lib/common/common.module.css +10 -0
- package/lib/utils/dropDownUtils.js +41 -11
- package/package.json +3 -3
- package/result.json +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
.varClass {
|
|
2
2
|
/* listitem default variables */
|
|
3
|
+
--listitem_font_size: var(--zd_font_size13);
|
|
3
4
|
--listitem_text_color: var(--zdt_listitem_default_text);
|
|
4
5
|
--listitem_padding: var(--zd_size9) var(--zd_size20);
|
|
5
6
|
--listitem_border_width: 0;
|
|
@@ -24,7 +25,7 @@
|
|
|
24
25
|
position: relative;
|
|
25
26
|
list-style: none;
|
|
26
27
|
color: var(--listitem_text_color);
|
|
27
|
-
font-size: var(--
|
|
28
|
+
font-size: var(--listitem_font_size);
|
|
28
29
|
height: var(--listitem_height);
|
|
29
30
|
min-height: var(--listitem_min_height);
|
|
30
31
|
text-decoration: none;
|
|
@@ -57,7 +58,7 @@
|
|
|
57
58
|
--listitem_min_height: var(--zd_size35);
|
|
58
59
|
}
|
|
59
60
|
.large {
|
|
60
|
-
--
|
|
61
|
+
--listitem_min_height: var(--zd_size48);
|
|
61
62
|
}
|
|
62
63
|
[dir=ltr] .large {
|
|
63
64
|
--listitem_padding: var(--zd_size10) var(--zd_size3) var(--zd_size10) var(--zd_size25);
|
|
@@ -72,9 +73,8 @@
|
|
|
72
73
|
.value, .multiLineValue {
|
|
73
74
|
line-height: 1.5385;
|
|
74
75
|
}
|
|
75
|
-
.multiLineValue{
|
|
76
|
-
|
|
77
|
-
composes: clamp from '../common/common.module.css'
|
|
76
|
+
.multiLineValue,.multiLine{
|
|
77
|
+
composes: lineClamp from '../common/common.module.css';
|
|
78
78
|
}
|
|
79
79
|
.iconBox {
|
|
80
80
|
width: var(--zd_size20) ;
|
|
@@ -94,6 +94,42 @@
|
|
|
94
94
|
margin: var(--listitem_avatar_margin);
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
.lhsJustifyContent_start,
|
|
98
|
+
.lhsJustifyContent_center,
|
|
99
|
+
.lhsJustifyContent_end {
|
|
100
|
+
composes: dflex alignVertical from '../common/common.module.css';
|
|
101
|
+
}
|
|
102
|
+
.lhsJustifyContent_start {
|
|
103
|
+
composes: justifyFstart from '../common/common.module.css';
|
|
104
|
+
}
|
|
105
|
+
.lhsJustifyContent_center {
|
|
106
|
+
composes: alignHorizontal from '../common/common.module.css';
|
|
107
|
+
}
|
|
108
|
+
.lhsJustifyContent_end {
|
|
109
|
+
composes: justifyFend from '../common/common.module.css';
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.lhsBox {
|
|
113
|
+
composes: dflex from '../common/common.module.css';
|
|
114
|
+
align-self: stretch;
|
|
115
|
+
}
|
|
116
|
+
.lhsBox_small,
|
|
117
|
+
.lhsBox_medium,
|
|
118
|
+
.lhsBox_large{
|
|
119
|
+
composes: varClass;
|
|
120
|
+
--listitem_doubleline_content_height: calc(var(--listitem_font_size) * 2 );
|
|
121
|
+
height: 100% ;
|
|
122
|
+
composes: dflex alignVertical from '../common/common.module.css';
|
|
123
|
+
}
|
|
124
|
+
.lhsBox_small {
|
|
125
|
+
max-height: calc(var(--listitem_doubleline_content_height) + var(--zd_size7)); /* 7px = listitem min-height - (top + bottom padding) - doubleLine content height */
|
|
126
|
+
}
|
|
127
|
+
.lhsBox_medium {
|
|
128
|
+
max-height: calc(var(--listitem_doubleline_content_height) + var(--zd_size8)); /* 8px = listitem min-height - (top + bottom padding) - doubleLine content height */
|
|
129
|
+
}
|
|
130
|
+
.lhsBox_large {
|
|
131
|
+
max-height: calc(var(--listitem_doubleline_content_height) + var(--zd_size15)); /* 15px = listitem min-height - (top + bottom padding) - doubleLine content height */
|
|
132
|
+
}
|
|
97
133
|
.defaultHover, .primaryHover, .secondaryHover, .darkHover {
|
|
98
134
|
background-color: var(--listitem_highlight_bg_color);
|
|
99
135
|
}
|
|
@@ -155,12 +191,22 @@
|
|
|
155
191
|
.activedark {
|
|
156
192
|
--listitem_active_bg_color: var(--zdt_listitem_dark_active_bg);
|
|
157
193
|
}
|
|
194
|
+
.secondaryField{
|
|
195
|
+
color:var(--zdt_listitem_secondaryfield_text);
|
|
196
|
+
font-size: var(--zd_font_size12) ;
|
|
197
|
+
line-height: 1.25;
|
|
198
|
+
}
|
|
158
199
|
|
|
159
200
|
.tickIcon,
|
|
160
201
|
.defaultTick,
|
|
161
202
|
.darkTick {
|
|
162
203
|
position: absolute;
|
|
163
204
|
color: var(--listitem_tickicon_color);
|
|
205
|
+
top:50% ;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.tickIcon, .defaultTick, .darkTick {
|
|
209
|
+
transform: translateY(-50%);
|
|
164
210
|
}
|
|
165
211
|
|
|
166
212
|
[dir=ltr] .tickIcon, [dir=ltr] .defaultTick, [dir=ltr] .darkTick {
|
|
@@ -199,7 +245,7 @@
|
|
|
199
245
|
}
|
|
200
246
|
.responsiveHeight {
|
|
201
247
|
--listitem_min_height: var(--zd_size45);
|
|
202
|
-
|
|
248
|
+
--listitem_font_size: var(--zd_font_size15);
|
|
203
249
|
padding-top: var(--zd_size10) ;
|
|
204
250
|
padding-bottom: var(--zd_size10) ;
|
|
205
251
|
}
|
|
@@ -128,7 +128,9 @@ var ListItemWithAvatar = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
128
128
|
a11y = _this$props4.a11y,
|
|
129
129
|
customClass = _this$props4.customClass,
|
|
130
130
|
customProps = _this$props4.customProps,
|
|
131
|
-
needMultiLineText = _this$props4.needMultiLineText
|
|
131
|
+
needMultiLineText = _this$props4.needMultiLineText,
|
|
132
|
+
secondaryValue = _this$props4.secondaryValue,
|
|
133
|
+
lhsAlignContent = _this$props4.lhsAlignContent;
|
|
132
134
|
var _customProps$ListItem = customProps.ListItemProps,
|
|
133
135
|
ListItemProps = _customProps$ListItem === void 0 ? {} : _customProps$ListItem,
|
|
134
136
|
_customProps$Containe = customProps.ContainerProps,
|
|
@@ -172,7 +174,10 @@ var ListItemWithAvatar = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
172
174
|
title: null,
|
|
173
175
|
customProps: ListItemProps
|
|
174
176
|
}, ContainerProps), name || imgSrc ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
175
|
-
className: _ListItemModule["default"].leftAvatar
|
|
177
|
+
className: "".concat(_ListItemModule["default"].leftAvatar, " ").concat(lhsAlignContent !== 'center' ? "".concat(_ListItemModule["default"].lhsBox) : '')
|
|
178
|
+
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
179
|
+
align: lhsAlignContent,
|
|
180
|
+
className: _ListItemModule["default"]["lhsBox_".concat(size)]
|
|
176
181
|
}, isTeam ? /*#__PURE__*/_react["default"].createElement(_AvatarTeam["default"], _extends({
|
|
177
182
|
name: name,
|
|
178
183
|
size: "small",
|
|
@@ -193,12 +198,18 @@ var ListItemWithAvatar = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
193
198
|
needTitle: needAvatarTitle,
|
|
194
199
|
palette: isDarkPalette ? 'info' : avatarPalette,
|
|
195
200
|
customClass: customAvatar
|
|
196
|
-
}, AvatarProps))) : null,
|
|
201
|
+
}, AvatarProps)))) : null, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
197
202
|
flexible: true,
|
|
198
|
-
shrink: true
|
|
203
|
+
shrink: true
|
|
204
|
+
}, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
205
|
+
alignBox: "column"
|
|
206
|
+
}, value ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
199
207
|
"data-title": isDisabled ? null : title,
|
|
200
208
|
className: needMultiLineText ? _ListItemModule["default"].multiLineValue : _ListItemModule["default"].value
|
|
201
|
-
}, value) : null,
|
|
209
|
+
}, value) : null, secondaryValue ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
210
|
+
"data-title": isDisabled ? null : secondaryValue,
|
|
211
|
+
className: "".concat(_ListItemModule["default"].secondaryField, " ").concat(needMultiLineText ? _ListItemModule["default"].multiLine : '')
|
|
212
|
+
}, secondaryValue) : null)), needTick && active ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
202
213
|
className: _ListItemModule["default"].tickIcon,
|
|
203
214
|
"aria-hidden": ariaHidden,
|
|
204
215
|
dataId: "".concat(dataIdString, "_tickIcon"),
|
|
@@ -116,7 +116,10 @@ var ListItemWithCheckBox = /*#__PURE__*/function (_React$Component) {
|
|
|
116
116
|
a11y = _this$props4.a11y,
|
|
117
117
|
customClass = _this$props4.customClass,
|
|
118
118
|
customProps = _this$props4.customProps,
|
|
119
|
-
needMultiLineText = _this$props4.needMultiLineText
|
|
119
|
+
needMultiLineText = _this$props4.needMultiLineText,
|
|
120
|
+
secondaryValue = _this$props4.secondaryValue,
|
|
121
|
+
lhsAlignContent = _this$props4.lhsAlignContent,
|
|
122
|
+
lhsJustifyContent = _this$props4.lhsJustifyContent;
|
|
120
123
|
|
|
121
124
|
var listA11y = _objectSpread({
|
|
122
125
|
role: 'option'
|
|
@@ -150,8 +153,11 @@ var ListItemWithCheckBox = /*#__PURE__*/function (_React$Component) {
|
|
|
150
153
|
title: null,
|
|
151
154
|
customProps: ListItemProps
|
|
152
155
|
}, ContainerProps), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
153
|
-
className: _ListItemModule["default"].iconBox,
|
|
156
|
+
className: "".concat(_ListItemModule["default"].iconBox, " ").concat(_ListItemModule["default"].lhsBox, " ").concat(_ListItemModule["default"]["lhsJustifyContent_".concat(lhsJustifyContent)]),
|
|
154
157
|
dataId: "".concat(dataId ? dataId : value, "_checkBox")
|
|
158
|
+
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
159
|
+
align: lhsAlignContent,
|
|
160
|
+
className: lhsAlignContent !== 'center' ? _ListItemModule["default"]["lhsBox_".concat(size)] : ''
|
|
155
161
|
}, /*#__PURE__*/_react["default"].createElement(_CheckBox["default"], {
|
|
156
162
|
checked: checked,
|
|
157
163
|
a11y: {
|
|
@@ -161,12 +167,18 @@ var ListItemWithCheckBox = /*#__PURE__*/function (_React$Component) {
|
|
|
161
167
|
customCheckBox: customCheckBox,
|
|
162
168
|
customLabel: customLabel
|
|
163
169
|
}
|
|
164
|
-
})), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
170
|
+
}))), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
165
171
|
flexible: true,
|
|
166
|
-
shrink: true
|
|
172
|
+
shrink: true
|
|
173
|
+
}, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
174
|
+
alignBox: "column"
|
|
175
|
+
}, value ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
167
176
|
"data-title": isDisabled ? null : title,
|
|
168
177
|
className: needMultiLineText ? _ListItemModule["default"].multiLineValue : _ListItemModule["default"].value
|
|
169
|
-
}, value)
|
|
178
|
+
}, value) : null, secondaryValue ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
179
|
+
"data-title": isDisabled ? null : secondaryValue,
|
|
180
|
+
className: "".concat(_ListItemModule["default"].secondaryField, " ").concat(needMultiLineText ? _ListItemModule["default"].multiLine : '')
|
|
181
|
+
}, secondaryValue) : null)));
|
|
170
182
|
}
|
|
171
183
|
}]);
|
|
172
184
|
|
|
@@ -124,7 +124,10 @@ var ListItemWithIcon = /*#__PURE__*/function (_React$Component) {
|
|
|
124
124
|
a11y = _this$props4.a11y,
|
|
125
125
|
customClass = _this$props4.customClass,
|
|
126
126
|
customProps = _this$props4.customProps,
|
|
127
|
-
needMultiLineText = _this$props4.needMultiLineText
|
|
127
|
+
needMultiLineText = _this$props4.needMultiLineText,
|
|
128
|
+
secondaryValue = _this$props4.secondaryValue,
|
|
129
|
+
lhsAlignContent = _this$props4.lhsAlignContent,
|
|
130
|
+
lhsJustifyContent = _this$props4.lhsJustifyContent;
|
|
128
131
|
var _customProps$ListItem = customProps.ListItemProps,
|
|
129
132
|
ListItemProps = _customProps$ListItem === void 0 ? {} : _customProps$ListItem,
|
|
130
133
|
_customProps$Containe = customProps.ContainerProps,
|
|
@@ -161,21 +164,31 @@ var ListItemWithIcon = /*#__PURE__*/function (_React$Component) {
|
|
|
161
164
|
customProps: ListItemProps
|
|
162
165
|
}, ContainerProps), iconName && /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
163
166
|
"aria-hidden": true,
|
|
164
|
-
|
|
167
|
+
align: lhsAlignContent,
|
|
168
|
+
className: "".concat(_ListItemModule["default"].iconBox, " ").concat(_ListItemModule["default"].lhsBox, " ").concat(_ListItemModule["default"]["lhsJustifyContent_".concat(lhsJustifyContent)]),
|
|
165
169
|
dataId: dataId ? "".concat(dataId, "_Icon") : "".concat(value.toLowerCase().replace("'", '_'), "_Icon")
|
|
170
|
+
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
171
|
+
align: lhsAlignContent,
|
|
172
|
+
className: lhsAlignContent !== 'center' ? _ListItemModule["default"]["lhsBox_".concat(size)] : ''
|
|
166
173
|
}, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
167
174
|
iconClass: iconClass,
|
|
168
175
|
name: iconName,
|
|
169
176
|
size: iconSize
|
|
170
|
-
})), iconClass && !iconName ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
177
|
+
}))), iconClass && !iconName ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
171
178
|
className: iconClass
|
|
172
|
-
}) : null,
|
|
179
|
+
}) : null, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
173
180
|
flexible: true,
|
|
174
|
-
shrink: true
|
|
181
|
+
shrink: true
|
|
182
|
+
}, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
183
|
+
alignBox: "column"
|
|
184
|
+
}, value ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
175
185
|
className: needMultiLineText ? _ListItemModule["default"].multiLineValue : _ListItemModule["default"].value,
|
|
176
186
|
"data-title": isDisabled ? null : title,
|
|
177
187
|
dataId: "".concat(dataIdString, "_Text")
|
|
178
|
-
}, value)
|
|
188
|
+
}, value) : null, secondaryValue ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
189
|
+
"data-title": isDisabled ? null : secondaryValue,
|
|
190
|
+
className: "".concat(_ListItemModule["default"].secondaryField, " ").concat(needMultiLineText ? _ListItemModule["default"].multiLine : '')
|
|
191
|
+
}, secondaryValue) : null)), needTick && active ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
179
192
|
className: _ListItemModule["default"].tickIcon,
|
|
180
193
|
"aria-hidden": ariaHidden,
|
|
181
194
|
dataId: "".concat(dataIdString, "_tickIcon"),
|
|
@@ -117,7 +117,10 @@ var ListItemWithRadio = /*#__PURE__*/function (_React$Component) {
|
|
|
117
117
|
a11y = _this$props4.a11y,
|
|
118
118
|
customClass = _this$props4.customClass,
|
|
119
119
|
customProps = _this$props4.customProps,
|
|
120
|
-
needMultiLineText = _this$props4.needMultiLineText
|
|
120
|
+
needMultiLineText = _this$props4.needMultiLineText,
|
|
121
|
+
secondaryValue = _this$props4.secondaryValue,
|
|
122
|
+
lhsAlignContent = _this$props4.lhsAlignContent,
|
|
123
|
+
lhsJustifyContent = _this$props4.lhsJustifyContent;
|
|
121
124
|
var _customProps$ListItem = customProps.ListItemProps,
|
|
122
125
|
ListItemProps = _customProps$ListItem === void 0 ? {} : _customProps$ListItem,
|
|
123
126
|
_customProps$Containe = customProps.ContainerProps,
|
|
@@ -151,8 +154,12 @@ var ListItemWithRadio = /*#__PURE__*/function (_React$Component) {
|
|
|
151
154
|
title: null,
|
|
152
155
|
customProps: ListItemProps
|
|
153
156
|
}, ContainerProps), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
154
|
-
|
|
157
|
+
align: lhsAlignContent,
|
|
158
|
+
className: "".concat(_ListItemModule["default"].iconBox, " ").concat(_ListItemModule["default"].lhsBox, " ").concat(_ListItemModule["default"]["lhsJustifyContent_".concat(lhsJustifyContent)]),
|
|
155
159
|
dataId: "".concat(dataId, "_radio")
|
|
160
|
+
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
161
|
+
align: lhsAlignContent,
|
|
162
|
+
className: lhsAlignContent !== 'center' ? _ListItemModule["default"]["lhsBox_".concat(size)] : ''
|
|
156
163
|
}, /*#__PURE__*/_react["default"].createElement(_Radio["default"], {
|
|
157
164
|
checked: checked,
|
|
158
165
|
id: id,
|
|
@@ -163,12 +170,18 @@ var ListItemWithRadio = /*#__PURE__*/function (_React$Component) {
|
|
|
163
170
|
customRadio: customRadio,
|
|
164
171
|
customRadioWrap: customRadioWrap
|
|
165
172
|
}
|
|
166
|
-
})), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
173
|
+
}))), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
167
174
|
flexible: true,
|
|
168
|
-
shrink: true
|
|
175
|
+
shrink: true
|
|
176
|
+
}, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
177
|
+
alignBox: "column"
|
|
178
|
+
}, value ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
169
179
|
"data-title": disableTitle ? null : title,
|
|
170
180
|
className: needMultiLineText ? _ListItemModule["default"].multiLineValue : _ListItemModule["default"].value
|
|
171
|
-
}, value)
|
|
181
|
+
}, value) : null, secondaryValue ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
182
|
+
"data-title": isDisabled ? null : secondaryValue,
|
|
183
|
+
className: "".concat(_ListItemModule["default"].secondaryField, " ").concat(needMultiLineText ? _ListItemModule["default"].multiLine : '')
|
|
184
|
+
}, secondaryValue) : null)));
|
|
172
185
|
}
|
|
173
186
|
}]);
|
|
174
187
|
|
|
@@ -15,4 +15,12 @@ describe('ListContainer', function () {
|
|
|
15
15
|
|
|
16
16
|
expect(asFragment()).toMatchSnapshot();
|
|
17
17
|
});
|
|
18
|
+
test('ListContainer with Align Base Line', function () {
|
|
19
|
+
var _render2 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_ListContainer["default"], {
|
|
20
|
+
align: 'baseline'
|
|
21
|
+
})),
|
|
22
|
+
asFragment = _render2.asFragment;
|
|
23
|
+
|
|
24
|
+
expect(asFragment()).toMatchSnapshot();
|
|
25
|
+
});
|
|
18
26
|
});
|
|
@@ -15,4 +15,39 @@ describe('ListItemWithAvatar', function () {
|
|
|
15
15
|
|
|
16
16
|
expect(asFragment()).toMatchSnapshot();
|
|
17
17
|
});
|
|
18
|
+
test('ListItemWithAvatar with secondaryValue', function () {
|
|
19
|
+
var _render2 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_ListItemWithAvatar["default"], {
|
|
20
|
+
secondaryValue: "secondaryValue"
|
|
21
|
+
})),
|
|
22
|
+
asFragment = _render2.asFragment;
|
|
23
|
+
|
|
24
|
+
expect(asFragment()).toMatchSnapshot();
|
|
25
|
+
});
|
|
26
|
+
test('ListItemWithAvatar with secondaryValue text and LHS align start', function () {
|
|
27
|
+
var _render3 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_ListItemWithAvatar["default"], {
|
|
28
|
+
secondaryValue: "secondaryValue",
|
|
29
|
+
lhsAlignContent: "start"
|
|
30
|
+
})),
|
|
31
|
+
asFragment = _render3.asFragment;
|
|
32
|
+
|
|
33
|
+
expect(asFragment()).toMatchSnapshot();
|
|
34
|
+
});
|
|
35
|
+
test('ListItemWithAvatar with secondaryValue text and LHS align center', function () {
|
|
36
|
+
var _render4 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_ListItemWithAvatar["default"], {
|
|
37
|
+
secondaryValue: "secondaryValue",
|
|
38
|
+
lhsAlignContent: "center"
|
|
39
|
+
})),
|
|
40
|
+
asFragment = _render4.asFragment;
|
|
41
|
+
|
|
42
|
+
expect(asFragment()).toMatchSnapshot();
|
|
43
|
+
});
|
|
44
|
+
test('ListItemWithAvatar with secondaryValue text and LHS align end', function () {
|
|
45
|
+
var _render5 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_ListItemWithAvatar["default"], {
|
|
46
|
+
secondaryValue: "secondaryValue",
|
|
47
|
+
lhsAlignContent: "end"
|
|
48
|
+
})),
|
|
49
|
+
asFragment = _render5.asFragment;
|
|
50
|
+
|
|
51
|
+
expect(asFragment()).toMatchSnapshot();
|
|
52
|
+
});
|
|
18
53
|
});
|
|
@@ -15,4 +15,39 @@ describe('ListItemWithCheckBox', function () {
|
|
|
15
15
|
|
|
16
16
|
expect(asFragment()).toMatchSnapshot();
|
|
17
17
|
});
|
|
18
|
+
test('ListItemWithCheckBox with secondaryValue', function () {
|
|
19
|
+
var _render2 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_ListItemWithCheckBox["default"], {
|
|
20
|
+
secondaryValue: "secondaryValue"
|
|
21
|
+
})),
|
|
22
|
+
asFragment = _render2.asFragment;
|
|
23
|
+
|
|
24
|
+
expect(asFragment()).toMatchSnapshot();
|
|
25
|
+
});
|
|
26
|
+
test('ListItemWithCheckBox with secondaryValue text and LHS align start', function () {
|
|
27
|
+
var _render3 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_ListItemWithCheckBox["default"], {
|
|
28
|
+
secondaryValue: "secondaryValue",
|
|
29
|
+
lhsAlignContent: "start"
|
|
30
|
+
})),
|
|
31
|
+
asFragment = _render3.asFragment;
|
|
32
|
+
|
|
33
|
+
expect(asFragment()).toMatchSnapshot();
|
|
34
|
+
});
|
|
35
|
+
test('ListItemWithCheckBox with secondaryValue text and LHS align center', function () {
|
|
36
|
+
var _render4 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_ListItemWithCheckBox["default"], {
|
|
37
|
+
secondaryValue: "secondaryValue",
|
|
38
|
+
lhsAlignContent: "center"
|
|
39
|
+
})),
|
|
40
|
+
asFragment = _render4.asFragment;
|
|
41
|
+
|
|
42
|
+
expect(asFragment()).toMatchSnapshot();
|
|
43
|
+
});
|
|
44
|
+
test('ListItemWithCheckBox with secondaryValue text and LHS align end', function () {
|
|
45
|
+
var _render5 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_ListItemWithCheckBox["default"], {
|
|
46
|
+
secondaryValue: "secondaryValue",
|
|
47
|
+
lhsAlignContent: "end"
|
|
48
|
+
})),
|
|
49
|
+
asFragment = _render5.asFragment;
|
|
50
|
+
|
|
51
|
+
expect(asFragment()).toMatchSnapshot();
|
|
52
|
+
});
|
|
18
53
|
});
|
|
@@ -15,4 +15,39 @@ describe('ListItemWithIcon', function () {
|
|
|
15
15
|
|
|
16
16
|
expect(asFragment()).toMatchSnapshot();
|
|
17
17
|
});
|
|
18
|
+
test('ListItemWithIcon with secondaryValue', function () {
|
|
19
|
+
var _render2 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_ListItemWithIcon["default"], {
|
|
20
|
+
secondaryValue: "secondaryValue"
|
|
21
|
+
})),
|
|
22
|
+
asFragment = _render2.asFragment;
|
|
23
|
+
|
|
24
|
+
expect(asFragment()).toMatchSnapshot();
|
|
25
|
+
});
|
|
26
|
+
test('ListItemWithIcon with secondaryValue text and LHS align start', function () {
|
|
27
|
+
var _render3 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_ListItemWithIcon["default"], {
|
|
28
|
+
secondaryValue: "secondaryValue",
|
|
29
|
+
lhsAlignContent: "start"
|
|
30
|
+
})),
|
|
31
|
+
asFragment = _render3.asFragment;
|
|
32
|
+
|
|
33
|
+
expect(asFragment()).toMatchSnapshot();
|
|
34
|
+
});
|
|
35
|
+
test('ListItemWithIcon with secondaryValue text and LHS align center', function () {
|
|
36
|
+
var _render4 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_ListItemWithIcon["default"], {
|
|
37
|
+
secondaryValue: "secondaryValue",
|
|
38
|
+
lhsAlignContent: "center"
|
|
39
|
+
})),
|
|
40
|
+
asFragment = _render4.asFragment;
|
|
41
|
+
|
|
42
|
+
expect(asFragment()).toMatchSnapshot();
|
|
43
|
+
});
|
|
44
|
+
test('ListItemWithIcon with secondaryValue text and LHS align end', function () {
|
|
45
|
+
var _render5 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_ListItemWithIcon["default"], {
|
|
46
|
+
secondaryValue: "secondaryValue",
|
|
47
|
+
lhsAlignContent: "end"
|
|
48
|
+
})),
|
|
49
|
+
asFragment = _render5.asFragment;
|
|
50
|
+
|
|
51
|
+
expect(asFragment()).toMatchSnapshot();
|
|
52
|
+
});
|
|
18
53
|
});
|
|
@@ -15,4 +15,39 @@ describe('ListItemWithRadio', function () {
|
|
|
15
15
|
|
|
16
16
|
expect(asFragment()).toMatchSnapshot();
|
|
17
17
|
});
|
|
18
|
+
test('ListItemWithRadio with secondaryValue', function () {
|
|
19
|
+
var _render2 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_ListItemWithRadio["default"], {
|
|
20
|
+
secondaryValue: "secondaryValue"
|
|
21
|
+
})),
|
|
22
|
+
asFragment = _render2.asFragment;
|
|
23
|
+
|
|
24
|
+
expect(asFragment()).toMatchSnapshot();
|
|
25
|
+
});
|
|
26
|
+
test('ListItemWithRadio with secondaryValue text and LHS align start', function () {
|
|
27
|
+
var _render3 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_ListItemWithRadio["default"], {
|
|
28
|
+
secondaryValue: "secondaryValue",
|
|
29
|
+
lhsAlignContent: "start"
|
|
30
|
+
})),
|
|
31
|
+
asFragment = _render3.asFragment;
|
|
32
|
+
|
|
33
|
+
expect(asFragment()).toMatchSnapshot();
|
|
34
|
+
});
|
|
35
|
+
test('ListItemWithRadio with secondaryValue text and LHS align center', function () {
|
|
36
|
+
var _render4 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_ListItemWithRadio["default"], {
|
|
37
|
+
secondaryValue: "secondaryValue",
|
|
38
|
+
lhsAlignContent: "center"
|
|
39
|
+
})),
|
|
40
|
+
asFragment = _render4.asFragment;
|
|
41
|
+
|
|
42
|
+
expect(asFragment()).toMatchSnapshot();
|
|
43
|
+
});
|
|
44
|
+
test('ListItemWithRadio with secondaryValue text and LHS align end', function () {
|
|
45
|
+
var _render5 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_ListItemWithRadio["default"], {
|
|
46
|
+
secondaryValue: "secondaryValue",
|
|
47
|
+
lhsAlignContent: "end"
|
|
48
|
+
})),
|
|
49
|
+
asFragment = _render5.asFragment;
|
|
50
|
+
|
|
51
|
+
expect(asFragment()).toMatchSnapshot();
|
|
52
|
+
});
|
|
18
53
|
});
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
+
exports[`ListContainer ListContainer with Align Base Line 1`] = `
|
|
4
|
+
<DocumentFragment>
|
|
5
|
+
<li
|
|
6
|
+
class="list medium default withBorder flex rowdir baseline"
|
|
7
|
+
data-a11y-inset-focus="true"
|
|
8
|
+
data-id="containerComponent"
|
|
9
|
+
data-selector-id="listContainer"
|
|
10
|
+
data-test-id="containerComponent"
|
|
11
|
+
tabindex="0"
|
|
12
|
+
/>
|
|
13
|
+
</DocumentFragment>
|
|
14
|
+
`;
|
|
15
|
+
|
|
3
16
|
exports[`ListContainer rendering the defult props 1`] = `
|
|
4
17
|
<DocumentFragment>
|
|
5
18
|
<li
|