@seamly/web-ui 20.0.0-beta.3 → 20.0.0-beta.6

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 (79) 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 +80 -57
  6. package/build/dist/lib/index.debug.min.js +1 -1
  7. package/build/dist/lib/index.debug.min.js.LICENSE.txt +20 -12
  8. package/build/dist/lib/index.js +14645 -14065
  9. package/build/dist/lib/index.min.js +1 -1
  10. package/build/dist/lib/index.min.js.LICENSE.txt +5 -0
  11. package/build/dist/lib/standalone.js +19725 -19707
  12. package/build/dist/lib/standalone.min.js +1 -1
  13. package/build/dist/lib/style-guide.js +86 -27
  14. package/build/dist/lib/style-guide.min.js +1 -1
  15. package/build/dist/lib/styles-default-implementation.css +1 -0
  16. package/build/dist/lib/styles-default-implementation.js +1 -0
  17. package/build/dist/lib/styles.css +1 -1
  18. package/package.json +8 -7
  19. package/src/javascripts/api/index.js +19 -10
  20. package/src/javascripts/api/producer.js +5 -3
  21. package/src/javascripts/domains/translations/components/options-button.js +1 -1
  22. package/src/javascripts/index.js +2 -2
  23. package/src/javascripts/lib/engine/index.js +2 -1
  24. package/src/javascripts/lib/parse-body.js +1 -1
  25. package/src/javascripts/package/components.js +1 -1
  26. package/src/javascripts/style-guide/components/view.js +1 -0
  27. package/src/javascripts/style-guide/states.js +67 -6
  28. package/src/javascripts/style-guide/style-guide-engine.js +1 -0
  29. package/src/javascripts/ui/components/app-options/index.js +9 -3
  30. package/src/javascripts/ui/components/conversation/conversation.js +1 -1
  31. package/src/javascripts/ui/components/conversation/event/carousel-message/index.js +3 -1
  32. package/src/javascripts/ui/components/conversation/event/conversation-suggestions.js +12 -3
  33. package/src/javascripts/ui/components/conversation/event/hooks/use-text-rendering.js +35 -0
  34. package/src/javascripts/ui/components/conversation/event/participant.js +5 -2
  35. package/src/javascripts/ui/components/conversation/event/splash.js +2 -1
  36. package/src/javascripts/ui/components/conversation/event/text.js +2 -1
  37. package/src/javascripts/ui/components/entry/{toggle-button.js → deprecated-toggle-button.js} +0 -0
  38. package/src/javascripts/ui/components/entry/entry-container.js +1 -1
  39. package/src/javascripts/ui/components/layout/chat-frame.js +1 -1
  40. package/src/javascripts/ui/components/layout/{app-frame.js → chat.js} +10 -41
  41. package/src/javascripts/ui/components/layout/deprecated-app-frame.js +1 -8
  42. package/src/javascripts/ui/components/layout/header.js +1 -1
  43. package/src/javascripts/ui/components/layout/pre-chat-messages.js +2 -8
  44. package/src/javascripts/ui/components/options/options-button.js +2 -2
  45. package/src/javascripts/ui/components/suggestions/index.js +2 -3
  46. package/src/javascripts/ui/components/suggestions/suggestions-list.js +1 -1
  47. package/src/javascripts/ui/components/view/app-view.js +3 -3
  48. package/src/javascripts/ui/components/view/deprecated-view.js +2 -2
  49. package/src/javascripts/ui/components/view/index.js +61 -5
  50. package/src/javascripts/ui/components/view/inline-view.js +15 -4
  51. package/src/javascripts/ui/components/view/window-view/index.js +5 -5
  52. package/src/stylesheets/1-settings/_config.scss +6 -6
  53. package/src/stylesheets/{3-app/_app.scss → 3-chat/_chat.scss} +22 -35
  54. package/src/stylesheets/5-components/_chat-status.scss +1 -5
  55. package/src/stylesheets/5-components/_conversation.scss +3 -3
  56. package/src/stylesheets/5-components/_disclaimer.scss +2 -6
  57. package/src/stylesheets/5-components/_interrupt.scss +21 -2
  58. package/src/stylesheets/5-components/_message-body.scss +23 -1
  59. package/src/stylesheets/5-components/_message-count.scss +1 -0
  60. package/src/stylesheets/5-components/_message.scss +4 -0
  61. package/src/stylesheets/5-components/_modal.scss +2 -2
  62. package/src/stylesheets/5-components/_options.scss +6 -14
  63. package/src/stylesheets/5-components/_pre-chat-messages.scss +24 -17
  64. package/src/stylesheets/5-components/_suggestions.scss +6 -6
  65. package/src/stylesheets/5-components/_unstarted.scss +22 -36
  66. package/src/stylesheets/6-default-implementation/_hover.scss +153 -0
  67. package/src/stylesheets/{6-webui-only → 6-default-implementation}/_scrollbar.scss +1 -1
  68. package/src/stylesheets/7-deprecated/3-app/_app.scss +8 -8
  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 -8
  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.package.js +9 -1
  76. package/webpack/defaults.js +3 -6
  77. package/src/javascripts/ui/components/layout/modal-wrapper.js +0 -0
  78. package/src/stylesheets/6-webui-only/_hover.scss +0 -151
  79. package/src/stylesheets/styles-webui-only.scss +0 -3
