@weavy/uikit-react 13.0.0 → 14.0.0

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 (243) hide show
  1. package/changelog.md +24 -0
  2. package/dist/cjs/index.js +3 -3
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/types/components/Chat.d.ts +1 -1
  5. package/dist/cjs/types/components/Messages.d.ts +3 -1
  6. package/dist/cjs/types/hooks/useConversations.d.ts +1 -1
  7. package/dist/cjs/types/hooks/useMutateMessage.d.ts +1 -1
  8. package/dist/cjs/types/hooks/useMutateRead.d.ts +1 -0
  9. package/dist/cjs/types/types/Chat.d.ts +1 -0
  10. package/dist/cjs/types/types/Message.d.ts +2 -0
  11. package/dist/cjs/types/types/types.d.ts +47 -4
  12. package/dist/cjs/types/ui/Spinner.d.ts +2 -1
  13. package/dist/css/weavy-chat.css +1540 -954
  14. package/dist/css/weavy-messenger.css +1901 -1298
  15. package/dist/css/weavy.css +1696 -1093
  16. package/dist/esm/index.js +3 -3
  17. package/dist/esm/index.js.map +1 -1
  18. package/dist/esm/types/components/Chat.d.ts +1 -1
  19. package/dist/esm/types/components/Messages.d.ts +3 -1
  20. package/dist/esm/types/hooks/useConversations.d.ts +1 -1
  21. package/dist/esm/types/hooks/useMutateMessage.d.ts +1 -1
  22. package/dist/esm/types/hooks/useMutateRead.d.ts +1 -0
  23. package/dist/esm/types/types/Chat.d.ts +1 -0
  24. package/dist/esm/types/types/Message.d.ts +2 -0
  25. package/dist/esm/types/types/types.d.ts +47 -4
  26. package/dist/esm/types/ui/Spinner.d.ts +2 -1
  27. package/dist/index.d.ts +2 -1
  28. package/package.json +2 -2
  29. package/src/client/WeavyClient.ts +12 -17
  30. package/src/components/Attachment.tsx +5 -5
  31. package/src/components/Chat.tsx +6 -5
  32. package/src/components/Conversation.tsx +26 -20
  33. package/src/components/ConversationBadge.tsx +7 -5
  34. package/src/components/ConversationForm.tsx +1 -1
  35. package/src/components/ConversationList.tsx +59 -11
  36. package/src/components/ConversationListItem.tsx +71 -54
  37. package/src/components/FileBrowser.tsx +53 -50
  38. package/src/components/MeetingCard.tsx +35 -13
  39. package/src/components/Meetings.tsx +1 -1
  40. package/src/components/Message.tsx +41 -41
  41. package/src/components/Messages.tsx +61 -60
  42. package/src/components/Messenger.tsx +7 -2
  43. package/src/components/NewConversation.tsx +1 -1
  44. package/src/components/PdfViewer.tsx +5 -5
  45. package/src/components/Preview.tsx +2 -2
  46. package/src/components/Reactions.tsx +11 -5
  47. package/src/components/SearchUsers.tsx +19 -9
  48. package/src/components/SeenBy.tsx +13 -7
  49. package/src/components/Typing.tsx +11 -12
  50. package/src/contexts/UserContext.tsx +1 -1
  51. package/src/contexts/WeavyContext.tsx +3 -3
  52. package/src/hooks/useConversations.ts +15 -5
  53. package/src/hooks/useMutateMessage.ts +1 -5
  54. package/src/hooks/useMutateRead.ts +5 -3
  55. package/src/hooks/usePresence.ts +2 -3
  56. package/src/hooks/useReactions.ts +11 -12
  57. package/src/scss/theme/_alert.scss +61 -63
  58. package/src/scss/theme/_appbar.scss +105 -30
  59. package/src/scss/theme/_avatar.scss +23 -28
  60. package/src/scss/theme/_badge.scss +26 -18
  61. package/src/scss/theme/_buttons.scss +107 -52
  62. package/src/scss/theme/_card.scss +102 -4
  63. package/src/scss/theme/_checkbox.scss +16 -20
  64. package/src/scss/theme/_code-vscode-dark.scss +3 -3
  65. package/src/scss/theme/_code-vscode-light.scss +3 -3
  66. package/src/scss/theme/_code.scss +0 -2
  67. package/src/scss/theme/_comment-editor-cm.scss +97 -0
  68. package/src/scss/theme/_comment-editor.scss +129 -0
  69. package/src/scss/theme/_comments.scss +66 -0
  70. package/src/scss/theme/_content.scss +33 -5
  71. package/src/scss/theme/_conversations.scss +19 -78
  72. package/src/scss/theme/_dropdown.scss +102 -15
  73. package/src/scss/theme/_embed.scss +135 -0
  74. package/src/scss/theme/_facepile.scss +11 -0
  75. package/src/scss/theme/_filebrowser.scss +1 -1
  76. package/src/scss/theme/_files.scss +76 -47
  77. package/src/scss/theme/_grid.scss +8 -0
  78. package/src/scss/theme/_icons.scss +155 -19
  79. package/src/scss/theme/_image-grid.scss +7 -10
  80. package/src/scss/theme/_input.scss +160 -0
  81. package/src/scss/theme/_item.scss +169 -0
  82. package/src/scss/theme/_list.scss +57 -0
  83. package/src/scss/theme/_meeting.scss +11 -0
  84. package/src/scss/theme/_message-editor-cm.scss +95 -0
  85. package/src/scss/theme/_message-editor.scss +65 -19
  86. package/src/scss/theme/_messages.scss +51 -105
  87. package/src/scss/theme/_meta.scss +12 -0
  88. package/src/scss/theme/_overlays.scss +31 -76
  89. package/src/scss/theme/_pager.scss +5 -1
  90. package/src/scss/theme/_pane.scss +13 -2
  91. package/src/scss/theme/_panels.scss +33 -28
  92. package/src/scss/theme/_picker-list.scss +5 -3
  93. package/src/scss/theme/_placeholder.scss +19 -0
  94. package/src/scss/theme/_poll.scss +49 -0
  95. package/src/scss/theme/_post-editor-cm.scss +100 -0
  96. package/src/scss/theme/_post-editor.scss +127 -0
  97. package/src/scss/theme/_post.scss +83 -0
  98. package/src/scss/theme/_preview-code.scss +11 -2
  99. package/src/scss/theme/_preview-embed.scss +8 -2
  100. package/src/scss/theme/_preview-image.scss +8 -26
  101. package/src/scss/theme/_preview-media.scss +1 -0
  102. package/src/scss/theme/_preview-pdf.scss +10 -15
  103. package/src/scss/theme/_preview.scss +57 -79
  104. package/src/scss/theme/_reactions.scss +48 -17
  105. package/src/scss/theme/_sheet.scss +59 -0
  106. package/src/scss/theme/_sidebar.scss +86 -0
  107. package/src/scss/theme/_spinner.scss +11 -7
  108. package/src/scss/theme/_tab.scss +72 -0
  109. package/src/scss/theme/_tables.scss +70 -23
  110. package/src/scss/theme/_toasts.scss +56 -26
  111. package/src/scss/theme/_type.scss +41 -0
  112. package/src/scss/theme/{mixins → base}/_backdrop.scss +0 -0
  113. package/src/scss/theme/{bootstrap/mixins → base}/_breakpoints.scss +9 -0
  114. package/src/scss/theme/base/_colors.scss +315 -0
  115. package/src/scss/theme/base/_md.scss +19 -0
  116. package/src/scss/theme/base/_palette.scss +130 -0
  117. package/src/scss/theme/{mixins → base}/_position.scss +5 -5
  118. package/src/scss/theme/base/_reboot.scss +51 -0
  119. package/src/scss/theme/base/_scroll.scss +180 -0
  120. package/src/scss/theme/base/_svg.scss +49 -0
  121. package/src/scss/theme/base/_text.scss +23 -0
  122. package/src/scss/theme/base/_vars.scss +203 -0
  123. package/src/scss/theme/{fonts → base/fonts}/_fontmapping-roboto.scss +0 -0
  124. package/src/scss/theme/{fonts → base/fonts}/_fontmapping-segoe-ui.scss +0 -0
  125. package/src/scss/theme/base/fonts/_index.scss +2 -0
  126. package/src/scss/weavy-chat.scss +10 -4
  127. package/src/scss/weavy-messenger.scss +37 -21
  128. package/src/types/Chat.ts +2 -1
  129. package/src/types/Message.ts +3 -1
  130. package/src/types/types.ts +56 -5
  131. package/src/ui/Icon.tsx +1 -1
  132. package/src/ui/Spinner.tsx +3 -2
  133. package/src/utils/infiniteScroll.js +11 -2
  134. package/src/utils/postal-parent.js +398 -0
  135. package/src/utils/promise.js +187 -0
  136. package/src/utils/scrollbarDetection.js +68 -9
  137. package/src/utils/utils.js +547 -0
  138. package/src/scss/theme/_attachments.scss +0 -74
  139. package/src/scss/theme/_cm-editor.scss +0 -42
  140. package/src/scss/theme/_colors.scss +0 -520
  141. package/src/scss/theme/_config.scss +0 -6
  142. package/src/scss/theme/_inputs.scss +0 -28
  143. package/src/scss/theme/_nav.scss +0 -52
  144. package/src/scss/theme/_palette.scss +0 -165
  145. package/src/scss/theme/_preview-icon.scss +0 -41
  146. package/src/scss/theme/_reboot.scss +0 -41
  147. package/src/scss/theme/_root.scss +0 -2
  148. package/src/scss/theme/_scroll.scss +0 -55
  149. package/src/scss/theme/_search.scss +0 -68
  150. package/src/scss/theme/_turbo.scss +0 -17
  151. package/src/scss/theme/_variables.scss +0 -139
  152. package/src/scss/theme/bootstrap/_accordion.scss +0 -146
  153. package/src/scss/theme/bootstrap/_alert.scss +0 -71
  154. package/src/scss/theme/bootstrap/_badge.scss +0 -38
  155. package/src/scss/theme/bootstrap/_breadcrumb.scss +0 -40
  156. package/src/scss/theme/bootstrap/_button-group.scss +0 -142
  157. package/src/scss/theme/bootstrap/_buttons.scss +0 -186
  158. package/src/scss/theme/bootstrap/_card.scss +0 -234
  159. package/src/scss/theme/bootstrap/_carousel.scss +0 -229
  160. package/src/scss/theme/bootstrap/_close.scss +0 -40
  161. package/src/scss/theme/bootstrap/_containers.scss +0 -41
  162. package/src/scss/theme/bootstrap/_dropdown.scss +0 -248
  163. package/src/scss/theme/bootstrap/_forms.scss +0 -9
  164. package/src/scss/theme/bootstrap/_functions.scss +0 -302
  165. package/src/scss/theme/bootstrap/_grid.scss +0 -33
  166. package/src/scss/theme/bootstrap/_helpers.scss +0 -10
  167. package/src/scss/theme/bootstrap/_images.scss +0 -42
  168. package/src/scss/theme/bootstrap/_list-group.scss +0 -191
  169. package/src/scss/theme/bootstrap/_maps.scss +0 -54
  170. package/src/scss/theme/bootstrap/_mixins.scss +0 -43
  171. package/src/scss/theme/bootstrap/_modal.scss +0 -237
  172. package/src/scss/theme/bootstrap/_nav.scss +0 -172
  173. package/src/scss/theme/bootstrap/_navbar.scss +0 -276
  174. package/src/scss/theme/bootstrap/_offcanvas.scss +0 -143
  175. package/src/scss/theme/bootstrap/_pagination.scss +0 -109
  176. package/src/scss/theme/bootstrap/_placeholders.scss +0 -51
  177. package/src/scss/theme/bootstrap/_popover.scss +0 -196
  178. package/src/scss/theme/bootstrap/_progress.scss +0 -59
  179. package/src/scss/theme/bootstrap/_reboot.scss +0 -610
  180. package/src/scss/theme/bootstrap/_root.scss +0 -73
  181. package/src/scss/theme/bootstrap/_spinners.scss +0 -85
  182. package/src/scss/theme/bootstrap/_tables.scss +0 -164
  183. package/src/scss/theme/bootstrap/_toasts.scss +0 -70
  184. package/src/scss/theme/bootstrap/_tooltip.scss +0 -120
  185. package/src/scss/theme/bootstrap/_transitions.scss +0 -27
  186. package/src/scss/theme/bootstrap/_type.scss +0 -106
  187. package/src/scss/theme/bootstrap/_utilities.scss +0 -647
  188. package/src/scss/theme/bootstrap/_variables.scss +0 -1633
  189. package/src/scss/theme/bootstrap/forms/_floating-labels.scss +0 -74
  190. package/src/scss/theme/bootstrap/forms/_form-check.scss +0 -175
  191. package/src/scss/theme/bootstrap/forms/_form-control.scss +0 -194
  192. package/src/scss/theme/bootstrap/forms/_form-range.scss +0 -91
  193. package/src/scss/theme/bootstrap/forms/_form-select.scss +0 -71
  194. package/src/scss/theme/bootstrap/forms/_form-text.scss +0 -11
  195. package/src/scss/theme/bootstrap/forms/_input-group.scss +0 -129
  196. package/src/scss/theme/bootstrap/forms/_labels.scss +0 -36
  197. package/src/scss/theme/bootstrap/forms/_validation.scss +0 -12
  198. package/src/scss/theme/bootstrap/helpers/_clearfix.scss +0 -3
  199. package/src/scss/theme/bootstrap/helpers/_color-bg.scss +0 -10
  200. package/src/scss/theme/bootstrap/helpers/_colored-links.scss +0 -12
  201. package/src/scss/theme/bootstrap/helpers/_position.scss +0 -36
  202. package/src/scss/theme/bootstrap/helpers/_ratio.scss +0 -26
  203. package/src/scss/theme/bootstrap/helpers/_stacks.scss +0 -15
  204. package/src/scss/theme/bootstrap/helpers/_stretched-link.scss +0 -15
  205. package/src/scss/theme/bootstrap/helpers/_text-truncation.scss +0 -7
  206. package/src/scss/theme/bootstrap/helpers/_visually-hidden.scss +0 -8
  207. package/src/scss/theme/bootstrap/helpers/_vr.scss +0 -8
  208. package/src/scss/theme/bootstrap/mixins/_alert.scss +0 -15
  209. package/src/scss/theme/bootstrap/mixins/_backdrop.scss +0 -14
  210. package/src/scss/theme/bootstrap/mixins/_banner.scss +0 -9
  211. package/src/scss/theme/bootstrap/mixins/_border-radius.scss +0 -78
  212. package/src/scss/theme/bootstrap/mixins/_box-shadow.scss +0 -18
  213. package/src/scss/theme/bootstrap/mixins/_buttons.scss +0 -70
  214. package/src/scss/theme/bootstrap/mixins/_caret.scss +0 -64
  215. package/src/scss/theme/bootstrap/mixins/_clearfix.scss +0 -9
  216. package/src/scss/theme/bootstrap/mixins/_color-scheme.scss +0 -7
  217. package/src/scss/theme/bootstrap/mixins/_container.scss +0 -11
  218. package/src/scss/theme/bootstrap/mixins/_deprecate.scss +0 -10
  219. package/src/scss/theme/bootstrap/mixins/_forms.scss +0 -152
  220. package/src/scss/theme/bootstrap/mixins/_gradients.scss +0 -47
  221. package/src/scss/theme/bootstrap/mixins/_grid.scss +0 -151
  222. package/src/scss/theme/bootstrap/mixins/_image.scss +0 -16
  223. package/src/scss/theme/bootstrap/mixins/_list-group.scss +0 -24
  224. package/src/scss/theme/bootstrap/mixins/_lists.scss +0 -7
  225. package/src/scss/theme/bootstrap/mixins/_pagination.scss +0 -10
  226. package/src/scss/theme/bootstrap/mixins/_reset-text.scss +0 -17
  227. package/src/scss/theme/bootstrap/mixins/_resize.scss +0 -6
  228. package/src/scss/theme/bootstrap/mixins/_table-variants.scss +0 -24
  229. package/src/scss/theme/bootstrap/mixins/_text-truncate.scss +0 -8
  230. package/src/scss/theme/bootstrap/mixins/_transition.scss +0 -26
  231. package/src/scss/theme/bootstrap/mixins/_utilities.scss +0 -97
  232. package/src/scss/theme/bootstrap/mixins/_visually-hidden.scss +0 -29
  233. package/src/scss/theme/bootstrap/utilities/_api.scss +0 -47
  234. package/src/scss/theme/bootstrap/vendor/_rfs.scss +0 -354
  235. package/src/scss/theme/bs/_badge.scss +0 -20
  236. package/src/scss/theme/bs/_buttons.scss +0 -185
  237. package/src/scss/theme/bs/_dropdown.scss +0 -86
  238. package/src/scss/theme/bs/_forms.scss +0 -161
  239. package/src/scss/theme/bs/_list-group.scss +0 -73
  240. package/src/scss/theme/bs/_tables.scss +0 -46
  241. package/src/scss/theme/fonts/_index.scss +0 -2
  242. package/src/scss/theme/mixins/_palette.scss +0 -165
  243. package/src/scss/theme/mixins/_scrollbar.scss +0 -110
