@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
@@ -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,36 +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;
41
+ //font-family: vars.$font-family-base;
42
+ line-height: vars.$line-height-base;
24
43
 
25
- @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;
26
47
 
27
48
  .wy-badge {
28
49
  align-self: center;
29
50
  }
30
51
 
31
52
  .wy-button {
32
- max-height: 2rem;
53
+ max-height: 2.5rem;
33
54
  }
34
55
  }
35
56
 
36
- .wy-appbar-buttons {
57
+
58
+
59
+ .wy-appbar-buttons, .wy-toolbar-buttons {
37
60
  display: flex;
38
- 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;
39
67
  }
40
68
 
41
69
  .wy-appbar-text {
42
- @include text-truncate();
70
+ @include text.truncate;
71
+ max-width: 100%;
72
+
43
73
  color: inherit !important;
44
74
  user-select: none;
45
75
 
@@ -52,41 +82,83 @@
52
82
  }
53
83
  }
54
84
 
55
- .wy-appbar {
56
- // light theme (default)
57
- &, .wy-light &, &.wy-light {
58
- background-color: rgba($gray-50, $opacity-backdrop);
59
- color: $navbar-light-color;
60
- border-bottom: $border-width solid rgba($gray-200, $opacity-backdrop);
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;
61
121
  }
62
- // dark theme
63
- .wy-dark &, &.wy-dark {
64
- background-color: rgba($dark, $opacity-backdrop);
65
- color: $navbar-dark-color;
66
- border-bottom: $border-width solid rgba($gray-800, $opacity-backdrop);
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;
67
131
  }
68
132
  }
69
133
 
70
134
  .wy-footerbars {
71
- padding-bottom: $footerbar-height;
135
+ padding-bottom: vars.$footerbar-height;
136
+
137
+ > .wy-toolbar {
138
+ box-shadow: none;
139
+ }
72
140
  }
73
141
 
74
142
  .wy-footerbar {
143
+ --wy-component-background-color: #{colors.$surface-1};
144
+ --wy-component-color: #{colors.$on-surface};
145
+
75
146
  position: absolute;
76
147
  bottom: 0;
77
148
  left: 0;
78
149
  right: 0;
79
- z-index: $zindex-sticky;
150
+ z-index: vars.$zindex-sticky;
80
151
 
81
152
  &::after {
82
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;
83
157
  position: absolute;
84
158
  width: 100vw;
85
159
  left: 0;
86
160
  bottom: 0;
87
- height: $footerbar-height;
88
- border-top: $border-width solid rgba($gray-200, $opacity-backdrop);
89
- background: rgba($gray-50, $opacity-backdrop);
161
+ height: 100%;
90
162
  z-index: -1;
91
163
 
92
164
  @include backdrop.filter;
@@ -101,12 +173,17 @@
101
173
  }
102
174
  }
103
175
 
