@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acontplus/ng-components",
3
- "version": "3.0.1",
3
+ "version": "3.1.0",
4
4
  "description": "Comprehensive Angular Material UI component library featuring dynamic Tabulator tables, theme toggle with dark mode, dialog wrappers, autocomplete components, cards, buttons, icons, input chips, spinners, directives, pipes, and SCSS styling utilities.",
5
5
  "peerDependencies": {
6
6
  "@acontplus/ui-kit": "^1.0.2",
@@ -25,6 +25,9 @@
25
25
  "types": "./types/acontplus-ng-components.d.ts",
26
26
  "default": "./fesm2022/acontplus-ng-components.mjs"
27
27
  },
28
+ "./global-variables": {
29
+ "sass": "./src/core/tokens/_global-variables.scss"
30
+ },
28
31
  "./prebuilt-themes/blue": {
29
32
  "sass": "./src/core/theming/prebuilt/blue.scss"
30
33
  },
@@ -106,7 +109,7 @@
106
109
  "homepage": "https://github.com/acontplus/acontplus-libs#readme",
107
110
  "repository": {
108
111
  "type": "git",
109
- "url": "git+https://github.com/acontplus/acontplus-libs.git"
112
+ "url": "https://github.com/acontplus/acontplus-libs.git"
110
113
  },
