@zohoim/chat-components 1.1.0-beta.1 → 1.1.0-beta.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 (50) hide show
  1. package/es/AttachmentHandler/css/AttachmentHandler.module.css +2 -2
  2. package/es/AttachmentPreviewBody/css/AttachmentPreviewBody.module.css +8 -4
  3. package/es/AttachmentPreviewHeader/css/AttachmentPreviewHeader.module.css +4 -4
  4. package/es/EmojiPopup/css/EmojiPopup.module.css +2 -2
  5. package/es/EmojisFooter/css/EmojisFooter.module.css +2 -2
  6. package/es/EmojisHeader/css/EmojisHeader.module.css +3 -3
  7. package/es/Theme/ThemeAssets.js +0 -18
  8. package/es/Theme/ThemeWrapper.js +5 -7
  9. package/es/Theme/themeVariables/commonThemeColorVariable.js +17 -0
  10. package/es/Theme/themeVariables/dark/blueTheme.js +133 -0
  11. package/es/Theme/themeVariables/dark/commonColorVariable.js +35 -0
  12. package/es/Theme/themeVariables/dark/greenTheme.js +132 -0
  13. package/es/Theme/themeVariables/dark/orangeTheme.js +132 -0
  14. package/es/Theme/themeVariables/dark/redTheme.js +132 -0
  15. package/es/Theme/themeVariables/dark/yellowTheme.js +132 -0
  16. package/es/Theme/themeVariables/light/blueTheme.js +135 -0
  17. package/es/Theme/themeVariables/light/commonColorVariable.js +54 -0
  18. package/es/Theme/themeVariables/light/greenTheme.js +131 -0
  19. package/es/Theme/themeVariables/light/orangeTheme.js +131 -0
  20. package/es/Theme/themeVariables/light/redTheme.js +131 -0
  21. package/es/Theme/themeVariables/light/yellowTheme.js +131 -0
  22. package/es/Theme/themeVariables/pureDark/blueTheme.js +132 -0
  23. package/es/Theme/themeVariables/pureDark/commonColorVariable.js +37 -0
  24. package/es/Theme/themeVariables/pureDark/greenTheme.js +132 -0
  25. package/es/Theme/themeVariables/pureDark/orangeTheme.js +132 -0
  26. package/es/Theme/themeVariables/pureDark/redTheme.js +132 -0
  27. package/es/Theme/themeVariables/pureDark/yellowTheme.js +132 -0
  28. package/es/Theme/utils/getThemeConfigurations.js +55 -1
  29. package/es/im/IMIntegrationIcon/css/IMIntegrationIcon.module.css +2 -2
  30. package/es/im/ReplyEditor/css/ReplyEditor.module.css +4 -4
  31. package/package.json +11 -18
  32. package/assets/Appearance/dark/mode/General_DarkMode.module.css +0 -93
  33. package/assets/Appearance/dark/themes/blue/blue_General_DarkTheme.module.css +0 -40
  34. package/assets/Appearance/dark/themes/green/green_General_DarkTheme.module.css +0 -40
  35. package/assets/Appearance/dark/themes/orange/orange_General_DarkTheme.module.css +0 -40
  36. package/assets/Appearance/dark/themes/red/red_General_DarkTheme.module.css +0 -40
  37. package/assets/Appearance/dark/themes/yellow/yellow_General_DarkTheme.module.css +0 -40
  38. package/assets/Appearance/light/mode/General_LightMode.module.css +0 -93
  39. package/assets/Appearance/light/themes/blue/blue_General_LightTheme.module.css +0 -40
  40. package/assets/Appearance/light/themes/green/green_General_LightTheme.module.css +0 -40
  41. package/assets/Appearance/light/themes/orange/orange_General_LightTheme.module.css +0 -40
  42. package/assets/Appearance/light/themes/red/red_General_LightTheme.module.css +0 -40
  43. package/assets/Appearance/light/themes/yellow/yellow_General_LightTheme.module.css +0 -40
  44. package/assets/Appearance/pureDark/mode/General_PureDarkMode.module.css +0 -93
  45. package/assets/Appearance/pureDark/themes/blue/blue_General_PureDarkTheme.module.css +0 -40
  46. package/assets/Appearance/pureDark/themes/green/green_General_PureDarkTheme.module.css +0 -40
  47. package/assets/Appearance/pureDark/themes/orange/orange_General_PureDarkTheme.module.css +0 -40
  48. package/assets/Appearance/pureDark/themes/red/red_General_PureDarkTheme.module.css +0 -40
  49. package/assets/Appearance/pureDark/themes/yellow/yellow_General_PureDarkTheme.module.css +0 -40
  50. package/lib/index.js +0 -538
