@acontplus/ng-components 2.1.30 → 2.1.32

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 (64) hide show
  1. package/LICENSE +21 -0
  2. package/fesm2022/acontplus-ng-components.mjs +5957 -3544
  3. package/fesm2022/acontplus-ng-components.mjs.map +1 -1
  4. package/package.json +41 -16
  5. package/src/_index.scss +22 -0
  6. package/src/core/color/_all-color.scss +15 -0
  7. package/src/core/density/_all-density.scss +17 -0
  8. package/src/core/style/_elevation.scss +207 -0
  9. package/src/core/theming/_all-theme.scss +36 -0
  10. package/src/core/theming/_config-validation.scss +171 -0
  11. package/src/core/theming/_definition.scss +158 -0
  12. package/src/core/theming/_palettes.scss +1576 -0
  13. package/src/core/theming/prebuilt/aqua.scss +21 -0
  14. package/src/core/theming/prebuilt/blue.scss +21 -0
  15. package/src/core/theming/prebuilt/cyan.scss +21 -0
  16. package/src/core/theming/prebuilt/green.scss +21 -0
  17. package/src/core/theming/prebuilt/orange.scss +21 -0
  18. package/src/core/theming/prebuilt/pink.scss +21 -0
  19. package/src/core/theming/prebuilt/purple.scss +21 -0
  20. package/src/core/theming/prebuilt/rose.scss +21 -0
  21. package/src/core/tokens/_m3-tokens.scss +141 -0
  22. package/src/core/tokens/_m3-utils.scss +36 -0
  23. package/src/core/tokens/_system.scss +388 -0
  24. package/src/core/tokens/_token-utils.scss +117 -0
  25. package/src/core/tokens/m3/_index.scss +7 -0
  26. package/src/core/tokens/m3/_md-sys-color.scss +150 -0
  27. package/src/core/tokens/m3/_md-sys-elevation.scss +8 -0
  28. package/src/core/tokens/m3/_md-sys-motion.scss +35 -0
  29. package/src/core/tokens/m3/_md-sys-shape.scss +31 -0
  30. package/src/core/tokens/m3/_md-sys-state.scss +13 -0
  31. package/src/core/tokens/m3/_md-sys-typescale.scss +131 -0
  32. package/src/core/tokens/m3/_theme.scss +41 -0
  33. package/src/core/typography/_all-typography.scss +12 -0
  34. package/src/lib/components/alert/_alert-theme.scss +57 -0
  35. package/src/lib/components/alert/_m3-alert.scss +72 -0
  36. package/src/lib/components/alert/alert.scss +60 -0
  37. package/src/lib/components/autocomplete-wrapper/autocomplete-wrapper.scss +667 -0
  38. package/src/lib/components/button/button.scss +297 -0
  39. package/src/lib/components/cards/dynamic-card/dynamic-card.scss +131 -0
  40. package/src/lib/components/checkbox-group/checkbox-group.scss +14 -0
  41. package/src/lib/components/date-range-input/calendar/date-range-calendar.scss +29 -0
  42. package/src/lib/components/date-range-input/date-range-input.scss +194 -0
  43. package/src/lib/components/dialog-wrapper/dialog-wrapper.scss +36 -0
  44. package/src/lib/components/drawer/_drawer-theme.scss +57 -0
  45. package/src/lib/components/drawer/_m3-drawer.scss +23 -0
  46. package/src/lib/components/drawer/drawer-container.scss +97 -0
  47. package/src/lib/components/grid/_grid-theme.scss +53 -0
  48. package/src/lib/components/grid/_m3-grid.scss +34 -0
  49. package/src/lib/components/grid/cell/cell.scss +38 -0
  50. package/src/lib/components/grid/column-menu/column-menu.scss +117 -0
  51. package/src/lib/components/grid/column-resize/_column-resize.scss +126 -0
  52. package/src/lib/components/grid/grid.scss +245 -0
  53. package/src/lib/components/icons/svg-icon/svg-icon.scss +16 -0
  54. package/src/lib/components/icons/user-icon/user-icon.scss +0 -0
  55. package/src/lib/components/input-chip/input-chip.scss +0 -0
  56. package/src/lib/components/popover/_m3-popover.scss +24 -0
  57. package/src/lib/components/popover/_popover-theme.scss +57 -0
  58. package/src/lib/components/popover/popover.scss +239 -0
  59. package/src/lib/components/spinner/spinner.scss +6 -0
  60. package/src/lib/components/tables/tabulator-table/tabulator-table.scss +68 -0
  61. package/src/lib/components/theme-toggle/theme-toggle.scss +3 -0
  62. package/src/lib/styles/_elevation.scss +168 -0
  63. package/src/lib/styles/_token-utils.scss +115 -0
  64. package/types/acontplus-ng-components.d.ts +1017 -536