@@ -0,0 +1,153 @@
1
+ .#{$n}-app {
2
+ @media (hover: hover) {
3
+ .#{$n}-button.#{$n}-collapse-button,
4
+ .#{$n}-modal__enlarge,
5
+ .#{$n}-modal__close {
6
+ transition: background-color $transition;
7
+
8
+ &:hover {
9
+ background-color: $interaction-dark;
10
+ }
11
+
12
+ path {
13
+ transition: fill $transition;
14
+ }
15
+
16
+ &:hover svg path {
17
+ fill: $white;
18
+ }
19
+ }
20
+
21
+ .#{$n}-button {
22
+ transition: color $transition, background-color $transition;
23
+ }
24
+
25
+ .#{$n}-button--primary:not(.#{$n}-button--disabled) {
26
+ &:hover {
27
+ background-color: $interaction-dark;
28
+ }
29
+ }
30
+
31
+ .#{$n}-button--secondary:not(.#{$n}-button--disabled),
32
+ .#{$n}-button--tertiary:not(.#{$n}-button--disabled) {
33
+ &:hover {
34
+ color: $interaction-dark;
35
+ }
36
+ }
37
+
38
+ .#{$n}-choice-prompt__item--secondary .#{$n}-button {
39
+ &:hover {
40
+ background-color: initial;
41
+ color: $interaction-dark;
42
+ }
43
+ }
44
+
45
+ .#{$n}-message--type-cta .#{$n}-button {
46
+ &:hover {
47
+ background-color: $white;
48
+ color: $interaction-dark;
49
+ }
50
+ }
51
+
52
+ .#{$n}-message__body a {
53
+ transition: color $transition;
54
+
55
+ &:hover {
56
+ text-decoration: none;
57
+ }
58
+ }
59
+
60
+ .#{$n}-conversation__item--source-agent
61
+ .#{$n}-message__body.#{$n}-message__body
62
+ a {
63
+ &:hover {
64
+ color: $interaction-dark;
65
+ }
66
+ }
67
+
68
+ .#{$n}-input__text {
69
+ transition: padding $transition, border $transition;
70
+
71
+ &:hover {
72
+ border-color: $interaction-dark;
73
+ }
74
+
75
+ &:focus {
76
+ border-color: transparent;
77
+ }
78
+ }
79
+
80
+ .#{$n}-input__submit:not(:disabled):hover .#{$n}-icon path {
81
+ fill: $interaction-dark;
82
+ }
83
+
84
+ .#{$n}-card__content.#{$n}-card__content .#{$n}-button.#{$n}-button:hover {
85
+ color: $white;
86
+ }
87
+
88
+ .#{$n}-carousel__controls .#{$n}-button .#{$n}-icon svg path {
89
+ transition: fill $transition;
90
+ }
91
+
92
+ .#{$n}-carousel__controls .#{$n}-button:hover .#{$n}-icon svg path {
93
+ fill: $interaction-dark;
94
+ }
95
+
96
+ .#{$n}-carousel-pagination__button::before {
97
+ transition: background-color $transition;
98
+ }
99
+
100
+ .#{$n}-carousel-pagination__button:hover::before {
101
+ background-color: $interaction-dark;
102
+ }
103
+
104
+ .#{$n}-upload-toggle path {
105
+ transition: fill $transition;
106
+ }
107
+
108
+ .#{$n}-upload-toggle:hover path {
109
+ background-color: $interaction-dark;
110
+ }
111
+
112
+ .#{$n}-file-upload {
113
+ transition: border $transition;
114
+
115
+ &:hover {
116
+ border-color: $interaction-dark;
117
+ }
118
+ }
119
+
120
+ .#{$n}-upload__label {
121
+ transition: color $transition;
122
+
123
+ &:hover {
124
+ color: $interaction-dark;
125
+ }
126
+ }
127
+
128
+ .#{$n}-options__menu__item:not(.#{$n}-button--disabled) {
129
+ transition: color $transition;
130
+
131
+ &:hover {
132
+ color: $interaction-dark;
133
+ }
134
+ }
135
+
136
+ .#{$n}-options__close {
137
+ transition: color $transition;
138
+
139
+ &:hover {
140
+ color: $interaction-dark;
141
+ }
142
+ }
143
+
144
+ .#{$n}-transcript__input,
145
+ .#{$n}-input__select {
146
+ transition: border $transition;
147
+
148
+ &:hover {
149
+ border-color: $interaction-dark;
150
+ }
151
+ }
152
+ }
153
+ }
@@ -1,4 +1,4 @@
1
- .#{$n}-app__body,
1
+ .#{$n}-chat__body,
2
2
  .#{$n}-app--layout-inline .#{$n}-suggestions__list,
