@weavy/uikit-react 11.2.0 → 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 (205) hide show
  1. package/.github/workflows/publish.yml +1 -1
  2. package/changelog.md +15 -0
  3. package/dist/cjs/index.js +6 -6
  4. package/dist/cjs/index.js.map +1 -1
  5. package/dist/cjs/types/components/Image.d.ts +2 -0
  6. package/dist/cjs/types/components/PdfViewer.d.ts +6 -0
  7. package/dist/cjs/types/components/Preview.d.ts +58 -0
  8. package/dist/cjs/types/types/types.d.ts +1 -0
  9. package/dist/cjs/types/utils/fileUtilities.d.ts +16 -1
  10. package/dist/css/weavy-chat.css +2684 -0
  11. package/dist/css/weavy-messenger.css +3039 -0
  12. package/dist/css/weavy.css +3039 -0
  13. package/dist/esm/index.js +6 -6
  14. package/dist/esm/index.js.map +1 -1
  15. package/dist/esm/types/components/Image.d.ts +2 -0
  16. package/dist/esm/types/components/PdfViewer.d.ts +6 -0
  17. package/dist/esm/types/components/Preview.d.ts +58 -0
  18. package/dist/esm/types/types/types.d.ts +1 -0
  19. package/dist/esm/types/utils/fileUtilities.d.ts +16 -1
  20. package/package.json +14 -4
  21. package/rollup.config.js +0 -2
  22. package/src/components/Attachment.tsx +5 -6
  23. package/src/components/Avatar.tsx +2 -3
  24. package/src/components/Chat.tsx +3 -4
  25. package/src/components/Conversation.tsx +20 -29
  26. package/src/components/ConversationBadge.tsx +1 -2
  27. package/src/components/ConversationForm.tsx +11 -18
  28. package/src/components/ConversationList.tsx +4 -5
  29. package/src/components/ConversationListItem.tsx +11 -13
  30. package/src/components/FileBrowser.tsx +1 -2
  31. package/src/components/Image.tsx +39 -7
  32. package/src/components/MeetingCard.tsx +7 -8
  33. package/src/components/Message.tsx +12 -13
  34. package/src/components/Messages.tsx +6 -7
  35. package/src/components/Messenger.tsx +3 -4
  36. package/src/components/NewConversation.tsx +5 -7
  37. package/src/components/PdfViewer.tsx +271 -0
  38. package/src/components/Presence.tsx +2 -2
  39. package/src/components/Preview.tsx +294 -0
  40. package/src/components/Reactions.tsx +6 -7
  41. package/src/components/SearchUsers.tsx +17 -16
  42. package/src/components/SeenBy.tsx +1 -2
  43. package/src/contexts/PreviewContext.tsx +4 -6
  44. package/src/hooks/useConversation.ts +0 -1
  45. package/src/hooks/usePresence.ts +4 -5
  46. package/src/hooks/useReactions.ts +0 -1
  47. package/src/scss/theme/_alert.scss +73 -0
  48. package/src/scss/theme/_appbar.scss +112 -0
  49. package/src/scss/theme/_attachments.scss +74 -0
  50. package/src/scss/theme/_avatar.scss +54 -0
  51. package/src/scss/theme/_badge.scss +47 -0
  52. package/src/scss/theme/_buttons.scss +96 -0
  53. package/src/scss/theme/_card.scss +7 -0
  54. package/src/scss/theme/_checkbox.scss +56 -0
  55. package/src/scss/theme/_cm-editor.scss +42 -0
  56. package/src/scss/theme/_code.scss +115 -0
  57. package/src/scss/theme/_colors.scss +520 -0
  58. package/src/scss/theme/_config.scss +6 -0
  59. package/src/scss/theme/_content.scss +15 -0
  60. package/src/scss/theme/_conversations.scss +91 -0
  61. package/src/scss/theme/_dropdown.scss +86 -0
  62. package/src/scss/theme/_emoji.scss +5 -0
  63. package/src/scss/theme/_filebrowser.scss +26 -0
  64. package/src/scss/theme/_files.scss +140 -0
  65. package/src/scss/theme/_icons.scss +62 -0
  66. package/src/scss/theme/_image-grid.scss +63 -0
  67. package/src/scss/theme/_inputs.scss +28 -0
  68. package/src/scss/theme/_message-editor.scss +90 -0
  69. package/src/scss/theme/_messages.scss +238 -0
  70. package/src/scss/theme/_nav.scss +52 -0
  71. package/src/scss/theme/_overlays.scss +157 -0
  72. package/src/scss/theme/_pager.scss +19 -0
  73. package/src/scss/theme/_palette.scss +165 -0
  74. package/src/scss/theme/_pane.scss +16 -0
  75. package/src/scss/theme/_panels.scss +137 -0
  76. package/src/scss/theme/_picker-list.scss +37 -0
  77. package/src/scss/theme/_preview-embed.scss +38 -0
  78. package/src/scss/theme/_preview-html.scss +7 -0
  79. package/src/scss/theme/_preview-icon.scss +41 -0
  80. package/src/scss/theme/_preview-image.scss +86 -0
  81. package/src/scss/theme/_preview-media.scss +28 -0
  82. package/src/scss/theme/_preview-pdf.scss +838 -0
  83. package/src/scss/theme/_preview-text.scss +5 -0
  84. package/src/scss/theme/_preview.scss +105 -0
  85. package/src/scss/theme/_reactions.scss +58 -0
  86. package/src/scss/theme/_reboot.scss +41 -0
  87. package/src/scss/theme/_root.scss +2 -0
  88. package/src/scss/theme/_scroll.scss +55 -0
  89. package/src/scss/theme/_search.scss +68 -0
  90. package/src/scss/theme/_spinner.scss +63 -0
  91. package/src/scss/theme/_tables.scss +53 -0
  92. package/src/scss/theme/_toasts.scss +47 -0
  93. package/src/scss/theme/_turbo.scss +17 -0
  94. package/src/scss/theme/_typing.scss +26 -0
  95. package/src/scss/theme/_variables.scss +139 -0
  96. package/src/scss/theme/bootstrap/_accordion.scss +146 -0
  97. package/src/scss/theme/bootstrap/_alert.scss +71 -0
  98. package/src/scss/theme/bootstrap/_badge.scss +38 -0
  99. package/src/scss/theme/bootstrap/_breadcrumb.scss +40 -0
  100. package/src/scss/theme/bootstrap/_button-group.scss +142 -0
  101. package/src/scss/theme/bootstrap/_buttons.scss +186 -0
  102. package/src/scss/theme/bootstrap/_card.scss +234 -0
  103. package/src/scss/theme/bootstrap/_carousel.scss +229 -0
  104. package/src/scss/theme/bootstrap/_close.scss +40 -0
  105. package/src/scss/theme/bootstrap/_containers.scss +41 -0
  106. package/src/scss/theme/bootstrap/_dropdown.scss +248 -0
  107. package/src/scss/theme/bootstrap/_forms.scss +9 -0
  108. package/src/scss/theme/bootstrap/_functions.scss +302 -0
  109. package/src/scss/theme/bootstrap/_grid.scss +33 -0
  110. package/src/scss/theme/bootstrap/_helpers.scss +10 -0
  111. package/src/scss/theme/bootstrap/_images.scss +42 -0
  112. package/src/scss/theme/bootstrap/_list-group.scss +191 -0
  113. package/src/scss/theme/bootstrap/_maps.scss +54 -0
  114. package/src/scss/theme/bootstrap/_mixins.scss +43 -0
  115. package/src/scss/theme/bootstrap/_modal.scss +237 -0
  116. package/src/scss/theme/bootstrap/_nav.scss +172 -0
  117. package/src/scss/theme/bootstrap/_navbar.scss +276 -0
  118. package/src/scss/theme/bootstrap/_offcanvas.scss +143 -0
  119. package/src/scss/theme/bootstrap/_pagination.scss +109 -0
  120. package/src/scss/theme/bootstrap/_placeholders.scss +51 -0
  121. package/src/scss/theme/bootstrap/_popover.scss +196 -0
  122. package/src/scss/theme/bootstrap/_progress.scss +59 -0
  123. package/src/scss/theme/bootstrap/_reboot.scss +610 -0
  124. package/src/scss/theme/bootstrap/_root.scss +73 -0
  125. package/src/scss/theme/bootstrap/_spinners.scss +85 -0
  126. package/src/scss/theme/bootstrap/_tables.scss +164 -0
  127. package/src/scss/theme/bootstrap/_toasts.scss +70 -0
  128. package/src/scss/theme/bootstrap/_tooltip.scss +120 -0
  129. package/src/scss/theme/bootstrap/_transitions.scss +27 -0
  130. package/src/scss/theme/bootstrap/_type.scss +106 -0
  131. package/src/scss/theme/bootstrap/_utilities.scss +647 -0
  132. package/src/scss/theme/bootstrap/_variables.scss +1633 -0
  133. package/src/scss/theme/bootstrap/forms/_floating-labels.scss +74 -0
  134. package/src/scss/theme/bootstrap/forms/_form-check.scss +175 -0
  135. package/src/scss/theme/bootstrap/forms/_form-control.scss +194 -0
  136. package/src/scss/theme/bootstrap/forms/_form-range.scss +91 -0
  137. package/src/scss/theme/bootstrap/forms/_form-select.scss +71 -0
  138. package/src/scss/theme/bootstrap/forms/_form-text.scss +11 -0
  139. package/src/scss/theme/bootstrap/forms/_input-group.scss +129 -0
  140. package/src/scss/theme/bootstrap/forms/_labels.scss +36 -0
  141. package/src/scss/theme/bootstrap/forms/_validation.scss +12 -0
  142. package/src/scss/theme/bootstrap/helpers/_clearfix.scss +3 -0
  143. package/src/scss/theme/bootstrap/helpers/_color-bg.scss +10 -0
  144. package/src/scss/theme/bootstrap/helpers/_colored-links.scss +12 -0
  145. package/src/scss/theme/bootstrap/helpers/_position.scss +36 -0
  146. package/src/scss/theme/bootstrap/helpers/_ratio.scss +26 -0
  147. package/src/scss/theme/bootstrap/helpers/_stacks.scss +15 -0
  148. package/src/scss/theme/bootstrap/helpers/_stretched-link.scss +15 -0
  149. package/src/scss/theme/bootstrap/helpers/_text-truncation.scss +7 -0
  150. package/src/scss/theme/bootstrap/helpers/_visually-hidden.scss +8 -0
  151. package/src/scss/theme/bootstrap/helpers/_vr.scss +8 -0
  152. package/src/scss/theme/bootstrap/mixins/_alert.scss +15 -0
  153. package/src/scss/theme/bootstrap/mixins/_backdrop.scss +14 -0
  154. package/src/scss/theme/bootstrap/mixins/_banner.scss +9 -0
  155. package/src/scss/theme/bootstrap/mixins/_border-radius.scss +78 -0
  156. package/src/scss/theme/bootstrap/mixins/_box-shadow.scss +18 -0
  157. package/src/scss/theme/bootstrap/mixins/_breakpoints.scss +127 -0
  158. package/src/scss/theme/bootstrap/mixins/_buttons.scss +70 -0
  159. package/src/scss/theme/bootstrap/mixins/_caret.scss +64 -0
  160. package/src/scss/theme/bootstrap/mixins/_clearfix.scss +9 -0
  161. package/src/scss/theme/bootstrap/mixins/_color-scheme.scss +7 -0
  162. package/src/scss/theme/bootstrap/mixins/_container.scss +11 -0
  163. package/src/scss/theme/bootstrap/mixins/_deprecate.scss +10 -0
  164. package/src/scss/theme/bootstrap/mixins/_forms.scss +152 -0
  165. package/src/scss/theme/bootstrap/mixins/_gradients.scss +47 -0
  166. package/src/scss/theme/bootstrap/mixins/_grid.scss +151 -0
  167. package/src/scss/theme/bootstrap/mixins/_image.scss +16 -0
  168. package/src/scss/theme/bootstrap/mixins/_list-group.scss +24 -0
  169. package/src/scss/theme/bootstrap/mixins/_lists.scss +7 -0
  170. package/src/scss/theme/bootstrap/mixins/_pagination.scss +10 -0
  171. package/src/scss/theme/bootstrap/mixins/_reset-text.scss +17 -0
  172. package/src/scss/theme/bootstrap/mixins/_resize.scss +6 -0
  173. package/src/scss/theme/bootstrap/mixins/_table-variants.scss +24 -0
  174. package/src/scss/theme/bootstrap/mixins/_text-truncate.scss +8 -0
  175. package/src/scss/theme/bootstrap/mixins/_transition.scss +26 -0
  176. package/src/scss/theme/bootstrap/mixins/_utilities.scss +97 -0
  177. package/src/scss/theme/bootstrap/mixins/_visually-hidden.scss +29 -0
  178. package/src/scss/theme/bootstrap/utilities/_api.scss +47 -0
  179. package/src/scss/theme/bootstrap/vendor/_rfs.scss +354 -0
  180. package/src/scss/theme/bs/_badge.scss +20 -0
  181. package/src/scss/theme/bs/_buttons.scss +185 -0
  182. package/src/scss/theme/bs/_dropdown.scss +86 -0
  183. package/src/scss/theme/bs/_forms.scss +161 -0
  184. package/src/scss/theme/bs/_list-group.scss +73 -0
  185. package/src/scss/theme/bs/_tables.scss +46 -0
  186. package/src/scss/theme/fonts/_fontmapping-roboto.scss +129 -0
  187. package/src/scss/theme/fonts/_fontmapping-segoe-ui.scss +127 -0
  188. package/src/scss/theme/fonts/_index.scss +2 -0
  189. package/src/scss/theme/mixins/_backdrop.scss +13 -0
  190. package/src/scss/theme/mixins/_palette.scss +165 -0
  191. package/src/scss/theme/mixins/_position.scss +33 -0
  192. package/src/scss/theme/mixins/_scrollbar.scss +110 -0
  193. package/src/scss/weavy-chat.scss +31 -0
  194. package/src/scss/weavy-messenger.scss +60 -0
  195. package/src/scss/weavy.scss +2 -0
  196. package/src/types/types.ts +2 -0
  197. package/src/ui/Button.tsx +3 -4
  198. package/src/ui/Dropdown.tsx +4 -5
  199. package/src/ui/Icon.tsx +75 -39
  200. package/src/ui/Overlay.tsx +2 -3
  201. package/src/utils/fileUtilities.ts +280 -72
  202. package/src/utils/scrollbarDetection.js +5 -7
  203. package/dist/cjs/types/utils/styles.d.ts +0 -17
  204. package/dist/esm/types/utils/styles.d.ts +0 -17
  205. package/src/utils/styles.ts +0 -57
