@energycap/components 0.37.7-ECAP-18600-ech-theme-updates.20230914-1126 → 0.38.1-ECAP-19512-dropdown-z-index-fix.20230925-1505
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.
- package/esm2020/lib/shared/page/page-view/page-view.component.mjs +2 -2
- package/fesm2015/energycap-components.mjs +2 -2
- package/fesm2015/energycap-components.mjs.map +1 -1
- package/fesm2020/energycap-components.mjs +2 -2
- package/fesm2020/energycap-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/styles/mixins/_control-base-deprecated.scss +0 -113
- package/src/styles/mixins/_nav-control-base-deprecated.scss +0 -99
package/package.json
CHANGED
@@ -1,113 +0,0 @@
|
|
1
|
-
@import '../core';
|
2
|
-
|
3
|
-
$control-border-color: var(--ec-border-color-control);
|
4
|
-
$control-border-width: rem-calc(1px);
|
5
|
-
$control-color: var(--ec-color-primary-dark);
|
6
|
-
$control-bg: var(--ec-background-color);
|
7
|
-
$control-font-family: var(--ec-font-family);
|
8
|
-
$control-font-size: var(--ec-font-size-body);
|
9
|
-
$control-height: rem-calc(32px);
|
10
|
-
$control-line-height: rem-calc(20px);
|
11
|
-
$control-padding-x: rem-calc(8px);
|
12
|
-
|
13
|
-
// Active State
|
14
|
-
$control-bg-active: var(--ec-color-interactive);
|
15
|
-
$control-text-active: var(--ec-color-primary-light);
|
16
|
-
|
17
|
-
// Focused
|
18
|
-
$control-bg-focused: var(--ec-color-disabled-dark);
|
19
|
-
$control-border-color-focused: var(--ec-color-interactive);
|
20
|
-
$control-shadow-focused: 0 0 0 $control-border-width $control-border-color-focused;
|
21
|
-
|
22
|
-
// Disabled
|
23
|
-
$control-bg-disabled: var(--ec-background-color-disabled);
|
24
|
-
$control-color-disabled: var(--ec-color-secondary-dark);
|
25
|
-
$control-opacity-disabled: .65;
|
26
|
-
|
27
|
-
// Invalid
|
28
|
-
$control-bg-invalid: var(--ec-background-color-control-invalid);
|
29
|
-
$control-border-color-invalid: var(--ec-border-color-control-invalid);
|
30
|
-
|
31
|
-
// Read only
|
32
|
-
$control-bg-read-only: rgba($black, .12);
|
33
|
-
|
34
|
-
/// Calculates the height, line-height and padding of a control
|
35
|
-
/// @param {number} $font-size [$control-font-size] - The font size of the control
|
36
|
-
/// @param {number | string} $height [$control-height] - The height of the control
|
37
|
-
/// @param {number} $line-height [$control-line-height] - The line-height of the control
|
38
|
-
/// @param {boolean} $borders [true] - Does the contorl have borders
|
39
|
-
@mixin control-dimensions(
|
40
|
-
$font-size: $control-font-size,
|
41
|
-
$height: $control-height,
|
42
|
-
$line-height: $control-line-height,
|
43
|
-
$borders: true
|
44
|
-
) {
|
45
|
-
|
46
|
-
// If $height is auto, set height to auto and reassign $control-height to $height for padding calculations
|
47
|
-
@if $height == auto {
|
48
|
-
height: $height;
|
49
|
-
$height: $control-height;
|
50
|
-
} @else {
|
51
|
-
height: $height;
|
52
|
-
}
|
53
|
-
|
54
|
-
// Remove units from $line height so it is relative to the control's font-size
|
55
|
-
line-height: strip-unit($line-height);
|
56
|
-
|
57
|
-
// Vertical padding should be the height minus the lineheight divided by two. If the control has borders, remove the border's width from the vertical padding
|
58
|
-
@if unit($line-height) != 'rem' {
|
59
|
-
@error "$line-height must be in rems in order to do calculations, was #{unit($line-height)}."
|
60
|
-
}
|
61
|
-
|
62
|
-
$padding-y: ($height - $line-height) * 0.5;
|
63
|
-
@if $borders {
|
64
|
-
$padding-y: (($height - $line-height) * 0.5) - $control-border-width;
|
65
|
-
}
|
66
|
-
padding: $padding-y $control-padding-x;
|
67
|
-
}
|
68
|
-
|
69
|
-
@mixin control-focus($borders: true) {
|
70
|
-
@if $borders {
|
71
|
-
border-color: $control-border-color-focused;
|
72
|
-
box-shadow: $control-shadow-focused;
|
73
|
-
} @else {
|
74
|
-
background-color: $control-bg-focused;
|
75
|
-
}
|
76
|
-
position: relative;
|
77
|
-
z-index: 1;
|
78
|
-
}
|
79
|
-
|
80
|
-
@mixin control-disabled($type, $borders: true) {
|
81
|
-
@if $borders {
|
82
|
-
background-color: $control-bg-disabled;
|
83
|
-
border-color: var(--ec-border-color-control-disabled);
|
84
|
-
}
|
85
|
-
|
86
|
-
color: $control-color-disabled;
|
87
|
-
opacity: $control-opacity-disabled;
|
88
|
-
|
89
|
-
@if $type == form {
|
90
|
-
|
91
|
-
}
|
92
|
-
}
|
93
|
-
|
94
|
-
@mixin control-invalid($borders: true) {
|
95
|
-
@if $borders {
|
96
|
-
&:not(:focus) {
|
97
|
-
border-color: $control-border-color-invalid;
|
98
|
-
}
|
99
|
-
}
|
100
|
-
background-color: $control-bg-invalid;
|
101
|
-
}
|
102
|
-
|
103
|
-
@mixin control-default($borders: true) {
|
104
|
-
@if $borders {
|
105
|
-
border-color: $control-border-color;
|
106
|
-
}
|
107
|
-
background-color: $control-bg;
|
108
|
-
}
|
109
|
-
|
110
|
-
@mixin control-active {
|
111
|
-
background-color: var(--ec-background-color-hover);
|
112
|
-
}
|
113
|
-
|
@@ -1,99 +0,0 @@
|
|
1
|
-
// @import 'control-base';
|
2
|
-
|
3
|
-
$nav-font-size: var(--ec-font-size-action);
|
4
|
-
$nav-item-bg: var(--ec-background-color);
|
5
|
-
$nav-item-height: 1.75rem;
|
6
|
-
$nav-item-line-height: 1.125rem;
|
7
|
-
$nav-item-bg-hover: var(--ec-background-color-hover);
|
8
|
-
$nav-item-bg-selected: var(--ec-background-color-selected);
|
9
|
-
$nav-icon-height: var(--ec-font-size-icon);
|
10
|
-
$nav-item-transition-duration: .2s;
|
11
|
-
|
12
|
-
@mixin nav-hover($selector) {
|
13
|
-
@if $selector == button {
|
14
|
-
|
15
|
-
} @else {
|
16
|
-
background-color: $nav-item-bg-hover;
|
17
|
-
}
|
18
|
-
}
|
19
|
-
|
20
|
-
@mixin nav-active() {
|
21
|
-
background-color: $control-bg-active;
|
22
|
-
color: $control-text-active;
|
23
|
-
}
|
24
|
-
|
25
|
-
@mixin nav-selected() {
|
26
|
-
background-color: $nav-item-bg-selected;
|
27
|
-
}
|
28
|
-
|
29
|
-
@mixin nav-focus($borders) {
|
30
|
-
@include control-focus($borders);
|
31
|
-
}
|
32
|
-
|
33
|
-
@mixin nav-item-states($selector, $borders: false) {
|
34
|
-
cursor: pointer;
|
35
|
-
|
36
|
-
&.is-selected,
|
37
|
-
&.is-highlighted {
|
38
|
-
@include nav-selected();
|
39
|
-
}
|
40
|
-
|
41
|
-
&:hover {
|
42
|
-
@include nav-hover($selector);
|
43
|
-
}
|
44
|
-
|
45
|
-
&:focus {
|
46
|
-
@include nav-focus($borders);
|
47
|
-
outline: none;
|
48
|
-
}
|
49
|
-
|
50
|
-
&:active {
|
51
|
-
@include nav-active();
|
52
|
-
}
|
53
|
-
|
54
|
-
&:disabled,
|
55
|
-
&.is-disabled {
|
56
|
-
@include control-disabled('nav', $borders);
|
57
|
-
cursor: default;
|
58
|
-
}
|
59
|
-
}
|
60
|
-
|
61
|
-
@mixin nav-item(
|
62
|
-
$selector,
|
63
|
-
$bg: $nav-item-bg,
|
64
|
-
$font-size: $nav-font-size,
|
65
|
-
$height: $nav-item-height,
|
66
|
-
$line-height: $nav-item-line-height,
|
67
|
-
$borders: false
|
68
|
-
) {
|
69
|
-
|
70
|
-
@include control-dimensions($font-size, $height, $line-height, $borders);
|
71
|
-
|
72
|
-
align-items: center;
|
73
|
-
background-color: $bg;
|
74
|
-
display: flex;
|
75
|
-
|
76
|
-
@include nav-item-states($selector, $borders);
|
77
|
-
|
78
|
-
.label {
|
79
|
-
align-items: center;
|
80
|
-
display: flex;
|
81
|
-
flex: auto;
|
82
|
-
}
|
83
|
-
|
84
|
-
.ec-icon {
|
85
|
-
flex: 0 0 auto;
|
86
|
-
|
87
|
-
& + .label {
|
88
|
-
margin: 0 0.375rem;
|
89
|
-
}
|
90
|
-
}
|
91
|
-
}
|
92
|
-
|
93
|
-
@mixin nav-group($font-size: $nav-font-size, $color: $control-color) {
|
94
|
-
color: $color;
|
95
|
-
font-size: $font-size;
|
96
|
-
font-family: $control-font-family;
|
97
|
-
padding: 0;
|
98
|
-
margin: 0;
|
99
|
-
}
|