@acontplus/ng-components 3.0.1 → 3.1.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.
Files changed (29) hide show
  1. package/fesm2022/acontplus-ng-components.mjs +7326 -4620
  2. package/fesm2022/acontplus-ng-components.mjs.map +1 -1
  3. package/package.json +5 -2
  4. package/src/_index.scss +2 -0
  5. package/src/core/style/_breakpoints.scss +63 -0
  6. package/src/core/style/_variables.scss +9 -0
  7. package/src/core/theming/_all-theme.scss +16 -1
  8. package/src/core/theming/prebuilt/aqua.scss +1 -1
  9. package/src/core/theming/prebuilt/blue.scss +1 -1
  10. package/src/core/theming/prebuilt/cyan.scss +1 -1
  11. package/src/core/theming/prebuilt/green.scss +1 -1
  12. package/src/core/theming/prebuilt/orange.scss +1 -1
  13. package/src/core/theming/prebuilt/pink.scss +1 -1
  14. package/src/core/theming/prebuilt/purple.scss +1 -1
  15. package/src/core/theming/prebuilt/rose.scss +1 -1
  16. package/src/core/tokens/_global-variables.scss +53 -0
  17. package/src/lib/components/button/v2/button.scss +172 -12
  18. package/src/lib/components/card/card.scss +225 -0
  19. package/src/lib/components/context-menu/context-menu-panel.scss +283 -0
  20. package/src/lib/components/date-range-input/date-range-input.scss +4 -0
  21. package/src/lib/components/theme/header/header.scss +166 -0
  22. package/src/lib/components/theme/shell-layout/shell-layout.scss +237 -0
  23. package/src/lib/components/theme/sidebar/sidebar.scss +0 -0
  24. package/src/lib/components/theme/sidemenu/sidemenu.scss +169 -0
  25. package/src/lib/components/theme/topmenu/topmenu.scss +83 -0
  26. package/src/lib/components/theme/user-menu/user-menu.scss +194 -0
  27. package/src/lib/components/theme/user-panel/user-panel.scss +64 -0
  28. package/types/acontplus-ng-components.d.ts +1595 -37
  29. /package/src/lib/components/{theme-toggle → theme/theme-toggle}/theme-toggle.scss +0 -0
