@seamly/web-ui 19.1.1 → 20.0.0-beta.1

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 (186) hide show
  1. package/CHANGELOG.md +625 -0
  2. package/build/dist/lib/components.js +2 -1
  3. package/build/dist/lib/components.min.js +1 -1
  4. package/build/dist/lib/index.debug.js +183 -128
  5. package/build/dist/lib/index.debug.min.js +1 -1
  6. package/build/dist/lib/index.debug.min.js.LICENSE.txt +45 -25
  7. package/build/dist/lib/index.js +7290 -7753
  8. package/build/dist/lib/index.min.js +1 -1
  9. package/build/dist/lib/index.min.js.LICENSE.txt +0 -5
  10. package/build/dist/lib/standalone.js +5785 -6255
  11. package/build/dist/lib/standalone.min.js +1 -1
  12. package/build/dist/lib/standalone.min.js.LICENSE.txt +0 -5
  13. package/build/dist/lib/style-guide.js +10834 -4971
  14. package/build/dist/lib/style-guide.min.js +2 -1
  15. package/build/dist/lib/style-guide.min.js.LICENSE.txt +9 -0
  16. package/build/dist/lib/styles.css +1 -1
  17. package/package.json +1 -2
  18. package/src/icons/icon_file-32.svg +1 -1
  19. package/src/javascripts/api/errors/seamly-base-error.js +7 -0
  20. package/src/javascripts/api/index.js +48 -37
  21. package/src/javascripts/api/producer.js +5 -1
  22. package/src/javascripts/config.js +1 -5
  23. package/src/javascripts/domains/app/actions.js +22 -5
  24. package/src/javascripts/domains/config/actions.js +3 -0
  25. package/src/javascripts/domains/config/reducer.js +9 -0
  26. package/src/javascripts/domains/errors/index.js +5 -4
  27. package/src/javascripts/domains/forms/hooks.js +3 -1
  28. package/src/javascripts/domains/forms/provider.js +12 -0
  29. package/src/javascripts/domains/forms/reducer.js +2 -0
  30. package/src/javascripts/domains/i18n/hooks.js +2 -1
  31. package/src/javascripts/domains/i18n/reducer.js +2 -0
  32. package/src/javascripts/domains/interrupt/reducer.js +2 -2
  33. package/src/javascripts/domains/options/middleware.js +15 -31
  34. package/src/javascripts/domains/store/index.js +2 -1
  35. package/src/javascripts/domains/store/state-reducer.js +3 -8
  36. package/src/javascripts/domains/translations/components/options-dialog/form.js +1 -1
  37. package/src/javascripts/domains/translations/components/options-dialog/index.js +15 -1
  38. package/src/javascripts/domains/translations/reducer.js +2 -0
  39. package/src/javascripts/domains/visibility/actions.js +1 -1
  40. package/src/javascripts/domains/visibility/hooks.js +10 -8
  41. package/src/javascripts/domains/visibility/utils.js +1 -2
  42. package/src/javascripts/index.js +5 -3
  43. package/src/javascripts/lib/css.js +7 -1
  44. package/src/javascripts/lib/engine/index.js +4 -3
  45. package/src/javascripts/lib/external-api/index.js +38 -29
  46. package/src/javascripts/package/components.js +2 -1
  47. package/src/javascripts/style-guide/components/app.js +1 -1
  48. package/src/javascripts/style-guide/components/static-core.js +18 -4
  49. package/src/javascripts/style-guide/states.js +203 -298
  50. package/src/javascripts/ui/components/chat-app.js +1 -1
  51. package/src/javascripts/ui/components/conversation/component-filter.js +6 -0
  52. package/src/javascripts/ui/components/conversation/event/carousel-component/index.js +8 -1
  53. package/src/javascripts/ui/components/conversation/event/carousel-message/components/slide.js +2 -3
  54. package/src/javascripts/ui/components/conversation/event/conversation-suggestions.js +70 -0
  55. package/src/javascripts/ui/components/conversation/event/participant.js +2 -5
  56. package/src/javascripts/ui/components/conversation/event/splash.js +26 -0
  57. package/src/javascripts/ui/components/conversation/event/text.js +1 -2
  58. package/src/javascripts/ui/components/core/seamly-core.js +12 -9
  59. package/src/javascripts/ui/components/core/seamly-event-subscriber.js +4 -10
  60. package/src/javascripts/ui/components/core/seamly-instance-functions-loader.js +1 -8
  61. package/src/javascripts/ui/components/entry/entry-container.js +5 -3
  62. package/src/javascripts/ui/components/entry/text-entry/index.js +7 -1
  63. package/src/javascripts/ui/components/entry/text-entry/text-entry-form.js +5 -1
  64. package/src/javascripts/ui/components/entry/toggle-button.js +4 -2
  65. package/src/javascripts/ui/components/entry/upload/file-upload-form.js +1 -1
  66. package/src/javascripts/ui/components/form-controls/error.js +6 -2
  67. package/src/javascripts/ui/components/form-controls/form.js +26 -3
  68. package/src/javascripts/ui/components/layout/app-frame.js +24 -15
  69. package/src/javascripts/ui/components/layout/chat-frame.js +0 -2
  70. package/src/javascripts/ui/components/layout/modal-wrapper.js +0 -80
  71. package/src/javascripts/ui/components/layout/pre-chat-messages.js +45 -0
  72. package/src/javascripts/ui/components/options/options-frame.js +9 -4
  73. package/src/javascripts/ui/components/options/options.js +1 -4
  74. package/src/javascripts/ui/components/options/transcript/index.js +15 -1
  75. package/src/javascripts/ui/components/options/transcript/transcript-form.js +1 -1
  76. package/src/javascripts/ui/components/suggestions/index.js +174 -0
  77. package/src/javascripts/ui/components/suggestions/suggestions-item.js +40 -0
  78. package/src/javascripts/ui/components/suggestions/suggestions-list.js +24 -0
  79. package/src/javascripts/ui/components/view/app-view.js +21 -0
  80. package/src/javascripts/ui/components/view/deprecated-view.js +30 -0
  81. package/src/javascripts/ui/components/view/index.js +27 -0
  82. package/src/javascripts/ui/components/view/inline-view.js +45 -0
  83. package/src/javascripts/ui/components/view/window-view/collapse-button.js +20 -0
  84. package/src/javascripts/ui/components/view/window-view/index.js +82 -0
  85. package/src/javascripts/ui/components/view/window-view/window-open-button.js +68 -0
  86. package/src/javascripts/ui/components/widgets/lightbox.js +7 -2
  87. package/src/javascripts/ui/hooks/component-helper-hooks.js +0 -9
  88. package/src/javascripts/ui/hooks/seamly-hooks.js +0 -1
  89. package/src/javascripts/ui/hooks/seamly-state-hooks.js +28 -4
  90. package/src/javascripts/ui/hooks/use-seamly-chat.js +12 -3
  91. package/src/javascripts/ui/hooks/use-seamly-commands.js +4 -31
  92. package/src/javascripts/ui/utils/seamly-utils.js +2 -14
  93. package/src/stylesheets/1-settings/_animations.scss +0 -6
  94. package/src/stylesheets/1-settings/_config.scss +34 -35
  95. package/src/stylesheets/2-tools/_functions.scss +0 -5
  96. package/src/stylesheets/2-tools/_mixins.scss +4 -16
  97. package/src/stylesheets/3-app/_app.scss +78 -135
  98. package/src/stylesheets/4-base/_a11y.scss +0 -3
  99. package/src/stylesheets/4-base/_elements.scss +0 -11
  100. package/src/stylesheets/4-base/_formelements.scss +4 -14
  101. package/src/stylesheets/5-components/_avatar.scss +2 -44
  102. package/src/stylesheets/5-components/_buttons.scss +6 -45
  103. package/src/stylesheets/5-components/_chat-status.scss +14 -38
  104. package/src/stylesheets/5-components/_choice-prompt.scss +33 -2
  105. package/src/stylesheets/5-components/_collapse-button.scss +16 -0
  106. package/src/stylesheets/5-components/_conversation.scss +26 -2
  107. package/src/stylesheets/5-components/_disclaimer.scss +10 -12
  108. package/src/stylesheets/5-components/_divider.scss +7 -4
  109. package/src/stylesheets/5-components/_error.scss +1 -1
  110. package/src/stylesheets/5-components/_form.scss +9 -0
  111. package/src/stylesheets/5-components/_icon.scss +10 -1
  112. package/src/stylesheets/5-components/_idle.scss +0 -8
  113. package/src/stylesheets/5-components/_input.scss +14 -20
  114. package/src/stylesheets/5-components/_interrupt.scss +0 -2
  115. package/src/stylesheets/5-components/_loader.scss +0 -32
  116. package/src/stylesheets/5-components/_message-author.scss +40 -0
  117. package/src/stylesheets/5-components/_message-body.scss +194 -0
  118. package/src/stylesheets/5-components/_message-card.scss +55 -0
  119. package/src/stylesheets/5-components/_message-carousel.scss +143 -0
  120. package/src/stylesheets/5-components/_message-count.scss +11 -28
  121. package/src/stylesheets/5-components/_message-cta.scss +23 -0
  122. package/src/stylesheets/5-components/_message-info.scss +11 -0
  123. package/src/stylesheets/5-components/_message-translation-info.scss +17 -0
  124. package/src/stylesheets/5-components/_message.scss +13 -364
  125. package/src/stylesheets/5-components/_modal.scss +28 -58
  126. package/src/stylesheets/5-components/_notification.scss +0 -5
  127. package/src/stylesheets/5-components/_options.scss +27 -42
  128. package/src/stylesheets/5-components/_pre-chat-messages.scss +30 -0
  129. package/src/stylesheets/5-components/_prompt.scss +0 -8
  130. package/src/stylesheets/5-components/_skip-link.scss +3 -3
  131. package/src/stylesheets/5-components/_suggestions.scss +96 -0
  132. package/src/stylesheets/5-components/_unstarted.scss +50 -0
  133. package/src/stylesheets/5-components/_upload.scss +26 -28
  134. package/src/stylesheets/5-components/_window-open-button.scss +39 -0
  135. package/src/stylesheets/6-webui-only/_hover.scss +151 -0
  136. package/src/stylesheets/6-webui-only/_scrollbar.scss +31 -0
  137. package/src/stylesheets/7-deprecated/1-settings/_animations.scss +43 -0
  138. package/src/stylesheets/7-deprecated/1-settings/_config.scss +105 -0
  139. package/src/stylesheets/7-deprecated/2-tools/_functions.scss +22 -0
  140. package/src/stylesheets/7-deprecated/2-tools/_mixins.scss +77 -0
  141. package/src/stylesheets/7-deprecated/3-app/_app.scss +214 -0
  142. package/src/stylesheets/7-deprecated/4-base/_a11y.scss +14 -0
  143. package/src/stylesheets/7-deprecated/4-base/_elements.scss +21 -0
  144. package/src/stylesheets/7-deprecated/4-base/_formelements.scss +57 -0
  145. package/src/stylesheets/{5-components → 7-deprecated/5-components}/_agent-info.scss +0 -0
  146. package/src/stylesheets/7-deprecated/5-components/_avatar.scss +64 -0
  147. package/src/stylesheets/7-deprecated/5-components/_buttons.scss +94 -0
  148. package/src/stylesheets/{5-components → 7-deprecated/5-components}/_card.scss +0 -0
  149. package/src/stylesheets/{5-components → 7-deprecated/5-components}/_carousel.scss +0 -0
  150. package/src/stylesheets/7-deprecated/5-components/_character-limit.scss +36 -0
  151. package/src/stylesheets/{5-components/_cobrowsing.scss → 7-deprecated/5-components/_chat-status.scss} +18 -16
  152. package/src/stylesheets/7-deprecated/5-components/_choice-prompt.scss +27 -0
  153. package/src/stylesheets/7-deprecated/5-components/_collapse-button.scss +17 -0
  154. package/src/stylesheets/7-deprecated/5-components/_conversation.scss +44 -0
  155. package/src/stylesheets/7-deprecated/5-components/_disclaimer.scss +36 -0
  156. package/src/stylesheets/7-deprecated/5-components/_divider.scss +91 -0
  157. package/src/stylesheets/7-deprecated/5-components/_error.scss +24 -0
  158. package/src/stylesheets/{5-components → 7-deprecated/5-components}/_faq.scss +8 -3
  159. package/src/stylesheets/{5-components → 7-deprecated/5-components}/_header-controls.scss +0 -0
  160. package/src/stylesheets/7-deprecated/5-components/_icon.scss +4 -0
  161. package/src/stylesheets/7-deprecated/5-components/_idle.scss +61 -0
  162. package/src/stylesheets/7-deprecated/5-components/_input.scss +78 -0
  163. package/src/stylesheets/7-deprecated/5-components/_interrupt.scss +35 -0
  164. package/src/stylesheets/7-deprecated/5-components/_loader.scss +78 -0
  165. package/src/stylesheets/7-deprecated/5-components/_message-count.scss +41 -0
  166. package/src/stylesheets/7-deprecated/5-components/_message.scss +385 -0
  167. package/src/stylesheets/7-deprecated/5-components/_modal.scss +138 -0
  168. package/src/stylesheets/7-deprecated/5-components/_notification.scss +20 -0
  169. package/src/stylesheets/7-deprecated/5-components/_options.scss +286 -0
  170. package/src/stylesheets/7-deprecated/5-components/_prompt.scss +44 -0
  171. package/src/stylesheets/7-deprecated/5-components/_skip-link.scss +21 -0
  172. package/src/stylesheets/{5-components → 7-deprecated/5-components}/_svg-graphic.scss +0 -0
  173. package/src/stylesheets/7-deprecated/5-components/_upload.scss +213 -0
  174. package/src/stylesheets/deprecated-view.scss +64 -0
  175. package/src/stylesheets/styles-webui-only.scss +3 -0
  176. package/src/stylesheets/styles.scss +15 -25
  177. package/webpack/config.site.js +4 -0
  178. package/webpack/defaults.js +5 -0
  179. package/src/.DS_Store +0 -0
  180. package/src/javascripts/ui/components/conversation/event/hooks/use-text-rendering.js +0 -35
  181. package/src/javascripts/ui/components/faq/faq.js +0 -162
  182. package/src/javascripts/ui/components/layout/view.js +0 -36
  183. package/src/javascripts/ui/components/options/cobrowsing.js +0 -110
  184. package/src/javascripts/ui/components/warnings/cobrowsing-active-frame.js +0 -29
  185. package/src/javascripts/ui/components/warnings/cobrowsing-active.js +0 -33
  186. package/src/stylesheets/5-components/_modal_mode.scss +0 -108
