@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,5 +1,12 @@
1
- @use "config" as *;
2
- @use "tables";
1
+ @use "base/colors";
2
+ @use "base/vars";
3
+ @use "base/text";
4
+ @use "base/breakpoints";
5
+
6
+ .wy-filename {
7
+ font-size: vars.$font-size-sm;
8
+ @include text.truncate;
9
+ }
3
10
 
4
11
  .wy-files-dragging {
5
12
  &::after {
@@ -8,8 +15,8 @@
8
15
  display: flex;
9
16
  justify-content: center;
10
17
  align-items: center;
11
- border: 2px dashed $primary;
12
- font-weight: $font-weight-bold;
18
+ border: 2px dashed colors.$primary;
19
+ font-weight: vars.$font-weight-bold;
13
20
  z-index: 10000;
14
21
  position: fixed;
15
22
  top: 0;
@@ -19,107 +26,129 @@
19
26
  }
20
27
  }
21
28
 
22
- .wy-upload-progress{
23
- display: flex;
24
-
25
29
 
26
- progress{
27
- visibility: hidden;
30
+
31
+ .wy-upload-progress-item {
32
+ flex-direction: column;
33
+ padding: 0.75rem .25rem;
34
+
35
+ .wy-upload-progress-item-content {
28
36
  flex: 1;
29
- border-radius: 0;
30
- height: 0.5rem;
31
- position: fixed;
37
+ overflow: hidden;
38
+ text-overflow: ellipsis;
39
+ white-space: nowrap;
40
+ line-height: 1.25rem;
41
+ }
42
+
43
+ .wy-upload-progress-success {
44
+ display: flex;
45
+ align-items: center;
46
+ }
47
+
48
+ .wy-upload-progress {
49
+ display: flex;
32
50
  width: 100%;
33
51
 
34
- &::-webkit-progress-value{
35
- background-color: $primary;
52
+ progress {
53
+ flex: 1;
54
+ height: 0.5rem;
55
+ accent-color: colors.$primary;
36
56
  }
37
57
  }
38
58
  }
39
59
 
40
- .wy-file-upload-errors{
41
- display:flex;
60
+ .wy-upload-error {
61
+ align-items: flex-start;
42
62
  flex-direction: column;
63
+ white-space: normal;
64
+
65
+ .wy-upload-error-title {
66
+ overflow: hidden;
67
+ text-overflow: ellipsis;
68
+ white-space: nowrap;
69
+ line-height: 1.25rem;
70
+ }
71
+
72
+ .wy-upload-error-text {
73
+ color: colors.$error;
74
+ }
43
75
 
44
- .wy-upload-error-row{
45
- display:flex;
76
+ .wy-upload-error-actions {
77
+ white-space: nowrap;
78
+ }
79
+ }
80
+
81
+ .wy-file-upload-errors {
82
+ display: flex;
83
+ flex-direction: column;
84
+
85
+ .wy-upload-error-row {
86
+ display: flex;
46
87
  margin-bottom: 0.5rem;
47
88
  align-items: center;
48
89
  column-gap: 1rem;
49
90
 
50
- .wy-upload-error-row-title{
91
+ .wy-upload-error-row-title {
51
92
  flex: 1;
52
- overflow:hidden;
93
+ overflow: hidden;
53
94
  white-space: nowrap;
54
- text-overflow: ellipsis;
95
+ text-overflow: ellipsis;
55
96
  }
56
97
 
57
- .wy-upload-error-row-conflict{
58
- color: $warning;
98
+ .wy-upload-error-row-conflict {
99
+ background-color: colors.$error-container;
100
+ color: colors.$on-error-container;
59
101
  }
60
102
 
61
- .wy-upload-error-row-error{
62
- color: $danger;
103
+ .wy-upload-error-row-error {
104
+ color: colors.$error;
63
105
  }
64
106
  }
65
107
  }
66
108
 
67
109
  .wy-table-files {
68
- @extend %table, %table-hover, %table-icons;
69
-
70
110
  thead {
71
111
  display: none;
72
- }
73
-
74
- tr[data-preview-url-param] {
75
- cursor: pointer;
76
- }
77
-
78
- td {
79
- vertical-align: middle;
112
+ text-align: left;
80
113
  }
81
114
 
82
115
  td:nth-child(2) {
83
116
  // make room for rename form
84
- padding: 0 $table-cell-padding-x;
117
+ padding: 0 vars.$table-cell-padding-x;
85
118
  }
86
-
87
119
  // filename
88
120
  td:nth-child(2),
89
121
  th:nth-child(2) {
90
122
  width: 100%;
91
- @include text-truncate();
123
+ @include text.truncate;
92
124
  }
93
-
94
125
  // modified
95
126
  td:nth-child(3),
96
127
  th:nth-child(3) {
97
128
  display: none;
98
129
  width: 7rem;
99
- @include text-truncate();
130
+ @include text.truncate;
100
131
  }
101
-
102
132
  // kind
103
133
  td:nth-child(4),
104
134
  th:nth-child(4) {
105
135
  display: none;
106
136
  width: 7.5rem;
107
137
  text-align: right;
108
- @include text-truncate();
138
+ @include text.truncate;
109
139
  }
110
-
111
140
  // size
112
141
  td:nth-child(5),
113
142
  th:nth-child(5) {
114
143
  display: none;
115
144
  width: 7rem;
116
145
  text-align: right;
117
- @include text-truncate();
146
+ @include text.truncate;
118
147
  }
119
-
120
- @include media-breakpoint-up(sm) {
148
+ // TODO: REMOVE BREAKPOINTS
149
+ @include breakpoints.media-breakpoint-up(sm) {
121
150
  thead {
122
- display: revert;
151
+ display: table-header-group;
123
152
  }
124
153
 
125
154
  td:nth-child(5),
@@ -128,7 +157,7 @@
128
157
  }
129
158
  }
130
159
 
131
- @include media-breakpoint-up(md) {
160
+ @include breakpoints.media-breakpoint-up(md) {
132
161
 
133
162
  td:nth-child(3),
134
163
  th:nth-child(3),
@@ -0,0 +1,8 @@
1
+ @use "base/text";
2
+
3
+ .wy-grid {
4
+ display: grid;
5
+ grid-auto-flow: dense;
6
+ grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
7
+ grid-gap: .75rem;
8
+ }
@@ -1,4 +1,5 @@
1
- @use "variables" as *;
1
+ @use "base/colors";
2
+ @use "base/vars";
2
3
 
3
4
  .wy-icon {
4
5
  display: inline-flex;
@@ -20,43 +21,178 @@
20
21
  position: absolute;
21
22
  bottom: 0;
22
23
  right: 0;
23
- background: var(--#{$prefix}white);
24
+ background: var(--wy-component-background-color, #{colors.$background});
24
25
  border-radius: 50%;
25
- border: 1px solid var(--#{$prefix}white);
26
+ border: 1px solid var(--wy-component-background-color, #{colors.$background});
26
27
  }
27
28
 
28
29
  // stacked icons (icon+overlay icon)
29
30
  .wy-icon-stack {
30
- display: inline-block;
31
+ display: inline-flex;
31
32
  position: relative;
32
33
  line-height: 1;
33
- width: 1.5rem;
34
- height: 1.5rem;
35
-
36
- .wy-icon:first-child {
37
- width: 100%;
38
- height: 100%;
39
- }
40
34
 
41
35
  .wy-icon:last-child {
42
36
  position: absolute;
43
37
  bottom: 0;
44
38
  right: 0;
45
- width: 50%;
46
- height: 50%;
47
- background-color: var(--#{$prefix}body-bg);
39
+ background-color: var(--wy-component-background-color, #{colors.$background});
48
40
  border-radius: 50%;
49
41
  }
50
42
  }
51
43
 
44
+ // stacked icons (icon+active icon)
45
+ .wy-icon-active-stack {
46
+ display: inline-flex;
47
+ position: relative;
48
+ line-height: 1;
49
+
50
+ > * {
51
+ transition: opacity vars.$transition;
52
+ align-self: center;
53
+ justify-self: center;
54
+ margin: auto;
55
+ }
56
+
57
+ > :last-child {
58
+ position: absolute;
59
+ opacity: 0;
60
+ }
61
+
62
+ &.wy-active, .wy-active & {
63
+ > :first-child {
64
+ opacity: 0;
65
+ }
66
+
67
+ > :last-child {
68
+ opacity: 1;
69
+ }
70
+ }
71
+ }
72
+
52
73
  // icons normally inherit the text color of its parent
53
- .wy-icon:not([class*="wy-icon-"]) * {
74
+ .wy-icon:not([class*="wy-icon-"]):not([class*="wy-kind-"]) * {
54
75
  fill: currentColor;
55
76
  }
56
77
 
57
- // colored icons
58
- @each $color, $value in $theme-colors {
59
- .wy-icon-#{$color} * {
60
- fill: var(--#{$prefix}#{$color});
78
+ // big file type icon
79
+ .wy-content-icon {
80
+ border-radius: var(--wy-component-border-radius, vars.$border-radius-lg);
81
+ display: flex;
82
+ align-items: center;
83
+ justify-content: center;
84
+ flex-direction: column;
85
+ text-align: center;
86
+ padding: 1rem 2rem;
87
+ margin: auto;
88
+
89
+ > .wy-icon-stack, > .wy-icon {
90
+ width: 4rem;
91
+ height: 4rem;
61
92
  }
62
93
  }
94
+
95
+
96
+ // theme icons
97
+ .wy-icon-primary * {
98
+ fill: colors.$primary;
99
+ }
100
+
101
+ .wy-icon-error * {
102
+ fill: #{colors.$error};
103
+ }
104
+
105
+ // colored icons
106
+ .wy-icon-blue * {
107
+ fill: #{colors.$blue};
108
+ }
109
+
110
+ .wy-icon-indigo * {
111
+ fill: #{colors.$indigo};
112
+ }
113
+
114
+ .wy-icon-purple * {
115
+ fill: #{colors.$purple};
116
+ }
117
+
118
+ .wy-icon-pink * {
119
+ fill: #{colors.$pink};
120
+ }
121
+
122
+ .wy-icon-red * {
123
+ fill: #{colors.$red};
124
+ }
125
+
126
+ .wy-icon-orange * {
127
+ fill: #{colors.$orange};
128
+ }
129
+
130
+ .wy-icon-yellow * {
131
+ fill: #{colors.$yellow};
132
+ }
133
+
134
+ .wy-icon-green * {
135
+ fill: #{colors.$green};
136
+ }
137
+
138
+ .wy-icon-teal * {
139
+ fill: #{colors.$teal};
140
+ }
141
+
142
+ .wy-icon-cyan * {
143
+ fill: #{colors.$cyan};
144
+ }
145
+
146
+ .wy-icon-gray * {
147
+ fill: #{colors.$gray};
148
+ }
149
+
150
+
151
+ // file type icons
152
+ [class*="wy-kind-"] * {
153
+ fill: colors.$gray;
154
+ }
155
+
156
+ .wy-kind-archive * {
157
+ fill: colors.$orange;
158
+ }
159
+
160
+ .wy-kind-audio * {
161
+ fill: colors.$teal;
162
+ }
163
+
164
+ .wy-kind-code * {
165
+ fill: colors.$green;
166
+ }
167
+
168
+ .wy-kind-document * {
169
+ fill: colors.$blue;
170
+ }
171
+
172
+ .wy-kind-email * {
173
+ fill: colors.$red;
174
+ }
175
+
176
+ .wy-kind-presentation * {
177
+ fill: colors.$orange;
178
+ }
179
+
180
+ .wy-kind-spreadsheet * {
181
+ fill: colors.$green;
182
+ }
183
+
184
+ .wy-kind-image * {
185
+ fill: colors.$pink;
186
+ }
187
+
188
+ .wy-kind-text * {
189
+ fill: colors.$cyan;
190
+ }
191
+
192
+ .wy-kind-video * {
193
+ fill: colors.$purple;
194
+ }
195
+
196
+ .wy-ext-pdf * {
197
+ fill: colors.$red;
198
+ }
@@ -1,8 +1,5 @@
1
- @use "variables";
2
-
3
- $body-bg: variables.$body-bg !default;
4
- $border-radius: variables.$border-radius !default;
5
- $border-width: variables.$border-width !default;
1
+ @use "base/vars";
2
+ @use "base/colors";
6
3
 
7
4
  // images in posts, messages and comments
8
5
  .wy-image-grid {
@@ -10,11 +7,11 @@ $border-width: variables.$border-width !default;
10
7
  flex-wrap: wrap;
11
8
  justify-content: space-evenly;
12
9
  position: relative;
13
- border-radius: $border-radius;
10
+ border-radius: vars.$border-radius;
14
11
  overflow: hidden;
15
12
  //background-color: $body-bg;
16
- column-gap: $border-width;
17
- row-gap: $border-width;
13
+ column-gap: 1px;
14
+ row-gap: 1px;
18
15
 
19
16
  .wy-image {
20
17
  padding: 0;
@@ -49,8 +46,7 @@ $border-width: variables.$border-width !default;
49
46
  .wy-more {
50
47
  position: absolute;
51
48
  line-height: 100%;
52
- color: #fff;
53
- background: rgba(0,0,0,0.5);
49
+ color: colors.$white;
54
50
  top: 0;
55
51
  left: 0;
56
52
  bottom: 0;
@@ -59,5 +55,6 @@ $border-width: variables.$border-width !default;
59
55
  align-items: center;
60
56
  justify-content: center;
61
57
  font-size: 1.5rem;
58
+ background: rgba(0, 0, 0, vars.$opacity-disabled);
62
59
  }
63
60
  }
@@ -0,0 +1,160 @@
1
+ @use "base/vars";
2
+ @use "base/colors";
3
+
4
+ .wy-input {
5
+ --wy-component-background-color: #{colors.$background};
6
+ --wy-component-color: #{colors.$on-background};
7
+ background-color: var(--wy-component-background-color);
8
+ color: var(--wy-component-color);
9
+ border: vars.$input-border-width solid #{colors.$outline-variant};
10
+ display: block;
11
+ width: 100%;
12
+ padding: vars.$input-padding-y vars.$input-padding-x;
13
+ font-family: var(--wy-font-family);
14
+ font-size: vars.$input-font-size;
15
+ font-weight: vars.$input-font-weight;
16
+ line-height: vars.$input-line-height;
17
+ background-clip: padding-box;
18
+ appearance: none; // Fix appearance for date inputs in Safari
19
+ // Note: This has no effect on <select>s in some browsers, due to the limited stylability of `<select>`s in CSS.
20
+ border-radius: vars.$input-border-radius;
21
+
22
+ &:focus {
23
+ --wy-component-color: #{colors.$on-surface};
24
+ color: var(--wy-component-color);
25
+ border-color: #{colors.$primary};
26
+ outline: 0;
27
+ }
28
+ // Placeholder
29
+ &::placeholder {
30
+ color: #{colors.$outline};
31
+ // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526.
32
+ opacity: 1;
33
+ }
34
+ // Disabled and read-only inputs
35
+ //
36
+ // HTML5 says that controls under a fieldset > legend:first-child won't be
37
+ // disabled if the fieldset is disabled. Due to implementation difficulty, we
38
+ // don't honor that edge case; we style them as disabled anyway.
39
+ &:disabled {
40
+ opacity: 38%;
41
+ }
42
+ // Reset styles
43
+ // File input buttons theming
44
+ &::file-selector-button, &::-webkit-file-upload-button {
45
+ color: var(--wy-component-color);
46
+ background-color: var(--wy-component-background-color);
47
+ padding: vars.$input-padding-y vars.$input-padding-x;
48
+ margin: calc(-1 * #{vars.$input-padding-y}) calc(-1 * #{vars.$input-padding-x});
49
+ margin-inline-end: vars.$input-padding-x;
50
+ pointer-events: none;
51
+ border-color: inherit;
52
+ border-style: solid;
53
+ border-width: 0;
54
+ border-inline-end-width: vars.$input-border-width;
55
+ border-radius: 0; // stylelint-disable-line property-disallowed-list
56
+ }
57
+
58
+ &:hover:not(:disabled):not([readonly]) {
59
+ &::file-selector-button, ::-webkit-file-upload-button {
60
+ background-color: var(--wy-component-background-color);
61
+ }
62
+ }
63
+
64
+ &[type="file"] {
65
+ overflow: hidden; // prevent pseudo element button overlap
66
+
67
+ &:not(:disabled):not([readonly]) {
68
+ cursor: pointer;
69
+ }
70
+ }
71
+ // Add some height to date inputs on iOS
72
+ // https://github.com/twbs/bootstrap/issues/23307
73
+ // TODO: we can remove this workaround once https://bugs.webkit.org/show_bug.cgi?id=198959 is resolved
74
+ &::-webkit-date-and-time-value {
75
+ // Multiply line-height by 1em if it has no unit
76
+ height: calc(#{vars.$input-line-height} * 1em);
77
+ }
78
+
79
+ &[type="search"]::-webkit-search-cancel-button {
80
+ // REVIEW: can we use close.svg?
81
+ -webkit-appearance: none;
82
+ }
83
+ }
84
+
85
+ .wy-input-filled {
86
+ --wy-component-background-color: #{colors.$surface-2};
87
+ --wy-component-color: #{colors.$on-surface};
88
+
89
+ background-color: var(--wy-component-background-color);
90
+ color: var(--wy-component-color);
91
+
92
+ border-radius: 1.25rem;
93
+ border-color: var(--wy-component-background-color);
94
+
95
+ &:focus {
96
+ border-color: #{colors.$outline-variant};
97
+ }
98
+ }
99
+
100
+ .wy-is-invalid {
101
+ &, &:focus {
102
+ border-color: colors.$error;
103
+ }
104
+ }
105
+
106
+ .wy-description {
107
+ margin-top: .25rem;
108
+ font-size: vars.$font-size-sm;
109
+ }
110
+
111
+ .wy-input-label {
112
+ display: block;
113
+ margin-bottom: .5rem;
114
+ }
115
+
116
+ .wy-input-group {
117
+ position: relative;
118
+
119
+ // Optional leading icon
120
+ > .wy-icon {
121
+ position: absolute;
122
+ top: 0rem;
123
+ left: 0rem;
124
+ z-index: 4;
125
+
126
+ + .wy-input {
127
+ padding-left: 2.5rem;
128
+ }
129
+ }
130
+
131
+ // Required trailing button
132
+ .wy-button-icon {
133
+ position: absolute;
134
+ top: 0rem;
135
+ right: 0rem;
136
+ z-index: 4;
137
+ border-radius: vars.$input-border-radius;
138
+ background: transparent;
139
+ }
140
+
141
+ .wy-input-filled ~ .wy-button-icon {
142
+ border-radius: 1.25rem;
143
+ }
144
+
145
+ .wy-input {
146
+ padding-right: 2.5rem;
147
+
148
+ &:placeholder-shown {
149
+ ~ .wy-button-icon[type=reset] {
150
+ display: none;
151
+ }
152
+ }
153
+
154
+ &:not(:placeholder-shown) {
155
+ ~ .wy-button-icon[type=reset] + .wy-button-icon {
156
+ display: none;
157
+ }
158
+ }
159
+ }
160
+ }