@zohodesk/dot 1.0.0-temp-226 → 1.0.0-temp-227

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 (128) hide show
  1. package/README.md +10 -0
  2. package/assets/Appearance/dark/mode/Dot_DarkMode.module.css +593 -0
  3. package/assets/Appearance/dark/themes/blue/blue_DotTheme_DarkTheme.module.css +26 -0
  4. package/assets/Appearance/dark/themes/green/green_DotTheme_DarkTheme.module.css +26 -0
  5. package/assets/Appearance/dark/themes/orange/orange_DotTheme_DarkTheme.module.css +26 -0
  6. package/assets/Appearance/dark/themes/red/red_DotTheme_DarkTheme.module.css +26 -0
  7. package/assets/Appearance/dark/themes/yellow/yellow_DotTheme_DarkTheme.module.css +26 -0
  8. package/assets/Appearance/light/mode/Dot_LightMode.module.css +593 -0
  9. package/assets/Appearance/light/themes/blue/blue_DotTheme_LightTheme.module.css +26 -0
  10. package/assets/Appearance/light/themes/green/green_DotTheme_LightTheme.module.css +26 -0
  11. package/assets/Appearance/light/themes/orange/orange_DotTheme_LightTheme.module.css +26 -0
  12. package/assets/Appearance/light/themes/red/red_DotTheme_LightTheme.module.css +26 -0
  13. package/assets/Appearance/light/themes/yellow/yellow_DotTheme_LightTheme.module.css +26 -0
  14. package/assets/Appearance/pureDark/mode/Dot_PureDarkMode.module.css +593 -0
  15. package/assets/Appearance/pureDark/themes/blue/blue_DotTheme_PureDarkTheme.module.css +26 -0
  16. package/assets/Appearance/pureDark/themes/green/green_DotTheme_PureDarkTheme.module.css +26 -0
  17. package/assets/Appearance/pureDark/themes/orange/orange_DotTheme_PureDarkTheme.module.css +26 -0
  18. package/assets/Appearance/pureDark/themes/red/red_DotTheme_PureDarkTheme.module.css +26 -0
  19. package/assets/Appearance/pureDark/themes/yellow/yellow_DotTheme_PureDarkTheme.module.css +26 -0
  20. package/es/DotProvider/hooks/useDotProvider.js +3 -3
  21. package/es/DotProvider/libraryChunks/themes/component/blue/Blue_Dark_Component.js +2 -0
  22. package/es/DotProvider/libraryChunks/themes/component/blue/Blue_Light_Component.js +2 -0
  23. package/es/DotProvider/libraryChunks/themes/component/blue/Blue_PureDark_Component.js +2 -0
  24. package/es/DotProvider/libraryChunks/themes/component/green/Green_Dark_Component.js +2 -0
  25. package/es/DotProvider/libraryChunks/themes/component/green/Green_Light_Component.js +2 -0
  26. package/es/DotProvider/libraryChunks/themes/component/green/Green_PureDark_Component.js +2 -0
  27. package/es/DotProvider/libraryChunks/themes/component/orange/Orange_Dark_Component.js +2 -0
  28. package/es/DotProvider/libraryChunks/themes/component/orange/Orange_Light_Component.js +2 -0
  29. package/es/DotProvider/libraryChunks/themes/component/orange/Orange_PureDark_Component.js +2 -0
  30. package/es/DotProvider/libraryChunks/themes/component/red/Red_Dark_Component.js +2 -0
  31. package/es/DotProvider/libraryChunks/themes/component/red/Red_Light_Component.js +2 -0
  32. package/es/DotProvider/libraryChunks/themes/component/red/Red_PureDark_Component.js +2 -0
  33. package/es/DotProvider/libraryChunks/themes/component/yellow/Yellow_Dark_Component.js +2 -0
  34. package/es/DotProvider/libraryChunks/themes/component/yellow/Yellow_Light_Component.js +2 -0
  35. package/es/DotProvider/libraryChunks/themes/component/yellow/Yellow_PureDark_Component.js +2 -0
  36. package/es/DotProvider/utils/constants.js +1 -2
  37. package/es/DotProvider/utils/themeAppearanceAssetsConfig.js +1 -15
  38. package/es/DotProvider/utils/themeColorAssetsConfig.js +1 -73
  39. package/es/list/Comment/Comment.module.css +29 -29
  40. package/es/list/Dot/Dot.module.css +15 -15
  41. package/es/list/ListLayout/ListLayout.module.css +79 -79
  42. package/es/lookup/Lookup/Lookup.js +6 -4
  43. package/es/lookup/Lookup/__tests__/Lookup.spec.js +101 -4
  44. package/es/lookup/Lookup/__tests__/__snapshots__/Lookup.spec.js.snap +223 -2
  45. package/es/lookup/Lookup/props/propTypes.js +6 -1
  46. package/es/lookup/header/ModuleHeader/ModuleHeader.js +12 -5
  47. package/es/lookup/header/ModuleHeader/__tests__/ModuleHeader.spec.js +87 -3
  48. package/es/lookup/header/ModuleHeader/props/defaultProps.js +2 -0
  49. package/es/lookup/header/ModuleHeader/props/propTypes.js +6 -0
  50. package/es/version2/lookup/AlertHeader/AlertHeader.js +19 -9
  51. package/es/version2/lookup/AlertHeader/__tests__/AlertHeader.spec.js +122 -3
  52. package/es/version2/lookup/AlertHeader/__tests__/__snapshots__/AlertHeader.spec.js.snap +1728 -3
  53. package/es/version2/lookup/AlertHeader/css/cssJSLogic.js +6 -1
  54. package/es/version2/lookup/AlertHeader/props/defaultProps.js +2 -0
  55. package/es/version2/lookup/AlertHeader/props/propTypes.js +10 -0
  56. package/lib/DotProvider/hooks/useDotProvider.js +3 -3
  57. package/lib/DotProvider/libraryChunks/themes/component/blue/Blue_Dark_Component.js +4 -0
  58. package/lib/DotProvider/libraryChunks/themes/component/blue/Blue_Light_Component.js +4 -0
  59. package/lib/DotProvider/libraryChunks/themes/component/blue/Blue_PureDark_Component.js +4 -0
  60. package/lib/DotProvider/libraryChunks/themes/component/green/Green_Dark_Component.js +4 -0
  61. package/lib/DotProvider/libraryChunks/themes/component/green/Green_Light_Component.js +4 -0
  62. package/lib/DotProvider/libraryChunks/themes/component/green/Green_PureDark_Component.js +4 -0
  63. package/lib/DotProvider/libraryChunks/themes/component/orange/Orange_Dark_Component.js +4 -0
  64. package/lib/DotProvider/libraryChunks/themes/component/orange/Orange_Light_Component.js +4 -0
  65. package/lib/DotProvider/libraryChunks/themes/component/orange/Orange_PureDark_Component.js +4 -0
  66. package/lib/DotProvider/libraryChunks/themes/component/red/Red_Dark_Component.js +4 -0
  67. package/lib/DotProvider/libraryChunks/themes/component/red/Red_Light_Component.js +4 -0
  68. package/lib/DotProvider/libraryChunks/themes/component/red/Red_PureDark_Component.js +4 -0
  69. package/lib/DotProvider/libraryChunks/themes/component/yellow/Yellow_Dark_Component.js +4 -0
  70. package/lib/DotProvider/libraryChunks/themes/component/yellow/Yellow_Light_Component.js +4 -0
  71. package/lib/DotProvider/libraryChunks/themes/component/yellow/Yellow_PureDark_Component.js +4 -0
  72. package/lib/DotProvider/utils/constants.js +2 -4
  73. package/lib/DotProvider/utils/themeAppearanceAssetsConfig.js +2 -17
  74. package/lib/DotProvider/utils/themeColorAssetsConfig.js +2 -77
  75. package/lib/list/Comment/Comment.module.css +29 -29
  76. package/lib/list/Dot/Dot.module.css +15 -15
  77. package/lib/list/ListLayout/ListLayout.module.css +79 -79
  78. package/lib/lookup/Lookup/Lookup.js +6 -4
  79. package/lib/lookup/Lookup/__tests__/Lookup.spec.js +101 -4
  80. package/lib/lookup/Lookup/__tests__/__snapshots__/Lookup.spec.js.snap +223 -2
  81. package/lib/lookup/Lookup/props/propTypes.js +8 -1
  82. package/lib/lookup/header/ModuleHeader/ModuleHeader.js +13 -5
  83. package/lib/lookup/header/ModuleHeader/__tests__/ModuleHeader.spec.js +86 -2
  84. package/lib/lookup/header/ModuleHeader/props/defaultProps.js +2 -0
  85. package/lib/lookup/header/ModuleHeader/props/propTypes.js +6 -0
  86. package/lib/version2/lookup/AlertHeader/AlertHeader.js +19 -8
  87. package/lib/version2/lookup/AlertHeader/__tests__/AlertHeader.spec.js +121 -2
  88. package/lib/version2/lookup/AlertHeader/__tests__/__snapshots__/AlertHeader.spec.js.snap +1728 -3
  89. package/lib/version2/lookup/AlertHeader/css/cssJSLogic.js +4 -2
  90. package/lib/version2/lookup/AlertHeader/props/defaultProps.js +2 -0
  91. package/lib/version2/lookup/AlertHeader/props/propTypes.js +10 -0
  92. package/package.json +6 -6
  93. package/es/DotProvider/libraryChunks/appearance/variables/Dark_Variables.js +0 -1
  94. package/es/DotProvider/libraryChunks/appearance/variables/Light_Variables.js +0 -1
  95. package/es/DotProvider/libraryChunks/appearance/variables/PureDark_Variables.js +0 -1
  96. package/es/DotProvider/libraryChunks/themes/variables/blue/Blue_Dark_Variables.js +0 -2
  97. package/es/DotProvider/libraryChunks/themes/variables/blue/Blue_Light_Variables.js +0 -2
  98. package/es/DotProvider/libraryChunks/themes/variables/blue/Blue_PureDark_Variables.js +0 -2
  99. package/es/DotProvider/libraryChunks/themes/variables/green/Green_Dark_Variables.js +0 -2
  100. package/es/DotProvider/libraryChunks/themes/variables/green/Green_Light_Variables.js +0 -2
  101. package/es/DotProvider/libraryChunks/themes/variables/green/Green_PureDark_Variables.js +0 -2
  102. package/es/DotProvider/libraryChunks/themes/variables/orange/Orange_Dark_Variables.js +0 -2
  103. package/es/DotProvider/libraryChunks/themes/variables/orange/Orange_Light_Variables.js +0 -2
  104. package/es/DotProvider/libraryChunks/themes/variables/orange/Orange_PureDark_Variables.js +0 -2
  105. package/es/DotProvider/libraryChunks/themes/variables/red/Red_Dark_Variables.js +0 -2
  106. package/es/DotProvider/libraryChunks/themes/variables/red/Red_Light_Variables.js +0 -2
  107. package/es/DotProvider/libraryChunks/themes/variables/red/Red_PureDark_Variables.js +0 -2
  108. package/es/DotProvider/libraryChunks/themes/variables/yellow/Yellow_Dark_Variables.js +0 -2
  109. package/es/DotProvider/libraryChunks/themes/variables/yellow/Yellow_Light_Variables.js +0 -2
  110. package/es/DotProvider/libraryChunks/themes/variables/yellow/Yellow_PureDark_Variables.js +0 -2
  111. package/lib/DotProvider/libraryChunks/appearance/variables/Dark_Variables.js +0 -3
  112. package/lib/DotProvider/libraryChunks/appearance/variables/Light_Variables.js +0 -3
  113. package/lib/DotProvider/libraryChunks/appearance/variables/PureDark_Variables.js +0 -3
  114. package/lib/DotProvider/libraryChunks/themes/variables/blue/Blue_Dark_Variables.js +0 -5
  115. package/lib/DotProvider/libraryChunks/themes/variables/blue/Blue_Light_Variables.js +0 -5
  116. package/lib/DotProvider/libraryChunks/themes/variables/blue/Blue_PureDark_Variables.js +0 -5
  117. package/lib/DotProvider/libraryChunks/themes/variables/green/Green_Dark_Variables.js +0 -5
  118. package/lib/DotProvider/libraryChunks/themes/variables/green/Green_Light_Variables.js +0 -5
  119. package/lib/DotProvider/libraryChunks/themes/variables/green/Green_PureDark_Variables.js +0 -5
  120. package/lib/DotProvider/libraryChunks/themes/variables/orange/Orange_Dark_Variables.js +0 -5
  121. package/lib/DotProvider/libraryChunks/themes/variables/orange/Orange_Light_Variables.js +0 -5
  122. package/lib/DotProvider/libraryChunks/themes/variables/orange/Orange_PureDark_Variables.js +0 -5
  123. package/lib/DotProvider/libraryChunks/themes/variables/red/Red_Dark_Variables.js +0 -5
  124. package/lib/DotProvider/libraryChunks/themes/variables/red/Red_Light_Variables.js +0 -5
  125. package/lib/DotProvider/libraryChunks/themes/variables/red/Red_PureDark_Variables.js +0 -5
  126. package/lib/DotProvider/libraryChunks/themes/variables/yellow/Yellow_Dark_Variables.js +0 -5
  127. package/lib/DotProvider/libraryChunks/themes/variables/yellow/Yellow_Light_Variables.js +0 -5
  128. package/lib/DotProvider/libraryChunks/themes/variables/yellow/Yellow_PureDark_Variables.js +0 -5