@@ -0,0 +1,74 @@
1
+ @use "config" as *;
2
+ @use "bs/list-group";
3
+
4
+
5
+ .wy-attachments,
6
+ .wy-meetings {
7
+ border: none;
8
+ border-radius: $border-radius-sm;
9
+ flex: 1 1 100%;
10
+ min-width: 0;
11
+
12
+ .wy-attachment,
13
+ .wy-meeting {
14
+ border-left: none;
15
+ border-right: none;
16
+ }
17
+
18
+ > * {
19
+ padding: .25rem .5rem;
20
+ }
21
+
22
+ > :first-child {
23
+ border-top: none;
24
+ }
25
+
26
+ > :last-child {
27
+ //border-top: variables.$border-width solid variables.$border-color;
28
+ border-bottom: none;
29
+ }
30
+ }
31
+
32
+ .wy-attachment,
33
+ .wy-meeting {
34
+ @extend
35
+ %list-group-item,
36
+ %list-group-item-action;
37
+
38
+ display: flex;
39
+ align-items: center;
40
+ cursor: pointer;
41
+ }
42
+
43
+ .wy-attachment-icon {
44
+ flex: 0 0 auto;
45
+ display: flex;
46
+
47
+ .wy-icon, .wy-icon-stack {
48
+ width: 3rem;
49
+ height: 3rem;
50
+ }
51
+ }
52
+
53
+ .wy-attachment-content {
54
+ flex: 1 1 100%;
55
+ min-width: 0;
56
+ margin-left: .5rem;
57
+ margin-right: .5rem;
58
+ }
59
+
60
+ .wy-attachment-title {
61
+ font-family: $headings-font-family;
62
+ font-style: $headings-font-style;
63
+ font-weight: $headings-font-weight;
64
+ color: $headings-color;
65
+ @include text-truncate();
66
+ @include font-size($h6-font-size);
67
+ margin: 0;
68
+ }
69
+
70
+ .wy-attachment-meta {
71
+ @include text-truncate();
72
+ @include font-size($small-font-size);
73
+ color: $text-muted;
74
+ }
@@ -0,0 +1,54 @@
1
+ @use "config" as *;
2
+ @use "bs/forms";
3
+
4
+ .wy-avatar {
5
+ border-radius: 50%;
6
+ }
7
+
8
+ .wy-avatar-header {
9
+ padding: 1.5rem;
10
+ margin-left: auto;
11
+ margin-right: auto;
12
+ text-align: center;
13
+ }
14
+
15
+ .wy-avatar-input {
16
+ @extend %form-control, %form-control-sm;
17
+ background: $light;
18
+ border-color: transparent;
19
+ text-align: center;
20
+ margin-left: auto;
21
+ margin-right: auto;
22
+ margin-bottom: 1.5rem;
23
+ }
24
+
25
+ .wy-avatar-presence {
26
+ position: relative;
27
+ }
28
+
29
+ .wy-avatar-display-name {
30
+ font-size: $h4-font-size;
31
+ font-weight: $display-font-weight;
32
+ line-height: $display-line-height;
33
+ text-align: center;
34
+ }
35
+
36
+
37
+ // presence indicator
38
+ .wy-presence {
39
+ display: none; // initially hidden
40
+ background-color: $gray-100;
41
+ width: .75rem;
42
+ height: .75rem;
43
+ border-radius: 50%;
44
+ outline: .125rem solid $white;
45
+ position: absolute;
46
+ bottom: 0;
47
+ right: -5%;
48
+ }
49
+
50
+ // online
51
+ .wy-presence-active {
52
+ background-color: $green-400;
53
+ display: block;
54
+ }
@@ -0,0 +1,47 @@
1
+ @use "config" as *;
2
+ @use "bs/badge";
3
+
4
+
5
+ .wy-badge {
6
+ @extend %badge;
7
+ border-radius: 50rem;
8
+ background-color: $primary;
9
+ }
10
+
11
+ .wy-badge-success {
12
+ background-color: $success;
13
+ }
14
+
15
+ .wy-badge-warning {
16
+ background-color: $warning;
17
+ }
18
+
19
+ .wy-badge-danger {
20
+ background-color: $danger;
21
+ }
22
+
23
+ .wy-button {
24
+ position: relative; // so that we can position .badge
25
+
26
+ // badge, e.g. notification count
27
+ .wy-badge {
28
+ font-size: $font-size-xs;
29
+ position: absolute;
30
+ right: 0;
31
+ top: 0;
32
+ border-radius: 1rem;
33
+ margin: 0;
34
+ padding: .25rem;
35
+ min-width: 1rem;
36
+ max-width: 2rem;
37
+ height: 1rem;
38
+ line-height: .5rem;
39
+ display: block;
40
+ text-align: center;
41
+ @include text-truncate();
42
+
43
+ &:empty {
44
+ display: none;
45
+ }
46
+ }
47
+ }
@@ -0,0 +1,96 @@
1
+ @use "config" as *;
2
+ @use "bs/buttons";
3
+
4
+ // basic unstyled button with support for icon and text
5
+ .wy-button {
6
+ @extend %btn;
7
+
8
+ display: inline-flex;
9
+ align-items: center;
10
+ justify-content: center;
11
+ gap: .25rem;
12
+
13
+ // align icons
14
+ &:not(.wy-button-icon) {
15
+ .wy-icon {
16
+ &:first-child {
17
+ margin-left: -.25rem;
18
+ }
19
+
20
+ &:last-child {
21
+ margin-right: -.25rem;
22
+ }
23
+ }
24
+ }
25
+
26
+ }
27
+
28
+ // default button
29
+ .wy-button:not(.wy-button-link, .wy-button-primary) {
30
+ --#{$prefix}btn-hover-border-color: transparent;
31
+ --#{$prefix}btn-active-border-color: transparent;
32
+ --#{$prefix}btn-hover-color: var(--#{$prefix}btn-color);
33
+ --#{$prefix}btn-hover-bg: #{$btn-hover-bg};
34
+ --#{$prefix}btn-focus-bg: #{$btn-hover-bg};
35
+ --#{$prefix}btn-active-color: var(--#{$prefix}btn-color);
36
+ --#{$prefix}btn-active-bg: #{$btn-active-bg};
37
+
38
+ // dark mode
39
+ .wy-dark & {
40
+ color: var(--#{$prefix}white);
41
+ }
42
+ }
43
+
44
+ // button with only icon (no text)
45
+ .wy-button-icon {
46
+ width: 2rem;
47
+ height: 2rem;
48
+ padding: .25rem;
49
+ line-height: 1;
50
+ border-radius: 50%;
51
+ border-width: 0;
52
+ }
53
+
54
+ // default icon button
55
+ .wy-button-icon:not(.wy-button-primary) {
56
+ color: $icon-color;
57
+
58
+ &:hover {
59
+ .wy-icon {
60
+ color: $icon-hover-color;
61
+ }
62
+ }
63
+
64
+ // dark mode
65
+ .wy-dark & {
66
+ color: $icon-light-color;
67
+ .wy-icon {
68
+ color: $icon-light-color;
69
+ }
70
+
71
+ &:hover {
72
+ color: $icon-light-hover-color;
73
+ .wy-icon {
74
+ color: $icon-light-hover-color;
75
+ }
76
+ }
77
+ }
78
+ }
79
+
80
+ // primary button
81
+ .wy-button-primary {
82
+ @extend %btn-primary;
83
+ }
84
+
85
+ // button that looks and behaves like a link
86
+ .wy-button-link {
87
+ @extend %btn-link;
88
+ }
89
+
90
+ // container for proper spacing and alignment of buttons
91
+ .wy-buttons {
92
+ display: flex;
93
+ align-items: center;
94
+ flex-wrap: wrap;
95
+ gap: .5rem;
96
+ }
@@ -0,0 +1,7 @@
1
+ .wy-card-header {
2
+ border-bottom: none;
3
+ }
4
+
5
+ .wy-card-footer {
6
+ border-top: none;
7
+ }
@@ -0,0 +1,56 @@
1
+ @use "config" as *;
2
+
3
+ // Include mixin in the relative class that should be suffixed with -check
4
+ @mixin button-check {
5
+
6
+ // From bootstrap/scss/forms/_form_check
7
+ &-check {
8
+ position: absolute;
9
+ clip: rect(0, 0, 0, 0);
10
+ pointer-events: none;
11
+
12
+ &[disabled] + &,
13
+ &:disabled + & {
14
+ pointer-events: none;
15
+ filter: none;
16
+ opacity: $form-check-btn-check-disabled-opacity;
17
+ }
18
+ }
19
+
20
+ // From bootstrap/scss/_buttons
21
+ &-check:focus + &,
22
+ &:focus {
23
+ outline: 0;
24
+ box-shadow: $btn-focus-box-shadow;
25
+ }
26
+ &-check:checked + &,
27
+ &-check:active + & {
28
+ @include box-shadow($btn-active-box-shadow);
29
+
30
+ &:focus {
31
+ @include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow);
32
+ }
33
+ }
34
+
35
+ // Custom icons
36
+ &-check + .#{wy}-button-icon {
37
+ svg:last-child {
38
+ display: none;
39
+ }
40
+ }
41
+
42
+ &-check:checked + .#{wy}-button-icon {
43
+ svg:first-child {
44
+ display: none;
45
+ }
46
+
47
+ svg:last-child {
48
+ display: inline-block;
49
+ }
50
+ }
51
+ }
52
+
53
+ // Create a suffixed subclass from .wy-button -> .wy-button-check
54
+ .wy-button {
55
+ @include button-check;
56
+ }
@@ -0,0 +1,42 @@
1
+ @use "config" as *;
2
+ @use "mixins/scrollbar";
3
+ @use "message-editor";
4
+
5
+ .ͼ1 .cm-scroller {
6
+ font-family: unset;
7
+ line-height: 1.25;
8
+ }
9
+
10
+ .ͼ1 .cm-widgetBuffer {
11
+ vertical-align: unset;
12
+ }
13
+
14
+ .cm-editor {
15
+ @extend %message-editor-textfield;
16
+
17
+ &.cm-focused {
18
+ /* default theme in codemirror seems difficult to override */
19
+ outline: $light solid 1px !important;
20
+ }
21
+
22
+ .cm-content {
23
+ @extend %message-editor-textcontent;
24
+ }
25
+
26
+ .cm-scroller {
27
+ overflow: auto;
28
+
29
+ .wy-scrollbars & {
30
+ @include scrollbar.custom-scrollbar;
31
+ }
32
+ }
33
+ }
34
+
35
+ textarea.is-invalid + [data-editor-target] .cm-editor {
36
+ padding-right: $input-height-inner;
37
+ background-image: escape-svg($form-feedback-icon-invalid);
38
+ background-repeat: no-repeat;
39
+ background-position: right $input-height-inner-quarter top $input-height-inner-quarter;
40
+ background-size: $input-height-inner-half $input-height-inner-half;
41
+ outline-color: $form-feedback-invalid-color !important;
42
+ }
@@ -0,0 +1,115 @@
1
+ @use "config" as *;
2
+
3
+ // custom theme for syntax highlighting with Prism
4
+ code[class*="language-"], pre[class*="language-"] {
5
+ color: $pre-color;
6
+ font-family: $font-family-code;
7
+ font-size: 1em;
8
+ direction: ltr;
9
+ text-align: left;
10
+ white-space: pre;
11
+ word-spacing: normal;
12
+ word-break: normal;
13
+ line-height: $line-height-base;
14
+ tab-size: 4;
15
+ hyphens: none;
16
+ }
17
+
18
+ pre[class*="language-"] {
19
+ background: $white;
20
+ font-size: $code-font-size;
21
+ padding: 1rem;
22
+ margin: 0.5rem 0;
23
+ overflow: auto;
24
+ }
25
+
26
+ // token colors from https://github.com/PrismJS/prism-themes/blob/master/themes/prism-vs.css
27
+ .token.comment,
28
+ .token.prolog,
29
+ .token.doctype,
30
+ .token.cdata {
31
+ color: #008000;
32
+ font-style: italic;
33
+ }
34
+
35
+ .token.namespace {
36
+ opacity: .7;
37
+ }
38
+
39
+ .token.string {
40
+ color: #A31515;
41
+ }
42
+
43
+ .token.punctuation,
44
+ .token.operator {
45
+ color: $pre-color;
46
+ }
47
+
48
+ .token.url,
49
+ .token.symbol,
50
+ .token.number,
51
+ .token.boolean,
52
+ .token.variable,
53
+ .token.constant,
54
+ .token.inserted {
55
+ color: #36acaa;
56
+ }
57
+
58
+ .token.atrule,
59
+ .token.keyword,
60
+ .token.attr-value,
61
+ .language-autohotkey .token.selector,
62
+ .language-json .token.boolean,
63
+ .language-json .token.number,
64
+ code[class*="language-css"] {
65
+ color: #0000ff;
66
+ }
67
+
68
+ .token.function {
69
+ color: $pre-color;
70
+ }
71
+
72
+ .token.deleted,
73
+ .language-autohotkey .token.tag {
74
+ color: #9a050f;
75
+ }
76
+
77
+ .token.selector,
78
+ .language-autohotkey .token.keyword {
79
+ color: #00009f;
80
+ }
81
+
82
+ .token.important {
83
+ color: #e90;
84
+ }
85
+
86
+ .token.important,
87
+ .token.bold {
88
+ font-weight: $font-weight-bold;
89
+ }
90
+
91
+ .token.italic {
92
+ font-style: italic;
93
+ }
94
+
95
+ .token.class-name,
96
+ .language-json .token.property {
97
+ color: #2B91AF;
98
+ }
99
+
100
+ .token.tag,
101
+ .token.selector {
102
+ color: #800000;
103
+ }
104
+
105
+ .token.attr-name,
106
+ .token.property,
107
+ .token.regex,
108
+ .token.entity {
109
+ color: #ff0000;
110
+ }
111
+
112
+ .token.directive.tag .tag {
113
+ background: #ffff00;
114
+ color: $pre-color;
115
+ }