@@ -0,0 +1,132 @@
1
+ /* eslint-disable camelcase */
2
+ import { incomingBubbleBgColor, outgoingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, primaryOrange, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor, emojiPopup, replyEditor, emojisHeader, attachmentPreviewHeader } from "./commonColorVariable";
3
+ import { imIntegrationIcon, imTtIcon, messagetextColor } from "../commonThemeColorVariable";
4
+ export default {
5
+ library: 'chat_components',
6
+ variables: {
7
+ actionIconWrapper: {
8
+ color: actionIconWrapperColor,
9
+ bg_color: '#312821',
10
+ border_color: '#4d3421'
11
+ },
12
+ attachmentBubble: {
13
+ bg_color: '#212121',
14
+ bg_color_failed: failedBg,
15
+ border_color: '#161515',
16
+ border_color_failed: failedBdr
17
+ },
18
+ attachmentBubbleInfo: {
19
+ fileName_color: '#e2e4e6',
20
+ fileName_color_failed: failedColor,
21
+ fileSize_color: '#999',
22
+ fileSize_color_failed: '#788190'
23
+ },
24
+ articleBubble: {
25
+ bg_color: '#212121',
26
+ bg_color_failed: failedBg,
27
+ border_color: '#161515',
28
+ border_color_failed: failedBdr,
29
+ title_color: '#e2e4e6',
30
+ title_color_failed: failedColor,
31
+ summary_color: '#e2e4e6',
32
+ summary_color_failed: failedColor
33
+ },
34
+ imAutoMessageInfo: {
35
+ text_color: '#999'
36
+ },
37
+ imIntegrationIcon,
38
+ imTtIcon,
39
+ imMessageContent: {
40
+ text_color: '#a8b0bd'
41
+ },
42
+ imMessageMeta: {
43
+ time_color: '#999'
44
+ },
45
+ imPermaLink: {
46
+ url_color: '#ff801f'
47
+ },
48
+ imageBubble: {
49
+ bg_color: '#212121',
50
+ bg_color_failed: failedBg,
51
+ alt_text_color: '#e2e4e6',
52
+ alt_text_color_failed: failedColor,
53
+ border_color: '#161515',
54
+ border_color_failed: failedBdr
55
+ },
56
+ locationBubble: {
57
+ bg_color: '#212121',
58
+ bg_color_failed: failedBg,
59
+ border_color: '#161515',
60
+ border_color_failed: failedBdr,
61
+ url_color: primaryOrange,
62
+ url_color_failed: failedUrlColor
63
+ },
64
+ messageBox: {
65
+ incoming_bg_color: incomingBubbleBgColor,
66
+ outgoing_bg_color: outgoingBubbleBgColor,
67
+ bg_color: '#f1f7fe',
68
+ failed_bg_color: failedBgWrapper,
69
+ text_color: messagetextColor
70
+ },
71
+ messageBubble: {
72
+ active_bg_color: bubbleActiveBgColor,
73
+ messageBox_footer_text_color: '#5a616f'
74
+ },
75
+ messageStatus: {
76
+ send_color: messageStatusSendColor,
77
+ read_color: '#ff801f',
78
+ failed_color: messageStatusFailedColor
79
+ },
80
+ replyBubble: {
81
+ border_color: '#161515',
82
+ border_color_failed: failedBdr
83
+ },
84
+ replyBubbleContent: {
85
+ bg_color: '#212121',
86
+ bg_color_failed: failedBg,
87
+ border_color: '#161515',
88
+ border_color_failed: failedBdr,
89
+ line_color: '#cddbf2',
90
+ line_color_failed: failedLine,
91
+ sender_color: '#e2e4e6',
92
+ sender_color_failed: failedColor,
93
+ content_color: '#e2e4e6',
94
+ content_color_failed: failedColor
95
+ },
96
+ replyBubbleHeader: {
97
+ text_color: '#e2e4e6',
98
+ text_color_failed: failedColor,
99
+ time_color: '#828994',
100
+ time_color_failed: failedColor
101
+ },
102
+ textBubble: {
103
+ text_color: '#e2e4e6',
104
+ text_color_failed: failedColor,
105
+ see_more_color: primaryOrange,
106
+ see_more_color_failed: failedUrlColor,
107
+ url_color: primaryOrange,
108
+ url_color_failed: failedUrlColor
109
+ },
110
+ videoBubble: {
111
+ border_color: '#161515',
112
+ border_color_failed: failedBdr
113
+ },
114
+ emojiFooter: {
115
+ tabLine: primaryOrange,
116
+ border_color: '#161515'
117
+ },
118
+ emojiPopup: { ...emojiPopup,
119
+ ttIcon_path1_color: 'rgba(255, 255, 255, 0.15)',
120
+ ttIcon_path2_color: 'var(--dot_platinum)'
121
+ },
122
+ replyEditor,
123
+ emojisHeader,
124
+ attachmentPreviewHeader,
125
+ attachmentPreviewBody: {
126
+ bg_color: '#262626',
127
+ editor_border_color: '#585858',
128
+ editor_border_hover_color: '#828994',
129
+ editor_border_active_color: '#ff801f'
130
+ }
131
+ }
132
+ };
@@ -0,0 +1,132 @@
1
+ /* eslint-disable camelcase */
2
+ import { incomingBubbleBgColor, outgoingBubbleBgColor, bubbleActiveBgColor, actionIconWrapperColor, messageStatusSendColor, messageStatusFailedColor, primaryRed, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor, emojiPopup, replyEditor, emojisHeader, attachmentPreviewHeader } from "./commonColorVariable";
3
+ import { imIntegrationIcon, imTtIcon, messagetextColor } from "../commonThemeColorVariable";
4
+ export default {
5
+ library: 'chat_components',
6
+ variables: {
7
+ actionIconWrapper: {
8
+ color: actionIconWrapperColor,
9
+ bg_color: '#2f2424',
10
+ border_color: '#492A29'
11
+ },
12
+ attachmentBubble: {
13
+ bg_color: '#212121',
14
+ bg_color_failed: failedBg,
15
+ border_color: '#161515',
16
+ border_color_failed: failedBdr
17
+ },
18
+ attachmentBubbleInfo: {
19
+ fileName_color: '#e2e4e6',
20
+ fileName_color_failed: failedColor,
21
+ fileSize_color: '#999',
22
+ fileSize_color_failed: '#788190'
23
+ },
24
+ articleBubble: {
25
+ bg_color: '#212121',
26
+ bg_color_failed: failedBg,
27
+ border_color: '#161515',
28
+ border_color_failed: failedBdr,
29
+ title_color: '#e2e4e6',
30
+ title_color_failed: failedColor,
31
+ summary_color: '#e2e4e6',
32
+ summary_color_failed: failedColor
33
+ },
34
+ imAutoMessageInfo: {
35
+ text_color: '#999'
36
+ },
37
+ imIntegrationIcon,
38
+ imTtIcon,
39
+ imMessageContent: {
40
+ text_color: '#a8b0bd'
41
+ },
42
+ imMessageMeta: {
43
+ time_color: '#999'
44
+ },
45
+ imPermaLink: {
46
+ url_color: '#e94f4f'
47
+ },
48
+ imageBubble: {
49
+ bg_color: '#212121',
50
+ bg_color_failed: failedBg,
51
+ alt_text_color: '#e2e4e6',
52
+ alt_text_color_failed: failedColor,
53
+ border_color: '#161515',
54
+ border_color_failed: failedBdr
55
+ },
56
+ locationBubble: {
57
+ bg_color: '#212121',
58
+ bg_color_failed: failedBg,
59
+ border_color: '#161515',
60
+ border_color_failed: failedBdr,
61
+ url_color: primaryRed,
62
+ url_color_failed: failedUrlColor
63
+ },
64
+ messageBox: {
65
+ incoming_bg_color: incomingBubbleBgColor,
66
+ outgoing_bg_color: outgoingBubbleBgColor,
67
+ bg_color: '#f1f7fe',
68
+ failed_bg_color: failedBgWrapper,
69
+ text_color: messagetextColor
70
+ },
71
+ messageBubble: {
72
+ active_bg_color: bubbleActiveBgColor,
73
+ messageBox_footer_text_color: '#5a616f'
74
+ },
75
+ messageStatus: {
76
+ send_color: messageStatusSendColor,
77
+ read_color: '#e94f4f',
78
+ failed_color: messageStatusFailedColor
79
+ },
80
+ replyBubble: {
81
+ border_color: '#161515',
82
+ border_color_failed: failedBdr
83
+ },
84
+ replyBubbleContent: {
85
+ bg_color: '#212121',
86
+ bg_color_failed: failedBg,
87
+ border_color: '#161515',
88
+ border_color_failed: failedBdr,
89
+ line_color: '#cddbf2',
90
+ line_color_failed: failedLine,
91
+ sender_color: '#e2e4e6',
92
+ sender_color_failed: failedColor,
93
+ content_color: '#e2e4e6',
94
+ content_color_failed: failedColor
95
+ },
96
+ replyBubbleHeader: {
97
+ text_color: '#e2e4e6',
98
+ text_color_failed: failedColor,
99
+ time_color: '#828994',
100
+ time_color_failed: failedColor
101
+ },
102
+ textBubble: {
103
+ text_color: '#e2e4e6',
104
+ text_color_failed: failedColor,
105
+ see_more_color: primaryRed,
106
+ see_more_color_failed: failedUrlColor,
107
+ url_color: primaryRed,
108
+ url_color_failed: failedUrlColor
109
+ },
110
+ videoBubble: {
111
+ border_color: '#161515',
112
+ border_color_failed: failedBdr
113
+ },
114
+ emojiFooter: {
115
+ tabLine: primaryRed,
116
+ border_color: '#161515'
117
+ },
118
+ emojiPopup: { ...emojiPopup,
119
+ ttIcon_path1_color: 'rgba(255, 255, 255, 0.15)',
120
+ ttIcon_path2_color: 'var(--dot_platinum)'
121
+ },
122
+ replyEditor,
123
+ emojisHeader,
124
+ attachmentPreviewHeader,
125
+ attachmentPreviewBody: {
126
+ bg_color: '#262626',
127
+ editor_border_color: '#585858',
128
+ editor_border_hover_color: '#828994',
129
+ editor_border_active_color: '#e94f4f'
130
+ }
131
+ }
132
+ };
@@ -0,0 +1,132 @@
1
+ /* eslint-disable camelcase */
2
+ import { incomingBubbleBgColor, outgoingBubbleBgColor, bubbleActiveBgColor, messageStatusSendColor, messageStatusFailedColor, actionIconWrapperColor, primaryYellow, failedBgWrapper, failedBg, failedBdr, failedLine, failedColor, failedUrlColor, emojiPopup, replyEditor, emojisHeader, attachmentPreviewHeader } from "./commonColorVariable";
3
+ import { imIntegrationIcon, imTtIcon, messagetextColor } from "../commonThemeColorVariable";
4
+ export default {
5
+ library: 'chat_components',
6
+ variables: {
7
+ actionIconWrapper: {
8
+ color: actionIconWrapperColor,
9
+ bg_color: '#2e2922',
10
+ border_color: '#453925'
11
+ },
12
+ attachmentBubble: {
13
+ bg_color: '#212121',
14
+ bg_color_failed: failedBg,
15
+ border_color: '#161515',
16
+ border_color_failed: failedBdr
17
+ },
18
+ attachmentBubbleInfo: {
19
+ fileName_color: '#e2e4e6',
20
+ fileName_color_failed: failedColor,
21
+ fileSize_color: '#999',
22
+ fileSize_color_failed: '#788190'
23
+ },
24
+ articleBubble: {
25
+ bg_color: '#212121',
26
+ bg_color_failed: failedBg,
27
+ border_color: '#161515',
28
+ border_color_failed: failedBdr,
29
+ title_color: '#e2e4e6',
30
+ title_color_failed: failedColor,
31
+ summary_color: '#e2e4e6',
32
+ summary_color_failed: failedColor
33
+ },
34
+ imAutoMessageInfo: {
35
+ text_color: '#999'
36
+ },
37
+ imIntegrationIcon,
38
+ imTtIcon,
39
+ imMessageContent: {
40
+ text_color: '#a8b0bd'
41
+ },
42
+ imMessageMeta: {
43
+ time_color: '#999'
44
+ },
45
+ imPermaLink: {
46
+ url_color: '#d79835'
47
+ },
48
+ imageBubble: {
49
+ bg_color: '#212121',
50
+ bg_color_failed: failedBg,
51
+ alt_text_color: '#e2e4e6',
52
+ alt_text_color_failed: failedColor,
53
+ border_color: '#161515',
54
+ border_color_failed: failedBdr
55
+ },
56
+ locationBubble: {
57
+ bg_color: '#212121',
58
+ bg_color_failed: failedBg,
59
+ border_color: '#161515',
60
+ border_color_failed: failedBdr,
61
+ url_color: primaryYellow,
62
+ url_color_failed: failedUrlColor
63
+ },
64
+ messageBox: {
65
+ incoming_bg_color: incomingBubbleBgColor,
66
+ outgoing_bg_color: outgoingBubbleBgColor,
67
+ bg_color: '#f1f7fe',
68
+ failed_bg_color: failedBgWrapper,
69
+ text_color: messagetextColor
70
+ },
71
+ messageBubble: {
72
+ active_bg_color: bubbleActiveBgColor,
73
+ messageBox_footer_text_color: '#5a616f'
74
+ },
75
+ messageStatus: {
76
+ send_color: messageStatusSendColor,
77
+ read_color: '#d79835',
78
+ failed_color: messageStatusFailedColor
79
+ },
80
+ replyBubble: {
81
+ border_color: '#161515',
82
+ border_color_failed: failedBdr
83
+ },
84
+ replyBubbleContent: {
85
+ bg_color: '#212121',
86
+ bg_color_failed: failedBg,
87
+ border_color: '#161515',
88
+ border_color_failed: failedBdr,
89
+ line_color: '#cddbf2',
90
+ line_color_failed: failedLine,
91
+ sender_color: '#e2e4e6',
92
+ sender_color_failed: failedColor,
93
+ content_color: '#e2e4e6',
94
+ content_color_failed: failedColor
95
+ },
96
+ replyBubbleHeader: {
97
+ text_color: '#e2e4e6',
98
+ text_color_failed: failedColor,
99
+ time_color: '#828994',
100
+ time_color_failed: failedColor
101
+ },
102
+ textBubble: {
103
+ text_color: '#e2e4e6',
104
+ text_color_failed: failedColor,
105
+ see_more_color: primaryYellow,
106
+ see_more_color_failed: failedUrlColor,
107
+ url_color: primaryYellow,
108
+ url_color_failed: failedUrlColor
109
+ },
110
+ videoBubble: {
111
+ border_color: '#161515',
112
+ border_color_failed: failedBdr
113
+ },
114
+ emojiFooter: {
115
+ tabLine: primaryYellow,
116
+ border_color: '#161515'
117
+ },
118
+ emojiPopup: { ...emojiPopup,
119
+ ttIcon_path1_color: 'rgba(255, 255, 255, 0.15)',
120
+ ttIcon_path2_color: 'var(--dot_platinum)'
121
+ },
122
+ replyEditor,
123
+ emojisHeader,
124
+ attachmentPreviewHeader,
125
+ attachmentPreviewBody: {
126
+ bg_color: '#262626',
127
+ editor_border_color: '#585858',
128
+ editor_border_hover_color: '#828994',
129
+ editor_border_active_color: '#d79835'
130
+ }
131
+ }
132
+ };
@@ -1,4 +1,19 @@
1
1
  import { modeConstants, themeConstants } from '@zohoim/chat-components-utils/es/constants/themeConstants';