3
3
  .#{$n}-options__wrapper {
4
4
  scrollbar-color: $brand1 transparent;
@@ -95,7 +95,7 @@ $app-header-bgcolor: $brand3;
95
95
  }
96
96
  }
97
97
 
98
- .#{$n}-app__header {
98
+ .#{$n}-chat__header {
99
99
  display: flex;
100
100
  position: relative;
101
101
  flex: 0 0 auto;
@@ -108,7 +108,7 @@ $app-header-bgcolor: $brand3;
108
108
  border-top-right-radius: $borderradius;
109
109
  }
110
110
 
111
- .#{$n}-app--collapsed.#{$n}-app--deprecated .#{$n}-app__header {
111
+ .#{$n}-app--collapsed.#{$n}-app--deprecated .#{$n}-chat__header {
112
112
  border-bottom: 0;
113
113
  border-bottom-left-radius: $borderradius;
114
114
  border-bottom-right-radius: $borderradius;
@@ -167,7 +167,7 @@ $app-header-bgcolor: $brand3;
167
167
  }
168
168
  }
169
169
 
170
- .#{$n}-app__container {
170
+ .#{$n}-chat__container {
171
171
  display: flex;
172
172
  position: relative;
173
173
  flex: 1 1 auto;
@@ -175,7 +175,7 @@ $app-header-bgcolor: $brand3;
175
175
  max-height: 100%;
176
176
  }
177
177
 
178
- .#{$n}-app__body {
178
+ .#{$n}-chat__body {
179
179
  display: flex;
180
180
  position: relative;
181
181
  flex-grow: 4;
@@ -184,17 +184,17 @@ $app-header-bgcolor: $brand3;
184
184
  border-bottom: $thin-border solid $grey-b;
185
185
  }
186
186
 
187
- .#{$n}-app--collapsed.#{$n}-app--deprecated .#{$n}-app__body {
187
+ .#{$n}-app--collapsed.#{$n}-app--deprecated .#{$n}-chat__body {
188
188
  display: none;
189
189
  }
190
190
 
191
- .#{$n}-app--layout-window.#{$n}-app--deprecated .#{$n}-app__body {
191
+ .#{$n}-app--layout-window.#{$n}-app--deprecated .#{$n}-chat__body {
192
192
  overscroll-behavior: contain;
