@weavy/uikit-react 12.1.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 (280) hide show
  1. package/changelog.md +60 -0
  2. package/dist/cjs/index.js +28 -6
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/types/client/WeavyClient.d.ts +8 -1
  5. package/dist/cjs/types/components/Attachment.d.ts +2 -1
  6. package/dist/cjs/types/components/Chat.d.ts +1 -1
  7. package/dist/cjs/types/components/Messages.d.ts +3 -1
  8. package/dist/cjs/types/components/PdfViewer.d.ts +3 -1
  9. package/dist/cjs/types/components/Preview.d.ts +8 -10
  10. package/dist/cjs/types/contexts/PreviewContext.d.ts +2 -1
  11. package/dist/cjs/types/contexts/WeavyContext.d.ts +2 -3
  12. package/dist/cjs/types/hooks/useConversations.d.ts +1 -1
  13. package/dist/cjs/types/hooks/useMutateMessage.d.ts +1 -1
  14. package/dist/cjs/types/hooks/useMutateRead.d.ts +1 -0
  15. package/dist/cjs/types/types/Chat.d.ts +2 -1
  16. package/dist/cjs/types/types/Message.d.ts +2 -0
  17. package/dist/cjs/types/types/types.d.ts +63 -9
  18. package/dist/cjs/types/ui/Spinner.d.ts +10 -0
  19. package/dist/cjs/types/utils/fileUtilities.d.ts +1 -4
  20. package/dist/css/weavy-chat.css +1803 -1041
  21. package/dist/css/weavy-messenger.css +2141 -1360
  22. package/dist/css/weavy.css +1943 -1162
  23. package/dist/esm/index.js +28 -6
  24. package/dist/esm/index.js.map +1 -1
  25. package/dist/esm/types/client/WeavyClient.d.ts +8 -1
  26. package/dist/esm/types/components/Attachment.d.ts +2 -1
  27. package/dist/esm/types/components/Chat.d.ts +1 -1
  28. package/dist/esm/types/components/Messages.d.ts +3 -1
  29. package/dist/esm/types/components/PdfViewer.d.ts +3 -1
  30. package/dist/esm/types/components/Preview.d.ts +8 -10
  31. package/dist/esm/types/contexts/PreviewContext.d.ts +2 -1
  32. package/dist/esm/types/contexts/WeavyContext.d.ts +2 -3
  33. package/dist/esm/types/hooks/useConversations.d.ts +1 -1
  34. package/dist/esm/types/hooks/useMutateMessage.d.ts +1 -1
  35. package/dist/esm/types/hooks/useMutateRead.d.ts +1 -0
  36. package/dist/esm/types/types/Chat.d.ts +2 -1
  37. package/dist/esm/types/types/Message.d.ts +2 -0
  38. package/dist/esm/types/types/types.d.ts +63 -9
  39. package/dist/esm/types/ui/Spinner.d.ts +10 -0
  40. package/dist/esm/types/utils/fileUtilities.d.ts +1 -4
  41. package/dist/index.d.ts +15 -7
  42. package/package.json +2 -2
  43. package/rollup.config.js +3 -1
  44. package/src/client/WeavyClient.ts +105 -29
  45. package/src/components/Attachment.tsx +8 -7
  46. package/src/components/Chat.tsx +8 -7
  47. package/src/components/Conversation.tsx +29 -23
  48. package/src/components/ConversationBadge.tsx +7 -5
  49. package/src/components/ConversationForm.tsx +1 -1
  50. package/src/components/ConversationList.tsx +59 -11
  51. package/src/components/ConversationListItem.tsx +71 -54
  52. package/src/components/FileBrowser.tsx +53 -50
  53. package/src/components/MeetingCard.tsx +35 -13
  54. package/src/components/Meetings.tsx +1 -1
  55. package/src/components/Message.tsx +41 -41
  56. package/src/components/Messages.tsx +62 -61
  57. package/src/components/Messenger.tsx +7 -2
  58. package/src/components/NewConversation.tsx +1 -1
  59. package/src/components/PdfViewer.tsx +93 -88
  60. package/src/components/Preview.tsx +115 -54
  61. package/src/components/Reactions.tsx +11 -5
  62. package/src/components/SearchUsers.tsx +21 -11
  63. package/src/components/SeenBy.tsx +13 -7
  64. package/src/components/Typing.tsx +11 -12
  65. package/src/contexts/PreviewContext.tsx +90 -16
  66. package/src/contexts/UserContext.tsx +1 -1
  67. package/src/contexts/WeavyContext.tsx +10 -7
  68. package/src/hooks/useBadge.ts +2 -6
  69. package/src/hooks/useChat.ts +3 -14
  70. package/src/hooks/useConversation.ts +1 -7
  71. package/src/hooks/useConversations.ts +15 -11
  72. package/src/hooks/useFileUploader.ts +6 -8
  73. package/src/hooks/useMembers.ts +1 -7
  74. package/src/hooks/useMessages.ts +1 -7
  75. package/src/hooks/useMutateChat.ts +6 -11
  76. package/src/hooks/useMutateConversation.ts +7 -10
  77. package/src/hooks/useMutateConversationName.ts +10 -12
  78. package/src/hooks/useMutateDeleteReaction.ts +3 -8
  79. package/src/hooks/useMutateExternalBlobs.ts +6 -11
  80. package/src/hooks/useMutateMeeting.ts +6 -11
  81. package/src/hooks/useMutateMembers.ts +8 -13
  82. package/src/hooks/useMutateMessage.ts +9 -18
  83. package/src/hooks/useMutatePinned.ts +3 -8
  84. package/src/hooks/useMutateReaction.ts +6 -12
  85. package/src/hooks/useMutateRead.ts +5 -12
  86. package/src/hooks/useMutateRemoveMembers.ts +7 -12
  87. package/src/hooks/useMutateTyping.ts +6 -11
  88. package/src/hooks/usePresence.ts +2 -3
  89. package/src/hooks/useReactions.ts +11 -12
  90. package/src/hooks/useSearchUsers.ts +1 -6
  91. package/src/hooks/useUser.ts +3 -14
  92. package/src/scss/theme/_alert.scss +61 -63
  93. package/src/scss/theme/_appbar.scss +105 -28
  94. package/src/scss/theme/_avatar.scss +23 -28
  95. package/src/scss/theme/_badge.scss +26 -18
  96. package/src/scss/theme/_buttons.scss +107 -52
  97. package/src/scss/theme/_card.scss +102 -4
  98. package/src/scss/theme/_checkbox.scss +16 -20
  99. package/src/scss/theme/_code-vscode-dark.scss +184 -0
  100. package/src/scss/theme/_code-vscode-light.scss +179 -0
  101. package/src/scss/theme/_code.scss +9 -114
  102. package/src/scss/theme/_comment-editor-cm.scss +97 -0
  103. package/src/scss/theme/_comment-editor.scss +129 -0
  104. package/src/scss/theme/_comments.scss +66 -0
  105. package/src/scss/theme/_content.scss +33 -5
  106. package/src/scss/theme/_conversations.scss +19 -78
  107. package/src/scss/theme/_dropdown.scss +102 -15
  108. package/src/scss/theme/_embed.scss +135 -0
  109. package/src/scss/theme/_facepile.scss +11 -0
  110. package/src/scss/theme/_filebrowser.scss +1 -1
  111. package/src/scss/theme/_files.scss +77 -48
  112. package/src/scss/theme/_grid.scss +8 -0
  113. package/src/scss/theme/_icons.scss +155 -19
  114. package/src/scss/theme/_image-grid.scss +7 -10
  115. package/src/scss/theme/_input.scss +160 -0
  116. package/src/scss/theme/_item.scss +169 -0
  117. package/src/scss/theme/_list.scss +57 -0
  118. package/src/scss/theme/_meeting.scss +11 -0
  119. package/src/scss/theme/_message-editor-cm.scss +95 -0
  120. package/src/scss/theme/_message-editor.scss +66 -20
  121. package/src/scss/theme/_messages.scss +51 -105
  122. package/src/scss/theme/_meta.scss +12 -0
  123. package/src/scss/theme/_overlays.scss +31 -76
  124. package/src/scss/theme/_pager.scss +5 -1
  125. package/src/scss/theme/_pane.scss +13 -2
  126. package/src/scss/theme/_panels.scss +34 -25
  127. package/src/scss/theme/_picker-list.scss +5 -3
  128. package/src/scss/theme/_placeholder.scss +19 -0
  129. package/src/scss/theme/_poll.scss +49 -0
  130. package/src/scss/theme/_post-editor-cm.scss +100 -0
  131. package/src/scss/theme/_post-editor.scss +127 -0
  132. package/src/scss/theme/_post.scss +83 -0
  133. package/src/scss/theme/_preview-code.scss +14 -0
  134. package/src/scss/theme/_preview-embed.scss +11 -5
  135. package/src/scss/theme/_preview-image.scss +8 -26
  136. package/src/scss/theme/_preview-media.scss +1 -0
  137. package/src/scss/theme/_preview-pdf.scss +10 -15
  138. package/src/scss/theme/_preview-text.scss +1 -1
  139. package/src/scss/theme/_preview.scss +59 -76
  140. package/src/scss/theme/_reactions.scss +48 -17
  141. package/src/scss/theme/_sheet.scss +59 -0
  142. package/src/scss/theme/_sidebar.scss +86 -0
  143. package/src/scss/theme/_spinner.scss +11 -7
  144. package/src/scss/theme/_tab.scss +72 -0
  145. package/src/scss/theme/_tables.scss +70 -23
  146. package/src/scss/theme/_toasts.scss +56 -26
  147. package/src/scss/theme/_type.scss +41 -0
  148. package/src/scss/theme/{mixins → base}/_backdrop.scss +0 -0
  149. package/src/scss/theme/{bootstrap/mixins → base}/_breakpoints.scss +9 -0
  150. package/src/scss/theme/base/_colors.scss +315 -0
  151. package/src/scss/theme/base/_md.scss +19 -0
  152. package/src/scss/theme/base/_palette.scss +130 -0
  153. package/src/scss/theme/{mixins → base}/_position.scss +5 -5
  154. package/src/scss/theme/base/_reboot.scss +51 -0
  155. package/src/scss/theme/base/_scroll.scss +180 -0
  156. package/src/scss/theme/base/_svg.scss +49 -0
  157. package/src/scss/theme/base/_text.scss +23 -0
  158. package/src/scss/theme/base/_vars.scss +203 -0
  159. package/src/scss/theme/{fonts → base/fonts}/_fontmapping-roboto.scss +0 -0
  160. package/src/scss/theme/{fonts → base/fonts}/_fontmapping-segoe-ui.scss +0 -0
  161. package/src/scss/theme/base/fonts/_index.scss +2 -0
  162. package/src/scss/weavy-chat.scss +11 -4
  163. package/src/scss/weavy-messenger.scss +38 -21
  164. package/src/types/Chat.ts +2 -1
  165. package/src/types/Message.ts +3 -1
  166. package/src/types/types.ts +72 -10
  167. package/src/ui/Icon.tsx +1 -1
  168. package/src/ui/Spinner.tsx +19 -0
  169. package/src/utils/fileUtilities.ts +11 -125
  170. package/src/utils/infiniteScroll.js +11 -2
  171. package/src/utils/postal-parent.js +398 -0
  172. package/src/utils/promise.js +187 -0
  173. package/src/utils/scrollbarDetection.js +68 -9
  174. package/src/utils/utils.js +547 -0
  175. package/src/scss/theme/_attachments.scss +0 -74
  176. package/src/scss/theme/_cm-editor.scss +0 -42
  177. package/src/scss/theme/_colors.scss +0 -520
  178. package/src/scss/theme/_config.scss +0 -6
  179. package/src/scss/theme/_inputs.scss +0 -28
  180. package/src/scss/theme/_nav.scss +0 -52
  181. package/src/scss/theme/_palette.scss +0 -165
  182. package/src/scss/theme/_preview-icon.scss +0 -41
  183. package/src/scss/theme/_reboot.scss +0 -41
  184. package/src/scss/theme/_root.scss +0 -2
  185. package/src/scss/theme/_scroll.scss +0 -55
  186. package/src/scss/theme/_search.scss +0 -68
  187. package/src/scss/theme/_turbo.scss +0 -17
  188. package/src/scss/theme/_variables.scss +0 -139
  189. package/src/scss/theme/bootstrap/_accordion.scss +0 -146
  190. package/src/scss/theme/bootstrap/_alert.scss +0 -71
  191. package/src/scss/theme/bootstrap/_badge.scss +0 -38
  192. package/src/scss/theme/bootstrap/_breadcrumb.scss +0 -40
  193. package/src/scss/theme/bootstrap/_button-group.scss +0 -142
  194. package/src/scss/theme/bootstrap/_buttons.scss +0 -186
  195. package/src/scss/theme/bootstrap/_card.scss +0 -234
  196. package/src/scss/theme/bootstrap/_carousel.scss +0 -229
  197. package/src/scss/theme/bootstrap/_close.scss +0 -40
  198. package/src/scss/theme/bootstrap/_containers.scss +0 -41
  199. package/src/scss/theme/bootstrap/_dropdown.scss +0 -248
  200. package/src/scss/theme/bootstrap/_forms.scss +0 -9
  201. package/src/scss/theme/bootstrap/_functions.scss +0 -302
  202. package/src/scss/theme/bootstrap/_grid.scss +0 -33
  203. package/src/scss/theme/bootstrap/_helpers.scss +0 -10
  204. package/src/scss/theme/bootstrap/_images.scss +0 -42
  205. package/src/scss/theme/bootstrap/_list-group.scss +0 -191
  206. package/src/scss/theme/bootstrap/_maps.scss +0 -54
  207. package/src/scss/theme/bootstrap/_mixins.scss +0 -43
  208. package/src/scss/theme/bootstrap/_modal.scss +0 -237
  209. package/src/scss/theme/bootstrap/_nav.scss +0 -172
  210. package/src/scss/theme/bootstrap/_navbar.scss +0 -276
  211. package/src/scss/theme/bootstrap/_offcanvas.scss +0 -143
  212. package/src/scss/theme/bootstrap/_pagination.scss +0 -109
  213. package/src/scss/theme/bootstrap/_placeholders.scss +0 -51
  214. package/src/scss/theme/bootstrap/_popover.scss +0 -196
  215. package/src/scss/theme/bootstrap/_progress.scss +0 -59
  216. package/src/scss/theme/bootstrap/_reboot.scss +0 -610
  217. package/src/scss/theme/bootstrap/_root.scss +0 -73
  218. package/src/scss/theme/bootstrap/_spinners.scss +0 -85
  219. package/src/scss/theme/bootstrap/_tables.scss +0 -164
  220. package/src/scss/theme/bootstrap/_toasts.scss +0 -70
  221. package/src/scss/theme/bootstrap/_tooltip.scss +0 -120
  222. package/src/scss/theme/bootstrap/_transitions.scss +0 -27
  223. package/src/scss/theme/bootstrap/_type.scss +0 -106
  224. package/src/scss/theme/bootstrap/_utilities.scss +0 -647
  225. package/src/scss/theme/bootstrap/_variables.scss +0 -1633
  226. package/src/scss/theme/bootstrap/forms/_floating-labels.scss +0 -74
  227. package/src/scss/theme/bootstrap/forms/_form-check.scss +0 -175
  228. package/src/scss/theme/bootstrap/forms/_form-control.scss +0 -194
  229. package/src/scss/theme/bootstrap/forms/_form-range.scss +0 -91
  230. package/src/scss/theme/bootstrap/forms/_form-select.scss +0 -71
  231. package/src/scss/theme/bootstrap/forms/_form-text.scss +0 -11
  232. package/src/scss/theme/bootstrap/forms/_input-group.scss +0 -129
  233. package/src/scss/theme/bootstrap/forms/_labels.scss +0 -36
  234. package/src/scss/theme/bootstrap/forms/_validation.scss +0 -12
  235. package/src/scss/theme/bootstrap/helpers/_clearfix.scss +0 -3
  236. package/src/scss/theme/bootstrap/helpers/_color-bg.scss +0 -10
  237. package/src/scss/theme/bootstrap/helpers/_colored-links.scss +0 -12
  238. package/src/scss/theme/bootstrap/helpers/_position.scss +0 -36
  239. package/src/scss/theme/bootstrap/helpers/_ratio.scss +0 -26
  240. package/src/scss/theme/bootstrap/helpers/_stacks.scss +0 -15
  241. package/src/scss/theme/bootstrap/helpers/_stretched-link.scss +0 -15
  242. package/src/scss/theme/bootstrap/helpers/_text-truncation.scss +0 -7
  243. package/src/scss/theme/bootstrap/helpers/_visually-hidden.scss +0 -8
  244. package/src/scss/theme/bootstrap/helpers/_vr.scss +0 -8
  245. package/src/scss/theme/bootstrap/mixins/_alert.scss +0 -15
  246. package/src/scss/theme/bootstrap/mixins/_backdrop.scss +0 -14
  247. package/src/scss/theme/bootstrap/mixins/_banner.scss +0 -9
  248. package/src/scss/theme/bootstrap/mixins/_border-radius.scss +0 -78
  249. package/src/scss/theme/bootstrap/mixins/_box-shadow.scss +0 -18
  250. package/src/scss/theme/bootstrap/mixins/_buttons.scss +0 -70
  251. package/src/scss/theme/bootstrap/mixins/_caret.scss +0 -64
  252. package/src/scss/theme/bootstrap/mixins/_clearfix.scss +0 -9
  253. package/src/scss/theme/bootstrap/mixins/_color-scheme.scss +0 -7
  254. package/src/scss/theme/bootstrap/mixins/_container.scss +0 -11
  255. package/src/scss/theme/bootstrap/mixins/_deprecate.scss +0 -10
  256. package/src/scss/theme/bootstrap/mixins/_forms.scss +0 -152
  257. package/src/scss/theme/bootstrap/mixins/_gradients.scss +0 -47
  258. package/src/scss/theme/bootstrap/mixins/_grid.scss +0 -151
  259. package/src/scss/theme/bootstrap/mixins/_image.scss +0 -16
  260. package/src/scss/theme/bootstrap/mixins/_list-group.scss +0 -24
  261. package/src/scss/theme/bootstrap/mixins/_lists.scss +0 -7
  262. package/src/scss/theme/bootstrap/mixins/_pagination.scss +0 -10
  263. package/src/scss/theme/bootstrap/mixins/_reset-text.scss +0 -17
  264. package/src/scss/theme/bootstrap/mixins/_resize.scss +0 -6
  265. package/src/scss/theme/bootstrap/mixins/_table-variants.scss +0 -24
  266. package/src/scss/theme/bootstrap/mixins/_text-truncate.scss +0 -8
  267. package/src/scss/theme/bootstrap/mixins/_transition.scss +0 -26
  268. package/src/scss/theme/bootstrap/mixins/_utilities.scss +0 -97
  269. package/src/scss/theme/bootstrap/mixins/_visually-hidden.scss +0 -29
  270. package/src/scss/theme/bootstrap/utilities/_api.scss +0 -47
  271. package/src/scss/theme/bootstrap/vendor/_rfs.scss +0 -354
  272. package/src/scss/theme/bs/_badge.scss +0 -20
  273. package/src/scss/theme/bs/_buttons.scss +0 -185
  274. package/src/scss/theme/bs/_dropdown.scss +0 -86
  275. package/src/scss/theme/bs/_forms.scss +0 -161
  276. package/src/scss/theme/bs/_list-group.scss +0 -73
  277. package/src/scss/theme/bs/_tables.scss +0 -46
  278. package/src/scss/theme/fonts/_index.scss +0 -2
  279. package/src/scss/theme/mixins/_palette.scss +0 -165
  280. package/src/scss/theme/mixins/_scrollbar.scss +0 -110