2
+ import lightBlue from "../themeVariables/light/blueTheme";
3
+ import lightGreen from "../themeVariables/light/greenTheme";
4
+ import lightOrange from "../themeVariables/light/orangeTheme";
5
+ import lightRed from "../themeVariables/light/redTheme";
6
+ import lightYellow from "../themeVariables/light/yellowTheme";
7
+ import darkBlue from "../themeVariables/dark/blueTheme";
8
+ import darkGreen from "../themeVariables/dark/greenTheme";
9
+ import darkOrange from "../themeVariables/dark/orangeTheme";
10
+ import darkRed from "../themeVariables/dark/redTheme";
11
+ import darkYellow from "../themeVariables/dark/yellowTheme";
12
+ import pureDarkBlue from "../themeVariables/pureDark/blueTheme";
13
+ import pureDarkGreen from "../themeVariables/pureDark/greenTheme";
14
+ import pureDarkOrange from "../themeVariables/pureDark/orangeTheme";
15
+ import pureDarkRed from "../themeVariables/pureDark/redTheme";
16
+ import pureDarkYellow from "../themeVariables/pureDark/yellowTheme";
2
17
  const modeMapping = {
3
18
  [modeConstants.LIGHT]: 'light',
4
19
  [modeConstants.DARK]: 'dark',
@@ -11,17 +26,56 @@ const themeMapping = {
11
26
  [themeConstants.RED]: 'red',
12
27
  [themeConstants.YELLOW]: 'yellow'
13
28
  };
29
+ const concatString = '_';
14
30
  const defaultTheme = themeMapping[themeConstants.BLUE];
15
31
  const defaultMode = modeMapping[modeConstants.LIGHT];
32
+ const defaultThemeConfiguration = lightBlue;
33
+ const themeConfigMapping = {
34
+ [`${modeConstants.LIGHT}${concatString}${themeConstants.BLUE}`]: lightBlue,
35
+ [`${modeConstants.LIGHT}${concatString}${themeConstants.GREEN}`]: lightGreen,
36
+ [`${modeConstants.LIGHT}${concatString}${themeConstants.ORANGE}`]: lightOrange,
37
+ [`${modeConstants.LIGHT}${concatString}${themeConstants.RED}`]: lightRed,
38
+ [`${modeConstants.LIGHT}${concatString}${themeConstants.YELLOW}`]: lightYellow,
39
+ [`${modeConstants.DARK}${concatString}${themeConstants.BLUE}`]: darkBlue,
40
+ [`${modeConstants.DARK}${concatString}${themeConstants.GREEN}`]: darkGreen,
41
+ [`${modeConstants.DARK}${concatString}${themeConstants.ORANGE}`]: darkOrange,
42
+ [`${modeConstants.DARK}${concatString}${themeConstants.RED}`]: darkRed,
43
+ [`${modeConstants.DARK}${concatString}${themeConstants.YELLOW}`]: darkYellow,
44
+ [`${modeConstants.PURE_DARK}${concatString}${themeConstants.BLUE}`]: pureDarkBlue,
45
+ [`${modeConstants.PURE_DARK}${concatString}${themeConstants.GREEN}`]: pureDarkGreen,
46
+ [`${modeConstants.PURE_DARK}${concatString}${themeConstants.ORANGE}`]: pureDarkOrange,
47
+ [`${modeConstants.PURE_DARK}${concatString}${themeConstants.RED}`]: pureDarkRed,
48
+ [`${modeConstants.PURE_DARK}${concatString}${themeConstants.YELLOW}`]: pureDarkYellow
49
+ };
50
+
51
+ function getThemeName() {
52
+ let {
53
+ mode = modeConstants.LIGHT,
54
+ theme = themeConstants.BLUE
55
+ } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
56
+ const themeName = `${mode}${concatString}${theme}`;
57
+ return {
58
+ themeName
59
+ };
60
+ }
61
+
16
62
  export default function getThemeConfigurations(_ref) {
17
63
  let {
18
64
  mode: propMode,
19
65
  theme: propTheme
20
66
  } = _ref;
67
+ const {
68
+ themeName
69
+ } = getThemeName({
70
+ mode: propMode,
71
+ theme: propTheme
72
+ });
21
73
  const mode = propMode ? modeMapping[propMode] || propMode : defaultMode;
22
74
  const theme = propTheme ? themeMapping[propTheme] || propTheme : defaultTheme;
75
+ const themeConfigurations = themeConfigMapping[themeName] || defaultThemeConfiguration;
23
76
  return {
24
77
  mode,
25
- theme
78
+ theme,
79
+ themeConfigurations
26
80
  };
27
81
  }
@@ -64,9 +64,9 @@
64
64
  }
