@seamly/web-ui 20.0.0-beta.2 → 20.0.0-beta.5

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 (88) hide show
  1. package/build/dist/lib/components.js +1 -1
  2. package/build/dist/lib/components.min.js +1 -1
  3. package/build/dist/lib/deprecated-view.css +1 -0
  4. package/build/dist/lib/deprecated-view.js +1 -0
  5. package/build/dist/lib/index.debug.js +95 -61
  6. package/build/dist/lib/index.debug.min.js +1 -1
  7. package/build/dist/lib/index.debug.min.js.LICENSE.txt +24 -12
  8. package/build/dist/lib/style-guide.js +305 -97
  9. package/build/dist/lib/style-guide.min.js +1 -1
  10. package/build/dist/lib/styles-default-implementation.css +1 -0
  11. package/build/dist/lib/styles-default-implementation.js +1 -0
  12. package/build/dist/lib/styles.css +1 -1
  13. package/package.json +8 -7
  14. package/src/.DS_Store +0 -0
  15. package/src/javascripts/api/index.js +19 -10
  16. package/src/javascripts/api/producer.js +5 -3
  17. package/src/javascripts/domains/translations/components/options-button.js +1 -1
  18. package/src/javascripts/index.js +2 -2
  19. package/src/javascripts/lib/engine/index.js +2 -1
  20. package/src/javascripts/lib/parse-body.js +1 -1
  21. package/src/javascripts/package/components.js +1 -1
  22. package/src/javascripts/style-guide/components/app.js +3 -3
  23. package/src/javascripts/style-guide/states.js +345 -69
  24. package/src/javascripts/style-guide/style-guide-engine.js +1 -0
  25. package/src/javascripts/ui/components/app-options/index.js +9 -3
  26. package/src/javascripts/ui/components/conversation/conversation.js +1 -1
  27. package/src/javascripts/ui/components/conversation/event/carousel-message/index.js +3 -1
  28. package/src/javascripts/ui/components/conversation/event/conversation-suggestions.js +12 -3
  29. package/src/javascripts/ui/components/conversation/event/hooks/use-text-rendering.js +35 -0
  30. package/src/javascripts/ui/components/conversation/event/participant.js +5 -2
  31. package/src/javascripts/ui/components/conversation/event/splash.js +2 -1
  32. package/src/javascripts/ui/components/conversation/event/text.js +2 -1
  33. package/src/javascripts/ui/components/entry/{toggle-button.js → deprecated-toggle-button.js} +0 -0
  34. package/src/javascripts/ui/components/entry/entry-container.js +1 -1
  35. package/src/javascripts/ui/components/faq/faq.js +162 -0
  36. package/src/javascripts/ui/components/layout/chat-frame.js +1 -1
  37. package/src/javascripts/ui/components/layout/chat.js +62 -0
  38. package/src/javascripts/ui/components/layout/{app-frame.js → deprecated-app-frame.js} +10 -24
  39. package/src/javascripts/ui/components/layout/header.js +1 -1
  40. package/src/javascripts/ui/components/layout/pre-chat-messages.js +2 -8
  41. package/src/javascripts/ui/components/options/options-button.js +2 -2
  42. package/src/javascripts/ui/components/suggestions/index.js +2 -3
  43. package/src/javascripts/ui/components/suggestions/suggestions-list.js +1 -1
  44. package/src/javascripts/ui/components/view/app-view.js +3 -3
  45. package/src/javascripts/ui/components/view/deprecated-view.js +6 -4
  46. package/src/javascripts/ui/components/view/index.js +61 -5
  47. package/src/javascripts/ui/components/view/inline-view.js +15 -4
  48. package/src/javascripts/ui/components/view/window-view/index.js +5 -5
  49. package/src/stylesheets/1-settings/_config.scss +6 -6
  50. package/src/stylesheets/{3-app/_app.scss → 3-chat/_chat.scss} +22 -35
  51. package/src/stylesheets/5-components/_chat-status.scss +1 -5
  52. package/src/stylesheets/5-components/_conversation.scss +3 -3
  53. package/src/stylesheets/5-components/_disclaimer.scss +2 -6
  54. package/src/stylesheets/5-components/_error.scss +20 -10
  55. package/src/stylesheets/5-components/_interrupt.scss +21 -2
  56. package/src/stylesheets/5-components/_message-body.scss +23 -1
  57. package/src/stylesheets/5-components/_message-count.scss +1 -0
  58. package/src/stylesheets/5-components/_message.scss +4 -0
  59. package/src/stylesheets/5-components/_modal.scss +2 -2
  60. package/src/stylesheets/5-components/_options.scss +6 -14
  61. package/src/stylesheets/5-components/_pre-chat-messages.scss +24 -17
  62. package/src/stylesheets/5-components/_suggestions.scss +6 -6
  63. package/src/stylesheets/5-components/_unstarted.scss +22 -36
  64. package/src/stylesheets/6-default-implementation/_hover.scss +153 -0
  65. package/src/stylesheets/{6-webui-only → 6-default-implementation}/_scrollbar.scss +1 -1
  66. package/src/stylesheets/7-deprecated/3-app/_app.scss +8 -8
  67. package/src/stylesheets/7-deprecated/5-components/_error.scss +19 -9
  68. package/src/stylesheets/7-deprecated/5-components/_input.scss +1 -1
  69. package/src/stylesheets/7-deprecated/5-components/_message.scss +1 -1
  70. package/src/stylesheets/7-deprecated/5-components/_modal.scss +1 -1
  71. package/src/stylesheets/7-deprecated/5-components/_options.scss +8 -10
  72. package/src/stylesheets/style-guide.scss +1 -1
  73. package/src/stylesheets/styles-default-implementation.scss +3 -0
  74. package/src/stylesheets/styles.scss +8 -9
  75. package/webpack/config.common.js +7 -1
  76. package/webpack/config.package.js +9 -1
  77. package/webpack/config.test.js +1 -0
  78. package/webpack/defaults.js +3 -6
  79. package/CHANGELOG.md +0 -625
  80. package/build/dist/lib/index.js +0 -25513
  81. package/build/dist/lib/index.min.js +0 -2
  82. package/build/dist/lib/index.min.js.LICENSE.txt +0 -9
  83. package/build/dist/lib/standalone.js +0 -34474
  84. package/build/dist/lib/standalone.min.js +0 -2
  85. package/build/dist/lib/standalone.min.js.LICENSE.txt +0 -4
  86. package/src/javascripts/ui/components/layout/modal-wrapper.js +0 -0
  87. package/src/stylesheets/6-webui-only/_hover.scss +0 -151
  88. package/src/stylesheets/styles-webui-only.scss +0 -3