@@ -10,13 +10,18 @@ import Icon from '../layout/icon'
10
10
  import { useConfig } from '../../../domains/config'
11
11
 
12
12
  const Lightbox = ({ url, description, onClose: onCloseHandler }) => {
13
- const { zIndex } = useConfig()
13
+ const { zIndex, layoutMode, namespace } = useConfig()
14
14
  const onActivityHandler = useSeamlyActivityEventHandler()
15
15
  const appContainerClassNames = useSeamlyAppContainerClassNames()
16
16
  const focusContainer = useRef(null)
17
17
  const { t } = useI18n()
18
18
 
19
- const classNames = ['modal', ...appContainerClassNames]
19
+ // TODO: Change incorrect usage of css modifiers
20
+ const defaultClassNames = [
21
+ `app--layout-${layoutMode}`,
22
+ `namespace--${namespace}`,
23
+ ]
24
+ const classNames = ['modal', ...defaultClassNames, ...appContainerClassNames]
20
25
 
21
26
  const onFrameClickHandler = (e) => {
22
27
  e.stopPropagation()
@@ -1,5 +1,3 @@
1
- import { useSeamlyStateContext } from './seamly-state-hooks'
2
- import { useElementFocusingById } from './focus-helper-hooks'
3
1
  import { useConfig } from '../../domains/config'
4
2
 
5
3
  export const useSeamlyAppContainerClassNames = () => {
@@ -20,10 +18,3 @@ export const useSeamlyMessageContainerClassNames = (event) => {
20
18
 
21
19
  return classNames
22
20
  }
23
-
24
- export const useCobrowsingContainer = () => {
25
- const { cobrowsingContainerId: id } = useSeamlyStateContext()
26
- const focusContainer = useElementFocusingById(id)
27
-
28
- return { id, focusContainer }
29
- }
@@ -29,7 +29,6 @@ export { default as useSeamlyDispatchContext } from './use-seamly-dispatch'
29
29
  export {
30
30
  useSeamlyAppContainerClassNames,
31
31
  useSeamlyMessageContainerClassNames,
32
- useCobrowsingContainer,
33
32
  } from './component-helper-hooks'
34
33
  export { useSeamlyOptions, useOptionButton } from './seamly-option-hooks'
35
34
  export { useFileUploadMeta, useFileUploads } from './file-upload-hooks'
@@ -1,15 +1,40 @@
1
1
  import { createSelector } from 'reselect'
2
2
  import { useSelector } from '../../domains/redux'
3
3
  import { microsecondsToMilliseconds } from '../utils/general-utils'
4
- import { Selectors as ConfigSelectors, useConfig } from '../../domains/config'
4
+ import * as ConfigSelectors from '../../domains/config/selectors'
5
+ import * as AppSelectors from '../../domains/app/selectors'
6
+ import { useConfig } from '../../domains/config/hooks'
5
7
 
6
8
  export const selectState = (state) => state.state
7
9
  export const useSeamlyStateContext = () => useSelector(selectState)
8
10
 
9
- export const selectEvents = createSelector(
11
+ export const selectEventsWithSuggestion = createSelector(
10
12
  selectState,
11
13
  ConfigSelectors.selectConfig,
12
- ({ events }, config) => {
14
+ AppSelectors.selectUserHasResponded,
15
+ ({ events, serviceData }, config, userHasResponded) => {
16
+ if (
17
+ userHasResponded ||
18
+ config.layoutMode === 'inline' ||
19
+ !serviceData.suggestion ||
20
+ !serviceData.suggestion?.body.length
21
+ ) {
22
+ return events
23
+ }
24
+
25
+ const suggestionsEvent = {
26
+ type: 'service_data',
27
+ payload: serviceData.suggestion,
28
+ }
29
+
30
+ return [...events, suggestionsEvent]
31
+ },
32
+ )
33
+
34
+ export const selectEvents = createSelector(
35
+ selectEventsWithSuggestion,
36
+ ConfigSelectors.selectConfig,
37
+ (events, config) => {
13
38
  const { enabled, threshold } = config?.messages?.timeIndicator ?? {}
14
39
  if (!enabled) {
15
40
  return events
@@ -91,7 +116,6 @@ export const useSeamlyLayoutMode = () => {
91
116
 
92
117
  return {
93
118
  isInline: layoutMode === 'inline',
94
- isModal: layoutMode === 'modal',
95
119
  isWindow: layoutMode === 'window',
96
120
  isResolving: !layoutMode,
97
121
  }
@@ -7,11 +7,13 @@ import { useSeamlyHasConversation } from './seamly-api-hooks'
7
7
  import { useLiveRegion } from './live-region-hooks'
8
8
  import { seamlyActions } from '../utils/seamly-utils'
9
9
  import { useVisibility, visibilityStates } from '../../domains/visibility'
10
+ import { useConfig } from '../../domains/config'
10
11
 
11
12
  const { SET_IS_LOADING } = seamlyActions
12
13
 
13
14
  const useSeamlyChat = () => {
14
15
  const { t } = useI18n()
16
+ const { layoutMode } = useConfig()
15
17
  const { isOpen, isVisible, setVisibility } = useVisibility()
16
18
  const dispatch = useSeamlyDispatchContext()
17
19
  const events = useEvents()
@@ -88,7 +90,7 @@ const useSeamlyChat = () => {
88
90
  // multiple in-flight connection processes.
89
91
 
90
92
  if (
91
- (!isOpen && !hasConversation) ||
93
+ (layoutMode === 'window' && !isOpen && !hasConversation) ||
92
94
  connectCalled.current ||
93
95
  !apiConfigReady
94
96
  ) {
@@ -104,13 +106,20 @@ const useSeamlyChat = () => {
104
106
  isLoading: false,
105
107
  })
106
108
  }
107
-
108
109
  connect().then(() => {
109
110
  start()
110
111
  })
111
112
 
112
113
  connectCalled.current = true
113
- }, [isOpen, hasConversation, apiConfigReady, start, connect, dispatch])
114
+ }, [
115
+ isOpen,
116
+ hasConversation,
117
+ apiConfigReady,
118
+ start,
119
+ connect,
120
+ dispatch,
121
+ layoutMode,
122
+ ])
114
123
 
115
124
  const openChat = () => {
116
125
  setVisibility(visibilityStates.open)
@@ -12,16 +12,11 @@ import { actionTypes, seamlyActions } from '../utils/seamly-utils'
12
12
  import { useStableCallback } from './utility-hooks'
13
13
  import { Actions as InterruptActions } from '../../domains/interrupt'
14
14
  import { useConfig } from '../../domains/config'
15
- import { useUserHasResponded, Actions as AppActions } from '../../domains/app'
15
+ import * as AppActions from '../../domains/app/actions'
16
+ import { useUserHasResponded } from '../../domains/app/hooks'
16
17
  import { useVisibility } from '../../domains/visibility'
17
18
 
18
- const {
19
- ADD_EVENT,
20
- SET_IS_LOADING,
21
- SET_HEADER_SUB_TITLE,
22
- SET_INITIAL_STATE,
23
- SET_FEATURES,
24
- } = seamlyActions
19
+ const { ADD_EVENT, SET_INITIAL_STATE } = seamlyActions
25
20
 
26
21
  const useSeamlyCommands = () => {
27
22
  const api = useSeamlyApiContext()
@@ -68,29 +63,7 @@ const useSeamlyCommands = () => {
68
63
 
69
64
  const reset = useCallback(async () => {
70
65
  dispatch(AppActions.reset())
71
- dispatch(InterruptActions.clear())
72
-
73
- dispatch({
74
- type: SET_IS_LOADING,
75
- isLoading: true,
76
- })
77
-
78
- const { agentName } = appConfig.defaults || {}
79
-
80
- dispatch({
81
- type: SET_HEADER_SUB_TITLE,
82
- title: agentName || '',
83
- })
84
-
85
- try {
86
- const { features } = await api.reset()
87
-
88
- dispatch({ type: SET_FEATURES, features })
89
- dispatch({ type: SET_INITIAL_STATE, initialState: {} })
90
- } catch (error) {
91
- dispatch(InterruptActions.set(error))
92
- }
93
- }, [api, dispatch, appConfig])
66
+ }, [dispatch])
94
67
 
95
68
  const getMessageBase = useCallback(
96
69
  (type) => ({
@@ -19,6 +19,7 @@ export const payloadTypes = {
19
19
  countdown: 'countdown',
20
20
  upload: 'upload',
21
21
  cta: 'cta',
22
+ splash: 'splash',
22
23
  }
23
24
 
24
25
  export const entryTypes = {
@@ -61,7 +62,6 @@ export const dividerKeys = {
61
62
  }
62
63
 
63
64
  export const featureKeys = {
64
- cobrowsing: 'cobrowsing',
65
65
  sendTranscript: 'sendTranscript',
66
66
  typingPeekahead: 'typingPeekahead',
67
67
  uploads: 'uploads',
@@ -433,7 +433,7 @@ export const seamlyStateReducer = (state, action) => {
433
433
  }
434
434
  }
435
435
 
436
- const { cobrowsing, entry, uploads } = activeServiceSettings
436
+ const { entry, uploads } = activeServiceSettings
437
437
 
438
438
  const historyNewEntryMeta = calculateNewEntryMeta(
439
439
  {
@@ -447,16 +447,6 @@ export const seamlyStateReducer = (state, action) => {
447
447
 
448
448
  let newFeatures = { ...state.options.features }
449
449
 
450
- // Only set cobrowsing if it was initialised by the account config.
451
- if (newFeatures.hasOwnProperty(featureKeys.cobrowsing)) {
452
- newFeatures = {
453
- ...newFeatures,
454
- cobrowsing: {
455
- enabled: !!(cobrowsing && cobrowsing.enabled),
456
- },
457
- }
458
- }
459
-
460
450
  const newFeaturesHasUpload = newFeatures.hasOwnProperty(
461
451
  featureKeys.uploads,
462
452
  )
@@ -626,8 +616,6 @@ export const seamlyStateReducer = (state, action) => {
626
616
  },
627
617
  }
628
618
  case SET_FEATURE_ENABLED_STATE:
629
- // Only set cobrowsing if it already exists in the object.
630
- // Otherwise we may set if for accounts not allowing it at all.
631
619
  return state.options.features.hasOwnProperty(action.key)
632
620
  ? {
633
621
  ...state,
@@ -1,8 +1,4 @@
1
- // ##### ANIMATIONS #####
2
- // ======================
3
-
4
1
  // LOADER
5
-
6
2
  @keyframes #{$n}-loader {
7
3
  0%,
8
4
  75%,
@@ -18,7 +14,6 @@
18
14
  }
19
15
 
20
16
  // FADEIN
21
-
22
17
  @keyframes #{$n}-fadeIn {
23
18
  0% {
24
19
  opacity: 0;
@@ -30,7 +25,6 @@
30
25
  }
31
26
 
32
27
  // BLINK
33
-
34
28
  @keyframes #{$n}-blink {
35
29
  0%,
36
30
  100% {
@@ -14,19 +14,13 @@ $n: $app-name !default;
14
14
  $image-path: '../../img/' !default;
15
15
 
16
16
  // BRAND COLORS
17
-
18
17
  $brand1: #003a5d !default; // 'primary'
19
18
  $brand2: #223182 !default; // 'secondary'
20
19
  $brand3: #4a48c1 !default; // 'tertiary'
21
20
 
22
21
  // UI COLORS
23
-
24
22
  $interaction: $brand3 !default;
25
-
26
- $highlight: #ffc700 !default;
27
-
28
- $positive: #00875e !default;
29
- $positive-light: #19b183 !default;
23
+ $interaction-dark: $brand2 !default;
30
24
 
31
25
  $negative: #db1639 !default;
32
26
  $negative-dark: #ad001f !default;
@@ -43,73 +37,78 @@ $white: #fff !default;
43
37
  $black: #000 !default;
44
38
 
45
39
  // BACKGROUND COLORS
46
-
47
40
  $app-bg: $white !default;
48
41
 
49
- // TYPOGRAPHY
42
+ $threadlist-agent-text-bgcolor: $grey-a;
43
+ $threadlist-user-text-bgcolor: $brand2;
50
44
 
45
+ // TYPOGRAPHY
51
46
  $fontsize-tiny: 10px !default;
52
47
  $fontsize-small: 12px !default;
53
48
  $fontsize-medium: 14px !default;
54
49
  $fontsize-default: 16px !default;
55
50
  $fontsize-large: 18px !default;
56
51
  $fontsize-xlarge: 21px !default;
52
+ $fontsize-xxlarge: 24px !default;
57
53
 
54
+ $fontweight-light: 300 !default;
55
+ $fontweight-regular: 400 !default;
56
+ $fontweight-semibold: 600 !default;
58
57
  $fontweight-bold: 700 !default;
59
58
 
60
59
  $fontfamily-default: arial, helvetica, sans-serif !default;
61
60
 
62
61
  // SPACER
63
-
64
62
  $spacer: 20px !default;
65
- $flex-spacer: 2vw !default;
66
63
 
67
64
  // BORDER
68
-
69
65
  $thin-border: 1px !default;
70
66
 
71
67
  // BORDER-RADIUS
72
-
73
68
  $borderradius: $spacer * 0.5 !default;
74
69
  $borderradius-small: $borderradius * 0.5 !default;
70
+ $borderradius-large: $borderradius * 2 !default;
75
71
 
76
72
  // DIMENSIONS
73
+ $app-window-width: $spacer * 18 !default;
74
+ $app-window-height: $spacer * 36 !default;
77
75
 
78
- $app-initial-width: 195px !default;
79
- $app-started-width: 375px !default;
76
+ $app-inline-height: $spacer * 32 !default;
77
+ $app-inline-maxheight: 90vh !default;
80
78
 
81
- $app-full-height: 720px !default;
82
- $app-collapsed-height: 54px !default;
83
-
84
- $app-inline-min-height: 480px !default;
85
- $app-inline-max-height: 720px !default;
86
-
87
- $post-full-height: 170px !default;
88
- $post-collapsed-height: 65px !default;
79
+ $app-suggestions-maxheight: $spacer * 16 !default;
89
80
 
90
81
  $viewport-width: 100vw !default;
91
82
  $viewport-height: 100vh !default;
92
83
 
93
- $badge-touch-size: 32px !default;
84
+ $iconsize-small: 16px !default;
85
+ $iconsize: 24px !default;
86
+ $iconsize-large: 32px !default;
94
87
 
95
- // Z-INDEX
88
+ $buttonsize-small: 32px !default;
89
+ $buttonsize: 40px !default;
96
90
 
97
- $z-index: 1 !default;
91
+ $avatarsize: 32px !default;
92
+ $avatarsize-large: 48px !default;
98
93
 
99
- // BOX SHADOWS
94
+ $dividersize: 32px !default;
100
95
 
101
- $boxshadow: 0 0 $spacer 0 rgba($black, 0.4) !default;
102
- $boxshadow-light: 0 0 $spacer 0 rgba($black, 0.2) !default;
103
- $boxshadow-ultralight: 0 0 $spacer 0 rgba($black, 0.1) !default;
104
- $boxshadow-button: 0 $spacer * 0.2 $spacer * 0.2 0 rgba($black, 0.2) !default;
96
+ $messagecountsize: $spacer * 1.25;
105
97
 
106
- // TRANSITIONS
98
+ // Z-INDEX
99
+ $z-index: 1 !default;
107
100
 
108
- $transition: 0.3s ease-in-out !default;
109
- $transition-slow: 0.75s ease-in-out !default;
101
+ // BOX SHADOWS
102
+ $boxshadow: 0 $spacer * 0.25 $spacer * 1.5 hsla(204, 26%, 28%, 0.15),
103
+ 0 $spacer * 0.15 $spacer * 0.5 hsla(204, 26%, 28%, 0.2) !default;
104
+ $boxshadow-soft: 0 0 $spacer 0 rgba($black, 0.1) !default;
110
105
 
111
- // BREAKPOINT
106
+ // TRANSITIONS
107
+ $transition: 0.3s ease !default;
108
+ $transition-delay: 0.3s 0.2s ease !default;
109
+ $transition-slow: 0.6s ease !default;
112
110
 
111
+ // BREAKPOINTS
113
112
  $breakpoints: (
114
113
  phablet: 480px,
115
114
  phablet-l: 640px,
@@ -1,8 +1,4 @@
1
- // ##### FUNCTIONS #####
2
- // =====================
3
-
4
1
  // SET TEXT COLOR
5
-
6
2
  @function set-text-color($color) {
7
3
  @if (lightness($color) > 66.66) {
8
4
  @return $grey-e;
@@ -12,7 +8,6 @@
12
8
  }
13
9
 
14
10
  // SET BORDER COLOR
15
-
16
11
  @function set-border-color($color) {
17
12
  @if (lightness($color) > 66.66) {
18
13
  @return $grey-c;
@@ -1,11 +1,5 @@
1
1
  /* stylelint-disable selector-max-universal */
2
-
3
- // ##### MIXINS #####
4
- // ==================
5
-
6
2
  // BOX-SIZING
7
- // ----------
8
-
9
3
  @mixin boxSizing($value: border-box) {
10
4
  box-sizing: $value;
11
5
 
@@ -17,17 +11,15 @@
17
11
  }
18
12
 
19
13
  // RESPONSIVE APP SIZING
20
- // ---------------------
21
-
22
14
  @mixin responsiveAppSizing() {
23
- max-width: calc(#{$viewport-width} - #{$flex-spacer * 2});
24
- max-height: calc(#{$viewport-height * 0.85} - #{$flex-spacer * 2});
15
+ max-width: calc(#{$viewport-width} - #{$spacer * 2});
16
+ max-height: calc(#{$viewport-height * 0.85} - #{$spacer * 2});
25
17
 
26
18
  @include media('>phablet-l') {
27
- max-height: calc(#{$viewport-height} - #{$flex-spacer * 2});
19
+ max-height: calc(#{$viewport-height} - #{$spacer * 2});
28
20
  // iOS Safari needs a bit more space
29
21
  @supports (-webkit-overflow-scrolling: touch) {
30
- max-height: calc(#{$viewport-height * 0.9} - #{$flex-spacer * 2});
22
+ max-height: calc(#{$viewport-height * 0.9} - #{$spacer * 2});
31
23
  }
32
24
  }
33
25
 
@@ -43,8 +35,6 @@
43
35
  }
44
36
 
45
37
  // UNLIST
46
- // ------
47
-
48
38
  @mixin unList() {
49
39
  margin: 0;
50
40
  padding: 0;
@@ -52,8 +42,6 @@
52
42
  }
53
43
 
54
44
  // STYLE PLACEHOLDER
55
- // -----------------
56
-
57
45
  @mixin stylePlaceholder() {
58
46
  &::-webkit-input-placeholder {
59
47
  // Chrome/Opera/Safari