65
65
 
66
66
  .fontIcon :global .path1::before {
67
- color: var(--imlib_chat_components_imIntegrationIcon_path0_color) !important;
67
+ color: var(--imlib_chat_components_imIntegrationIcon_path0_color);
68
68
  }
69
69
 
70
70
  .fontIcon :global .path2::before {
71
- color: var(--imlib_chat_components_imIntegrationIcon_path1_color) !important;
71
+ color: var(--imlib_chat_components_imIntegrationIcon_path1_color);
72
72
  }
@@ -24,10 +24,10 @@
24
24
  font-family: var(--zd_regular) !important;
25
25
  line-height: 22px !important;
26
26
 
27
- --rte-text-color: var(--imlib_chat_components_reply_editor_color) !important;
28
- --rte-bg-color: var(--imlib_chat_components_reply_editor_bg) !important;
27
+ --rte-text-color: var(--imlib_chat_components_replyEditor_color) !important;
28
+ --rte-bg-color: var(--imlib_chat_components_replyEditor_bg) !important;
29
29
  --rte-placeholder-color: var(
30
- --imlib_chat_components_reply_editor_placeholder_color
30
+ --imlib_chat_components_replyEditor_placeholder
31
31
  ) !important;
32
32
  --rte-link-text-color: var(
33
33
  --imlib_chat_components_replyEditor_color
@@ -35,7 +35,7 @@
35
35
 
36
36
  padding: var(--zd_size16) !important;
37
37
  cursor: text !important;
38
- }
38
+ }
39
39
 
