@acontplus/ng-components 2.1.32 → 2.4.0

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.
@@ -1,131 +0,0 @@
1
- //@use "@angular/material" as mat;
2
- //
3
- //:host {
4
- // display: block;
5
- // box-sizing: border-box;
6
- //
7
- // mat-card {
8
- // height: 100%;
9
- // display: flex;
10
- // flex-direction: column;
11
- // transition:
12
- // box-shadow 200ms ease,
13
- // transform 200ms ease;
14
- // overflow: hidden;
15
- //
16
- // &:hover {
17
- // // mat.elevation is already theme-aware.
18
- // @include mat.elevation(4);
19
- // transform: translateY(-2px);
20
- // }
21
- //
22
- // &-header {
23
- // padding: 1rem 1rem 0.5rem;
24
- //
25
- // mat-card-title {
26
- // font-weight: 500;
27
- // line-height: 1.2;
28
- // margin-bottom: 0.25rem;
29
- // }
30
- //
31
- // mat-card-subtitle {
32
- // // Use a theme color for subtitles, e.g., text-secondary.
33
- // // The `mat.get-theme-color` function allows you to get specific colors from your theme.
34
- // // Here, 'text' refers to the text palette and 'secondary' is a shade within it.
35
- // // You might need to adjust 'secondary' based on your specific theme definition
36
- // // or use `mat.get-color-from-palette($theme-palette, $color-shade)`.
37
- // color: mat.get-theme-color(text, secondary);
38
- // line-height: 1.3;
39
- // }
40
- //
41
- // [mat-card-avatar] {
42
- // width: 40px;
43
- // height: 40px;
44
- // border-radius: 50%;
45
- // margin-right: 1rem;
46
- // // Use a theme color for the border, e.g., divider or text-disabled.
47
- // border: 2px solid mat.get-theme-color(divider);
48
- // }
49
- // }
50
- //
51
- // &-content {
52
- // flex: 1;
53
- // padding: 1rem;
54
- // overflow: auto;
55
- //
56
- // &:not(:first-child) {
57
- // padding-top: 0;
58
- // }
59
- // }
60
- //
61
- // &.mat-card-divider {
62
- // // Use a theme color for the divider.
63
- // border-top: 1px solid mat.get-theme-color(divider);
64
- // padding-top: 0.5rem;
65
- // }
66
- //
67
- // &-actions {
68
- // padding: 0.5rem 1rem 1rem;
69
- // margin: 0;
70
- // min-height: 52px;
71
- // box-sizing: border-box;
72
- // display: flex;
73
- // flex-wrap: wrap;
74
- // gap: 0.5rem;
75
- //
76
- // &[align="end"] {
77
- // justify-content: flex-end;
78
- // }
79
- //
80
- // &[align="center"] {
81
- // justify: center;
82
- // }
83
- //
84
- // &[align="start"] {
85
- // justify-content: flex-start;
86
- // }
87
- //
88
- // button {
89
- // margin: 0 0.25rem;
90
- // min-width: 88px; // Material spec minimum button width
91
- //
92
- // mat-icon {
93
- // margin-right: 0.5rem;
94
- // font-size: 18px;
95
- // height: 18px;
96
- // width: 18px;
97
- // }
98
- // }
99
- // }
100
- // }
101
- //
102
- // // Responsive adjustments
103
- // @media (max-width: 600px) {
104
- // mat-card {
105
- // &-header {
106
- // padding: 0.75rem 0.75rem 0.25rem;
107
- //
108
- // [mat-card-avatar] {
109
- // width: 36px;
110
- // height: 36px;
111
- // margin-right: 0.75rem;
112
- // }
113
- // }
114
- //
115
- // &-content {
116
- // padding: 0.75rem;
117
- // }
118
- //
119
- // &-actions {
120
- // padding: 0.5rem;
121
- // flex-direction: column;
122
- // gap: 0.5rem;
123
- //
124
- // button {
125
- // width: 100%;
126
- // margin: 0.25rem 0;
127
- // }
128
- // }
129
- // }
130
- // }
131
- //}
@@ -1,6 +1,5 @@
1
1
  .acp-dialog-header {
2
2
  cursor: move;
3
- //padding: 12px 24px;
4
3
  border-bottom: 1px solid var(--mat-sys-outline-variant, #dee2e6);
5
4
  color: var(--mat-sys-on-surface, #212529);
6
5
  position: relative;
@@ -1,10 +1,3 @@
1
- // .acp-grid-img {
2
- // display: inline-block;
3
- // width: 32px;
4
- // border-radius: 4px;
5
- // vertical-align: middle;
6
- // }
7
-
8
1
  .acp-placeholder-box {
9
2
  width: 50px;
10
3
  height: 50px;
@@ -18,7 +11,7 @@
18
11
  justify-content: center;
19
12
  align-items: center;
20
13
 
21
- color: #6b7280; /* gris elegante */
14
+ color: #4b5563; /* darker gray for better contrast */
22
15
  font-size: 0.85rem;
23
16
  gap: 8px;
24
17
  }
@@ -0,0 +1,41 @@
1
+ @use 'sass:map';
2
+ @use '@angular/material' as mat;
3
+ @use '../../../core/tokens/token-utils';
4
+ @use './_m3-kpi-card' as m3-kpi-card;
5
+
6
+ @mixin color($colors) {
7
+ @include token-utils.batch-create-token-values(
8
+ $colors,
9
+ ((namespace: kpi-card, tokens: token-utils.get-overrides(m3-kpi-card.get-tokens(), kpi-card)))
10
+ );
11
+ }
12
+
13
+ @mixin typography($typography) {
14
+ // Typography handled by Material tokens
15
+ }
16
+
17
+ @mixin density($density) {
18
+ // Density handled by Material tokens
19
+ }
20
+
21
+ @mixin base($base) {
22
+ @include token-utils.batch-create-token-values(
23
+ $base,
24
+ ((namespace: kpi-card, tokens: token-utils.get-overrides(m3-kpi-card.get-tokens(), kpi-card)))
25
+ );
26
+ }
27
+
28
+ @mixin theme($theme) {
29
+ @include color(map.get(m3-kpi-card.get-tokens($theme), color));
30
+ @include typography(map.get(m3-kpi-card.get-tokens($theme), typography));
31
+ @include density(map.get(m3-kpi-card.get-tokens($theme), density));
32
+ @include base(map.get(m3-kpi-card.get-tokens($theme), base));
33
+ }
34
+
35
+ @function color-variants-backwards-compatibility($theme) {
36
+ @return ();
37
+ }
38
+
39
+ @function overrides($tokens: ()) {
40
+ @return $tokens;
41
+ }
@@ -0,0 +1,98 @@
1
+ @use 'sass:map';
2
+ @use '@angular/material' as mat;
3
+ @use '../../../core/tokens/m3-utils';
4
+ @use '../../../core/tokens/m3';
5
+
6
+ @function get-tokens($theme: m3.$sys-theme) {
7
+ $system: m3-utils.get-system($theme);
8
+
9
+ // Semantic color palettes for professional appearance
10
+ // Using more subtle tones for enterprise dashboard aesthetics
11
+ $semantic-palettes: (
12
+ success-light: mat.$green-palette,
13
+ warning-light: mat.$orange-palette,
14
+ error-light: mat.$red-palette,
15
+ info-light: mat.$azure-palette,
16
+ );
17
+
18
+ $color-tokens: ();
19
+ @each $name, $palette in $semantic-palettes {
20
+ $color-tokens: map.merge(
21
+ $color-tokens,
22
+ (
23
+ // Use on-surface for better contrast and professional appearance
24
+ kpi-card-#{$name}-color: map.get($system, on-surface),
25
+ // Use subtle background with semantic color accent (95 for light, 25 for dark)
26
+ kpi-card-#{$name}-bg: light-dark(map.get($palette, 95), map.get($palette, 25))
27
+ )
28
+ );
29
+ }
30
+
31
+ // Add success (bright) color using green palette
32
+ $success-palette: mat.$green-palette;
33
+ $color-tokens: map.merge(
34
+ $color-tokens,
35
+ (
36
+ // Use white text for bright success color for better contrast
37
+ kpi-card-success-color: light-dark(#ffffff, map.get($success-palette, 20)),
38
+ kpi-card-success-bg: light-dark(map.get($success-palette, 50), map.get($success-palette, 70))
39
+ )
40
+ );
41
+
42
+ // Add warning (bright) color - use Material Design warning/error color
43
+ // Material Design uses error color for warnings in some contexts, but we'll use orange palette
44
+ // to match Material button warning color
45
+ $warning-palette: mat.$orange-palette;
46
+ $color-tokens: map.merge(
47
+ $color-tokens,
48
+ (
49
+ // Use white text for bright warning color for better contrast
50
+ kpi-card-warning-color: light-dark(#ffffff, map.get($warning-palette, 20)),
51
+ // Use orange 60 for light mode (similar to Material button warning), 80 for dark mode
52
+ kpi-card-warning-bg: light-dark(map.get($warning-palette, 60), map.get($warning-palette, 80))
53
+ )
54
+ );
55
+
56
+ // Add info (bright) color using azure palette
57
+ $info-palette: mat.$azure-palette;
58
+ $color-tokens: map.merge(
59
+ $color-tokens,
60
+ (
61
+ // Use white text for bright info color for better contrast
62
+ kpi-card-info-color: light-dark(#ffffff, map.get($info-palette, 20)),
63
+ kpi-card-info-bg: light-dark(map.get($info-palette, 50), map.get($info-palette, 70))
64
+ )
65
+ );
66
+
67
+ $tokens: (
68
+ base: (
69
+ kpi-card-container-shape: map.get($system, corner-medium),
70
+ kpi-card-container-height: 200px,
71
+ kpi-card-container-elevation: 1,
72
+ ),
73
+ color: map.merge(
74
+ (
75
+ // Primary: Use primary theme color with on-primary text
76
+ kpi-card-primary-color: map.get($system, on-primary),
77
+ kpi-card-primary-bg: map.get($system, primary),
78
+ // Secondary: Use secondary theme color with on-secondary text
79
+ kpi-card-secondary-color: map.get($system, on-secondary),
80
+ kpi-card-secondary-bg: map.get($system, secondary),
81
+ // Error: Use error theme color with on-error text (Material Design 3 standard)
82
+ kpi-card-error-color: map.get($system, on-error),
83
+ kpi-card-error-bg: map.get($system, error),
84
+ // Neutral: Minimal styling for subtle cards
85
+ kpi-card-neutral-color: map.get($system, on-surface-variant),
86
+ kpi-card-neutral-bg: map.get($system, surface-variant),
87
+ // Custom: Allow full customization
88
+ kpi-card-custom-color: map.get($system, on-surface),
89
+ kpi-card-custom-bg: map.get($system, surface-container)
90
+ ),
91
+ $color-tokens
92
+ ),
93
+ typography: (),
94
+ density: (),
95
+ );
96
+
97
+ @return $tokens;
98
+ }