@@ -0,0 +1,129 @@
1
+ @use "base/vars";
2
+ @use "base/colors";
3
+ @use "base/backdrop";
4
+ @use "base/position";
5
+
6
+
7
+ .wy-comment-editor {
8
+ .wy-spinner {
9
+ display: none;
10
+ }
11
+
12
+ &.wy-uploading {
13
+ .wy-spinner {
14
+ display: block;
15
+ }
16
+
17
+ [data-icon=plus] {
18
+ display: none;
19
+ }
20
+ }
21
+
22
+ .wy-picker-list:not(:empty) {
23
+ border-top: 1px solid #{colors.$outline-variant};
24
+ }
25
+ }
26
+
27
+
28
+ .wy-comment-editor-bottom {
29
+ // we need the editor to appear below dropdowns
30
+ position: sticky;
31
+ bottom: 0;
32
+ z-index: #{vars.$zindex-dropdown - 1};
33
+ background-color: var(--wy-component-background-color);
34
+ color: var(--wy-component-color);
35
+ }
36
+
37
+ .wy-comment-editor-dragging {
38
+ &::after {
39
+ content: "Drop files here to upload.";
40
+ background-color: rgba(255, 255, 255, .5);
41
+ display: flex;
42
+ justify-content: center;
43
+ align-items: center;
44
+ border: 2px dashed colors.$primary;
45
+ font-weight: vars.$font-weight-bold;
46
+ z-index: 10000;
47
+ position: absolute;
48
+ top: 0;
49
+ left: 0;
50
+ bottom: 0;
51
+ right: 0;
52
+ }
53
+ }
54
+
55
+ .wy-comment-editor-inputs {
56
+ display: flex;
57
+ flex-direction: row;
58
+ align-items: flex-end;
59
+ //border-top: 1px solid #{colors.$outline-variant};
60
+ padding: .5rem .25rem;
61
+ min-height: 3.5rem;
62
+
63
+ > :not(:last-child) {
64
+ margin-right: .25rem;
65
+ }
66
+ }
67
+
68
+ .wy-comment-editor-buttons {
69
+ flex: 1 0 auto;
70
+ }
71
+
72
+ .wy-comment-editor-text {
73
+ flex: 1 1 100%;
74
+ display: flex;
75
+ flex-direction: column;
76
+ }
77
+
78
+ .wy-comment-editor-mention {
79
+ background: blue;
80
+ color: white;
81
+ }
82
+
83
+ .wy-comment-editor-link {
84
+ background: blue;
85
+ color: white;
86
+ }
87
+
88
+ %comment-editor-textfield,
89
+ .wy-comment-editor-textfield {
90
+ flex: 1 1 100%;
91
+ max-height: 11.25rem;
92
+ background-color: colors.$background;
93
+ color: colors.$on-background;
94
+ border-radius: 1.25rem;
95
+ border: vars.$input-border-width solid #{colors.$outline-variant};
96
+
97
+ &:focus {
98
+ border-color: #{colors.$primary};
99
+ }
100
+
101
+ }
102
+
103
+ %comment-editor-textcontent,
104
+ .wy-comment-editor-textcontent {
105
+ font-family: vars.$font-family-base;
106
+ font-size: vars.$font-size-base;
107
+ padding: vars.$input-padding-y vars.$input-padding-x;
108
+ }
109
+
110
+ %comment-editor-grow,
111
+ .wy-comment-editor-grow {
112
+ display: grid;
113
+
114
+ &::after, > textarea {
115
+ @extend %comment-editor-textfield;
116
+ grid-area: 1 / 1 / 2 / 2;
117
+ }
118
+
119
+ &::after {
120
+ content: attr(data-replicated-value) " ";
121
+ white-space: pre-wrap;
122
+ visibility: hidden;
123
+ }
124
+
125
+ > textarea {
126
+ resize: none;
127
+ overflow: hidden;
128
+ }
129
+ }
@@ -0,0 +1,66 @@
1
+ @use "base/colors";
2
+ @use "base/vars";
3
+ @use "base/text";
4
+ @use "reactions";
5
+
6
+ .wy-comments {
7
+ padding: 0 1rem 1rem;
8
+ display: flex;
9
+ flex-direction: column;
10
+ gap: 1.25rem;
11
+ }
12
+
13
+ .wy-comments-count {
14
+ padding: 0 .5rem;
15
+ @include text.truncate;
16
+ }
17
+
18
+
19
+ .wy-comment {
20
+ --wy-component-background-color: #{colors.$surface-3};
21
+ --wy-component-color: #{colors.$on-surface};
22
+ --wy-component-border-radius: #{vars.$border-radius};
23
+ border-radius: var(--wy-component-border-radius);
24
+ background-color: var(--wy-component-background-color);
25
+ color: var(--wy-component-color);
26
+ display: flex;
27
+ flex-direction: column;
28
+ gap: .25rem;
29
+ padding: .25rem;
30
+ position: relative;
31
+
32
+ .wy-item {
33
+ padding-left: .75rem;
34
+ padding-right: .75rem;
35
+
36
+ > .wy-avatar, > .wy-icon, > .wy-icon-stack {
37
+ margin-left: -.25rem;
38
+ }
39
+ }
40
+
41
+ .wy-reactions-line {
42
+ position: absolute;
43
+ bottom: -1.125rem;
44
+ right: .25rem;
45
+ }
46
+ }
47
+
48
+ /*.wy-comment-header {
49
+ //padding-right: .25rem;
50
+ }*/
51
+
52
+ .wy-comment-body {
53
+
54
+ flex: 1 0 auto;
55
+ z-index: 1;
56
+
57
+ }
58
+
59
+ .wy-comment-content {
60
+ padding: 0 .5rem .5rem;
61
+ display: flex;
62
+ flex-direction: column;
63
+ }
64
+
65
+
66
+
@@ -1,15 +1,43 @@
1
- @use "config" as *;
2
1
 
