@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.
Files changed (82) hide show
  1. package/README.md +8 -3
  2. package/es/ActionButton/ActionButton.module.css +1 -1
  3. package/es/AlphabeticList/AlphabeticList.module.css +1 -1
  4. package/es/AudioPlayer/AudioPlayer.module.css +1 -1
  5. package/es/DotProvider/hooks/useDotProvider.js +1 -0
  6. package/es/Drawer/Drawer.module.css +1 -1
  7. package/es/emptystate/CommonEmptyState/CommonEmptyState.module.css +1 -1
  8. package/es/emptystate/EditionPage/EditionPage.css +2 -2
  9. package/es/errorstate/PermissionPlay/PermissionPlay.module.css +1 -1
  10. package/es/form/fields/CurrencyField/__tests__/__snapshots__/CurrencyField.spec.js.snap +1 -6
  11. package/es/form/fields/DateField/__tests__/__snapshots__/DateField.spec.js.snap +1 -6
  12. package/es/form/fields/Fields.module.css +3 -8
  13. package/es/form/fields/MultiSelectField/__tests__/__snapshots__/MultiSelectField.spec.js.snap +1 -3
  14. package/es/form/fields/PhoneField/__tests__/__snapshots__/PhoneField.spec.js.snap +1 -6
  15. package/es/form/fields/RadioField/RadioField.js +10 -29
  16. package/es/form/fields/RadioField/__tests__/RadioField.spec.js +0 -33
  17. package/es/form/fields/RadioField/__tests__/__snapshots__/RadioField.spec.js.snap +66 -562
  18. package/es/form/fields/SelectField/__tests__/__snapshots__/SelectField.spec.js.snap +1 -6
  19. package/es/form/fields/TagsMultiSelect/__tests__/__snapshots__/TagsMultiSelect.spec.js.snap +1 -3
  20. package/es/form/fields/TagsMultiSelectField/__tests__/__snapshots__/TagsMultiSelectField.spec.js.snap +1 -3
  21. package/es/form/fields/TextBoxField/__tests__/__snapshots__/TextBoxField.spec.js.snap +1 -6
  22. package/es/form/fields/TextEditor/TextEditor.js +2 -1
  23. package/es/form/fields/TextEditor/TextEditor.module.css +2 -2
  24. package/es/layout/SetupDetailLayout/SetupDetailLayout.module.css +1 -1
  25. package/es/list/SecondaryText/SecondaryText.module.css +6 -6
  26. package/es/list/Subject/Subject.module.css +3 -3
  27. package/es/lookup/EmptyPage/LookupEmptyPage.module.css +4 -2
  28. package/es/lookup/header/Search/__tests__/__snapshots__/Search.spec.js.snap +6 -18
  29. package/es/lookup/header/Title/LookupTitle.module.css +7 -3
  30. package/es/lookup/header/ViewDropDown/ViewDropDown.module.css +13 -2
  31. package/es/setup/header/Search/Search.module.css +1 -1
  32. package/es/v1/form/fields/TextEditor/TextEditor.js +2 -1
  33. package/es/version2/GlobalNotification/GlobalNotification.js +46 -7
  34. package/es/version2/GlobalNotification/GlobalNotification.module.css +3 -2
  35. package/es/version2/GlobalNotification/__tests__/GlobalNotification.spec.js +9 -0
  36. package/es/version2/GlobalNotification/props/propTypes.js +4 -3
  37. package/es/version2/GlobalNotification/utils/constants.js +6 -0
  38. package/es/version2/errorstate/V2_ErrorStates.module.css +1 -1
  39. package/es/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +9 -3
  40. package/es/version2/lookup/alertLookupCommonNew.module.css +1 -1
  41. package/es/version2/notification/DesktopNotification/DesktopNotification.module.css +4 -3
  42. package/lib/ActionButton/ActionButton.module.css +1 -1
  43. package/lib/AlphabeticList/AlphabeticList.module.css +1 -1
  44. package/lib/AudioPlayer/AudioPlayer.module.css +1 -1
  45. package/lib/DotProvider/hooks/useDotProvider.js +2 -0
  46. package/lib/Drawer/Drawer.module.css +1 -1
  47. package/lib/emptystate/CommonEmptyState/CommonEmptyState.module.css +1 -1
  48. package/lib/emptystate/EditionPage/EditionPage.css +2 -2
  49. package/lib/errorstate/PermissionPlay/PermissionPlay.module.css +1 -1
  50. package/lib/form/fields/CurrencyField/__tests__/__snapshots__/CurrencyField.spec.js.snap +1 -6
  51. package/lib/form/fields/DateField/__tests__/__snapshots__/DateField.spec.js.snap +1 -6
  52. package/lib/form/fields/Fields.module.css +3 -8
  53. package/lib/form/fields/MultiSelectField/__tests__/__snapshots__/MultiSelectField.spec.js.snap +1 -3
  54. package/lib/form/fields/PhoneField/__tests__/__snapshots__/PhoneField.spec.js.snap +1 -6
  55. package/lib/form/fields/RadioField/RadioField.js +11 -26
  56. package/lib/form/fields/RadioField/__tests__/RadioField.spec.js +0 -33
  57. package/lib/form/fields/RadioField/__tests__/__snapshots__/RadioField.spec.js.snap +66 -562
  58. package/lib/form/fields/SelectField/__tests__/__snapshots__/SelectField.spec.js.snap +1 -6
  59. package/lib/form/fields/TagsMultiSelect/__tests__/__snapshots__/TagsMultiSelect.spec.js.snap +1 -3
  60. package/lib/form/fields/TagsMultiSelectField/__tests__/__snapshots__/TagsMultiSelectField.spec.js.snap +1 -3
  61. package/lib/form/fields/TextBoxField/__tests__/__snapshots__/TextBoxField.spec.js.snap +1 -6
  62. package/lib/form/fields/TextEditor/TextEditor.js +1 -1
  63. package/lib/form/fields/TextEditor/TextEditor.module.css +2 -2
  64. package/lib/layout/SetupDetailLayout/SetupDetailLayout.module.css +1 -1
  65. package/lib/list/SecondaryText/SecondaryText.module.css +6 -6
  66. package/lib/list/Subject/Subject.module.css +3 -3
  67. package/lib/lookup/EmptyPage/LookupEmptyPage.module.css +4 -2
  68. package/lib/lookup/header/Search/__tests__/__snapshots__/Search.spec.js.snap +6 -18
  69. package/lib/lookup/header/Title/LookupTitle.module.css +7 -3
  70. package/lib/lookup/header/ViewDropDown/ViewDropDown.module.css +13 -2
  71. package/lib/setup/header/Search/Search.module.css +1 -1
  72. package/lib/v1/form/fields/TextEditor/TextEditor.js +1 -1
  73. package/lib/version2/GlobalNotification/GlobalNotification.js +68 -18
  74. package/lib/version2/GlobalNotification/GlobalNotification.module.css +3 -2
  75. package/lib/version2/GlobalNotification/__tests__/GlobalNotification.spec.js +10 -0
  76. package/lib/version2/GlobalNotification/props/propTypes.js +4 -3
  77. package/lib/version2/GlobalNotification/utils/constants.js +13 -0
  78. package/lib/version2/errorstate/V2_ErrorStates.module.css +1 -1
  79. package/lib/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +9 -3
  80. package/lib/version2/lookup/alertLookupCommonNew.module.css +1 -1
  81. package/lib/version2/notification/DesktopNotification/DesktopNotification.module.css +4 -3
  82. 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.7.27
