@weavy/uikit-react 13.0.0 → 14.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. package/changelog.md +24 -0
  2. package/dist/cjs/index.js +3 -3
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/types/components/Chat.d.ts +1 -1
  5. package/dist/cjs/types/components/Messages.d.ts +3 -1
  6. package/dist/cjs/types/hooks/useConversations.d.ts +1 -1
  7. package/dist/cjs/types/hooks/useMutateMessage.d.ts +1 -1
  8. package/dist/cjs/types/hooks/useMutateRead.d.ts +1 -0
  9. package/dist/cjs/types/types/Chat.d.ts +1 -0
  10. package/dist/cjs/types/types/Message.d.ts +2 -0
  11. package/dist/cjs/types/types/types.d.ts +47 -4
  12. package/dist/cjs/types/ui/Spinner.d.ts +2 -1
  13. package/dist/css/weavy-chat.css +1540 -954
  14. package/dist/css/weavy-messenger.css +1901 -1298
  15. package/dist/css/weavy.css +1696 -1093
  16. package/dist/esm/index.js +3 -3
  17. package/dist/esm/index.js.map +1 -1
  18. package/dist/esm/types/components/Chat.d.ts +1 -1
  19. package/dist/esm/types/components/Messages.d.ts +3 -1
  20. package/dist/esm/types/hooks/useConversations.d.ts +1 -1
  21. package/dist/esm/types/hooks/useMutateMessage.d.ts +1 -1
  22. package/dist/esm/types/hooks/useMutateRead.d.ts +1 -0
  23. package/dist/esm/types/types/Chat.d.ts +1 -0
  24. package/dist/esm/types/types/Message.d.ts +2 -0
  25. package/dist/esm/types/types/types.d.ts +47 -4
  26. package/dist/esm/types/ui/Spinner.d.ts +2 -1
  27. package/dist/index.d.ts +2 -1
  28. package/package.json +2 -2
  29. package/src/client/WeavyClient.ts +12 -17
  30. package/src/components/Attachment.tsx +5 -5
  31. package/src/components/Chat.tsx +6 -5
  32. package/src/components/Conversation.tsx +26 -20
  33. package/src/components/ConversationBadge.tsx +7 -5
  34. package/src/components/ConversationForm.tsx +1 -1
  35. package/src/components/ConversationList.tsx +59 -11
  36. package/src/components/ConversationListItem.tsx +71 -54
  37. package/src/components/FileBrowser.tsx +53 -50
  38. package/src/components/MeetingCard.tsx +35 -13
  39. package/src/components/Meetings.tsx +1 -1
  40. package/src/components/Message.tsx +41 -41
  41. package/src/components/Messages.tsx +61 -60
  42. package/src/components/Messenger.tsx +7 -2
  43. package/src/components/NewConversation.tsx +1 -1
  44. package/src/components/PdfViewer.tsx +5 -5
  45. package/src/components/Preview.tsx +2 -2
  46. package/src/components/Reactions.tsx +11 -5
  47. package/src/components/SearchUsers.tsx +19 -9
  48. package/src/components/SeenBy.tsx +13 -7
  49. package/src/components/Typing.tsx +11 -12
  50. package/src/contexts/UserContext.tsx +1 -1
  51. package/src/contexts/WeavyContext.tsx +3 -3
  52. package/src/hooks/useConversations.ts +15 -5
  53. package/src/hooks/useMutateMessage.ts +1 -5
  54. package/src/hooks/useMutateRead.ts +5 -3
  55. package/src/hooks/usePresence.ts +2 -3
  56. package/src/hooks/useReactions.ts +11 -12
  57. package/src/scss/theme/_alert.scss +61 -63
  58. package/src/scss/theme/_appbar.scss +105 -30
  59. package/src/scss/theme/_avatar.scss +23 -28
  60. package/src/scss/theme/_badge.scss +26 -18
  61. package/src/scss/theme/_buttons.scss +107 -52
  62. package/src/scss/theme/_card.scss +102 -4
  63. package/src/scss/theme/_checkbox.scss +16 -20
  64. package/src/scss/theme/_code-vscode-dark.scss +3 -3
  65. package/src/scss/theme/_code-vscode-light.scss +3 -3
  66. package/src/scss/theme/_code.scss +0 -2
  67. package/src/scss/theme/_comment-editor-cm.scss +97 -0
  68. package/src/scss/theme/_comment-editor.scss +129 -0
  69. package/src/scss/theme/_comments.scss +66 -0
  70. package/src/scss/theme/_content.scss +33 -5
  71. package/src/scss/theme/_conversations.scss +19 -78
  72. package/src/scss/theme/_dropdown.scss +102 -15
  73. package/src/scss/theme/_embed.scss +135 -0
  74. package/src/scss/theme/_facepile.scss +11 -0
  75. package/src/scss/theme/_filebrowser.scss +1 -1
  76. package/src/scss/theme/_files.scss +76 -47
  77. package/src/scss/theme/_grid.scss +8 -0
  78. package/src/scss/theme/_icons.scss +155 -19
  79. package/src/scss/theme/_image-grid.scss +7 -10
  80. package/src/scss/theme/_input.scss +160 -0
  81. package/src/scss/theme/_item.scss +169 -0
  82. package/src/scss/theme/_list.scss +57 -0
  83. package/src/scss/theme/_meeting.scss +11 -0
  84. package/src/scss/theme/_message-editor-cm.scss +95 -0
  85. package/src/scss/theme/_message-editor.scss +65 -19
  86. package/src/scss/theme/_messages.scss +51 -105
  87. package/src/scss/theme/_meta.scss +12 -0
  88. package/src/scss/theme/_overlays.scss +31 -76
  89. package/src/scss/theme/_pager.scss +5 -1
  90. package/src/scss/theme/_pane.scss +13 -2
  91. package/src/scss/theme/_panels.scss +33 -28
  92. package/src/scss/theme/_picker-list.scss +5 -3
  93. package/src/scss/theme/_placeholder.scss +19 -0
  94. package/src/scss/theme/_poll.scss +49 -0
  95. package/src/scss/theme/_post-editor-cm.scss +100 -0
  96. package/src/scss/theme/_post-editor.scss +127 -0
  97. package/src/scss/theme/_post.scss +83 -0
  98. package/src/scss/theme/_preview-code.scss +11 -2
  99. package/src/scss/theme/_preview-embed.scss +8 -2
  100. package/src/scss/theme/_preview-image.scss +8 -26
  101. package/src/scss/theme/_preview-media.scss +1 -0
  102. package/src/scss/theme/_preview-pdf.scss +10 -15
  103. package/src/scss/theme/_preview.scss +57 -79
  104. package/src/scss/theme/_reactions.scss +48 -17
  105. package/src/scss/theme/_sheet.scss +59 -0
  106. package/src/scss/theme/_sidebar.scss +86 -0
  107. package/src/scss/theme/_spinner.scss +11 -7
  108. package/src/scss/theme/_tab.scss +72 -0
  109. package/src/scss/theme/_tables.scss +70 -23
  110. package/src/scss/theme/_toasts.scss +56 -26
  111. package/src/scss/theme/_type.scss +41 -0
  112. package/src/scss/theme/{mixins → base}/_backdrop.scss +0 -0
  113. package/src/scss/theme/{bootstrap/mixins → base}/_breakpoints.scss +9 -0
  114. package/src/scss/theme/base/_colors.scss +315 -0
  115. package/src/scss/theme/base/_md.scss +19 -0
  116. package/src/scss/theme/base/_palette.scss +130 -0
  117. package/src/scss/theme/{mixins → base}/_position.scss +5 -5
  118. package/src/scss/theme/base/_reboot.scss +51 -0
  119. package/src/scss/theme/base/_scroll.scss +180 -0
  120. package/src/scss/theme/base/_svg.scss +49 -0
  121. package/src/scss/theme/base/_text.scss +23 -0
  122. package/src/scss/theme/base/_vars.scss +203 -0
  123. package/src/scss/theme/{fonts → base/fonts}/_fontmapping-roboto.scss +0 -0
  124. package/src/scss/theme/{fonts → base/fonts}/_fontmapping-segoe-ui.scss +0 -0
  125. package/src/scss/theme/base/fonts/_index.scss +2 -0
  126. package/src/scss/weavy-chat.scss +10 -4
  127. package/src/scss/weavy-messenger.scss +37 -21
  128. package/src/types/Chat.ts +2 -1
  129. package/src/types/Message.ts +3 -1
  130. package/src/types/types.ts +56 -5
  131. package/src/ui/Icon.tsx +1 -1
  132. package/src/ui/Spinner.tsx +3 -2
  133. package/src/utils/infiniteScroll.js +11 -2
  134. package/src/utils/postal-parent.js +398 -0
  135. package/src/utils/promise.js +187 -0
  136. package/src/utils/scrollbarDetection.js +68 -9
  137. package/src/utils/utils.js +547 -0
  138. package/src/scss/theme/_attachments.scss +0 -74
  139. package/src/scss/theme/_cm-editor.scss +0 -42
  140. package/src/scss/theme/_colors.scss +0 -520
  141. package/src/scss/theme/_config.scss +0 -6
  142. package/src/scss/theme/_inputs.scss +0 -28
  143. package/src/scss/theme/_nav.scss +0 -52
  144. package/src/scss/theme/_palette.scss +0 -165
  145. package/src/scss/theme/_preview-icon.scss +0 -41
  146. package/src/scss/theme/_reboot.scss +0 -41
  147. package/src/scss/theme/_root.scss +0 -2
  148. package/src/scss/theme/_scroll.scss +0 -55
  149. package/src/scss/theme/_search.scss +0 -68
  150. package/src/scss/theme/_turbo.scss +0 -17
  151. package/src/scss/theme/_variables.scss +0 -139
  152. package/src/scss/theme/bootstrap/_accordion.scss +0 -146
  153. package/src/scss/theme/bootstrap/_alert.scss +0 -71
  154. package/src/scss/theme/bootstrap/_badge.scss +0 -38
  155. package/src/scss/theme/bootstrap/_breadcrumb.scss +0 -40
  156. package/src/scss/theme/bootstrap/_button-group.scss +0 -142
  157. package/src/scss/theme/bootstrap/_buttons.scss +0 -186
  158. package/src/scss/theme/bootstrap/_card.scss +0 -234
  159. package/src/scss/theme/bootstrap/_carousel.scss +0 -229
  160. package/src/scss/theme/bootstrap/_close.scss +0 -40
  161. package/src/scss/theme/bootstrap/_containers.scss +0 -41
  162. package/src/scss/theme/bootstrap/_dropdown.scss +0 -248
  163. package/src/scss/theme/bootstrap/_forms.scss +0 -9
  164. package/src/scss/theme/bootstrap/_functions.scss +0 -302
  165. package/src/scss/theme/bootstrap/_grid.scss +0 -33
  166. package/src/scss/theme/bootstrap/_helpers.scss +0 -10
  167. package/src/scss/theme/bootstrap/_images.scss +0 -42
  168. package/src/scss/theme/bootstrap/_list-group.scss +0 -191
  169. package/src/scss/theme/bootstrap/_maps.scss +0 -54
  170. package/src/scss/theme/bootstrap/_mixins.scss +0 -43
  171. package/src/scss/theme/bootstrap/_modal.scss +0 -237
  172. package/src/scss/theme/bootstrap/_nav.scss +0 -172
  173. package/src/scss/theme/bootstrap/_navbar.scss +0 -276
  174. package/src/scss/theme/bootstrap/_offcanvas.scss +0 -143
  175. package/src/scss/theme/bootstrap/_pagination.scss +0 -109
  176. package/src/scss/theme/bootstrap/_placeholders.scss +0 -51
  177. package/src/scss/theme/bootstrap/_popover.scss +0 -196
  178. package/src/scss/theme/bootstrap/_progress.scss +0 -59
  179. package/src/scss/theme/bootstrap/_reboot.scss +0 -610
  180. package/src/scss/theme/bootstrap/_root.scss +0 -73
  181. package/src/scss/theme/bootstrap/_spinners.scss +0 -85
  182. package/src/scss/theme/bootstrap/_tables.scss +0 -164
  183. package/src/scss/theme/bootstrap/_toasts.scss +0 -70
  184. package/src/scss/theme/bootstrap/_tooltip.scss +0 -120
  185. package/src/scss/theme/bootstrap/_transitions.scss +0 -27
  186. package/src/scss/theme/bootstrap/_type.scss +0 -106
  187. package/src/scss/theme/bootstrap/_utilities.scss +0 -647
  188. package/src/scss/theme/bootstrap/_variables.scss +0 -1633
  189. package/src/scss/theme/bootstrap/forms/_floating-labels.scss +0 -74
  190. package/src/scss/theme/bootstrap/forms/_form-check.scss +0 -175
  191. package/src/scss/theme/bootstrap/forms/_form-control.scss +0 -194
  192. package/src/scss/theme/bootstrap/forms/_form-range.scss +0 -91
  193. package/src/scss/theme/bootstrap/forms/_form-select.scss +0 -71
  194. package/src/scss/theme/bootstrap/forms/_form-text.scss +0 -11
  195. package/src/scss/theme/bootstrap/forms/_input-group.scss +0 -129
  196. package/src/scss/theme/bootstrap/forms/_labels.scss +0 -36
  197. package/src/scss/theme/bootstrap/forms/_validation.scss +0 -12
  198. package/src/scss/theme/bootstrap/helpers/_clearfix.scss +0 -3
  199. package/src/scss/theme/bootstrap/helpers/_color-bg.scss +0 -10
  200. package/src/scss/theme/bootstrap/helpers/_colored-links.scss +0 -12
  201. package/src/scss/theme/bootstrap/helpers/_position.scss +0 -36
  202. package/src/scss/theme/bootstrap/helpers/_ratio.scss +0 -26
  203. package/src/scss/theme/bootstrap/helpers/_stacks.scss +0 -15
  204. package/src/scss/theme/bootstrap/helpers/_stretched-link.scss +0 -15
  205. package/src/scss/theme/bootstrap/helpers/_text-truncation.scss +0 -7
  206. package/src/scss/theme/bootstrap/helpers/_visually-hidden.scss +0 -8
  207. package/src/scss/theme/bootstrap/helpers/_vr.scss +0 -8
  208. package/src/scss/theme/bootstrap/mixins/_alert.scss +0 -15
  209. package/src/scss/theme/bootstrap/mixins/_backdrop.scss +0 -14
  210. package/src/scss/theme/bootstrap/mixins/_banner.scss +0 -9
  211. package/src/scss/theme/bootstrap/mixins/_border-radius.scss +0 -78
  212. package/src/scss/theme/bootstrap/mixins/_box-shadow.scss +0 -18
  213. package/src/scss/theme/bootstrap/mixins/_buttons.scss +0 -70
  214. package/src/scss/theme/bootstrap/mixins/_caret.scss +0 -64
  215. package/src/scss/theme/bootstrap/mixins/_clearfix.scss +0 -9
  216. package/src/scss/theme/bootstrap/mixins/_color-scheme.scss +0 -7
  217. package/src/scss/theme/bootstrap/mixins/_container.scss +0 -11
  218. package/src/scss/theme/bootstrap/mixins/_deprecate.scss +0 -10
  219. package/src/scss/theme/bootstrap/mixins/_forms.scss +0 -152
  220. package/src/scss/theme/bootstrap/mixins/_gradients.scss +0 -47
  221. package/src/scss/theme/bootstrap/mixins/_grid.scss +0 -151
  222. package/src/scss/theme/bootstrap/mixins/_image.scss +0 -16
  223. package/src/scss/theme/bootstrap/mixins/_list-group.scss +0 -24
  224. package/src/scss/theme/bootstrap/mixins/_lists.scss +0 -7
  225. package/src/scss/theme/bootstrap/mixins/_pagination.scss +0 -10
  226. package/src/scss/theme/bootstrap/mixins/_reset-text.scss +0 -17
  227. package/src/scss/theme/bootstrap/mixins/_resize.scss +0 -6
  228. package/src/scss/theme/bootstrap/mixins/_table-variants.scss +0 -24
  229. package/src/scss/theme/bootstrap/mixins/_text-truncate.scss +0 -8
  230. package/src/scss/theme/bootstrap/mixins/_transition.scss +0 -26
  231. package/src/scss/theme/bootstrap/mixins/_utilities.scss +0 -97
  232. package/src/scss/theme/bootstrap/mixins/_visually-hidden.scss +0 -29
  233. package/src/scss/theme/bootstrap/utilities/_api.scss +0 -47
  234. package/src/scss/theme/bootstrap/vendor/_rfs.scss +0 -354
  235. package/src/scss/theme/bs/_badge.scss +0 -20
  236. package/src/scss/theme/bs/_buttons.scss +0 -185
  237. package/src/scss/theme/bs/_dropdown.scss +0 -86
  238. package/src/scss/theme/bs/_forms.scss +0 -161
  239. package/src/scss/theme/bs/_list-group.scss +0 -73
  240. package/src/scss/theme/bs/_tables.scss +0 -46
  241. package/src/scss/theme/fonts/_index.scss +0 -2
  242. package/src/scss/theme/mixins/_palette.scss +0 -165
  243. package/src/scss/theme/mixins/_scrollbar.scss +0 -110
@@ -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,105 +26,127 @@
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
151
  display: table-header-group;
123
152
  }
@@ -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
+ }