@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,137 @@
1
+ @use "config" as *;
2
+ @use "mixins/backdrop";
3
+
4
+ .wy-panels {
5
+ position: absolute;
6
+ top: 0;
7
+ right: 0;
8
+ bottom: 0;
9
+ left: 0;
10
+ overscroll-behavior: contain;
11
+ overflow-y: auto;
12
+ overflow-x: hidden;
13
+ }
14
+
15
+ .wy-panel {
16
+ position: absolute;
17
+ top: 0;
18
+ right: 0;
19
+ bottom: 0;
20
+ left: 0;
21
+ pointer-events: none;
22
+ overflow: hidden;
23
+ background-color: rgba(mix($white, #FFF), $opacity-backdrop);
24
+ display: flex;
25
+ flex-direction: column;
26
+
27
+ .wy-controls {
28
+ top: .5rem;
29
+ left: .5rem;
30
+ min-width: 2rem;
31
+ width: auto;
32
+ display: flex;
33
+ z-index: 10000;
34
+ order: -1;
35
+ flex-direction: row-reverse;
36
+
37
+ &:empty {
38
+ display: none;
39
+ }
40
+
41
+ .wy-icon {
42
+ color: $icon-color;
43
+ }
44
+
45
+ border-bottom: 1px solid $border-color;
46
+ }
47
+
48
+ .wy-panel-frame {
49
+ transition: opacity .1s .2s $md-animation-curve-default;
50
+ opacity: 1;
51
+ }
52
+
53
+ &:not(.wy-loaded) .wy-panel-frame {
54
+ opacity: 0;
55
+ transition: opacity .2s .1s step-start;
56
+ }
57
+
58
+ &.wy-open {
59
+ pointer-events: all;
60
+ z-index: 5;
61
+
62
+ &[data-title]::before {
63
+ content: attr(data-title);
64
+ position: absolute;
65
+ top: 0;
66
+ left: 0;
67
+ right: 0;
68
+ height: ($appbar-height - .0625rem);
69
+ opacity: 0;
70
+ pointer-events: none;
71
+ display: flex;
72
+ align-items: center;
73
+ justify-content: center;
74
+ background-color: rgba($gray-50, $opacity-backdrop);
75
+ color: $navbar-light-color;
76
+ border-bottom: $border-width solid $border-color;
77
+ transition: opacity .1s .2s step-end;
78
+ font-family: $font-family-base;
79
+ line-height: $line-height-base;
80
+ font-weight: $font-weight-base;
81
+
82
+ @include backdrop.filter;
83
+ }
84
+
85
+ &::after {
86
+ content: '';
87
+ position: absolute;
88
+ top: 0;
89
+ bottom: 0;
90
+ left: 0;
91
+ right: 0;
92
+ pointer-events: none;
93
+ opacity: 0;
94
+ transition: opacity $md-animation-duration $md-animation-curve-default 0s;
95
+ }
96
+
97
+ &.wy-loading {
98
+ &[data-title]::before {
99
+ transition: opacity $md-animation-duration $md-animation-curve-default;
100
+ opacity: 1;
101
+ }
102
+
103
+ &::after {
104
+ transition: opacity $md-animation-duration $md-animation-curve-default .5s;
105
+ opacity: 1;
106
+ // spinner.svg encoded with https://codepen.io/jakob-e/pen/doMoML
107
+ background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' width='24' height='24' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cstyle type='text/css'%3Eg%7Banimation:rotate 2s linear infinite;transform-origin:center center%7Dcircle%7Bstroke-dasharray:1,100;stroke-dashoffset:0;animation:dash 1.5s ease-in-out infinite,color 6s ease-in-out infinite%7D@keyframes rotate%7B100%25%7Btransform:rotate(360deg)%7D%7D@keyframes dash%7B0%25%7Bstroke-dasharray:1,100;stroke-dashoffset:0%7D50%25%7Bstroke-dasharray:44.5,100;stroke-dashoffset:-17.5px%7D100%25%7Bstroke-dasharray:44.5,100;stroke-dashoffset:-62px%7D%7D@keyframes color%7B0%25,100%25%7Bstroke:%23216eb4%7D40%25%7Bstroke:%2328b7cf%7D66%25%7Bstroke:%23216eb4%7D80%25,90%25%7Bstroke:%2328b7cf%7D%7D%3C/style%3E%3Cg%3E%3Ccircle fill='none' cx='12' cy='12' r='11' stroke-linecap='butt' stroke-width='2' /%3E%3C/g%3E%3C/svg%3E");
108
+ background-repeat: no-repeat;
109
+ background-position: 50%;
110
+ background-size: rem(2);
111
+ background-color: transparent;
112
+ }
113
+ }
114
+ }
115
+ }
116
+
117
+ // Transitions
118
+ .wy-panel {
119
+ opacity: 0;
120
+ visibility: hidden;
121
+ transition: opacity $md-animation-duration-fast $md-animation-curve-default .01s, transform $md-animation-duration-fast $md-animation-curve-default .01s, visibility .01s step-end $md-animation-duration-fast;
122
+
123
+ &.wy-open {
124
+ transition: opacity $md-animation-duration $md-animation-curve-default, transform $md-animation-duration $md-animation-curve-default, visibility $md-animation-duration step-start;
125
+ visibility: visible;
126
+
127
+ &.wy-transition {
128
+ opacity: 1;
129
+ transform: none;
130
+ }
131
+ }
132
+ }
133
+
134
+ .wy-panel-frame {
135
+ flex: 1 1 100%;
136
+ border: 0;
137
+ }
@@ -0,0 +1,37 @@
1
+ @use "config" as *;
2
+
3
+
4
+ .wy-picker-list {
5
+ border: none;
6
+
7
+ > .wy-picker-list-item:first-child, > :first-child .wy-picker-list-item {
8
+ border-top: none;
9
+ }
10
+
11
+ > .wy-picker-list-item:last-child, > :last-child .wy-picker-list-item {
12
+ //border-top: $border-width solid $border-color;
13
+ border-bottom: none;
14
+ }
15
+ }
16
+
17
+ .wy-picker-list-item {
18
+ display: flex;
19
+ align-items: center;
20
+ padding: .25rem .5rem;
21
+
22
+ > .wy-icon {
23
+ margin-left: .25rem;
24
+ margin-right: .25rem;
25
+ flex: 0 0 auto;
26
+ }
27
+
28
+ > button {
29
+ margin-block-start: auto;
30
+ flex: 0 0 auto;
31
+ }
32
+ }
33
+
34
+ .wy-picker-list-item-title {
35
+ flex-grow: 1;
36
+ @include text-truncate();
37
+ }
@@ -0,0 +1,38 @@
1
+ @use "variables" as *;
2
+
3
+ // Embedded iframes
4
+
5
+ .wy-content-iframe, [data-controller~="embed"] {
6
+ border: 0;
7
+ display: block;
8
+ width: 100%;
9
+ height: 100%;
10
+ flex: 1 1 100%;
11
+
12
+ &:not(.wy-loading):not([data-controller~="embed"]), &[data-controller~="embed"].wy-loaded {
13
+ background: $white;
14
+
15
+ ~ .wy-content-iframe-fallback, ~ .wy-spinner {
16
+ display: none;
17
+ }
18
+ }
19
+
20
+ &.wy-loading:not(.wy-loaded), &[data-controller~="embed"]:not(.wy-loaded) {
21
+ position: absolute;
22
+ visibility: hidden;
23
+ z-index: -1;
24
+ pointer-events: none;
25
+
26
+ &:not(.wy-fallback) ~ .wy-content-iframe-fallback {
27
+ display: none;
28
+ }
29
+
30
+ &.wy-fallback ~ .wy-spinner {
31
+ display: none;
32
+ }
33
+ }
34
+
35
+ ~ .wy-spinner {
36
+ margin: auto;
37
+ }
38
+ }
@@ -0,0 +1,7 @@
1
+ // markdown or code with syntax highlighting
2
+ .wy-content-html {
3
+ pre, code {
4
+ word-break: break-word;
5
+ white-space: pre-wrap;
6
+ }
7
+ }
@@ -0,0 +1,41 @@
1
+ @use "variables" as *;
2
+
3
+
4
+ // big file type icon
5
+ .wy-content-icon {
6
+ background-color: $body-bg;
7
+ border-radius: $border-radius-lg;
8
+
9
+ display: flex;
10
+ align-items: center;
11
+ flex-direction: column;
12
+
13
+ text-align: center;
14
+ padding: 1rem 2rem;
15
+
16
+ .wy-icon-stack, .wy-icon {
17
+ width: 8rem;
18
+ height: 8rem;
19
+ }
20
+
21
+ .wy-dark & {
22
+ background-color: rgba($dark, $opacity-backdrop);
23
+ color: $navbar-dark-color;
24
+
25
+ a {
26
+ color: $primary-300;
27
+ }
28
+ .wy-icon {
29
+ color: $icon-light-color;
30
+ }
31
+
32
+ .wy-icon-stack {
33
+ .wy-icon:last-child {
34
+ background-color: rgba($dark, $opacity-backdrop);
35
+ }
36
+ }
37
+
38
+ }
39
+
40
+ }
41
+
@@ -0,0 +1,86 @@
1
+ @use "variables" as *;
2
+
3
+ .wy-content-image {
4
+ min-width: 0;
5
+ display: flex;
6
+ align-items: center;
7
+ justify-content: center;
8
+ position: relative;
9
+ margin: auto;
10
+ max-height: 100%;
11
+ max-width: 100%;
12
+
13
+ &.wy-intrinsic-image {
14
+ object-fit: scale-down;
15
+ }
16
+
17
+ &:not(.wy-intrinsic-image) {
18
+ height: 100%;
19
+ width: 100%;
20
+ // Similar to object-fit: contain; but works for divs. Must subtract margins.
21
+ --max-width: #{'min(calc((100vh - 3rem - 1px) * (var(--width) / var(--height))), calc(var(--width) * 1px), 100%)'};
22
+ --max-height: #{'min(calc(100vw * (var(--height) / var(--width))), calc(var(--height) * 1px), 100%)'};
23
+ /* // With sidebar
24
+ body.controller-content & {
25
+ --max-width: #{'min(calc((100vh - 6rem) * (var(--width) / var(--height))), calc(var(--width) * 1px), 100%)'};
26
+ --max-height: #{'min(calc(100vw * (var(--height) / var(--width))), calc(var(--height) * 1px), 100%)'};
27
+
28
+ @include bs.media-breakpoint-up(lg) {
29
+ --max-width: #{'min(calc((100vh - 3rem) * (var(--width) / var(--height))), calc(var(--width) * 1px), 100%)'};
30
+ --max-height: #{'min(calc((100vw - 20rem) * (var(--height) / var(--width))), calc(var(--height) * 1px), 100%)'};
31
+ }
32
+ } */
33
+
34
+ max-width: var(--max-width);
35
+ max-height: var(--max-height);
36
+ transition: transform $md-animation-duration $md-animation-curve-default, transform-origin $md-animation-duration step-end;
37
+ //cursor: zoom-in;
38
+ }
39
+
40
+
41
+ &.wy-zoom {
42
+ cursor: zoom-out;
43
+ transition: transform $md-animation-duration $md-animation-curve-default, transform-origin $md-animation-duration step-start;
44
+ }
45
+
46
+ img {
47
+ //object-fit: contain;
48
+ min-width: 0;
49
+ min-height: 0;
50
+ width: 100%;
51
+ height: 100%;
52
+
53
+ &:not(.wy-loading-transition):not([data-controller~="image"]) ~ .wy-spinner {
54
+ display: none;
55
+ }
56
+
57
+ &.wy-loading, &[data-controller~="image"] {
58
+ transition: opacity 0.15s ease-out;
59
+ opacity: 0;
60
+
61
+ &.wy-loaded {
62
+ opacity: 1;
63
+ transition: opacity 0.15s ease-out;
64
+
65
+ ~ img {
66
+ // hide any previous images/thumbs, wait for loaded image transition
67
+ transition-delay: 0.15s;
68
+ opacity: 0;
69
+ }
70
+
71
+ ~ .wy-spinner {
72
+ display: none;
73
+ }
74
+ }
75
+ }
76
+
77
+ &.wy-responsive-image-thumb {
78
+ position: absolute;
79
+ z-index: -1;
80
+ }
81
+
82
+ ~ .wy-spinner {
83
+ position: absolute;
84
+ }
85
+ }
86
+ }
@@ -0,0 +1,28 @@
1
+ // Video and audio
2
+ .wy-content-video {
3
+ &:not(.wy-error) {
4
+ min-height: 0;
5
+ max-width: 100%;
6
+ max-height: 100%;
7
+ }
8
+ }
9
+
10
+ .wy-content-video, .wy-content-audio {
11
+ margin: auto;
12
+
13
+ &.wy-loading, &[data-controller~="media"] {
14
+ &:not(.wy-loaded) {
15
+ visibility: hidden;
16
+ }
17
+
18
+ &.wy-loaded {
19
+ ~ .wy-spinner {
20
+ display: none;
21
+ }
22
+ }
23
+ }
24
+
25
+ &:focus {
26
+ outline: none;
27
+ }
28
+ }