@zohodesk/dot 1.0.0-temp-222 → 1.0.0-temp-220.2
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/README.md +8 -3
- package/es/ActionButton/ActionButton.module.css +1 -1
- package/es/AlphabeticList/AlphabeticList.module.css +1 -1
- package/es/AudioPlayer/AudioPlayer.module.css +1 -1
- package/es/DotProvider/hooks/useDotProvider.js +1 -0
- package/es/Drawer/Drawer.module.css +1 -1
- package/es/emptystate/CommonEmptyState/CommonEmptyState.module.css +1 -1
- package/es/emptystate/EditionPage/EditionPage.css +2 -2
- package/es/errorstate/PermissionPlay/PermissionPlay.module.css +1 -1
- package/es/form/fields/CurrencyField/__tests__/__snapshots__/CurrencyField.spec.js.snap +1 -6
- package/es/form/fields/DateField/__tests__/__snapshots__/DateField.spec.js.snap +1 -6
- package/es/form/fields/Fields.module.css +3 -8
- package/es/form/fields/MultiSelectField/__tests__/__snapshots__/MultiSelectField.spec.js.snap +1 -3
- package/es/form/fields/PhoneField/__tests__/__snapshots__/PhoneField.spec.js.snap +1 -6
- package/es/form/fields/RadioField/RadioField.js +10 -29
- package/es/form/fields/RadioField/__tests__/RadioField.spec.js +0 -33
- package/es/form/fields/RadioField/__tests__/__snapshots__/RadioField.spec.js.snap +66 -562
- package/es/form/fields/SelectField/__tests__/__snapshots__/SelectField.spec.js.snap +1 -6
- package/es/form/fields/TagsMultiSelect/__tests__/__snapshots__/TagsMultiSelect.spec.js.snap +1 -3
- package/es/form/fields/TagsMultiSelectField/__tests__/__snapshots__/TagsMultiSelectField.spec.js.snap +1 -3
- package/es/form/fields/TextBoxField/__tests__/__snapshots__/TextBoxField.spec.js.snap +1 -6
- package/es/form/fields/TextEditor/TextEditor.js +2 -1
- package/es/form/fields/TextEditor/TextEditor.module.css +2 -2
- package/es/layout/SetupDetailLayout/SetupDetailLayout.module.css +1 -1
- package/es/list/SecondaryText/SecondaryText.module.css +6 -6
- package/es/list/Subject/Subject.module.css +3 -3
- package/es/lookup/EmptyPage/LookupEmptyPage.module.css +4 -2
- package/es/lookup/header/Search/__tests__/__snapshots__/Search.spec.js.snap +6 -18
- package/es/lookup/header/Title/LookupTitle.module.css +7 -3
- package/es/lookup/header/ViewDropDown/ViewDropDown.module.css +13 -2
- package/es/setup/header/Search/Search.module.css +1 -1
- package/es/v1/form/fields/TextEditor/TextEditor.js +2 -1
- package/es/version2/GlobalNotification/GlobalNotification.js +46 -7
- package/es/version2/GlobalNotification/GlobalNotification.module.css +3 -2
- package/es/version2/GlobalNotification/__tests__/GlobalNotification.spec.js +9 -0
- package/es/version2/GlobalNotification/props/propTypes.js +4 -3
- package/es/version2/GlobalNotification/utils/constants.js +6 -0
- package/es/version2/errorstate/V2_ErrorStates.module.css +1 -1
- package/es/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +9 -3
- package/es/version2/lookup/alertLookupCommonNew.module.css +1 -1
- package/es/version2/notification/DesktopNotification/DesktopNotification.module.css +4 -3
- package/lib/ActionButton/ActionButton.module.css +1 -1
- package/lib/AlphabeticList/AlphabeticList.module.css +1 -1
- package/lib/AudioPlayer/AudioPlayer.module.css +1 -1
- package/lib/DotProvider/hooks/useDotProvider.js +2 -0
- package/lib/Drawer/Drawer.module.css +1 -1
- package/lib/emptystate/CommonEmptyState/CommonEmptyState.module.css +1 -1
- package/lib/emptystate/EditionPage/EditionPage.css +2 -2
- package/lib/errorstate/PermissionPlay/PermissionPlay.module.css +1 -1
- package/lib/form/fields/CurrencyField/__tests__/__snapshots__/CurrencyField.spec.js.snap +1 -6
- package/lib/form/fields/DateField/__tests__/__snapshots__/DateField.spec.js.snap +1 -6
- package/lib/form/fields/Fields.module.css +3 -8
- package/lib/form/fields/MultiSelectField/__tests__/__snapshots__/MultiSelectField.spec.js.snap +1 -3
- package/lib/form/fields/PhoneField/__tests__/__snapshots__/PhoneField.spec.js.snap +1 -6
- package/lib/form/fields/RadioField/RadioField.js +11 -26
- package/lib/form/fields/RadioField/__tests__/RadioField.spec.js +0 -33
- package/lib/form/fields/RadioField/__tests__/__snapshots__/RadioField.spec.js.snap +66 -562
- package/lib/form/fields/SelectField/__tests__/__snapshots__/SelectField.spec.js.snap +1 -6
- package/lib/form/fields/TagsMultiSelect/__tests__/__snapshots__/TagsMultiSelect.spec.js.snap +1 -3
- package/lib/form/fields/TagsMultiSelectField/__tests__/__snapshots__/TagsMultiSelectField.spec.js.snap +1 -3
- package/lib/form/fields/TextBoxField/__tests__/__snapshots__/TextBoxField.spec.js.snap +1 -6
- package/lib/form/fields/TextEditor/TextEditor.js +1 -1
- package/lib/form/fields/TextEditor/TextEditor.module.css +2 -2
- package/lib/layout/SetupDetailLayout/SetupDetailLayout.module.css +1 -1
- package/lib/list/SecondaryText/SecondaryText.module.css +6 -6
- package/lib/list/Subject/Subject.module.css +3 -3
- package/lib/lookup/EmptyPage/LookupEmptyPage.module.css +4 -2
- package/lib/lookup/header/Search/__tests__/__snapshots__/Search.spec.js.snap +6 -18
- package/lib/lookup/header/Title/LookupTitle.module.css +7 -3
- package/lib/lookup/header/ViewDropDown/ViewDropDown.module.css +13 -2
- package/lib/setup/header/Search/Search.module.css +1 -1
- package/lib/v1/form/fields/TextEditor/TextEditor.js +1 -1
- package/lib/version2/GlobalNotification/GlobalNotification.js +68 -18
- package/lib/version2/GlobalNotification/GlobalNotification.module.css +3 -2
- package/lib/version2/GlobalNotification/__tests__/GlobalNotification.spec.js +10 -0
- package/lib/version2/GlobalNotification/props/propTypes.js +4 -3
- package/lib/version2/GlobalNotification/utils/constants.js +13 -0
- package/lib/version2/errorstate/V2_ErrorStates.module.css +1 -1
- package/lib/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +9 -3
- package/lib/version2/lookup/alertLookupCommonNew.module.css +1 -1
- package/lib/version2/notification/DesktopNotification/DesktopNotification.module.css +4 -3
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -2,9 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
In this Library, we Provide Some Basic Components to Build Your Application
|
|
4
4
|
|
|
5
|
-
# 1.
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
# 1.8.2
|
|
6
|
+
|
|
7
|
+
- **GlobalNotification**
|
|
8
|
+
- `onStatusChange` prop added.
|
|
9
|
+
|
|
10
|
+
# 1.8.1
|
|
11
|
+
|
|
12
|
+
- Font Family Migrated to Font-weight across all css (Impacted)
|
|
8
13
|
|
|
9
14
|
# 1.7.26
|
|
10
15
|
|
|
@@ -7,6 +7,7 @@ import '@zohodesk/variables/assets/colorVariables.module.css';
|
|
|
7
7
|
import '@zohodesk/variables/assets/dotVariables.module.css';
|
|
8
8
|
import '@zohodesk/components/es/common/basic.module.css';
|
|
9
9
|
import '@zohodesk/variables/es/fontFamilyVariables.module.css';
|
|
10
|
+
import '@zohodesk/variables/es/fontWeightVariables.module.css';
|
|
10
11
|
import '@zohodesk/components/es/common/boxShadow.module.css';
|
|
11
12
|
import "../../common/dot_boxShadow.module.css";
|
|
12
13
|
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
|
|
110
110
|
.title {
|
|
111
111
|
color: var(--zdt_drawer_title_text);
|
|
112
|
-
font-
|
|
112
|
+
font-weight: var(--zd-fw-semibold);
|
|
113
113
|
composes: dotted from '~@zohodesk/components/es/common/common.module.css';
|
|
114
114
|
font-size: var(--zd_font_size16) ;
|
|
115
115
|
}
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
}
|
|
7
7
|
.header {
|
|
8
8
|
font-size: var(--zd_font_size20) ;
|
|
9
|
-
font-
|
|
9
|
+
font-weight: var(--zd-fw-semibold);
|
|
10
10
|
margin-top: var(--zd_size16) ;
|
|
11
11
|
}
|
|
12
12
|
.description {
|
|
13
13
|
font-size: var(--zd_font_size15) ;
|
|
14
|
-
font-
|
|
14
|
+
font-weight: var(--zd-fw-semibold);
|
|
15
15
|
margin: var(--zd_size20) 0 ;
|
|
16
16
|
}
|
|
17
17
|
.content {
|
|
@@ -10,10 +10,8 @@ exports[`CurrencyField rendering the defult props 1`] = `
|
|
|
10
10
|
class="fieldContainer "
|
|
11
11
|
>
|
|
12
12
|
<div
|
|
13
|
-
class="
|
|
14
|
-
data-id="containerComponent"
|
|
13
|
+
class="varClass customContainer border_bottom effect borderColor_default hasBorder container flex rowdir"
|
|
15
14
|
data-selector-id="textBoxIcon"
|
|
16
|
-
data-test-id="containerComponent"
|
|
17
15
|
>
|
|
18
16
|
<div
|
|
19
17
|
class="grow basis shrinkOff"
|
|
@@ -45,9 +43,6 @@ exports[`CurrencyField rendering the defult props 1`] = `
|
|
|
45
43
|
data-test-id="containerComponent"
|
|
46
44
|
/>
|
|
47
45
|
</div>
|
|
48
|
-
<div
|
|
49
|
-
class="line borderColor_default "
|
|
50
|
-
/>
|
|
51
46
|
</div>
|
|
52
47
|
</div>
|
|
53
48
|
</div>
|
|
@@ -18,10 +18,8 @@ exports[`DateField rendering the defult props 1`] = `
|
|
|
18
18
|
data-test-id="dateField(formatted_undefined)_widget"
|
|
19
19
|
>
|
|
20
20
|
<div
|
|
21
|
-
class="container
|
|
22
|
-
data-id="containerComponent"
|
|
21
|
+
class="varClass customContainer border_bottom effect borderColor_default hasBorder container placeHolder flex rowdir"
|
|
23
22
|
data-selector-id="textBoxIcon"
|
|
24
|
-
data-test-id="containerComponent"
|
|
25
23
|
>
|
|
26
24
|
<div
|
|
27
25
|
class="grow basis shrinkOff"
|
|
@@ -77,9 +75,6 @@ exports[`DateField rendering the defult props 1`] = `
|
|
|
77
75
|
</div>
|
|
78
76
|
</div>
|
|
79
77
|
</div>
|
|
80
|
-
<div
|
|
81
|
-
class="line borderColor_default "
|
|
82
|
-
/>
|
|
83
78
|
</div>
|
|
84
79
|
</div>
|
|
85
80
|
</div>
|
|
@@ -71,16 +71,11 @@
|
|
|
71
71
|
}
|
|
72
72
|
.radioBox {
|
|
73
73
|
max-width: 100% ;
|
|
74
|
-
transition: border var(--zd_transition3);
|
|
75
|
-
border: 1px solid var(--zdt_radiofield_box_border);
|
|
76
|
-
border-radius: 6px;
|
|
77
|
-
}
|
|
78
|
-
.radioBox.primaryTextOnly {
|
|
79
74
|
height: var(--zd_size36) ;
|
|
75
|
+
transition: border var(--zd_transition3);
|
|
80
76
|
padding: 0 var(--zd_size10) ;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
padding: var(--zd_size18) var(--zd_size16) ;
|
|
77
|
+
border: 1px solid var(--zdt_radiofield_box_border);
|
|
78
|
+
border-radius: 6px
|
|
84
79
|
}
|
|
85
80
|
.hoverableRadioBox:hover, .radioBoxActive {
|
|
86
81
|
border-color: var(--zdt_radiofield_box_active_border)
|
package/es/form/fields/MultiSelectField/__tests__/__snapshots__/MultiSelectField.spec.js.snap
CHANGED
|
@@ -29,10 +29,8 @@ exports[`MultiSelectField rendering the defult props 1`] = `
|
|
|
29
29
|
"
|
|
30
30
|
/>
|
|
31
31
|
<div
|
|
32
|
-
class="container
|
|
33
|
-
data-id="containerComponent"
|
|
32
|
+
class="varClass customContainer effect container custmInputWrapper flex rowdir"
|
|
34
33
|
data-selector-id="textBoxIcon"
|
|
35
|
-
data-test-id="containerComponent"
|
|
36
34
|
>
|
|
37
35
|
<div
|
|
38
36
|
class="grow basis shrinkOff"
|
|
@@ -22,10 +22,8 @@ exports[`PhoneField rendering the defult props 1`] = `
|
|
|
22
22
|
class="fieldContainer "
|
|
23
23
|
>
|
|
24
24
|
<div
|
|
25
|
-
class="
|
|
26
|
-
data-id="containerComponent"
|
|
25
|
+
class="varClass customContainer border_bottom effect borderColor_default hasBorder container flex rowdir"
|
|
27
26
|
data-selector-id="textBoxIcon"
|
|
28
|
-
data-test-id="containerComponent"
|
|
29
27
|
>
|
|
30
28
|
<div
|
|
31
29
|
class="grow basis shrinkOff"
|
|
@@ -57,9 +55,6 @@ exports[`PhoneField rendering the defult props 1`] = `
|
|
|
57
55
|
data-test-id="containerComponent"
|
|
58
56
|
/>
|
|
59
57
|
</div>
|
|
60
|
-
<div
|
|
61
|
-
class="line borderColor_default "
|
|
62
|
-
/>
|
|
63
58
|
</div>
|
|
64
59
|
</div>
|
|
65
60
|
</div>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**** Libraries ****/
|
|
2
2
|
import React, { PureComponent } from 'react';
|
|
3
|
-
import { compileClassNames } from '@zohodesk/utils';
|
|
4
3
|
import { defaultProps } from "./props/defaultProps";
|
|
5
4
|
import { propTypes } from "./props/propTypes";
|
|
6
5
|
/**** Components ****/
|
|
@@ -129,31 +128,14 @@ export default class RadioField extends PureComponent {
|
|
|
129
128
|
value,
|
|
130
129
|
disabled = false,
|
|
131
130
|
tooltip,
|
|
132
|
-
infoTooltip
|
|
133
|
-
secondaryText,
|
|
134
|
-
renderRightPlaceholderNode,
|
|
135
|
-
customProps
|
|
131
|
+
infoTooltip
|
|
136
132
|
} = option;
|
|
137
133
|
let isDisabledState = disabled || isDisabled;
|
|
138
134
|
let isChecked = selectedValue == value;
|
|
139
|
-
const rightPlaceholderNode = !!infoTooltip ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Icon, {
|
|
140
|
-
name: "ZD-GN-info",
|
|
141
|
-
size: "16",
|
|
142
|
-
title: infoTooltip,
|
|
143
|
-
iconClass: style.infoIcon,
|
|
144
|
-
...InfoIconProps
|
|
145
|
-
}), renderRightPlaceholderNode) : renderRightPlaceholderNode;
|
|
146
|
-
const radioBoxClasses = isBoxStyle ? compileClassNames({
|
|
147
|
-
[style.radioBox]: true,
|
|
148
|
-
[style.withSecondaryText]: !!secondaryText,
|
|
149
|
-
[style.primaryTextOnly]: !secondaryText,
|
|
150
|
-
[style.hoverableRadioBox]: !isDisabledState,
|
|
151
|
-
[style.radioBoxActive]: isChecked
|
|
152
|
-
}) : '';
|
|
153
135
|
return /*#__PURE__*/React.createElement("span", {
|
|
154
136
|
key: index,
|
|
155
137
|
className: `${!isBoxStyle ? style.radio : ''} ${style.radioWrap}`
|
|
156
|
-
}, /*#__PURE__*/React.createElement(Radio, {
|
|
138
|
+
}, /*#__PURE__*/React.createElement(Radio, {
|
|
157
139
|
id: index,
|
|
158
140
|
value: value,
|
|
159
141
|
name: id,
|
|
@@ -171,23 +153,22 @@ export default class RadioField extends PureComponent {
|
|
|
171
153
|
dataId: dataId,
|
|
172
154
|
isReadOnly: isReadOnly,
|
|
173
155
|
variant: variant,
|
|
174
|
-
secondaryText: secondaryText,
|
|
175
156
|
...RadioProps,
|
|
176
157
|
a11y: {
|
|
177
158
|
tabIndex: !!selectedValue ? isChecked ? '0' : '-1' : index === 0 ? '0' : '-1',
|
|
178
159
|
...RadioProps.a11y
|
|
179
160
|
},
|
|
180
161
|
customClass: {
|
|
181
|
-
customRadioWrap:
|
|
162
|
+
customRadioWrap: isBoxStyle ? `${style.radioBox} ${!isDisabledState ? style.hoverableRadioBox : ''} ${isChecked ? style.radioBoxActive : ''}` : '',
|
|
182
163
|
...RadioProps.customClass
|
|
183
|
-
},
|
|
184
|
-
customProps: {
|
|
185
|
-
LabelProps: { ...(RadioProps.customProps ? RadioProps.customProps.LabelProps : undefined),
|
|
186
|
-
renderRightPlaceholderNode: rightPlaceholderNode
|
|
187
|
-
},
|
|
188
|
-
...RadioProps.customProps
|
|
189
164
|
}
|
|
190
|
-
}
|
|
165
|
+
}, !!infoTooltip ? /*#__PURE__*/React.createElement(Icon, {
|
|
166
|
+
name: "ZD-GN-info",
|
|
167
|
+
size: "16",
|
|
168
|
+
title: infoTooltip,
|
|
169
|
+
iconClass: style.infoIcon,
|
|
170
|
+
...InfoIconProps
|
|
171
|
+
}) : null));
|
|
191
172
|
})), validationMessage && /*#__PURE__*/React.createElement(ValidationMessage, {
|
|
192
173
|
text: validationMessage,
|
|
193
174
|
palette: validationPalette,
|
|
@@ -17,22 +17,6 @@ const options = [{
|
|
|
17
17
|
text: 'Kolkata',
|
|
18
18
|
value: '4'
|
|
19
19
|
}];
|
|
20
|
-
let optionsWithsecondaryText = [{
|
|
21
|
-
text: 'Chennai',
|
|
22
|
-
value: '1',
|
|
23
|
-
secondaryText: 'Tamil Nadu Capital'
|
|
24
|
-
}, {
|
|
25
|
-
text: 'Mumbai',
|
|
26
|
-
value: '2',
|
|
27
|
-
secondaryText: 'Maharashtra Capital',
|
|
28
|
-
tooltip: 'Disabled Option',
|
|
29
|
-
disabled: true
|
|
30
|
-
}, {
|
|
31
|
-
text: 'Delhi',
|
|
32
|
-
value: '3',
|
|
33
|
-
secondaryText: 'Capital of India',
|
|
34
|
-
infoTooltip: 'Capital of India'
|
|
35
|
-
}];
|
|
36
20
|
describe('RadioField', () => {
|
|
37
21
|
test('rendering the defult props', () => {
|
|
38
22
|
const {
|
|
@@ -59,21 +43,4 @@ describe('RadioField', () => {
|
|
|
59
43
|
}));
|
|
60
44
|
expect(asFragment()).toMatchSnapshot();
|
|
61
45
|
});
|
|
62
|
-
test('rendering with secondaryTextOptions', () => {
|
|
63
|
-
const {
|
|
64
|
-
asFragment
|
|
65
|
-
} = render( /*#__PURE__*/React.createElement(RadioField, {
|
|
66
|
-
options: optionsWithsecondaryText
|
|
67
|
-
}));
|
|
68
|
-
expect(asFragment()).toMatchSnapshot();
|
|
69
|
-
});
|
|
70
|
-
test('rendering with secondaryTextOptions & isBoxStyle', () => {
|
|
71
|
-
const {
|
|
72
|
-
asFragment
|
|
73
|
-
} = render( /*#__PURE__*/React.createElement(RadioField, {
|
|
74
|
-
options: optionsWithsecondaryText,
|
|
75
|
-
isBoxStyle: true
|
|
76
|
-
}));
|
|
77
|
-
expect(asFragment()).toMatchSnapshot();
|
|
78
|
-
});
|
|
79
46
|
});
|