@energycap/components 0.27.10 → 0.28.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 (48) hide show
  1. package/bundles/energycap-components.umd.js +37 -28
  2. package/bundles/energycap-components.umd.js.map +1 -1
  3. package/bundles/energycap-components.umd.min.js +2 -2
  4. package/bundles/energycap-components.umd.min.js.map +1 -1
  5. package/energycap-components.metadata.json +1 -1
  6. package/energycap-components.min.css +3 -3
  7. package/esm2015/lib/controls/banner/banner.component.js +1 -1
  8. package/esm2015/lib/controls/button/button.component.js +1 -1
  9. package/esm2015/lib/controls/checkbox/checkbox.component.js +1 -1
  10. package/esm2015/lib/controls/combobox/combobox.component.js +1 -1
  11. package/esm2015/lib/controls/dropdown/dropdown.component.js +3 -3
  12. package/esm2015/lib/controls/file-upload/file-upload.component.js +3 -3
  13. package/esm2015/lib/controls/form-control/form-control.component.js +1 -1
  14. package/esm2015/lib/controls/menu/menu.component.js +5 -4
  15. package/esm2015/lib/controls/popover/popover.component.js +1 -1
  16. package/esm2015/lib/controls/radio-button/radio-button.component.js +1 -1
  17. package/esm2015/lib/controls/select/select.component.js +1 -1
  18. package/esm2015/lib/controls/tabs/tabs.component.js +1 -1
  19. package/esm2015/lib/controls/textbox/textbox.component.js +1 -1
  20. package/esm2015/lib/display/app-bar/app-bar.component.js +9 -4
  21. package/esm2015/lib/display/avatar/avatar.component.js +1 -1
  22. package/esm2015/lib/display/dialog/dialog.component.js +1 -1
  23. package/esm2015/lib/display/hierarchy/hierarchy-tree/hierarchy-tree.component.js +3 -3
  24. package/esm2015/lib/display/json-display/json-display.component.js +1 -1
  25. package/esm2015/lib/display/table/table.component.js +1 -1
  26. package/esm2015/lib/display/tags/tags.component.js +1 -1
  27. package/esm2015/lib/display/tree/tree.component.js +2 -2
  28. package/esm2015/lib/shared/page/page-base/page-base.component.js +4 -1
  29. package/fesm2015/energycap-components.js +37 -28
  30. package/fesm2015/energycap-components.js.map +1 -1
  31. package/lib/controls/dropdown/dropdown.component.d.ts +1 -0
  32. package/lib/display/app-bar/app-bar.component.d.ts +3 -2
  33. package/package.json +1 -1
  34. package/src/styles/_global-variables.scss +11 -0
  35. package/src/styles/_variables.scss +1 -4
  36. package/src/styles/components/_card.scss +5 -2
  37. package/src/styles/index.scss +1 -0
  38. package/src/styles/mixins/_button-base.scss +1 -1
  39. package/src/styles/mixins/_control-base.scss +11 -1
  40. package/src/styles/mixins/_dialog-base.scss +2 -2
  41. package/src/styles/mixins/_form-control-base.scss +6 -7
  42. package/src/styles/mixins/_login.scss +1 -0
  43. package/src/styles/mixins/_table-base.scss +7 -2
  44. package/src/styles/mixins/_tabs-base.scss +5 -2
  45. package/src/styles/mixins/_tags-base.scss +2 -2
  46. package/src/styles/utilities/_borders.scss +4 -0
  47. package/src/styles/utilities/_common.scss +30 -2
  48. package/src/styles/utilities/_layout.scss +13 -13
@@ -60,6 +60,7 @@ export declare class DropdownComponent implements OnInit, AfterViewInit, OnDestr
60
60
  menuTemplateType: MenuTemplateType;
61
61
  /**
62
62
  * Display a header on the menu
63
+ * @deprecated use first menu item with display set to 'heading' instead
63
64
  */
64
65
  menuTitle?: string;
