@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,161 +0,0 @@
1
- @use "../config" as *;
2
-
3
- %form-control {
4
- display: block;
5
- width: 100%;
6
- padding: $input-padding-y $input-padding-x;
7
- font-family: $input-font-family;
8
- @include font-size($input-font-size);
9
- font-weight: $input-font-weight;
10
- line-height: $input-line-height;
11
- color: $input-color;
12
- background-color: $input-bg;
13
- background-clip: padding-box;
14
- border: $input-border-width solid $input-border-color;
15
- appearance: none; // Fix appearance for date inputs in Safari
16
-
17
- // Note: This has no effect on <select>s in some browsers, due to the limited stylability of `<select>`s in CSS.
18
- @include border-radius($input-border-radius, 0);
19
-
20
- @include box-shadow($input-box-shadow);
21
- @include transition($input-transition);
22
-
23
- &[type="file"] {
24
- overflow: hidden; // prevent pseudo element button overlap
25
-
26
- &:not(:disabled):not([readonly]) {
27
- cursor: pointer;
28
- }
29
- }
30
-
31
- // Customize the `:focus` state to imitate native WebKit styles.
32
- &:focus {
33
- color: $input-focus-color;
34
- background-color: $input-focus-bg;
35
- border-color: $input-focus-border-color;
36
- outline: 0;
37
- @if $enable-shadows {
38
- @include box-shadow($input-box-shadow, $input-focus-box-shadow);
39
- } @else {
40
- // Avoid using mixin so we can pass custom focus shadow properly
41
- box-shadow: $input-focus-box-shadow;
42
- }
43
- }
44
-
45
- // Add some height to date inputs on iOS
46
- // https://github.com/twbs/bootstrap/issues/23307
47
- // TODO: we can remove this workaround once https://bugs.webkit.org/show_bug.cgi?id=198959 is resolved
48
- &::-webkit-date-and-time-value {
49
- // Multiply line-height by 1em if it has no unit
50
- height: if(unit($input-line-height) == "", $input-line-height * 1em, $input-line-height);
51
- }
52
-
53
- // Placeholder
54
- &::placeholder {
55
- color: $input-placeholder-color;
56
- // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526.
57
- opacity: 1;
58
- }
59
-
60
- // Disabled and read-only inputs
61
- //
62
- // HTML5 says that controls under a fieldset > legend:first-child won't be
63
- // disabled if the fieldset is disabled. Due to implementation difficulty, we
64
- // don't honor that edge case; we style them as disabled anyway.
65
- &:disabled,
66
- &[readonly] {
67
- background-color: $input-disabled-bg;
68
- border-color: $input-disabled-border-color;
69
- // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655.
70
- opacity: 1;
71
- }
72
-
73
- // File input buttons theming
74
- &::file-selector-button {
75
- padding: $input-padding-y $input-padding-x;
76
- margin: (-$input-padding-y) (-$input-padding-x);
77
- margin-inline-end: $input-padding-x;
78
- color: $form-file-button-color;
79
- @include gradient-bg($form-file-button-bg);
80
- pointer-events: none;
81
- border-color: inherit;
82
- border-style: solid;
83
- border-width: 0;
84
- border-inline-end-width: $input-border-width;
85
- border-radius: 0; // stylelint-disable-line property-disallowed-list
86
- @include transition($btn-transition);
87
- }
88
-
89
- &:hover:not(:disabled):not([readonly])::file-selector-button {
90
- background-color: $form-file-button-hover-bg;
91
- }
92
-
93
- &::-webkit-file-upload-button {
94
- padding: $input-padding-y $input-padding-x;
95
- margin: (-$input-padding-y) (-$input-padding-x);
96
- margin-inline-end: $input-padding-x;
97
- color: $form-file-button-color;
98
- @include gradient-bg($form-file-button-bg);
99
- pointer-events: none;
100
- border-color: inherit;
101
- border-style: solid;
102
- border-width: 0;
103
- border-inline-end-width: $input-border-width;
104
- border-radius: 0; // stylelint-disable-line property-disallowed-list
105
- @include transition($btn-transition);
106
- }
107
-
108
- &:hover:not(:disabled):not([readonly])::-webkit-file-upload-button {
109
- background-color: $form-file-button-hover-bg;
110
- }
111
- }
112
-
113
- // Form control sizing
114
- //
115
- // Build on `.form-control` with modifier classes to decrease or increase the
116
- // height and font-size of form controls.
117
- //
118
- // Repeated in `_input_group.scss` to avoid Sass extend issues.
119
-
120
- %form-control-sm {
121
- min-height: $input-height-sm;
122
- padding: $input-padding-y-sm $input-padding-x-sm;
123
- //@include font-size($input-font-size-sm);
124
- @include font-size($input-font-size);
125
- @include border-radius($input-border-radius-sm);
126
-
127
- &::file-selector-button {
128
- padding: $input-padding-y-sm $input-padding-x-sm;
129
- margin: (-$input-padding-y-sm) (-$input-padding-x-sm);
130
- margin-inline-end: $input-padding-x-sm;
131
- }
132
-
133
- &::-webkit-file-upload-button {
134
- padding: $input-padding-y-sm $input-padding-x-sm;
135
- margin: (-$input-padding-y-sm) (-$input-padding-x-sm);
136
- margin-inline-end: $input-padding-x-sm;
137
- }
138
- }
139
-
140
- %form-text {
141
- margin-top: $form-text-margin-top;
142
- @include font-size($form-text-font-size);
143
- font-style: $form-text-font-style;
144
- font-weight: $form-text-font-weight;
145
- color: $form-text-color;
146
- }
147
-
148
- %form-label {
149
- margin-bottom: $form-label-margin-bottom;
150
- @include font-size($form-label-font-size);
151
- font-style: $form-label-font-style;
152
- font-weight: $form-label-font-weight;
153
- color: $form-label-color;
154
- }
155
-
156
- %form-invalid {
157
- border-color: $danger;
158
- &:focus {
159
- border-color: $danger;
160
- }
161
- }
@@ -1,73 +0,0 @@
1
- @use "../config" as *;
2
-
3
- // Interactive list items
4
- //
5
- // Use anchor or button elements instead of `li`s or `div`s to create interactive
6
- // list items. Includes an extra `.active` modifier class for selected items.
7
-
8
- %list-group-item-action {
9
- width: 100%; // For `<button>`s (anchors become 100% by default though)
10
- color: $list-group-action-color;
11
- text-align: inherit; // For `<button>`s (anchors inherit)
12
-
13
- // Hover state
14
- &:hover,
15
- &:focus {
16
- z-index: 1; // Place hover/focus items above their siblings for proper border styling
17
- color: $list-group-action-hover-color;
18
- text-decoration: none;
19
- background-color: $list-group-hover-bg;
20
- }
21
-
22
- &:active {
23
- color: $list-group-action-active-color;
24
- background-color: $list-group-action-active-bg;
25
- }
26
- }
27
-
28
-
29
- // Individual list items
30
- //
31
- // Use on `li`s or `div`s within the `.list-group` parent.
32
-
33
- %list-group-item {
34
- position: relative;
35
- display: block;
36
- padding: $list-group-item-padding-y $list-group-item-padding-x;
37
- color: $list-group-color;
38
- text-decoration: if($link-decoration == none, null, none);
39
- background-color: $list-group-bg;
40
- border: $list-group-border-width solid $list-group-border-color;
41
-
42
- &:first-child {
43
- @include border-top-radius(inherit);
44
- }
45
-
46
- &:last-child {
47
- @include border-bottom-radius(inherit);
48
- }
49
-
50
- &.disabled,
51
- &:disabled {
52
- color: $list-group-disabled-color;
53
- pointer-events: none;
54
- background-color: $list-group-disabled-bg;
55
- }
56
-
57
- // Include both here for `<a>`s and `<button>`s
58
- &.active {
59
- z-index: 2; // Place active items above their siblings for proper border styling
60
- color: $list-group-active-color;
61
- background-color: $list-group-active-bg;
62
- border-color: $list-group-active-border-color;
63
- }
64
-
65
- & + & {
66
- border-top-width: 0;
67
-
68
- &.active {
69
- margin-top: -$list-group-border-width;
70
- border-top-width: $list-group-border-width;
71
- }
72
- }
73
- }
@@ -1,46 +0,0 @@
1
- @use "../config" as *;
2
-
3
- %table {
4
- --#{$variable-prefix}table-bg: #{$table-bg};
5
- --#{$variable-prefix}table-accent-bg: #{$table-accent-bg};
6
- --#{$variable-prefix}table-striped-color: #{$table-striped-color};
7
- --#{$variable-prefix}table-striped-bg: #{$table-striped-bg};
8
- --#{$variable-prefix}table-active-color: #{$table-active-color};
9
- --#{$variable-prefix}table-active-bg: #{$table-active-bg};
10
- --#{$variable-prefix}table-hover-color: #{$table-hover-color};
11
- --#{$variable-prefix}table-hover-bg: #{$table-hover-bg};
12
-
13
- width: 100%;
14
- margin-bottom: $spacer;
15
- color: $table-color;
16
- vertical-align: $table-cell-vertical-align;
17
- border-color: $table-border-color;
18
-
19
- // Target th & td
20
- // We need the child combinator to prevent styles leaking to nested tables which doesn't have a `.table` class.
21
- // We use the universal selectors here to simplify the selector (else we would need 6 different selectors).
22
- // Another advantage is that this generates less code and makes the selector less specific making it easier to override.
23
- // stylelint-disable-next-line selector-max-universal
24
- > :not(caption) > * > * {
25
- padding: $table-cell-padding-y $table-cell-padding-x;
26
- background-color: var(--#{$variable-prefix}table-bg);
27
- border-bottom-width: $table-border-width;
28
- box-shadow: inset 0 0 0 9999px var(--#{$variable-prefix}table-accent-bg);
29
- }
30
-
31
- > tbody {
32
- vertical-align: inherit;
33
- }
34
-
35
- > thead {
36
- vertical-align: bottom;
37
- }
38
-
39
- }
40
-
41
- %table-hover {
42
- > tbody > tr:hover > * {
43
- --#{$variable-prefix}table-accent-bg: var(--#{$variable-prefix}table-hover-bg);
44
- color: var(--#{$variable-prefix}table-hover-color);
45
- }
46
- }
@@ -1,2 +0,0 @@
1
- @import 'fontmapping-roboto';
2
- @import 'fontmapping-segoe-ui'; // Needed by Firefox
@@ -1,165 +0,0 @@
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
- }
@@ -1,110 +0,0 @@
1
- @use "../colors";
2
-
3
- @mixin scroll-y {
4
- overflow-y: auto;
5
- touch-action: pan-y, pan-x;
6
-
7
- // to enable HW acceleration and not cause repaint on scroll
8
- // opacity needed for custom scrollbar to paint
9
- will-change: scroll-position, opacity;
10
- backface-visibility: hidden;
11
-
12
- // ios momentum scrolling on iOS <= 12, cannot be used on the <body> element!
13
- &:not(body) {
14
- -webkit-overflow-scrolling: touch;
15
- }
16
-
17
- max-height: 100%;
18
- }
19
-
20
- @mixin scroll-x {
21
- overflow-x: auto;
22
- touch-action: pan-y, pan-x;
23
-
24
- // to enable HW acceleration and not cause repaint on scroll
25
- will-change: scroll-position, opacity;
26
- backface-visibility: hidden;
27
- max-width: 100%;
28
- }
29
-
30
- // custom scrollbar styling
31
- @mixin custom-scrollbar {
32
- // custom scrollbar for webkit browsers
33
- // reference https://webkit.org/blog/363/styling-scrollbars/
34
-
35
- &::-webkit-scrollbar {
36
- height: .625rem;
37
- width: .625rem;
38
- background: transparent;
39
- z-index: 999;
40
- }
41
-
42
- &::-webkit-scrollbar-track {
43
- background: transparent;
44
- }
45
-
46
- &::-webkit-scrollbar-thumb {
47
- background-color: rgba(colors.$gray-500, 0.75);
48
- border: .125rem solid transparent;
49
- border-radius: .5rem;
50
- background-clip: padding-box;
51
-
52
- &:hover {
53
- background-color: rgba(colors.$gray-700, 0.75);
54
- }
55
-
56
- &:window-inactive {
57
- background-color: rgba(colors.$gray-500, 0.5);
58
- }
59
- }
60
-
61
- // custom scrollbar for firefox
62
- scrollbar-width: thin;
63
- scrollbar-color: rgba(colors.$gray-500, 0.75) transparent;
64
- }
65
-
66
- // custom scrollbar styling
67
- @mixin thin-scrollbar {
68
- // custom scrollbar for webkit browsers
69
- &::-webkit-scrollbar {
70
- height: .375rem;
71
- width: .375rem;
72
- background: transparent;
73
- z-index: 999;
74
- }
75
-
76
- &::-webkit-scrollbar-track {
77
- background: transparent;
78
- }
79
-
80
- &::-webkit-scrollbar-thumb {
81
- background-color: rgba(colors.$gray-700, 0.75);
82
- border: 0 solid transparent;
83
- border-radius: 0;
84
- background-clip: padding-box;
85
-
86
- &:hover {
87
- background-color: rgba(colors.$gray-500, 0.75);
88
- }
89
-
90
- &:window-inactive {
91
- background-color: rgba(colors.$gray-500, 0.5);
92
- }
93
- }
94
-
95
- // custom scrollbar for firefox
96
- scrollbar-width: thin;
97
- scrollbar-color: rgba(colors.$gray-700, 0.75) transparent;
98
- }
99
-
100
- @mixin scrollbar-top-padding($scrollbar-padding) {
101
- &::-webkit-scrollbar-button:vertical:start {
102
- height: $scrollbar-padding;
103
- }
104
- }
105
-
106
- @mixin scrollbar-bottom-padding($scrollbar-padding) {
107
- &::-webkit-scrollbar-button:vertical:end {
108
- height: $scrollbar-padding;
109
- }
110
- }