@acontplus/ng-components 3.0.1 → 3.2.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 (32) hide show
  1. package/README.md +101 -234
  2. package/fesm2022/acontplus-ng-components.mjs +8057 -4326
  3. package/fesm2022/acontplus-ng-components.mjs.map +1 -1
  4. package/package.json +5 -2
  5. package/src/_index.scss +2 -0
  6. package/src/core/style/_breakpoints.scss +63 -0
  7. package/src/core/style/_variables.scss +9 -0
  8. package/src/core/theming/_all-theme.scss +16 -1
  9. package/src/core/theming/prebuilt/aqua.scss +1 -1
  10. package/src/core/theming/prebuilt/blue.scss +1 -1
  11. package/src/core/theming/prebuilt/cyan.scss +1 -1
  12. package/src/core/theming/prebuilt/green.scss +1 -1
  13. package/src/core/theming/prebuilt/orange.scss +1 -1
  14. package/src/core/theming/prebuilt/pink.scss +1 -1
  15. package/src/core/theming/prebuilt/purple.scss +1 -1
  16. package/src/core/theming/prebuilt/rose.scss +1 -1
  17. package/src/core/tokens/_global-variables.scss +53 -0
  18. package/src/lib/components/button/v2/button.scss +179 -11
  19. package/src/lib/components/card/card.scss +225 -0
  20. package/src/lib/components/context-menu/context-menu-panel.scss +283 -0
  21. package/src/lib/components/date-range-input/date-range-input.scss +5 -6
  22. package/src/lib/components/dialog/acp-dialog-container.scss +221 -0
  23. package/src/lib/components/dialog-wrapper/dialog-wrapper.scss +0 -4
  24. package/src/lib/components/theme/header/header.scss +166 -0
  25. package/src/lib/components/theme/shell-layout/shell-layout.scss +237 -0
  26. package/src/lib/components/theme/sidebar/sidebar.scss +0 -0
  27. package/src/lib/components/theme/sidemenu/sidemenu.scss +169 -0
  28. package/src/lib/components/theme/topmenu/topmenu.scss +83 -0
  29. package/src/lib/components/theme/user-menu/user-menu.scss +194 -0
  30. package/src/lib/components/theme/user-panel/user-panel.scss +64 -0
  31. package/types/acontplus-ng-components.d.ts +4571 -2374
  32. /package/src/lib/components/{theme-toggle → theme/theme-toggle}/theme-toggle.scss +0 -0