65
66
  /**
@@ -4,13 +4,14 @@ import { AvatarUser } from '../avatar/avatar.component';
4
4
  import { AvatarService } from '../avatar/avatar.service';
5
5
  export declare class AppBarComponent implements OnChanges {
6
6
  private avatarService;
7
- user: AvatarUser;
7
+ user?: AvatarUser;
8
8
  userMenuItems: MenuItem[];
9
9
  userMenuWidth: number;
10
10
  userMenuMinWidth: number;
11
11
  userMenuTabindex: number;
12
12
  iconPath: string;
13
- userMenuTitle?: string;
13
+ menuItems: MenuItem[];
14
+ private userItem;
14
15
  constructor(avatarService: AvatarService);
15
16
  ngOnChanges(): void;
16
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@energycap/components",
3
- "version": "0.27.10",
3
+ "version": "0.28.0",
4
4
  "dependencies": {
5
5
  "tslib": "^2.0.0"
6
6
  },
@@ -0,0 +1,11 @@
1
+ // Global CSS variables (custom properties).
2
+ // TODO: convert all SCSS variables to CSS variables
3
+ :root {
4
+ --ec-border-radius: .25rem;
5
+ --ec-border-radius-card: .375rem;
6
+ --ec-border-radius-dialog: .5rem;
7
+ --ec-color-shadow: rgba(26,26,35,.1);
8
+ --ec-color-shadow-overlay: rgba(26,26,35,.2);
9
+ --ec-box-shadow: 0px .125rem .5rem var(--ec-color-shadow);
10
+ --ec-box-shadow-overlay: 0px .0625rem .5rem var(--ec-color-shadow-overlay);
11
+ }
@@ -1,5 +1,6 @@
1
1
  @import 'colors';
2
2
 
3
+
3
4
  // Background Colors
4
5
  // TODO: convert to CSS Custom Properties
5
6
  $ec-color-bg-content: $white;
@@ -66,10 +67,6 @@ $ec-border-color: #d2d7d9;
66
67
  $ec-border-color-default: rgba($black, .18);
67
68
  $ec-border-color-dark: rgba($black, .87);
68
69
  $ec-border-width: 1px;
69
- $ec-border-radius: 0;
70
-
71
- $ec-shadow-color: rgba($black, .18);
72
- $ec-shadow: 0 0 .125rem $ec-shadow-color;
73
70
 
74
71
  $ec-focus-ring-width: .125rem;
75
72
  $ec-focus-ring-color: $blue-4;
@@ -3,14 +3,16 @@
3
3
  .card {
4
4
  background-color: $ec-color-bg-content;
5
5
  background-clip: padding-box;
6
- border: 1px solid $ec-border-color-default;
6
+ border: 1px solid rgba($black, .1);
7
+ border-radius: var(--ec-border-radius-card);
7
8
  overflow: auto;
9
+ box-shadow: var(--ec-box-shadow);
8
10
  }
9
11
 
10
12
  .card-header {
11
13
  display: flex;
12
14
  align-items: center;
13
- min-height: 2rem;
15
+ min-height: 2.5rem;
14
16
  }
15
17
 
16
18
  .card-title {
@@ -34,6 +36,7 @@
34
36
  }
35
37
 
36
38
  .card-actions {
39
+ padding: .25rem;
37
40
  display: flex;
38
41
  margin-left: auto;
39
42
  }
@@ -3,6 +3,7 @@
3
3
  /*!
4
4
  * EnergyCAP Components - Base Styles
5
5
  */
6
+ @import 'global-variables';
6
7
  @import 'core';
7
8
  @import 'base';
8
9
  @import 'bootstrap/grid';
@@ -12,7 +12,7 @@
12
12
  line-height: 1.25rem;
13
13
  justify-content: center;
14
14
  border: $control-border-width solid transparent;
15
- border-radius: $control-border-radius;
15
+ border-radius: var(--ec-border-radius);
16
16
 
17
17
  .label {
18
18
  white-space: nowrap;
@@ -2,7 +2,6 @@
2
2
 
3
3
  $control-border-color: $ec-border-color;
4
4
  $control-border-width: rem-calc($ec-border-width);
5
- $control-border-radius: $ec-border-radius;
6
5
  $control-color: $ec-color-text-primary-dark;
7
6
  $control-bg: $ec-color-bg-content;
8
7
  $control-font-family: $ec-font-family;
@@ -74,6 +73,8 @@ $control-bg-read-only: rgba($black, .12);
74
73
  } @else {
75
74
  background-color: $control-bg-focused;
76
75
  }
76
+ position: relative;
77
+ z-index: 1;
77
78
  }
78
79
 