@@ -1,9 +1,14 @@
1
+ import { useCallback, useMemo } from 'preact/hooks'
1
2
  import { useConfig } from '../../../domains/config'
2
3
  import AppView from './app-view'
3
4
  import InlineView from './inline-view'
4
5
  import WindowView from './window-view'
5
- import { useSeamlyStateContext } from '../../hooks/seamly-state-hooks'
6
- import { visibilityStates } from '../../../domains/visibility'
6
+ import { useVisibility } from '../../../domains/visibility'
7
+ import { className } from '../../../lib/css'
8
+ import { useSeamlyAppContainerClassNames } from '../../hooks/component-helper-hooks'
9
+ import { useUserHasResponded } from '../../../domains/app'
10
+ import { useI18n } from '../../../domains/i18n'
11
+ import { useSeamlyContainerElement } from '../../hooks/focus-helper-hooks'
7
12
 
8
13
  const ViewComponentsMap = {
9
14
  app: AppView,
@@ -12,16 +17,67 @@ const ViewComponentsMap = {
12
17
  }
13
18
 
14
19
  const View = () => {
15
- const { layoutMode } = useConfig()
16
- const { visible } = useSeamlyStateContext()
20
+ const [, setSeamlyContainerElement] = useSeamlyContainerElement()
21
+ const { namespace, layoutMode, zIndex } = useConfig()
22
+ const { isOpen, isVisible } = useVisibility()
23
+ const appContainerClassNames = useSeamlyAppContainerClassNames()
24
+ const userResponded = useUserHasResponded()
25
+ const { locale } = useI18n()
17
26
  const ViewComponent = ViewComponentsMap[layoutMode]
18
27
 
28
+ const containerElementRef = useCallback(
29
+ (container) => {
30
+ setSeamlyContainerElement(container)
31
+ },
32
+ [setSeamlyContainerElement],
33
+ )
34
+
35
+ const blockLang = useMemo(() => {
36
+ if (locale) {
37
+ const htmlElementLang = document
38
+ .querySelector('html')
39
+ .getAttribute('lang')
40
+ if (htmlElementLang !== locale) {
41
+ return locale
42
+ }
43
+ }
44
+ return undefined
45
+ }, [locale])
46
+
19
47
  if (!ViewComponent) {
20
48
  console.warn('"layoutMode" should be one of "app", "inline" or "window"')
21
49
  return null
22
50
  }
23
51
 
24
- return visible !== visibilityStates.hidden && <ViewComponent />
52
+ const defaultClassNames = [
53
+ `app--layout-${layoutMode}`,
54
+ `namespace--${namespace}`,
55
+ ]
56
+
57
+ const classNames = ['app', ...defaultClassNames, ...appContainerClassNames]
58
+
59
+ if (!isOpen && layoutMode !== 'app') {
60
+ classNames.push('app--collapsed')
61
+ }
62
+
63
+ if (userResponded) {
64
+ classNames.push('app--user-responded')
65
+ }
66
+
67
+ return (
68
+ isVisible && (
69
+ <div
70
+ className={className(classNames)}
71
+ lang={blockLang}
72
+ tabIndex="-1"
73
+ data-nosnippet
74
+ style={{ zIndex }}
75
+ ref={containerElementRef}
76
+ >
77
+ <ViewComponent />
78
+ </div>
79
+ )
80
+ )
25
81
  }
26
82
 
27
83
  export default View
@@ -1,5 +1,5 @@
1
1
  import { className } from '../../../lib/css'
2
- import AppFrame from '../layout/app-frame'
2
+ import Chat from '../layout/chat'
3
3
  import Interrupt from '../layout/interrupt'
4
4
  import Conversation from '../conversation/conversation'
5
5
  import EntryContainer from '../entry/entry-container'
@@ -11,10 +11,16 @@ import Suggestions from '../suggestions'
11
11
  import InOutTransition, {
12
12
  transitionStartStates,
13
13
  } from '../widgets/in-out-transition'
14
+ import { useInterrupt } from '../../../domains/interrupt'
14
15
 
15
16
  const InlineView = () => {
16
17
  useSeamlyChat()
17
18
  const { isOpen } = useVisibility()
19
+ const { hasInterrupt, meta } = useInterrupt()
20
+
21
+ if (hasInterrupt && !isOpen) {
22
+ return <Interrupt {...meta} />
23
+ }
18
24
 
19
25
  return (
20
26
  <>
@@ -22,7 +28,12 @@ const InlineView = () => {
22
28
  isActive={!isOpen}
23
29
  transitionStartState={transitionStartStates.rendered}
24
30
  >
25
- <div className={className('unstarted-wrapper')}>
31
+ <div
32
+ className={className(
33
+ 'unstarted-wrapper',
34
+ 'unstarted-wrapper--inline',
35
+ )}
36
+ >
26
37
  <PreChatMessages />
27
38
  <Suggestions />
28
39
  </div>
@@ -31,12 +42,12 @@ const InlineView = () => {
31
42
  isActive={isOpen}
32
43
  transitionStartState={transitionStartStates.rendered}
33
44
  >
34
- <AppFrame>
45
+ <Chat>
35
46
  <ChatFrame interruptComponent={Interrupt}>
36
47
  {isOpen && <Conversation />}
37
48
  <EntryContainer />
38
49
  </ChatFrame>
39
- </AppFrame>
50
+ </Chat>
40
51
  </InOutTransition>
41
52
  </>
42
53
  )
@@ -1,7 +1,7 @@
1
1
  import { useMemo } from 'preact/hooks'
2
2
  import { useSeamlyChat } from '../../../hooks/seamly-hooks'
3
3
  import { useVisibility } from '../../../../domains/visibility'
4
- import AppFrame from '../../layout/app-frame'
4
+ import Chat from '../../layout/chat'
5
5
  import ChatFrame from '../../layout/chat-frame'
6
6
  import Interrupt from '../../layout/interrupt'
7
7
  import Conversation from '../../conversation/conversation'
@@ -14,7 +14,7 @@ import InOutTransition, {
14
14
  import PreChatMessages from '../../layout/pre-chat-messages'
15
15
  import { useUserHasResponded } from '../../../../domains/app'
16
16
  import { className } from '../../../../lib/css'
17
- import Splash from '../../conversation/event/splash'
17
+ import Text from '../../conversation/event/text'
18
18
  import { useI18n } from '../../../../domains/i18n'
19
19
 
20
20
  const WindowView = () => {
@@ -60,20 +60,20 @@ const WindowView = () => {
60
60
  'unstarted-wrapper--continue',
61
61
  )}
62
62
  >
63
- <Splash event={continueChatEvent} />
63
+ <Text event={continueChatEvent} />
64
64
  </div>
65
65
  </InOutTransition>
66
66
  <InOutTransition
67
67
  isActive={isOpen}
68
68
  transitionStartState={transitionStartStates.notRendered}
69
69
  >
70
- <AppFrame>
70
+ <Chat>
71
71
  {isOpen && <CollapseButton onClick={closeChat} />}
72
72
  <ChatFrame interruptComponent={Interrupt}>
73
73
  <Conversation />
74
74
  <EntryContainer />
75
75
  </ChatFrame>
76
- </AppFrame>
76
+ </Chat>
77
77
  </InOutTransition>
78
78
  </>
79
79
  )
@@ -37,7 +37,7 @@ $white: #fff !default;
37
37
  $black: #000 !default;
38
38
 
39
39
  // BACKGROUND COLORS
40
- $app-bg: $white !default;
40
+ $chat-bg: $white !default;
41
41
 
42
42
  $threadlist-agent-text-bgcolor: $grey-a;
43
43
  $threadlist-user-text-bgcolor: $brand2;
@@ -70,13 +70,13 @@ $borderradius-small: $borderradius * 0.5 !default;
70
70
  $borderradius-large: $borderradius * 2 !default;
71
71
 
72
72
  // DIMENSIONS
73
- $app-window-width: $spacer * 18 !default;
74
- $app-window-height: $spacer * 36 !default;
73
+ $chat-window-width: $spacer * 18 !default;
74
+ $chat-window-height: $spacer * 36 !default;
75
75
 
76
- $app-inline-height: $spacer * 32 !default;
77
- $app-inline-maxheight: 90vh !default;
76
+ $chat-inline-height: $spacer * 32 !default;
77
+ $chat-inline-maxheight: 90vh !default;
78
78
 
79
- $app-suggestions-maxheight: $spacer * 16 !default;
79
+ $chat-suggestions-maxheight: $spacer * 16 !default;
80
80
 
81
81
  $viewport-width: 100vw !default;
82
82
  $viewport-height: 100vh !default;
@@ -1,4 +1,4 @@
1
- .#{$n}-app {
1
+ .#{$n}-chat {
2
2
  @include boxSizing;
3
3
 
4
4
  display: flex;
@@ -7,12 +7,12 @@
7
7
  transition: margin $transition, height $transition, transform $transition,
8
8
  opacity $transition;
9
9
  outline: 0;
10
- color: set-text-color($app-bg);
10
+ color: set-text-color($chat-bg);
11
11
  font-family: $fontfamily-default;
12
12
  font-size: $fontsize-small;
13
13
  }
14
14
 
15
- .#{$n}-app--layout-inline {
15
+ .#{$n}-chat--layout-inline {
16
16
  height: fit-content;
17
17
  background-color: initial;
18
18
  box-shadow: none;
@@ -22,19 +22,11 @@
22
22
  }
23
23
  }
24
24
 
25
- .#{$n}-app--layout-inline.#{$n}-app--collapsed .#{$n}-app-wrapper {
25
+ .#{$n}-chat--layout-inline.#{$n}-chat--collapsed .#{$n}-chat-wrapper {
26
26
  height: auto;
27
27
  }