@@ -0,0 +1,21 @@
1
+ @use '@angular/material' as mat;
2
+ @use '../../../core/tokens/system' as system;
3
+ @use '../../../core/theming/palettes' as palettes;
4
+ @use '../../../core/theming/all-theme' as all-theme;
5
+
6
+ .theme-aqua {
7
+ --theme-primary-color: #0074ba;
8
+
9
+ @include system.theme(
10
+ (
11
+ color: (
12
+ primary: palettes.$custom-aqua-palette,
13
+ tertiary: palettes.$custom-aqua-palette,
14
+ ),
15
+ typography: Roboto,
16
+ density: 0,
17
+ )
18
+ );
19
+
20
+ @include all-theme.custom-component-overrides;
21
+ }
@@ -0,0 +1,21 @@
1
+ @use '@angular/material' as mat;
2
+ @use '../../../core/tokens/system' as system;
3
+ @use '../../../core/theming/palettes' as palettes;
4
+ @use '../../../core/theming/all-theme' as all-theme;
5
+
6
+ .theme-blue {
7
+ --theme-primary-color: #1b84ff;
8
+
9
+ @include system.theme(
10
+ (
11
+ color: (
12
+ primary: palettes.$custom-blue-palette,
13
+ tertiary: palettes.$custom-blue-palette,
14
+ ),
15
+ typography: Roboto,
16
+ density: 0,
17
+ )
18
+ );
19
+
20
+ @include all-theme.custom-component-overrides;
21
+ }
@@ -0,0 +1,21 @@
1
+ @use '@angular/material' as mat;
2
+ @use '../../../core/tokens/system' as system;
3
+ @use '../../../core/theming/palettes' as palettes;
4
+ @use '../../../core/theming/all-theme' as all-theme;
5
+
6
+ .theme-cyan {
7
+ --theme-primary-color: #01c0c8;
8
+
9
+ @include system.theme(
10
+ (
11
+ color: (
12
+ primary: palettes.$custom-cyan-palette,
13
+ tertiary: palettes.$custom-cyan-palette,
14
+ ),
15
+ typography: Roboto,
16
+ density: 0,
17
+ )
18
+ );
19
+
20
+ @include all-theme.custom-component-overrides;
21
+ }
@@ -0,0 +1,21 @@
1
+ @use '@angular/material' as mat;
2
+ @use '../../../core/tokens/system' as system;
3
+ @use '../../../core/theming/palettes' as palettes;
4
+ @use '../../../core/theming/all-theme' as all-theme;
5
+
6
+ .theme-green {
7
+ --theme-primary-color: #0a7ea4;
8
+
9
+ @include system.theme(
10
+ (
11
+ color: (
12
+ primary: palettes.$custom-green-palette,
13
+ tertiary: palettes.$custom-green-palette,
14
+ ),
15
+ typography: Roboto,
16
+ density: 0,
17
+ )
18
+ );
19
+
20
+ @include all-theme.custom-component-overrides;
21
+ }
@@ -0,0 +1,21 @@
1
+ @use '@angular/material' as mat;
2
+ @use '../../../core/tokens/system' as system;
3
+ @use '../../../core/theming/palettes' as palettes;
4
+ @use '../../../core/theming/all-theme' as all-theme;
5
+
6
+ .theme-orange {
7
+ --theme-primary-color: #fa896b;
8
+
9
+ @include system.theme(
10
+ (
11
+ color: (
12
+ primary: palettes.$custom-orange-palette,
13
+ tertiary: palettes.$custom-orange-palette,
14
+ ),
15
+ typography: Roboto,
16
+ density: 0,
17
+ )
18
+ );
19
+
20
+ @include all-theme.custom-component-overrides;
21
+ }
@@ -0,0 +1,21 @@
1
+ @use '@angular/material' as mat;
2
+ @use '../../../core/tokens/system' as system;
3
+ @use '../../../core/theming/palettes' as palettes;
4
+ @use '../../../core/theming/all-theme' as all-theme;
5
+
6
+ .theme-pink {
7
+ --theme-primary-color: #d200d2;
8
+
9
+ @include system.theme(
10
+ (
11
+ color: (
12
+ primary: palettes.$magenta-palette,
13
+ tertiary: palettes.$magenta-palette,
14
+ ),
15
+ typography: Roboto,
16
+ density: 0,
17
+ )
18
+ );
19
+
20
+ @include all-theme.custom-component-overrides;
21
+ }
@@ -0,0 +1,21 @@
1
+ @use '@angular/material' as mat;
2
+ @use '../../../core/tokens/system' as system;
3
+ @use '../../../core/theming/palettes' as palettes;
4
+ @use '../../../core/theming/all-theme' as all-theme;
5
+
6
+ .theme-purple {
7
+ --theme-primary-color: #763ebd;
8
+
9
+ @include system.theme(
10
+ (
11
+ color: (
12
+ primary: palettes.$custom-purple-palette,
13
+ tertiary: palettes.$custom-purple-palette,
14
+ ),
15
+ typography: Roboto,
16
+ density: 0,
17
+ )
18
+ );
19
+
20
+ @include all-theme.custom-component-overrides;
21
+ }
@@ -0,0 +1,21 @@
1
+ @use '@angular/material' as mat;
2
+ @use '../../../core/tokens/system' as system;
3
+ @use '../../../core/theming/palettes' as palettes;
4
+ @use '../../../core/theming/all-theme' as all-theme;
5
+
6
+ .theme-rose {
7
+ --theme-primary-color: #e80074;
8
+
9
+ @include system.theme(
10
+ (
11
+ color: (
12
+ primary: palettes.$rose-palette,
13
+ tertiary: palettes.$rose-palette,
14
+ ),
15
+ typography: Roboto,
16
+ density: 0,
17
+ )
18
+ );
19
+
20
+ @include all-theme.custom-component-overrides;
21
+ }
@@ -0,0 +1,141 @@
1
+ @use 'sass:map';
2
+ @use '@angular/material' as mat;
3
+ @use './m3';
4
+
5
+ /// Generates a set of namespaced tokens for all components.
6
+ /// @param {Map} $systems The MDC system tokens
7
+ /// @param {Boolean} $include-non-systemized Whether to include non-systemized tokens
8
+ /// @param {Boolean} $include-density Whether to include density tokens
9
+ /// @return {Map} A map of namespaced tokens
10
+ @function generate-tokens($systems, $include-non-systemized: false, $include-density: false) {
11
+ $systems: map.merge(
12
+ (
13
+ md-sys-color: (),
14
+ md-sys-elevation: (),
15
+ md-sys-motion: (),
16
+ md-sys-shape: (),
17
+ md-sys-state: (),
18
+ md-sys-typescale: (),
19
+ ),
20
+ $systems
21
+ );
22
+ $exclude-hardcoded: not $include-non-systemized;
23
+
24
+ // TODO(mmalerba): Fill in remaining tokens.
25
+ $result: mat.private-deep-merge-all(
26
+ // Add the system color & typography tokens (so we can give users access via an API).
27
+ (
28
+ (mat, theme): map.get($systems, md-sys-color),
29
+ (mat, typography): map.get($systems, md-sys-typescale),
30
+ )
31
+ );
32
+
33
+ @return $result;
34
+ }
35
+
36
+ @function create-map($keys, $prefix) {
37
+ $result: ();
38
+ @each $key in $keys {
39
+ $result: map.merge(
40
+ $result,
41
+ (
42
+ $key: var(--#{$prefix}-#{$key}),
43
+ )
44
+ );
45
+ }
46
+ @return $result;
47
+ }
48
+
49
+ @function get-sys-color($type, $palettes, $prefix) {
50
+ $sys-color: null;
51
+
52
+ @if ($type == dark) {
53
+ $sys-color: m3.md-sys-color-values-dark($palettes);
54
+ } @else {
55
+ $sys-color: m3.md-sys-color-values-light($palettes);
56
+ }
57
+
58
+ @if (mat.$private-use-system-color-variables) {
59
+ $var-values: ();
60
+ @each $key in map.keys($sys-color) {
61
+ $var-values: map.set($var-values, $key, var(--#{$prefix}-#{$key}));
62
+ }
63
+ $var-values: map.set($var-values, shadow, map.get($sys-color, shadow));
64
+ @return $var-values;
65
+ }
66
+
67
+ @return $sys-color;
68
+ }
69
+
70
+ @function get-sys-typeface($typography, $prefix) {
71
+ $sys-typography: m3.md-sys-typescale-values($typography);
72
+ @if (mat.$private-use-system-typography-variables) {
73
+ $var-values: ();
74
+ @each $key in map.keys($sys-typography) {
75
+ $var-values: map.set($var-values, $key, var(--#{$prefix}-#{$key}));
76
+ }
77
+ @return $var-values;
78
+ }
79
+
80
+ @return $sys-typography;
81
+ }
82
+
83
+ /// Generates a set of namespaced color tokens for all components.
84
+ /// @param {String} $type The type of theme system (light or dark)
85
+ /// @param {Map} $primary The primary palette
86
+ /// @param {Map} $tertiary The tertiary palette
87
+ /// @param {Map} $error The error palette
88
+ /// @param {String} $system-variables-prefix The prefix of system tokens
89
+ /// @return {Map} A map of namespaced color tokens
90
+ @function generate-color-tokens($type, $palettes, $system-variables-prefix) {
91
+ $sys-color: get-sys-color($type, $palettes, $system-variables-prefix);
92
+
93
+ @return generate-tokens(
94
+ (
95
+ md-sys-color: $sys-color,
96
+ md-ref-palette: (
97
+ neutral-10: map.get($palettes, neutral, 10),
98
+ neutral-variant20: map.get($palettes, neutral-variant, 20),
99
+ ),
100
+ // Because the elevation values are always combined with color values to create the box shadow,
101
+ // elevation needs to be part of the color dimension.
102
+ md-sys-elevation: m3.md-sys-elevation-values(),
103
+ // Because the state values are sometimes combined with color values to create rgba colors,
104
+ // state needs to be part of color dimension.
105
+ // TODO(mmalerba): If at some point we remove the need for these combined values, we can move
106
+ // state to the base dimension.
107
+ md-sys-state: m3.md-sys-state-values(),
108
+ )
109
+ );
110
+ }
111
+
112
+ /// Generates a set of namespaced color tokens for all components.
113
+ /// @param {String|List} $brand The brand font-family
114
+ /// @param {String|List} $plain The plain fort-family
115
+ /// @param {String|Number} $bold The bold font-weight
116
+ /// @param {String|Number} $medium The medium font-weight
117
+ /// @param {String|Number} $regular The regular font-weight
118
+ /// @param {String} $system-variables-prefix The prefix of system tokens
119
+ /// @return {Map} A map of namespaced typography tokens
120
+ @function generate-typography-tokens($typography, $system-variables-prefix) {
121
+ $sys-typeface: get-sys-typeface($typography, $system-variables-prefix);
122
+ @return generate-tokens(
123
+ (
124
+ md-sys-typescale: $sys-typeface,
125
+ )
126
+ );
127
+ }
128
+
129
+ /// Generates a set of namespaced tokens not related to color, typography, or density for all
130
+ /// components.
131
+ /// @return {Map} A map of namespaced tokens not related to color, typography, or density
132
+ @function generate-base-tokens() {
133
+ // TODO(mmalerba): Exclude density tokens once implemented.
134
+ @return generate-tokens(
135
+ (
136
+ md-sys-motion: m3.md-sys-motion-values(),
137
+ md-sys-shape: m3.md-sys-shape-values(),
138
+ ),
139
+ $include-non-systemized: true
140
+ );
141
+ }
@@ -0,0 +1,36 @@
1
+ @use 'sass:map';
2
+ @use 'sass:meta';
3
+ @use 'sass:string';
4
+
5
+ // Replaces color tokens in the map with those defined as the variant color.
6
+ @function replace-colors-with-variant($system, $color, $variant) {
7
+ $system: map.set($system, on-#{$color}, map.get($system, on-#{$variant}));
8
+ $system: map.set($system, on-#{$color}-container, map.get($system, on-#{$variant}-container));
9
+ $system: map.set($system, #{$color}, map.get($system, #{$variant}));
10
+ $system: map.set($system, #{$color}-container, map.get($system, #{$variant}-container));
11
+ $system: map.set($system, inverse-#{$color}, map.get($system, inverse-#{$variant}));
12
+ @return $system;
13
+ }
14
+
15
+ // Gets the theme's system values as a flat map.
16
+ @function get-system($theme) {
17
+ @return map.get($theme, _mat-system);
18
+ }
19
+
20
+ // Returns the color with an opacity value using color-mix. If the color is a variable name, it
21
+ // will wrap it with `var()`.
22
+ @function color-with-opacity($color, $opacity) {
23
+ @if (meta.type-of($color) == string and string.index($color, '--') == 1) {
24
+ $color: var($color);
25
+ }
26
+
27
+ // Opacity may be a system level value less than 1, instead of the intended
28
+ // whole percentage, e.g. 38%. Remove this support when possible.
29
+ @if (meta.type-of($opacity) == string and string.index($opacity, '--') == 1) {
30
+ $opacity: 'calc(var(#{$opacity}) * 100%)';
31
+ } @else if (meta.type-of($opacity) == number and $opacity < 1) {
32
+ $opacity: '#{$opacity * 100}%';
33
+ }
34
+
35
+ @return color-mix(in srgb, #{$color} #{$opacity}, transparent);
36
+ }