@@ -1,11 +1,130 @@
1
1
  import React from 'react';
2
- import { render } from '@testing-library/react';
2
+ import { render, cleanup } from '@testing-library/react';
3
3
  import AlertHeader from "../AlertHeader";
4
- describe('AlertHeader', () => {
5
- test('rendering the defult props', () => {
4
+ const TYPE_VALUES = ['success', 'error', 'warning', 'info', 'notification'];
5
+ afterEach(() => {
6
+ cleanup();
7
+ });
8
+ describe('AlertHeader snapshot - ', () => {
9
+ test('Render with default props', () => {
6
10
  const {
7
11
  asFragment
8
12
  } = render( /*#__PURE__*/React.createElement(AlertHeader, null));
9
13
  expect(asFragment()).toMatchSnapshot();
10
14
  });
15
+ test.each(TYPE_VALUES)('Render with type=%s', type => {
16
+ const {
17
+ asFragment
18
+ } = render( /*#__PURE__*/React.createElement(AlertHeader, {
19
+ title: "Alert Title",
20
+ type: type
21
+ }));
22
+ expect(asFragment()).toMatchSnapshot();
23
+ });
24
+ test('Render with needIcon=false', () => {
25
+ const {
26
+ asFragment
27
+ } = render( /*#__PURE__*/React.createElement(AlertHeader, {
28
+ title: "Alert Title",
29
+ needIcon: false
30
+ }));
31
+ expect(asFragment()).toMatchSnapshot();
32
+ });
33
+ test('Render with breakChildren=true', () => {
34
+ const {
35
+ asFragment
36
+ } = render( /*#__PURE__*/React.createElement(AlertHeader, {
37
+ title: "Alert Title",
38
+ breakChildren: true
39
+ }));
40
+ expect(asFragment()).toMatchSnapshot();
41
+ });
42
+ test('Render with onClose', () => {
43
+ const {
44
+ asFragment
45
+ } = render( /*#__PURE__*/React.createElement(AlertHeader, {
46
+ title: "Alert Title",
47
+ onClose: () => {}
48
+ }));
49
+ expect(asFragment()).toMatchSnapshot();
50
+ });
51
+ test('Render with title', () => {
52
+ const {
53
+ asFragment
54
+ } = render( /*#__PURE__*/React.createElement(AlertHeader, {
55
+ title: "Alert Title"
56
+ }));
57
+ expect(asFragment()).toMatchSnapshot();
58
+ });
59
+ test('Render with isDraggable=false', () => {
60
+ const {
61
+ asFragment
62
+ } = render( /*#__PURE__*/React.createElement(AlertHeader, {
63
+ title: "Alert Title",
64
+ isDraggable: false
65
+ }));
66
+ expect(asFragment()).toMatchSnapshot();
67
+ });
68
+ test('Render with children', () => {
69
+ const {
70
+ asFragment
71
+ } = render( /*#__PURE__*/React.createElement(AlertHeader, {
72
+ title: "Alert Title"
73
+ }, /*#__PURE__*/React.createElement("span", null, "Child content")));
74
+ expect(asFragment()).toMatchSnapshot();
75
+ });
76
+ test('Render with customClass', () => {
77
+ const {
78
+ asFragment
79
+ } = render( /*#__PURE__*/React.createElement(AlertHeader, {
80
+ title: "Alert Title",
81
+ onClose: () => {},
82
+ customClass: {
83
+ title: 'custom-title-class',
84
+ iconContainer: 'custom-icon-class',
85
+ close: 'custom-close-class'
86
+ }
87
+ }));
88
+ expect(asFragment()).toMatchSnapshot();
89
+ });
90
+ test('Render with renderCustomIcon', () => {
91
+ const {
92
+ asFragment
93
+ } = render( /*#__PURE__*/React.createElement(AlertHeader, {
94
+ title: "Alert Title",
95
+ renderCustomIcon: /*#__PURE__*/React.createElement("span", null, "Custom Icon")
96
+ }));
97
+ expect(asFragment()).toMatchSnapshot();
98
+ });
99
+ test('Render with renderSecondaryContent', () => {
100
+ const {
101
+ asFragment
102
+ } = render( /*#__PURE__*/React.createElement(AlertHeader, {
103
+ title: "Alert Title",
104
+ renderSecondaryContent: /*#__PURE__*/React.createElement("span", null, "Secondary")
105
+ }));
106
+ expect(asFragment()).toMatchSnapshot();
107
+ });
108
+ test('Render with renderRightActions', () => {
109
+ const {
110
+ asFragment
111
+ } = render( /*#__PURE__*/React.createElement(AlertHeader, {
112
+ title: "Alert Title",
113
+ renderRightActions: /*#__PURE__*/React.createElement("button", {
114
+ type: "button"
115
+ }, "Action")
116
+ }));
117
+ expect(asFragment()).toMatchSnapshot();
118
+ });
119
+ test('Render with dataId and htmlId', () => {
120
+ const {
121
+ asFragment
122
+ } = render( /*#__PURE__*/React.createElement(AlertHeader, {
123
+ title: "Alert Title",
124
+ htmlId: "alert-header-title",
125
+ dataId: "alert-header",
126
+ onClose: () => {}
127
+ }));
128
+ expect(asFragment()).toMatchSnapshot();
129
+ });
11
130
  });