@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.
- package/README.md +10 -0
- package/assets/Appearance/dark/mode/Dot_DarkMode.module.css +593 -0
- package/assets/Appearance/dark/themes/blue/blue_DotTheme_DarkTheme.module.css +26 -0
- package/assets/Appearance/dark/themes/green/green_DotTheme_DarkTheme.module.css +26 -0
- package/assets/Appearance/dark/themes/orange/orange_DotTheme_DarkTheme.module.css +26 -0
- package/assets/Appearance/dark/themes/red/red_DotTheme_DarkTheme.module.css +26 -0
- package/assets/Appearance/dark/themes/yellow/yellow_DotTheme_DarkTheme.module.css +26 -0
- package/assets/Appearance/light/mode/Dot_LightMode.module.css +593 -0
- package/assets/Appearance/light/themes/blue/blue_DotTheme_LightTheme.module.css +26 -0
- package/assets/Appearance/light/themes/green/green_DotTheme_LightTheme.module.css +26 -0
- package/assets/Appearance/light/themes/orange/orange_DotTheme_LightTheme.module.css +26 -0
- package/assets/Appearance/light/themes/red/red_DotTheme_LightTheme.module.css +26 -0
- package/assets/Appearance/light/themes/yellow/yellow_DotTheme_LightTheme.module.css +26 -0
- package/assets/Appearance/pureDark/mode/Dot_PureDarkMode.module.css +593 -0
- package/assets/Appearance/pureDark/themes/blue/blue_DotTheme_PureDarkTheme.module.css +26 -0
- package/assets/Appearance/pureDark/themes/green/green_DotTheme_PureDarkTheme.module.css +26 -0
- package/assets/Appearance/pureDark/themes/orange/orange_DotTheme_PureDarkTheme.module.css +26 -0
- package/assets/Appearance/pureDark/themes/red/red_DotTheme_PureDarkTheme.module.css +26 -0
- package/assets/Appearance/pureDark/themes/yellow/yellow_DotTheme_PureDarkTheme.module.css +26 -0
- package/es/DotProvider/hooks/useDotProvider.js +3 -3
- package/es/DotProvider/libraryChunks/themes/component/blue/Blue_Dark_Component.js +2 -0
- package/es/DotProvider/libraryChunks/themes/component/blue/Blue_Light_Component.js +2 -0
- package/es/DotProvider/libraryChunks/themes/component/blue/Blue_PureDark_Component.js +2 -0
- package/es/DotProvider/libraryChunks/themes/component/green/Green_Dark_Component.js +2 -0
- package/es/DotProvider/libraryChunks/themes/component/green/Green_Light_Component.js +2 -0
- package/es/DotProvider/libraryChunks/themes/component/green/Green_PureDark_Component.js +2 -0
- package/es/DotProvider/libraryChunks/themes/component/orange/Orange_Dark_Component.js +2 -0
- package/es/DotProvider/libraryChunks/themes/component/orange/Orange_Light_Component.js +2 -0
- package/es/DotProvider/libraryChunks/themes/component/orange/Orange_PureDark_Component.js +2 -0
- package/es/DotProvider/libraryChunks/themes/component/red/Red_Dark_Component.js +2 -0
- package/es/DotProvider/libraryChunks/themes/component/red/Red_Light_Component.js +2 -0
- package/es/DotProvider/libraryChunks/themes/component/red/Red_PureDark_Component.js +2 -0
- package/es/DotProvider/libraryChunks/themes/component/yellow/Yellow_Dark_Component.js +2 -0
- package/es/DotProvider/libraryChunks/themes/component/yellow/Yellow_Light_Component.js +2 -0
- package/es/DotProvider/libraryChunks/themes/component/yellow/Yellow_PureDark_Component.js +2 -0
- package/es/DotProvider/utils/constants.js +1 -2
- package/es/DotProvider/utils/themeAppearanceAssetsConfig.js +1 -15
- package/es/DotProvider/utils/themeColorAssetsConfig.js +1 -73
- package/es/list/Comment/Comment.module.css +29 -29
- package/es/list/Dot/Dot.module.css +15 -15
- package/es/list/ListLayout/ListLayout.module.css +79 -79
- package/es/lookup/Lookup/Lookup.js +6 -4
- package/es/lookup/Lookup/__tests__/Lookup.spec.js +101 -4
- package/es/lookup/Lookup/__tests__/__snapshots__/Lookup.spec.js.snap +223 -2
- package/es/lookup/Lookup/props/propTypes.js +6 -1
- package/es/lookup/header/ModuleHeader/ModuleHeader.js +12 -5
- package/es/lookup/header/ModuleHeader/__tests__/ModuleHeader.spec.js +87 -3
- package/es/lookup/header/ModuleHeader/props/defaultProps.js +2 -0
- package/es/lookup/header/ModuleHeader/props/propTypes.js +6 -0
- package/es/version2/lookup/AlertHeader/AlertHeader.js +19 -9
- package/es/version2/lookup/AlertHeader/__tests__/AlertHeader.spec.js +122 -3
- package/es/version2/lookup/AlertHeader/__tests__/__snapshots__/AlertHeader.spec.js.snap +1728 -3
- package/es/version2/lookup/AlertHeader/css/cssJSLogic.js +6 -1
- package/es/version2/lookup/AlertHeader/props/defaultProps.js +2 -0
- package/es/version2/lookup/AlertHeader/props/propTypes.js +10 -0
- package/lib/DotProvider/hooks/useDotProvider.js +3 -3
- package/lib/DotProvider/libraryChunks/themes/component/blue/Blue_Dark_Component.js +4 -0
- package/lib/DotProvider/libraryChunks/themes/component/blue/Blue_Light_Component.js +4 -0
- package/lib/DotProvider/libraryChunks/themes/component/blue/Blue_PureDark_Component.js +4 -0
- package/lib/DotProvider/libraryChunks/themes/component/green/Green_Dark_Component.js +4 -0
- package/lib/DotProvider/libraryChunks/themes/component/green/Green_Light_Component.js +4 -0
- package/lib/DotProvider/libraryChunks/themes/component/green/Green_PureDark_Component.js +4 -0
- package/lib/DotProvider/libraryChunks/themes/component/orange/Orange_Dark_Component.js +4 -0
- package/lib/DotProvider/libraryChunks/themes/component/orange/Orange_Light_Component.js +4 -0
- package/lib/DotProvider/libraryChunks/themes/component/orange/Orange_PureDark_Component.js +4 -0
- package/lib/DotProvider/libraryChunks/themes/component/red/Red_Dark_Component.js +4 -0
- package/lib/DotProvider/libraryChunks/themes/component/red/Red_Light_Component.js +4 -0
- package/lib/DotProvider/libraryChunks/themes/component/red/Red_PureDark_Component.js +4 -0
- package/lib/DotProvider/libraryChunks/themes/component/yellow/Yellow_Dark_Component.js +4 -0
- package/lib/DotProvider/libraryChunks/themes/component/yellow/Yellow_Light_Component.js +4 -0
- package/lib/DotProvider/libraryChunks/themes/component/yellow/Yellow_PureDark_Component.js +4 -0
- package/lib/DotProvider/utils/constants.js +2 -4
- package/lib/DotProvider/utils/themeAppearanceAssetsConfig.js +2 -17
- package/lib/DotProvider/utils/themeColorAssetsConfig.js +2 -77
- package/lib/list/Comment/Comment.module.css +29 -29
- package/lib/list/Dot/Dot.module.css +15 -15
- package/lib/list/ListLayout/ListLayout.module.css +79 -79
- package/lib/lookup/Lookup/Lookup.js +6 -4
- package/lib/lookup/Lookup/__tests__/Lookup.spec.js +101 -4
- package/lib/lookup/Lookup/__tests__/__snapshots__/Lookup.spec.js.snap +223 -2
- package/lib/lookup/Lookup/props/propTypes.js +8 -1
- package/lib/lookup/header/ModuleHeader/ModuleHeader.js +13 -5
- package/lib/lookup/header/ModuleHeader/__tests__/ModuleHeader.spec.js +86 -2
- package/lib/lookup/header/ModuleHeader/props/defaultProps.js +2 -0
- package/lib/lookup/header/ModuleHeader/props/propTypes.js +6 -0
- package/lib/version2/lookup/AlertHeader/AlertHeader.js +19 -8
- package/lib/version2/lookup/AlertHeader/__tests__/AlertHeader.spec.js +121 -2
- package/lib/version2/lookup/AlertHeader/__tests__/__snapshots__/AlertHeader.spec.js.snap +1728 -3
- package/lib/version2/lookup/AlertHeader/css/cssJSLogic.js +4 -2
- package/lib/version2/lookup/AlertHeader/props/defaultProps.js +2 -0
- package/lib/version2/lookup/AlertHeader/props/propTypes.js +10 -0
- package/package.json +6 -6
- package/es/DotProvider/libraryChunks/appearance/variables/Dark_Variables.js +0 -1
- package/es/DotProvider/libraryChunks/appearance/variables/Light_Variables.js +0 -1
- package/es/DotProvider/libraryChunks/appearance/variables/PureDark_Variables.js +0 -1
- package/es/DotProvider/libraryChunks/themes/variables/blue/Blue_Dark_Variables.js +0 -2
- package/es/DotProvider/libraryChunks/themes/variables/blue/Blue_Light_Variables.js +0 -2
- package/es/DotProvider/libraryChunks/themes/variables/blue/Blue_PureDark_Variables.js +0 -2
- package/es/DotProvider/libraryChunks/themes/variables/green/Green_Dark_Variables.js +0 -2
- package/es/DotProvider/libraryChunks/themes/variables/green/Green_Light_Variables.js +0 -2
- package/es/DotProvider/libraryChunks/themes/variables/green/Green_PureDark_Variables.js +0 -2
- package/es/DotProvider/libraryChunks/themes/variables/orange/Orange_Dark_Variables.js +0 -2
- package/es/DotProvider/libraryChunks/themes/variables/orange/Orange_Light_Variables.js +0 -2
- package/es/DotProvider/libraryChunks/themes/variables/orange/Orange_PureDark_Variables.js +0 -2
- package/es/DotProvider/libraryChunks/themes/variables/red/Red_Dark_Variables.js +0 -2
- package/es/DotProvider/libraryChunks/themes/variables/red/Red_Light_Variables.js +0 -2
- package/es/DotProvider/libraryChunks/themes/variables/red/Red_PureDark_Variables.js +0 -2
- package/es/DotProvider/libraryChunks/themes/variables/yellow/Yellow_Dark_Variables.js +0 -2
- package/es/DotProvider/libraryChunks/themes/variables/yellow/Yellow_Light_Variables.js +0 -2
- package/es/DotProvider/libraryChunks/themes/variables/yellow/Yellow_PureDark_Variables.js +0 -2
- package/lib/DotProvider/libraryChunks/appearance/variables/Dark_Variables.js +0 -3
- package/lib/DotProvider/libraryChunks/appearance/variables/Light_Variables.js +0 -3
- package/lib/DotProvider/libraryChunks/appearance/variables/PureDark_Variables.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/variables/blue/Blue_Dark_Variables.js +0 -5
- package/lib/DotProvider/libraryChunks/themes/variables/blue/Blue_Light_Variables.js +0 -5
- package/lib/DotProvider/libraryChunks/themes/variables/blue/Blue_PureDark_Variables.js +0 -5
- package/lib/DotProvider/libraryChunks/themes/variables/green/Green_Dark_Variables.js +0 -5
- package/lib/DotProvider/libraryChunks/themes/variables/green/Green_Light_Variables.js +0 -5
- package/lib/DotProvider/libraryChunks/themes/variables/green/Green_PureDark_Variables.js +0 -5
- package/lib/DotProvider/libraryChunks/themes/variables/orange/Orange_Dark_Variables.js +0 -5
- package/lib/DotProvider/libraryChunks/themes/variables/orange/Orange_Light_Variables.js +0 -5
- package/lib/DotProvider/libraryChunks/themes/variables/orange/Orange_PureDark_Variables.js +0 -5
- package/lib/DotProvider/libraryChunks/themes/variables/red/Red_Dark_Variables.js +0 -5
- package/lib/DotProvider/libraryChunks/themes/variables/red/Red_Light_Variables.js +0 -5
- package/lib/DotProvider/libraryChunks/themes/variables/red/Red_PureDark_Variables.js +0 -5
- package/lib/DotProvider/libraryChunks/themes/variables/yellow/Yellow_Dark_Variables.js +0 -5
- package/lib/DotProvider/libraryChunks/themes/variables/yellow/Yellow_Light_Variables.js +0 -5
- 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
|
-
|
|
5
|
-
|
|
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
|
});
|