@energycap/components 0.45.1 → 0.45.2-multi-select-component.20260303-0733
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/README.md +188 -188
- package/fesm2022/energycap-components.mjs +681 -163
- package/fesm2022/energycap-components.mjs.map +1 -1
- package/package.json +1 -1
- package/schematics/collection.json +4 -4
- package/src/assets/images/favicon-ech.svg +14 -14
- package/src/assets/images/favicon-esa.svg +6 -6
- package/src/assets/images/favicon-eum.svg +13 -13
- package/src/assets/images/favicon-whitelabel.svg +4 -4
- package/src/assets/images/favicon.svg +12 -12
- package/src/assets/images/icon-carbonhub.svg +10 -10
- package/src/assets/images/icon-eum.svg +5 -5
- package/src/assets/images/icon-ucp.svg +12 -12
- package/src/assets/images/icon-wattics.svg +5 -5
- package/src/assets/images/icon.svg +11 -11
- package/src/assets/images/logo.svg +10 -10
- package/src/assets/images/splash-electric.svg +3 -3
- package/src/assets/images/splash-interval.svg +3 -3
- package/src/assets/images/splash-seedling.svg +11 -11
- package/src/assets/images/splash-water.svg +3 -3
- package/src/assets/locales/en_US.json +60 -60
- package/src/assets/scripts/unsupported-browser.js +17 -17
- package/src/styles/_base.scss +38 -38
- package/src/styles/_colors.scss +96 -96
- package/src/styles/_core.scss +3 -3
- package/src/styles/_functions.scss +114 -114
- package/src/styles/_global-variables.scss +230 -230
- package/src/styles/_icons.scss +23 -23
- package/src/styles/bootstrap/_grid.scss +33 -33
- package/src/styles/bootstrap/_reboot.scss +322 -322
- package/src/styles/components/_badge.scss +14 -14
- package/src/styles/components/_card.scss +21 -21
- package/src/styles/components/_link-icons.scss +37 -37
- package/src/styles/components/_splash.scss +188 -188
- package/src/styles/components/_tag.scss +18 -18
- package/src/styles/components/_unsupported-browsers.scss +23 -23
- package/src/styles/email/_email-base.scss +227 -227
- package/src/styles/email/email.scss +42 -42
- package/src/styles/index.scss +29 -29
- package/src/styles/mixins/_animations.scss +17 -17
- package/src/styles/mixins/_button-base.scss +206 -206
- package/src/styles/mixins/_card-base.scss +40 -40
- package/src/styles/mixins/_common.scss +51 -51
- package/src/styles/mixins/_dialog-base.scss +95 -95
- package/src/styles/mixins/_form-control-base.scss +662 -662
- package/src/styles/mixins/_login.scss +74 -74
- package/src/styles/mixins/_menu-base.scss +153 -153
- package/src/styles/mixins/_overlay-base.scss +32 -32
- package/src/styles/mixins/_resizable-base.scss +57 -57
- package/src/styles/mixins/_spinner-base.scss +34 -34
- package/src/styles/mixins/_table-base.scss +297 -297
- package/src/styles/mixins/_tabs-base.scss +146 -146
- package/src/styles/mixins/_tags-base.scss +121 -121
- package/src/styles/mixins/_text.scss +89 -89
- package/src/styles/mixins.scss +14 -14
- package/src/styles/utilities/_borders.scss +29 -29
- package/src/styles/utilities/_common.scss +49 -49
- package/src/styles/utilities/_layout.scss +115 -115
- package/src/styles/utilities/_spacing.scss +64 -64
- package/src/styles/utilities/_text.scss +139 -139
- package/types/energycap-components.d.ts +208 -9
|
@@ -1,147 +1,147 @@
|
|
|
1
|
-
@mixin tab-active($style: tabs) {
|
|
2
|
-
color: var(--ec-tab-color-active, var(--ec-color-interactive));
|
|
3
|
-
|
|
4
|
-
@if $style ==tabs {
|
|
5
|
-
border-color: var(--ec-tab-border-color-active, var(--ec-border-color-focus));
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
@else if $style ==tiles {
|
|
9
|
-
font-weight: bold;
|
|
10
|
-
color: var(--ec-tab-color-active, var(--ec-border-color-focus));
|
|
11
|
-
background-color: var(--ec-background-color-selected);
|
|
12
|
-
border: 1px solid var(--ec-tab-border-color, var(--ec-border-color));
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@else {
|
|
16
|
-
background-color: var(--ec-tab-background-color-active, var(--ec-background-color));
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
@mixin tab($style: tabs) {
|
|
21
|
-
$height: 2rem;
|
|
22
|
-
|
|
23
|
-
@if $style =='pills' {
|
|
24
|
-
$height: 1.75rem;
|
|
25
|
-
padding-left: .5rem;
|
|
26
|
-
padding-right: .5rem;
|
|
27
|
-
border-radius: var(--ec-border-radius);
|
|
28
|
-
border: 1px solid var(--ec-tab-border-color, var(--ec-border-color));
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
@else if $style =='tiles' {
|
|
33
|
-
$height: 1.75rem;
|
|
34
|
-
padding-left: .5rem;
|
|
35
|
-
padding-right: .5rem;
|
|
36
|
-
border-radius: var(--ec-border-radius);
|
|
37
|
-
border: 1px solid transparent;
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
@else {
|
|
42
|
-
padding-left: 0;
|
|
43
|
-
padding-right: 0;
|
|
44
|
-
border-bottom: 2px solid transparent;
|
|
45
|
-
margin-bottom: -1px;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
align-items: center;
|
|
49
|
-
color: var(--ec-tab-color, var(--ec-color-secondary-dark));
|
|
50
|
-
cursor: pointer;
|
|
51
|
-
font-size: var(--ec-tab-font-size, var(--ec-font-size-label));
|
|
52
|
-
display: flex;
|
|
53
|
-
height: $height;
|
|
54
|
-
min-width: $height;
|
|
55
|
-
|
|
56
|
-
justify-content: center;
|
|
57
|
-
|
|
58
|
-
&.active {
|
|
59
|
-
@include tab-active($style);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
&:hover,
|
|
63
|
-
&:focus {
|
|
64
|
-
// Override the default browser focus ring
|
|
65
|
-
outline: none;
|
|
66
|
-
|
|
67
|
-
@if $style =='pills' {
|
|
68
|
-
border-color: var(--ec-tab-border-color-active, var(--ec-border-color-focus));
|
|
69
|
-
box-shadow: 0 0 0 1px var(--ec-tab-border-color-active, var(--ec-border-color-focus));
|
|
70
|
-
position: relative;
|
|
71
|
-
z-index: 1;
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
@else if $style =='tiles' {
|
|
76
|
-
border-color: var(--ec-tab-border-color-active, var(--ec-border-color-focus));
|
|
77
|
-
box-shadow: 0 0 0 1px var(--ec-tab-border-color-active, var(--ec-border-color-focus));
|
|
78
|
-
position: relative;
|
|
79
|
-
z-index: 1;
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
@else {
|
|
84
|
-
border-color: var(--ec-tab-border-color-active, var(--ec-border-color-focus));
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
&.is-disabled {
|
|
89
|
-
opacity: var(--ec-form-control-opacity-disabled);
|
|
90
|
-
cursor: default;
|
|
91
|
-
pointer-events: none;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
@mixin tab-icon-only {
|
|
96
|
-
padding: 0;
|
|
97
|
-
justify-content: center;
|
|
98
|
-
|
|
99
|
-
.ec-icon {
|
|
100
|
-
color: inherit;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
@mixin tab-item($style: tabs) {
|
|
105
|
-
display: block;
|
|
106
|
-
min-width: 0;
|
|
107
|
-
|
|
108
|
-
&:not(:last-child) {
|
|
109
|
-
@if $style =='tabs' {
|
|
110
|
-
margin-right: 1rem;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
@if $style =='pills' {
|
|
115
|
-
&:not(:first-child) {
|
|
116
|
-
margin-left: -1px;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.tab {
|
|
120
|
-
border-radius: 0;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
&:first-child .tab {
|
|
124
|
-
border-top-left-radius: var(--ec-border-radius);
|
|
125
|
-
border-bottom-left-radius: var(--ec-border-radius);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
&:last-child .tab {
|
|
129
|
-
border-top-right-radius: var(--ec-border-radius);
|
|
130
|
-
border-bottom-right-radius: var(--ec-border-radius);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
@if $style =='tiles' {
|
|
135
|
-
.tab {
|
|
136
|
-
border-radius: var(--ec-border-radius);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
@mixin tabbar($style: tabs) {
|
|
142
|
-
display: flex;
|
|
143
|
-
|
|
144
|
-
@if $style ==tabs {
|
|
145
|
-
border-bottom: 1px solid var(--ec-tab-border-color, var(--ec-border-color));
|
|
146
|
-
}
|
|
1
|
+
@mixin tab-active($style: tabs) {
|
|
2
|
+
color: var(--ec-tab-color-active, var(--ec-color-interactive));
|
|
3
|
+
|
|
4
|
+
@if $style ==tabs {
|
|
5
|
+
border-color: var(--ec-tab-border-color-active, var(--ec-border-color-focus));
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@else if $style ==tiles {
|
|
9
|
+
font-weight: bold;
|
|
10
|
+
color: var(--ec-tab-color-active, var(--ec-border-color-focus));
|
|
11
|
+
background-color: var(--ec-background-color-selected);
|
|
12
|
+
border: 1px solid var(--ec-tab-border-color, var(--ec-border-color));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@else {
|
|
16
|
+
background-color: var(--ec-tab-background-color-active, var(--ec-background-color));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@mixin tab($style: tabs) {
|
|
21
|
+
$height: 2rem;
|
|
22
|
+
|
|
23
|
+
@if $style =='pills' {
|
|
24
|
+
$height: 1.75rem;
|
|
25
|
+
padding-left: .5rem;
|
|
26
|
+
padding-right: .5rem;
|
|
27
|
+
border-radius: var(--ec-border-radius);
|
|
28
|
+
border: 1px solid var(--ec-tab-border-color, var(--ec-border-color));
|
|
29
|
+
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@else if $style =='tiles' {
|
|
33
|
+
$height: 1.75rem;
|
|
34
|
+
padding-left: .5rem;
|
|
35
|
+
padding-right: .5rem;
|
|
36
|
+
border-radius: var(--ec-border-radius);
|
|
37
|
+
border: 1px solid transparent;
|
|
38
|
+
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@else {
|
|
42
|
+
padding-left: 0;
|
|
43
|
+
padding-right: 0;
|
|
44
|
+
border-bottom: 2px solid transparent;
|
|
45
|
+
margin-bottom: -1px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
align-items: center;
|
|
49
|
+
color: var(--ec-tab-color, var(--ec-color-secondary-dark));
|
|
50
|
+
cursor: pointer;
|
|
51
|
+
font-size: var(--ec-tab-font-size, var(--ec-font-size-label));
|
|
52
|
+
display: flex;
|
|
53
|
+
height: $height;
|
|
54
|
+
min-width: $height;
|
|
55
|
+
|
|
56
|
+
justify-content: center;
|
|
57
|
+
|
|
58
|
+
&.active {
|
|
59
|
+
@include tab-active($style);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&:hover,
|
|
63
|
+
&:focus {
|
|
64
|
+
// Override the default browser focus ring
|
|
65
|
+
outline: none;
|
|
66
|
+
|
|
67
|
+
@if $style =='pills' {
|
|
68
|
+
border-color: var(--ec-tab-border-color-active, var(--ec-border-color-focus));
|
|
69
|
+
box-shadow: 0 0 0 1px var(--ec-tab-border-color-active, var(--ec-border-color-focus));
|
|
70
|
+
position: relative;
|
|
71
|
+
z-index: 1;
|
|
72
|
+
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@else if $style =='tiles' {
|
|
76
|
+
border-color: var(--ec-tab-border-color-active, var(--ec-border-color-focus));
|
|
77
|
+
box-shadow: 0 0 0 1px var(--ec-tab-border-color-active, var(--ec-border-color-focus));
|
|
78
|
+
position: relative;
|
|
79
|
+
z-index: 1;
|
|
80
|
+
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@else {
|
|
84
|
+
border-color: var(--ec-tab-border-color-active, var(--ec-border-color-focus));
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&.is-disabled {
|
|
89
|
+
opacity: var(--ec-form-control-opacity-disabled);
|
|
90
|
+
cursor: default;
|
|
91
|
+
pointer-events: none;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@mixin tab-icon-only {
|
|
96
|
+
padding: 0;
|
|
97
|
+
justify-content: center;
|
|
98
|
+
|
|
99
|
+
.ec-icon {
|
|
100
|
+
color: inherit;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@mixin tab-item($style: tabs) {
|
|
105
|
+
display: block;
|
|
106
|
+
min-width: 0;
|
|
107
|
+
|
|
108
|
+
&:not(:last-child) {
|
|
109
|
+
@if $style =='tabs' {
|
|
110
|
+
margin-right: 1rem;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@if $style =='pills' {
|
|
115
|
+
&:not(:first-child) {
|
|
116
|
+
margin-left: -1px;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.tab {
|
|
120
|
+
border-radius: 0;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&:first-child .tab {
|
|
124
|
+
border-top-left-radius: var(--ec-border-radius);
|
|
125
|
+
border-bottom-left-radius: var(--ec-border-radius);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&:last-child .tab {
|
|
129
|
+
border-top-right-radius: var(--ec-border-radius);
|
|
130
|
+
border-bottom-right-radius: var(--ec-border-radius);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@if $style =='tiles' {
|
|
135
|
+
.tab {
|
|
136
|
+
border-radius: var(--ec-border-radius);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
@mixin tabbar($style: tabs) {
|
|
142
|
+
display: flex;
|
|
143
|
+
|
|
144
|
+
@if $style ==tabs {
|
|
145
|
+
border-bottom: 1px solid var(--ec-tab-border-color, var(--ec-border-color));
|
|
146
|
+
}
|
|
147
147
|
}
|
|
@@ -1,122 +1,122 @@
|
|
|
1
|
-
@import '../core';
|
|
2
|
-
@import '../mixins/text';
|
|
3
|
-
|
|
4
|
-
$tag-colors: (
|
|
5
|
-
info: (bg: var(--ec-color-cobalt-1), border: var(--ec-color-info)),
|
|
6
|
-
success: (bg: var(--ec-color-green-1), border: var(--ec-color-success)),
|
|
7
|
-
warning: (bg: var(--ec-color-yellow-1), border: var(--ec-color-caution)),
|
|
8
|
-
danger: (bg: var(--ec-color-red-1), border: var(--ec-color-danger)),
|
|
9
|
-
accent: (bg: var(--ec-color-purple-1), border: var(--ec-color-accent)),
|
|
10
|
-
chargeback: (bg: var(--ec-color-orange-1), border: var(--ec-color-orange-7)),
|
|
11
|
-
accrual: (bg: var(--ec-color-aqua-1), border: var(--ec-color-aqua-5)),
|
|
12
|
-
system: (bg: var(--ec-color-gray-1), border: var(--ec-color-gray-4)),
|
|
13
|
-
interval:(bg: var(--ec-color-gray-1), border: var(--ec-color-brand-black)),
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
@mixin tag-type($type) {
|
|
17
|
-
$colors: map-get($tag-colors, $type);
|
|
18
|
-
background-color: map-get($colors, bg);
|
|
19
|
-
border-color: map-get($colors, border);
|
|
20
|
-
|
|
21
|
-
> .ec-icon:first-child {
|
|
22
|
-
color: map-get($colors, border);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
@mixin tags {
|
|
27
|
-
@include ul-reset;
|
|
28
|
-
display: flex;
|
|
29
|
-
|
|
30
|
-
&.is-wrapped {
|
|
31
|
-
flex-wrap: wrap;
|
|
32
|
-
margin-top: .25rem;
|
|
33
|
-
|
|
34
|
-
> .tag {
|
|
35
|
-
margin-bottom: .25rem
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
@mixin tag() {
|
|
41
|
-
@include text-caption-1;
|
|
42
|
-
@include truncate;
|
|
43
|
-
|
|
44
|
-
background-color: var(--ec-color-gray-1);
|
|
45
|
-
border: 2px solid var(--ec-color-gray-4);
|
|
46
|
-
display: inline-flex;
|
|
47
|
-
align-items: center;
|
|
48
|
-
border-radius: calc(var(--ec-border-radius, .25rem) * 3);
|
|
49
|
-
height: 1.5rem;
|
|
50
|
-
line-height: 1.25rem;
|
|
51
|
-
padding: 0 var(--ec-tag-padding-x, 0.4375rem);
|
|
52
|
-
vertical-align: top;
|
|
53
|
-
|
|
54
|
-
> .ec-icon:first-child {
|
|
55
|
-
margin-right: 0.1875rem;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.ec-icon {
|
|
59
|
-
display: flex;
|
|
60
|
-
-moz-osx-font-smoothing: grayscale;
|
|
61
|
-
-webkit-font-smoothing: antialiased;
|
|
62
|
-
width: auto;
|
|
63
|
-
height: auto;
|
|
64
|
-
min-width: 1em;
|
|
65
|
-
justify-content: center;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
&.is-inverted {
|
|
69
|
-
background-color: var(--ec-background-color);
|
|
70
|
-
border-color: var(--ec-background-color);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
@each $type, $color in $tag-colors {
|
|
74
|
-
&.is-#{$type} {
|
|
75
|
-
@include tag-type($type);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
@mixin tag-close-btn {
|
|
81
|
-
background-color: transparent;
|
|
82
|
-
border: 0;
|
|
83
|
-
display: flex;
|
|
84
|
-
align-items: center;
|
|
85
|
-
padding: 0 .25rem;
|
|
86
|
-
height: 100%;
|
|
87
|
-
cursor: pointer;
|
|
88
|
-
position: relative;
|
|
89
|
-
margin-right: calc(0rem - var(--ec-tag-padding-x, 0.4375rem));
|
|
90
|
-
|
|
91
|
-
&:hover,
|
|
92
|
-
&:focus {
|
|
93
|
-
&::before {
|
|
94
|
-
display: block;
|
|
95
|
-
content: '';
|
|
96
|
-
position: absolute;
|
|
97
|
-
left: .125rem;
|
|
98
|
-
right: .125rem;
|
|
99
|
-
top: .0625rem;
|
|
100
|
-
bottom: .0625rem;
|
|
101
|
-
background-color: rgba(26, 26, 35, .1);
|
|
102
|
-
border-radius: .125rem;
|
|
103
|
-
}
|
|
104
|
-
outline: none;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
@mixin tag-condensed {
|
|
109
|
-
@include text-caption-2;
|
|
110
|
-
--ec-tag-padding-x: 0.25rem;
|
|
111
|
-
|
|
112
|
-
border-radius: var(--ec-border-radius);
|
|
113
|
-
border-width: 1px;
|
|
114
|
-
height: 1.125rem;
|
|
115
|
-
line-height: 1rem;
|
|
116
|
-
min-width: 1.125rem;
|
|
117
|
-
justify-content: center;
|
|
118
|
-
|
|
119
|
-
> .ec-icon:first-child {
|
|
120
|
-
margin-right: .125rem;
|
|
121
|
-
}
|
|
1
|
+
@import '../core';
|
|
2
|
+
@import '../mixins/text';
|
|
3
|
+
|
|
4
|
+
$tag-colors: (
|
|
5
|
+
info: (bg: var(--ec-color-cobalt-1), border: var(--ec-color-info)),
|
|
6
|
+
success: (bg: var(--ec-color-green-1), border: var(--ec-color-success)),
|
|
7
|
+
warning: (bg: var(--ec-color-yellow-1), border: var(--ec-color-caution)),
|
|
8
|
+
danger: (bg: var(--ec-color-red-1), border: var(--ec-color-danger)),
|
|
9
|
+
accent: (bg: var(--ec-color-purple-1), border: var(--ec-color-accent)),
|
|
10
|
+
chargeback: (bg: var(--ec-color-orange-1), border: var(--ec-color-orange-7)),
|
|
11
|
+
accrual: (bg: var(--ec-color-aqua-1), border: var(--ec-color-aqua-5)),
|
|
12
|
+
system: (bg: var(--ec-color-gray-1), border: var(--ec-color-gray-4)),
|
|
13
|
+
interval:(bg: var(--ec-color-gray-1), border: var(--ec-color-brand-black)),
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
@mixin tag-type($type) {
|
|
17
|
+
$colors: map-get($tag-colors, $type);
|
|
18
|
+
background-color: map-get($colors, bg);
|
|
19
|
+
border-color: map-get($colors, border);
|
|
20
|
+
|
|
21
|
+
> .ec-icon:first-child {
|
|
22
|
+
color: map-get($colors, border);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@mixin tags {
|
|
27
|
+
@include ul-reset;
|
|
28
|
+
display: flex;
|
|
29
|
+
|
|
30
|
+
&.is-wrapped {
|
|
31
|
+
flex-wrap: wrap;
|
|
32
|
+
margin-top: .25rem;
|
|
33
|
+
|
|
34
|
+
> .tag {
|
|
35
|
+
margin-bottom: .25rem
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@mixin tag() {
|
|
41
|
+
@include text-caption-1;
|
|
42
|
+
@include truncate;
|
|
43
|
+
|
|
44
|
+
background-color: var(--ec-color-gray-1);
|
|
45
|
+
border: 2px solid var(--ec-color-gray-4);
|
|
46
|
+
display: inline-flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
border-radius: calc(var(--ec-border-radius, .25rem) * 3);
|
|
49
|
+
height: 1.5rem;
|
|
50
|
+
line-height: 1.25rem;
|
|
51
|
+
padding: 0 var(--ec-tag-padding-x, 0.4375rem);
|
|
52
|
+
vertical-align: top;
|
|
53
|
+
|
|
54
|
+
> .ec-icon:first-child {
|
|
55
|
+
margin-right: 0.1875rem;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.ec-icon {
|
|
59
|
+
display: flex;
|
|
60
|
+
-moz-osx-font-smoothing: grayscale;
|
|
61
|
+
-webkit-font-smoothing: antialiased;
|
|
62
|
+
width: auto;
|
|
63
|
+
height: auto;
|
|
64
|
+
min-width: 1em;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&.is-inverted {
|
|
69
|
+
background-color: var(--ec-background-color);
|
|
70
|
+
border-color: var(--ec-background-color);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@each $type, $color in $tag-colors {
|
|
74
|
+
&.is-#{$type} {
|
|
75
|
+
@include tag-type($type);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@mixin tag-close-btn {
|
|
81
|
+
background-color: transparent;
|
|
82
|
+
border: 0;
|
|
83
|
+
display: flex;
|
|
84
|
+
align-items: center;
|
|
85
|
+
padding: 0 .25rem;
|
|
86
|
+
height: 100%;
|
|
87
|
+
cursor: pointer;
|
|
88
|
+
position: relative;
|
|
89
|
+
margin-right: calc(0rem - var(--ec-tag-padding-x, 0.4375rem));
|
|
90
|
+
|
|
91
|
+
&:hover,
|
|
92
|
+
&:focus {
|
|
93
|
+
&::before {
|
|
94
|
+
display: block;
|
|
95
|
+
content: '';
|
|
96
|
+
position: absolute;
|
|
97
|
+
left: .125rem;
|
|
98
|
+
right: .125rem;
|
|
99
|
+
top: .0625rem;
|
|
100
|
+
bottom: .0625rem;
|
|
101
|
+
background-color: rgba(26, 26, 35, .1);
|
|
102
|
+
border-radius: .125rem;
|
|
103
|
+
}
|
|
104
|
+
outline: none;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@mixin tag-condensed {
|
|
109
|
+
@include text-caption-2;
|
|
110
|
+
--ec-tag-padding-x: 0.25rem;
|
|
111
|
+
|
|
112
|
+
border-radius: var(--ec-border-radius);
|
|
113
|
+
border-width: 1px;
|
|
114
|
+
height: 1.125rem;
|
|
115
|
+
line-height: 1rem;
|
|
116
|
+
min-width: 1.125rem;
|
|
117
|
+
justify-content: center;
|
|
118
|
+
|
|
119
|
+
> .ec-icon:first-child {
|
|
120
|
+
margin-right: .125rem;
|
|
121
|
+
}
|
|
122
122
|
}
|