@zohodesk/components 1.0.0-temp-169 → 1.0.0-temp-171
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/PropLessFiles.html +1 -1
- package/.cli/PropValidationExcludeFilesArray.js +1 -13
- package/.cli/propValidation_report.html +1 -1
- package/README.md +19 -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/coverage/Avatar/Avatar.js.html +649 -0
- package/coverage/Avatar/Avatar.module.css.html +556 -0
- package/coverage/Avatar/index.html +131 -0
- package/coverage/Avatar/props/defaultProps.js.html +136 -0
- package/coverage/Avatar/props/index.html +131 -0
- package/coverage/Avatar/props/propTypes.js.html +166 -0
- package/coverage/AvatarTeam/AvatarTeam.js.html +340 -0
- package/coverage/AvatarTeam/AvatarTeam.module.css.html +610 -0
- package/coverage/AvatarTeam/index.html +131 -0
- package/coverage/AvatarTeam/props/defaultProps.js.html +136 -0
- package/coverage/AvatarTeam/props/index.html +131 -0
- package/coverage/AvatarTeam/props/propTypes.js.html +169 -0
- package/coverage/Button/Button.js.html +1 -1
- package/coverage/Button/css/Button.module.css.html +1 -1
- package/coverage/Button/css/cssJSLogic.js.html +1 -1
- package/coverage/Button/css/index.html +1 -1
- package/coverage/Button/index.html +1 -1
- package/coverage/Button/props/defaultProps.js.html +1 -1
- package/coverage/Button/props/index.html +1 -1
- package/coverage/Button/props/propTypes.js.html +1 -1
- package/coverage/Buttongroup/Buttongroup.js.html +1 -1
- package/coverage/Buttongroup/Buttongroup.module.css.html +1 -1
- package/coverage/Buttongroup/index.html +1 -1
- package/coverage/Buttongroup/props/defaultProps.js.html +1 -1
- package/coverage/Buttongroup/props/index.html +1 -1
- package/coverage/Buttongroup/props/propTypes.js.html +1 -1
- package/coverage/Label/Label.js.html +253 -0
- package/coverage/Label/Label.module.css.html +241 -0
- package/coverage/Label/LabelColors.module.css.html +145 -0
- package/coverage/Label/index.html +146 -0
- package/coverage/Label/props/defaultProps.js.html +118 -0
- package/coverage/Label/props/index.html +131 -0
- package/coverage/Label/props/propTypes.js.html +145 -0
- package/coverage/Layout/Box.js.html +367 -0
- package/coverage/Layout/Container.js.html +439 -0
- package/coverage/Layout/Layout.module.css.html +1090 -0
- package/coverage/Layout/index.html +176 -0
- package/coverage/Layout/index.js.html +118 -0
- package/coverage/Layout/props/defaultProps.js.html +136 -0
- package/coverage/Layout/props/index.html +131 -0
- package/coverage/Layout/props/propTypes.js.html +262 -0
- package/coverage/Layout/utils.js.html +199 -0
- package/coverage/Provider/AvatarSize.js.html +124 -0
- package/coverage/Provider/CssProvider.js.html +133 -0
- package/coverage/Provider/index.html +131 -0
- package/coverage/Radio/Radio.js.html +415 -0
- package/coverage/Radio/Radio.module.css.html +403 -0
- package/coverage/Radio/index.html +131 -0
- package/coverage/Radio/props/defaultProps.js.html +127 -0
- package/coverage/Radio/props/index.html +131 -0
- package/coverage/Radio/props/propTypes.js.html +187 -0
- package/coverage/Ribbon/Ribbon.js.html +229 -0
- package/coverage/Ribbon/Ribbon.module.css.html +1210 -0
- package/coverage/Ribbon/index.html +131 -0
- package/coverage/Ribbon/props/defaultProps.js.html +112 -0
- package/coverage/Ribbon/props/index.html +131 -0
- package/coverage/Ribbon/props/propTypes.js.html +121 -0
- package/coverage/RippleEffect/RippleEffect.js.html +172 -0
- package/coverage/RippleEffect/RippleEffect.module.css.html +415 -0
- package/coverage/RippleEffect/index.html +131 -0
- package/coverage/RippleEffect/props/defaultProps.js.html +112 -0
- package/coverage/RippleEffect/props/index.html +131 -0
- package/coverage/RippleEffect/props/propTypes.js.html +121 -0
- package/coverage/Stencils/Stencils.js.html +163 -0
- package/coverage/Stencils/Stencils.module.css.html +319 -0
- package/coverage/Stencils/index.html +131 -0
- package/coverage/Stencils/props/defaultProps.js.html +103 -0
- package/coverage/Stencils/props/index.html +131 -0
- package/coverage/Stencils/props/propTypes.js.html +109 -0
- package/coverage/Switch/Switch.js.html +379 -0
- package/coverage/Switch/Switch.module.css.html +481 -0
- package/coverage/Switch/index.html +131 -0
- package/coverage/Switch/props/defaultProps.js.html +118 -0
- package/coverage/Switch/props/index.html +131 -0
- package/coverage/Switch/props/propTypes.js.html +172 -0
- package/coverage/common/avatarsizes.module.css.html +229 -0
- package/coverage/common/common.module.css.html +1519 -0
- package/coverage/common/index.html +131 -0
- package/coverage/coverage-final.json +55 -10
- package/coverage/coverage-summary.json +56 -11
- package/coverage/index.html +311 -11
- package/coverage/utils/dummyFunction.js.html +1 -1
- package/coverage/utils/getInitial.js.html +139 -0
- package/coverage/utils/index.html +25 -10
- package/es/Avatar/__tests__/Avatar.spec.js +181 -0
- package/es/Avatar/__tests__/__snapshots__/Avatar.spec.js.snap +591 -0
- package/es/AvatarTeam/__tests__/AvatarTeam.spec.js +138 -0
- package/es/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +704 -0
- package/es/DateTime/DateTime.module.css +12 -1
- package/es/Label/__tests__/Label.spec.js +99 -0
- package/es/Label/__tests__/__snapshots__/Label.spec.js.snap +312 -0
- package/es/ListItem/ListContainer.js +1 -1
- package/es/MultiSelect/Suggestions.js +2 -1
- package/es/MultiSelect/props/propTypes.js +140 -138
- package/es/Radio/__tests__/Radio.spec.js +241 -0
- package/es/Radio/__tests__/__snapshots__/Radio.spec.js.snap +1837 -0
- package/es/Ribbon/__tests__/Ribbon.spec.js +52 -0
- package/es/Ribbon/__tests__/__snapshots__/Ribbon.spec.js.snap +374 -0
- package/es/RippleEffect/__tests__/RippleEffect.spec.js +69 -0
- package/es/RippleEffect/__tests__/__snapshots__/RippleEffect.spec.js.snap +171 -0
- package/es/Select/Select.js +4 -3
- package/es/Select/props/propTypes.js +3 -1
- package/es/Stencils/__tests__/Stencils.spec.js +46 -0
- package/es/Stencils/__tests__/__snapshots__/Stencils.spec.js.snap +89 -0
- package/es/Switch/__tests__/Switch.spec.js +156 -0
- package/es/Switch/__tests__/__snapshots__/Switch.spec.js.snap +831 -0
- package/es/TextBox/TextBox.module.css +4 -5
- package/es/Textarea/Textarea.module.css +4 -3
- package/es/v1/AppContainer/AppContainer.js +75 -92
- package/es/v1/Card/Card.js +143 -177
- package/es/v1/Card/index.js +4 -0
- package/es/v1/DateTime/CalendarView.js +43 -10
- package/es/v1/DateTime/DateTime.js +8 -4
- package/es/v1/DateTime/DateTimePopupFooter.js +2 -2
- package/es/v1/DateTime/DateTimePopupHeader.js +1 -1
- package/es/v1/DateTime/DateWidget.js +8 -4
- package/es/v1/DateTime/DaysRow.js +1 -1
- package/es/v1/DateTime/Time.js +2 -2
- package/es/v1/DateTime/YearView.js +2 -2
- package/es/v1/DateTime/props/defaultProps.js +57 -0
- package/es/v1/DateTime/props/propTypes.js +195 -0
- package/es/v1/DropDown/DropDown.js +31 -52
- package/es/v1/DropDown/DropDownHeading.js +29 -37
- package/es/v1/DropDown/DropDownItem.js +38 -58
- package/es/v1/DropDown/DropDownSearch.js +41 -49
- package/es/v1/DropDown/DropDownSeparator.js +7 -10
- package/es/v1/ListItem/ListItemWithAvatar.js +7 -8
- package/es/v1/MultiSelect/MultiSelect.js +1 -0
- package/es/v1/MultiSelect/MultiSelectWithAvatar.js +1 -0
- package/es/v1/Provider/AvatarSize.js +13 -0
- package/es/v1/Provider/Config.js +18 -0
- package/es/v1/Provider/CssProvider.js +16 -0
- package/es/v1/Provider/IdProvider.js +66 -0
- package/es/v1/Provider/LibraryContext.js +37 -0
- package/es/v1/Provider/LibraryContextInit.js +3 -0
- package/es/v1/Provider/NumberGenerator/NumberGenerator.js +136 -0
- package/es/v1/Provider/ZindexProvider.js +57 -0
- package/es/v1/Provider/index.js +4 -0
- package/es/v1/Tag/Tag.js +6 -2
- package/es/v1/TextBox/TextBox.js +10 -10
- package/es/v1/Typography/Typography.js +4 -4
- package/es/v1/Typography/css/Typography.module.css +33 -0
- package/es/v1/Typography/css/cssJSLogic.js +14 -8
- package/es/v1/Typography/props/defaultProps.js +4 -4
- package/es/v1/Typography/props/propTypes.js +8 -5
- package/lib/Avatar/__tests__/Avatar.spec.js +188 -0
- package/lib/Avatar/__tests__/__snapshots__/Avatar.spec.js.snap +591 -0
- package/lib/AvatarTeam/__tests__/AvatarTeam.spec.js +145 -0
- package/lib/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +704 -0
- package/lib/DateTime/DateTime.module.css +12 -1
- package/lib/Label/__tests__/Label.spec.js +106 -0
- package/lib/Label/__tests__/__snapshots__/Label.spec.js.snap +312 -0
- package/lib/ListItem/ListContainer.js +1 -1
- package/lib/MultiSelect/Suggestions.js +2 -1
- package/lib/MultiSelect/props/propTypes.js +146 -141
- package/lib/Radio/__tests__/Radio.spec.js +250 -0
- package/lib/Radio/__tests__/__snapshots__/Radio.spec.js.snap +1837 -0
- package/lib/Ribbon/__tests__/Ribbon.spec.js +59 -0
- package/lib/Ribbon/__tests__/__snapshots__/Ribbon.spec.js.snap +374 -0
- package/lib/RippleEffect/__tests__/RippleEffect.spec.js +76 -0
- package/lib/RippleEffect/__tests__/__snapshots__/RippleEffect.spec.js.snap +171 -0
- package/lib/Select/Select.js +4 -3
- package/lib/Select/props/propTypes.js +12 -2
- package/lib/Stencils/__tests__/Stencils.spec.js +53 -0
- package/lib/Stencils/__tests__/__snapshots__/Stencils.spec.js.snap +89 -0
- package/lib/Switch/__tests__/Switch.spec.js +163 -0
- package/lib/Switch/__tests__/__snapshots__/Switch.spec.js.snap +831 -0
- package/lib/TextBox/TextBox.module.css +4 -5
- package/lib/Textarea/Textarea.module.css +4 -3
- package/lib/v1/AppContainer/AppContainer.js +87 -138
- package/lib/v1/Card/Card.js +190 -286
- package/lib/v1/Card/index.js +37 -0
- package/lib/v1/DateTime/CalendarView.js +44 -10
- package/lib/v1/DateTime/DateTime.js +8 -4
- package/lib/v1/DateTime/DateTimePopupFooter.js +2 -2
- package/lib/v1/DateTime/DateTimePopupHeader.js +1 -1
- package/lib/v1/DateTime/DateWidget.js +8 -4
- package/lib/v1/DateTime/DaysRow.js +1 -1
- package/lib/v1/DateTime/Time.js +2 -2
- package/lib/v1/DateTime/YearView.js +2 -2
- package/lib/v1/DateTime/props/defaultProps.js +70 -0
- package/lib/v1/DateTime/props/propTypes.js +227 -0
- package/lib/v1/DropDown/DropDown.js +34 -130
- package/lib/v1/DropDown/DropDownHeading.js +29 -75
- package/lib/v1/DropDown/DropDownItem.js +50 -102
- package/lib/v1/DropDown/DropDownSearch.js +50 -89
- package/lib/v1/DropDown/DropDownSeparator.js +8 -48
- package/lib/v1/ListItem/ListItemWithAvatar.js +14 -9
- package/lib/v1/MultiSelect/MultiSelect.js +3 -1
- package/lib/v1/MultiSelect/MultiSelectWithAvatar.js +3 -1
- package/lib/v1/Provider/AvatarSize.js +24 -0
- package/lib/v1/Provider/Config.js +27 -0
- package/lib/v1/Provider/CssProvider.js +27 -0
- package/lib/v1/Provider/IdProvider.js +79 -0
- package/lib/v1/Provider/LibraryContext.js +76 -0
- package/lib/v1/Provider/LibraryContextInit.js +15 -0
- package/lib/v1/Provider/NumberGenerator/NumberGenerator.js +174 -0
- package/lib/v1/Provider/ZindexProvider.js +69 -0
- package/lib/v1/Provider/index.js +81 -0
- package/lib/v1/Tag/Tag.js +7 -4
- package/lib/v1/TextBox/TextBox.js +8 -9
- package/lib/v1/Typography/Typography.js +3 -3
- package/lib/v1/Typography/css/Typography.module.css +33 -0
- package/lib/v1/Typography/css/cssJSLogic.js +8 -5
- package/lib/v1/Typography/props/defaultProps.js +4 -4
- package/lib/v1/Typography/props/propTypes.js +8 -5
- package/package.json +11 -11
- package/result.json +1 -1
- package/unittest/index.html +1 -1
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
color: var(--zdt_datetime_invalid_text);
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
.invalidDate.sunday {
|
|
125
|
+
.invalidDate.sunday,.inActiveDate.sunday:hover {
|
|
126
126
|
color: var(--zdt_datetime_invaliddate_text);
|
|
127
127
|
}
|
|
128
128
|
|
|
@@ -147,7 +147,18 @@
|
|
|
147
147
|
background-color: var(--zdt_datetime_selected_bg);
|
|
148
148
|
border-radius: 50%;
|
|
149
149
|
}
|
|
150
|
+
.inActiveDate{
|
|
151
|
+
color: var(--zdt_datetime_invalid_text);
|
|
152
|
+
cursor: no-drop;
|
|
153
|
+
}
|
|
154
|
+
.inActiveDate:hover
|
|
155
|
+
{
|
|
156
|
+
color: var(--zdt_datetime_invalid_text);
|
|
157
|
+
}
|
|
158
|
+
.inActiveDate:hover, .inActiveDate.sunday:hover{
|
|
159
|
+
background-color: var(--zdt_datetime_inactivedate_hover_bg);
|
|
150
160
|
|
|
161
|
+
}
|
|
151
162
|
|
|
152
163
|
|
|
153
164
|
.timesection {
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
import Label from '../Label.js';
|
|
4
|
+
describe('Label', () => {
|
|
5
|
+
test('rendering the defult props', () => {
|
|
6
|
+
const {
|
|
7
|
+
asFragment
|
|
8
|
+
} = render( /*#__PURE__*/React.createElement(Label, null));
|
|
9
|
+
expect(asFragment()).toMatchSnapshot();
|
|
10
|
+
});
|
|
11
|
+
const type = ['title', 'subtitle'];
|
|
12
|
+
test.each(type)('rendering the type of- %s', type => {
|
|
13
|
+
const {
|
|
14
|
+
asFragment
|
|
15
|
+
} = render( /*#__PURE__*/React.createElement(Label, {
|
|
16
|
+
type: type
|
|
17
|
+
}));
|
|
18
|
+
expect(asFragment()).toMatchSnapshot();
|
|
19
|
+
});
|
|
20
|
+
const palette = ['default', 'primary', 'secondary', 'danger', 'mandatory', 'disable', 'dark'];
|
|
21
|
+
test.each(palette)('rendering the palette of- %s', palette => {
|
|
22
|
+
const {
|
|
23
|
+
asFragment
|
|
24
|
+
} = render( /*#__PURE__*/React.createElement(Label, {
|
|
25
|
+
palette: palette
|
|
26
|
+
}));
|
|
27
|
+
expect(asFragment()).toMatchSnapshot();
|
|
28
|
+
});
|
|
29
|
+
const size = ['xsmall', 'small', 'medium', 'large'];
|
|
30
|
+
test.each(size)('rendering the size of- %s', size => {
|
|
31
|
+
const {
|
|
32
|
+
asFragment
|
|
33
|
+
} = render( /*#__PURE__*/React.createElement(Label, {
|
|
34
|
+
size: size
|
|
35
|
+
}));
|
|
36
|
+
expect(asFragment()).toMatchSnapshot();
|
|
37
|
+
});
|
|
38
|
+
test('rendering the clipped is true', () => {
|
|
39
|
+
const {
|
|
40
|
+
asFragment
|
|
41
|
+
} = render( /*#__PURE__*/React.createElement(Label, {
|
|
42
|
+
clipped: true
|
|
43
|
+
}));
|
|
44
|
+
expect(asFragment()).toMatchSnapshot();
|
|
45
|
+
});
|
|
46
|
+
test('rendering the title', () => {
|
|
47
|
+
const {
|
|
48
|
+
asFragment
|
|
49
|
+
} = render( /*#__PURE__*/React.createElement(Label, {
|
|
50
|
+
title: "labelTitle"
|
|
51
|
+
}));
|
|
52
|
+
expect(asFragment()).toMatchSnapshot();
|
|
53
|
+
});
|
|
54
|
+
const variant = ['primary', 'default'];
|
|
55
|
+
test.each(variant)('rendering the variant of- %s', variant => {
|
|
56
|
+
const {
|
|
57
|
+
asFragment
|
|
58
|
+
} = render( /*#__PURE__*/React.createElement(Label, {
|
|
59
|
+
variant: variant
|
|
60
|
+
}));
|
|
61
|
+
expect(asFragment()).toMatchSnapshot();
|
|
62
|
+
});
|
|
63
|
+
test('rendering the customClass', () => {
|
|
64
|
+
const {
|
|
65
|
+
asFragment
|
|
66
|
+
} = render( /*#__PURE__*/React.createElement(Label, {
|
|
67
|
+
customClass: "LabelCustomClass"
|
|
68
|
+
}));
|
|
69
|
+
expect(asFragment()).toMatchSnapshot();
|
|
70
|
+
});
|
|
71
|
+
test('rendering the Id', () => {
|
|
72
|
+
const {
|
|
73
|
+
asFragment
|
|
74
|
+
} = render( /*#__PURE__*/React.createElement(Label, {
|
|
75
|
+
id: "LabelID"
|
|
76
|
+
}));
|
|
77
|
+
expect(asFragment()).toMatchSnapshot();
|
|
78
|
+
});
|
|
79
|
+
test('rendering the htmlFor', () => {
|
|
80
|
+
const {
|
|
81
|
+
asFragment
|
|
82
|
+
} = render( /*#__PURE__*/React.createElement(Label, {
|
|
83
|
+
htmlFor: "LabelHtmlFor"
|
|
84
|
+
}));
|
|
85
|
+
expect(asFragment()).toMatchSnapshot();
|
|
86
|
+
});
|
|
87
|
+
test('rendering the onClick prop with asFragment and toMatchSnapshot', () => {
|
|
88
|
+
// Define an onClick mock function
|
|
89
|
+
const onClickMock = jest.fn(); // Render the Label component with the onClick prop
|
|
90
|
+
|
|
91
|
+
const {
|
|
92
|
+
asFragment
|
|
93
|
+
} = render( /*#__PURE__*/React.createElement(Label, {
|
|
94
|
+
text: "Click Me",
|
|
95
|
+
onClick: onClickMock
|
|
96
|
+
}));
|
|
97
|
+
expect(asFragment()).toMatchSnapshot();
|
|
98
|
+
});
|
|
99
|
+
});
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`Label rendering the Id 1`] = `
|
|
4
|
+
<DocumentFragment>
|
|
5
|
+
<label
|
|
6
|
+
class="label title medium default font_default
|
|
7
|
+
cursor "
|
|
8
|
+
data-id="label"
|
|
9
|
+
data-selector-id="label"
|
|
10
|
+
data-test-id="label"
|
|
11
|
+
id="LabelID"
|
|
12
|
+
>
|
|
13
|
+
Label
|
|
14
|
+
</label>
|
|
15
|
+
</DocumentFragment>
|
|
16
|
+
`;
|
|
17
|
+
|
|
18
|
+
exports[`Label rendering the clipped is true 1`] = `
|
|
19
|
+
<DocumentFragment>
|
|
20
|
+
<label
|
|
21
|
+
class="label title medium default font_default
|
|
22
|
+
dotted cursor "
|
|
23
|
+
data-id="label"
|
|
24
|
+
data-selector-id="label"
|
|
25
|
+
data-test-id="label"
|
|
26
|
+
>
|
|
27
|
+
Label
|
|
28
|
+
</label>
|
|
29
|
+
</DocumentFragment>
|
|
30
|
+
`;
|
|
31
|
+
|
|
32
|
+
exports[`Label rendering the customClass 1`] = `
|
|
33
|
+
<DocumentFragment>
|
|
34
|
+
<label
|
|
35
|
+
class="label title medium default font_default
|
|
36
|
+
cursor LabelCustomClass "
|
|
37
|
+
data-id="label"
|
|
38
|
+
data-selector-id="label"
|
|
39
|
+
data-test-id="label"
|
|
40
|
+
>
|
|
41
|
+
Label
|
|
42
|
+
</label>
|
|
43
|
+
</DocumentFragment>
|
|
44
|
+
`;
|
|
45
|
+
|
|
46
|
+
exports[`Label rendering the defult props 1`] = `
|
|
47
|
+
<DocumentFragment>
|
|
48
|
+
<label
|
|
49
|
+
class="label title medium default font_default
|
|
50
|
+
cursor "
|
|
51
|
+
data-id="label"
|
|
52
|
+
data-selector-id="label"
|
|
53
|
+
data-test-id="label"
|
|
54
|
+
>
|
|
55
|
+
Label
|
|
56
|
+
</label>
|
|
57
|
+
</DocumentFragment>
|
|
58
|
+
`;
|
|
59
|
+
|
|
60
|
+
exports[`Label rendering the htmlFor 1`] = `
|
|
61
|
+
<DocumentFragment>
|
|
62
|
+
<label
|
|
63
|
+
class="label title medium default font_default
|
|
64
|
+
cursor "
|
|
65
|
+
data-id="label"
|
|
66
|
+
data-selector-id="label"
|
|
67
|
+
data-test-id="label"
|
|
68
|
+
for="LabelHtmlFor"
|
|
69
|
+
>
|
|
70
|
+
Label
|
|
71
|
+
</label>
|
|
72
|
+
</DocumentFragment>
|
|
73
|
+
`;
|
|
74
|
+
|
|
75
|
+
exports[`Label rendering the onClick prop with asFragment and toMatchSnapshot 1`] = `
|
|
76
|
+
<DocumentFragment>
|
|
77
|
+
<label
|
|
78
|
+
class="label title medium default font_default
|
|
79
|
+
pointer "
|
|
80
|
+
data-id="label"
|
|
81
|
+
data-selector-id="label"
|
|
82
|
+
data-test-id="label"
|
|
83
|
+
>
|
|
84
|
+
Click Me
|
|
85
|
+
</label>
|
|
86
|
+
</DocumentFragment>
|
|
87
|
+
`;
|
|
88
|
+
|
|
89
|
+
exports[`Label rendering the palette of- danger 1`] = `
|
|
90
|
+
<DocumentFragment>
|
|
91
|
+
<label
|
|
92
|
+
class="label title medium danger font_default
|
|
93
|
+
cursor "
|
|
94
|
+
data-id="label"
|
|
95
|
+
data-selector-id="label"
|
|
96
|
+
data-test-id="label"
|
|
97
|
+
>
|
|
98
|
+
Label
|
|
99
|
+
</label>
|
|
100
|
+
</DocumentFragment>
|
|
101
|
+
`;
|
|
102
|
+
|
|
103
|
+
exports[`Label rendering the palette of- dark 1`] = `
|
|
104
|
+
<DocumentFragment>
|
|
105
|
+
<label
|
|
106
|
+
class="label title medium dark font_default
|
|
107
|
+
cursor "
|
|
108
|
+
data-id="label"
|
|
109
|
+
data-selector-id="label"
|
|
110
|
+
data-test-id="label"
|
|
111
|
+
>
|
|
112
|
+
Label
|
|
113
|
+
</label>
|
|
114
|
+
</DocumentFragment>
|
|
115
|
+
`;
|
|
116
|
+
|
|
117
|
+
exports[`Label rendering the palette of- default 1`] = `
|
|
118
|
+
<DocumentFragment>
|
|
119
|
+
<label
|
|
120
|
+
class="label title medium default font_default
|
|
121
|
+
cursor "
|
|
122
|
+
data-id="label"
|
|
123
|
+
data-selector-id="label"
|
|
124
|
+
data-test-id="label"
|
|
125
|
+
>
|
|
126
|
+
Label
|
|
127
|
+
</label>
|
|
128
|
+
</DocumentFragment>
|
|
129
|
+
`;
|
|
130
|
+
|
|
131
|
+
exports[`Label rendering the palette of- disable 1`] = `
|
|
132
|
+
<DocumentFragment>
|
|
133
|
+
<label
|
|
134
|
+
class="label title medium disable font_default
|
|
135
|
+
cursor "
|
|
136
|
+
data-id="label"
|
|
137
|
+
data-selector-id="label"
|
|
138
|
+
data-test-id="label"
|
|
139
|
+
>
|
|
140
|
+
Label
|
|
141
|
+
</label>
|
|
142
|
+
</DocumentFragment>
|
|
143
|
+
`;
|
|
144
|
+
|
|
145
|
+
exports[`Label rendering the palette of- mandatory 1`] = `
|
|
146
|
+
<DocumentFragment>
|
|
147
|
+
<label
|
|
148
|
+
class="label title medium mandatory font_default
|
|
149
|
+
cursor "
|
|
150
|
+
data-id="label"
|
|
151
|
+
data-selector-id="label"
|
|
152
|
+
data-test-id="label"
|
|
153
|
+
>
|
|
154
|
+
Label
|
|
155
|
+
</label>
|
|
156
|
+
</DocumentFragment>
|
|
157
|
+
`;
|
|
158
|
+
|
|
159
|
+
exports[`Label rendering the palette of- primary 1`] = `
|
|
160
|
+
<DocumentFragment>
|
|
161
|
+
<label
|
|
162
|
+
class="label title medium primary font_default
|
|
163
|
+
cursor "
|
|
164
|
+
data-id="label"
|
|
165
|
+
data-selector-id="label"
|
|
166
|
+
data-test-id="label"
|
|
167
|
+
>
|
|
168
|
+
Label
|
|
169
|
+
</label>
|
|
170
|
+
</DocumentFragment>
|
|
171
|
+
`;
|
|
172
|
+
|
|
173
|
+
exports[`Label rendering the palette of- secondary 1`] = `
|
|
174
|
+
<DocumentFragment>
|
|
175
|
+
<label
|
|
176
|
+
class="label title medium secondary font_default
|
|
177
|
+
cursor "
|
|
178
|
+
data-id="label"
|
|
179
|
+
data-selector-id="label"
|
|
180
|
+
data-test-id="label"
|
|
181
|
+
>
|
|
182
|
+
Label
|
|
183
|
+
</label>
|
|
184
|
+
</DocumentFragment>
|
|
185
|
+
`;
|
|
186
|
+
|
|
187
|
+
exports[`Label rendering the size of- large 1`] = `
|
|
188
|
+
<DocumentFragment>
|
|
189
|
+
<label
|
|
190
|
+
class="label title large default font_default
|
|
191
|
+
cursor "
|
|
192
|
+
data-id="label"
|
|
193
|
+
data-selector-id="label"
|
|
194
|
+
data-test-id="label"
|
|
195
|
+
>
|
|
196
|
+
Label
|
|
197
|
+
</label>
|
|
198
|
+
</DocumentFragment>
|
|
199
|
+
`;
|
|
200
|
+
|
|
201
|
+
exports[`Label rendering the size of- medium 1`] = `
|
|
202
|
+
<DocumentFragment>
|
|
203
|
+
<label
|
|
204
|
+
class="label title medium default font_default
|
|
205
|
+
cursor "
|
|
206
|
+
data-id="label"
|
|
207
|
+
data-selector-id="label"
|
|
208
|
+
data-test-id="label"
|
|
209
|
+
>
|
|
210
|
+
Label
|
|
211
|
+
</label>
|
|
212
|
+
</DocumentFragment>
|
|
213
|
+
`;
|
|
214
|
+
|
|
215
|
+
exports[`Label rendering the size of- small 1`] = `
|
|
216
|
+
<DocumentFragment>
|
|
217
|
+
<label
|
|
218
|
+
class="label title small default font_default
|
|
219
|
+
cursor "
|
|
220
|
+
data-id="label"
|
|
221
|
+
data-selector-id="label"
|
|
222
|
+
data-test-id="label"
|
|
223
|
+
>
|
|
224
|
+
Label
|
|
225
|
+
</label>
|
|
226
|
+
</DocumentFragment>
|
|
227
|
+
`;
|
|
228
|
+
|
|
229
|
+
exports[`Label rendering the size of- xsmall 1`] = `
|
|
230
|
+
<DocumentFragment>
|
|
231
|
+
<label
|
|
232
|
+
class="label title xsmall default font_default
|
|
233
|
+
cursor "
|
|
234
|
+
data-id="label"
|
|
235
|
+
data-selector-id="label"
|
|
236
|
+
data-test-id="label"
|
|
237
|
+
>
|
|
238
|
+
Label
|
|
239
|
+
</label>
|
|
240
|
+
</DocumentFragment>
|
|
241
|
+
`;
|
|
242
|
+
|
|
243
|
+
exports[`Label rendering the title 1`] = `
|
|
244
|
+
<DocumentFragment>
|
|
245
|
+
<label
|
|
246
|
+
class="label title medium default font_default
|
|
247
|
+
cursor "
|
|
248
|
+
data-id="label"
|
|
249
|
+
data-selector-id="label"
|
|
250
|
+
data-test-id="label"
|
|
251
|
+
data-title="labelTitle"
|
|
252
|
+
>
|
|
253
|
+
Label
|
|
254
|
+
</label>
|
|
255
|
+
</DocumentFragment>
|
|
256
|
+
`;
|
|
257
|
+
|
|
258
|
+
exports[`Label rendering the type of- subtitle 1`] = `
|
|
259
|
+
<DocumentFragment>
|
|
260
|
+
<label
|
|
261
|
+
class="label subtitle medium default font_default
|
|
262
|
+
cursor "
|
|
263
|
+
data-id="label"
|
|
264
|
+
data-selector-id="label"
|
|
265
|
+
data-test-id="label"
|
|
266
|
+
>
|
|
267
|
+
Label
|
|
268
|
+
</label>
|
|
269
|
+
</DocumentFragment>
|
|
270
|
+
`;
|
|
271
|
+
|
|
272
|
+
exports[`Label rendering the type of- title 1`] = `
|
|
273
|
+
<DocumentFragment>
|
|
274
|
+
<label
|
|
275
|
+
class="label title medium default font_default
|
|
276
|
+
cursor "
|
|
277
|
+
data-id="label"
|
|
278
|
+
data-selector-id="label"
|
|
279
|
+
data-test-id="label"
|
|
280
|
+
>
|
|
281
|
+
Label
|
|
282
|
+
</label>
|
|
283
|
+
</DocumentFragment>
|
|
284
|
+
`;
|
|
285
|
+
|
|
286
|
+
exports[`Label rendering the variant of- default 1`] = `
|
|
287
|
+
<DocumentFragment>
|
|
288
|
+
<label
|
|
289
|
+
class="label title medium default font_default
|
|
290
|
+
cursor "
|
|
291
|
+
data-id="label"
|
|
292
|
+
data-selector-id="label"
|
|
293
|
+
data-test-id="label"
|
|
294
|
+
>
|
|
295
|
+
Label
|
|
296
|
+
</label>
|
|
297
|
+
</DocumentFragment>
|
|
298
|
+
`;
|
|
299
|
+
|
|
300
|
+
exports[`Label rendering the variant of- primary 1`] = `
|
|
301
|
+
<DocumentFragment>
|
|
302
|
+
<label
|
|
303
|
+
class="label title medium default font_primary
|
|
304
|
+
cursor "
|
|
305
|
+
data-id="label"
|
|
306
|
+
data-selector-id="label"
|
|
307
|
+
data-test-id="label"
|
|
308
|
+
>
|
|
309
|
+
Label
|
|
310
|
+
</label>
|
|
311
|
+
</DocumentFragment>
|
|
312
|
+
`;
|
|
@@ -89,7 +89,7 @@ const ListContainer = props => {
|
|
|
89
89
|
eleRef: eleRef,
|
|
90
90
|
tagName: isLink ? 'a' : 'li',
|
|
91
91
|
"data-title": isDisabled ? disableTitle : title
|
|
92
|
-
}, options, customProps), children);
|
|
92
|
+
}, options, customProps, a11y), children);
|
|
93
93
|
};
|
|
94
94
|
|
|
95
95
|
ListContainer.defaultProps = ListContainerDefaultProps;
|
|
@@ -60,7 +60,8 @@ export default class Suggestions extends React.PureComponent {
|
|
|
60
60
|
const isHighlight = hoverOption === index || id === hoverId ? true : false;
|
|
61
61
|
const list_a11y = Object.assign({}, a11y, {
|
|
62
62
|
ariaSelected: isActive,
|
|
63
|
-
ariaLabel: value
|
|
63
|
+
ariaLabel: value,
|
|
64
|
+
'data-a11y-list-active': isHighlight
|
|
64
65
|
});
|
|
65
66
|
const commonProps = {
|
|
66
67
|
isDisabled,
|