@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
@@ -0,0 +1,72 @@
1
+ @use "base/colors";
2
+ @use "base/vars";
3
+
4
+ .wy-tabs {
5
+ display: flex;
6
+ justify-content: space-evenly;
7
+ padding:.25rem;
8
+ }
9
+
10
+ .wy-tab {
11
+ --wy-component-color: #{colors.$primary};
12
+ --wy-component-background-color: transparent; // #{colors.$surface-2};
13
+
14
+ color: var(--wy-component-color);
15
+ background: var(--wy-component-background-color);
16
+
17
+ border: none;
18
+ border-radius: vars.$border-radius-lg;
19
+
20
+ display: inline-flex;
21
+ flex-direction: column;
22
+ align-items: center;
23
+ justify-content: center;
24
+ gap: .25rem;
25
+ position: relative;
26
+
27
+ text-align: center;
28
+ text-decoration: none;
29
+
30
+ cursor: pointer;
31
+ user-select: none;
32
+
33
+ .wy-tab-icon {
34
+ // State layer
35
+ position: relative;
36
+ padding: .25rem 1rem;
37
+ border-radius: var(--wy-btn-border-radius);
38
+ display: inline-flex;
39
+
40
+ &::before {
41
+ content: "";
42
+ position: absolute;
43
+ top: 0;
44
+ left: 0;
45
+ width: 100%;
46
+ height: 100%;
47
+ border-radius: inherit;
48
+ background: var(--wy-component-color);
49
+ opacity: 0%;
50
+ }
51
+ }
52
+
53
+ &:hover {
54
+ .wy-tab-icon::before {
55
+ opacity: 8%;
56
+ }
57
+ }
58
+
59
+ &:focus, &:active, &.wy-active {
60
+ .wy-tab-icon::before {
61
+ opacity: 12%;
62
+ }
63
+ }
64
+
65
+ .wy-tab-label {
66
+ font-family: var(--wy-btn-font-family);
67
+ line-height: var(--wy-btn-line-height);
68
+
69
+ font-size: vars.$font-size-xs;
70
+ font-weight: vars.$font-weight-base;
71
+ }
72
+ }
@@ -1,47 +1,83 @@
1
- @use "config" as *;
2
- @use "bs/tables";
1
+ @use "base/vars";
2
+ @use "base/colors";
3
+ @use "base/text";
3
4
 