28
28
 
29
- .#{$n}-app--layout-inline.#{$n}-app--user-responded {
30
- transition: none;
31
- }
32
-
33
- .#{$n}-app--layout-inline.#{$n}-app--user-responded .#{$n}-app-wrapper {
34
- transition: none;
35
- }
36
-
37
- .#{$n}-app--layout-window {
29
+ .#{$n}-chat--layout-window {
38
30
  @include responsiveAppSizing();
39
31
 
40
32
  display: none;
@@ -42,23 +34,23 @@
42
34
  z-index: $z-index;
43
35
  right: $spacer;
44
36
  bottom: $spacer;
45
- width: $app-window-width;
37
+ width: $chat-window-width;
46
38
  max-width: calc(100% - #{$spacer * 2});
47
- height: $app-window-height;
39
+ height: $chat-window-height;
48
40
  transform: scale(0);
49
41
  opacity: 0;
50
42
  }
51
43
 
52
- .#{$n}-app--layout-window.#{$n}-transition--visible {
44
+ .#{$n}-chat--layout-window.#{$n}-transition--visible {
53
45
  display: flex;
54
46
  }
55
47
 
56
- .#{$n}-app--layout-window.#{$n}-transition--in {
48
+ .#{$n}-chat--layout-window.#{$n}-transition--in {
57
49
  transform: scale(1);