79
80
  @mixin control-disabled($type, $borders: true) {
@@ -120,3 +121,12 @@ $control-bg-read-only: rgba($black, .12);
120
121
  @mixin control-active {
121
122
  background-color: $ec-color-bg-hover;
122
123
  }
124
+
125
+ @mixin control-popup {
126
+ background-color: $ec-color-bg-content;
127
+ border-radius: var(--ec-border-radius-card);
128
+ box-shadow: var(--ec-box-shadow-overlay);
129
+ margin-top: .25rem;
130
+ overflow: hidden;
131
+ z-index: map-get($ec-z-indexes, popup);
132
+ }
@@ -12,7 +12,6 @@ $panel-close-duration: 225;
12
12
 
13
13
  $overlay-bg: $ec-color-bg-modal;
14
14
  $dialog-bg: $ec-color-bg-body;
15
- $dialog-borer-radius: $ec-border-radius * 2;
16
15
  $dialog-min-height: 9rem;
17
16
  $dialog-max-width: 90vw;
18
17
  $dialog-max-height: 90vh;
@@ -61,7 +60,8 @@ $dialog-widths: (
61
60
  background-color: $dialog-bg;
62
61
  background-clip: padding-box;
63
62
  box-shadow: 0 0 0.625rem rgba($black, .2);
64
- border-radius: $dialog-borer-radius;
63
+ border-radius: var(--ec-border-radius-dialog);
64
+ overflow: hidden;
65
65
  display: flex;
66
66
  flex: none;
67
67
  min-height: $dialog-min-height;
@@ -86,8 +86,6 @@ $checkbox-indicator-size: $form-control-icon-size;
86
86
  /// Focus
87
87
  } @else if $state == focus {
88
88
  @include control-focus;
89
- position: relative;
90
- z-index: 1;
91
89
 
92
90
  /// Disabled
93
91
  } @else if $state == disabled {
@@ -113,7 +111,7 @@ $checkbox-indicator-size: $form-control-icon-size;
113
111
  background-clip: padding-box;
114
112
  border-width: $control-border-width;
115
113
  border-style: solid;
116
- border-radius: $control-border-radius;
114
+ border-radius: var(--ec-border-radius);
117
115
  width: 100%;
118
116
 
119
117
  @if $selector == input {
@@ -324,7 +322,7 @@ $checkbox-indicator-size: $form-control-icon-size;
324
322
  }
325
323
 
326
324
  } @else {
327
- border-radius: 2px;
325
+ border-radius: .125rem;
328
326
 
329
327
  &::before {
330
328
  font-size: .6875em;
@@ -367,7 +365,7 @@ $checkbox-indicator-size: $form-control-icon-size;
367
365
  @mixin toggle() {
368
366
  font-size: $control-font-size;
369
367
  background-color: $ec-border-color;
370
- border-radius: $control-border-radius;
368
+ border-radius: var(--ec-border-radius);
371
369
  border: $control-border-width solid $control-border-color;
372
370
  min-height: 2em;
373
371
  position: relative;
@@ -405,6 +403,7 @@ $checkbox-indicator-size: $form-control-icon-size;
405
403
  bottom: 0;
406
404
  right: 0;
407
405
  box-shadow: 0 0 0 rem-calc(2px) $control-border-color-focused;
406
+ border-radius: var(--ec-border-radius);
408
407
  display: none;
409
408
  }
410
409
 
@@ -429,7 +428,7 @@ $checkbox-indicator-size: $form-control-icon-size;
429
428
 
430
429
  a {
431
430
  border: rem-calc(3px) solid transparent;
432
- border-radius: $control-border-radius;
431
+ border-radius: calc(var(--ec-border-radius) * .75);
433
432
  display: block;
434
433
  height: 100%;
435
434
  left: 0;
@@ -441,7 +440,7 @@ $checkbox-indicator-size: $form-control-icon-size;
441
440
 
442
441
  .toggle-handle {
443
442
  background-color: $ec-color-bg-content;
444
- border-radius: $control-border-radius;
443
+ border-radius: calc(var(--ec-border-radius) * .75);
445
444
  height: 100%;
446
445
  }
447
446
  }
@@ -28,6 +28,7 @@
28
28
 
29
29
  #{$card-selector} {
30
30
  background-color: $ec-color-bg-body;
31
+ border-radius: var(--ec-border-radius-dialog);
31
32
  box-shadow: 0 0 12px rgba($black, .66);
32
33
  }
33
34
 
@@ -105,9 +105,14 @@ $table-z-indexes: (
105
105
  }
106
106
 
107
107
  @mixin table-row-heading {
108
- background-color: $table-row-bg-heading;
109
108
  color: $ec-color-text-secondary-dark;
110
- border-bottom-color: rgba($black, .09);
109
+ font-size: $ec-font-size-label;
110
+ font-weight: $ec-font-weight-bold;
111
+ line-height: 1.333333333;
112
+ text-transform: uppercase;
113
+ padding-bottom: 0;
114
+ vertical-align: bottom;
115
+ border-top: 0;
111
116
  }
112
117
 
113
118
  @mixin table-row-selected {
@@ -27,11 +27,11 @@ $tab-pill-bg-active: #d2d7d9;
27
27
 
28
28
  @if $style == 'pills' {
29
29
  $height: rem-calc(24px);
30
+ border-radius: var(--ec-border-radius);
30
31
  }
31
32
 
32
33
  align-items: center;
33
34
  border: $tab-border-width solid transparent;
34
- border-radius: $ec-border-radius;
35
35
  color: $tab-color;
36
36
  cursor: pointer;
37
37
  font-size: $ec-font-size-label;
@@ -43,8 +43,11 @@ $tab-pill-bg-active: #d2d7d9;
43
43
  justify-content: center;
44
44
 
45
45
  @if $style == tabs {
46
- border: $tab-border-width solid transparent;
47
46
  margin-bottom: -($tab-border-width);
47
+ border-top-right-radius: var(--ec-border-radius);
48
+ border-top-left-radius: var(--ec-border-radius);
49
+ border-bottom-left-radius: 0;
50
+ border-bottom-right-radius: 0;
48
51
  }
49
52
 
50
53
  &:hover {
@@ -36,7 +36,7 @@ $tag-colors: (
36
36
  border: 2px solid map-get($tag-colors, info);
37
37
  display: inline-flex;
38
38
  align-items: center;
39
- border-radius: .75rem;
39
+ border-radius: calc(var(--ec-border-radius, .25rem) * 3);
40
40
  height: 1.5rem;
41
41
  line-height: 1.25rem;
42
42
  padding: 0 0.4375rem;
@@ -86,7 +86,7 @@ $tag-colors: (
86
86
  }
87
87
 
88
88
  @mixin tag-condensed {
89
- border-radius: .1875rem;
89
+ border-radius: var(--ec-border-radius);
90
90
  border: 0;
91
91
  padding: 0 .25rem;
92
92
  height: 1.125rem;
@@ -25,4 +25,8 @@ $sides: (top, bottom, right, left);
25
25
  .border-#{$side}-dark {
26
26
  border-#{$side}: $ec-border-width solid $ec-border-color-dark !important;
27
27
  }
28
+ }
29
+
30
+ .border-radius-0 {
31
+ --ec-border-radius: 0;
28
32
  }
@@ -2,6 +2,34 @@
2
2
  cursor: pointer !important;
3
3
  }
4
4
 
5
- .scroll-y {
6
- overflow-y: auto !important;
5
+ .control-group {
6
+ --ec-border-radius: 0;
7
+
8
+ > :first-child {
9
+ --ec-border-radius: .25rem 0 0 .25rem;
10
+ }
11
+
12
+ > :last-child {
13
+ --ec-border-radius: 0 .25rem .25rem 0;
14
+ }
15
+
16
+ > :not(:first-child) {
17
+ margin-left: -1px;
18
+ }
19
+ }
20
+
21
+ .control-group-reverse {
22
+ --ec-border-radius: 0;
23
+
24
+ > :last-child {
25
+ --ec-border-radius: .25rem 0 0 .25rem;
26
+ }
27
+
28
+ > :first-child {
29
+ --ec-border-radius: 0 .25rem .25rem 0;
30
+ }
31
+
32
+ > :not(:last-child) {
33
+ margin-left: -1px;
34
+ }
7
35
  }
@@ -76,7 +76,7 @@
76
76
  // }
77
77
 
78
78
  // .justify-content-center {
79
- // justify-content: center !important;
79
+ // justify-content: center !important;
80
80
  // }
81
81
 
82
82
  // .h-100 {
@@ -95,18 +95,18 @@
95
95
  // width: auto !important;
96
96
  // }
97
97
 
98
- // .scroll-y {
99
- // overflow-y: auto !important;
100
- // }
98
+ .scroll-y {
99
+ overflow-y: auto !important;
100
+ }
101
101
 
102
- // .position-relative {
103
- // position: relative !important;
104
- // }
102
+ .position-relative {
103
+ position: relative !important;
104
+ }
105
105
 
106
- // .position-absolute {
107
- // position: absolute !important;
108
- // }
106
+ .position-absolute {
107
+ position: absolute !important;
108
+ }
109
109
 
110
- // .position-fixed {
111
- // position: fixed !important;
112
- // }
110
+ .position-fixed {
111
+ position: fixed !important;
112
+ }