6
- - **RadioField**
7
- - Supports the `secondaryText`, `renderRightPlaceholderNode` & `customProps` via the `option` prop.
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
 
@@ -98,7 +98,7 @@
98
98
 
99
99
  .txt {
100
100
  font-size: var(--zd_font_size13) ;
101
- font-family: var(--zd_semibold);
101
+ font-weight: var(--zd-fw-semibold);
102
102
  text-transform: capitalize;
103
103
  }
104
104
 
@@ -53,5 +53,5 @@
53
53
  }
54
54
  .title {
55
55
  font-size: var(--zd_font_size11) ;
56
- font-family: var(--zd_semibold);
56
+ font-weight: var(--zd-fw-semibold);
57
57
  }
@@ -74,7 +74,7 @@
74
74
  .line {
75
75
  color: var(--zdt_audioplayer_line_text);
76
76
  font-size: var(--zd_font_size13) ;
77
- font-family: var(--zd_semibold);
77
+ font-weight: var(--zd-fw-semibold);
78
78
  }
79
79
 
80
80
  .disable {
@@ -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-family: var(--zd_semibold);
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
  }
@@ -20,7 +20,7 @@
20
20
  max-width: var(--zd_size430) ;
21
21
  }
22
22
  .title {
23
- font-family: var(--zd_semibold);
23
+ font-weight: var(--zd-fw-semibold);
24
24
  color: var(--titleColor);
25
25
  word-wrap: break-word;
26
26
  }
@@ -6,12 +6,12 @@
6
6
  }
7
7
  .header {
8
8
  font-size: var(--zd_font_size20) ;
9
- font-family: var(--zd_semibold);
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-family: var(--zd_semibold);
14
+ font-weight: var(--zd-fw-semibold);
15
15
  margin: var(--zd_size20) 0 ;
16
16
  }
17
17
  .content {
@@ -1,5 +1,5 @@
1
1
  .headtingText {
2
- font-family: var(--zd_semibold);
2
+ font-weight: var(--zd-fw-semibold);
3
3
  font-size: var(--zd_font_size50) ;
4
4
  letter-spacing: var(--zd_size1);
5
5
  margin-bottom: var(--zd_size5) ;
@@ -10,10 +10,8 @@ exports[`CurrencyField rendering the defult props 1`] = `
10
10
  class="fieldContainer "
11
11
  >
12
12
  <div
13
- class="container effect flex rowdir"
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 effect placeHolder flex rowdir"
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
- .radioBox.withSecondaryText {
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)
@@ -29,10 +29,8 @@ exports[`MultiSelectField rendering the defult props 1`] = `
29
29
  "
30
30
  />
31
31
  <div
32
- class="container effect custmInputWrapper flex rowdir"
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="container effect flex rowdir"
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, { ...customProps,
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: radioBoxClasses,
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
  });