58
50
  opacity: 1;
59
51
  }
60
52
 
61
- .#{$n}-app--layout-app {
53
+ .#{$n}-chat--layout-app {
62
54
  position: fixed;
63
55
  z-index: $z-index;
64
56
  top: 0;
@@ -71,7 +63,7 @@
71
63
  max-height: 100%;
72
64
  }
73
65
 
74
- .#{$n}-app-wrapper {
66
+ .#{$n}-chat-wrapper {
75
67
  display: flex;
76
68
  position: relative;
77
69
  z-index: 1;
@@ -81,18 +73,13 @@
81
73
  overflow: hidden;
82
74
  transition: flex $transition, width $transition, height $transition,
83
75
  border-radius $transition;
84
- border: $thin-border solid set-border-color($app-bg);
76
+ border: $thin-border solid set-border-color($chat-bg);
85
77
  border-radius: $borderradius;
86
- background-color: $app-bg;
78
+ background-color: $chat-bg;
87
79
  box-shadow: $boxshadow-soft;
88
80
  }
89
81
 
90
- .#{$n}-app--layout-app .#{$n}-app-wrapper {
91
- border: 0 none;
92
- border-radius: 0;
93
- }
94
-
95
- .#{$n}-app--layout-inline .#{$n}-app-wrapper {
82
+ .#{$n}-chat--layout-inline .#{$n}-chat-wrapper {
96
83
  width: 100%;