3
- // user content. e.g. text in comments, messages etc.
2
+ @use "base/vars";
3
+ @use "base/colors";
4
+
5
+ // user generated content. e.g. text in comments, messages etc.
6
+ .wy-content {
7
+ overflow-wrap: break-word;
8
+ min-width: 0;
9
+ // inline code
10
+ :not(pre) > code {
11
+ overflow-wrap: inherit;
12
+ }
13
+ // code block
14
+ pre, pre > code[class*=language-] {
15
+ white-space: pre-wrap;
16
+ }
17
+
18
+ :last-child {
19
+ margin-bottom: 0;
20
+ }
21
+
22
+ &:empty {
23
+ display: none;
24
+ }
25
+
26
+ :not(.wy-dark) &, &:not(.wy-dark) {
27
+ @import "code-vscode-light";
28
+ }
29
+
30
+ .wy-dark &, &.wy-dark {
31
+ @import "code-vscode-dark";
32
+ }
33
+ }
4
34
 
5
35
  // hashtags
6
36
  .wy-hashtag {
7
- color: $text-muted;
37
+ color: #{colors.$primary};
8
38
  }
9
39
 
10
40
  // mentions
11
41
  .wy-mention {
12
42
  font-weight: 500;
13
43
  }
14
-
15
-
@@ -1,91 +1,32 @@
1
- @use "config" as *;
2
- @use "bs/list-group";
3
- @use "avatar";
4
- @use "search";
5
- @use "typing";
1
+ @use "base/vars";
2
+ @use "base/colors";
3
+ @use "base/text";
6
4
 
