@weavy/uikit-react 11.0.1 → 12.1.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 (242) hide show
  1. package/.github/workflows/publish.yml +1 -1
  2. package/README.md +3 -4
  3. package/changelog.md +30 -0
  4. package/dist/cjs/index.js +6 -6
  5. package/dist/cjs/index.js.map +1 -1
  6. package/dist/cjs/types/client/WeavyClient.d.ts +1 -1
  7. package/dist/cjs/types/components/Image.d.ts +2 -0
  8. package/dist/cjs/types/components/PdfViewer.d.ts +6 -0
  9. package/dist/cjs/types/components/Preview.d.ts +58 -0
  10. package/dist/cjs/types/contexts/MessengerContext.d.ts +1 -2
  11. package/dist/cjs/types/hooks/useUser.d.ts +2 -1
  12. package/dist/cjs/types/types/Messenger.d.ts +0 -1
  13. package/dist/cjs/types/types/types.d.ts +11 -6
  14. package/dist/cjs/types/utils/fileUtilities.d.ts +16 -1
  15. package/dist/css/weavy-chat.css +2684 -0
  16. package/dist/css/weavy-messenger.css +3039 -0
  17. package/dist/css/weavy.css +3039 -0
  18. package/dist/esm/index.js +6 -6
  19. package/dist/esm/index.js.map +1 -1
  20. package/dist/esm/types/client/WeavyClient.d.ts +1 -1
  21. package/dist/esm/types/components/Image.d.ts +2 -0
  22. package/dist/esm/types/components/PdfViewer.d.ts +6 -0
  23. package/dist/esm/types/components/Preview.d.ts +58 -0
  24. package/dist/esm/types/contexts/MessengerContext.d.ts +1 -2
  25. package/dist/esm/types/hooks/useUser.d.ts +2 -1
  26. package/dist/esm/types/types/Messenger.d.ts +0 -1
  27. package/dist/esm/types/types/types.d.ts +11 -6
  28. package/dist/esm/types/utils/fileUtilities.d.ts +16 -1
  29. package/dist/index.d.ts +2 -3
  30. package/package.json +14 -4
  31. package/rollup.config.js +0 -2
  32. package/src/client/WeavyClient.ts +3 -3
  33. package/src/components/Attachment.tsx +5 -6
  34. package/src/components/Avatar.tsx +2 -3
  35. package/src/components/Chat.tsx +10 -14
  36. package/src/components/Conversation.tsx +21 -30
  37. package/src/components/ConversationBadge.tsx +1 -2
  38. package/src/components/ConversationForm.tsx +11 -18
  39. package/src/components/ConversationList.tsx +4 -5
  40. package/src/components/ConversationListItem.tsx +13 -15
  41. package/src/components/FileBrowser.tsx +2 -3
  42. package/src/components/Image.tsx +39 -7
  43. package/src/components/MeetingCard.tsx +7 -8
  44. package/src/components/Message.tsx +12 -13
  45. package/src/components/Messages.tsx +19 -19
  46. package/src/components/Messenger.tsx +5 -6
  47. package/src/components/NewConversation.tsx +5 -7
  48. package/src/components/PdfViewer.tsx +271 -0
  49. package/src/components/Presence.tsx +2 -2
  50. package/src/components/Preview.tsx +294 -0
  51. package/src/components/Reactions.tsx +8 -8
  52. package/src/components/SearchUsers.tsx +18 -17
  53. package/src/components/SeenBy.tsx +1 -2
  54. package/src/components/Typing.tsx +4 -4
  55. package/src/contexts/MessengerContext.tsx +4 -12
  56. package/src/contexts/PreviewContext.tsx +4 -6
  57. package/src/contexts/WeavyContext.tsx +8 -1
  58. package/src/hooks/useBadge.ts +1 -1
  59. package/src/hooks/useChat.ts +1 -1
  60. package/src/hooks/useConversation.ts +1 -2
  61. package/src/hooks/useConversations.ts +1 -1
  62. package/src/hooks/useFileUploader.ts +5 -1
  63. package/src/hooks/useMembers.ts +1 -1
  64. package/src/hooks/useMessages.ts +1 -1
  65. package/src/hooks/useMutateChat.ts +1 -1
  66. package/src/hooks/useMutateConversation.ts +1 -1
  67. package/src/hooks/useMutateConversationName.ts +1 -1
  68. package/src/hooks/useMutateDeleteReaction.ts +1 -1
  69. package/src/hooks/useMutateExternalBlobs.ts +1 -1
  70. package/src/hooks/useMutateMeeting.ts +1 -1
  71. package/src/hooks/useMutateMembers.ts +1 -1
  72. package/src/hooks/useMutateMessage.ts +2 -1
  73. package/src/hooks/useMutatePinned.ts +1 -1
  74. package/src/hooks/useMutateReaction.ts +1 -1
  75. package/src/hooks/useMutateRead.ts +1 -1
  76. package/src/hooks/useMutateRemoveMembers.ts +1 -1
  77. package/src/hooks/useMutateTyping.ts +1 -1
  78. package/src/hooks/usePresence.ts +8 -5
  79. package/src/hooks/useReactions.ts +0 -1
  80. package/src/hooks/useSearchUsers.ts +1 -1
  81. package/src/hooks/useUser.ts +4 -3
  82. package/src/index.ts +2 -2
  83. package/src/scss/theme/_alert.scss +73 -0
  84. package/src/scss/theme/_appbar.scss +112 -0
  85. package/src/scss/theme/_attachments.scss +74 -0
  86. package/src/scss/theme/_avatar.scss +54 -0
  87. package/src/scss/theme/_badge.scss +47 -0
  88. package/src/scss/theme/_buttons.scss +96 -0
  89. package/src/scss/theme/_card.scss +7 -0
  90. package/src/scss/theme/_checkbox.scss +56 -0
  91. package/src/scss/theme/_cm-editor.scss +42 -0
  92. package/src/scss/theme/_code.scss +115 -0
  93. package/src/scss/theme/_colors.scss +520 -0
  94. package/src/scss/theme/_config.scss +6 -0
  95. package/src/scss/theme/_content.scss +15 -0
  96. package/src/scss/theme/_conversations.scss +91 -0
  97. package/src/scss/theme/_dropdown.scss +86 -0
  98. package/src/scss/theme/_emoji.scss +5 -0
  99. package/src/scss/theme/_filebrowser.scss +26 -0
  100. package/src/scss/theme/_files.scss +140 -0
  101. package/src/scss/theme/_icons.scss +62 -0
  102. package/src/scss/theme/_image-grid.scss +63 -0
  103. package/src/scss/theme/_inputs.scss +28 -0
  104. package/src/scss/theme/_message-editor.scss +90 -0
  105. package/src/scss/theme/_messages.scss +238 -0
  106. package/src/scss/theme/_nav.scss +52 -0
  107. package/src/scss/theme/_overlays.scss +157 -0
  108. package/src/scss/theme/_pager.scss +19 -0
  109. package/src/scss/theme/_palette.scss +165 -0
  110. package/src/scss/theme/_pane.scss +16 -0
  111. package/src/scss/theme/_panels.scss +137 -0
  112. package/src/scss/theme/_picker-list.scss +37 -0
  113. package/src/scss/theme/_preview-embed.scss +38 -0
  114. package/src/scss/theme/_preview-html.scss +7 -0
  115. package/src/scss/theme/_preview-icon.scss +41 -0
  116. package/src/scss/theme/_preview-image.scss +86 -0
  117. package/src/scss/theme/_preview-media.scss +28 -0
  118. package/src/scss/theme/_preview-pdf.scss +838 -0
  119. package/src/scss/theme/_preview-text.scss +5 -0
  120. package/src/scss/theme/_preview.scss +105 -0
  121. package/src/scss/theme/_reactions.scss +58 -0
  122. package/src/scss/theme/_reboot.scss +41 -0
  123. package/src/scss/theme/_root.scss +2 -0
  124. package/src/scss/theme/_scroll.scss +55 -0
  125. package/src/scss/theme/_search.scss +68 -0
  126. package/src/scss/theme/_spinner.scss +63 -0
  127. package/src/scss/theme/_tables.scss +53 -0
  128. package/src/scss/theme/_toasts.scss +47 -0
  129. package/src/scss/theme/_turbo.scss +17 -0
  130. package/src/scss/theme/_typing.scss +26 -0
  131. package/src/scss/theme/_variables.scss +139 -0
  132. package/src/scss/theme/bootstrap/_accordion.scss +146 -0
  133. package/src/scss/theme/bootstrap/_alert.scss +71 -0
  134. package/src/scss/theme/bootstrap/_badge.scss +38 -0
  135. package/src/scss/theme/bootstrap/_breadcrumb.scss +40 -0
  136. package/src/scss/theme/bootstrap/_button-group.scss +142 -0
  137. package/src/scss/theme/bootstrap/_buttons.scss +186 -0
  138. package/src/scss/theme/bootstrap/_card.scss +234 -0
  139. package/src/scss/theme/bootstrap/_carousel.scss +229 -0
  140. package/src/scss/theme/bootstrap/_close.scss +40 -0
  141. package/src/scss/theme/bootstrap/_containers.scss +41 -0
  142. package/src/scss/theme/bootstrap/_dropdown.scss +248 -0
  143. package/src/scss/theme/bootstrap/_forms.scss +9 -0
  144. package/src/scss/theme/bootstrap/_functions.scss +302 -0
  145. package/src/scss/theme/bootstrap/_grid.scss +33 -0
  146. package/src/scss/theme/bootstrap/_helpers.scss +10 -0
  147. package/src/scss/theme/bootstrap/_images.scss +42 -0
  148. package/src/scss/theme/bootstrap/_list-group.scss +191 -0
  149. package/src/scss/theme/bootstrap/_maps.scss +54 -0
  150. package/src/scss/theme/bootstrap/_mixins.scss +43 -0
  151. package/src/scss/theme/bootstrap/_modal.scss +237 -0
  152. package/src/scss/theme/bootstrap/_nav.scss +172 -0
  153. package/src/scss/theme/bootstrap/_navbar.scss +276 -0
  154. package/src/scss/theme/bootstrap/_offcanvas.scss +143 -0
  155. package/src/scss/theme/bootstrap/_pagination.scss +109 -0
  156. package/src/scss/theme/bootstrap/_placeholders.scss +51 -0
  157. package/src/scss/theme/bootstrap/_popover.scss +196 -0
  158. package/src/scss/theme/bootstrap/_progress.scss +59 -0
  159. package/src/scss/theme/bootstrap/_reboot.scss +610 -0
  160. package/src/scss/theme/bootstrap/_root.scss +73 -0
  161. package/src/scss/theme/bootstrap/_spinners.scss +85 -0
  162. package/src/scss/theme/bootstrap/_tables.scss +164 -0
  163. package/src/scss/theme/bootstrap/_toasts.scss +70 -0
  164. package/src/scss/theme/bootstrap/_tooltip.scss +120 -0
  165. package/src/scss/theme/bootstrap/_transitions.scss +27 -0
  166. package/src/scss/theme/bootstrap/_type.scss +106 -0
  167. package/src/scss/theme/bootstrap/_utilities.scss +647 -0
  168. package/src/scss/theme/bootstrap/_variables.scss +1633 -0
  169. package/src/scss/theme/bootstrap/forms/_floating-labels.scss +74 -0
  170. package/src/scss/theme/bootstrap/forms/_form-check.scss +175 -0
  171. package/src/scss/theme/bootstrap/forms/_form-control.scss +194 -0
  172. package/src/scss/theme/bootstrap/forms/_form-range.scss +91 -0
  173. package/src/scss/theme/bootstrap/forms/_form-select.scss +71 -0
  174. package/src/scss/theme/bootstrap/forms/_form-text.scss +11 -0
  175. package/src/scss/theme/bootstrap/forms/_input-group.scss +129 -0
  176. package/src/scss/theme/bootstrap/forms/_labels.scss +36 -0
  177. package/src/scss/theme/bootstrap/forms/_validation.scss +12 -0
  178. package/src/scss/theme/bootstrap/helpers/_clearfix.scss +3 -0
  179. package/src/scss/theme/bootstrap/helpers/_color-bg.scss +10 -0
  180. package/src/scss/theme/bootstrap/helpers/_colored-links.scss +12 -0
  181. package/src/scss/theme/bootstrap/helpers/_position.scss +36 -0
  182. package/src/scss/theme/bootstrap/helpers/_ratio.scss +26 -0
  183. package/src/scss/theme/bootstrap/helpers/_stacks.scss +15 -0
  184. package/src/scss/theme/bootstrap/helpers/_stretched-link.scss +15 -0
  185. package/src/scss/theme/bootstrap/helpers/_text-truncation.scss +7 -0
  186. package/src/scss/theme/bootstrap/helpers/_visually-hidden.scss +8 -0
  187. package/src/scss/theme/bootstrap/helpers/_vr.scss +8 -0
  188. package/src/scss/theme/bootstrap/mixins/_alert.scss +15 -0
  189. package/src/scss/theme/bootstrap/mixins/_backdrop.scss +14 -0
  190. package/src/scss/theme/bootstrap/mixins/_banner.scss +9 -0
  191. package/src/scss/theme/bootstrap/mixins/_border-radius.scss +78 -0
  192. package/src/scss/theme/bootstrap/mixins/_box-shadow.scss +18 -0
  193. package/src/scss/theme/bootstrap/mixins/_breakpoints.scss +127 -0
  194. package/src/scss/theme/bootstrap/mixins/_buttons.scss +70 -0
  195. package/src/scss/theme/bootstrap/mixins/_caret.scss +64 -0
  196. package/src/scss/theme/bootstrap/mixins/_clearfix.scss +9 -0
  197. package/src/scss/theme/bootstrap/mixins/_color-scheme.scss +7 -0
  198. package/src/scss/theme/bootstrap/mixins/_container.scss +11 -0
  199. package/src/scss/theme/bootstrap/mixins/_deprecate.scss +10 -0
  200. package/src/scss/theme/bootstrap/mixins/_forms.scss +152 -0
  201. package/src/scss/theme/bootstrap/mixins/_gradients.scss +47 -0
  202. package/src/scss/theme/bootstrap/mixins/_grid.scss +151 -0
  203. package/src/scss/theme/bootstrap/mixins/_image.scss +16 -0
  204. package/src/scss/theme/bootstrap/mixins/_list-group.scss +24 -0
  205. package/src/scss/theme/bootstrap/mixins/_lists.scss +7 -0
  206. package/src/scss/theme/bootstrap/mixins/_pagination.scss +10 -0
  207. package/src/scss/theme/bootstrap/mixins/_reset-text.scss +17 -0
  208. package/src/scss/theme/bootstrap/mixins/_resize.scss +6 -0
  209. package/src/scss/theme/bootstrap/mixins/_table-variants.scss +24 -0
  210. package/src/scss/theme/bootstrap/mixins/_text-truncate.scss +8 -0
  211. package/src/scss/theme/bootstrap/mixins/_transition.scss +26 -0
  212. package/src/scss/theme/bootstrap/mixins/_utilities.scss +97 -0
  213. package/src/scss/theme/bootstrap/mixins/_visually-hidden.scss +29 -0
  214. package/src/scss/theme/bootstrap/utilities/_api.scss +47 -0
  215. package/src/scss/theme/bootstrap/vendor/_rfs.scss +354 -0
  216. package/src/scss/theme/bs/_badge.scss +20 -0
  217. package/src/scss/theme/bs/_buttons.scss +185 -0
  218. package/src/scss/theme/bs/_dropdown.scss +86 -0
  219. package/src/scss/theme/bs/_forms.scss +161 -0
  220. package/src/scss/theme/bs/_list-group.scss +73 -0
  221. package/src/scss/theme/bs/_tables.scss +46 -0
  222. package/src/scss/theme/fonts/_fontmapping-roboto.scss +129 -0
  223. package/src/scss/theme/fonts/_fontmapping-segoe-ui.scss +127 -0
  224. package/src/scss/theme/fonts/_index.scss +2 -0
  225. package/src/scss/theme/mixins/_backdrop.scss +13 -0
  226. package/src/scss/theme/mixins/_palette.scss +165 -0
  227. package/src/scss/theme/mixins/_position.scss +33 -0
  228. package/src/scss/theme/mixins/_scrollbar.scss +110 -0
  229. package/src/scss/weavy-chat.scss +31 -0
  230. package/src/scss/weavy-messenger.scss +60 -0
  231. package/src/scss/weavy.scss +2 -0
  232. package/src/types/Messenger.ts +1 -1
  233. package/src/types/types.ts +14 -9
  234. package/src/ui/Button.tsx +3 -4
  235. package/src/ui/Dropdown.tsx +4 -5
  236. package/src/ui/Icon.tsx +75 -39
  237. package/src/ui/Overlay.tsx +2 -3
  238. package/src/utils/fileUtilities.ts +280 -72
  239. package/src/utils/scrollbarDetection.js +48 -0
  240. package/dist/cjs/types/utils/styles.d.ts +0 -17
  241. package/dist/esm/types/utils/styles.d.ts +0 -17
  242. package/src/utils/styles.ts +0 -42
