@zohodesk/components 1.0.0-temp-259.4 → 1.0.0-temp-261
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/CHANGELOG.md +24 -0
- package/es/Avatar/Avatar.module.css +5 -11
- package/es/AvatarTeam/AvatarTeam.module.css +1 -3
- package/es/Button/css/Button.module.css +7 -9
- package/es/Card/Card.module.css +2 -2
- package/es/CheckBox/CheckBox.module.css +3 -5
- package/es/DateTime/DateTime.module.css +13 -20
- package/es/DateTime/DateWidget.js +1 -1
- package/es/DateTime/DateWidget.module.css +10 -5
- package/es/DateTime/YearView.module.css +6 -9
- package/es/DateTime/__tests__/__snapshots__/DateWidget.spec.js.snap +1 -1
- package/es/DividerLine/DividerLine.js +40 -0
- package/es/DividerLine/__tests__/DividerLine.spec.js +81 -0
- package/es/DividerLine/__tests__/__snapshots__/DividerLine.spec.js.snap +131 -0
- package/es/DividerLine/constants/index.js +29 -0
- package/es/DividerLine/css/DividerLine.module.css +52 -0
- package/es/DividerLine/css/cssJSLogic.js +1 -0
- package/es/DividerLine/css/dividerLine.cva.js +42 -0
- package/es/DividerLine/props/defaultProps.js +11 -0
- package/es/DividerLine/props/propTypes.js +19 -0
- package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +6 -7
- package/es/DropBox/css/DropBox.module.css +3 -3
- package/es/DropDown/DropDownHeading.module.css +1 -1
- package/es/DropDown/DropDownItem.module.css +3 -7
- package/es/DropDown/DropDownSeparator.js +9 -4
- package/es/DropDown/DropDownSeparator.module.css +0 -4
- package/es/DropDown/__tests__/DropDownSeparator.spec.js +8 -0
- package/es/DropDown/__tests__/__snapshots__/DropDownSeparator.spec.js.snap +12 -2
- package/es/Label/Label.module.css +3 -3
- package/es/ListItem/ListItem.module.css +9 -12
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +1 -0
- package/es/MultiSelect/AdvancedMultiSelect.js +1 -0
- package/es/MultiSelect/MobileHeader/MobileHeader.module.css +1 -1
- package/es/MultiSelect/MultiSelect.module.css +13 -20
- package/es/MultiSelect/SelectedOptions.js +3 -3
- package/es/MultiSelect/SelectedOptions.module.css +1 -1
- package/es/MultiSelect/__tests__/AdvancedGroupMultiSelect.spec.js +42 -0
- package/es/MultiSelect/__tests__/AdvancedMultiSelect.spec.js +10 -0
- package/es/MultiSelect/__tests__/MultiSelect.spec.js +10 -0
- package/es/MultiSelect/__tests__/__snapshots__/AdvancedGroupMultiSelect.spec.js.snap +121 -0
- package/es/MultiSelect/__tests__/__snapshots__/AdvancedMultiSelect.spec.js.snap +97 -0
- package/es/MultiSelect/__tests__/__snapshots__/MultiSelect.spec.js.snap +157 -0
- package/es/PopOver/PopOver.module.css +2 -2
- package/es/Radio/Radio.module.css +7 -7
- package/es/Ribbon/Ribbon.module.css +12 -19
- package/es/RippleEffect/RippleEffect.module.css +2 -2
- package/es/Select/Select.module.css +4 -4
- package/es/Select/SelectWithAvatar.js +14 -3
- package/es/Select/SelectWithIcon.js +23 -1
- package/es/Select/__tests__/SelectWithAvatar.spec.js +17 -0
- package/es/Select/__tests__/SelectWithIcon.spec.js +18 -0
- package/es/Select/__tests__/__snapshots__/SelectWithAvatar.spec.js.snap +47 -0
- package/es/Select/__tests__/__snapshots__/SelectWithIcon.spec.js.snap +19 -0
- package/es/Select/props/propTypes.js +1 -0
- package/es/Switch/Switch.module.css +4 -7
- package/es/Tab/Tab.module.css +5 -7
- package/es/Tab/TabContent.module.css +1 -1
- package/es/Tab/Tabs.module.css +8 -9
- package/es/Tag/Tag.module.css +4 -7
- package/es/TextBoxIcon/TextBoxIcon.module.css +1 -1
- package/es/Textarea/Textarea.module.css +3 -4
- package/es/Tooltip/Tooltip.js +4 -1
- package/es/Tooltip/Tooltip.module.css +3 -6
- package/es/Typography/__tests__/Typography.spec.js +1 -1
- package/es/Typography/__tests__/__snapshots__/Typography.spec.js.snap +40 -0
- package/es/Typography/css/Typography.module.css +30 -30
- package/es/Typography/props/propTypes.js +1 -1
- package/es/common/animation.module.css +8 -8
- package/es/common/basic.module.css +5 -5
- package/es/common/common.module.css +81 -153
- package/es/common/transition.module.css +2 -0
- package/es/semantic/Button/semanticButton.module.css +1 -4
- package/es/shared/InputFieldLine/InputFieldLine.module.css +1 -1
- package/es/v1/Button/__tests__/__snapshots__/Button.spec.js.snap +1 -1
- package/es/v1/Button/css/Button_v1.module.css +2 -2
- package/es/v1/Label/css/Label_v1.module.css +1 -1
- package/es/v1/Switch/css/Switch_v1.module.css +4 -7
- package/es/v1/shared/Spinner/Spinner_v1.module.css +3 -5
- package/es/v1/shared/SuccessTick/SuccessTick_v1.module.css +1 -2
- package/lib/Avatar/Avatar.module.css +5 -11
- package/lib/AvatarTeam/AvatarTeam.module.css +1 -3
- package/lib/Button/css/Button.module.css +7 -9
- package/lib/Card/Card.module.css +2 -2
- package/lib/CheckBox/CheckBox.module.css +3 -5
- package/lib/DateTime/DateTime.module.css +13 -20
- package/lib/DateTime/DateWidget.js +1 -1
- package/lib/DateTime/DateWidget.module.css +10 -5
- package/lib/DateTime/YearView.module.css +6 -9
- package/lib/DateTime/__tests__/__snapshots__/DateWidget.spec.js.snap +1 -1
- package/lib/DividerLine/DividerLine.js +50 -0
- package/lib/DividerLine/__tests__/DividerLine.spec.js +88 -0
- package/lib/DividerLine/__tests__/__snapshots__/DividerLine.spec.js.snap +131 -0
- package/lib/DividerLine/constants/index.js +39 -0
- package/lib/DividerLine/css/DividerLine.module.css +52 -0
- package/lib/DividerLine/css/cssJSLogic.js +13 -0
- package/lib/DividerLine/css/dividerLine.cva.js +57 -0
- package/lib/DividerLine/props/defaultProps.js +21 -0
- package/lib/DividerLine/props/propTypes.js +31 -0
- package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +6 -7
- package/lib/DropBox/css/DropBox.module.css +3 -3
- package/lib/DropDown/DropDownHeading.module.css +1 -1
- package/lib/DropDown/DropDownItem.module.css +3 -7
- package/lib/DropDown/DropDownSeparator.js +9 -4
- package/lib/DropDown/DropDownSeparator.module.css +0 -4
- package/lib/DropDown/__tests__/DropDownSeparator.spec.js +8 -0
- package/lib/DropDown/__tests__/__snapshots__/DropDownSeparator.spec.js.snap +12 -2
- package/lib/Label/Label.module.css +3 -3
- package/lib/ListItem/ListItem.module.css +9 -12
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +1 -0
- package/lib/MultiSelect/AdvancedMultiSelect.js +1 -0
- package/lib/MultiSelect/MobileHeader/MobileHeader.module.css +1 -1
- package/lib/MultiSelect/MultiSelect.module.css +13 -20
- package/lib/MultiSelect/SelectedOptions.js +3 -3
- package/lib/MultiSelect/SelectedOptions.module.css +1 -1
- package/lib/MultiSelect/__tests__/AdvancedGroupMultiSelect.spec.js +42 -0
- package/lib/MultiSelect/__tests__/AdvancedMultiSelect.spec.js +10 -0
- package/lib/MultiSelect/__tests__/MultiSelect.spec.js +10 -0
- package/lib/MultiSelect/__tests__/__snapshots__/AdvancedGroupMultiSelect.spec.js.snap +121 -0
- package/lib/MultiSelect/__tests__/__snapshots__/AdvancedMultiSelect.spec.js.snap +97 -0
- package/lib/MultiSelect/__tests__/__snapshots__/MultiSelect.spec.js.snap +157 -0
- package/lib/PopOver/PopOver.module.css +2 -2
- package/lib/Radio/Radio.module.css +7 -7
- package/lib/Ribbon/Ribbon.module.css +12 -19
- package/lib/RippleEffect/RippleEffect.module.css +2 -2
- package/lib/Select/Select.module.css +4 -4
- package/lib/Select/SelectWithAvatar.js +15 -3
- package/lib/Select/SelectWithIcon.js +26 -1
- package/lib/Select/__tests__/SelectWithAvatar.spec.js +20 -0
- package/lib/Select/__tests__/SelectWithIcon.spec.js +21 -0
- package/lib/Select/__tests__/__snapshots__/SelectWithAvatar.spec.js.snap +47 -0
- package/lib/Select/__tests__/__snapshots__/SelectWithIcon.spec.js.snap +19 -0
- package/lib/Select/props/propTypes.js +1 -0
- package/lib/Switch/Switch.module.css +4 -7
- package/lib/Tab/Tab.module.css +5 -7
- package/lib/Tab/TabContent.module.css +1 -1
- package/lib/Tab/Tabs.module.css +8 -9
- package/lib/Tag/Tag.module.css +4 -7
- package/lib/TextBoxIcon/TextBoxIcon.module.css +1 -1
- package/lib/Textarea/Textarea.module.css +3 -4
- package/lib/Tooltip/Tooltip.js +6 -1
- package/lib/Tooltip/Tooltip.module.css +3 -6
- package/lib/Typography/__tests__/Typography.spec.js +1 -1
- package/lib/Typography/__tests__/__snapshots__/Typography.spec.js.snap +40 -0
- package/lib/Typography/css/Typography.module.css +30 -30
- package/lib/Typography/props/propTypes.js +1 -1
- package/lib/common/animation.module.css +8 -8
- package/lib/common/basic.module.css +5 -5
- package/lib/common/common.module.css +81 -153
- package/lib/common/transition.module.css +2 -0
- package/lib/semantic/Button/semanticButton.module.css +1 -4
- package/lib/shared/InputFieldLine/InputFieldLine.module.css +1 -1
- package/lib/v1/Button/__tests__/__snapshots__/Button.spec.js.snap +1 -1
- package/lib/v1/Button/css/Button_v1.module.css +2 -2
- package/lib/v1/Label/css/Label_v1.module.css +1 -1
- package/lib/v1/Switch/css/Switch_v1.module.css +4 -7
- package/lib/v1/shared/Spinner/Spinner_v1.module.css +3 -5
- package/lib/v1/shared/SuccessTick/SuccessTick_v1.module.css +1 -2
- package/package.json +13 -12
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.input {
|
|
2
|
-
|
|
2
|
+
composes: d-cursor-pointer from global;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
.small {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.container {
|
|
38
|
-
|
|
38
|
+
composes: d-relative from global;
|
|
39
39
|
}
|
|
40
40
|
/* css:lineheight-validation:ignore */
|
|
41
41
|
.arrowIcon {
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
.leftIcon {
|
|
94
|
-
|
|
94
|
+
composes: d-absolute from global;
|
|
95
95
|
top: 0 ;
|
|
96
96
|
bottom: 0 ;
|
|
97
97
|
width: var(--zd_size30) ;
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
transform: rotateX(180deg);
|
|
124
124
|
}
|
|
125
125
|
.rightPlaceholder{
|
|
126
|
-
|
|
126
|
+
composes: d-h-full from global;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
.iconOnHoverStyle .arrowIcon,
|
|
@@ -41,6 +41,8 @@ var _CustomResponsive = require("../Responsive/CustomResponsive");
|
|
|
41
41
|
|
|
42
42
|
var _Loader = _interopRequireDefault(require("@zohodesk/svg/lib/Loader/Loader"));
|
|
43
43
|
|
|
44
|
+
var _utils = require("@zohodesk/utils");
|
|
45
|
+
|
|
44
46
|
var _cssUtility = require("@dot-system/css-utility");
|
|
45
47
|
|
|
46
48
|
var _MultiSelectModule = _interopRequireDefault(require("../MultiSelect/MultiSelect.module.css"));
|
|
@@ -227,7 +229,8 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
227
229
|
dataSelectorId = _this$props.dataSelectorId,
|
|
228
230
|
getTargetRef = _this$props.getTargetRef,
|
|
229
231
|
customProps = _this$props.customProps,
|
|
230
|
-
customClass = _this$props.customClass
|
|
232
|
+
customClass = _this$props.customClass,
|
|
233
|
+
renderCustomSelectedValue = _this$props.renderCustomSelectedValue;
|
|
231
234
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
232
235
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
233
236
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
|
|
@@ -269,7 +272,16 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
269
272
|
className: "".concat(_MultiSelectModule["default"].container, " ").concat(_MultiSelectModule["default"][size], " ").concat(_MultiSelectModule["default"]["borderColor_".concat(borderColor)], " ").concat(isActive && needBorder ? _MultiSelectModule["default"].active : '', " ").concat(needBorder ? _MultiSelectModule["default"].hasBorder : '', " ").concat(textBoxClass ? textBoxClass : ''),
|
|
270
273
|
eleRef: getTargetRef,
|
|
271
274
|
onClick: !isDisabled && this.togglePopup
|
|
272
|
-
}, selectedId ? /*#__PURE__*/_react["default"].createElement(
|
|
275
|
+
}, selectedId ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, (0, _utils.isRenderable)(renderCustomSelectedValue) ? (0, _utils.renderNode)(renderCustomSelectedValue, {
|
|
276
|
+
avatarPalette: avatarPalette,
|
|
277
|
+
id: id,
|
|
278
|
+
imageURL: photoURL,
|
|
279
|
+
onRemove: onRemove,
|
|
280
|
+
text: text,
|
|
281
|
+
dataId: "".concat(dataId, "_SelectTag"),
|
|
282
|
+
isReadOnly: isReadOnly,
|
|
283
|
+
isDisabled: isDisabled
|
|
284
|
+
}) : /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
273
285
|
className: _MultiSelectModule["default"].tag,
|
|
274
286
|
"data-id": "".concat(dataId, "_SelectTag"),
|
|
275
287
|
"data-test-id": "".concat(dataId, "_SelectTag"),
|
|
@@ -284,7 +296,7 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
284
296
|
text: text,
|
|
285
297
|
disabled: isReadOnly || isDisabled,
|
|
286
298
|
size: tagSize
|
|
287
|
-
})) : null, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
299
|
+
}))) : null, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
288
300
|
flexible: true,
|
|
289
301
|
className: _MultiSelectModule["default"].textBox,
|
|
290
302
|
dataId: "".concat(dataId, "_textBox")
|
|
@@ -39,6 +39,8 @@ var _Common = require("../utils/Common.js");
|
|
|
39
39
|
|
|
40
40
|
var _dropDownUtils = require("../utils/dropDownUtils.js");
|
|
41
41
|
|
|
42
|
+
var _utils = require("@zohodesk/utils");
|
|
43
|
+
|
|
42
44
|
var _cssUtility = require("@dot-system/css-utility");
|
|
43
45
|
|
|
44
46
|
var _SelectModule = _interopRequireDefault(require("./Select.module.css"));
|
|
@@ -426,6 +428,7 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
426
428
|
dropBoxSize = _this$props7.dropBoxSize,
|
|
427
429
|
emptyMessage = _this$props7.emptyMessage,
|
|
428
430
|
renderCustomEmptyState = _this$props7.renderCustomEmptyState,
|
|
431
|
+
renderCustomSelectedValue = _this$props7.renderCustomSelectedValue,
|
|
429
432
|
needIcon = _this$props7.needIcon,
|
|
430
433
|
iconName = _this$props7.iconName,
|
|
431
434
|
iconSize = _this$props7.iconSize,
|
|
@@ -471,7 +474,29 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
471
474
|
ref: getTargetRef,
|
|
472
475
|
"data-id": "".concat(isDisabled ? "".concat(dataId, "_disabled") : isReadOnly ? "".concat(dataId, "_readOnly") : dataId),
|
|
473
476
|
"data-test-id": "".concat(isDisabled ? "".concat(dataId, "_disabled") : isReadOnly ? "".concat(dataId, "_readOnly") : dataId)
|
|
474
|
-
},
|
|
477
|
+
}, (0, _utils.isRenderable)(renderCustomSelectedValue) ? (0, _utils.renderNode)(renderCustomSelectedValue, {
|
|
478
|
+
iconName: iconName,
|
|
479
|
+
iconSize: iconSize,
|
|
480
|
+
iconClass: iconClass,
|
|
481
|
+
needIcon: needIcon,
|
|
482
|
+
isDisabled: isDisabled,
|
|
483
|
+
isReadOnly: isReadOnly,
|
|
484
|
+
isPopupOpen: isPopupOpen,
|
|
485
|
+
isActive: isPopupReady,
|
|
486
|
+
size: size,
|
|
487
|
+
option: this.props.options.find(function (option) {
|
|
488
|
+
return option[idKey] === selectedId;
|
|
489
|
+
}) || DUMMY_OBJECT,
|
|
490
|
+
selectedId: selectedId,
|
|
491
|
+
selectedValue: selectedValue,
|
|
492
|
+
placeHolder: placeHolder,
|
|
493
|
+
htmlId: htmlId,
|
|
494
|
+
maxLength: maxLength,
|
|
495
|
+
dataId: dataId,
|
|
496
|
+
getRef: this.inputRef,
|
|
497
|
+
onKeyDown: this.handleKeyDown,
|
|
498
|
+
ariaControlsId: setAriaId
|
|
499
|
+
}) : /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
475
500
|
alignBox: "row"
|
|
476
501
|
}, needIcon ? /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
477
502
|
align: "both",
|
|
@@ -17,4 +17,24 @@ describe('SelectWithAvatar', function () {
|
|
|
17
17
|
|
|
18
18
|
expect(asFragment()).toMatchSnapshot();
|
|
19
19
|
});
|
|
20
|
+
test('Should render with renderCustomSelectedValue', function () {
|
|
21
|
+
var options = [{
|
|
22
|
+
id: '1',
|
|
23
|
+
text: 'Option 1'
|
|
24
|
+
}, {
|
|
25
|
+
id: '2',
|
|
26
|
+
text: 'Option 2'
|
|
27
|
+
}];
|
|
28
|
+
|
|
29
|
+
var _render2 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_SelectWithAvatar["default"], {
|
|
30
|
+
options: options,
|
|
31
|
+
selectedValue: "1",
|
|
32
|
+
renderCustomSelectedValue: function renderCustomSelectedValue(tagProps) {
|
|
33
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, tagProps.text, " - Custom Tag");
|
|
34
|
+
}
|
|
35
|
+
})),
|
|
36
|
+
asFragment = _render2.asFragment;
|
|
37
|
+
|
|
38
|
+
expect(asFragment()).toMatchSnapshot();
|
|
39
|
+
});
|
|
20
40
|
});
|
|
@@ -19,4 +19,25 @@ describe('SelectWithIcon', function () {
|
|
|
19
19
|
|
|
20
20
|
expect(asFragment()).toMatchSnapshot();
|
|
21
21
|
});
|
|
22
|
+
test('Should render with renderCustomSelectedValue', function () {
|
|
23
|
+
var options = [{
|
|
24
|
+
id: '1',
|
|
25
|
+
value: 'Option 1'
|
|
26
|
+
}, {
|
|
27
|
+
id: '2',
|
|
28
|
+
value: 'Option 2'
|
|
29
|
+
}];
|
|
30
|
+
|
|
31
|
+
var _render2 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_SelectWithIcon["default"], {
|
|
32
|
+
options: options,
|
|
33
|
+
selectedId: "1",
|
|
34
|
+
selectedValue: "Option 1",
|
|
35
|
+
renderCustomSelectedValue: function renderCustomSelectedValue(valueProps) {
|
|
36
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, valueProps.selectedValue, " - Custom Value");
|
|
37
|
+
}
|
|
38
|
+
})),
|
|
39
|
+
asFragment = _render2.asFragment;
|
|
40
|
+
|
|
41
|
+
expect(asFragment()).toMatchSnapshot();
|
|
42
|
+
});
|
|
22
43
|
});
|
|
@@ -1,5 +1,52 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
2
|
|
|
3
|
+
exports[`SelectWithAvatar Should render with renderCustomSelectedValue 1`] = `
|
|
4
|
+
<DocumentFragment>
|
|
5
|
+
<div
|
|
6
|
+
class="wrapper effect"
|
|
7
|
+
data-id="selectWithAvatar"
|
|
8
|
+
data-selector-id="selectWithAvatar"
|
|
9
|
+
data-test-id="selectWithAvatar"
|
|
10
|
+
>
|
|
11
|
+
<div
|
|
12
|
+
class="d-flex d-h-full d-w-full d-flex-row d-items-center container medium borderColor_default hasBorder"
|
|
13
|
+
data-id="containerComponent"
|
|
14
|
+
data-selector-id="container"
|
|
15
|
+
data-test-id="containerComponent"
|
|
16
|
+
>
|
|
17
|
+
<div>
|
|
18
|
+
Option 1 - Custom Tag
|
|
19
|
+
</div>
|
|
20
|
+
<div
|
|
21
|
+
class="d-min-h-0 d-min-w-0 d-flex-grow d-basis-0 d-flex-shrink-0"
|
|
22
|
+
data-id="selectWithAvatar_textBox"
|
|
23
|
+
data-selector-id="box"
|
|
24
|
+
data-test-id="selectWithAvatar_textBox"
|
|
25
|
+
>
|
|
26
|
+
<input
|
|
27
|
+
aria-activedescendant="1"
|
|
28
|
+
aria-controls="1"
|
|
29
|
+
aria-expanded="false"
|
|
30
|
+
aria-haspopup="true"
|
|
31
|
+
aria-owns="1"
|
|
32
|
+
aria-readonly="true"
|
|
33
|
+
autocomplete="off"
|
|
34
|
+
class="pointer container medium default effect borderColor_default"
|
|
35
|
+
data-id="textBox"
|
|
36
|
+
data-selector-id="textBox"
|
|
37
|
+
data-test-id="textBox"
|
|
38
|
+
placeholder=""
|
|
39
|
+
readonly=""
|
|
40
|
+
role="combobox"
|
|
41
|
+
type="text"
|
|
42
|
+
value=""
|
|
43
|
+
/>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</DocumentFragment>
|
|
48
|
+
`;
|
|
49
|
+
|
|
3
50
|
exports[`SelectWithAvatar rendering the defult props 1`] = `
|
|
4
51
|
<DocumentFragment>
|
|
5
52
|
<div
|
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
2
|
|
|
3
|
+
exports[`SelectWithIcon Should render with renderCustomSelectedValue 1`] = `
|
|
4
|
+
<DocumentFragment>
|
|
5
|
+
<div
|
|
6
|
+
class="container box_medium"
|
|
7
|
+
data-selector-id="selectWithIcon"
|
|
8
|
+
>
|
|
9
|
+
<div
|
|
10
|
+
class=""
|
|
11
|
+
data-id="selectWithIcon"
|
|
12
|
+
data-test-id="selectWithIcon"
|
|
13
|
+
>
|
|
14
|
+
<div>
|
|
15
|
+
Option 1 - Custom Value
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</DocumentFragment>
|
|
20
|
+
`;
|
|
21
|
+
|
|
3
22
|
exports[`SelectWithIcon rendering the defult props 1`] = `
|
|
4
23
|
<DocumentFragment>
|
|
5
24
|
<div
|
|
@@ -350,6 +350,7 @@ var SelectWithIcon_propTypes = {
|
|
|
350
350
|
boxSize: _propTypes["default"].string,
|
|
351
351
|
emptyMessage: _propTypes["default"].string,
|
|
352
352
|
renderCustomEmptyState: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].node]),
|
|
353
|
+
renderCustomSelectedValue: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].node]),
|
|
353
354
|
isAbsolutePositioningNeeded: _propTypes["default"].bool,
|
|
354
355
|
isRestrictScroll: _propTypes["default"].bool,
|
|
355
356
|
positionsOffset: _propTypes["default"].object,
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
.container {
|
|
13
13
|
composes: varClass;
|
|
14
|
-
|
|
14
|
+
composes: d-align-middle from global;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.disabled {
|
|
@@ -23,12 +23,10 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.label {
|
|
26
|
-
|
|
27
|
-
position: relative;
|
|
26
|
+
composes: d-inline-block d-relative d-cursor-pointer from global;
|
|
28
27
|
transition: box-shadow var(--zd_transition3) ease-in-out;
|
|
29
28
|
background-color: var(--switch_off_bg_color);
|
|
30
29
|
border-radius: 20px;
|
|
31
|
-
cursor: pointer;
|
|
32
30
|
}
|
|
33
31
|
|
|
34
32
|
.effect:hover .label
|
|
@@ -57,7 +55,7 @@
|
|
|
57
55
|
}
|
|
58
56
|
|
|
59
57
|
.input {
|
|
60
|
-
|
|
58
|
+
composes: d-hidden from global;
|
|
61
59
|
}
|
|
62
60
|
|
|
63
61
|
.small {
|
|
@@ -99,9 +97,8 @@
|
|
|
99
97
|
}
|
|
100
98
|
|
|
101
99
|
.switch {
|
|
102
|
-
display: inline-block;
|
|
103
100
|
composes: offSelection from '../common/common.module.css';
|
|
104
|
-
|
|
101
|
+
composes: d-inline-block d-align-middle from global;
|
|
105
102
|
}
|
|
106
103
|
|
|
107
104
|
.switch_small {
|
package/lib/Tab/Tab.module.css
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
.tab {
|
|
2
|
-
|
|
2
|
+
composes: d-uppercase d-cursor-pointer from global;
|
|
3
3
|
letter-spacing: 0.6px;
|
|
4
4
|
text-decoration: none;
|
|
5
|
-
cursor: pointer;
|
|
6
5
|
}
|
|
7
6
|
.vertical {
|
|
8
|
-
|
|
7
|
+
composes: d-h-full from global;
|
|
9
8
|
}
|
|
10
9
|
.horizontal {
|
|
11
|
-
|
|
12
|
-
max-width: 100% ;
|
|
10
|
+
composes: d-w-full d-max-w-full from global;
|
|
13
11
|
}
|
|
14
12
|
.textContainer,
|
|
15
13
|
.tabText {
|
|
@@ -19,7 +17,7 @@
|
|
|
19
17
|
composes: dotted from '../common/common.module.css';
|
|
20
18
|
}
|
|
21
19
|
.disabled {
|
|
22
|
-
|
|
20
|
+
composes: d-cursor-not-allowed from global;
|
|
23
21
|
}
|
|
24
22
|
.border {
|
|
25
23
|
border-bottom: 1px solid var(--zdt_tab_default_border);
|
|
@@ -55,12 +53,12 @@
|
|
|
55
53
|
border-color: var(--zdt_tab_delta_active_border);
|
|
56
54
|
}
|
|
57
55
|
.beta {
|
|
56
|
+
composes: d-capitalize from global;
|
|
58
57
|
padding-inline: var(--zd_size4) ;
|
|
59
58
|
padding-block:0 ;
|
|
60
59
|
font-size: var(--zd_font_size14) ;
|
|
61
60
|
line-height: 4.2857;
|
|
62
61
|
margin-inline-end: var(--zd_size40) ;
|
|
63
|
-
text-transform: capitalize;
|
|
64
62
|
}
|
|
65
63
|
.tabBeta {
|
|
66
64
|
composes: beta;
|
package/lib/Tab/Tabs.module.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.tab {
|
|
2
|
-
|
|
2
|
+
composes: d-relative from global;
|
|
3
3
|
z-index: 1;
|
|
4
4
|
--tab_position_gap: 22px;
|
|
5
5
|
}
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.alpha_border {
|
|
17
|
+
composes: d-border-solid from global;
|
|
17
18
|
border-width: 0 0 1px 0;
|
|
18
19
|
border-color: var(--zdt_tabs_alpha_border);
|
|
19
|
-
border-style: solid;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
.alpha::after {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
width: 100% ;
|
|
46
46
|
height: 100% ;
|
|
47
47
|
top: 0 ;
|
|
48
|
-
background: inherit;
|
|
48
|
+
background-color: inherit;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
[dir=ltr] .alpha:before {
|
|
@@ -87,11 +87,11 @@
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
.maxWidth {
|
|
90
|
-
max-
|
|
90
|
+
composes: d-max-w-full from global;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
.highlight {
|
|
94
|
-
|
|
94
|
+
composes: d-absolute from global;
|
|
95
95
|
bottom: 0 ;
|
|
96
96
|
border-bottom: 1px solid var(--zdt_tabs_highlight_border);
|
|
97
97
|
}
|
|
@@ -101,8 +101,7 @@
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
.menu {
|
|
104
|
-
|
|
105
|
-
cursor: pointer;
|
|
104
|
+
composes: d-relative d-cursor-pointer from global;
|
|
106
105
|
}
|
|
107
106
|
|
|
108
107
|
.menuBox {
|
|
@@ -121,7 +120,7 @@
|
|
|
121
120
|
}
|
|
122
121
|
|
|
123
122
|
.hidden {
|
|
124
|
-
|
|
123
|
+
composes: d-invisible from global;
|
|
125
124
|
}
|
|
126
125
|
|
|
127
126
|
.search {
|
|
@@ -134,11 +133,11 @@
|
|
|
134
133
|
}
|
|
135
134
|
|
|
136
135
|
.emptyStateTitle {
|
|
136
|
+
composes: d-text-center from global;
|
|
137
137
|
font-weight: var(--zd-fw-semibold);
|
|
138
138
|
word-wrap: break-word;
|
|
139
139
|
font-size: var(--zd_font_size16) ;
|
|
140
140
|
max-width: var(--zd_size430) ;
|
|
141
|
-
text-align: center;
|
|
142
141
|
}
|
|
143
142
|
|
|
144
143
|
[dir=ltr] .emptyStateTitle {
|
package/lib/Tag/Tag.module.css
CHANGED
|
@@ -32,13 +32,11 @@
|
|
|
32
32
|
.container {
|
|
33
33
|
composes: varClass;
|
|
34
34
|
composes: dInflex alignVertical flexrow from '../common/common.module.css';
|
|
35
|
-
|
|
36
|
-
vertical-align: middle;
|
|
35
|
+
composes: d-relative d-max-w-full d-align-middle from global;
|
|
37
36
|
color: var(--tag_text_color);
|
|
38
37
|
font-size: var(--tag_font_size);
|
|
39
38
|
letter-spacing: var(--tag_letter_spacing);
|
|
40
39
|
height: var(--tag_height);
|
|
41
|
-
max-width: 100% ;
|
|
42
40
|
background-color: var(--tag_bg_color);
|
|
43
41
|
border-radius: var(--tag_border_radius);
|
|
44
42
|
border-width: var(--tag_border_width);
|
|
@@ -48,7 +46,7 @@
|
|
|
48
46
|
cursor: var(--tag_cursor);
|
|
49
47
|
}
|
|
50
48
|
.disabled {
|
|
51
|
-
pointer-events
|
|
49
|
+
composes: d-pointer-events-none from global;
|
|
52
50
|
--tag_text_color: var(--zdt_tag_disabled_text);
|
|
53
51
|
}
|
|
54
52
|
.readonly,
|
|
@@ -123,15 +121,14 @@
|
|
|
123
121
|
display: block;
|
|
124
122
|
}
|
|
125
123
|
.close {
|
|
124
|
+
composes: d-hidden d-absolute from global;
|
|
126
125
|
color: var(--tag_closeicon_color);
|
|
127
|
-
display: none;
|
|
128
|
-
position: absolute;
|
|
129
126
|
top: 0 ;
|
|
130
127
|
bottom: 0 ;
|
|
131
128
|
padding: var(--tag_closeicon_padding);
|
|
132
129
|
cursor: var(--tag_closeicon_cursor);
|
|
133
130
|
border-radius: var(--tag_closeicon_border_radius);
|
|
134
|
-
background: var(--tag_closeicon_bg_color);
|
|
131
|
+
background-color: var(--tag_closeicon_bg_color);
|
|
135
132
|
}
|
|
136
133
|
[dir=ltr] .close {
|
|
137
134
|
right: 0 ;
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
}
|
|
16
16
|
.basic {
|
|
17
17
|
composes: varClass;
|
|
18
|
+
composes: d-outline-0 from global;
|
|
18
19
|
-webkit-appearance: none;
|
|
19
20
|
-moz-appearance: none;
|
|
20
21
|
appearance: none;
|
|
21
|
-
outline: 0;
|
|
22
22
|
letter-spacing: 0.1px;
|
|
23
23
|
color: var(--textarea_text_color);
|
|
24
24
|
cursor: var(--textarea_cursor);
|
|
@@ -60,19 +60,18 @@
|
|
|
60
60
|
/* css:lineheight-validation:ignore */
|
|
61
61
|
.container {
|
|
62
62
|
composes: basic;
|
|
63
|
+
composes: d-max-w-full d-border-solid from global;
|
|
63
64
|
transition: border var(--zd_transition2) linear 0s,
|
|
64
65
|
height var(--zd_transition2) linear 0s;
|
|
65
66
|
-moz-transition: border var(--zd_transition2) linear 0s,
|
|
66
67
|
height var(--zd_transition2) linear 0s;
|
|
67
68
|
width: var(--textarea_width);
|
|
68
|
-
max-width: 100% ;
|
|
69
69
|
min-width: var(--zd_size100) ;
|
|
70
70
|
font-size: var(--textarea_font_size);
|
|
71
71
|
line-height: var(--textarea_line_height);
|
|
72
72
|
height: var(--textarea_height);
|
|
73
73
|
-webkit-transition: border var(--zd_transition2) linear 0s,
|
|
74
74
|
height var(--zd_transition2) linear 0s;
|
|
75
|
-
border-style: solid;
|
|
76
75
|
background-color: var(--zdt_textarea_default_bg);
|
|
77
76
|
border-color: var(--textarea_border_color);
|
|
78
77
|
padding: var(--textarea_padding);
|
|
@@ -101,7 +100,7 @@
|
|
|
101
100
|
}
|
|
102
101
|
.xsmall,
|
|
103
102
|
.xmedium {
|
|
104
|
-
|
|
103
|
+
composes: d-align-middle from global;
|
|
105
104
|
}
|
|
106
105
|
.xsmall {
|
|
107
106
|
--textarea_font_size: var(--zd_font_size14);
|
package/lib/Tooltip/Tooltip.js
CHANGED
|
@@ -197,7 +197,12 @@ var Tooltip = /*#__PURE__*/function (_React$Component) {
|
|
|
197
197
|
|
|
198
198
|
var containerElement = this.tooltipContainerEl;
|
|
199
199
|
var element = e.target;
|
|
200
|
-
|
|
200
|
+
|
|
201
|
+
var hasTitleValue = function hasTitleValue(el) {
|
|
202
|
+
return el.hasAttribute('data-title') && el.getAttribute('data-title') !== '' || el.hasAttribute('title') && el.getAttribute('title') !== '';
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
var titleDiv = hasTitleValue(element) ? element : element.closest('[data-title]:not([data-title=""])') || element.closest('[title]:not([title=""])');
|
|
201
206
|
|
|
202
207
|
if (titleDiv) {
|
|
203
208
|
var title = titleDiv.getAttribute('data-title') || titleDiv.getAttribute('title');
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
.tooltiptext {
|
|
2
|
-
|
|
2
|
+
composes: d-fixed d-pointer-events-none from global;
|
|
3
3
|
z-index: 9999999;
|
|
4
4
|
/*Hook for editor alert*/
|
|
5
|
-
pointer-events: none;
|
|
6
5
|
box-shadow: 0 4px 12px 0 var(--zdt_tooltip_default_box_shadow);
|
|
7
6
|
border-radius: 4px;
|
|
8
7
|
}[dir=ltr] .tooltiptext {
|
|
@@ -12,6 +11,7 @@
|
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
.tooltipcont {
|
|
14
|
+
composes: d-overflow-hidden d-border-transparent d-border-solid from global;
|
|
15
15
|
color: var(--zdt_tooltip_default_text);
|
|
16
16
|
padding-block:0 ;
|
|
17
17
|
padding-inline: var(--zd_size10) ;
|
|
@@ -21,15 +21,12 @@
|
|
|
21
21
|
max-width: var(--zd_size420) ;
|
|
22
22
|
line-height: 1.5385;
|
|
23
23
|
min-height: var(--zd_size24) ;
|
|
24
|
-
overflow: hidden;
|
|
25
24
|
background-color: var(--zdt_tooltip_default_bg);
|
|
26
|
-
border-style: solid;
|
|
27
|
-
border-color: transparent;
|
|
28
25
|
border-radius: 4px;
|
|
29
26
|
}
|
|
30
27
|
.tooltiparrow {
|
|
31
28
|
content: '';
|
|
32
|
-
|
|
29
|
+
composes: d-absolute from global;
|
|
33
30
|
top: 0 ;
|
|
34
31
|
border-top-left-radius: 3px;
|
|
35
32
|
}
|
|
@@ -17,7 +17,7 @@ describe('Typography', function () {
|
|
|
17
17
|
var ui_display = ['block', 'inlineBlock', 'inline', 'initial'];
|
|
18
18
|
var ui_weight = ['regular', 'light', 'semibold', 'bold'];
|
|
19
19
|
var ui_typeFace = ['normal', 'italic'];
|
|
20
|
-
var ui_textAlign = ['left', 'center', 'right', 'justify'];
|
|
20
|
+
var ui_textAlign = ['left', 'center', 'right', 'justify', 'start', 'end'];
|
|
21
21
|
var ui_letterSpacing = ['0.1', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8', '0.9', '1', '1.1', '1.2', '1.3', '1.4', '1.5', '1.6', '1.7', '1.8', '1.9', '2', 'inherit'];
|
|
22
22
|
var ui_transform = ['default', 'upper', 'lower', 'capital'];
|
|
23
23
|
var ui_decoration = ['default', 'underline', 'strike', 'overline'];
|
|
@@ -880,6 +880,16 @@ exports[`Typography Should render textAlign - center 1`] = `
|
|
|
880
880
|
</DocumentFragment>
|
|
881
881
|
`;
|
|
882
882
|
|
|
883
|
+
exports[`Typography Should render textAlign - end 1`] = `
|
|
884
|
+
<DocumentFragment>
|
|
885
|
+
<div
|
|
886
|
+
class="textalign_end"
|
|
887
|
+
>
|
|
888
|
+
Heading
|
|
889
|
+
</div>
|
|
890
|
+
</DocumentFragment>
|
|
891
|
+
`;
|
|
892
|
+
|
|
883
893
|
exports[`Typography Should render textAlign - justify 1`] = `
|
|
884
894
|
<DocumentFragment>
|
|
885
895
|
<div
|
|
@@ -910,6 +920,16 @@ exports[`Typography Should render textAlign - right 1`] = `
|
|
|
910
920
|
</DocumentFragment>
|
|
911
921
|
`;
|
|
912
922
|
|
|
923
|
+
exports[`Typography Should render textAlign - start 1`] = `
|
|
924
|
+
<DocumentFragment>
|
|
925
|
+
<div
|
|
926
|
+
class="textalign_start"
|
|
927
|
+
>
|
|
928
|
+
Heading
|
|
929
|
+
</div>
|
|
930
|
+
</DocumentFragment>
|
|
931
|
+
`;
|
|
932
|
+
|
|
913
933
|
exports[`Typography Should render transform - capital 1`] = `
|
|
914
934
|
<DocumentFragment>
|
|
915
935
|
<div
|
|
@@ -1850,6 +1870,16 @@ exports[`Typography Should render ui_textAlign - center 1`] = `
|
|
|
1850
1870
|
</DocumentFragment>
|
|
1851
1871
|
`;
|
|
1852
1872
|
|
|
1873
|
+
exports[`Typography Should render ui_textAlign - end 1`] = `
|
|
1874
|
+
<DocumentFragment>
|
|
1875
|
+
<div
|
|
1876
|
+
class="textalign_end"
|
|
1877
|
+
>
|
|
1878
|
+
Heading
|
|
1879
|
+
</div>
|
|
1880
|
+
</DocumentFragment>
|
|
1881
|
+
`;
|
|
1882
|
+
|
|
1853
1883
|
exports[`Typography Should render ui_textAlign - justify 1`] = `
|
|
1854
1884
|
<DocumentFragment>
|
|
1855
1885
|
<div
|
|
@@ -1880,6 +1910,16 @@ exports[`Typography Should render ui_textAlign - right 1`] = `
|
|
|
1880
1910
|
</DocumentFragment>
|
|
1881
1911
|
`;
|
|
1882
1912
|
|
|
1913
|
+
exports[`Typography Should render ui_textAlign - start 1`] = `
|
|
1914
|
+
<DocumentFragment>
|
|
1915
|
+
<div
|
|
1916
|
+
class="textalign_start"
|
|
1917
|
+
>
|
|
1918
|
+
Heading
|
|
1919
|
+
</div>
|
|
1920
|
+
</DocumentFragment>
|
|
1921
|
+
`;
|
|
1922
|
+
|
|
1883
1923
|
exports[`Typography Should render ui_transform - capital 1`] = `
|
|
1884
1924
|
<DocumentFragment>
|
|
1885
1925
|
<div
|