193
193
  /* stylelint-disable-next-line property-no-vendor-prefix */
194
194
  -ms-scroll-chaining: none;
195
195
  }
196
196
 
197
- .#{$n}-app__entry {
197
+ .#{$n}-chat__entry {
198
198
  position: relative;
199
199
  flex: 0 0 auto;
200
200
  padding: $app-parts-padding;
@@ -204,7 +204,7 @@ $app-header-bgcolor: $brand3;
204
204
  }
205
205
  }
206
206
 
207
- .#{$n}-app--collapsed.#{$n}-app--deprecated .#{$n}-app__entry {
207
+ .#{$n}-app--collapsed.#{$n}-app--deprecated .#{$n}-chat__entry {
208
208
  display: none;
209
209
  }
210
210
 
@@ -193,7 +193,7 @@ $avatar-size: $badge-touch-size;
193
193
  }
194
194
  }
195
195
 
196
- &.cvco-message--source-user .#{$n}-message__body {
196
+ &.#{$n}-message--source-user .#{$n}-message__body {
197
197
  a {
198
198
  color: $white;
199
199
  }
@@ -132,7 +132,7 @@ $button-transition: $transition;
132
132
  background-color: $brand3;
133
133
  }
134
134
 
135
- &:hover .cvco-icon svg path {
135
+ &:hover .#{$n}-icon svg path {
136
136
  fill: $white;
137
137
  }
138
138
  }
@@ -3,7 +3,7 @@
3
3
 
4
4
  // BASE
5
5
  // ----
6
- .#{$n}-app__options {
6
+ .#{$n}-chat__options {
7
7
  display: flex;
8
8
  position: relative;
9
9
  align-items: center;
@@ -12,15 +12,15 @@
12
12
  border-top: $thin-border solid $grey-b;
13
13
  }
14
14
 
15
- .#{$n}-app__options-item--left {
15
+ .#{$n}-chat__options-item--left {
16
16
  margin-right: auto;
17
17
  }
18
18
 
19
- &.#{$n}-app--collapsed .#{$n}-app__options {
19
+ &.#{$n}-app--collapsed .#{$n}-chat__options {
20
20
  display: none;
21
21
  }
22
22
 
23
- .#{$n}-app__options__button {
23
+ .#{$n}-chat__options__button {
24
24
  display: flex;
25
25
  align-items: center;
26
26
  justify-content: flex-end;
@@ -28,23 +28,23 @@
28
28
  border-radius: $buttons-border-radius;
29
29
  }
30
30
 
31
- &.#{$n}-app--collapsed .#{$n}-app__options-button {
31
+ &.#{$n}-app--collapsed .#{$n}-chat__options-button {
32
32
  display: none;
33
33
  }
34
34
 
35
- .#{$n}-app__options__button .#{$n}-icon {
35
+ .#{$n}-chat__options__button .#{$n}-icon {
36
36
  flex: 0 0 $spacer * 0.75;
37
37
  width: $spacer * 0.75;
38
38
  height: $spacer * 0.75;
39
39
  margin-right: $spacer * 0.25;
40
40
  }
41
41
 
42
- .#{$n}-app__options__button .#{$n}-icon svg {
42
+ .#{$n}-chat__options__button .#{$n}-icon svg {
43
43
  width: 100%;
44
44
  height: 100%;
45
45
  }
46
46
 
47
- .#{$n}-app__options__button.#{$n}-button--disabled .#{$n}-icon path {
47
+ .#{$n}-chat__options__button.#{$n}-button--disabled .#{$n}-icon path {
48
48
  fill: currentColor;
49
49
  }
50
50
 
@@ -11,7 +11,7 @@
11
11
  margin: 0 0 4rem;
12
12
  }
13
13
 
