@hmcts/media-viewer 4.2.41 → 4.2.42-CME-776-dart-angular-20-rc1

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.
Binary file
package/README.md CHANGED
@@ -495,14 +495,14 @@ Add these styles to your component.scss if you need them.
495
495
  If you're writing your own toolbar styles then do not import those
496
496
 
497
497
  ```
498
- // Import GOV.UK Frontend
499
- @import "~govuk-frontend/govuk/all";
500
- // Import Media Viewer Styles
501
- @import "~media-viewer/src/assets/all"; // use this to import all the styles
498
+ // Load GOV.UK Frontend
499
+ @use "govuk-frontend/govuk/all" as *;
500
+ // Load Media Viewer Styles
501
+ @use "media-viewer/src/assets/all"; // use this to load all the styles
502
502
  ```
503
503
  Alternatively, it is possible to import file by file as required from ```assets/sass``` directory
504
504
 
505
- eg. ```~media-viewer/assets/sass/toolbar/main```
505
+ eg. ```media-viewer/assets/sass/toolbar/main```
506
506
 
507
507
  ## Customisations
508
508
  ### Toolbar
package/assets/all.scss CHANGED
@@ -1,36 +1,34 @@
1
1
  // CDK overlays require a small set of structural styles to work correctly
2
2
  // As the component is not yet using Angular Material we have to include the style ourself
3
3
  // see https://material.angular.io/cdk/overlay/overview
4
- @import 'node_modules/@angular/cdk/overlay-prebuilt';
4
+ @use '@angular/cdk/overlay-prebuilt';
5
5
 
6
- @import 'sass/settings';
7
- @import "sass/annotation-set";
8
- @import 'sass/bookmarks.scss';
9
- @import "sass/box-highlight";
10
- @import "sass/bookmarks";
11
- @import "sass/comment";
12
- @import "sass/comment-search";
13
- @import "sass/comment-set-header";
14
- @import "sass/comment-set-panel";
15
- @import "sass/comment-set-toggle";
16
- @import "sass/comments-summary-dialog";
17
- @import "sass/confirm-action-dialog";
18
- @import 'sass/document';
19
- @import "sass/image-viewer";
20
- @import 'sass/media-viewer';
21
- @import 'sass/outline-attachment';
22
- @import 'sass/participants-list';
23
- @import "sass/pdf-viewer";
24
- @import "sass/popup-toolbar";
25
- @import "sass/rectangle";
26
- @import "sass/tags";
27
- @import "sass/toolbar/main";
28
- @import 'sass/tabs';
29
- @import 'sass/tooltip';
30
- @import 'sass/comment-filter';
31
- @import 'sass/angular-tree-component';
32
- @import 'sass/redaction';
33
- @import 'pdfjs/pdf_viewer';
6
+ @use 'sass/annotation-set';
7
+ @use 'sass/bookmarks';
8
+ @use 'sass/box-highlight';
9
+ @use 'sass/comment';
10
+ @use 'sass/comment-search';
11
+ @use 'sass/comment-set-header';
12
+ @use 'sass/comment-set-panel';
13
+ @use 'sass/comment-set-toggle';
14
+ @use 'sass/comments-summary-dialog';
15
+ @use 'sass/confirm-action-dialog';
16
+ @use 'sass/document';
17
+ @use 'sass/image-viewer';
18
+ @use 'sass/media-viewer';
19
+ @use 'sass/outline-attachment';
20
+ @use 'sass/participants-list';
21
+ @use 'sass/pdf-viewer';
22
+ @use 'sass/popup-toolbar';
23
+ @use 'sass/rectangle';
24
+ @use 'sass/tags';
25
+ @use 'sass/toolbar/main';
26
+ @use 'sass/tabs';
27
+ @use 'sass/tooltip';
28
+ @use 'sass/comment-filter';
29
+ @use 'sass/angular-tree-component';
30
+ @use 'sass/redaction';
31
+ @use 'pdfjs/pdf_viewer';
34
32
  div.govuk-prose-scope, p {
35
33
  white-space: pre-wrap;
36
34
  }
@@ -1,3 +1,5 @@
1
+ @use "govuk-frontend/govuk/base" as *;
2
+
1
3
  .comment-filter {
2
4
  border: none;
3
5
  margin-bottom: 20px;
@@ -72,8 +74,10 @@
72
74
  font-weight: bold;
73
75
  position: relative;
74
76
  @include govuk-font($size: 19);
75
- color: govuk-colour("blue");
76
- cursor: pointer;
77
+ & {
78
+ color: govuk-colour("blue");
79
+ cursor: pointer;
80
+ }
77
81
 
78
82
  }
79
83
 