97
84
  height: 0;
98
85
 
@@ -111,12 +98,12 @@
111
98
  }
112
99
  }
113
100
 
114
- .#{$n}-app--layout-inline.#{$n}-transition--in .#{$n}-app-wrapper {
115
- height: $app-inline-height;
116
- max-height: $app-inline-maxheight;
101
+ .#{$n}-chat--layout-inline.#{$n}-transition--in .#{$n}-chat-wrapper {
102
+ height: $chat-inline-height;
103
+ max-height: $chat-inline-maxheight;
117
104
  }
118
105
 
119
- .#{$n}-app__container {
106
+ .#{$n}-chat__container {
120
107
  display: flex;
121
108
  position: relative;
122
109
  flex-direction: column;
@@ -124,7 +111,7 @@
124
111
  height: 100%;
125
112
  }
126
113
 
127
- .#{$n}-app__body {
114
+ .#{$n}-chat__body {
128
115
  display: flex;
129
116
  position: relative;
130
117
  flex-grow: 4;
@@ -132,11 +119,11 @@
132
119
  overflow-y: auto;
133
120
  }
134
121
 
135
- .#{$n}-app--layout-window .#{$n}-app__body {
122
+ .#{$n}-chat--layout-window .#{$n}-chat__body {
136
123
  overscroll-behavior: contain;
137
124
  }
138
125
 
139
- .#{$n}-app__entry {
126
+ .#{$n}-chat__entry {
140
127
  position: relative;
141
128
  flex: 0 0 auto;
142
129
  padding: $spacer * 0.5;
@@ -147,7 +134,7 @@
147
134
  }
148
135
  }
149
136
 