@@ -0,0 +1,238 @@
1
+ @use "sass:color";
2
+ @use "config" as *;
3
+ @use "reactions";
4
+
5
+ .wy-messages {
6
+ padding: 1rem 1rem 0 .75rem;
7
+ flex: 1 1 100%;
8
+
9
+ }
10
+
11
+ .wy-message-placeholder {
12
+ opacity: .5;
13
+ }
14
+
15
+ .wy-date-separator {
16
+ font-size: $font-size-xs;
17
+ pointer-events: none;
18
+ margin: .5rem;
19
+ text-align: center;
20
+ position: sticky;
21
+ top: 1.5rem;
22
+ z-index: 2;
23
+
24
+ time {
25
+ background: $light;
26
+ padding: .25rem .5rem;
27
+ border-radius: $border-radius;
28
+ display: inline-block;
29
+ }
30
+ }
31
+
32
+ .wy-appbars + .wy-pane-body .wy-date-separator {
33
+ top: $appbar-height + 1.5rem;
34
+ }
35
+
36
+
37
+ .wy-message {
38
+ display: flex;
39
+ flex-direction: row;
40
+ align-items: flex-start;
41
+ margin-bottom: 1rem;
42
+
43
+ .wy-image-grid,
44
+ .wy-attachments {
45
+ border-radius: $border-radius-lg;
46
+ }
47
+
48
+ &:hover {
49
+ .wy-message-buttons {
50
+ opacity: 1;
51
+ }
52
+ }
53
+
54
+ .wy-reaction-menu {
55
+ right: 0;
56
+ }
57
+ }
58
+
59
+ .wy-message-meta {
60
+ font-size: $font-size-xs;
61
+ margin: 0 0 .25rem .25rem;
62
+ color: $text-muted;
63
+ }
64
+
65
+ .wy-message-bubble {
66
+ background-color: $gray-50;
67
+ border-radius: $border-radius-xl;
68
+ display: flex; //inline-block;
69
+ flex-direction: row;
70
+ flex-wrap: wrap;
71
+ padding: .75rem;
72
+ max-width: min(32rem, calc(100% - 2rem));
73
+ min-width: 10rem;
74
+
75
+ > div {
76
+ // message section (images, attachments, embeds etc.)
77
+ margin-bottom: .5rem;
78
+ flex: 1 1 100%;
79
+
80
+ &:last-of-type {
81
+ margin-bottom: 0;
82
+ }
83
+ }
84
+ }
85
+
86
+ .wy-message-text {
87
+ overflow-wrap: break-word;
88
+ min-width: 0;
89
+
90
+ // inline code
91
+ :not(pre) > code {
92
+ overflow-wrap: inherit;
93
+ }
94
+
95
+ // code block
96
+ pre, pre > code {
97
+ white-space: pre-wrap;
98
+ }
99
+
100
+ :last-child {
101
+ margin-bottom: 0;
102
+ }
103
+
104
+ &:empty {
105
+ display: none;
106
+ }
107
+ }
108
+
109
+ .wy-message-author {
110
+ margin: 1.375rem .5rem 0 0;
111
+ }
112
+
113
+ .wy-message-content {
114
+ display: flex;
115
+ flex-direction: column;
116
+ width: 100%;
117
+ align-items: flex-start;
118
+ flex-wrap: wrap;
119
+ min-width: 0;
120
+ position: relative; // so that we can position reactions
121
+
122
+ .wy-reactions {
123
+ position: absolute;
124
+ bottom: -.75rem;
125
+ left: .75rem;
126
+ background: $gray-50;
127
+ border-radius: 1.5rem;
128
+ border: $border-width solid $gray-50;
129
+ padding: .125rem;
130
+ }
131
+ }
132
+
133
+ .wy-message-content-row {
134
+ display: flex;
135
+ flex-direction: row;
136
+ align-items: center;
137
+ max-width: 100%;
138
+ }
139
+
140
+ .wy-message-buttons {
141
+ display: flex;
142
+ flex-direction: row;
143
+ column-gap: .25rem;
144
+ margin: .25rem;
145
+ opacity: 0;
146
+ }
147
+
148
+ // override some styles for message by current user
149
+ .wy-message-me {
150
+ margin-right: 0;
151
+ margin-left: 2.5rem;
152
+ align-items: flex-end;
153
+
154
+ .wy-message-meta {
155
+ margin: 0 .25rem .25rem 0;
156
+ }
157
+
158
+ .wy-message-content {
159
+ align-items: flex-end;
160
+ }
161
+
162
+ .wy-message-content-row {
163
+ flex-direction: row-reverse;
164
+ }
165
+
166
+ .wy-message-buttons {
167
+ flex-direction: row-reverse;
168
+ }
169
+
170
+ .wy-message-bubble {
171
+ background-color: $primary-50;
172
+ }
173
+
174
+ .wy-reaction-menu {
175
+ justify-content: flex-start;
176
+ right: auto;
177
+ }
178
+
179
+ .wy-reactions {
180
+ background: $primary-50;
181
+ border-color: $primary-50;
182
+ left: auto;
183
+ right: .75rem;
184
+ }
185
+ }
186
+
187
+ // override some styles for message that contains only emoji
188
+ .wy-message-emoji {
189
+ .wy-message-bubble {
190
+ background: none;
191
+ padding: 0;
192
+ }
193
+
194
+ .wy-message-text {
195
+ .wy-emoji {
196
+ width: 3rem;
197
+ height: 3rem;
198
+ margin: 0;
199
+ }
200
+ }
201
+ }
202
+
203
+ // message status indicator (sending, sent, delivered, read)
204
+ .wy-readby-status {
205
+ display: flex;
206
+ justify-content: flex-end;
207
+ margin-top: -.5rem;
208
+ margin-bottom: .75rem;
209
+
210
+ > * {
211
+ margin-left: .25rem;
212
+ }
213
+ }
214
+
215
+ .wy-message-toaster {
216
+ position: sticky;
217
+ top: 3.5rem;
218
+ bottom: 3.5rem;
219
+ cursor: pointer;
220
+ z-index: 3;
221
+ border-radius: 50rem;
222
+ background-color: $primary;
223
+ color: $white;
224
+ padding: .5rem 1rem;
225
+ margin-left: auto;
226
+ margin-right: auto;
227
+ margin-bottom: .5rem;
228
+ font-size: $font-size-sm;
229
+ width: max-content;
230
+ align-self: center;
231
+ text-align: center;
232
+ color: $white;
233
+ }
234
+
235
+ .wy-message-readmore {
236
+ justify-self: center;
237
+ text-align: center;
238
+ }
@@ -0,0 +1,52 @@
1
+ @use "variables" as *;
2
+
3
+ .wy-nav-tabs {
4
+ border-bottom: none;
5
+ padding: 0 .5rem;
6
+
7
+ .wy-nav-link {
8
+ margin-bottom: 0;
9
+ border: none;
10
+ border-bottom: .125rem solid transparent;
11
+ text-transform: uppercase;
12
+ font-size: $font-size-xs;
13
+ font-weight: $font-weight-bold;
14
+ letter-spacing: .05em;
15
+
16
+ &:hover,
17
+ &:focus {
18
+ border-color: transparent;
19
+ }
20
+
21
+ &.wy-disabled {
22
+ background-color: transparent;
23
+ border-color: transparent;
24
+ }
25
+
26
+ &.wy-active {
27
+ color: $link-color;
28
+ background-color: transparent;
29
+ border-color: $link-color;
30
+ }
31
+ }
32
+ }
33
+
34
+ .wy-nav-dark {
35
+ .wy-nav-link, .wy-button-link {
36
+ color: $navbar-dark-color;
37
+
38
+ &.wy-active {
39
+ color: $navbar-dark-active-color;
40
+ border-color: $navbar-dark-active-color;
41
+ }
42
+
43
+ &:hover,
44
+ &:focus {
45
+ color: $navbar-dark-hover-color;
46
+ }
47
+
48
+ &.wy-disabled {
49
+ color: $navbar-dark-disabled-color;
50
+ }
51
+ }
52
+ }
@@ -0,0 +1,157 @@
1
+ @use "config" as *;
2
+
3
+ .wy-viewport {
4
+ position: fixed;
5
+ top: 0;
6
+ right: 0;
7
+ bottom: 0;
8
+ left: 0;
9
+ z-index: 2147483647; /* max possible z-index */;
10
+ pointer-events: none;
11
+ }
12
+
13
+ // Overlays
14
+
15
+ .wy-overlays {
16
+ pointer-events: none;
17
+ width: auto;
18
+ left: 0;
19
+ top: 0;
20
+ right: 0;
21
+ bottom: 0;
22
+ max-width: none;
23
+ display: flex;
24
+ align-items: center;
25
+ justify-content: center;
26
+ transform-style: preserve-3d;
27
+ overflow-y: initial;
28
+ overflow-x: initial;
29
+ perspective: 100rem;
30
+ perspective-origin: center center;
31
+
32
+ .wy-panel {
33
+ background-color: rgba(mix($white, #FFF), $opacity-backdrop);
34
+ //max-height: 100vh; // Causes height error in safari
35
+
36
+ &:not(.wy-transition) {
37
+ transform: translateZ(-4rem) !important;
38
+ }
39
+
40
+ .wy-controls {
41
+ position: absolute;
42
+ border-bottom: none;
43
+ flex-direction: row;
44
+ transition: opacity .1s .2s step-end;
45
+
46
+
47
+ .wy-icon {
48
+ color: $icon-color;
49
+ }
50
+ }
51
+
52
+ &.wy-loaded {
53
+ .wy-controls {
54
+ pointer-events: none;
55
+ opacity: 0;
56
+ }
57
+ }
58
+
59
+ .wy-panel-frame {
60
+ background-color: transparent;
61
+ }
62
+
63
+ &.wy-controls-light {
64
+ .wy-icon {
65
+ color: $icon-color;
66
+ }
67
+ }
68
+
69
+ &.wy-light {
70
+ background-color: rgba(mix($white, #FFF), $opacity-backdrop);
71
+
72
+ .wy-icon {
73
+ color: $icon-color;
74
+ }
75
+ }
76
+
77
+ &.wy-controls-dark {
78
+ .wy-icon {
79
+ color: $navbar-dark-color;
80
+
81
+ &:hover, &:focus {
82
+ color: $navbar-dark-hover-color;
83
+ }
84
+
85
+ &:active {
86
+ color: $navbar-dark-active-color;
87
+ }
88
+ }
89
+ }
90
+
91
+ &.wy-dark {
92
+ background-color: rgba(mix($dark, #000), $opacity-backdrop);
93
+
94
+ .wy-icon {
95
+ color: $navbar-dark-color;
96
+
97
+ &:hover, &:focus {
98
+ color: $navbar-dark-hover-color;
99
+ }
100
+
101
+ &:active {
102
+ color: $navbar-dark-active-color;
103
+ }
104
+ }
105
+
106
+ &.wy-open[data-title]::before {
107
+ background: rgba($dark, $opacity-backdrop);
108
+ color: $navbar-dark-color;
109
+ border-bottom: $border-width #000 solid;
110
+ }
111
+ }
112
+
113
+ &.wy-floating {
114
+ @include media-breakpoint-up(md, $grid-breakpoints) {
115
+ left: 1rem;
116
+ top: 1rem;
117
+ right: 1rem;
118
+ bottom: 1rem;
119
+ border-radius: .1875rem;
120
+ box-shadow: $md-shadow-16dp;
121
+ &:not(.wy-scroll-y) {
122
+ overflow: hidden;
123
+ }
124
+ }
125
+ }
126
+
127
+ &.wy-modal {
128
+ background-color: rgba(mix($white, #FFF), $opacity-backdrop);
129
+
130
+ @include media-breakpoint-up(md, $grid-breakpoints) {
131
+ left: auto;
132
+ right: auto;
133
+ top: 2rem;
134
+ bottom: 3.2rem;
135
+ margin-left: 4rem;
136
+ margin-top: auto;
137
+ margin-right: 4rem;
138
+ margin-bottom: auto;
139
+ border-radius: .25rem;
140
+ box-shadow: $md-shadow-16dp;
141
+ width: 32rem;
142
+ max-height: 32rem;
143
+ &:not(.wy-scroll-y) {
144
+ overflow: hidden;
145
+ }
146
+ }
147
+ }
148
+
149
+ &.wy-loading {
150
+ .wy-controls {
151
+ transition: opacity $md-animation-duration $md-animation-curve-default;
152
+ //transition: opacity .2s .2s variables.$md-animation-curve-default;
153
+ opacity: 1;
154
+ }
155
+ }
156
+ }
157
+ }
@@ -0,0 +1,19 @@
1
+ .wy-pager {
2
+ pointer-events: none;
3
+ }
4
+
5
+ a.wy-pager {
6
+ display: block;
7
+ text-align: center;
8
+ margin: 1rem auto;
9
+ }
10
+
11
+ tr.wy-pager td {
12
+ text-align: center;
13
+ border: 0;
14
+
15
+ .wy-spinner {
16
+ display: inline;
17
+ margin: 1rem auto;
18
+ }
19
+ }
@@ -0,0 +1,165 @@
1
+ @use "sass:map";
2
+ @use "sass:list";
3
+ @use "sass:string";
4
+ @use "sass:math";
5
+ @use "sass:color";
6
+
7
+ // RYB COLOR WHEEL
8
+ // HSL mapping based on http://computergraphics.stackexchange.com/questions/1748/function-to-convert-hsv-angle-to-ryb-angle
9
+ // Matching bootstrap and MD colors
10
+ $color-names: (
11
+ "red": null,
12
+ "deep-orange": null,
13
+ "orange": null,
14
+ "amber": null,
15
+ "yellow": null,
16
+ "lime": null,
17
+ "light-green": null,
18
+ "green": null,
19
+ "teal": null,
20
+ "cyan": null,
21
+ "light-blue": null,
22
+ "blue": null,
23
+ "indigo": null,
24
+ "deep-purple": null,
25
+ "purple": null,
26
+ "pink": null
27
+ ) !default;
28
+
29
+ // Matching MD shades
30
+ // Added 950 for dark theme compatibility
31
+ $color-shades: (
32
+ "50": 95,
33
+ "100": 90,
34
+ "200": 80,
35
+ "300": 70,
36
+ "400": 60,
37
+ "500": 50,
38
+ "600": 42,
39
+ "700": 36,
40
+ "800": 28,
41
+ "900": 22,
42
+ "950": 16
43
+ ) !default;
44
+
45
+ // color mapping
46
+ $ryb-rgb-mapping: (
47
+ (0, 0) // Red
48
+ (50, 35) // Orange
49
+ (110, 60) // Yellow
50
+ (165, 120) // Green
51
+ (210, 180) // Cyan
52
+ (285, 240) // Blue
53
+ (330, 300) // Purple
54
+ (360, 360) // Red (same as 0)
55
+ ) !default;
56
+
57
+ // saturation mapping
58
+ $hue-sat-mapping: (
59
+ (0, 85) // Red
60
+ (110, 100) // Yellow
61
+ (165, 60) // Green
62
+ (210, 88) // Cyan
63
+ (285, 97) // Blue
64
+ (330, 65) // Purple
65
+ (360, 85) // Red (same as 0)
66
+ ) !default;
67
+
68
+ @function ryb-hue($h, $reverse: false) {
69
+ $deg: $h % 360;
70
+
71
+ $from: 1;
72
+ $to: 2;
73
+
74
+ @if $reverse {
75
+ $from: 2;
76
+ $to: 1;
77
+ }
78
+
79
+ $lower: 1;
80
+ $upper: 2;
81
+
82
+ @while $deg > list.nth(list.nth($ryb-rgb-mapping, $upper), $from) {
83
+ $lower: $upper;
84
+ $upper: $upper + 1;
85
+ }
86
+
87
+ $lower-from: list.nth(list.nth($ryb-rgb-mapping, $lower), $from);
88
+ $lower-to: list.nth(list.nth($ryb-rgb-mapping, $lower), $to);
89
+ $upper-from: list.nth(list.nth($ryb-rgb-mapping, $upper), $from);
90
+ $upper-to: list.nth(list.nth($ryb-rgb-mapping, $upper), $to);
91
+
92
+ $percent: math.div(($deg - $lower-from), ($upper-from - $lower-from));
93
+ $hue: $lower-to + ($upper-to - $lower-to) * $percent;
94
+
95
+ @return $hue;
96
+ }
97
+
98
+ @function ryb-saturation($rybHue, $saturation, $reverse: false) {
99
+ $deg: $rybHue % 360;
100
+ $sat: math.clamp(0, $saturation, 100);
101
+
102
+ $index: 1;
103
+ $value: 2;
104
+
105
+ $lower: 1;
106
+ $upper: 2;
107
+
108
+ @while $deg > list.nth(list.nth($hue-sat-mapping, $upper), $index) {
109
+ $lower: $upper;
110
+ $upper: $upper + 1;
111
+ }
112
+
113
+ $lower-index: list.nth(list.nth($hue-sat-mapping, $lower), $index);
114
+ $upper-index: list.nth(list.nth($hue-sat-mapping, $upper), $index);
115
+ $lower-value: list.nth(list.nth($hue-sat-mapping, $lower), $value);
116
+ $upper-value: list.nth(list.nth($hue-sat-mapping, $upper), $value);
117
+
118
+ $percent: math.div(($deg - $lower-index), ($upper-index - $lower-index));
119
+ $interpolation: math.div(($lower-value + ($upper-value - $lower-value) * $percent), 100);
120
+
121
+ @if $reverse {
122
+ @return math.div($sat, $interpolation);
123
+ } @else {
124
+ @return $sat * $interpolation;
125
+ }
126
+
127
+ }
128
+
129
+ @function hsl-to-ryb-as-hsl($h, $s, $l) {
130
+ $hue: math.floor(ryb-hue($h));
131
+ $saturation: ryb-saturation($h, $s) * 1%;
132
+ $lightness: $l * 1%;
133
+ @return hsl($hue, $saturation, $lightness);
134
+ }
135
+
136
+ @function generate-colors($base-color) {
137
+ $h: ryb-hue(math.div(hue($base-color), 1deg), true);
138
+ $divisions: list.length($color-names);
139
+
140
+ // 33% is minimum threshold to not get all colors gray
141
+ $normalizedS: math.clamp(ryb-saturation($h, 33), math.div(saturation($base-color), 1%), ryb-saturation($h, 100));
142
+ $s: ryb-saturation($h, $normalizedS, true);
143
+
144
+ $distance: math.div(360, $divisions);
145
+
146
+ $start-offset: $h % $distance;
147
+
148
+ // Clone
149
+ $generated-colors: map.merge($color-names, ());
150
+
151
+ @for $i from 1 through $divisions {
152
+ $ih: $start-offset + ($i - 1) * $distance;
153
+ $il: map.get($color-shades, "500");
154
+ $iname: list.nth(map.keys($color-names), $i);
155
+ $icolor: hsl-to-ryb-as-hsl($ih, $s, $il);
156
+ //@debug $iname $icolor;
157
+ $generated-colors: map.set($generated-colors, $iname, $icolor);
158
+ }
159
+
160
+ @return $generated-colors;
161
+ }
162
+
163
+ @function color-shade($color, $shade, $shades: $color-shades) {
164
+ @return color.change($color, $lightness: map.get($shades, $shade) * 1%)
165
+ }
@@ -0,0 +1,16 @@
1
+ .wy-pane {
2
+ min-height: 100vh;
3
+ display: flex;
4
+ flex-direction: column;
5
+ position: relative;
6
+ }
7
+
8
+ .wy-pane-body {
9
+ display: flex;
10
+ flex-direction: column;
11
+ flex: 1;
12
+ }
13
+
14
+ .wy-pane-group {
15
+ padding: .5rem;
16
+ }