@energycap/components 0.43.3 → 0.43.4-ECAP-29229-tag-component.20250502-1711

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@energycap/components",
3
- "version": "0.43.3",
3
+ "version": "0.43.4-ECAP-29229-tag-component.20250502-1711",
4
4
  "schematics": "./schematics/collection.json",
5
5
  "dependencies": {
6
6
  "tslib": "^2.0.0"
@@ -0,0 +1,18 @@
1
+ @import '../mixins/tags-base';
2
+
3
+ .tag {
4
+ @include tag;
5
+
6
+ &.is-condensed {
7
+ @include tag-condensed;
8
+ }
9
+
10
+ a::after {
11
+ opacity: 1;
12
+ margin-left: .1875rem;
13
+ }
14
+ }
15
+
16
+ .tag-close-btn {
17
+ @include tag-close-btn;
18
+ }
@@ -16,6 +16,7 @@
16
16
  @import 'components/splash';
17
17
  @import 'components/unsupported-browsers';
18
18
  @import 'components/link-icons';
19
+ @import 'components/tag';
19
20
 
20
21
  /*!
21
22
  * EnergyCAP Components - Utility Styles
@@ -1,4 +1,5 @@
1
1
  @import '../core';
2
+ @import '../mixins/text';
2
3
 
3
4
  $tag-colors: (
4
5
  info: (bg: var(--ec-color-cobalt-1), border: var(--ec-color-info)),
@@ -37,6 +38,7 @@ $tag-colors: (
37
38
  }
38
39
 
39
40
  @mixin tag() {
41
+ @include text-caption-1;
40
42
  @include truncate;
41
43
 
42
44
  background-color: var(--ec-color-gray-1);
@@ -46,7 +48,7 @@ $tag-colors: (
46
48
  border-radius: calc(var(--ec-border-radius, .25rem) * 3);
47
49
  height: 1.5rem;
48
50
  line-height: 1.25rem;
49
- padding: 0 0.4375rem;
51
+ padding: 0 var(--ec-tag-padding-x, 0.4375rem);
50
52
  vertical-align: top;
51
53
 
52
54
  > .ec-icon:first-child {
@@ -84,6 +86,7 @@ $tag-colors: (
84
86
  height: 100%;
85
87
  cursor: pointer;
86
88
  position: relative;
89
+ margin-right: calc(0rem - var(--ec-tag-padding-x, 0.4375rem));
87
90
 
88
91
  &:hover,
89
92
  &:focus {
@@ -103,9 +106,11 @@ $tag-colors: (
103
106
  }
104
107
 
105
108
  @mixin tag-condensed {
109
+ @include text-caption-2;
110
+ --ec-tag-padding-x: 0.25rem;
111
+
106
112
  border-radius: var(--ec-border-radius);
107
113
  border-width: 1px;
108
- padding: 0 .25rem;
109
114
  height: 1.125rem;
110
115
  line-height: 1.125rem;
111
116
  min-width: 1.125rem;