150
- .#{$n}-app--layout-inline.#{$n}-app--collapsed .#{$n}-app__entry {
137
+ .#{$n}-chat--layout-inline.#{$n}-chat--collapsed .#{$n}-chat__entry {
151
138
  border: 0 none;
152
139
  }
153
140
 
@@ -15,14 +15,10 @@
15
15
  box-shadow: $boxshadow;
16
16
  }
17
17
 
18
- &.#{$n}-app--layout-window .#{$n}-chat-status {
18
+ .#{$n}-chat--layout-window .#{$n}-chat-status {
19
19
  width: calc(100% - #{$spacer * 2.5 + $buttonsize});
20
20
  }
21
21
 
22
- &.#{$n}-app--collapsed .#{$n}-chat-status {
23
- display: none;
24
- }
25
-
26
22
  .#{$n}-chat-status__title {
27
23
  display: flex;
28
24
  flex: 1;
@@ -29,18 +29,18 @@
29
29
  }
30
30
  }
31
31
 
32
- .#{$n}-chat-status ~ .#{$n}-app__container .#{$n}-conversation {
32
+ .#{$n}-chat-status ~ .#{$n}-chat__container .#{$n}-conversation {
33
33
  padding-top: $buttonsize + $spacer * 2;
34
34
  }
35
35
 
36
36
  .#{$n}-chat-status
37
- ~ .#{$n}-app__container
37
+ ~ .#{$n}-chat__container
38
38
  .#{$n}-disclaimer
39
39
  + .#{$n}-conversation {
40
40
  padding-top: 0;
41
41
  }
42
42
 
43
- &.#{$n}-app--layout-inline .#{$n}-conversation {
43
+ .#{$n}-chat--layout-inline .#{$n}-conversation {
44
44
  position: relative;
45
45
  }
46
46
 
@@ -7,19 +7,15 @@
7
7
  background-color: $grey-a;
8
8
  }
9
9
 
10
- &.#{$n}-app--layout-window .#{$n}-disclaimer {
10
+ .#{$n}-chat--layout-window .#{$n}-disclaimer {
11
11
  padding-right: $buttonsize + $spacer * 2;
12
12
  }
13
13
 
14
- .#{$n}-chat-status ~ .#{$n}-app__container .#{$n}-disclaimer {
14
+ .#{$n}-chat-status ~ .#{$n}-chat__container .#{$n}-disclaimer {
15
15
  margin-top: $buttonsize + $spacer * 2;
16
16
  padding: $spacer * 0.5 $spacer;
17
17
  }
18
18
 
19
- &.#{$n}-app--collapsed .#{$n}-disclaimer {
20
- display: none;
21
- }
22
-
23
19
  .#{$n}-disclaimer__title {
24
20
  margin: 0 0 $spacer * 0.25;
25
21
  padding-right: $spacer;
@@ -3,17 +3,15 @@
3
3
 
4
4
  // BASE
5
5
  // ----
6
- .#{$n}-error__message {
7
- display: flex;
8
- align-items: flex-start;
6
+ .#{$n}-error {
7
+ display: block;
9
8
  width: 100%;
10
- margin: 0 0 $spacer * 0.5;
11
- padding: $spacer * 0.25 $spacer * 0.5;
12
- border-radius: $borderradius-small;
13
- background-color: rgba($negative, 0.1);
14
- color: $negative-dark;
15
- font-size: $fontsize-small;
16
- font-weight: $fontweight-bold;
9
+ margin: 0 0 $spacer * 0.25;
10
+
11
+ &:empty {
12
+ display: none;
13
+ margin: 0;
14
+ }
17
15
 
18
16
  .#{$n}-icon {
19
17
  flex: 0 0 16px;
@@ -21,4 +19,16 @@
21
19
  height: 16px;
22
20
  margin-right: $spacer * 0.25;
23
21
  }
22
+
23
+ .#{$n}-error__message {
24
+ display: flex;
25
+ align-items: flex-start;
26
+ width: 100%;
27
+ padding: $spacer * 0.25 $spacer * 0.5;
28
+ border-radius: $borderradius-small;
29
+ background-color: rgba($negative, 0.1);
30
+ color: $negative-dark;
31
+ font-size: $fontsize-small;
32
+ font-weight: $fontweight-bold;
33
+ }
24
34
  }