14
- .chat-inline h2 {
14
+ .chat-inline > h2 {
15
15
  @media only screen and (max-width: 800px) {
16
16
  padding-left: 1rem;
17
17
  }
@@ -0,0 +1,3 @@
1
+ @import '1-settings/config';
2
+ @import '6-default-implementation/hover';
3
+ @import '6-default-implementation/scrollbar';
@@ -6,13 +6,12 @@
6
6
  @import '2-tools/functions';
7
7
  @import '2-tools/mixins';
8
8
 
9
- @import '3-app/app';
10
- @import '5-components/buttons';
11
-
12
9
  .#{$n}-app {
10
+ @import '3-chat/chat';
13
11
  @import '4-base/elements';
14
12
  @import '4-base/formelements';
15
13
  @import '5-components/avatar';
14
+ @import '5-components/buttons';
16
15
  @import '5-components/choice-prompt';
17
16
  @import '5-components/conversation';
18
17
  @import '5-components/divider';
@@ -39,6 +38,12 @@
39
38
  @import '5-components/notification';
40
39
  @import '5-components/character-limit';
41
40
  @import '5-components/collapse-button';
41
+ @import '5-components/message-body';
42
+ @import '5-components/message-count';
43
+ @import '5-components/suggestions';
44
+ @import '5-components/window-open-button';
45
+ @import '5-components/pre-chat-messages';
46
+ @import '5-components/unstarted';
42
47
  }
43
48
 
44
49
  .#{$n}-app,
@@ -46,10 +51,4 @@
46
51
  @import '4-base/a11y';
47
52
  }
48
53
 
49
- @import '5-components/message-body';
50
- @import '5-components/message-count';
51
- @import '5-components/suggestions';
52
54
  @import '5-components/modal';
53
- @import '5-components/window-open-button';
54
- @import '5-components/pre-chat-messages';
55
- @import '5-components/unstarted';
@@ -156,7 +156,7 @@ module.exports = (env = {}, argv = {}, configOverrides = {}) => {
156
156
  {
157
157
  loader: 'file-loader',
158
158
  options: {
159
- name: 'styles.css',
159
+ name: '[name].css',
160
160
  },
161
161
  },
162
162
  'extract-loader',
@@ -167,6 +167,14 @@ module.exports = (env = {}, argv = {}, configOverrides = {}) => {
167
167
  },
168
168
  entry: {
169
169
  styles: path.join(SRC_ROOT, 'stylesheets/styles.scss'),
170
+ 'styles-default-implementation': path.join(
171
+ SRC_ROOT,
172
+ 'stylesheets/styles-default-implementation.scss',
173
+ ),
174
+ 'deprecated-view': path.join(
175
+ SRC_ROOT,
176
+ 'stylesheets/deprecated-view.scss',
177
+ ),
170
178
  },
171
179
  }
172
180
 
@@ -1,6 +1,6 @@
1
1
  const path = require('path')
2
2
 
3
- const BABEL_TRANSPILE_MODULES = ['debug', 'superagent', 'phoenix', 'marked']
3
+ const BABEL_TRANSPILE_MODULES = ['debug', 'superagent', 'phoenix']
4
4
  const BROWSERS = 'last 1 version, > 1%, not dead, not ie 11, not ie_mob 11'
5
5
 
6
6
  const ROOT = path.resolve(__dirname, '..')
@@ -47,11 +47,8 @@ const ALIASSES = {
47
47
  'stylesheets',
48
48
  'styles.scss',
49
49
  ),