4
-
5
- // table with avatar/icon in first and last column
6
- %table-icons {
5
+ .wy-table {
6
+ --wy-component-color: #{colors.$on-background};
7
+ --wy-component-background-color: #{colors.$background};
8
+ color: var(--wy-component-color);
9
+ background-color: var(--wy-component-background-color);
7
10
  table-layout: fixed;
11
+ width: 100%;
12
+ //margin-bottom: 1rem;
13
+ vertical-align: top;
14
+ border-collapse: collapse;
8
15
 
9
16
  th, td {
10
- // cell with img or icon
11
- &:first-child, &:last-child {
12
- color: $icon-color !important;
13
- vertical-align: middle;
14
- text-align: center;
15
- padding: $table-cell-padding-y-sm $table-cell-padding-x;
16
- width: 2rem + $table-cell-padding-x;
17
- // reset th styles (for dropdown menus in th)
18
- font-size: $font-size-base;
19
- font-weight: $font-weight-base;
20
- text-transform: none;
21
- letter-spacing: normal;
22
- }
17
+ padding: vars.$table-cell-padding-y vars.$table-cell-padding-x;
18
+ box-shadow: #{colors.$outline-variant} 0px -1px 0px 0px inset;
19
+ line-height: 1;
20
+ vertical-align: middle;
21
+ height: 2.5rem;
23
22
 
24
23
  &:first-child {
25
- padding-right: 0;
24
+ padding-left: calc(#{vars.$table-cell-padding-x} * 2);
26
25
  }
27
26
 
28
27
  &:last-child {
29
- padding-left: 0;
28
+ padding-right: calc(#{vars.$table-cell-padding-x} * 2);
30
29
  }
31
30
  }
31
+
32
+ > tbody {
33
+ vertical-align: inherit;
34
+ }
35
+
36
+ > thead {
37
+ vertical-align: bottom;
38
+ }
39
+
40
+ .wy-table-cell-icon {
41
+ color: var(--wy-component-color);
42
+ vertical-align: middle;
43
+ text-align: center;
44
+ padding: calc(#{vars.$table-cell-padding-y} * .5) vars.$table-cell-padding-x;
45
+ width: calc(2.5rem + #{vars.$table-cell-padding-x} * 2);
46
+ // reset th styles (for dropdown menus in th)
47
+ font-size: vars.$font-size-base;
48
+ font-weight: vars.$font-weight-base;
49
+ text-transform: none;
50
+ letter-spacing: normal;
51
+ }
52
+
53
+ .wy-table-cell-text {
54
+ @include text.truncate;
55
+ width: 100%;
56
+ }
32
57
  }
33
58
 
59
+ .wy-table-hover {
60
+ > tbody > tr:not(.wy-pager):hover > * {
61
+ --wy-component-color: #{colors.$on-surface};
62
+ --wy-component-background-color: #{colors.$surface-2};
63
+ color: var(--color);
64
+ background-color: var(--wy-component-background-color);
65
+ cursor: pointer;
66
+ }
67
+ }
34
68
 
35
69
  .wy-table-trashed {
36
70
  th, td {
37
- color: $text-muted;
38
71
  text-decoration: line-through;
72
+
39
73
  &:not(:last-child) {
40
- opacity: $btn-disabled-opacity;
74
+ > * {
75
+ opacity: vars.$opacity-disabled;
76
+ }
41
77
  }
42
78
 
43
79
  > a {
44
- color: $text-muted;
80
+ color: var(--wy-component-color);
45
81
  }
46
82
  }
47
83
 
@@ -51,3 +87,14 @@
51
87
  }
52
88
  }
53
89
  }
90
+
91
+ .wy-table-no-result {
92
+ text-align: center;
93
+ padding: 1rem;
94
+ }
95
+
96
+
97
+ .wy-table-sort-link {
98
+ display: inline-flex;
99
+ align-items: center;
100
+ }
@@ -1,47 +1,77 @@
1
1
  @use "sass:map";
2
- @use "variables" as *;
2
+ @use "base/vars";
3
+ @use "base/colors";
4
+
5
+ $toast-max-width: 16rem !default;
6
+ $toast-padding-x: .75rem !default;
7
+ $toast-padding-y: .5rem !default;
3
8
 
4
9
  .wy-toasts {
5
10
  position: fixed;
6
11
  left: 0;
7
- bottom: 0;
12
+ bottom: 3.5rem;
8
13
  right: 0;
9
14
  pointer-events: none;
10
15
  display: flex;
11
16
  flex-direction: column;
12
17
  align-items: center;
13
18
  justify-content: center;
14
- z-index: $zindex-fixed;
19
+ z-index: vars.$zindex-fixed;
20
+ gap: 1rem;
15
21
  }
16
22
 
17
23
  .wy-toast {
24
+ background: colors.$on-surface;
25
+ color: colors.$surface-2;
18
26
  margin: 0 0 1rem;
19
- }
20
-
21
- .wy-toast-body {
27
+ width: $toast-max-width;
28
+ max-width: calc(100% - 3rem);
29
+ gap: .5rem;
30
+ display: flex;
31
+ cursor: pointer;
32
+ border-radius: vars.$border-radius;
33
+ margin-left: auto;
34
+ margin-right: auto;
35
+ margin-bottom: .5rem;
22
36
  padding: $toast-padding-y $toast-padding-x;
23
- }
24
-
25
- .wy-button-toast {
26
- font-weight: $font-weight-normal;
27
- text-decoration: $link-decoration;
37
+ user-select: none;
38
+ box-shadow: vars.$shadow-level2;
39
+ position: relative;
40
+ overflow: hidden;
41
+ height: auto;
28
42
 
29
- &:hover {
30
- color: $btn-link-hover-color;
31
- text-decoration: $link-hover-decoration;
32
- }
33
-
34
- &:focus {
35
- text-decoration: $link-hover-decoration;
36
- box-shadow: none;
43
+ &.wy-fade {
44
+ transition: all vars.$transition;
45
+
46
+ &:not(.wy-show) {
47
+ opacity: 0;
48
+ height: 0;
49
+ padding-top: 0;
50
+ padding-bottom: 0;
51
+ margin-top: 0;
52
+ margin-bottom: 0;
53
+ }
37
54
  }
55
+ }
38
56
 
39
- &:disabled,
40
- &.wy-disabled {
41
- color: $btn-link-disabled-color;
42
- }
57
+ .wy-toast-action {
58
+ position: sticky;
59
+ top: 4.5rem;
60
+ bottom: 4.5rem;
61
+ // TODO: check z-index - needs to be below dropdown z-index (1000) currently $zindex-toast is 1090
62
+ z-index: 999;
63
+ background-color: colors.$primary;
64
+ color: colors.$on-primary;
65
+ padding: .5rem 1rem;
66
+ border-radius: 50rem;
67
+ font-size: vars.$font-size-xs;
68
+ width: max-content;
69
+ align-self: center;
70
+ text-align: center;
71
+ box-shadow: none;
72
+ }
43
73
 
44
- color: map.get($utilities-text-colors, "info");
45
- text-transform: uppercase;
46
- font-weight: 500;
74
+ .wy-toast-primary {
75
+ background: colors.$on-primary-container;
76
+ color: colors.$primary-container;
47
77
  }
@@ -0,0 +1,41 @@
1
+ @use "base/vars";
2
+
3
+ @mixin heading {
4
+ margin-top: .5rem;
5
+ margin-bottom: .5rem;
6
+ font-style: vars.$headings-font-style;
7
+ font-weight: vars.$headings-font-weight;
8
+ line-height: vars.$headings-line-height;
9
+ }
10
+
11
+ // We never use H1 since we are in a context
12
+
13
+ // ~ H2
14
+ .wy-title {
15
+ @include heading;
16
+ margin-top: .5rem;
17
+ margin-bottom: .5rem;
18
+ font-weight: 400;
19
+ font-size: 2.5rem;
20
+ line-height: 3rem;
21
+ }
22
+
23
+ // ~ H3
24
+ .wy-headline {
25
+ @include heading;
26
+ margin-top: .5rem;
27
+ margin-bottom: .5rem;
28
+ font-weight: 400;
29
+ font-size: 1.5rem;
30
+ line-height: 2rem;
31
+ }
32
+
33
+ // ~ H4
34
+ .wy-label {
35
+ @include heading;
36
+ margin-top: 0rem;
37
+ margin-bottom: 0rem;
38
+ font-weight: 500;
39
+ font-size: 1rem;
40
+ line-height: 1.5rem;
41
+ }
File without changes
@@ -1,3 +1,12 @@
1
+ $grid-breakpoints: (
2
+ xs: 0,
3
+ sm: 576px,
4
+ md: 768px,
5
+ lg: 992px,
6
+ xl: 1200px,
7
+ xxl: 1400px
8
+ ) !default;
9
+
1
10
  // Breakpoint viewport sizes and media queries.
2
11
  //
3
12
  // Breakpoints are defined as a map of (name: minimum width), order from small to large:
@@ -0,0 +1,315 @@
1
+ @use "sass:color";
2
+ @use "sass:map";
3
+ @use "palette";
4
+
5
+ // fixed colors
6
+ $theme: palette.$seed;
7
+ $black: palette.$neutral-0;
8
+ $white: palette.$neutral-100;
9
+ $shadow: $black;
10
+
11
+ // css variables
12
+ :where(:root, :host > *) {
13
+ // fixed colors
14
+ --wy-theme: #{$theme};
15
+ --wy-black: #{$black};
16
+ --wy-white: #{$white};
17
+ --wy-shadow: #{$shadow};
18
+
19
+ // palette
20
+ --wy-primary-99: #{palette.$primary-99};
21
+ --wy-primary-95: #{palette.$primary-95};
22
+ --wy-primary-90: #{palette.$primary-90};
23
+ --wy-primary-80: #{palette.$primary-80};
24
+ --wy-primary-70: #{palette.$primary-70};
25
+ --wy-primary-60: #{palette.$primary-60};
26
+ --wy-primary-50: #{palette.$primary-50};
27
+ --wy-primary-40: #{palette.$primary-40};
28
+ --wy-primary-30: #{palette.$primary-30};
29
+ --wy-primary-20: #{palette.$primary-20};
30
+ --wy-primary-10: #{palette.$primary-10};
31
+
32
+ --wy-secondary-99: #{palette.$secondary-99};
33
+ --wy-secondary-95: #{palette.$secondary-95};
34
+ --wy-secondary-90: #{palette.$secondary-90};
35
+ --wy-secondary-80: #{palette.$secondary-80};
36
+ --wy-secondary-70: #{palette.$secondary-70};
37
+ --wy-secondary-60: #{palette.$secondary-60};
38
+ --wy-secondary-50: #{palette.$secondary-50};
39
+ --wy-secondary-40: #{palette.$secondary-40};
40
+ --wy-secondary-30: #{palette.$secondary-30};
41
+ --wy-secondary-20: #{palette.$secondary-20};
42
+ --wy-secondary-10: #{palette.$secondary-10};
43
+
44
+ --wy-tertiary-99: #{palette.$secondary-99};
45
+ --wy-tertiary-95: #{palette.$secondary-95};
46
+ --wy-tertiary-90: #{palette.$secondary-90};
47
+ --wy-tertiary-80: #{palette.$secondary-80};
48
+ --wy-tertiary-70: #{palette.$secondary-70};
49
+ --wy-tertiary-60: #{palette.$secondary-60};
50
+ --wy-tertiary-50: #{palette.$secondary-50};
51
+ --wy-tertiary-40: #{palette.$secondary-40};
52
+ --wy-tertiary-30: #{palette.$secondary-30};
53
+ --wy-tertiary-20: #{palette.$secondary-20};
54
+ --wy-tertiary-10: #{palette.$secondary-10};
55
+
56
+ --wy-error-99: #{palette.$error-99};
57
+ --wy-error-95: #{palette.$error-95};
58
+ --wy-error-90: #{palette.$error-90};
59
+ --wy-error-80: #{palette.$error-80};
60
+ --wy-error-70: #{palette.$error-70};
61
+ --wy-error-60: #{palette.$error-60};
62
+ --wy-error-50: #{palette.$error-50};
63
+ --wy-error-40: #{palette.$error-40};
64
+ --wy-error-30: #{palette.$error-30};
65
+ --wy-error-20: #{palette.$error-20};
66
+ --wy-error-10: #{palette.$error-10};
67
+
68
+ --wy-neutral-99: #{palette.$neutral-99};
69
+ --wy-neutral-95: #{palette.$neutral-95};
70
+ --wy-neutral-90: #{palette.$neutral-90};
71
+ --wy-neutral-80: #{palette.$neutral-80};
72
+ --wy-neutral-70: #{palette.$neutral-70};
73
+ --wy-neutral-60: #{palette.$neutral-60};
74
+ --wy-neutral-50: #{palette.$neutral-50};
75
+ --wy-neutral-40: #{palette.$neutral-40};
76
+ --wy-neutral-30: #{palette.$neutral-30};
77
+ --wy-neutral-20: #{palette.$neutral-20};
78
+ --wy-neutral-10: #{palette.$neutral-10};
79
+
80
+ --wy-neutral-variant-99: #{palette.$neutral-variant-99};
81
+ --wy-neutral-variant-95: #{palette.$neutral-variant-95};
82
+ --wy-neutral-variant-90: #{palette.$neutral-variant-90};
83
+ --wy-neutral-variant-80: #{palette.$neutral-variant-80};
84
+ --wy-neutral-variant-70: #{palette.$neutral-variant-70};
85
+ --wy-neutral-variant-60: #{palette.$neutral-variant-60};
86
+ --wy-neutral-variant-50: #{palette.$neutral-variant-50};
87
+ --wy-neutral-variant-40: #{palette.$neutral-variant-40};
88
+ --wy-neutral-variant-30: #{palette.$neutral-variant-30};
89
+ --wy-neutral-variant-20: #{palette.$neutral-variant-20};
90
+ --wy-neutral-variant-10: #{palette.$neutral-variant-10};
91
+
92
+ --wy-surface-1-light: #{palette.$surface-1-light}; // --wy-surface + --wy-primary with 5% opacity
93
+ --wy-surface-2-light: #{palette.$surface-2-light}; // --wy-surface + --wy-primary with 8% opacity
94
+ --wy-surface-3-light: #{palette.$surface-3-light}; // --wy-surface + --wy-primary with 11 opacity
95
+ --wy-surface-4-light: #{palette.$surface-4-light}; // --wy-surface + --wy-primary with 12% opacity
96
+ --wy-surface-5-light: #{palette.$surface-5-light}; // --wy-surface + --wy-primary with 14% opacity
97
+
98
+ --wy-surface-1-dark: #{palette.$surface-1-dark}; // --wy-surface + --wy-primary with 5% opacity
99
+ --wy-surface-2-dark: #{palette.$surface-2-dark}; // --wy-surface + --wy-primary with 8% opacity
100
+ --wy-surface-3-dark: #{palette.$surface-3-dark}; // --wy-surface + --wy-primary with 11 opacity
101
+ --wy-surface-4-dark: #{palette.$surface-4-dark}; // --wy-surface + --wy-primary with 12% opacity
102
+ --wy-surface-5-dark: #{palette.$surface-5-dark}; // --wy-surface + --wy-primary with 14% opacity
103
+
104
+ // custom colors
105
+ --wy-blue-light: #{palette.$blue-light};
106
+ --wy-indigo-light: #{palette.$indigo-light};
107
+ --wy-purple-light: #{palette.$purple-light};
108
+ --wy-pink-light: #{palette.$pink-light};
109
+ --wy-red-light: #{palette.$red-light};
110
+ --wy-orange-light: #{palette.$orange-light};
111
+ --wy-yellow-light: #{palette.$yellow-light};
112
+ --wy-green-light: #{palette.$green-light};
113
+ --wy-teal-light: #{palette.$teal-light};
114
+ --wy-cyan-light: #{palette.$cyan-light};
115
+ --wy-gray-light: #{palette.$gray-light};
116
+
117
+ // custom colors
118
+ --wy-blue-dark: #{palette.$blue-dark};
119
+ --wy-indigo-dark: #{palette.$indigo-dark};
120
+ --wy-purple-dark: #{palette.$purple-dark};
121
+ --wy-pink-dark: #{palette.$pink-dark};
122
+ --wy-red-dark: #{palette.$red-dark};
123
+ --wy-orange-dark: #{palette.$orange-dark};
124
+ --wy-yellow-dark: #{palette.$yellow-dark};
125
+ --wy-green-dark: #{palette.$green-dark};
126
+ --wy-teal-dark: #{palette.$teal-dark};
127
+ --wy-cyan-dark: #{palette.$cyan-dark};
128
+ --wy-gray-dark: #{palette.$gray-dark};
129
+ }
130
+
131
+ :where(:root, :host > *, .wy-light) {
132
+ // light mode
133
+ color-scheme: light;
134
+
135
+ // theme colors
136
+ --wy-primary: var(--wy-primary-40);
137
+ --wy-on-primary: var(--wy-white);
138
+ --wy-primary-container: var(--wy-primary-90);
139
+ --wy-on-primary-container: var(--wy-primary-10);
140
+
141
+ --wy-secondary: var(--wy-secondary-40);
142
+ --wy-on-secondary: var(--wy-white);
143
+ --wy-secondary-container: var(--wy-secondary-90);
144
+ --wy-on-secondary-container: var(--wy-secondary-10);
145
+
146
+ --wy-tertiary: var(--wy-tertiary-40);
147
+ --wy-on-tertiary: var(--wy-white);
148
+ --wy-tertiary-container: var(--wy-tertiary-90);
149
+ --wy-on-tertiary-container: var(--wy-tertiary-10);
150
+
151
+ --wy-error: var(--wy-error-40);
152
+ --wy-on-error: var(--wy-white);
153
+ --wy-error-container: var(--wy-error-90);
154
+ --wy-on-error-container: var(--wy-error-10);
155
+
156
+ --wy-background: var(--wy-neutral-99);
157
+ --wy-on-background: var(--wy-neutral-10);
158
+
159
+ --wy-surface: var(--wy-neutral-99);
160
+ --wy-on-surface: var(--wy-neutral-10);
161
+
162
+ --wy-surface-variant: var(--wy-neutral-variant-90);
163
+ --wy-on-surface-variant: var(--wy-neutral-variant-30);
164
+
165
+ --wy-outline: var(--wy-neutral-variant-50);
166
+ --wy-outline-variant: var(--wy-neutral-variant-80);
167
+
168
+ --wy-inverse-surface: var(--wy-neutral-20);
169
+ --wy-on-inverse-surface: var(--wy-neutral-95);
170
+ --wy-inverse-primary: var(--wy-primary-80);
171
+
172
+ --wy-surface-1: var(--wy-surface-1-light); // --wy-surface + --wy-primary with 5% opacity
173
+ --wy-surface-2: var(--wy-surface-2-light); // --wy-surface + --wy-primary with 8% opacity
174
+ --wy-surface-3: var(--wy-surface-3-light); // --wy-surface + --wy-primary with 11 opacity
175
+ --wy-surface-4: var(--wy-surface-4-light); // --wy-surface + --wy-primary with 12% opacity
176
+ --wy-surface-5: var(--wy-surface-5-light); // --wy-surface + --wy-primary with 14% opacity
177
+
178
+ --wy-link: var(--wy-primary-40);
179
+
180
+ // custom colors
181
+ --wy-blue: var(--wy-blue-light);
182
+ --wy-indigo: var(--wy-indigo-light);
183
+ --wy-purple: var(--wy-purple-light);
184
+ --wy-pink: var(--wy-pink-light);
185
+ --wy-red: var(--wy-red-light);
186
+ --wy-orange: var(--wy-orange-light);
187
+ --wy-yellow: var(--wy-yellow-light);
188
+ --wy-green: var(--wy-green-light);
189
+ --wy-teal: var(--wy-teal-light);
190
+ --wy-cyan: var(--wy-cyan-light);
191
+ --wy-gray: var(--wy-gray-light);
192
+ }
193
+
194
+ :where(.wy-dark) {
195
+ // dark mode
196
+ color-scheme: dark;
197
+
198
+ // theme colors
199
+ --wy-primary: var(--wy-primary-80);
200
+ --wy-on-primary: var(--wy-primary-20);
201
+ --wy-primary-container: var(--wy-primary-30);
202
+ --wy-on-primary-container: var(--wy-primary-90);
203
+
204
+ --wy-secondary: var(--wy-secondary-80);
205
+ --wy-on-secondary: var(--wy-secondary-20);
206
+ --wy-secondary-container: var(--wy-secondary-30);
207
+ --wy-on-secondary-container: var(--wy-secondary-90);
208
+
209
+ --wy-tertiary: var(--wy-tertiary-80);
210
+ --wy-on-tertiary: var(--wy-tertiary-20);
211
+ --wy-tertiary-container: var(--wy-tertiary-30);
212
+ --wy-on-tertiary-container: var(--wy-tertiary-90);
213
+
214
+ --wy-error: var(--wy-error-80);
215
+ --wy-on-error: var(--wy-error-20);
216
+ --wy-error-container: var(--wy-error-30);
217
+ --wy-on-error-container: var(--wy-error-90);
218
+
219
+ --wy-background: var(--wy-neutral-10);
220
+ --wy-on-background: var(--wy-neutral-90);
221
+
222
+ --wy-surface: var(--wy-neutral-10);
223
+ --wy-on-surface: var(--wy-neutral-90);
224
+
225
+ --wy-surface-variant: var(--wy-neutral-variant-30);
226
+ --wy-on-surface-variant: var(--wy-neutral-variant-80);
227
+
228
+ --wy-outline: var(--wy-neutral-variant-60);
229
+ --wy-outline-variant: var(--wy-neutral-variant-30);
230
+
231
+ --wy-inverse-surface: var(--wy-neutral-90);
232
+ --wy-on-inverse-surface: var(--wy-neutral-20);
233
+ --wy-inverse-primary: var(--wy-primary-40);
234
+
235
+ --wy-surface-1: var(--wy-surface-1-dark); // --wy-surface + --wy-primary with 5% opacity
236
+ --wy-surface-2: var(--wy-surface-2-dark); // --wy-surface + --wy-primary with 8% opacity
237
+ --wy-surface-3: var(--wy-surface-3-dark); // --wy-surface + --wy-primary with 11 opacity
238
+ --wy-surface-4: var(--wy-surface-4-dark); // --wy-surface + --wy-primary with 12% opacity
239
+ --wy-surface-5: var(--wy-surface-5-dark); // --wy-surface + --wy-primary with 14% opacity
240
+
241
+ --wy-link: var(--wy-primary-80);
242
+
243
+ // custom colors
244
+ --wy-blue: var(--wy-blue-dark);
245
+ --wy-indigo: var(--wy-indigo-dark);
246
+ --wy-purple: var(--wy-purple-dark);
247
+ --wy-pink: var(--wy-pink-dark);
248
+ --wy-red: var(--wy-red-dark);
249
+ --wy-orange: var(--wy-orange-dark);
250
+ --wy-yellow: var(--wy-yellow-dark);
251
+ --wy-green: var(--wy-green-dark);
252
+ --wy-teal: var(--wy-teal-dark);
253
+ --wy-cyan: var(--wy-cyan-dark);
254
+ --wy-gray: var(--wy-gray-dark);
255
+ }
256
+
257
+ // scss theme colors
258
+ $primary: var(--wy-primary);
259
+ $on-primary: var(--wy-on-primary);
260
+ $primary-container: var(--wy-primary-container);
261
+ $on-primary-container: var(--wy-on-primary-container);
262
+
263
+ $secondary: var(--wy-secondary);
264
+ $on-secondary: var(--wy-on-secondary);
265
+ $secondary-container: var(--wy-secondary-container);
266
+ $on-secondary-container: var(--wy-on-secondary-container);
267
+
268
+ $tertiary: var(--wy-tertiary);
269
+ $on-tertiary: var(--wy-on-tertiary);
270
+ $tertiary-container: var(--wy-tertiary-container);
271
+ $on-tertiary-container: var(--wy-on-tertiary-container);
272
+
273
+ $error: var(--wy-error);
274
+ $on-error: var(--wy-on-error);
275
+ $error-container: var(--wy-error-container);
276
+ $on-error-container: var(--wy-on-error-container);
277
+
278
+ $background: var(--wy-background);
279
+ $on-background: var(--wy-on-background);
280
+
281
+ $surface: var(--wy-surface);
282
+ $on-surface: var(--wy-on-surface);
283
+
284
+ $surface-variant: var(--wy-surface-variant);
285
+ $on-surface-variant: var(--wy-on-surface-variant);
286
+
287
+ $outline: var(--wy-outline);
288
+ $outline-variant: var(--wy-outline-variant);
289
+
290
+ $surface-1: var(--wy-surface-1);
291
+ $surface-2: var(--wy-surface-2);
292
+ $surface-3: var(--wy-surface-3);
293
+ $surface-4: var(--wy-surface-4);
294
+ $surface-5: var(--wy-surface-5);
295
+
296
+ $inverse-surface: var(--wy-inverse-surface);
297
+ $on-inverse-surface: var(--wy-on-inverse-surface);
298
+ $inverse-primary: var(--wy-inverse-primary);
299
+
300
+ $link: var(--wy-link);
301
+
302
+ // scss custom colors
303
+ $blue: var(--wy-blue);
304
+ $indigo: var(--wy-indigo);
305
+ $purple: var(--wy-purple);
306
+ $pink: var(--wy-pink);
307
+ $red: var(--wy-red);
308
+ $orange: var(--wy-orange);
309
+ $yellow: var(--wy-yellow);
310
+ $green: var(--wy-green);
311
+ $teal: var(--wy-teal);
312
+ $cyan: var(--wy-cyan);
313
+ $gray: var(--wy-gray);
314
+
315
+
@@ -0,0 +1,19 @@
1
+ // Material design animation and shadows from https://fezvrasta.github.io/bootstrap-material-design/
2
+ $animation-curve-fast-out-slow-in: cubic-bezier(0.4, 0, 0.2, 1);
3
+ $animation-curve-linear-out-slow-in: cubic-bezier(0, 0, 0.2, 1);
4
+ $animation-curve-fast-out-linear-in: cubic-bezier(0.4, 0, 1, 1);
5
+ $animation-curve-default: $animation-curve-fast-out-slow-in;
6
+ $animation-duration: .2s;
7
+ $animation-duration-fast: .1s;
8
+
9
+ $shadow-umbra-opacity: 0.2;
10
+ $shadow-penumbra-opacity: 0.14;
11
+ $shadow-ambient-opacity: 0.12;
12
+ $shadow-focus: 0 0 .5rem rgba(#000, .18), 0 .5rem 1rem rgba(#000, .36);
13
+ $shadow-2dp: 0 .125rem .125rem 0 rgba(#000, $shadow-penumbra-opacity), 0 .1875rem .0625rem -.125rem rgba(#000, $shadow-umbra-opacity), 0 .0625rem .3125rem 0 rgba(#000, $shadow-ambient-opacity);
14
+ $shadow-3dp: 0 .1875rem .25rem 0 rgba(#000, $shadow-penumbra-opacity), 0 .1875rem .1875rem -.125rem rgba(#000, $shadow-umbra-opacity), 0 .0625rem .5rem 0 rgba(#000, $shadow-ambient-opacity);
15
+ $shadow-4dp: 0 .25rem .3125rem 0 rgba(#000, $shadow-penumbra-opacity), 0 .0625rem .625rem 0 rgba(#000, $shadow-ambient-opacity), 0 .125rem .25rem -.0625rem rgba(#000, $shadow-umbra-opacity);
16
+ $shadow-6dp: 0 .375rem .625rem 0 rgba(#000, $shadow-penumbra-opacity), 0 .0625rem 1.5rem 0 rgba(#000, $shadow-ambient-opacity), 0 .1875rem .3125rem -.0625rem rgba(#000, $shadow-umbra-opacity);
17
+ $shadow-8dp: 0 .5rem .625rem .0625rem rgba(#000, $shadow-penumbra-opacity), 0 .1875rem 1.25rem .125rem rgba(#000, $shadow-ambient-opacity), 0 .3125rem .3125rem -.1875rem rgba(#000, $shadow-umbra-opacity);
18
+ $shadow-16dp: 0 1rem 2.25rem .125rem rgba(#000, $shadow-penumbra-opacity), 0 .375rem 1.875rem .3125rem rgba(#000, $shadow-ambient-opacity), 0 .5rem .625rem -.3125rem rgba(#000, $shadow-umbra-opacity);
19
+ $shadow-24dp: 0 .5625rem 4.375rem .5rem rgba(#000, $shadow-penumbra-opacity), 0 1.0625rem 1.3125rem -.4375rem rgba(#000, $shadow-ambient-opacity), 0 2.25rem 3.5rem .1875rem rgba(#000, $shadow-umbra-opacity);