@@ -8,17 +8,32 @@
8
8
  background: $white;
9
9
  }
10
10
 
11
+ &.#{$n}-app--layout-inline.#{$n}-app--collapsed .#{$n}-interrupt {
12
+ position: static;
13
+ width: 100%;
14
+ border-radius: $borderradius;
15
+
16
+ @include media('>desktop') {
17
+ width: 67%;
18
+ }
19
+ }
20
+
11
21
  .#{$n}-interrupt__body {
12
22
  display: flex;
13
23
  flex: 1 1 auto;
14
24
  flex-direction: column;
15
- align-items: center;
25
+ align-items: left;
16
26
  justify-content: center;
17
- margin: $spacer * 0.5;
18
27
  padding: $spacer * 2;
28
+ text-align: left;
29
+ }
30
+
31
+ .#{$n}-chat .#{$n}-interrupt__body {
32
+ margin: $spacer * 0.5;
19
33
  }
20
34
 
21
35
  .#{$n}-interrupt__title {
36
+ margin: 0 0 $spacer;
22
37
  font-size: $fontsize-default;
23
38
  font-weight: bold;
24
39
  }
@@ -26,6 +41,10 @@
26
41
  .#{$n}-interrupt__message {
27
42
  margin-bottom: $spacer * 2;
28
43
  font-size: $fontsize-default;
44
+
45
+ &:last-child {
46
+ margin-bottom: 0;
47
+ }
29
48
  }
30
49
 
31
50
  .#{$n}-interrupt__actions {
@@ -17,6 +17,28 @@
17
17
  }
18
18
  }
19
19
 
20
+ .#{$n}-unstarted-wrapper.#{$n}-unstarted-wrapper--window .#{$n}-message__body {
21
+ margin-left: auto;
22
+ padding: $spacer * 0.5 $spacer * 0.75;
23
+ border: $thin-border solid $white;
24
+ border-radius: $borderradius;
25
+ background-color: $threadlist-agent-text-bgcolor;
26
+ font-size: $fontsize-medium;
27
+ }
28
+
29
+ .#{$n}-unstarted-wrapper--continue .#{$n}-message__body {
30
+ transform: scale(0);
31
+ transform-origin: 100% 100%;
32
+ transition: transform $transition, opacity $transition;
33
+ opacity: 0;
34
+ }
35
+
36
+ .#{$n}-unstarted-wrapper--continue.#{$n}-transition--in .#{$n}-message__body {
37
+ transform: scale(1);
38
+ transition: transform $transition-delay, opacity $transition-delay;
39
+ opacity: 1;
40
+ }
41
+
20
42
  .#{$n}-conversation__item--source-info .#{$n}-message__body {
21
43
  flex: 0 0 100%;
22
44
  width: 100%;
@@ -82,7 +104,7 @@
82
104
  }
83
105
  }
84
106
 
85
- .cvco-message--source-user .#{$n}-message__body a {
107
+ .#{$n}-message--source-user .#{$n}-message__body a {
86
108
  color: $white;
87
109
  }
88
110
 
@@ -1,6 +1,7 @@
1
1
  .#{$n}-message-count {
2
2
  display: flex;
3
3
  position: absolute;
4
+ z-index: 1;
4
5
  top: $spacer * -0.5;
5
6
  right: $spacer * -0.5;
6
7
  align-items: center;
@@ -5,6 +5,10 @@
5
5
  width: 80%;
6
6
  }
7
7
 
8
+ .#{$n}-unstarted-wrapper--window .#{$n}-message {
9
+ width: 100%;
10
+ }
11
+
8
12
  .#{$n}-message.#{$n}-message--type-suggestions {
9
13
  width: 100%;
10
14
  }
@@ -17,7 +17,7 @@
17
17
  padding: $spacer;
18
18
  transform: scale(1);
19
19
  opacity: 1;
20
- background-color: rgba($app-bg, 0.8);
20
+ background-color: rgba($chat-bg, 0.8);
21
21
  }
22
22
 
23
23
  .#{$n}-modal__float {
@@ -29,7 +29,7 @@
29
29
  border: $thin-border solid $grey-b;
30
30
  border-radius: $borderradius;
31
31
  outline: 0;