50
- '@seamly/web-ui/src/stylesheets/styles-webui-only.scss': path.resolve(
51
- SRC_ROOT,
52
- 'stylesheets',
53
- 'styles-webui-only.scss',
54
- ),
50
+ '@seamly/web-ui/src/stylesheets/styles-default-implementation.scss':
51
+ path.resolve(SRC_ROOT, 'stylesheets', 'styles-default-implementation.scss'),
55
52
  '@seamly/web-ui/src/stylesheets/style-guide.scss': path.resolve(
56
53
  SRC_ROOT,
57
54
  'stylesheets',
@@ -1,151 +0,0 @@
1
- @media (hover: hover) {
2
- .#{$n}-button.#{$n}-collapse-button,
3
- .#{$n}-modal__enlarge,
4
- .#{$n}-modal__close {
5
- transition: background-color $transition;
6
-
7
- &:hover {
8
- background-color: $interaction-dark;
9
- }
10
-
11
- path {
12
- transition: fill $transition;
13
- }
14
-
15
- &:hover svg path {
16
- fill: $white;
17
- }
18
- }
19
-
20
- .#{$n}-button {
21
- transition: color $transition, background-color $transition;
22
- }
23
-
24
- .#{$n}-button--primary:not(.#{$n}-button--disabled) {
25
- &:hover {
26
- background-color: $interaction-dark;
27
- }
28
- }
29
-
30
- .#{$n}-button--secondary:not(.#{$n}-button--disabled),
31
- .#{$n}-button--tertiary:not(.#{$n}-button--disabled) {
32
- &:hover {
33
- color: $interaction-dark;
34
- }
35
- }
36
-
37
- .#{$n}-choice-prompt__item--secondary .#{$n}-button {
38
- &:hover {
39
- background-color: initial;
40
- color: $interaction-dark;
41
- }
42
- }
43
-
44
- .#{$n}-message--type-cta .#{$n}-button {
45
- &:hover {
46
- background-color: $white;
47
- color: $interaction-dark;
48
- }
49
- }
50
-
51
- .#{$n}-message__body a {
52
- transition: color $transition;
53
-
54
- &:hover {
55
- text-decoration: none;
56
- }
57
- }
58
-
59
- .#{$n}-conversation__item--source-agent
60
- .#{$n}-message__body.#{$n}-message__body
61
- a {
62
- &:hover {
63
- color: $interaction-dark;
64
- }
65
- }
66
-
67
- .#{$n}-input__text {
68
- transition: padding $transition, border $transition;
69
-
70
- &:hover {
71
- border-color: $interaction-dark;
72
- }
73
-
74
- &:focus {
75
- border-color: transparent;
76
- }
77
- }
78
-
79
- .#{$n}-input__submit:not(:disabled):hover .#{$n}-icon path {
80
- fill: $interaction-dark;
81
- }
82
-
83
- .#{$n}-card__content.#{$n}-card__content .#{$n}-button.#{$n}-button:hover {
84
- color: $white;
85
- }
86
-
87
- .#{$n}-carousel__controls .#{$n}-button .#{$n}-icon svg path {
88
- transition: fill $transition;
89
- }
90
-
91
- .#{$n}-carousel__controls .#{$n}-button:hover .#{$n}-icon svg path {
92
- fill: $interaction-dark;
93
- }
94
-
95
- .#{$n}-carousel-pagination__button::before {
96
- transition: background-color $transition;
97
- }
98
-
99
- .#{$n}-carousel-pagination__button:hover::before {
100
- background-color: $interaction-dark;
101
- }
102
-
103
- .#{$n}-upload-toggle path {
104
- transition: fill $transition;
105
- }
106
-
107
- .#{$n}-upload-toggle:hover path {
108
- background-color: $interaction-dark;
109
- }
110
-
111
- .#{$n}-file-upload {
112
- transition: border $transition;
113
-
114
- &:hover {
115
- border-color: $interaction-dark;
116
- }
117
- }
118
-
119
- .#{$n}-upload__label {
120
- transition: color $transition;
121
-
122
- &:hover {
123
- color: $interaction-dark;
124
- }
125
- }
126
-
127
- .#{$n}-options__menu__item:not(.#{$n}-button--disabled) {
128
- transition: color $transition;
129
-
130
- &:hover {
131
- color: $interaction-dark;
132
- }
133
- }
134
-
135
- .#{$n}-options__close {
136
- transition: color $transition;
137
-
138
- &:hover {
139
- color: $interaction-dark;
140
- }
141
- }
142
-
143
- .#{$n}-transcript__input,
144
- .#{$n}-input__select {
145
- transition: border $transition;
146
-
147
- &:hover {
148
- border-color: $interaction-dark;
149
- }
150
- }
151
- }
@@ -1,3 +0,0 @@
1
- @import '1-settings/config';
2
- @import '6-webui-only/hover';
3
- @import '6-webui-only/scrollbar';