111
114
  "release": {
112
115
  "branches": [
package/src/_index.scss CHANGED
@@ -21,6 +21,8 @@
21
21
  system-level-elevation, system-level-shape, system-level-motion, system-level-state, theme,
22
22
  theme-overrides, m2-theme;
23
23
 
24
+ @forward './core/tokens/global-variables';
25
+ @forward './core/style/breakpoints';
24
26
  @forward './core/theming/all-theme' show all-component-themes, all-component-bases;
25
27
  @forward './core/color/all-color' show all-component-colors;
26
28
  @forward './core/typography/all-typography' show all-component-typographies;
@@ -0,0 +1,63 @@
1
+ @use 'sass:map';
2
+ @use 'variables';
3
+
4
+ /// Returns the minimum width value for a named breakpoint.
5
+ ///
6
+ /// @param {String} $name - Breakpoint name (xsmall | small | medium | large | xlarge)
7
+ /// @param {Map} $breakpoints [variables.$breakpoints] - Custom breakpoints map (optional)
8
+ /// @return {Number} Width value in px
9
+ @function bp($name, $breakpoints: variables.$breakpoints) {
10
+ $min: map.get($breakpoints, $name);
11
+
12
+ @return $min;
13
+ }
14
+
15
+ /// Applies styles when the viewport is **at least** the given breakpoint width (mobile-first).
16
+ ///
17
+ /// @param {String} $name - Breakpoint name (xsmall | small | medium | large | xlarge)
18
+ /// @param {Map} $breakpoints [variables.$breakpoints] - Custom breakpoints map (optional)
19
+ ///
20
+ /// @example scss
21
+ /// .my-element {
22
+ /// font-size: 1rem;
23
+ ///
24
+ /// @include breakpoints.bp-gt(medium) {
25
+ /// font-size: 1.25rem;
26
+ /// }
27
+ /// }
28
+ @mixin bp-gt($name, $breakpoints: variables.$breakpoints) {
29
+ $min: bp($name, $breakpoints);
30
+
31
+ @if $min {
32
+ @media (min-width: $min) {
33
+ @content;
34
+ }
35
+ } @else {
36
+ @content;
37
+ }
38
+ }
39
+
40
+ /// Applies styles when the viewport is **at most** the given breakpoint width (max-width).
41
+ ///
42
+ /// @param {String} $name - Breakpoint name (xsmall | small | medium | large | xlarge)
43
+ /// @param {Map} $breakpoints [variables.$breakpoints] - Custom breakpoints map (optional)
44
+ ///
45
+ /// @example scss
46
+ /// .my-element {
47
+ /// display: block;
48
+ ///
49
+ /// @include breakpoints.bp-lt(small) {
50
+ /// display: none;
51
+ /// }
52
+ /// }
53
+ @mixin bp-lt($name, $breakpoints: variables.$breakpoints) {
54
+ $max: bp($name, $breakpoints) - 1px;
55
+
56
+ @if $max {
57
+ @media (max-width: $max) {
58
+ @content;
59
+ }
60
+ } @else {
61
+ @content;
62
+ }
63
+ }
@@ -0,0 +1,9 @@
1
+ // Breakpoint values used by the bp-gt and bp-lt mixins.
2
+ // Override these defaults by passing a custom $breakpoints map to the mixins.
3
+ $breakpoints: (
4
+ xsmall: 0,
5
+ small: 600px,
6
+ medium: 960px,
7
+ large: 1280px,
8
+ xlarge: 1920px,
9
+ ) !default;
@@ -29,14 +29,29 @@
29
29
  @mixin custom-component-overrides {
30
30
  @include mat.checkbox-overrides(
31
31
  (
32
+ selected-icon-color: var(--acp-theme-primary-color),
32
33
  selected-checkmark-color: white,
34
+ selected-focus-icon-color: var(--acp-theme-primary-color),
35
+ selected-hover-icon-color: var(--acp-theme-primary-color),
36
+ selected-focus-state-layer-color: var(--acp-theme-primary-color),
37
+ selected-hover-state-layer-color: var(--acp-theme-primary-color),
33
38
  )
34
39
  );
35
40
 
36
41
  @include mat.fab-overrides(
37
42
  (
38
- container-color: var(--theme-primary-color),
43
+ container-color: var(--acp-theme-primary-color),
39
44
  foreground-color: white,
40
45
  )
41
46
  );
47
+
48
+ @include mat.radio-overrides(
49
+ (
50
+ selected-icon-color: var(--acp-theme-primary-color),
51
+ selected-focus-icon-color: var(--acp-theme-primary-color),
52
+ selected-hover-icon-color: var(--acp-theme-primary-color),
53
+ selected-pressed-icon-color: var(--acp-theme-primary-color),
54
+ checked-ripple-color: var(--acp-theme-primary-color),
55
+ )
56
+ );
42
57
  }
@@ -4,7 +4,7 @@
4
4
  @use '../../../core/theming/all-theme' as all-theme;
5
5
 
6
6
  .theme-aqua {
7
- --theme-primary-color: #0074ba;
7
+ --acp-theme-primary-color: #0074ba;
8
8
 
9
9
  @include system.theme(
10
10
  (
@@ -4,7 +4,7 @@
4
4
  @use '../../../core/theming/all-theme' as all-theme;
5
5
 
6
6
  .theme-blue {
7
- --theme-primary-color: #1b84ff;
7
+ --acp-theme-primary-color: #1b84ff;
8
8
 
9
9
  @include system.theme(
10
10
  (
@@ -4,7 +4,7 @@
4
4
  @use '../../../core/theming/all-theme' as all-theme;
5
5
 
6
6
  .theme-cyan {
7
- --theme-primary-color: #01c0c8;
7
+ --acp-theme-primary-color: #01c0c8;
8
8
 
9
9
  @include system.theme(
10
10
  (
@@ -4,7 +4,7 @@
4
4
  @use '../../../core/theming/all-theme' as all-theme;
5
5
 
6
6
  .theme-green {
7
- --theme-primary-color: #0a7ea4;
7
+ --acp-theme-primary-color: #0a7ea4;
8
8
 
9
9
  @include system.theme(
10
10
  (
@@ -4,7 +4,7 @@
4
4
  @use '../../../core/theming/all-theme' as all-theme;
5
5
 
6
6
  .theme-orange {
7
- --theme-primary-color: #fa896b;
7
+ --acp-theme-primary-color: #fa896b;
8
8
 
9
9
  @include system.theme(
10
10
  (
@@ -4,7 +4,7 @@
4
4
  @use '../../../core/theming/all-theme' as all-theme;
5
5
 
6
6
  .theme-pink {
7
- --theme-primary-color: #d200d2;
7
+ --acp-theme-primary-color: #d200d2;
8
8
 
9
9
  @include system.theme(
10
10
  (
@@ -4,7 +4,7 @@
4
4
  @use '../../../core/theming/all-theme' as all-theme;
5
5
 
6
6
  .theme-purple {
7
- --theme-primary-color: #763ebd;
7
+ --acp-theme-primary-color: #763ebd;
8
8
 
9
9
  @include system.theme(
10
10
  (
@@ -4,7 +4,7 @@
4
4
  @use '../../../core/theming/all-theme' as all-theme;
5
5
 
6
6
  .theme-rose {
7
- --theme-primary-color: #e80074;
7
+ --acp-theme-primary-color: #e80074;
8
8
 
9
9
  @include system.theme(
10
10
  (
@@ -0,0 +1,53 @@
1
+ // Layout Variables for AcontPlus Applications
2
+ // These variables can be used across different applications
3
+
4
+ :root {
5
+ // Typography
6
+ --acp-body-font-family:
7
+ 'Roboto', 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
8
+ sans-serif;
9
+ --acp-code-font-family: 'Roboto Mono', monospace;
10
+
11
+ // Layout spacing
12
+ --acp-gutter: 1rem;
13
+ --acp-sidenav-width: 15rem;
14
+ --acp-sidenav-collapsed-width: 4rem;
15
+
16
+ // Background colors
17
+ --acp-body-background-color: var(--mat-sys-surface-container);
18
+
19
+ // Link colors
20
+ --acp-link-color: var(--mat-sys-primary);
21
+ --acp-link-hover-color: var(--mat-sys-primary);
22
+
23
+ // Code styling
24
+ --acp-code-border-color: light-dark(rgba(19, 28, 43, 0.08), rgba(218, 226, 249, 0.08));
25
+ --acp-code-background-color: light-dark(rgba(19, 28, 43, 0.04), rgba(218, 226, 249, 0.04));
26
+
27
+ // Header
28
+ --acp-header-background-color: var(--acp-theme-primary-color);
29
+
30
+ // User panel
31
+ --acp-user-panel-background-color: var(--mat-sys-surface-container);
32
+ --acp-user-panel-hover-background-color: var(--mat-sys-surface-variant);
33
+
34
+ // Side menu
35
+ --acp-sidemenu-heading-hover-background-color: var(--mat-sys-surface-container-highest);
36
+ --acp-sidemenu-active-heading-text-color: var(--mat-sys-primary);
37
+ --acp-sidemenu-active-heading-background-color: var(--mat-sys-primary-container);
38
+ --acp-sidemenu-active-heading-hover-background-color: var(--mat-sys-primary-container);
39
+ --acp-sidemenu-expanded-background-color: var(--mat-sys-surface-container);
40
+
41
+ // Top menu
42
+ --acp-topmenu-text-color: var(--mat-sys-on-background);
43
+ --acp-topmenu-background-color: var(--acp-header-background-color);
44
+ --acp-topmenu-item-active-background-color: var(--mat-sys-primary-container);
45
+ --acp-topmenu-dropdown-item-active-text-color: var(--mat-sys-primary);
46
+
47
+ // Material toolbar heights
48
+ --mat-toolbar-standard-height: 4rem;
49
+ --mat-toolbar-mobile-height: 3.5rem;
50
+
51
+ --acp-color-border: var(--mat-sys-outline-variant);
52
+ --acp-spacing: 0.25rem;
53
+ }
@@ -3,12 +3,12 @@
3
3
  .acp-primary {
4
4
  @include mat.button-overrides(
5
5
  (
6
- filled-container-color: var(--theme-primary-color),
6
+ filled-container-color: var(--acp-theme-primary-color),
7
7
  filled-label-text-color: #ffffff,
8
- outlined-label-text-color: var(--theme-primary-color),
9
- protected-label-text-color: var(--theme-primary-color),
10
- text-label-text-color: var(--theme-primary-color),
11
- text-state-layer-color: var(--theme-primary-color),
8
+ outlined-label-text-color: var(--acp-theme-primary-color),
9
+ protected-label-text-color: var(--acp-theme-primary-color),
10
+ text-label-text-color: var(--acp-theme-primary-color),
11
+ text-state-layer-color: var(--acp-theme-primary-color),
12
12
  )
13
13
  );
14
14
  }
@@ -96,10 +96,10 @@
96
96
  (
97
97
  filled-container-color: #1f2937,
98
98
  filled-label-text-color: #ffffff,
99
- outlined-label-text-color: #1f2937,
100
- protected-label-text-color: #1f2937,
101
- text-label-text-color: #1f2937,
102
- text-state-layer-color: #1f2937,
99
+ outlined-label-text-color: light-dark(#1f2937, #ffffff),
100
+ protected-label-text-color: light-dark(#1f2937, #ffffff),
101
+ text-label-text-color: light-dark(#1f2937, #ffffff),
102
+ text-state-layer-color: light-dark(#1f2937, #ffffff),
103
103
  )
104
104
  );
105
105
  }
@@ -107,7 +107,7 @@
107
107
  [matIconButton].acp-primary {
108
108
  @include mat.icon-overrides(
109
109
  (
110
- color: var(--theme-primary-color),
110
+ color: var(--acp-theme-primary-color),
111
111
  )
112
112
  );
113
113
  }
@@ -161,9 +161,165 @@
161
161
  }
162
162
 
163
163
  [matIconButton].acp-dark {
164
- @include mat.icon-overrides(
164
+ @include mat.icon-overrides(());
165
+ }
166
+
167
+ [matFab].acp-primary {
168
+ @include mat.fab-overrides(
169
+ (
170
+ container-color: var(--acp-theme-primary-color),
171
+ foreground-color: #ffffff,
172
+ state-layer-color: #ffffff,
173
+ )
174
+ );
175
+ }
176
+
177
+ [matFab].acp-secondary {
178
+ @include mat.fab-overrides(
179
+ (
180
+ container-color: var(--mat-sys-secondary),
181
+ foreground-color: var(--mat-sys-on-secondary),
182
+ state-layer-color: var(--mat-sys-on-secondary),
183
+ )
184
+ );
185
+ }
186
+
187
+ [matFab].acp-accent {
188
+ @include mat.fab-overrides(
189
+ (
190
+ container-color: var(--mat-sys-tertiary),
191
+ foreground-color: var(--mat-sys-on-tertiary),
192
+ state-layer-color: var(--mat-sys-on-tertiary),
193
+ )
194
+ );
195
+ }
196
+
197
+ [matFab].acp-error {
198
+ @include mat.fab-overrides(
199
+ (
200
+ container-color: var(--mat-sys-error),
201
+ foreground-color: var(--mat-sys-on-error),
202
+ state-layer-color: var(--mat-sys-on-error),
203
+ )
204
+ );
205
+ }
206
+
207
+ [matFab].acp-success {
208
+ @include mat.fab-overrides(
209
+ (
210
+ container-color: #4caf50,
211
+ foreground-color: #ffffff,
212
+ state-layer-color: #ffffff,
213
+ )
214
+ );
215
+ }
216
+
217
+ [matFab].acp-warning {
218
+ @include mat.fab-overrides(
219
+ (
220
+ container-color: #f59e0b,
221
+ foreground-color: #ffffff,
222
+ state-layer-color: #ffffff,
223
+ )
224
+ );
225
+ }
226
+
227
+ [matFab].acp-info {
228
+ @include mat.fab-overrides(
229
+ (
230
+ container-color: #3b82f6,
231
+ foreground-color: #ffffff,
232
+ state-layer-color: #ffffff,
233
+ )
234
+ );
235
+ }
236
+
237
+ [matFab].acp-dark {
238
+ @include mat.fab-overrides(
239
+ (
240
+ container-color: #1f2937,
241
+ foreground-color: #ffffff,
242
+ state-layer-color: #ffffff,
243
+ )
244
+ );
245
+ }
246
+
247
+ [matMiniFab].acp-primary {
248
+ @include mat.fab-overrides(
249
+ (
250
+ small-container-color: var(--acp-theme-primary-color),
251
+ small-foreground-color: #ffffff,
252
+ small-state-layer-color: #ffffff,
253
+ )
254
+ );
255
+ }
256
+
257
+ [matMiniFab].acp-secondary {
258
+ @include mat.fab-overrides(
259
+ (
260
+ small-container-color: var(--mat-sys-secondary),
261
+ small-foreground-color: var(--mat-sys-on-secondary),
262
+ small-state-layer-color: var(--mat-sys-on-secondary),
263
+ )
264
+ );
265
+ }
266
+
267
+ [matMiniFab].acp-accent {
268
+ @include mat.fab-overrides(
269
+ (
270
+ small-container-color: var(--mat-sys-tertiary),
271
+ small-foreground-color: var(--mat-sys-on-tertiary),
272
+ small-state-layer-color: var(--mat-sys-on-tertiary),
273
+ )
274
+ );
275
+ }
276
+
277
+ [matMiniFab].acp-error {
278
+ @include mat.fab-overrides(
279
+ (
280
+ small-container-color: var(--mat-sys-error),
281
+ small-foreground-color: var(--mat-sys-on-error),
282
+ small-state-layer-color: var(--mat-sys-on-error),
283
+ )
284
+ );
285
+ }
286
+
287
+ [matMiniFab].acp-success {
288
+ @include mat.fab-overrides(
289
+ (
290
+ small-container-color: #4caf50,
291
+ small-foreground-color: #ffffff,
292
+ small-state-layer-color: #ffffff,
293
+ )
294
+ );
295
+ }
296
+
297
+ [matMiniFab].acp-warning {
298
+ @include mat.fab-overrides(
299
+ (
300
+ small-container-color: #f59e0b,
301
+ small-foreground-color: #ffffff,
302
+ small-state-layer-color: #ffffff,
303
+ )
304
+ );
305
+ }
306
+
307
+ [matMiniFab].acp-info {
308
+ @include mat.fab-overrides(
309
+ (
310
+ small-container-color: #3b82f6,
311
+ small-foreground-color: #ffffff,
312
+ small-state-layer-color: #ffffff,
313
+ )
314
+ );
315
+ }
316
+
317
+ [matMiniFab].acp-dark {
318
+ @include mat.fab-overrides(
165
319
  (
166
- color: #1f2937,
320
+ small-container-color: #1f2937,
321
+ small-foreground-color: #ffffff,
322
+ small-state-layer-color: #ffffff,
167
323
  )
168
324
  );
169
325
  }
@@ -181,6 +337,10 @@
181
337
  --mat-icon-button-container-shape: 8px;
182
338
  }
183
339
 
340
+ .acp-block {
341
+ width: 100%;
342
+ }
343
+
184
344
  .acp-medium {
185
345
  @include mat.theme(
186
346
  (