32
- background-color: $app-bg;
32
+ background-color: $chat-bg;
33
33
  box-shadow: $boxshadow-soft;
34
34
  }
35
35
 
@@ -1,4 +1,4 @@
1
- .#{$n}-app__options {
1
+ .#{$n}-chat__options {
2
2
  display: flex;
3
3
  position: relative;
4
4
  flex: 0;
@@ -9,15 +9,11 @@
9
9
  border-top: $thin-border solid $grey-b;
10
10
  }
11
11
 
12
- .#{$n}-app__options-item--left {
12
+ .#{$n}-chat__options-item--left {
13
13
  margin-right: auto;
14
14
  }
15
15
 
16
- &.#{$n}-app--collapsed .#{$n}-app__options {
17
- display: none;
18
- }
19
-
20
- .#{$n}-app__options__button {
16
+ .#{$n}-chat__options__button {
21
17
  display: flex;
22
18
  align-items: center;
23
19
  justify-content: flex-end;
@@ -25,23 +21,19 @@
25
21
  border-radius: $borderradius-small;
26
22
  }
27
23
 
28
- &.#{$n}-app--collapsed .#{$n}-app__options-button {
29
- display: none;
30
- }
31
-
32
- .#{$n}-app__options__button .#{$n}-icon {
24
+ .#{$n}-chat__options__button .#{$n}-icon {
33
25
  flex: 0 0 $iconsize-small;
34
26
  width: $iconsize-small;
35
27
  height: $iconsize-small;
36
28
  margin-right: $spacer * 0.25;
37
29
  }
38
30
 
39
- .#{$n}-app__options__button .#{$n}-icon svg {
31
+ .#{$n}-chat__options__button .#{$n}-icon svg {
40
32
  width: 100%;
41
33
  height: 100%;
42
34
  }
43
35
 
44
- .#{$n}-app__options__button .#{$n}-icon path {
36
+ .#{$n}-chat__options__button .#{$n}-icon path {
45
37
  fill: currentColor;
46
38
  }
47
39
 
@@ -5,26 +5,33 @@
5
5
  padding: 0;
6
6
  }
7
7
 
8
- .#{$n}-pre-chat-messages--window {
9
- position: fixed;
10
- z-index: $z-index;
11
- right: $spacer;
12
- bottom: $spacer + $avatarsize-large;
13
- max-width: calc(100% - #{$spacer * 2});
8
+ .#{$n}-unstarted-wrapper .#{$n}-pre-chat-messages {
9
+ display: none;
10
+ }
11
+
12
+ .#{$n}-unstarted-wrapper.#{$n}-transition--visible .#{$n}-pre-chat-messages {
13
+ display: block;
14
+ }
15
+
16
+ .#{$n}-unstarted-wrapper--inline .#{$n}-pre-chat-messages {
17
+ transition: opacity $transition;
18
+ opacity: 0;
19
+ }
14
20
 
15
- @include media('>phablet-l') {
16
- max-width: $spacer * 14;
17
- }
21
+ .#{$n}-unstarted-wrapper--inline.#{$n}-transition--in .#{$n}-pre-chat-messages {
22
+ transition: opacity $transition-delay;
23
+ opacity: 1;
18
24
  }
19
25
 
20
- .#{$n}-pre-chat-messages__message {
21
- margin-bottom: $spacer * 0.5;
26
+ .#{$n}-unstarted-wrapper--window .#{$n}-pre-chat-messages {
27
+ transform: scale(0);
28
+ transform-origin: 100% 100%;
29
+ transition: transform $transition, opacity $transition;
30
+ opacity: 0;
22
31
  }
23
32
 
24
- .#{$n}-pre-chat-messages--window .#{$n}-message__body {
25
- padding: $spacer * 0.5 $spacer * 0.75;
26
- border: $thin-border solid $white;
27
- border-radius: $borderradius;
28
- background-color: $threadlist-agent-text-bgcolor;
29
- font-size: $fontsize-medium;
33
+ .#{$n}-unstarted-wrapper--window.#{$n}-transition--in .#{$n}-pre-chat-messages {
34
+ transform: scale(1);
35
+ transition: transform $transition-delay, opacity $transition-delay;
36
+ opacity: 1;
30
37
  }