40
40
  .editorWrapper {
41
41
  /** ** Use this class for css customisations *** */
package/package.json CHANGED
@@ -1,27 +1,22 @@
1
1
  {
2
2
  "name": "@zohoim/chat-components",
3
- "version": "1.1.0-beta.1",
3
+ "version": "1.1.0-beta.2",
4
4
  "description": "Chat Components",
5
- "main": "lib/index.js",
5
+ "main": "es/index.js",
6
6
  "module": "es/index.js",
7
7
  "scripts": {
8
- "build": "npm run build:lib && npm run build:es",
9
- "build:lib": "react-cli build:component:cmjs",
10
- "build:es": "react-cli build:library:es",
11
- "build:local": " npm run build && npm run rtl && npm run cssVariableConvert ",
12
- "build_watch": "npm run build:variables && npm run build && npm run build:es --module:mode=dev -- -w",
13
- "clean": "react-cli clean unittest coverage es result.json && mkdir assets",
8
+ "build": "react-cli build:component:es",
9
+ "build_watch": "npm run build -- -w",
10
+ "clean": "react-cli clean unittest coverage es result.json",
14
11
  "rtl": "react-cli rtl ./src ./es",
15
- "prepare": "react-cli clean assets && npm run init && npm run build && npm run rtl && npm run cssVariableConvert ",
12
+ "prepare": "npm run clean && npm run build && npm run rtl && npm run cssVariableConvert",
16
13
  "test": "react-cli test",
17
14
  "test:debug": "react-cli test --runInBand --watch",
18
15
  "create-icons": "node ./src/icons/create-icon-components --sourucePath=./factory --targetPath=./iconSrc",
19
- "cssVariableConvert": "react-cli variableConverter ./lib ./lib && react-cli variableConverter ./es ./es",
16
+ "cssVariableConvert": "react-cli variableConverter ./es ./es",
20
17
  "variable:addignore": "node ../../node_modules/@zohodesk-private/css-variable-migrator/es/variableIgnore.js ./src",
21
18
  "variable:convert": "node ../../node_modules/@zohodesk-private/css-variable-migrator/es/pxParserPostcss.js ./src",
22
- "variable:check": "node ../../node_modules/@zohodesk-private/css-variable-migrator/es/variableErrorCheck.js ./src ../../node_modules/@zohodesk-private/css-variable-migrator/es/config/cssVariableReplacementOptions.json",
23
- "build:variables": "react-cli clean ./assets && node ./preprocess/index",
24
- "init": "npm run clean && npm run build:variables"
19
+ "variable:check": "node ../../node_modules/@zohodesk-private/css-variable-migrator/es/variableErrorCheck.js ./src ../../node_modules/@zohodesk-private/css-variable-migrator/es/config/cssVariableReplacementOptions.json"
25
20
  },
26
21
  "author": "ZohoDesk - IM Team",
27
22
  "license": "ISC",
@@ -31,7 +26,6 @@
31
26
  },
32
27
  "files": [
33
28
  "es",
34
- "assets",
35
29
  "!**/__tests__"
36
30
  ],
37
31
  "dependencies": {
@@ -42,15 +36,14 @@
42
36
  "@zohodesk/utils": "1.3.13",
43
37
  "@zohodesk/variables": "1.0.0",
44
38
  "@zohodesk/virtualizer": "1.0.13",
45
- "@zohoim/chat-components-hooks": "1.1.0-beta.1",
46
- "@zohoim/chat-components-utils": "1.1.0-beta.1"
39
+ "@zohoim/chat-components-hooks": "1.1.0-beta.2",
40
+ "@zohoim/chat-components-utils": "1.1.0-beta.2"
47
41
  },
48
42
  "devDependencies": {
49
- "@zohodesk-private/color-variable-preprocessor": "1.2.1",
50
43
  "@zohodesk-private/css-variable-migrator": "1.0.7",
51
44
  "html-to-react": "1.7.0 ",
52
45
  "jsdom": "23.0.0",
53
46
  "react-to-jsx": "1.3.2"
54
47
  },
55
- "gitHead": "89aa900b07687ba5bb8f0d5827427df60aa81f49"
48
+ "gitHead": "0a549134f6351cc26834f508a40b4918609a5f76"
56
49
  }