@@ -0,0 +1,225 @@
1
+ @use '@angular/material' as mat;
2
+
3
+ // Card component styling with Material Design tokens
4
+ // Using mat.card-overrides to customize card-specific design tokens
5
+ .acp-card {
6
+ @include mat.card-overrides(
7
+ (
8
+ elevated-container-color: light-dark(#ffffff, #1a1b1f),
9
+ outlined-container-color: light-dark(#ffffff, #1a1b1f),
10
+ title-text-line-height: 1.6rem,
11
+ title-text-weight: 500,
12
+ subtitle-text-weight: 400,
13
+ elevated-container-shape: var(--mat-sys-corner-small),
14
+ outlined-container-shape: var(--mat-sys-corner-small),
15
+ // elevated-container-color: var(--mat-sys-surface-container),
16
+ // elevated-container-shape: var(--mat-sys-corner-large),
17
+ // outlined-container-shape: var(--mat-sys-corner-large),
18
+ outlined-outline-color: var(--mat-sys-outline-variant),
19
+ filled-container-color: var(--mat-sys-surface-container-highest),
20
+ title-text-size: var(--mat-sys-title-large),
21
+ subtitle-text-size: var(--mat-sys-body-medium),
22
+ subtitle-text-color: var(--mat-sys-on-surface-variant),
23
+ elevated-container-elevation: 0 4px 12px rgba(0, 0, 0, 0.08),
24
+ )
25
+ );
26
+ }
27
+
28
+ // Custom styles for card sections
29
+ .acp-card-media {
30
+ width: 100%;
31
+ object-fit: cover;
32
+ border-radius: var(--mat-sys-corner-large) var(--mat-sys-corner-large) 0 0;
33
+ }
34
+
35
+ // Footer padding
36
+ .mat-mdc-card-footer {
37
+ padding: 16px;
38
+ }
39
+
40
+ // Actions gap
41
+ .mat-mdc-card-actions {
42
+ gap: 8px;
43
+ }
44
+
45
+ // Host wrapper styles
46
+ .acp-card-wrapper {
47
+ display: block;
48
+ transition: box-shadow 0.2s ease-in-out;
49
+
50
+ // Hover effect
51
+ &.acp-card--hover:hover {
52
+ box-shadow: var(--mat-sys-level3);
53
+ }
54
+
55
+ // Clickable state
56
+ &.acp-card--clickable {
57
+ cursor: pointer;
58
+ user-select: none;
59
+
60
+ &:hover {
61
+ box-shadow: var(--mat-sys-level2);
62
+ }
63
+
64
+ &:active {
65
+ box-shadow: var(--mat-sys-level1);
66
+ }
67
+ }
68
+
69
+ // Disabled state
70
+ &.acp-card--disabled {
71
+ opacity: 0.6;
72
+ pointer-events: none;
73
+ }
74
+
75
+ // Border radius variants
76
+ &.acp-card--rounded-4 {
77
+ .acp-card,
78
+ .acp-card-media {
79
+ border-radius: 4px;
80
+ }
81
+ }
82
+
83
+ &.acp-card--rounded-8 {
84
+ .acp-card,
85
+ .acp-card-media {
86
+ border-radius: 8px;
87
+ }
88
+ }
89
+
90
+ &.acp-card--rounded-12 {
91
+ .acp-card,
92
+ .acp-card-media {
93
+ border-radius: 12px;
94
+ }
95
+ }
96
+
97
+ &.acp-card--rounded-16 {
98
+ .acp-card,
99
+ .acp-card-media {
100
+ border-radius: 16px;
101
+ }
102
+ }
103
+
104
+ &.acp-card--rounded-20 {
105
+ .acp-card,
106
+ .acp-card-media {
107
+ border-radius: 20px;
108
+ }
109
+ }
110
+
111
+ &.acp-card--rounded-24 {
112
+ .acp-card,
113
+ .acp-card-media {
114
+ border-radius: 24px;
115
+ }
116
+ }
117
+
118
+ // Padding variants
119
+ &.acp-card--padding-small {
120
+ .mat-mdc-card-content {
121
+ padding: 12px;
122
+ }
123
+ }
124
+
125
+ &.acp-card--padding-medium {
126
+ .mat-mdc-card-content {
127
+ padding: 16px;
128
+ }
129
+ }
130
+
131
+ &.acp-card--padding-large {
132
+ .mat-mdc-card-content {
133
+ padding: 24px;
134
+ }
135
+ }
136
+
137
+ // Full height
138
+ &.acp-card--full-height {
139
+ height: 100%;
140
+ }
141
+
142
+ // Full width
143
+ &.acp-card--full-width {
144
+ width: 100%;
145
+ }
146
+ }
147
+
148
+ // Material Design background color utility classes
149
+ // Primary
150
+ .acp-card--primary {
151
+ color: var(--mat-sys-on-primary);
152
+ background-color: var(--mat-sys-primary);
153
+ }
154
+
155
+ .acp-card--primary-container {
156
+ color: var(--mat-sys-on-primary-container);
157
+ background-color: var(--mat-sys-primary-container);
158
+ }
159
+
160
+ // Secondary
161
+ .acp-card--secondary {
162
+ color: var(--mat-sys-on-secondary);
163
+ background-color: var(--mat-sys-secondary);
164
+ }
165
+
166
+ .acp-card--secondary-container {
167
+ color: var(--mat-sys-on-secondary-container);
168
+ background-color: var(--mat-sys-secondary-container);
169
+ }
170
+
171
+ // Error
172
+ .acp-card--error {
173
+ color: var(--mat-sys-on-error);
174
+ background-color: var(--mat-sys-error);
175
+ }
176
+
177
+ .acp-card--error-container {
178
+ color: var(--mat-sys-on-error-container);
179
+ background-color: var(--mat-sys-error-container);
180
+ }
181
+
182
+ // Surfaces
183
+ .acp-card--surface {
184
+ color: var(--mat-sys-on-surface);
185
+ background-color: var(--mat-sys-surface);
186
+ }
187
+
188
+ .acp-card--surface-variant {
189
+ color: var(--mat-sys-on-surface-variant);
190
+ background-color: var(--mat-sys-surface-variant);
191
+ }
192
+
193
+ .acp-card--surface-container-highest {
194
+ color: var(--mat-sys-on-surface);
195
+ background-color: var(--mat-sys-surface-container-highest);
196
+ }
197
+
198
+ .acp-card--surface-container-high {
199
+ color: var(--mat-sys-on-surface);
200
+ background-color: var(--mat-sys-surface-container-high);
201
+ }
202
+
203
+ .acp-card--surface-container {
204
+ color: var(--mat-sys-on-surface);
205
+ background-color: var(--mat-sys-surface-container);
206
+ }
207
+
208
+ .acp-card--surface-container-low {
209
+ color: var(--mat-sys-on-surface);
210
+ background-color: var(--mat-sys-surface-container-low);
211
+ }
212
+
213
+ .acp-card--surface-container-lowest {
214
+ background-color: var(--mat-sys-surface-container-lowest);
215
+ }
216
+
217
+ .acp-card--inverse-surface {
218
+ color: var(--mat-sys-inverse-on-surface);
219
+ background-color: var(--mat-sys-inverse-surface);
220
+ }
221
+
222
+ // Disabled
223
+ .acp-card--disabled-bg {
224
+ background-color: color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent);
225
+ }
@@ -0,0 +1,283 @@
1
+ @use '@angular/material' as mat;
2
+
3
+ // Context Menu Panel Host
4
+ .acp-context-menu-panel-host {
5
+ display: block;
6
+ outline: none;
7
+ }
8
+
9
+ // Context Menu Container
10
+ .acp-context-menu-container {
11
+ display: flex;
12
+ flex-direction: column;
13
+ min-width: 200px;
14
+ max-width: 400px;
15
+ max-height: 80vh;
16
+ background-color: var(--mat-sys-surface-container);
17
+ border-radius: var(--acp-context-menu-border-radius, 4px);
18
+ box-shadow: var(
19
+ --acp-context-menu-shadow,
20
+ 0 5px 5px -3px rgba(0, 0, 0, 0.2),
21
+ 0 8px 10px 1px rgba(0, 0, 0, 0.14),
22
+ 0 3px 14px 2px rgba(0, 0, 0, 0.12)
23
+ );
24
+ outline: none;
25
+ animation: acp-context-menu-enter 200ms cubic-bezier(0.4, 0, 0.2, 1);
26
+ overflow: hidden;
27
+
28
+ @media (prefers-reduced-motion: reduce) {
29
+ animation: none;
30
+ }
31
+
32
+ @media (max-width: 600px) {
33
+ min-width: 180px;
34
+ max-width: 300px;
35
+ }
36
+
37
+ @media (max-width: 480px) {
38
+ min-width: 160px;
39
+ max-width: 280px;
40
+ }
41
+ }
42
+
43
+ // Context Menu List
44
+ .acp-context-menu-list {
45
+ display: flex;
46
+ flex-direction: column;
47
+ padding: var(--acp-context-menu-padding, 8px 0);
48
+ list-style: none;
49
+ margin: 0;
50
+ overflow-y: auto;
51
+ max-height: calc(80vh - 16px);
52
+
53
+ // Custom scrollbar styling
54
+ &::-webkit-scrollbar {
55
+ width: 6px;
56
+ }
57
+
58
+ &::-webkit-scrollbar-track {
59
+ background: transparent;
60
+ }
61
+
62
+ &::-webkit-scrollbar-thumb {
63
+ background: var(--acp-context-menu-scrollbar-color, #bdbdbd);
64
+ border-radius: 3px;
65
+
66
+ &:hover {
67
+ background: var(--acp-context-menu-scrollbar-hover-color, #9e9e9e);
68
+ }
69
+ }
70
+ }
71
+
72
+ // Context Menu Item
73
+ .acp-context-menu-item {
74
+ display: flex;
75
+ align-items: center;
76
+ gap: 12px;
77
+ padding: var(--acp-context-menu-item-padding, 8px 16px);
78
+ min-height: 40px;
79
+ background: none;
80
+ border: none;
81
+ color: var(--mat-sys-on-surface);
82
+ font-size: var(--acp-context-menu-item-font-size, 14px);
83
+ font-weight: 500;
84
+ text-align: left;
85
+ cursor: pointer;
86
+ transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
87
+ white-space: nowrap;
88
+ position: relative;
89
+
90
+ @media (prefers-reduced-motion: reduce) {
91
+ transition: none;
92
+ }
93
+
94
+ @media (max-width: 600px) {
95
+ padding: 6px 12px;
96
+ min-height: 36px;
97
+ font-size: 13px;
98
+ gap: 10px;
99
+ }
100
+
101
+ @media (max-width: 480px) {
102
+ padding: 6px 10px;
103
+ min-height: 34px;
104
+ font-size: 12px;
105
+ gap: 8px;
106
+ }
107
+
108
+ &:hover:not(.acp-context-menu-item--disabled) {
109
+ background-color: var(--mat-sys-surface-container-highest);
110
+ }
111
+
112
+ &:focus-visible {
113
+ outline: 2px solid var(--mat-sys-primary);
114
+ outline-offset: -2px;
115
+ }
116
+
117
+ &--selected:not(.acp-context-menu-item--disabled) {
118
+ background-color: var(--mat-sys-surface-container-highest);
119
+ }
120
+
121
+ &--disabled {
122
+ color: var(--mat-sys-on-surface-variant);
123
+ cursor: not-allowed;
124
+ opacity: 0.6;
125
+
126
+ &:hover {
127
+ background-color: transparent;
128
+ }
129
+ }
130
+
131
+ &--danger {
132
+ color: var(--mat-sys-error);
133
+
134
+ &:hover:not(.acp-context-menu-item--disabled) {
135
+ background-color: var(--mat-sys-error-container);
136
+ }
137
+ }
138
+
139
+ &--separator {
140
+ padding: 0;
141
+ min-height: auto;
142
+ cursor: default;
143
+ background: none;
144
+
145
+ &:hover {
146
+ background: none;
147
+ }
148
+ }
149
+
150
+ &--expanded {
151
+ background-color: var(--mat-sys-surface-container-highest);
152
+ }
153
+ }
154
+
155
+ // Context Menu Item Icon
156
+ .acp-context-menu-item-icon {
157
+ display: flex;
158
+ align-items: center;
159
+ justify-content: center;
160
+ width: 24px;
161
+ height: 24px;
162
+ flex-shrink: 0;
163
+
164
+ mat-icon {
165
+ font-size: 20px;
166
+ width: 20px;
167
+ height: 20px;
168
+ }
169
+
170
+ img {
171
+ width: 100%;
172
+ height: 100%;
173
+ object-fit: contain;
174
+ }
175
+ }
176
+
177
+ // Context Menu Item Label
178
+ .acp-context-menu-item-label {
179
+ flex: 1;
180
+ overflow: hidden;
181
+ text-overflow: ellipsis;
182
+ white-space: nowrap;
183
+ }
184
+
185
+ // Context Menu Item Badge
186
+ .acp-context-menu-item-badge {
187
+ display: inline-flex;
188
+ align-items: center;
189
+ justify-content: center;
190
+ min-width: 20px;
191
+ height: 20px;
192
+ padding: 0 6px;
193
+ background-color: var(--mat-sys-primary);
194
+ color: var(--mat-sys-on-primary);
195
+ border-radius: 10px;
196
+ font-size: 12px;
197
+ font-weight: 600;
198
+ flex-shrink: 0;
199
+ }
200
+
201
+ // Context Menu Item Shortcut
202
+ .acp-context-menu-item-shortcut {
203
+ display: inline-block;
204
+ color: var(--mat-sys-on-surface-variant);
205
+ font-size: 12px;
206
+ font-weight: 400;
207
+ margin-left: 12px;
208
+ flex-shrink: 0;
209
+ }
210
+
211
+ // Context Menu Item Loader
212
+ .acp-context-menu-item-loader {
213
+ display: flex;
214
+ align-items: center;
215
+ justify-content: center;
216
+ width: 20px;
217
+ height: 20px;
218
+ margin-left: 8px;
219
+ flex-shrink: 0;
220
+ }
221
+
222
+ // Context Menu Item Arrow
223
+ .acp-context-menu-item-arrow {
224
+ display: flex;
225
+ align-items: center;
226
+ justify-content: center;
227
+ width: 24px;
228
+ height: 24px;
229
+ margin-left: 8px;
230
+ flex-shrink: 0;
231
+ color: var(--mat-sys-on-surface-variant);
232
+ font-size: 20px;
233
+ }
234
+
235
+ // Context Menu Separator
236
+ .acp-context-menu-separator {
237
+ height: 1px;
238
+ background-color: var(--mat-sys-outline-variant);
239
+ margin: 4px 0;
240
+ }
241
+
242
+ // Context Menu Submenu
243
+ .acp-context-menu-submenu {
244
+ display: flex;
245
+ flex-direction: column;
246
+ padding: 4px 0;
247
+ background-color: var(--mat-sys-surface-container-high);
248
+ border-left: 2px solid var(--mat-sys-outline-variant);
249
+ margin-left: 8px;
250
+ animation: acp-context-menu-slide-in 150ms cubic-bezier(0.4, 0, 0.2, 1);
251
+
252
+ @media (prefers-reduced-motion: reduce) {
253
+ animation: none;
254
+ }
255
+
256
+ .acp-context-menu-item {
257
+ padding-left: 12px;
258
+ font-size: 13px;
259
+ }
260
+ }
261
+
262
+ // Animations
263
+ @keyframes acp-context-menu-enter {
264
+ from {
265
+ opacity: 0;
266
+ transform: scale(0.95);
267
+ }
268
+ to {
269
+ opacity: 1;
270
+ transform: scale(1);
271
+ }
272
+ }
273
+
274
+ @keyframes acp-context-menu-slide-in {
275
+ from {
276
+ opacity: 0;
277
+ transform: translateX(-8px);
278
+ }
279
+ to {
280
+ opacity: 1;
281
+ transform: translateX(0);
282
+ }
283
+ }
@@ -192,3 +192,7 @@ button.checked {
192
192
  color: var(--mat-sys-primary);
193
193
  border-radius: 4px;
194
194
  }
195
+
196
+ .ndp-range-label-text {
197
+ color: var(--mat-sys-on-surface);
198
+ }
@@ -0,0 +1,166 @@
1
+ @use '@angular/material' as mat;
2
+
3
+ .acontplus-header {
4
+ --mat-toolbar-container-background-color: transparent;
5
+ position: relative;
6
+ z-index: 200;
7
+ display: block;
8
+ height: 60px;
9
+ background-color: var(--acp-header-background-color, var(--mat-sys-surface));
10
+ backdrop-filter: blur(8px);
11
+
12
+ @include mat.icon-overrides(
13
+ (
14
+ color: #ffffff,
15
+ )
16
+ );
17
+ }
18
+
19
+ /* Regions */
20
+ .acp-header__region {
21
+ display: flex;
22
+ align-items: center;
23
+ gap: 8px;
24
+
25
+ &--left {
26
+ flex: 0 0 auto;
27
+ }
28
+
29
+ &--center {
30
+ flex: 0 1 auto;
31
+ justify-content: center;
32
+ }
33
+
34
+ &--end {
35
+ display: flex;
36
+ flex: 0 0 auto;
37
+ margin-left: auto;
38
+ }
39
+ }
40
+
41
+ /* Spacer */
42
+ .acp-header__spacer {
43
+ flex: 1 1 auto;
44
+ }
45
+
46
+ /* Branding */
47
+ .acp-header__branding {
48
+ display: flex;
49
+ align-items: center;
50
+ gap: 12px;
51
+ text-decoration: none;
52
+ color: inherit;
53
+ transition: opacity 0.2s ease;
54
+
55
+ &:hover {
56
+ opacity: 0.8;
57
+ }
58
+ }
59
+
60
+ .acp-header__logo {
61
+ height: 32px;
62
+ width: auto;
63
+ max-width: 120px;
64
+ object-fit: contain;
65
+ }
66
+
67
+ .acp-header__brand-name {
68
+ font-size: 1.125rem;
69
+ font-weight: 500;
70
+ line-height: 1.2;
71
+ }
72
+
73
+ /* Avatar */
74
+ .acp-header__avatar {
75
+ width: 32px;
76
+ height: 32px;
77
+ border-radius: 50%;
78
+ object-fit: cover;
79
+ }
80
+
81
+ /* Badge */
82
+ .acp-header__badge {
83
+ position: absolute;
84
+ top: 4px;
85
+ right: 4px;
86
+ min-width: 16px;
87
+ height: 16px;
88
+ padding: 0 4px;
89
+ font-size: 10px;
90
+ font-weight: 600;
91
+ line-height: 16px;
92
+ text-align: center;
93
+ border-radius: 8px;
94
+ background-color: var(--mat-sys-error);
95
+ color: var(--mat-sys-on-error);
96
+ }
97
+
98
+ /* User Menu */
99
+ .acp-header__user-menu {
100
+ position: relative;
101
+ }
102
+
103
+ /* Search */
104
+ .acp-header__search {
105
+ display: flex;
106
+ align-items: center;
107
+ gap: 8px;
108
+ padding: 0 8px;
109
+ background-color: rgba(255, 255, 255, 0.1);
110
+ border-radius: 4px;
111
+ transition: background-color 0.2s ease;
112
+
113
+ &:hover {
114
+ background-color: rgba(255, 255, 255, 0.15);
115
+ }
116
+
117
+ &-icon {
118
+ font-size: 20px;
119
+ color: rgba(255, 255, 255, 0.7);
120
+ }
121
+
122
+ &-input {
123
+ background: transparent;
124
+ border: none;
125
+ outline: none;
126
+ color: #fff;
127
+ font-size: 14px;
128
+ width: 200px;
129
+ padding: 4px 0;
130
+
131
+ &::placeholder {
132
+ color: rgba(255, 255, 255, 0.5);
133
+ }
134
+ }
135
+
136
+ &-clear {
137
+ width: 24px;
138
+ height: 24px;
139
+
140
+ .mat-icon {
141
+ font-size: 18px;
142
+ }
143
+ }
144
+ }
145
+
146
+ /* Responsive */
147
+ @media (max-width: 768px) {
148
+ .acp-header {
149
+ padding: 0 12px;
150
+ min-height: 56px;
151
+ }
152
+
153
+ .acp-header__brand-name {
154
+ display: none;
155
+ }
156
+
157
+ .acp-header__logo {
158
+ max-width: 100px;
159
+ }
160
+
161
+ .acp-header__search {
162
+ &-input {
163
+ width: 120px;
164
+ }
165
+ }
166
+ }