Skip to content

Commit 0080f97

Browse files
authored
Merge pull request #114 from CodeGov-org/nathan/update-angular
Update angular
2 parents 46aefb2 + 23b177c commit 0080f97

85 files changed

Lines changed: 7730 additions & 12819 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

lib/angular-ui/src/lib/atoms/radio-input/radio-input.component.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ describe('RadioInputComponent', () => {
1313

1414
fixture = TestBed.createComponent(RadioInputComponent);
1515
component = fixture.componentInstance;
16+
fixture.componentRef.setInput('value', 1);
1617
fixture.detectChanges();
1718
});
1819

lib/angular-ui/src/lib/molecules/copy-to-clipboard/copy-to-clipboard.component.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ describe('CopyToClipboardComponent', () => {
1313

1414
fixture = TestBed.createComponent(CopyToClipboardComponent);
1515
component = fixture.componentInstance;
16+
fixture.componentRef.setInput('value', 'https://example.com');
1617
fixture.detectChanges();
1718
});
1819

lib/angular-ui/src/lib/organisms/footer/footer.component.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ describe('FooterComponent', () => {
1313

1414
fixture = TestBed.createComponent(FooterComponent);
1515
component = fixture.componentInstance;
16+
fixture.componentRef.setInput('links', []);
1617
fixture.detectChanges();
1718
});
1819

lib/angular-ui/src/lib/organisms/navbar/navbar.component.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ describe('NavbarComponent', () => {
1313

1414
fixture = TestBed.createComponent(NavbarComponent);
1515
component = fixture.componentInstance;
16+
fixture.componentRef.setInput('homeUrl', 'https://example.com');
17+
fixture.componentRef.setInput('links', []);
1618
fixture.detectChanges();
1719
});
1820

lib/angular-ui/src/lib/organisms/sidenav/sidenav.component.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ describe('SidenavComponent', () => {
1313

1414
fixture = TestBed.createComponent(SidenavComponent);
1515
component = fixture.componentInstance;
16+
fixture.componentRef.setInput('links', []);
17+
fixture.componentRef.setInput('homeUrl', 'https://example.com');
1618
fixture.detectChanges();
1719
});
1820

lib/styles/common.scss

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
@import 'common/buttons';
2-
@import 'common/colors';
3-
@import 'common/dark-mode';
4-
@import 'common/dropdown';
5-
@import 'common/effects';
6-
@import 'common/elevation';
7-
@import 'common/icons';
8-
@import 'common/responsiveness';
9-
@import 'common/sizing';
10-
@import 'common/typography';
11-
@import 'common/utils';
1+
@forward 'common/buttons';
2+
@forward 'common/colors';
3+
@forward 'common/dark-mode';
4+
@forward 'common/dropdown';
5+
@forward 'common/effects';
6+
@forward 'common/elevation';
7+
@forward 'common/icons';
8+
@forward 'common/responsiveness';
9+
@forward 'common/sizing';
10+
@forward 'common/typography';
11+
@forward 'common/utils';

lib/styles/common/buttons.scss

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1+
@use 'colors';
2+
@use 'dark-mode';
3+
@use 'effects';
4+
@use 'sizing';
5+
@use 'utils';
6+
17
@mixin btn-common {
2-
@include no-underline;
8+
@include utils.no-underline;
39

410
display: inline-block;
511
width: inherit;
@@ -9,32 +15,32 @@
915
}
1016

1117
@mixin transparent-btn {
12-
color: $slate-900;
13-
@include dark {
14-
color: $slate-300;
18+
color: colors.$slate-900;
19+
@include dark-mode.dark {
20+
color: colors.$slate-300;
1521
}
1622

17-
@include quick-transition(background-color);
23+
@include effects.quick-transition(background-color);
1824

1925
&:hover {
20-
background-color: $slate-200;
26+
background-color: colors.$slate-200;
2127

22-
@include dark {
23-
background-color: $slate-800;
28+
@include dark-mode.dark {
29+
background-color: colors.$slate-800;
2430
}
2531
}
2632

2733
&:active {
28-
background-color: $slate-300;
34+
background-color: colors.$slate-300;
2935

30-
@include dark {
31-
background-color: $slate-700;
36+
@include dark-mode.dark {
37+
background-color: colors.$slate-700;
3238
}
3339
}
3440
}
3541

3642
@mixin rectangular-btn {
37-
@include px(4);
38-
@include py(1.5);
39-
border-radius: $border-radius;
43+
@include sizing.px(4);
44+
@include sizing.py(1.5);
45+
border-radius: sizing.$border-radius;
4046
}

lib/styles/common/dropdown.scss

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,35 @@
1+
@use 'colors';
2+
@use 'dark-mode';
3+
@use 'sizing';
4+
@use 'typography';
5+
@use 'utils';
6+
17
@mixin dropdown-menu-item {
28
position: relative;
39
display: block;
410
text-align: left;
511
width: 100%;
612
white-space: nowrap;
713

8-
@include px(4);
9-
@include py(1);
10-
font-weight: $font-weight-normal;
14+
@include sizing.px(4);
15+
@include sizing.py(1);
16+
font-weight: typography.$font-weight-normal;
1117

12-
@include no-underline;
18+
@include utils.no-underline;
1319

14-
color: $slate-900;
15-
@include dark {
16-
color: $slate-300;
20+
color: colors.$slate-900;
21+
@include dark-mode.dark {
22+
color: colors.$slate-300;
1723
}
1824

1925
&:hover {
20-
color: $white;
21-
background-color: $primary-800;
26+
color: colors.$white;
27+
background-color: colors.$primary-800;
2228
cursor: pointer;
2329

24-
@include dark {
25-
color: $slate-900;
26-
background-color: $slate-200;
30+
@include dark-mode.dark {
31+
color: colors.$slate-900;
32+
background-color: colors.$slate-200;
2733
}
2834
}
2935
}

lib/styles/common/effects.scss

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1+
@use 'sass:string';
2+
@use 'dark-mode';
3+
14
$ring-width: 2px;
25
$ring-blur: 2px;
36
$dark-ring-blur: 5px;
47

58
@mixin ring($color) {
69
box-shadow: 0 0 $ring-blur $ring-width $color;
710

8-
@include dark {
11+
@include dark-mode.dark {
912
box-shadow: 0 0 $dark-ring-blur $ring-width $color;
1013
}
1114
}
@@ -19,7 +22,8 @@ $transition-timing-function: cubic-bezier(0, 0, 1, 1);
1922
$transition-properties: $transition-properties + $property + ', ';
2023
}
2124
// Remove the last comma and space
22-
$transition-properties: str-slice($transition-properties, 1, -3);
25+
$transition-properties: string.slice($transition-properties, 1, -3);
2326

24-
transition: #{$transition-properties} $transition-duration $transition-timing-function;
27+
transition: #{$transition-properties} $transition-duration
28+
$transition-timing-function;
2529
}

lib/styles/common/elevation.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@use 'sass:map';
2+
@use 'colors';
23

34
$umbra-map: (
45
0: '0px 0px 0px 0px',
@@ -84,7 +85,7 @@ $ambient-map: (
8485
24: '0px 9px 46px 8px',
8586
);
8687

87-
$baseline-color: $black;
88+
$baseline-color: colors.$black;
8889
$umbra-opacity: 0.2;
8990
$penumbra-opacity: 0.14;
9091
$ambient-opacity: 0.12;

0 commit comments

Comments
 (0)