@@ -1,93 +0,0 @@
1
- [data-zohoim-mode='dark'] {
2
- /* default colors */
3
- --imlib_chat_components_common_border: hsla(218, 23.08%, calc(22.94% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
4
- --imlib_chat_components_primary_text: hsla(210, 7.41%, calc(89.41% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
5
-
6
- /* integration colors */
7
- --imlib_chat_components_imIntegrationIcon_whatsapp_color: hsla(143, 70.85%, calc(48.43% + var(--zdc_darker_lower)), calc(1 + var(--zdc_alpha_low)));
8
- --imlib_chat_components_imIntegrationIcon_telegram_color: hsla(201, 63.72%, calc(57.84% + var(--zdc_darker_lower)), calc(1 + var(--zdc_alpha_low)));
9
- --imlib_chat_components_imIntegrationIcon_wechat_color: hsla(106, 100.00%, calc(37.84% + var(--zdc_darker_lower)), calc(1 + var(--zdc_alpha_low)));
10
- --imlib_chat_components_imIntegrationIcon_line_color: hsla(120, 98.92%, calc(36.47% + var(--zdc_darker_lower)), calc(1 + var(--zdc_alpha_low)));
11
- --imlib_chat_components_imIntegrationIcon_twillio_color: hsla(353, 88.24%, calc(56.67% + var(--zdc_darker_lower)), calc(1 + var(--zdc_alpha_low)));
12
- --imlib_chat_components_imIntegrationIcon_instagram_color: linear-gradient(221.05deg,#933ab9 11.59%,#d12f8c 50.45%,#fdbb59 85.46%);
13
- --imlib_chat_components_imIntegrationIcon_asap_color: linear-gradient(180deg, #A375FF 0%, #7732FF 100%);
14
- --imlib_chat_components_imIntegrationIcon_fb_color: hsla(215, 100.00%, calc(50.00% + var(--zdc_darker_lower)), calc(1 + var(--zdc_alpha_low)));
15
-
16
- /* two tone icon colors */
17
- --imlib_chat_components_imTtIcon_path0_color: rgba(255, 255, 255, 0.25);
18
- --imlib_chat_components_imTtIcon_path1_color: hsla(0, 0.00%, calc(100.00% + var(--zdc_default_inverse_medium)), calc(1 + var(--zdc_alpha_low)));
19
- --imlib_chat_components_imIntegrationIcon_path0_color: rgba(255, 255, 255, 0.25);
20
- --imlib_chat_components_imIntegrationIcon_path1_color: rgb(255,255,255);
21
- --imlib_chat_components_twotone_icon_border: var(--dot_platinum);
22
-
23
- /* text / icon colors */
24
- --imlib_chat_components_actionIconWrapper_color: rgb(226,228,230);
25
- --imlib_chat_components_messageBox_text_color: hsla(210, 7.41%, calc(89.41% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
26
- --imlib_chat_components_replyBubbleContent_line_color: hsla(217, 58.73%, calc(87.65% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
27
- --imlib_chat_components_replyBubbleContent_sender_color: hsla(210, 7.41%, calc(89.41% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
28
- --imlib_chat_components_attachmentBubbleInfo_fileName_color: hsla(210, 7.41%, calc(89.41% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
29
- --imlib_chat_components_attachmentBubbleInfo_fileSize_color: hsla(218, 9.76%, calc(51.76% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
30
- --imlib_chat_components_replyBubbleContent_content_color: hsla(210, 7.41%, calc(89.41% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
31
- --imlib_chat_components_replyBubbleHeader_text_color: hsla(210, 7.41%, calc(89.41% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
32
- --imlib_chat_components_replyBubbleHeader_time_color: hsla(217, 7.76%, calc(54.51% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
33
- --imlib_chat_components_textBubble_text_color: hsla(210, 7.41%, calc(89.41% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
34
- --imlib_chat_components_articleBubble_title_color: hsla(210, 7.41%, calc(89.41% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
35
- --imlib_chat_components_articleBubble_summary_color: hsla(210, 7.41%, calc(89.41% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
36
- --imlib_chat_components_imMessageContent_text_color: hsla(217, 13.73%, calc(70.00% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
37
- --imlib_chat_components_imMessageMeta_time_color: hsla(217, 13.73%, calc(70.00% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
38
- --imlib_chat_components_imAutoMessageInfo_text_color: hsla(217, 7.76%, calc(54.51% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
39
- --imlib_chat_components_messageBubble_messageBox_footer_text_color: hsla(220, 10.45%, calc(39.41% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
40
- --imlib_chat_components_messageStatus_send_color: hsla(228, 11.42%, calc(42.94% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
41
- --imlib_chat_components_imageBubble_alt_text_color: hsla(210, 7.41%, calc(89.41% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
42
-
43
- /* text / icon failed colors */
44
- --imlib_chat_components_messageBox_failed_text_color: hsla(0, 0.00%, calc(0.00% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
45
- --imlib_chat_components_replyBubbleHeader_text_color_failed: hsla(0, 0.00%, calc(0.00% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
46
- --imlib_chat_components_textBubble_text_color_failed: hsla(0, 0.00%, calc(0.00% + var(--zdc_lighter_low)), calc(1 + var(--zdc_alpha_low)));
47
- --imlib_chat_components_imageBubble_alt_text_color_failed: hsla(0, 0.00%, calc(0.00% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
48
- --imlib_chat_components_articleBubble_summary_color_failed: hsla(0, 0.00%, calc(0.00% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
49
- --imlib_chat_components_replyBubbleContent_line_color_failed: hsla(353, 65.81%, calc(77.06% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
50
- --imlib_chat_components_replyBubbleContent_sender_color_failed: hsla(0, 0.00%, calc(0.00% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
51
- --imlib_chat_components_attachmentBubbleInfo_fileName_color_failed: hsla(0, 0.00%, calc(0.00% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
52
- --imlib_chat_components_attachmentBubbleInfo_fileSize_color_failed: hsla(218, 9.76%, calc(51.76% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
53
- --imlib_chat_components_replyBubbleContent_content_color_failed: hsla(0, 0.00%, calc(0.00% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
54
- --imlib_chat_components_replyBubbleHeader_time_color_failed: hsla(0, 0.00%, calc(0.00% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
55
- --imlib_chat_components_articleBubble_title_color_failed: hsla(0, 0.00%, calc(0.00% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
56
-
57
- /* bg colors */
58
- --imlib_chat_components_messageBox_bg_color: hsla(212, 86.67%, calc(97.06% + var(--zdc_default)), calc(1 + var(--zdc_alpha_high)));
59
-
60
- /* bg failed colors */
61
- --imlib_chat_components_messageBox_failed_bg_color: hsla(2, 75.51%, calc(90.39% + var(--zdc_default_inverse_lower)), calc(1 + var(--zdc_alpha_low)));
62
- --imlib_chat_components_imageBubble_bg_color_failed: hsla(353, 59.09%, calc(91.37% + var(--zdc_default_inverse_lower)), calc(1 + var(--zdc_alpha_low)));
63
- --imlib_chat_components_attachmentBubble_bg_color_failed: hsla(353, 59.09%, calc(91.37% + var(--zdc_default_inverse_lower)), calc(1 + var(--zdc_alpha_low)));
64
- --imlib_chat_components_articleBubble_bg_color_failed: hsla(353, 59.09%, calc(91.37% + var(--zdc_default_inverse_lower)), calc(1 + var(--zdc_alpha_low)));
65
- --imlib_chat_components_locationBubble_bg_color_failed: hsla(353, 59.09%, calc(91.37% + var(--zdc_default_inverse_lower)), calc(1 + var(--zdc_alpha_low)));
66
- --imlib_chat_components_replyBubbleContent_bg_color_failed: hsla(353, 59.09%, calc(91.37% + var(--zdc_default_inverse_lower)), calc(1 + var(--zdc_alpha_low)));
67
-
68
- /* border failed colors */
69
- --imlib_chat_components_attachmentBubble_border_color_failed: hsla(353, 65.81%, calc(77.06% + var(--zdc_default_inverse_low)), calc(1 + var(--zdc_alpha_low)));
70
- --imlib_chat_components_imageBubble_border_color_failed: hsla(353, 65.81%, calc(77.06% + var(--zdc_default_inverse_low)), calc(1 + var(--zdc_alpha_low)));
71
- --imlib_chat_components_locationBubble_border_color_failed: hsla(353, 65.81%, calc(77.06% + var(--zdc_default_inverse_low)), calc(1 + var(--zdc_alpha_low)));
72
- --imlib_chat_components_replyBubble_border_color_failed: hsla(353, 65.81%, calc(77.06% + var(--zdc_default_inverse_low)), calc(1 + var(--zdc_alpha_low)));
73
- --imlib_chat_components_videoBubble_border_color_failed: hsla(353, 65.81%, calc(77.06% + var(--zdc_default_inverse_low)), calc(1 + var(--zdc_alpha_low)));
74
- --imlib_chat_components_articleBubble_border_color_failed: hsla(353, 65.81%, calc(77.06% + var(--zdc_default_inverse_low)), calc(1 + var(--zdc_alpha_low)));
75
- --imlib_chat_components_replyBubbleContent_border_color_failed: hsla(353, 65.81%, calc(77.06% + var(--zdc_default_inverse_low)), calc(1 + var(--zdc_alpha_low)));
76
-
77
- /* replyEditor */
78
- --imlib_chat_components_reply_editor_color: hsla(210, 7.41%, calc(89.41% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
79
- --imlib_chat_components_reply_editor_bg: hsla(219, 21.74%, calc(18.04% + var(--zdc_default)), calc(1 + var(--zdc_alpha_high)));
80
- --imlib_chat_components_reply_editor_placeholder_color: hsla(220, 10.45%, calc(39.41% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
81
-
82
- /* attachment Preview */
83
- --imlib_chat_components_attachmentPreview_bg_color: hsla(217, 23.08%, calc(17.84% + var(--zdc_default)), calc(1 + var(--zdc_alpha_high)));
84
- --imlib_chat_components_attachmentPreview_name_color: hsla(210, 7.41%, calc(89.41% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
85
- --imlib_chat_components_attachmentPreview_size_color: hsla(217, 13.73%, calc(70.00% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
86
- --imlib_chat_components_attachmentPreview_body_bg_color: hsla(217, 23.23%, calc(19.41% + var(--zdc_default)), calc(1 + var(--zdc_alpha_high)));
87
-
88
- /* emoji popup */
89
- --imlib_chat_components_emojiPopup_bg_color: hsla(217, 23.08%, calc(17.84% + var(--zdc_default)), calc(1 + var(--zdc_alpha_high)));
90
- --imlib_chat_components_emojiPopup_border_color: hsla(220, 16.67%, calc(28.24% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
91
- --imlib_chat_components_emojiPopup_title_color: hsla(210, 7.41%, calc(89.41% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
92
- --imlib_chat_components_emoji_popup_search_bg: hsla(212, 24.53%, calc(20.78% + var(--zdc_default_inverse_lower)), calc(1 + var(--zdc_alpha_low)));
93
- }