176
+ .wy-footerbar-sticky {
177
+ position: sticky;
178
+ }
179
+
104
180
  .wy-footerbars-fixed {
105
181
  .wy-footerbar {
106
182
  position: fixed;
107
183
 
108
184
  &::after {
109
185
  position: fixed;
186
+ height: vars.$footerbar-height;
110
187
  }
111
188
  }
112
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;
@@ -1,90 +1,145 @@
1
- @use "config" as *;
2
- @use "bs/buttons";
1
+ @use "base/vars";
2
+ @use "base/colors";
3
+ @use "base/svg";
4
+
5
+ :where(:root, :host > *) {
6
+ --wy-btn-padding-x: 1.5rem;
7
+ --wy-btn-padding-y: .5rem;
8
+ --wy-btn-font-family: var(--wy-font-family);
9
+ --wy-btn-font-size: #{vars.$font-size-base};
10
+ --wy-btn-font-weight: #{vars.$font-weight-normal};
11
+ --wy-btn-line-height: #{vars.$line-height-base};
12
+ --wy-btn-border-width: 0;
13
+ --wy-btn-border-color: transparent;
14
+ --wy-btn-border-radius: 1.25rem;
15
+ }
3
16
 
4
17
  // basic unstyled button with support for icon and text
5
18
  .wy-button {
6
- @extend %btn;
19
+ --wy-component-color: #{colors.$primary};
20
+ //--wy-component-background-color: var(--wy-component-background-color, transparent); // #{colors.$surface-3};
21
+
22
+ color: var(--wy-component-color);
23
+ background: var(--wy-component-background-color, transparent);
24
+
25
+ padding: var(--wy-btn-padding-y) var(--wy-btn-padding-x);
26
+ font-family: var(--wy-btn-font-family);
27
+ font-size: var(--wy-btn-font-size);
28
+ font-weight: var(--wy-btn-font-weight);
29
+ line-height: var(--wy-btn-line-height);
30
+ text-align: center;
31
+ text-decoration: none;
32
+ white-space: null; // Set to `nowrap` to prevent text wrapping;
33
+ vertical-align: middle;
7
34
 
35
+ cursor: pointer;
36
+ user-select: none;
37
+ border: var(--wy-btn-border-width) solid var(--wy-btn-border-color);
38
+ border-radius: var(--wy-btn-border-radius);
39
+
8
40
  display: inline-flex;
9
41
  align-items: center;
10
42
  justify-content: center;
11
43
  gap: .25rem;
44
+ position: relative;
45
+
46
+ // State layer
47
+ &:not(.wy-button-link, :disabled){
48
+
49
+ > * {
50
+ z-index: 3;
51
+ }
52
+
53
+ &::before {
54
+ content: "";
55
+ z-index: 2;
56
+ position: absolute;
57
+ top: 0;
58
+ left: 0;
59
+ width: 100%;
60
+ height: 100%;
61
+ border-radius: inherit;
62
+ background: var(--wy-component-color);
63
+ opacity: 0%;
64
+ }
65
+
66
+ &:hover {
67
+ &::before {
68
+ opacity: 8%;
69
+ }
70
+ }
71
+
72
+ &:focus, &:active, &.wy-active {
73
+ &::before {
74
+ opacity: 12%;
75
+ }
76
+ }
77
+ }
12
78
 
13
79
  // align icons
14
80
  &:not(.wy-button-icon) {
15
81
  .wy-icon {
16
82
  &:first-child {
17
- margin-left: -.25rem;
83
+ margin-left: -.5rem;
18
84
  }
19
85
 
20
86
  &:last-child {
21
- margin-right: -.25rem;
87
+ margin-right: -.5rem;
22
88
  }
23
89
  }
24
90
  }
25
91
 
26
- }
27
-
28
- // default button
29
- .wy-button:not(.wy-button-link, .wy-button-primary) {
30
- --#{$prefix}btn-hover-border-color: transparent;
31
- --#{$prefix}btn-active-border-color: transparent;
32
- --#{$prefix}btn-hover-color: var(--#{$prefix}btn-color);
33
- --#{$prefix}btn-hover-bg: #{$btn-hover-bg};
34
- --#{$prefix}btn-focus-bg: #{$btn-hover-bg};
35
- --#{$prefix}btn-active-color: var(--#{$prefix}btn-color);
36
- --#{$prefix}btn-active-bg: #{$btn-active-bg};
37
-
38
- // dark mode
39
- .wy-dark & {
40
- color: var(--#{$prefix}white);
41
- }
92
+ &:disabled {
93
+ opacity: vars.$opacity-disabled;
94
+ cursor: unset;
95
+ pointer-events: none;
96
+ }
42
97
  }
43
98
 
44
99
  // button with only icon (no text)
45
- .wy-button-icon {
46
- width: 2rem;
47
- height: 2rem;
48
- padding: .25rem;
100
+ .wy-button-icon {
101
+ --wy-component-color: #{colors.$on-surface-variant};
102
+ //--wy-component-background-color: var(--wy-component-background-color, transparent);
103
+ width: 2.5rem;
104
+ height: 2.5rem;
105
+ padding: .5rem;
49
106
  line-height: 1;
50
- border-radius: 50%;
107
+ border-radius: #{vars.$border-radius-pill};
51
108
  border-width: 0;
52
- }
53
-
54
- // default icon button
55
- .wy-button-icon:not(.wy-button-primary) {
56
- color: $icon-color;
57
109
 
58
- &:hover {
59
- .wy-icon {
60
- color: $icon-hover-color;
61
- }
62
- }
63
-
64
- // dark mode
65
- .wy-dark & {
66
- color: $icon-light-color;
67
- .wy-icon {
68
- color: $icon-light-color;
69
- }
70
-
71
- &:hover {
72
- color: $icon-light-hover-color;
73
- .wy-icon {
74
- color: $icon-light-hover-color;
75
- }
76
- }
110
+ &.wy-active {
111
+ --wy-component-color: #{colors.$primary};
77
112
  }
78
113
  }
79
114
 
80
115
  // primary button
81
116
  .wy-button-primary {
82
- @extend %btn-primary;
117
+ --wy-component-background-color: #{colors.$primary};
118
+ --wy-component-color: #{colors.$on-primary};
119
+ }
120
+
121
+ .wy-button-variant {
122
+ --wy-component-background-color: #{colors.$surface-variant};
123
+ --wy-component-color: #{colors.$on-surface-variant};
124
+ }
125
+
126
+ // primary button (text only)
127
+ .wy-button-primary-text {
128
+ --wy-component-color: #{colors.$primary};
83
129
  }
84
130
 
85
131
  // button that looks and behaves like a link
86
132
  .wy-button-link {
87
- @extend %btn-link;
133
+ //--wy-component-background-color: transparent;
134
+ padding: 0;
135
+ color: var(--wy-link-color, #{colors.$primary});
136
+
137
+ text-decoration: var(--wy-link-decoration, #{vars.$link-decoration});
138
+
139
+ &:hover,
140
+ &:focus {
141
+ text-decoration: var(--wy-link-hover-decoration, #{vars.$link-hover-decoration});
142
+ }
88
143
  }
89
144
 
90
145
  // container for proper spacing and alignment of buttons
@@ -1,7 +1,105 @@
1
- .wy-card-header {
2
- border-bottom: none;
1
+ @use "base/colors";
2
+ @use "base/text";
3
+ @use "base/vars";
4
+
5
+ .wy-card {
6
+ --wy-component-background-color: #{colors.$surface-1};
7
+ --wy-component-color: #{colors.$on-surface};
8
+ --wy-component-border-radius: #{vars.$border-radius-lg};
9
+
10
+ background-color: var(--wy-component-background-color);
11
+ color: var(--wy-component-color);
12
+ border-radius: var(--wy-component-border-radius);
13
+
14
+ position: relative;
15
+ display: flex;
16
+ flex-direction: column;
17
+ min-width: 0;
18
+ word-wrap: break-word;
19
+ background-clip: border-box;
20
+
21
+ > hr {
22
+ margin-right: 0;
23
+ margin-left: 0;
24
+ }
25
+ }
26
+
27
+ .wy-card-primary {
28
+ --wy-component-background-color: #{colors.$primary-container};
29
+ --wy-component-color: #{colors.$on-primary-container};
30
+ }
31
+
32
+ .wy-card-hover {
33
+ cursor: pointer;
34
+ user-select: none;
35
+
36
+ // State layer
37
+ &::before {
38
+ content: "";
39
+ position: absolute;
40
+ top: 0;
41
+ left: 0;
42
+ width: 100%;
43
+ height: 100%;
44
+ border-radius: inherit;
45
+ background: var(--wy-component-color);
46
+ opacity: 0%;
47
+ }
48
+
49
+ &:hover {
50
+ &::before {
51
+ opacity: vars.$opacity-state-hover; //8%;
52
+ }
53
+ }
54
+ &:focus {
55
+ &::before {
56
+ opacity: vars.$opacity-state-focus; //12%;
57
+ }
58
+ }
59
+ &:active, &.wy-active {
60
+ &::before {
61
+ opacity: vars.$opacity-state-active; //12%;
62
+ }
63
+ }
64
+ }
65
+
66
+ .wy-card-actions {
67
+ position: absolute;
68
+ top: min(.25rem, calc(100% - 2.5rem)); // Account for small heights
69
+ right: .25rem;
70
+
71
+ > .wy-button-icon, > .wy-dropdown > .wy-button-icon {
72
+ background-clip: content-box;
73
+ }
74
+ }
75
+
76
+ .wy-card-content {
77
+ flex: 1 0 auto;
78
+
79
+ &:first-child, .wy-card-actions + &:nth-child(2) {
80
+ padding-block-start: .5rem;
81
+ }
82
+
83
+ padding-block-end: .5rem;
84
+ padding-inline-start: .5rem;
85
+ padding-inline-end: .5rem;
86
+ }
87
+
88
+ .wy-card-top {
89
+ border-radius: var(--wy-component-border-radius);
90
+ object-fit: cover;
91
+ object-position: top center;
92
+ flex: 1 1 100%;
93
+ max-height: 10rem;
94
+ }
95
+
96
+ .wy-card-top-image {
97
+ object-position: 50% 38%;
3
98
  }
4
99
 
5
- .wy-card-footer {
6
- border-top: none;
100
+ .wy-card-trashed {
101
+ > *:not(.wy-card-actions) {
102
+ opacity: vars.$opacity-disabled;
103
+ }
104
+ text-decoration: line-through;
7
105
  }