@agorapulse/ui-theme 20.1.10 → 20.1.12

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.
Binary file
@@ -0,0 +1,231 @@
1
+ @mixin btn-primary-color($color) {
2
+ background: var(--ref-color-#{$color}-100);
3
+
4
+ &:hover {
5
+ background-color: var(--ref-color-#{$color}-80);
6
+ }
7
+
8
+ &:active:not(:disabled) {
9
+ background-color: var(--ref-color-#{$color}-60);
10
+ }
11
+
12
+ &:disabled {
13
+ background-color: var(--ref-color-#{$color}-20);
14
+ }
15
+
16
+ &.loading {
17
+ background-color: var(--ref-color-#{$color}-60);
18
+ }
19
+
20
+ .loading-bar {
21
+ background-color: var(--ref-color-#{$color}-100);
22
+ }
23
+ }
24
+
25
+ @mixin btn-secondary-color($color) {
26
+ background: var(--ref-color-#{$color}-10);
27
+ color: var(--ref-color-#{$color}-100);
28
+
29
+ ap-symbol {
30
+ color: var(--ref-color-#{$color}-100);
31
+ }
32
+
33
+ &:hover {
34
+ background-color: var(--ref-color-#{$color}-20);
35
+ }
36
+
37
+ &:active:not(:disabled) {
38
+ background-color: var(--ref-color-#{$color}-40);
39
+ }
40
+
41
+ &:focus:not(:disabled):not(:active) {
42
+ background-color: var(--ref-color-#{$color}-10);
43
+ }
44
+
45
+ &:disabled {
46
+ background-color: var(--ref-color-#{$color}-10);
47
+ color: var(--ref-color-#{$color}-20);
48
+
49
+ ap-symbol {
50
+ color: var(--ref-color-#{$color}-20);
51
+ }
52
+ }
53
+
54
+ &.loading {
55
+ background-color: var(--ref-color-#{$color}-40);
56
+ }
57
+
58
+ .loading-bar {
59
+ background-color: var(--ref-color-#{$color}-100);
60
+ }
61
+ }
62
+
63
+ @mixin btn-stroked-color(
64
+ $color,
65
+ $text-color-shade: 100,
66
+ $border-color-shade: 60,
67
+ $hover-border-shade: 80,
68
+ $active-border-shade: 100,
69
+ $focus-border-shade: 60,
70
+ $loading-bar-shade: 100
71
+ ) {
72
+ border-color: var(--ref-color-#{$color}-#{$border-color-shade});
73
+ color: var(--ref-color-#{$color}-#{$text-color-shade});
74
+
75
+ ap-symbol {
76
+ color: var(--ref-color-#{$color}-#{$text-color-shade});
77
+ }
78
+
79
+ &:hover {
80
+ border-color: var(--ref-color-#{$color}-#{$hover-border-shade});
81
+ }
82
+
83
+ &:active:not(:disabled) {
84
+ border-color: var(--ref-color-#{$color}-#{$active-border-shade});
85
+ }
86
+
87
+ &:focus:not(:disabled):not(:active) {
88
+ border-color: var(--ref-color-#{$color}-#{$focus-border-shade});
89
+ }
90
+
91
+ &:disabled {
92
+ border-color: var(--ref-color-#{$color}-20);
93
+ color: var(--ref-color-#{$color}-20);
94
+
95
+ ap-symbol {
96
+ color: var(--ref-color-#{$color}-20);
97
+ }
98
+ }
99
+
100
+ &.loading {
101
+ border-color: var(--ref-color-#{$color}-20);
102
+ color: var(--ref-color-#{$color}-40);
103
+
104
+ ap-symbol {
105
+ color: var(--ref-color-#{$color}-40);
106
+ }
107
+ }
108
+
109
+ .loading-bar {
110
+ background-color: var(--ref-color-#{$color}-#{$loading-bar-shade});
111
+ }
112
+ }
113
+
114
+ @mixin btn-ghost-color(
115
+ $color,
116
+ $text-color-shade: 100,
117
+ $hover-bg-shade: 10,
118
+ $active-bg-shade: 20,
119
+ $focus-bg-shade: 20,
120
+ $disabled-text-shade: 20,
121
+ $loading-text-shade: 40,
122
+ $loading-bar-shade: 100,
123
+ $border-color-shade: null,
124
+ $hover-border-shade: null,
125
+ $active-border-shade: null,
126
+ $focus-border-shade: null
127
+ ) {
128
+ color: var(--ref-color-#{$color}-#{$text-color-shade});
129
+
130
+ ap-symbol {
131
+ color: var(--ref-color-#{$color}-#{$text-color-shade});
132
+ }
133
+
134
+ &:hover {
135
+ background-color: var(--ref-color-#{$color}-#{$hover-bg-shade});
136
+ @if $hover-border-shade {
137
+ border-color: var(--ref-color-#{$color}-#{$hover-border-shade});
138
+ }
139
+ }
140
+
141
+ &:active:not(:disabled) {
142
+ background-color: var(--ref-color-#{$color}-#{$active-bg-shade});
143
+ @if $active-border-shade {
144
+ border-color: var(--ref-color-#{$color}-#{$active-border-shade});
145
+ }
146
+ }
147
+
148
+ &:focus:not(:disabled):not(:active) {
149
+ background-color: var(--ref-color-#{$color}-#{$focus-bg-shade});
150
+ @if $focus-border-shade {
151
+ border-color: var(--ref-color-#{$color}-#{$focus-border-shade});
152
+ }
153
+ }
154
+
155
+ &:disabled {
156
+ color: var(--ref-color-#{$color}-#{$disabled-text-shade});
157
+
158
+ ap-symbol {
159
+ color: var(--ref-color-#{$color}-#{$disabled-text-shade});
160
+ }
161
+ }
162
+
163
+ &.loading:not(.locked) {
164
+ color: var(--ref-color-#{$color}-#{$loading-text-shade});
165
+
166
+ ap-symbol {
167
+ color: var(--ref-color-#{$color}-#{$loading-text-shade});
168
+ }
169
+ }
170
+
171
+ .loading-bar {
172
+ background-color: var(--ref-color-#{$color}-#{$loading-bar-shade});
173
+ }
174
+
175
+ @if $border-color-shade {
176
+ border: 1px solid var(--ref-color-#{$color}-#{$border-color-shade});
177
+ }
178
+ }
179
+
180
+ @mixin btn-mermaid-inactive-state {
181
+ background: linear-gradient(
182
+ 90deg,
183
+ var(--ref-color-mermaid-gradient-from40) 0%,
184
+ var(--ref-color-mermaid-gradient-to40) 100%
185
+ );
186
+
187
+ &::after {
188
+ background: var(--ref-color-white);
189
+ }
190
+
191
+ ap-symbol {
192
+ opacity: 0.4;
193
+ }
194
+ }
195
+
196
+ @mixin icon-btn-color($base, $hover-bg: 10, $active-bg: 20) {
197
+ &:hover:not(.stroked) {
198
+ background: var(--ref-color-#{$base}-#{$hover-bg});
199
+ }
200
+
201
+ &:active:not(.stroked) {
202
+ background: var(--ref-color-#{$base}-#{$active-bg});
203
+ }
204
+
205
+ &:disabled {
206
+ ap-symbol {
207
+ color: var(--ref-color-#{$base}-20);
208
+ }
209
+ }
210
+
211
+ ap-symbol {
212
+ color: var(--ref-color-#{$base}-100);
213
+ }
214
+ }
215
+
216
+ @mixin icon-btn-stroked-color($base) {
217
+ &:not(.loading):not(.locked) {
218
+ border-color: var(--ref-color-#{$base}-100);
219
+
220
+ &:hover:not(.locked) {
221
+ border-color: var(--ref-color-#{$base}-60);
222
+ }
223
+
224
+ &:active:not(.locked) {
225
+ border-color: var(--ref-color-#{$base}-100);
226
+ }
227
+ }
228
+ &:disabled {
229
+ border-color: var(--ref-color-#{$base}-20);
230
+ }
231
+ }
@@ -1,12 +1,89 @@
1
+ // ============================================================================
2
+ // Variables
3
+ // ============================================================================
4
+
5
+ $cell-height: 52px;
6
+ $cell-height-small: 40px;
7
+
8
+ // ============================================================================
9
+ // Base Table Styles
10
+ // ============================================================================
11
+
1
12
  .ap-table {
13
+ // Layout
14
+ height: 100%;
2
15
  width: 100%;
16
+ min-height: 100%;
3
17
  overflow-x: auto;
18
+
19
+ // Visual styles
4
20
  font-family: Averta;
5
21
  border-radius: var(--ref-border-radius-md);
6
22
  border-collapse: separate;
7
23
  border-spacing: 0;
8
24
  background-color: var(--ref-color-white);
9
25
 
26
+ // ========================================================================
27
+ // Table Structure
28
+ // ========================================================================
29
+
30
+ tbody {
31
+ height: calc(100% - $cell-height);
32
+ max-height: calc(100% - $cell-height);
33
+ width: 100%;
34
+ overflow-y: scroll;
35
+ border-radius: var(--ref-border-radius-md);
36
+ }
37
+
38
+ // When table has footer, adjust tbody height
39
+ &:has(tfoot > .cdk-footer-row) tbody {
40
+ height: calc(100% - 2 * $cell-height);
41
+ max-height: calc(100% - 2 * $cell-height);
42
+ }
43
+
44
+ tr[cdk-row] {
45
+ background-color: var(--ref-color-white);
46
+
47
+ &:last-child {
48
+ td[cdk-cell] {
49
+ border-bottom: none;
50
+ }
51
+
52
+ td[cdk-cell]:first-child {
53
+ border-bottom-left-radius: var(--ref-border-radius-md);
54
+ }
55
+
56
+ td[cdk-cell]:last-child {
57
+ border-bottom-right-radius: var(--ref-border-radius-md);
58
+ }
59
+ }
60
+
61
+ &.selected {
62
+ background-color: var(--ref-color-soft-blue-10);
63
+ }
64
+ }
65
+
66
+ // ========================================================================
67
+ // Table Modifiers
68
+ // ========================================================================
69
+
70
+ &.ap-table-scrollable {
71
+ display: block;
72
+ table-layout: fixed;
73
+
74
+ tbody {
75
+ display: block;
76
+ }
77
+
78
+ thead,
79
+ tbody tr,
80
+ tfoot {
81
+ display: table;
82
+ width: 100%;
83
+ table-layout: fixed;
84
+ }
85
+ }
86
+
10
87
  &.ap-table--outer-border {
11
88
  border: 1px solid var(--ref-color-grey-20);
12
89
  }
@@ -15,25 +92,43 @@
15
92
  background-color: var(--ref-color-grey-05);
16
93
  }
17
94
 
18
- &.ap-table--small {
19
- th[cdk-header-cell],
20
- td[cdk-cell] {
21
- height: 40px;
22
- }
23
- }
24
-
25
95
  &.ap-table--striped tbody tr[cdk-row]:nth-child(even) {
26
96
  background-color: var(--ref-color-grey-bg);
27
97
  }
28
98
 
29
- // Selected rows in striped tables - higher specificity to override striped background
30
99
  &.ap-table--striped tbody tr[cdk-row].selected {
31
100
  background-color: var(--ref-color-soft-blue-10);
32
101
  }
33
102
 
34
- // Header cells - using CDK attribute selector
103
+ &.ap-table--small {
104
+ th[cdk-header-cell],
105
+ td[cdk-cell],
106
+ td[cdk-footer-cell] {
107
+ height: $cell-height-small;
108
+ }
109
+
110
+ tbody {
111
+ height: calc(100% - $cell-height-small);
112
+ max-height: calc(100% - $cell-height-small);
113
+ }
114
+
115
+ &:has(tfoot > .cdk-footer-row) tbody {
116
+ height: calc(100% - 2 * $cell-height-small);
117
+ max-height: calc(100% - 2 * $cell-height-small);
118
+ }
119
+
120
+ th[cdk-header-cell].ap-table__header-cell--checkbox,
121
+ td[cdk-cell].ap-table__body-cell--checkbox {
122
+ width: $cell-height-small;
123
+ }
124
+ }
125
+
126
+ // ========================================================================
127
+ // Header Cells
128
+ // ========================================================================
129
+
35
130
  th[cdk-header-cell] {
36
- height: 52px;
131
+ height: $cell-height;
37
132
  padding: var(--ref-spacing-xxs) var(--ref-spacing-xs);
38
133
  text-align: left;
39
134
  font-size: var(--ref-font-size-xs);
@@ -54,7 +149,6 @@
54
149
  border-top-right-radius: var(--ref-border-radius-md);
55
150
  }
56
151
 
57
- // Right-aligned header cells
58
152
  &.ap-table__header-cell--right {
59
153
  text-align: right;
60
154
  justify-content: flex-end;
@@ -63,45 +157,35 @@
63
157
  &.ap-table__header-cell--sortable {
64
158
  cursor: pointer;
65
159
 
66
- // Hide sorting icon by default
67
160
  ap-symbol {
68
161
  opacity: 0;
69
162
  }
70
163
 
71
- // Show sorting icon on hover
72
164
  &:hover ap-symbol {
73
165
  opacity: 1;
74
166
  }
75
167
  }
76
- }
77
168
 
78
- // Checkbox cells - shared styles for both header and body
79
- th[cdk-header-cell].ap-table__header-cell--checkbox,
80
- td[cdk-cell].ap-table__body-cell--checkbox {
81
- width: 52px;
82
- text-align: center;
83
- }
84
-
85
- // Small variant checkbox cells
86
- &.ap-table--small {
87
- th[cdk-header-cell].ap-table__header-cell--checkbox,
88
- td[cdk-cell].ap-table__body-cell--checkbox {
89
- width: 40px;
169
+ &.ap-table__header-cell--checkbox {
170
+ width: $cell-height;
171
+ text-align: center;
90
172
  }
91
173
  }
92
174
 
93
- // Body cells - using CDK attribute selector
175
+ // ========================================================================
176
+ // Body Cells
177
+ // ========================================================================
178
+
94
179
  td[cdk-cell] {
95
180
  padding: 0 var(--ref-spacing-xs);
96
181
  font-size: var(--ref-font-size-sm);
97
182
  color: var(--ref-color-grey-100);
98
183
  border: none;
99
184
  border-bottom: 1px solid var(--ref-color-grey-10);
100
- height: 52px;
185
+ height: $cell-height;
101
186
  vertical-align: middle;
102
187
  font-family: Averta;
103
188
 
104
- // Right-aligned body cells
105
189
  &.ap-table__body-cell--right {
106
190
  text-align: right;
107
191
  justify-content: flex-end;
@@ -111,41 +195,53 @@
111
195
  }
112
196
  }
113
197
 
114
- // Drag handle body cells
198
+ &.ap-table__body-cell--checkbox {
199
+ width: $cell-height;
200
+ text-align: center;
201
+ }
202
+
115
203
  &.ap-table__body-cell--drag {
116
204
  padding: 0 var(--ref-spacing-sm);
117
205
  }
118
206
  }
119
207
 
120
- // Show grabbing cursor on grab icon when row is being dragged
121
- .ap-table__drag-handle {
122
- cursor: move;
123
- }
208
+ // ========================================================================
209
+ // Footer Cells
210
+ // ========================================================================
124
211
 
125
- // Body rows - using CDK attribute selector
126
- tr[cdk-row] {
212
+ td[cdk-footer-cell] {
213
+ padding: 0 var(--ref-spacing-xs);
214
+ font-size: var(--ref-font-size-sm);
215
+ color: var(--ref-color-grey-100);
216
+ border: none;
217
+ border-top: 1px solid var(--ref-color-grey-10);
218
+ height: $cell-height;
219
+ vertical-align: middle;
220
+ font-family: Averta;
221
+ position: sticky;
222
+ bottom: 0;
223
+ z-index: 1;
127
224
  background-color: var(--ref-color-white);
128
225
 
129
- &:last-child {
130
- td[cdk-cell] {
131
- border-bottom: none;
132
- }
133
-
134
- td[cdk-cell]:first-child {
135
- border-bottom-left-radius: var(--ref-border-radius-md);
136
- }
226
+ &.ap-table__footer-cell--right {
227
+ text-align: right;
228
+ justify-content: flex-end;
137
229
 
138
- td[cdk-cell]:last-child {
139
- border-bottom-right-radius: var(--ref-border-radius-md);
230
+ .ap-table__cell-content {
231
+ justify-content: flex-end;
140
232
  }
141
233
  }
142
234
 
143
- &.selected {
144
- background-color: var(--ref-color-soft-blue-10);
235
+ &.ap-table__footer-cell--checkbox {
236
+ width: $cell-height;
237
+ text-align: center;
145
238
  }
146
239
  }
147
240
 
148
- // Header and cell content wrappers for proper alignment
241
+ // ========================================================================
242
+ // Cell Content & Utilities
243
+ // ========================================================================
244
+
149
245
  .ap-table__header-content {
150
246
  display: flex;
151
247
  align-items: center;
@@ -156,9 +252,14 @@
156
252
  display: flex;
157
253
  align-items: center;
158
254
  gap: var(--ref-spacing-xxs);
255
+
256
+ &.ap-table__cell-content--items {
257
+ flex-wrap: wrap;
258
+ gap: var(--ref-spacing-xxxs);
259
+ padding: var(--ref-spacing-xxs) 0;
260
+ }
159
261
  }
160
262
 
161
- // Text styling utilities - can be used directly on spans within cells
162
263
  .ap-table__cell-text-container {
163
264
  display: flex;
164
265
  flex-direction: column;
@@ -180,25 +281,22 @@
180
281
  line-height: var(--ref-font-line-height-xs);
181
282
  }
182
283
 
183
- // Action buttons alignment - can be used on action containers within cells
184
284
  .ap-table__cell-actions {
185
285
  display: flex;
186
286
  align-items: center;
287
+ justify-content: flex-end;
187
288
  gap: var(--ref-spacing-xxxs);
188
- margin-left: auto;
189
289
  }
190
290
 
191
- // Spacing for labels and tags in table cells
192
- .ap-table__cell-content {
193
- &.ap-table__cell-content--items {
194
- flex-wrap: wrap;
195
- gap: var(--ref-spacing-xxxs);
196
- padding: var(--ref-spacing-xxs) 0;
197
- }
291
+ .ap-table__drag-handle {
292
+ cursor: move;
198
293
  }
199
294
  }
200
295
 
201
- // CDK Drag and Drop styling - applied globally
296
+ // ============================================================================
297
+ // CDK Drag and Drop Styles (Global)
298
+ // ============================================================================
299
+
202
300
  tr[cdk-row] {
203
301
  &.cdk-drag-preview {
204
302
  display: flex;
@@ -208,7 +306,6 @@ tr[cdk-row] {
208
306
  border: 1px solid var(--ref-color-electric-blue-40);
209
307
  opacity: 0.95;
210
308
 
211
- // Remove default table borders from preview
212
309
  td[cdk-cell] {
213
310
  border: none;
214
311
  padding: 0 var(--ref-spacing-xs);
@@ -218,7 +315,6 @@ tr[cdk-row] {
218
315
  background-color: transparent;
219
316
  }
220
317
 
221
- // Preserve text styling in drag preview
222
318
  .ap-table__cell-text {
223
319
  color: var(--ref-color-grey-100);
224
320
  font-size: var(--ref-font-size-sm);
@@ -241,7 +337,6 @@ tr[cdk-row] {
241
337
  transition: transform 350ms cubic-bezier(0, 0, 0.2, 1);
242
338
  }
243
339
 
244
- // Dragging state styles
245
340
  &.cdk-drop-list-dragging .cdk-drag {
246
341
  transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
247
342
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agorapulse/ui-theme",
3
- "version": "20.1.10",
3
+ "version": "20.1.12",
4
4
  "description": "Agorapulse UI Theme Library",
5
5
  "repository": {
6
6
  "type": "git",
Binary file