@@ -1,3 +1,5 @@
1
+ @use "govuk-frontend/govuk/base" as *;
2
+
1
3
  a.disabledLink {
2
4
  pointer-events: none;
3
5
  cursor: default;
@@ -1,3 +1,5 @@
1
+ @use "govuk-frontend/govuk/base" as *;
2
+
1
3
  .commentSummaryHeader {
2
4
  .has-scroll-bar & {
3
5
  right: 14px
@@ -1,3 +1,5 @@
1
+ @use "govuk-frontend/govuk/base" as *;
2
+
1
3
  mv-anno-comment {
2
4
  .aui-comment {
3
5
  width: 85%;
@@ -100,14 +102,18 @@ mv-anno-comment {
100
102
 
101
103
  .aui-comment__author {
102
104
  @include govuk-font($size: 19);
103
- display: block;
104
- font-weight: bold;
105
+ & {
106
+ display: block;
107
+ font-weight: bold;
108
+ }
105
109
  }
106
110
 
107
111
 
108
112
  .aui-comment__meta {
109
113
  @include govuk-font($size: 16);
110
- color: $govuk-secondary-text-colour;
114
+ & {
115
+ color: $govuk-secondary-text-colour;
116
+ }
111
117
  }
112
118
 
113
119
  .aui-comment__footer {
@@ -33,11 +33,11 @@
33
33
  mv-confirm-action,
34
34
  mv-comments-summary {
35
35
  .dates {
36
+ overflow: hidden;
37
+ clear: both;
36
38
  * {
37
39
  font-size: 16px;
38
40
  }
39
- overflow: hidden;
40
- clear: both;
41
41
  .dates__from, .dates__to, .dates__tags {
42
42
  float: left;
43
43
  }
@@ -1,3 +1,6 @@
1
+ @use "govuk-frontend/govuk/base" as *;
2
+ @use "settings" as *;
3
+
1
4
  .aui {
2
5
 
3
6
  &--show-comments {
@@ -57,28 +60,32 @@
57
60
 
58
61
  .aui__toolbar-container {
59
62
  @include aui-width-container;
60
- border-left:1px solid govuk-colour("light-grey");
61
- border-right: 1px solid govuk-colour("light-grey");
62
- height: 100%;
63
- position: relative;
64
- left: 0; top: 0;
65
- z-index: 1;
63
+ & {
64
+ border-left:1px solid govuk-colour("light-grey");
65
+ border-right: 1px solid govuk-colour("light-grey");
66
+ height: 100%;
67
+ position: relative;
68
+ left: 0; top: 0;
69
+ z-index: 1;
70
+ }
66
71
  }
67
72
 
68
73
 
69
74
  .aui__toolbar-button {
70
75
  @include govuk-font($size: 19);
71
- background-color: govuk-colour("white");
72
- border: 0 none;
73
- border: 1px solid #f00;
74
- color: govuk-colour("black");
75
- cursor: pointer;
76
- float: left;
77
- height: 50px;
78
- margin: 0;
79
- padding-left: 15px;
80
- padding-right: 15px;
81
- position: relative;
76
+ & {
77
+ background-color: govuk-colour("white");
78
+ border: 0 none;
79
+ border: 1px solid #f00;
80
+ color: govuk-colour("black");
81
+ cursor: pointer;
82
+ float: left;
83
+ height: 50px;
84
+ margin: 0;
85
+ padding-left: 15px;
86
+ padding-right: 15px;
87
+ position: relative;
88
+ }
82
89
  &:first-child {
83
90
  &::after {
84
91
  background-color: #DEE0E2;
@@ -161,7 +168,9 @@
161
168
  .aui__window-container {
162
169
  @include aui-width-container;
163
170
  @include govuk-clearfix;
164
- position: relative;
171
+ & {
172
+ position: relative;
173
+ }
165
174
  }
166
175
 
167
176
 
@@ -190,7 +199,9 @@
190
199
 
191
200
  .aui__document-page {
192
201
  @include aspect-ratio(1,1.414); // True A4 aspect ratio
193
- margin-top: govuk-spacing(4);
202
+ & {
203
+ margin-top: govuk-spacing(4);
204
+ }
194
205
 
195
206
  &:first-child {
196
207
  margin-top: 0;
@@ -198,11 +209,13 @@
198
209
 
199
210
  &[data-page]::after {
200
211
  @include govuk-font(16);
201
- color: $govuk-secondary-text-colour;
202
- content: attr(data-page);
203
- line-height: 1;
204
- position: absolute; right: govuk-spacing(4);
205
- bottom: govuk-spacing(4);
212
+ & {
213
+ color: $govuk-secondary-text-colour;
214
+ content: attr(data-page);
215
+ line-height: 1;
216
+ position: absolute; right: govuk-spacing(4);
217
+ bottom: govuk-spacing(4);
218
+ }
206
219
  }
207
220
 
208
221
  img {
@@ -239,4 +252,3 @@
239
252
  }
240
253
 
241
254
  }
242
-
@@ -1,3 +1,5 @@
1
+ @use "govuk-frontend/govuk/base" as *;
2
+
1
3
  mv-participants-list {
2
4
 
3
5
  .participant__card {
@@ -21,8 +23,10 @@ mv-participants-list {
21
23
  border-bottom: 1px solid #ddd;
22
24
  margin-bottom: govuk-spacing(1);
23
25
  @include govuk-font($size: 16);
24
- display: block;
25
- font-weight: bold;
26
+ & {
27
+ display: block;
28
+ font-weight: bold;
29
+ }
26
30
  }
27
31
 
28
32
  .participant__name {
@@ -2,15 +2,23 @@
2
2
  #GENERAL CONFIGURATIONS
3
3
  ========================================================================== */
4
4
 
5
+ @use "sass:math";
6
+ @use "govuk-frontend/govuk/base" as *;
7
+
5
8
  $aui-page-width: 1220px;
6
9
  $aui-gutter: govuk-spacing(6);
7
- $aui-gutter-half: $govuk-gutter / 2;
10
+ $aui-gutter-half: math.div($govuk-gutter, 2);
8
11
 
9
12
  // Assets path
10
13
  $aui-assets-path : "/public/images/";
11
14
 
12
15
  @mixin aspect-ratio($ratio-or-width, $height: null) {
13
- $padding: if($height, percentage($height/$ratio-or-width), percentage(1/$ratio-or-width));
16
+ $padding: null;
17
+ @if $height {
18
+ $padding: math.percentage(math.div($height, $ratio-or-width));
19
+ } @else {
20
+ $padding: math.percentage(math.div(1, $ratio-or-width));
21
+ }
14
22
  &:before { content:''; float: left; padding-bottom: $padding; }
15
23
  &:after { content:''; display: table; clear: both; }
16
24
  }
@@ -1,3 +1,5 @@
1
+ @use "govuk-frontend/govuk/base" as *;
2
+
1
3
  .govuk-tabs {
2
4
  p{
3
5
  @include govuk-font($size: 16);
@@ -1,3 +1,6 @@
1
+ @use "sass:color";
2
+ @use "node_modules/ngx-chips/core/styles/core/core" as *;
3
+
1
4
  .tags {
2
5
  margin-bottom: 10px;
3
6
  &__renderer {
@@ -18,10 +21,8 @@
18
21
  }
19
22
 
20
23
 
21
- @import "node_modules/ngx-chips/core/styles/core/core";
22
-
23
24
  $foundation-primary: #1779ba;
24
- $foundation-primary-dark: darken($foundation-primary, 10%);
25
+ $foundation-primary-dark: color.adjust($foundation-primary, $lightness: -10%);
25
26
 
26
27
  $foundation-theme: (
27
28
  container-border-bottom: 1px solid $foundation-primary
@@ -84,4 +85,3 @@ button {
84
85
 
85
86
  }
86
87
  }
87
-
@@ -1,18 +1,18 @@
1
- @import "buttons";
2
- @import "side-bar";
3
- @import "search-bar";
4
- @import "sub-toolbar";
5
- @import "thumbnail";
6
- @import "dialog-overlay";
7
- @import "field-label";
8
- @import "loading-bar";
9
- @import "debugging";
10
- @import "text-selection";
11
- @import "media";
12
- @import "redaction-toolbar";
13
- @import "icp-buttons";
14
- @import "icp-toolbar";
15
- @import "main-toolbar";
1
+ @use "buttons";
2
+ @use "side-bar";
3
+ @use "search-bar";
4
+ @use "sub-toolbar";
5
+ @use "thumbnail";
6
+ @use "dialog-overlay";
7
+ @use "field-label";
8
+ @use "loading-bar";
9
+ @use "debugging";
10
+ @use "text-selection";
11
+ @use "media";
12
+ @use "redaction-toolbar";
13
+ @use "icp-buttons";
14
+ @use "icp-toolbar";
15
+ @use "main-toolbar";
16
16
 
17
17
  .hidden {
18
18
  display: none !important;
@@ -1,3 +1,5 @@
1
+ @use "govuk-frontend/govuk/base" as *;
2
+
1
3
  .searchbar {
2
4
  z-index: 100;
3
5
  position: absolute;
@@ -14,8 +16,10 @@
14
16
  }
15
17
  span {
16
18
  @include govuk-font($size: 16);
17
- color: $govuk-secondary-text-colour;
18
- min-width: 110px;
19
+ & {
20
+ color: $govuk-secondary-text-colour;
21
+ min-width: 110px;
22
+ }
19
23
  }
20
24
  }
21
25