7
5
  .wy-conversation {
8
6
  display: flex;
9
7
  position: relative;
10
- }
11
-
12
- .wy-conversation-link {
13
- @extend
14
- %list-group-item,
15
- %list-group-item-action;
16
- display: flex;
17
- padding: .5rem;
18
- border: none;
19
- z-index: unset !important;
20
-
21
-
22
- &.wy-active {
23
- background-color: $list-group-hover-bg;
24
- }
25
- }
26
-
27
- .wy-conversation-body {
28
- flex-grow: 1;
29
- min-width: 0;
30
- margin-left: 1rem;
31
- }
32
-
33
- .wy-conversation-header {
34
- display: flex;
35
- align-items: center;
36
- }
37
-
38
- .wy-conversation-title {
39
- @include text-truncate();
40
- margin-right: auto;
41
8
 
42
- .wy-conversation.wy-unread & {
43
- font-weight: $font-weight-bold;
9
+ .wy-item-title {
10
+ font-weight: vars.$font-weight-normal;
44
11
  }
45
- }
46
-
47
- .wy-conversation-time {
48
- color: $text-muted;
49
- font-size: $font-size-xs;
50
- margin-left: .5rem;
51
- margin-right: .25rem;
52
- flex-shrink: 0;
53
- }
54
-
55
- .wy-conversation-summary {
56
- @include text-truncate();
57
-
58
- color: $text-muted;
59
- font-size: $font-size-sm;
60
- margin-right: 4rem; // room for icons
61
-
62
- // vertically align text and icons
63
- height: 1.5rem;
64
- line-height: 1.5rem;
65
12
 
66
- .wy-emoji {
67
- vertical-align: -.3125rem;
68
- }
69
-
70
- .wy-icon {
71
- vertical-align: -.4375rem;
72
- }
13
+ &.wy-unread {
14
+ .wy-item-title {
15
+ font-weight: vars.$font-weight-bold;
16
+ }
73
17
 
74
- .wy-conversation.wy-unread & {
75
- font-weight: $font-weight-medium;
76
- color: $body-color;
18
+ .wy-item-text, .wy-meta {
19
+ color: colors.$on-background;
20
+ font-weight: vars.$font-weight-semibold;
21
+ }
77
22
  }
78
23
 
79
- .wy-typing-show {
80
- @include text-truncate();
81
- font-weight: $font-weight-normal;
24
+ .wy-item-text {
25
+ .wy-typing-show {
26
+ @include text.truncate;
27
+ font-weight: vars.$font-weight-normal;
28
+ }
82
29
  }
83
30
  }
84
31
 
85
- .wy-conversation-actions {
86
- display: flex;
87
- align-items: center;
88
- position: absolute;
89
- right: .5rem;
90
- bottom: .25rem;
91
- }
32
+
@@ -1,5 +1,16 @@
1
- @use "config" as *;
2
- @use "bs/dropdown";
1
+ @use "base/vars";
2
+ @use "base/colors";
3
+
4
+ $dropdown-spacer: .25rem;
5
+ $dropdown-min-width: 10rem;
6
+ $dropdown-padding-y: 0;
7
+ $dropdown-padding-x: 0;
8
+ $dropdown-font-size: vars.$font-size-base;
9
+ $dropdown-border-radius: vars.$border-radius;
10
+ $dropdown-box-shadow: vars.$shadow-level1;
11
+
12
+ $dropdown-item-padding-y: .75rem;
13
+ $dropdown-item-padding-x: 1rem;
3
14
 
4
15
  .wy-dropdown,
5
16
  .wy-dropup {
@@ -21,7 +32,31 @@
21
32
  }
22
33
 
23
34
  .wy-dropdown-menu {
24
- @extend %dropdown-menu;
35
+ --wy-component-background-color: #{colors.$surface-2};
36
+ --wy-component-color: #{colors.$on-surface};
37
+
38
+ background-color: var(--wy-component-background-color);
39
+ color: var(--wy-component-color);
40
+
41
+ position: absolute;
42
+ z-index: vars.$zindex-dropdown;
43
+ //display: none; // none by default, but block on "open" of the menu
44
+ min-width: $dropdown-min-width;
45
+ padding: $dropdown-padding-y $dropdown-padding-x;
46
+ margin: 0; // Override default margin of ul
47
+ font-size: $dropdown-font-size;
48
+ text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
49
+ list-style: none;
50
+ background-clip: padding-box;
51
+ border-radius: $dropdown-border-radius;
52
+ box-shadow: $dropdown-box-shadow;
53
+ overflow: hidden;
54
+
55
+ &[data-bs-popper] {
56
+ top: 100%;
57
+ left: 0;
58
+ margin-top: $dropdown-spacer;
59
+ }
25
60
 
26
61
  display: block;
27
62
 
@@ -44,34 +79,81 @@
44
79
  }
45
80
  }
46
81
 
47
- .#{wy}-dropdown-menu-end {
82
+ .wy-dropdown-menu-end {
48
83
  right: 0;
49
84
  }
50
85
 
51
- .#{wy}-dropdown-item {
52
- @extend %dropdown-item;
86
+ .wy-dropdown-item {
87
+ background-color: transparent; // For `<button>`s
88
+ color: var(--wy-component-color, #{colors.$on-surface});
89
+
90
+ display: block;
91
+ width: 100%; // For `<button>`s
92
+ padding: $dropdown-item-padding-y $dropdown-item-padding-x;
93
+ clear: both;
94
+ font-family: inherit;
95
+ font-size: inherit;
96
+ font-weight: vars.$font-weight-normal;
97
+ line-height: 1;
98
+ text-align: inherit; // For `<button>`s
99
+ text-decoration: none;
100
+ white-space: nowrap; // prevent links from randomly breaking onto new lines
101
+ border: 0; // For `<button>`s
102
+ gap: .25rem;
103
+
104
+ &:hover,
105
+ &:focus {
106
+ --wy-component-color: #{colors.$on-surface-variant};
107
+ --wy-component-background-color: #{colors.$surface-variant};
108
+
109
+ color: var(--wy-component-color);
110
+ background-color: var(--wy-component-background-color);
111
+ text-decoration: none;
112
+ }
113
+
114
+ &.wy-active,
115
+ &:active {
116
+ --wy-component-color: #{colors.$on-primary-container};
117
+ --wy-component-background-color: #{colors.$primary-container};
118
+
119
+ color: var(--wy-component-color);
120
+ background-color: var(--wy-component-background-color);
121
+ text-decoration: none;
122
+ }
123
+
124
+ &.wy-disabled,
125
+ &:disabled {
126
+ //--wy-component-color: #{colors.$on-surface};
127
+ //--wy-component-background-color: #{colors.$surface-3};
128
+
129
+ color: var(--wy-component-color);
130
+ background-color: var(--wy-component-background-color);
131
+ pointer-events: none;
132
+ opacity: vars.$opacity-disabled;
133
+ }
134
+
135
+
53
136
  cursor: pointer;
54
137
  display: flex;
55
138
  align-items: center;
56
139
 
57
- > img, .#{wy}-icon {
140
+ > img, .wy-icon {
58
141
  margin-right: .5rem;
59
- color: $icon-color;
142
+ color: inherit;
60
143
  }
61
144
 
62
145
  &:active {
63
- > .#{wy}-icon {
64
- $c: color-contrast($component-active-bg);
65
- color: if($c == $color-contrast-light, $icon-light-color!important, $icon-color);
146
+ > .wy-icon {
147
+ color: inherit;
66
148
  }
67
149
  }
68
150
 
69
151
  // dropdown item with icon for marking selection option
70
- &.#{wy}-option {
152
+ &.wy-option {
71
153
  .wy-icon {
72
154
  visibility: hidden;
73
155
  }
74
- &.#{wy}-selected {
156
+ &.wy-selected {
75
157
  .wy-icon {
76
158
  visibility: visible;
77
159
  }
@@ -80,7 +162,12 @@
80
162
 
81
163
  }
82
164
 
83
- .#{wy}-dropdown-divider {
84
- @extend %dropdown-divider;
165
+
166
+ .wy-dropdown-divider {
167
+ height: 0;
168
+ margin: 0;
169
+ overflow: hidden;
170
+ border: none;
171
+ border-top: 1px solid colors.$outline-variant;
85
172
  }
86
173
 
@@ -0,0 +1,135 @@
1
+ @use "base/vars";
2
+ @use "base/colors";
3
+ @use "base/text";
4
+
5
+
6
+ .wy-embed {
7
+ display: flex;
8
+ flex-direction: column;
9
+ word-wrap: break-word;
10
+ }
11
+
12
+ // responsive image
13
+ .wy-embed-photo {
14
+ a {
15
+ display: flex;
16
+ }
17
+
18
+ img {
19
+ width: 100%;
20
+ height: auto;
21
+ }
22
+ }
23
+
24
+ // center small images
25
+ .wy-embed-photo-sm {
26
+ a {
27
+ padding: 0 1rem;
28
+ }
29
+
30
+ img {
31
+ display: block;
32
+ margin: 0 auto;
33
+ width: auto;
34
+ max-width: 100%;
35
+ border-radius: #{vars.$border-radius-sm};
36
+ }
37
+ }
38
+
39
+ // responsive video
40
+ .wy-embed-video {
41
+ position: relative;
42
+ display: block;
43
+ width: 100%;
44
+ padding: 0;
45
+ overflow: hidden;
46
+
47
+ &::before {
48
+ display: block;
49
+ content: "";
50
+ padding-top: 56.25% // 16:9 aspect ratio
51
+ }
52
+
53
+ iframe, embed, object, video {
54
+ position: absolute;
55
+ top: 0;
56
+ bottom: 0;
57
+ left: 0;
58
+ width: 100%;
59
+ height: 100%;
60
+ border: 0
61
+ }
62
+ }
63
+
64
+ // embed caption with link, title and description
65
+ .wy-embed-caption {
66
+ --wy-component-background-color: #{colors.$surface-3};
67
+ --wy-component-color: #{colors.$on-surface};
68
+ background-color: var(--wy-component-background-color);
69
+ color: var(--wy-component-color);
70
+ padding: .5rem 1rem 1rem;
71
+ position: relative; // so that entore footer can become clickable
72
+ }
73
+
74
+ .wy-embed-link {
75
+ color: colors.$outline;
76
+ text-transform: uppercase;
77
+ font-size: #{vars.$font-size-sm};
78
+ // make entire footer clickable via a ::after pseudo element.
79
+ @include text.stretched-link;
80
+ }
81
+
82
+ .wy-embed-title {
83
+ font-weight: #{vars.$headings-font-weight};
84
+ margin-bottom: .5rem;
85
+ }
86
+
87
+ .wy-embed-description {
88
+ color: colors.$outline;
89
+ }
90
+
91
+ // Override some styles when previewing the embed in editor
92
+ .wy-embed-preview {
93
+ // prevent link click
94
+ a[target=_blank] {
95
+ pointer-events: none;
96
+ }
97
+ // add som margins and borders in preview
98
+ .wy-embed {
99
+ display: none;
100
+
101
+ &:first-child {
102
+ display: block;
103
+ }
104
+
105
+ margin: .75rem;
106
+ border: 1px solid colors.$outline-variant;
107
+ border-radius: #{vars.$border-radius};
108
+ }
109
+
110
+ .wy-embed-caption {
111
+ border-bottom-left-radius: #{vars.$border-radius};
112
+ border-bottom-right-radius: #{vars.$border-radius};
113
+ }
114
+
115
+ // show cycle/remove
116
+ .wy-embed-actions {
117
+ display: flex;
118
+ }
119
+ }
120
+
121
+
122
+ // buttons for cycling through and removing embeds (only visible in editor)
123
+ .wy-embed-actions {
124
+ display: none;
125
+ justify-content: space-between;
126
+ padding: .5rem .25rem;
127
+ }
128
+
129
+ .wy-embed-cycle {
130
+ visibility: hidden;
131
+
132
+ .wy-embed-show-cycle & {
133
+ visibility: visible;
134
+ }
135
+ }
@@ -0,0 +1,11 @@
1
+ .wy-facepile {
2
+ display: flex;
3
+ align-items: center;
4
+ flex: 0 0 auto;
5
+ flex-direction: row-reverse;
6
+
7
+ .wy-avatar {
8
+ margin-left: -.25rem;
9
+ display: inline-flex;
10
+ }
11
+ }
@@ -1,5 +1,5 @@
1
1
  // External filebrowsers
2
- .wy-filebrowser {
2
+ .wy-filebrowsers {
3
3
  pointer-events: none;
4
4
  width: auto;
5
5
  left: 0;