@zohodesk/components 1.0.0-temp-259.5 → 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 +14 -13
|
@@ -20,6 +20,7 @@ import Loader from '@zohodesk/svg/lib/Loader/Loader';
|
|
|
20
20
|
|
|
21
21
|
import { scrollTo, findScrollEnd, getSearchString } from "../utils/Common.js";
|
|
22
22
|
import { isObjectContainsSearchString } from "../utils/dropDownUtils.js";
|
|
23
|
+
import { isRenderable, renderNode } from '@zohodesk/utils';
|
|
23
24
|
/**** CSS ****/
|
|
24
25
|
|
|
25
26
|
import { cn } from "@dot-system/css-utility";
|
|
@@ -351,6 +352,7 @@ class SelectWithIcon extends Component {
|
|
|
351
352
|
dropBoxSize,
|
|
352
353
|
emptyMessage,
|
|
353
354
|
renderCustomEmptyState,
|
|
355
|
+
renderCustomSelectedValue,
|
|
354
356
|
needIcon,
|
|
355
357
|
iconName,
|
|
356
358
|
iconSize,
|
|
@@ -396,7 +398,27 @@ class SelectWithIcon extends Component {
|
|
|
396
398
|
ref: getTargetRef,
|
|
397
399
|
"data-id": `${isDisabled ? `${dataId}_disabled` : isReadOnly ? `${dataId}_readOnly` : dataId}`,
|
|
398
400
|
"data-test-id": `${isDisabled ? `${dataId}_disabled` : isReadOnly ? `${dataId}_readOnly` : dataId}`
|
|
399
|
-
},
|
|
401
|
+
}, isRenderable(renderCustomSelectedValue) ? renderNode(renderCustomSelectedValue, {
|
|
402
|
+
iconName,
|
|
403
|
+
iconSize,
|
|
404
|
+
iconClass,
|
|
405
|
+
needIcon,
|
|
406
|
+
isDisabled,
|
|
407
|
+
isReadOnly,
|
|
408
|
+
isPopupOpen,
|
|
409
|
+
isActive: isPopupReady,
|
|
410
|
+
size,
|
|
411
|
+
option: this.props.options.find(option => option[idKey] === selectedId) || DUMMY_OBJECT,
|
|
412
|
+
selectedId,
|
|
413
|
+
selectedValue,
|
|
414
|
+
placeHolder,
|
|
415
|
+
htmlId,
|
|
416
|
+
maxLength,
|
|
417
|
+
dataId,
|
|
418
|
+
getRef: this.inputRef,
|
|
419
|
+
onKeyDown: this.handleKeyDown,
|
|
420
|
+
ariaControlsId: setAriaId
|
|
421
|
+
}) : /*#__PURE__*/React.createElement(Container, {
|
|
400
422
|
alignBox: "row"
|
|
401
423
|
}, needIcon ? /*#__PURE__*/React.createElement(Container, {
|
|
402
424
|
align: "both",
|
|
@@ -9,4 +9,21 @@ describe('SelectWithAvatar', () => {
|
|
|
9
9
|
} = render( /*#__PURE__*/React.createElement(SelectWithAvatar, null));
|
|
10
10
|
expect(asFragment()).toMatchSnapshot();
|
|
11
11
|
});
|
|
12
|
+
test('Should render with renderCustomSelectedValue', () => {
|
|
13
|
+
const options = [{
|
|
14
|
+
id: '1',
|
|
15
|
+
text: 'Option 1'
|
|
16
|
+
}, {
|
|
17
|
+
id: '2',
|
|
18
|
+
text: 'Option 2'
|
|
19
|
+
}];
|
|
20
|
+
const {
|
|
21
|
+
asFragment
|
|
22
|
+
} = render( /*#__PURE__*/React.createElement(SelectWithAvatar, {
|
|
23
|
+
options: options,
|
|
24
|
+
selectedValue: "1",
|
|
25
|
+
renderCustomSelectedValue: tagProps => /*#__PURE__*/React.createElement("div", null, tagProps.text, " - Custom Tag")
|
|
26
|
+
}));
|
|
27
|
+
expect(asFragment()).toMatchSnapshot();
|
|
28
|
+
});
|
|
12
29
|
});
|
|
@@ -11,4 +11,22 @@ describe('SelectWithIcon', () => {
|
|
|
11
11
|
}));
|
|
12
12
|
expect(asFragment()).toMatchSnapshot();
|
|
13
13
|
});
|
|
14
|
+
test('Should render with renderCustomSelectedValue', () => {
|
|
15
|
+
const options = [{
|
|
16
|
+
id: '1',
|
|
17
|
+
value: 'Option 1'
|
|
18
|
+
}, {
|
|
19
|
+
id: '2',
|
|
20
|
+
value: 'Option 2'
|
|
21
|
+
}];
|
|
22
|
+
const {
|
|
23
|
+
asFragment
|
|
24
|
+
} = render( /*#__PURE__*/React.createElement(SelectWithIcon, {
|
|
25
|
+
options: options,
|
|
26
|
+
selectedId: "1",
|
|
27
|
+
selectedValue: "Option 1",
|
|
28
|
+
renderCustomSelectedValue: valueProps => /*#__PURE__*/React.createElement("div", null, valueProps.selectedValue, " - Custom Value")
|
|
29
|
+
}));
|
|
30
|
+
expect(asFragment()).toMatchSnapshot();
|
|
31
|
+
});
|
|
14
32
|
});
|
|
@@ -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
|
|
@@ -329,6 +329,7 @@ export const SelectWithIcon_propTypes = {
|
|
|
329
329
|
boxSize: PropTypes.string,
|
|
330
330
|
emptyMessage: PropTypes.string,
|
|
331
331
|
renderCustomEmptyState: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),
|
|
332
|
+
renderCustomSelectedValue: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),
|
|
332
333
|
isAbsolutePositioningNeeded: PropTypes.bool,
|
|
333
334
|
isRestrictScroll: PropTypes.bool,
|
|
334
335
|
positionsOffset: PropTypes.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/es/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/es/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/es/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/es/Tooltip/Tooltip.js
CHANGED
|
@@ -136,7 +136,10 @@ export default class Tooltip extends React.Component {
|
|
|
136
136
|
handleOver(e, targetElement) {
|
|
137
137
|
let containerElement = this.tooltipContainerEl;
|
|
138
138
|
let element = e.target;
|
|
139
|
-
|
|
139
|
+
|
|
140
|
+
let hasTitleValue = el => el.hasAttribute('data-title') && el.getAttribute('data-title') !== '' || el.hasAttribute('title') && el.getAttribute('title') !== '';
|
|
141
|
+
|
|
142
|
+
let titleDiv = hasTitleValue(element) ? element : element.closest('[data-title]:not([data-title=""])') || element.closest('[title]:not([title=""])');
|
|
140
143
|
|
|
141
144
|
if (titleDiv) {
|
|
142
145
|
let 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
|
}
|
|
@@ -9,7 +9,7 @@ describe('Typography', () => {
|
|
|
9
9
|
const ui_display = ['block', 'inlineBlock', 'inline', 'initial'];
|
|
10
10
|
const ui_weight = ['regular', 'light', 'semibold', 'bold'];
|
|
11
11
|
const ui_typeFace = ['normal', 'italic'];
|
|
12
|
-
const ui_textAlign = ['left', 'center', 'right', 'justify'];
|
|
12
|
+
const ui_textAlign = ['left', 'center', 'right', 'justify', 'start', 'end'];
|
|
13
13
|
const 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'];
|
|
14
14
|
const ui_transform = ['default', 'upper', 'lower', 'capital'];
|
|
15
15
|
const 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
|