@@ -0,0 +1,221 @@
1
+ // Structural styles for the dialog shell. All themeable values are exposed
2
+ // as `--acp-dialog-*` custom properties; override them via a global class.
3
+
4
+ // The container is a flex column so the content area grows and pushes any
5
+ // footer / actions to the bottom when the dialog has a fixed height (e.g. full-screen).
6
+ acp-dialog-container {
7
+ display: flex;
8
+ flex-direction: column;
9
+ height: 100%;
10
+ }
11
+
12
+ .acp-dialog-content {
13
+ flex: 1 1 auto;
14
+ display: flex;
15
+ flex-direction: column;
16
+ min-height: 0;
17
+ overflow: auto;
18
+ }
19
+
20
+ .acp-dialog-content > * {
21
+ flex: 1 1 auto;
22
+ display: flex;
23
+ flex-direction: column;
24
+ min-height: 0;
25
+ }
26
+
27
+ // Make Material's mat-dialog-content the scrollable, expanding area and
28
+ // mat-dialog-actions a fixed bottom bar, matching the standard MatDialog layout.
29
+ .acp-dialog-content > * > mat-dialog-content,
30
+ .acp-dialog-content > * > .mat-mdc-dialog-content {
31
+ flex: 1 1 auto;
32
+ overflow: auto;
33
+ min-height: 0;
34
+ max-height: 100%;
35
+ }
36
+
37
+ .acp-dialog-content > * > mat-dialog-actions,
38
+ .acp-dialog-content > * > .mat-mdc-dialog-actions {
39
+ flex-shrink: 0;
40
+ }
41
+
42
+ // Built-in message dialog layout (acp-dialog-message component).
43
+ .acp-dialog-content > * > .acp-dialog-message {
44
+ flex: 1 1 auto;
45
+ overflow: auto;
46
+ min-height: 0;
47
+ }
48
+
49
+ .acp-dialog-content > * > .acp-dialog-message-actions {
50
+ flex-shrink: 0;
51
+ }
52
+
53
+ .acp-dialog-header {
54
+ cursor: move;
55
+ border-bottom: 1px solid
56
+ var(--acp-dialog-header-border-color, var(--mat-sys-outline-variant, #dee2e6));
57
+ color: var(--acp-dialog-header-text-color, var(--mat-sys-on-surface, #212529));
58
+ position: relative;
59
+
60
+ // Predefined color variants. Override these with CSS custom properties or `colorClass`.
61
+ &.acp-dialog-header--primary {
62
+ background-color: var(
63
+ --acp-dialog-primary-header-background-color,
64
+ var(--mat-sys-primary, #1976d2)
65
+ );
66
+ color: var(--acp-dialog-primary-header-text-color, var(--mat-sys-on-primary, #fff));
67
+ }
68
+ &.acp-dialog-header--secondary {
69
+ background-color: var(
70
+ --acp-dialog-secondary-header-background-color,
71
+ var(--mat-sys-secondary, #9c27b0)
72
+ );
73
+ color: var(--acp-dialog-secondary-header-text-color, var(--mat-sys-on-secondary, #fff));
74
+ }
75
+ &.acp-dialog-header--accent {
76
+ background-color: var(
77
+ --acp-dialog-accent-header-background-color,
78
+ var(--mat-sys-tertiary, #7c4dff)
79
+ );
80
+ color: var(--acp-dialog-accent-header-text-color, var(--mat-sys-on-tertiary, #fff));
81
+ }
82
+ &.acp-dialog-header--error,
83
+ &.acp-dialog-header--danger {
84
+ background-color: var(
85
+ --acp-dialog-error-header-background-color,
86
+ var(--mat-sys-error, #b3261e)
87
+ );
88
+ color: var(--acp-dialog-error-header-text-color, var(--mat-sys-on-error, #fff));
89
+ }
90
+ &.acp-dialog-header--success {
91
+ background-color: var(--acp-dialog-success-header-background-color, #22c55e);
92
+ color: var(--acp-dialog-success-header-text-color, #fff);
93
+ }
94
+ &.acp-dialog-header--warning {
95
+ background-color: var(--acp-dialog-warning-header-background-color, #f59e0b);
96
+ color: var(--acp-dialog-warning-header-text-color, #212529);
97
+ }
98
+ &.acp-dialog-header--info {
99
+ background-color: var(--acp-dialog-info-header-background-color, #0ea5e9);
100
+ color: var(--acp-dialog-info-header-text-color, #fff);
101
+ }
102
+ &.acp-dialog-header--dark {
103
+ background-color: var(--acp-dialog-dark-header-background-color, #212529);
104
+ color: var(--acp-dialog-dark-header-text-color, #fff);
105
+ }
106
+
107
+ &[class*='acp-dialog-header--'] {
108
+ .acp-dialog-subtitle {
109
+ color: inherit;
110
+ opacity: 0.85;
111
+ }
112
+ }
113
+ }
114
+
115
+ h6[mat-dialog-title].acp-dialog-title {
116
+ display: flex;
117
+ align-items: center;
118
+ font-size: var(--acp-dialog-title-font-size, 1.2rem);
119
+ font-weight: var(--acp-dialog-title-font-weight, 500);
120
+ margin: 0;
121
+ width: 100%;
122
+ padding-right: 48px;
123
+ color: currentColor;
124
+ }
125
+
126
+ .acp-dialog-title-icon {
127
+ margin-right: var(--acp-dialog-title-icon-gap, 12px);
128
+ vertical-align: middle;
129
+ }
130
+
131
+ h6[mat-dialog-title].acp-dialog-title span {
132
+ flex-grow: 1;
133
+ }
134
+
135
+ .acp-dialog-close-btn {
136
+ position: absolute;
137
+ top: 8px;
138
+ right: 16px;
139
+ }
140
+
141
+ .acp-dialog-subtitle {
142
+ margin: 0;
143
+ padding: 0 var(--acp-dialog-subtitle-padding, 24px) var(--acp-dialog-subtitle-padding, 16px);
144
+ font-size: var(--acp-dialog-subtitle-font-size, 0.875rem);
145
+ color: var(--acp-dialog-subtitle-color, var(--mat-sys-on-surface-variant, #6c757d));
146
+ }
147
+
148
+ .acp-dialog-message {
149
+ padding: var(--acp-dialog-message-padding, 24px);
150
+ color: var(--acp-dialog-message-text-color, var(--mat-sys-on-surface, #212529));
151
+ }
152
+
153
+ .acp-dialog-message-actions {
154
+ display: flex;
155
+ justify-content: flex-end;
156
+ gap: 8px;
157
+ padding: 0 var(--acp-dialog-message-padding, 24px) var(--acp-dialog-message-padding, 24px);
158
+ }
159
+
160
+ .acp-dialog-actions {
161
+ display: flex;
162
+ align-items: center;
163
+ gap: var(--acp-dialog-actions-gap, 8px);
164
+ padding: var(--acp-dialog-actions-padding, 16px 24px);
165
+ border-top: 1px solid
166
+ var(--acp-dialog-actions-border-color, var(--mat-sys-outline-variant, #dee2e6));
167
+ }
168
+
169
+ .acp-dialog-actions-start {
170
+ justify-content: flex-start;
171
+ }
172
+
173
+ .acp-dialog-actions-center {
174
+ justify-content: center;
175
+ }
176
+
177
+ .acp-dialog-actions-end {
178
+ justify-content: flex-end;
179
+ }
180
+
181
+ // Declarative titlebar and actions used inside the content area.
182
+ .acp-dialog-content > acp-dialog-titlebar,
183
+ .acp-dialog-content > * > acp-dialog-titlebar,
184
+ .acp-dialog-content > acp-dialog-actions,
185
+ .acp-dialog-content > * > acp-dialog-actions {
186
+ flex: 0 0 auto;
187
+ }
188
+
189
+ // Make Material's mat-dialog-content the scrollable, expanding area and
190
+ // mat-dialog-actions a fixed bottom bar, matching the standard MatDialog layout.
191
+ .acp-dialog-content > * > mat-dialog-content,
192
+ .acp-dialog-content > * > .mat-mdc-dialog-content {
193
+ flex: 1 1 auto;
194
+ overflow: auto;
195
+ min-height: 0;
196
+ max-height: 100%;
197
+ }
198
+
199
+ .acp-dialog-content > * > mat-dialog-actions,
200
+ .acp-dialog-content > * > .mat-mdc-dialog-actions {
201
+ flex-shrink: 0;
202
+ }
203
+
204
+ // Full-screen dialog: pin the action footer to the bottom of the viewport.
205
+ .acp-dialog-full-screen .mat-mdc-dialog-surface {
206
+ height: 100vh;
207
+ }
208
+
209
+ .acp-dialog-full-screen acp-dialog-container {
210
+ min-height: 100vh;
211
+ }
212
+
213
+ .acp-dialog-full-screen .acp-dialog-content.mat-mdc-dialog-content {
214
+ max-height: 100%;
215
+ height: 100%;
216
+ }
217
+
218
+ .acp-dialog-full-screen .acp-dialog-actions,
219
+ .acp-dialog-full-screen .mat-mdc-dialog-actions {
220
+ margin-top: auto;
221
+ }
@@ -24,10 +24,6 @@ h6[mat-dialog-title].acp-dialog-title span {
24
24
  flex-grow: 1;
25
25
  }
26
26
 
27
- mat-dialog-content {
28
- padding: 24px;
29
- }
30
-
31
27
  .acp-dialog-close-btn {
32
28
  position: absolute;
33
29
  top: 8px;
@@ -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
+ }
@@ -0,0 +1,237 @@
1
+ @use './../../../../core/style/breakpoints';
2
+ .acontplus-container-wrap,
3
+ .acontplus-container {
4
+ --mat-sidenav-content-background-color: transparent;
5
+
6
+ height: 100%;
7
+ }
8
+
9
+ .acontplus-sidenav {
10
+ --mat-sidenav-container-width: var(--acp-sidenav-width);
11
+
12
+ position: absolute;
13
+ overflow-x: hidden;
14
+ border-width: 0 !important;
15
+ transition-property: transform, width !important;
16
+ }
17
+
18
+ // Layout control
19
+ .acontplus-header-above {
20
+ .acontplus-container {
21
+ height: calc(100% - var(--mat-toolbar-standard-height)) !important;
22
+
23
+ @include breakpoints.bp-lt(small) {
24
+ height: calc(100% - var(--mat-toolbar-mobile-height)) !important;
25
+ }
26
+ }
27
+
28
+ .acontplus-sidebar-main {
29
+ height: 100% !important;
30
+ padding-top: 0.5rem;
31
+ }
32
+ }
33
+
34
+ // Layout control
35
+ .acontplus-sidenav-collapsed {
36
+ .acontplus-sidenav {
37
+ width: var(--acp-sidenav-collapsed-width);
38
+
39
+ .menu-name,
40
+ .menu-label,
41
+ .menu-badge,
42
+ .menu-caret,
43
+ .acontplus-user-panel-info {
44
+ opacity: 0;
45
+ }
46
+
47
+ .menu-icon.submenu-icon {
48
+ opacity: 1;
49
+ }
50
+
51
+ .acontplus-user-panel-avatar {
52
+ transform: scale(0.5);
53
+ }
54
+
55
+ &:hover {
56
+ width: var(--acp-sidenav-width);
57
+
58
+ .menu-name,
59
+ .menu-label,
60
+ .menu-badge,
61
+ .menu-caret,
62
+ .acontplus-user-panel-info {
63
+ opacity: 1;
64
+ }
65
+
66
+ .menu-icon.submenu-icon {
67
+ opacity: 0;
68
+ }
69
+
70
+ .acontplus-user-panel-avatar {
71
+ transform: scale(1);
72
+ }
73
+ }
74
+ }
75
+
76
+ .acontplus-content {
77
+ margin-left: var(--acp-sidenav-collapsed-width) !important;
78
+
79
+ [dir='rtl'] & {
80
+ margin-right: var(--acp-sidenav-collapsed-width) !important;
81
+ margin-left: auto !important;
82
+ }
83
+ }
84
+
85
+ &[dir='rtl'] .acontplus-content {
86
+ margin-right: var(--acp-sidenav-collapsed-width) !important;
87
+ margin-left: auto !important;
88
+ }
89
+ }
90
+
91
+ // Layout control
92
+ .acontplus-navbar-top {
93
+ .acontplus-topmenu {
94
+ top: 0;
95
+ }
96
+
97
+ .acontplus-branding {
98
+ margin-left: 1rem;
99
+
100
+ [dir='rtl'] & {
101
+ margin-right: 1rem;
102
+ margin-left: auto;
103
+ }
104
+ }
105
+ }
106
+
107
+ // Layout control
108
+ .acontplus-header-fixed {
109
+ .acontplus-header {
110
+ position: sticky;
111
+ top: 0;
112
+ }
113
+
114
+ .acontplus-topmenu {
115
+ top: var(--mat-toolbar-standard-height);
116
+
117
+ @include breakpoints.bp-lt(small) {
118
+ top: var(--mat-toolbar-mobile-height);
119
+ }
120
+ }
121
+ }
122
+
123
+ .acontplus-page-content {
124
+ position: relative;
125
+ padding: var(--acp-gutter);
126
+
127
+ .acontplus-header + &,
128
+ .acontplus-header-above &,
129
+ .acontplus-navbar-top & {
130
+ padding-top: 0;
131
+ }
132
+ }
133
+ // ── Content ───────────────────────────────────────────────────────────────────
134
+ .acp-shell-content {
135
+ display: flex;
136
+ flex-direction: column;
137
+ height: 100%;
138
+ }
139
+
140
+ .acp-shell-page-content {
141
+ position: relative;
142
+ flex: 1 1 auto;
143
+ padding: var(--acp-gutter, 1rem);
144
+ overflow: auto;
145
+ }
146
+
147
+ // ── Layout modifiers ──────────────────────────────────────────────────────────
148
+
149
+ // Header above: the sidenav container must account for the header height
150
+ .acp-shell--header-above {
151
+ display: flex;
152
+ flex-direction: column;
153
+
154
+ .acp-shell-sidenav-container {
155
+ flex: 1 1 auto;
156
+ height: calc(100% - var(--mat-toolbar-standard-height));
157
+
158
+ @include breakpoints.bp-lt(small) {
159
+ height: calc(100% - var(--mat-toolbar-mobile-height));
160
+ }
161
+ }
162
+
163
+ .acp-shell-page-content {
164
+ padding-top: 0;
165
+ }
166
+ }
167
+
168
+ // Sidenav collapsed (narrow mode)
169
+ .acp-shell--sidenav-collapsed {
170
+ .acp-shell-sidenav {
171
+ width: var(--acp-sidenav-collapsed-width);
172
+
173
+ // Fade out text/labels when collapsed
174
+ .menu-name,
175
+ .menu-label,
176
+ .menu-badge,
177
+ .menu-caret,
178
+ .acp-sidebar-user-panel-info {
179
+ opacity: 0;
180
+ pointer-events: none;
181
+ }
182
+
183
+ .menu-icon.submenu-icon {
184
+ opacity: 1;
185
+ }
186
+
187
+ .acp-sidebar-user-panel-avatar {
188
+ transform: scale(0.5);
189
+ }
190
+
191
+ // Expand on hover
192
+ &:hover {
193
+ width: var(--acp-sidenav-width);
194
+
195
+ .menu-name,
196
+ .menu-label,
197
+ .menu-badge,
198
+ .menu-caret,
199
+ .acp-sidebar-user-panel-info {
200
+ opacity: 1;
201
+ pointer-events: auto;
202
+ }
203
+
204
+ .menu-icon.submenu-icon {
205
+ opacity: 0;
206
+ }
207
+
208
+ .acp-sidebar-user-panel-avatar {
209
+ transform: scale(1);
210
+ }
211
+ }
212
+ }
213
+
214
+ // Push content to the right matching the collapsed width
215
+ .acp-shell-content {
216
+ margin-left: var(--acp-sidenav-collapsed-width) !important;
217
+
218
+ [dir='rtl'] & {
219
+ margin-right: var(--acp-sidenav-collapsed-width) !important;
220
+ margin-left: auto !important;
221
+ }
222
+ }
223
+ }
224
+
225
+ // Top navbar mode
226
+ .acp-shell--navbar-top {
227
+ .acp-shell-page-content {
228
+ padding-top: 0;
229
+ }
230
+ }
231
+
232
+ // Header fixed: sticky header inside content
233
+ .acp-shell--header-fixed {
234
+ .acp-shell-page-content {
235
+ padding-top: 0;
236
+ }
237
+ }
File without changes