@@ -9,7 +9,7 @@ export default function useReactions(id: number, reactions: ReactableType[]) {
9
9
 
10
10
  const groupReactions = useCallback((data: ReactableType[]) => {
11
11
  var group = [...new Map<string, ReactableType>(data.map((item: ReactableType) => [item.content, item])).values()];
12
-
12
+
13
13
  return group.map((item: ReactableType): ReactionGroup => {
14
14
  return {
15
15
  content: item.content,
@@ -19,17 +19,17 @@ export default function useReactions(id: number, reactions: ReactableType[]) {
19
19
  });
20
20
  }, [reactionsList]);
21
21
 
22
- const handleRealtimeReactionInserted = useCallback((reaction: ReactionType) => {
23
- if (reaction.parent.id === id) {
22
+ const handleRealtimeReactionInserted = useCallback((reaction: RealtimeReaction) => {
23
+ if (reaction.entity.id === id) {
24
24
  setReactionsList((oldList) => {
25
- return [...oldList || [], { content: reaction.content, created_by_id: reaction.created_by.id }];
25
+ return [...oldList || [], { content: reaction.reaction, created_by_id: reaction.actor.id }];
26
26
  });
27
27
  }
28
28
  }, [id, reactionsList]);
29
29
 
30
- const handleRealtimeReactionDeleted = useCallback((reaction: ReactionType) => {
31
- if (reaction.parent.id === id) {
32
- setReactionsList(oldList => oldList.filter(item => item.created_by_id !== reaction.created_by.id));
30
+ const handleRealtimeReactionDeleted = useCallback((reaction: RealtimeReaction) => {
31
+ if (reaction.entity.id === id) {
32
+ setReactionsList(oldList => oldList.filter(item => item.created_by_id !== reaction.actor.id));
33
33
  }
34
34
  }, [id, reactionsList]);
35
35
 
@@ -38,13 +38,12 @@ export default function useReactions(id: number, reactions: ReactableType[]) {
38
38
  }, [reactions]);
39
39
 
40
40
  useEffect(() => {
41
-
42
- on('reaction-inserted', handleRealtimeReactionInserted);
43
- on('reaction-deleted', handleRealtimeReactionDeleted);
41
+ on('reaction_added_' + id, handleRealtimeReactionInserted);
42
+ on('reaction_deleted_' + id, handleRealtimeReactionDeleted);
44
43
 
45
44
  return () => {
46
- off('reaction-inserted', handleRealtimeReactionInserted);
47
- off('reaction-deleted', handleRealtimeReactionDeleted);
45
+ off('reaction_added_' + id, handleRealtimeReactionInserted);
46
+ off('reaction_deleted_' + id, handleRealtimeReactionDeleted);
48
47
  }
49
48
  }, [id]);
50
49
 
@@ -1,73 +1,71 @@
1
- @use "config" as *;
1
+ @use "sass:map";
2
+ @use "base/vars";
3
+ @use "base/colors";
2
4
 
3
- // Global alerts
5
+ .wy-alerts {
6
+ position: fixed;
7
+ left: 0;
8
+ top: 4rem;
9
+ right: 0;
10
+ pointer-events: none;
11
+ display: flex;
12
+ flex-direction: column;
13
+ align-items: center;
14
+ justify-content: center;
15
+ z-index: vars.$zindex-fixed;
16
+ gap: 1rem;
17
+ }
4
18
 
5
- .wy-alert-message {
6
- padding: .25rem .5rem;
7
- background-color: $client-alert-background;
8
- text-align: center;
9
- width: $client-panel-width;
10
- color: $client-alert-color;
11
- border-radius: .1875rem;
12
- margin: 0 auto;
13
- margin-top: 1rem;
14
- font-family: $font-family-base;
15
- position: relative;
16
- z-index: 10;
17
- box-shadow: $md-shadow-8dp;
18
- max-width: calc(100% - 3rem);
19
- pointer-events: none;
20
- user-select: none;
19
+ .wy-alert {
20
+ background: colors.$surface-1;
21
+ color: colors.$on-surface;
22
+ margin: 0 0 1rem;
23
+ //max-width: calc(100% - 3rem);
24
+ gap: .5rem;
25
+ display: flex;
26
+ flex-direction:row;
27
+ flex-wrap: wrap;
28
+ align-items: baseline;
29
+ cursor: pointer;
30
+ border-radius: vars.$border-radius;
31
+ margin-left: auto;
32
+ margin-right: auto;
33
+ margin-bottom: 1rem;
34
+ padding: .5rem 1rem;
35
+ user-select: none;
36
+ //box-shadow: vars.$shadow-level2;
37
+ position: relative;
38
+ overflow: hidden;
39
+ height: auto;
40
+ gap: .5rem;
21
41
 
22
- a {
23
- color: darken($client-alert-color, 10%);
24
- text-decoration: $link-decoration;
25
- font-weight: $alert-link-font-weight;
26
- pointer-events: auto;
42
+ &.wy-fade {
43
+ transition: all vars.$transition;
44
+
45
+ &:not(.wy-show) {
46
+ opacity: 0;
47
+ height: 0;
48
+ padding-top: 0;
49
+ padding-bottom: 0;
50
+ margin-top: 0;
51
+ margin-bottom: 0;
27
52
  }
53
+ }
28
54
 
29
- &.wy-fade {
30
- transition: all $md-animation-duration $md-animation-curve-default;
31
- opacity: 0;
32
- height: 0;
33
- padding-top: 0;
34
- padding-bottom: 0;
35
- margin-top: 0;
55
+ .wy-text {
56
+ line-height: 1.5;
57
+ padding: .5rem;
58
+ }
36
59
 
37
- &.wy-in {
38
- transition: opacity $md-animation-duration $md-animation-curve-default;
39
- opacity: 1;
40
- height: auto;
41
- padding-top: .5rem;
42
- padding-bottom: .5rem;
43
- margin-top: 1rem;
44
- }
45
- }
60
+ .wy-button {
61
+ margin-left: auto;
62
+ pointer-events: auto;
63
+ }
64
+ }
46
65
 
47
- .wy-button {
48
- cursor: pointer;
49
- display: inline-flex;
50
- flex-shrink: 0;
51
- flex-grow: 0;
52
66
 
53
- > * {
54
- display: inline-flex;
55
- }
56
67
 
57
- font-weight: 400;
58
- text-align: center;
59
- white-space: nowrap;
60
- vertical-align: middle;
61
- user-select: none;
62
- border: 1px solid transparent;
63
- padding: .3125rem .75rem;
64
- font-size: 1rem;
65
- line-height: 1.5;
66
- border-radius: .1875rem;
67
- color: $white;
68
- background-color: $primary;
69
- border-color: $primary;
70
- box-shadow: $btn-box-shadow;
71
- margin-top: .5rem;
72
- }
68
+ .wy-alert-primary {
69
+ background: colors.$primary-container;
70
+ color: colors.$on-primary-container;
73
71
  }
@@ -1,6 +1,9 @@
1
- @use "config" as *;
2
- @use "mixins/backdrop";
3
- @use "mixins/position";
1
+ @use "sass:math";
2
+ @use "base/vars";
3
+ @use "base/colors";
4
+ @use "base/backdrop";
5
+ @use "base/position";
6
+ @use "base/text";
4
7
 
5
8
  .wy-appbars {
6
9
  @include position.sticky-top;
@@ -10,38 +13,63 @@
10
13
  backdrop-filter: none;
11
14
  }
12
15
  }
16
+
17
+ --wy-component-background-color: #{colors.$surface-1};
18
+ background-color: var(--wy-component-background-color);
19
+
20
+ box-shadow: #{colors.$outline-variant} 0px -1px 0px 0px inset;
21
+
22
+ > .wy-appbar, > .wy-toolbar {
23
+ background-color: transparent;
24
+ box-shadow: none;
25
+ }
13
26
  }
14
27
 
15
28
  .wy-appbar {
29
+ --wy-component-color: #{colors.$on-surface};
30
+ --wy-component-background-color: #{colors.$surface-1};
31
+
16
32
  display: grid;
17
33
  align-items: center;
18
34
  justify-content: space-between;
19
- height: $appbar-height;
20
- padding: $navbar-padding-y $navbar-padding-x;
21
- flex: 0 0 $appbar-height;
22
- grid-template-columns: minmax(2rem, max-content) minmax(0, max-content) minmax(2rem, max-content);
35
+ justify-items: center;
36
+ height: vars.$appbar-height;
37
+ padding: .25rem;
38
+ flex: 0 0 vars.$appbar-height;
39
+ grid-template-columns: minmax(2.5rem, max-content) minmax(0, max-content) minmax(2.5rem, max-content);
23
40
  column-gap: .5rem;
24
- font-family: $font-family-base;
25
- line-height: $line-height-base;
41
+ //font-family: vars.$font-family-base;
42
+ line-height: vars.$line-height-base;
26
43
 
27
- @include backdrop.filter;
44
+ background-color: var(--wy-component-background-color);
45
+ color: var(--wy-component-color);
46
+ box-shadow: #{colors.$outline-variant} 0px -1px 0px 0px inset;
28
47
 
29
48
  .wy-badge {
30
49
  align-self: center;
31
50
  }
32
51
 
33
52
  .wy-button {
34
- max-height: 2rem;
53
+ max-height: 2.5rem;
35
54
  }
36
55
  }
37
56
 
38
- .wy-appbar-buttons {
57
+
58
+
59
+ .wy-appbar-buttons, .wy-toolbar-buttons {
39
60
  display: flex;
40
- flex: 0 0 1rem;
61
+ flex: 0 0 auto;
62
+ align-items: center;
63
+ }
64
+
65
+ .wy-toolbar-buttons-last {
66
+ margin-inline-start: auto;
41
67
  }
42
68
 
43
69
  .wy-appbar-text {
44
- @include text-truncate();
70
+ @include text.truncate;
71
+ max-width: 100%;
72
+
45
73
  color: inherit !important;
46
74
  user-select: none;
47
75
 
@@ -54,41 +82,83 @@
54
82
  }
55
83
  }
56
84
 
57
- .wy-appbar {
58
- // light theme (default)
59
- &, .wy-light &, &.wy-light {
60
- background-color: rgba($gray-50, $opacity-backdrop);
61
- color: $navbar-light-color;
62
- box-shadow: rgba($gray-200, $opacity-backdrop) 0px -1px 0px 0px inset;
85
+ // floating toolbars (mainly for pdf preview, but can be also be used for other things)
86
+ .wy-toolbars-bottom {
87
+ position: absolute;
88
+ z-index: vars.$zindex-fixed;
89
+ bottom: math.div(vars.$footerbar-height, 2);
90
+ left: 0;
91
+ right: 0;
92
+ min-height: vars.$appbar-height;
93
+ display: flex;
94
+ flex-direction: column;
95
+ justify-content: center;
96
+ justify-items: center;
97
+ }
98
+
99
+ .wy-toolbar {
100
+ --wy-component-color: #{colors.$on-surface};
101
+ --wy-component-background-color: #{colors.$surface-1};
102
+
103
+ display: flex;
104
+ flex-wrap: wrap;
105
+ align-items: center;
106
+ justify-content: flex-start;
107
+ justify-items: center;
108
+ min-height: vars.$appbar-height;
109
+ padding: .25rem;
110
+ flex: 1 0 vars.$appbar-height;
111
+ column-gap: .25rem;
112
+ //font-family: vars.$font-family-base;
113
+ line-height: vars.$line-height-base;
114
+
115
+ background-color: var(--wy-component-background-color);
116
+ color: var(--wy-component-color);
117
+ box-shadow: #{colors.$outline-variant} 0px -1px 0px 0px inset;
118
+
119
+ span {
120
+ margin-left: .25rem;
63
121
  }
64
- // dark theme
65
- .wy-dark &, &.wy-dark {
66
- background-color: rgba($dark, $opacity-backdrop);
67
- color: $navbar-dark-color;
68
- box-shadow: rgba($gray-800, $opacity-backdrop) 0px -1px 0px 0px inset;
122
+ }
123
+
124
+ .wy-toolbar-center {
125
+ margin: 0 auto;
126
+ border-radius: vars.$border-radius;
127
+
128
+ .wy-input {
129
+ text-align: center;
130
+ //border-color: transparent;
69
131
  }
70
132
  }
71
133
 
72
134
  .wy-footerbars {
73
- padding-bottom: $footerbar-height;
135
+ padding-bottom: vars.$footerbar-height;
136
+
137
+ > .wy-toolbar {
138
+ box-shadow: none;
139
+ }
74
140
  }
75
141
 
76
142
  .wy-footerbar {
143
+ --wy-component-background-color: #{colors.$surface-1};
144
+ --wy-component-color: #{colors.$on-surface};
145
+
77
146
  position: absolute;
78
147
  bottom: 0;
79
148
  left: 0;
80
149
  right: 0;
81
- z-index: $zindex-sticky;
150
+ z-index: vars.$zindex-sticky;
82
151
 
83
152
  &::after {
84
153
  content: "";
154
+ background-color: var(--wy-component-background-color);
155
+ color: var(--wy-component-color);
156
+ box-shadow: #{colors.$outline-variant} 0px 1px 0px 0px inset;
85
157
  position: absolute;
86
158
  width: 100vw;
87
159
  left: 0;
88
160
  bottom: 0;
89
- height: $footerbar-height;
90
- border-top: $border-width solid rgba($gray-200, $opacity-backdrop);
91
- background: rgba($gray-50, $opacity-backdrop);
161
+ height: 100%;
92
162
  z-index: -1;
93
163
 
94
164
  @include backdrop.filter;
@@ -103,12 +173,17 @@
103
173
  }
104
174
  }
105
175
 
176
+ .wy-footerbar-sticky {
177
+ position: sticky;
178
+ }
179
+
106
180
  .wy-footerbars-fixed {
107
181
  .wy-footerbar {
108
182
  position: fixed;
109
183
 
110
184
  &::after {
111
185
  position: fixed;
186
+ height: vars.$footerbar-height;
112
187
  }
113
188
  }
114
189
  }
@@ -1,5 +1,9 @@
1
- @use "config" as *;
2
- @use "bs/forms";
1
+ @use "base/vars";
2
+ @use "base/colors";
3
+
4
+ :where(:root, :host > *) {
5
+ --wy-presence-active: #{colors.$green};
6
+ }
3
7
 
4
8
  .wy-avatar {
5
9
  border-radius: 50%;
@@ -12,43 +16,34 @@
12
16
  text-align: center;
13
17
  }
14
18
 
15
- .wy-avatar-input {
16
- @extend %form-control, %form-control-sm;
17
- background: $light;
18
- border-color: transparent;
19
- text-align: center;
20
- margin-left: auto;
21
- margin-right: auto;
22
- margin-bottom: 1.5rem;
23
- }
24
-
25
19
  .wy-avatar-presence {
26
20
  position: relative;
21
+ display: inline-flex;
27
22
  }
28
23
 
29
- .wy-avatar-display-name {
30
- font-size: $h4-font-size;
31
- font-weight: $display-font-weight;
32
- line-height: $display-line-height;
33
- text-align: center;
34
- }
35
-
36
-
37
24
  // presence indicator
38
25
  .wy-presence {
39
- display: none; // initially hidden
40
- background-color: $gray-100;
26
+ &:not(.wy-presence-active) {
27
+ display: none; // initially hidden
28
+ }
29
+
30
+ background-color: var(--wy-component-background-color, transparent);
41
31
  width: .75rem;
42
32
  height: .75rem;
43
33
  border-radius: 50%;
44
- outline: .125rem solid $white;
34
+ //outline: .125rem solid ;
45
35
  position: absolute;
46
36
  bottom: 0;
47
37
  right: -5%;
48
- }
49
38
 
50
- // online
51
- .wy-presence-active {
52
- background-color: $green-400;
53
- display: block;
39
+ &::after {
40
+ content: "";
41
+ position: absolute;
42
+ width: 100%;
43
+ height: 100%;
44
+ border-radius: inherit;
45
+ background-color: var(--wy-presence-active);
46
+ background-clip: content-box;
47
+ padding: .125rem;
48
+ }
54
49
  }
@@ -1,23 +1,30 @@
1
- @use "config" as *;
2
- @use "bs/badge";
1
+ @use "base/vars";
2
+ @use "base/colors";
3
+ @use "base/text";
3
4
 
5
+ $badge-padding-y: .35em !default;
6
+ $badge-padding-x: .65em !default;
7
+ $badge-font-size: .75em !default;
8
+ $badge-font-weight: vars.$font-weight-bold !default;
4
9
 
5
10
  .wy-badge {
6
- @extend %badge;
7
- border-radius: 50rem;
8
- background-color: $primary;
9
- }
10
-
11
- .wy-badge-success {
12
- background-color: $success;
13
- }
14
-
15
- .wy-badge-warning {
16
- background-color: $warning;
17
- }
11
+ display: inline-block;
12
+ padding: $badge-padding-y $badge-padding-x;
13
+ font-size: $badge-font-size;
14
+ font-weight: $badge-font-weight;
15
+ line-height: 1;
16
+ color: colors.$on-primary;
17
+ text-align: center;
18
+ white-space: nowrap;
19
+ vertical-align: baseline;
20
+
21
+ // Empty badges collapse automatically
22
+ &:empty {
23
+ display: none;
24
+ }
18
25
 
19
- .wy-badge-danger {
20
- background-color: $danger;
26
+ border-radius: vars.$border-radius-pill;
27
+ background-color: colors.$primary;
21
28
  }
22
29
 
23
30
  .wy-button {
@@ -25,7 +32,7 @@
25
32
 
26
33
  // badge, e.g. notification count
27
34
  .wy-badge {
28
- font-size: $font-size-xs;
35
+ font-size: vars.$font-size-xs;
29
36
  position: absolute;
30
37
  right: 0;
31
38
  top: 0;
@@ -38,7 +45,8 @@
38
45
  line-height: .5rem;
39
46
  display: block;
40
47
  text-align: center;
41
- @include text-truncate();
48
+
49
+ @include text.truncate;
42
50
 
43
51
  &:empty {
44
52
  display: none;