@energycap/components 0.39.17-ECAP-25250-eclipse-formula-builder-proto.20240529-1651 → 0.39.17-ECAP-25250-eclipse-formula-builder-proto.20240530-1020

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.39.17-ECAP-25250-eclipse-formula-builder-proto.20240529-1651",
3
+ "version": "0.39.17-ECAP-25250-eclipse-formula-builder-proto.20240530-1020",
4
4
  "dependencies": {
5
5
  "tslib": "^2.0.0"
6
6
  },
@@ -0,0 +1,146 @@
1
+ @import '../../styles/mixins/common';
2
+
3
+ @function get-item-padding($height, $line-height) {
4
+ @return (($height - $line-height) * 0.5) .5rem;
5
+ }
6
+
7
+ $menu-item-height: 1.75rem;
8
+ $menu-item-line-height: 1.25rem;
9
+ $menu-item-color: var(--ec-color-secondary-dark);
10
+ $menu-item-font-size: var(--ec-menu-font-size, var(--ec-font-size-action));
11
+ $menu-item-padding: get-item-padding($menu-item-height, $menu-item-line-height);
12
+
13
+ @mixin menu-item {
14
+ cursor: inherit;
15
+ line-height: $menu-item-line-height;
16
+ min-height: $menu-item-height;
17
+ padding: $menu-item-padding;
18
+ border-radius: var(--ec-border-radius);
19
+ display: flex;
20
+
21
+ .label {
22
+ margin-right: auto;
23
+
24
+ & + .ec-icon {
25
+ margin-left: .5rem;
26
+ }
27
+ }
28
+
29
+ .ec-icon {
30
+ margin-top: calc(calc(#{$menu-item-line-height} - #{map-get($icon-sizes, default)}) / 2);
31
+ flex: none;
32
+
33
+ & + .label {
34
+ margin-left: .5rem;
35
+ }
36
+ }
37
+
38
+ .ec-icon-sm {
39
+ margin-top: calc(calc(#{$menu-item-line-height} - #{map-get($icon-sizes, sm)}) / 2);
40
+ }
41
+ }
42
+
43
+ @mixin menu-ul {
44
+ @include ul-reset;
45
+ flex: auto;
46
+ height: 100%;
47
+ overflow-y: auto;
48
+
49
+ li {
50
+ cursor: pointer;
51
+ padding: 0 .25rem;
52
+
53
+ a {
54
+ color: inherit;
55
+ border-bottom: 0;
56
+ text-decoration: none;
57
+ }
58
+
59
+ &.is-selected,
60
+ &.is-highlighted {
61
+ .item-wrapper {
62
+ background-color: var(--ec-background-color-selected);
63
+ }
64
+ }
65
+
66
+ &:hover .item-wrapper {
67
+ background-color: var(--ec-background-color-hover);
68
+ }
69
+
70
+ &:focus .item-wrapper{
71
+ outline: none;
72
+ background-color: var(--ec-color-disabled-dark);
73
+ position: relative;
74
+ z-index: 1;
75
+ }
76
+
77
+ &.is-disabled .item-wrapper {
78
+ color: var(--ec-color-disabled-dark);
79
+ opacity: var(--ec-form-control-opacity-disabled);
80
+ }
81
+
82
+ &.is-disabled,
83
+ &.is-readonly {
84
+ cursor: default;
85
+
86
+ .item-wrapper {
87
+ background-color: transparent;
88
+ color: inherit;
89
+ }
90
+ }
91
+
92
+ &.is-checked {
93
+ .icon-check {
94
+ opacity: 1;
95
+ }
96
+ }
97
+
98
+ &.heading {
99
+ cursor: default;
100
+
101
+ .item-wrapper {
102
+ background-color: transparent;
103
+ }
104
+
105
+ &:not(:first-child) {
106
+ margin-top: .5rem;
107
+ }
108
+ }
109
+
110
+ &.divider {
111
+ border-bottom: 1px solid var(--ec-border-color);
112
+ padding-bottom: .25rem;
113
+ margin-bottom: .25rem;
114
+ }
115
+
116
+ @each $index in (1, 2, 3) {
117
+ $padding: $index + .5;
118
+ &.indent-#{$index} .item-wrapper {
119
+ padding-left: #{$padding}rem;
120
+ }
121
+ }
122
+ }
123
+ }
124
+
125
+ @mixin menu-parent {
126
+ display: flex;
127
+ flex-direction: column;
128
+ flex: auto;
129
+ position: relative;
130
+ max-width: 100%;
131
+
132
+ > header {
133
+ cursor: pointer;
134
+
135
+ &.is-selected,
136
+ &.is-highlighted {
137
+ .item-wrapper {
138
+ background-color: var(--ec-background-color-selected);
139
+ }
140
+ }
141
+
142
+ &:hover .item-wrapper {
143
+ background-color: var(--ec-background-color-hover);
144
+ }
145
+ }
146
+ }