@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.
- package/LICENSE +21 -0
- package/fesm2022/acontplus-ng-components.mjs +5957 -3544
- package/fesm2022/acontplus-ng-components.mjs.map +1 -1
- package/package.json +41 -16
- package/src/_index.scss +22 -0
- package/src/core/color/_all-color.scss +15 -0
- package/src/core/density/_all-density.scss +17 -0
- package/src/core/style/_elevation.scss +207 -0
- package/src/core/theming/_all-theme.scss +36 -0
- package/src/core/theming/_config-validation.scss +171 -0
- package/src/core/theming/_definition.scss +158 -0
- package/src/core/theming/_palettes.scss +1576 -0
- package/src/core/theming/prebuilt/aqua.scss +21 -0
- package/src/core/theming/prebuilt/blue.scss +21 -0
- package/src/core/theming/prebuilt/cyan.scss +21 -0
- package/src/core/theming/prebuilt/green.scss +21 -0
- package/src/core/theming/prebuilt/orange.scss +21 -0
- package/src/core/theming/prebuilt/pink.scss +21 -0
- package/src/core/theming/prebuilt/purple.scss +21 -0
- package/src/core/theming/prebuilt/rose.scss +21 -0
- package/src/core/tokens/_m3-tokens.scss +141 -0
- package/src/core/tokens/_m3-utils.scss +36 -0
- package/src/core/tokens/_system.scss +388 -0
- package/src/core/tokens/_token-utils.scss +117 -0
- package/src/core/tokens/m3/_index.scss +7 -0
- package/src/core/tokens/m3/_md-sys-color.scss +150 -0
- package/src/core/tokens/m3/_md-sys-elevation.scss +8 -0
- package/src/core/tokens/m3/_md-sys-motion.scss +35 -0
- package/src/core/tokens/m3/_md-sys-shape.scss +31 -0
- package/src/core/tokens/m3/_md-sys-state.scss +13 -0
- package/src/core/tokens/m3/_md-sys-typescale.scss +131 -0
- package/src/core/tokens/m3/_theme.scss +41 -0
- package/src/core/typography/_all-typography.scss +12 -0
- package/src/lib/components/alert/_alert-theme.scss +57 -0
- package/src/lib/components/alert/_m3-alert.scss +72 -0
- package/src/lib/components/alert/alert.scss +60 -0
- package/src/lib/components/autocomplete-wrapper/autocomplete-wrapper.scss +667 -0
- package/src/lib/components/button/button.scss +297 -0
- package/src/lib/components/cards/dynamic-card/dynamic-card.scss +131 -0
- package/src/lib/components/checkbox-group/checkbox-group.scss +14 -0
- package/src/lib/components/date-range-input/calendar/date-range-calendar.scss +29 -0
- package/src/lib/components/date-range-input/date-range-input.scss +194 -0
- package/src/lib/components/dialog-wrapper/dialog-wrapper.scss +36 -0
- package/src/lib/components/drawer/_drawer-theme.scss +57 -0
- package/src/lib/components/drawer/_m3-drawer.scss +23 -0
- package/src/lib/components/drawer/drawer-container.scss +97 -0
- package/src/lib/components/grid/_grid-theme.scss +53 -0
- package/src/lib/components/grid/_m3-grid.scss +34 -0
- package/src/lib/components/grid/cell/cell.scss +38 -0
- package/src/lib/components/grid/column-menu/column-menu.scss +117 -0
- package/src/lib/components/grid/column-resize/_column-resize.scss +126 -0
- package/src/lib/components/grid/grid.scss +245 -0
- package/src/lib/components/icons/svg-icon/svg-icon.scss +16 -0
- package/src/lib/components/icons/user-icon/user-icon.scss +0 -0
- package/src/lib/components/input-chip/input-chip.scss +0 -0
- package/src/lib/components/popover/_m3-popover.scss +24 -0
- package/src/lib/components/popover/_popover-theme.scss +57 -0
- package/src/lib/components/popover/popover.scss +239 -0
- package/src/lib/components/spinner/spinner.scss +6 -0
- package/src/lib/components/tables/tabulator-table/tabulator-table.scss +68 -0
- package/src/lib/components/theme-toggle/theme-toggle.scss +3 -0
- package/src/lib/styles/_elevation.scss +168 -0
- package/src/lib/styles/_token-utils.scss +115 -0
- package/types/acontplus-ng-components.d.ts +1017 -536
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
// This file contains functions used to define Angular Material theme objects.
|
|
2
|
+
|
|
3
|
+
@use 'sass:map';
|
|
4
|
+
@use '@angular/material' as mat;
|
|
5
|
+
@use './palettes';
|
|
6
|
+
@use '../tokens/m3-tokens';
|
|
7
|
+
@use './config-validation';
|
|
8
|
+
@use '../tokens/m3';
|
|
9
|
+
|
|
10
|
+
// Prefix used for component token fallback variables, e.g.
|
|
11
|
+
// `color: var(--mat-text-button-label-text-color, var(--mat-sys-primary));`
|
|
12
|
+
$system-fallback-prefix: mat-sys;
|
|
13
|
+
|
|
14
|
+
// Default system level prefix to use when directly calling the `system-level-*` mixins.
|
|
15
|
+
// Prefix used for component token fallback variables, e.g.
|
|
16
|
+
// `color: var(--mat-text-button-label-text-color, var(--mat-sys-primary));`
|
|
17
|
+
// TODO: Remove this variable after internal clients are migrated from "sys"
|
|
18
|
+
$system-level-prefix: mat-sys;
|
|
19
|
+
|
|
20
|
+
/// Map key used to store internals of theme config.
|
|
21
|
+
$internals: _mat-theming-internals-do-not-access;
|
|
22
|
+
|
|
23
|
+
/// The theme version of generated themes.
|
|
24
|
+
$theme-version: 1;
|
|
25
|
+
|
|
26
|
+
/// Defines an Angular Material theme object with color, typography, and density settings.
|
|
27
|
+
/// @param {Map} $config The theme configuration
|
|
28
|
+
/// @return {Map} A theme object
|
|
29
|
+
@function define-theme($config: ()) {
|
|
30
|
+
$err: config-validation.validate-theme-config($config);
|
|
31
|
+
@if $err {
|
|
32
|
+
@error $err;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
$color-config: map.get($config, color) or ();
|
|
36
|
+
$typography-config: map.get($config, typography) or ();
|
|
37
|
+
$density-config: map.get($config, density) or ();
|
|
38
|
+
|
|
39
|
+
// colors
|
|
40
|
+
$type: map.get($color-config, theme-type) or light;
|
|
41
|
+
$primary: map.get($color-config, primary) or palettes.$violet-palette;
|
|
42
|
+
$tertiary: map.get($color-config, tertiary) or $primary;
|
|
43
|
+
$color-system-variables-prefix: map.get($color-config, system-variables-prefix) or
|
|
44
|
+
$system-level-prefix;
|
|
45
|
+
mat.$private-use-system-color-variables: map.get($color-config, use-system-variables) or false;
|
|
46
|
+
|
|
47
|
+
$palettes: (
|
|
48
|
+
primary: map.remove($primary, neutral, neutral-variant, secondary),
|
|
49
|
+
secondary: map.get($primary, secondary),
|
|
50
|
+
tertiary: map.remove($tertiary, neutral, neutral-variant, secondary, error),
|
|
51
|
+
neutral: map.get($primary, neutral),
|
|
52
|
+
neutral-variant: map.get($primary, neutral-variant),
|
|
53
|
+
error: map.get($primary, error),
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
// typography
|
|
57
|
+
$default-plain: (Roboto, sans-serif);
|
|
58
|
+
$default-brand: $default-plain;
|
|
59
|
+
$plain: map.get($typography-config, plain-family) or $default-plain;
|
|
60
|
+
$brand: map.get($typography-config, brand-family) or $default-brand;
|
|
61
|
+
$bold: map.get($typography-config, bold-weight) or 700;
|
|
62
|
+
$medium: map.get($typography-config, medium-weight) or 500;
|
|
63
|
+
$regular: map.get($typography-config, regular-weight) or 400;
|
|
64
|
+
$typography-system-variables-prefix: map.get($typography-config, system-variables-prefix) or
|
|
65
|
+
$system-level-prefix;
|
|
66
|
+
mat.$private-use-system-typography-variables: map.get($typography-config, use-system-variables) or
|
|
67
|
+
false;
|
|
68
|
+
$typography: (
|
|
69
|
+
plain: $plain,
|
|
70
|
+
brand: $brand,
|
|
71
|
+
bold: $bold,
|
|
72
|
+
medium: $medium,
|
|
73
|
+
regular: $regular,
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
// density
|
|
77
|
+
$density-scale: map.get($density-config, scale) or 0;
|
|
78
|
+
|
|
79
|
+
$system-maps: (
|
|
80
|
+
m3-tokens.get-sys-color($type, $palettes, $color-system-variables-prefix),
|
|
81
|
+
m3.md-sys-elevation-values(),
|
|
82
|
+
m3.md-sys-motion-values(),
|
|
83
|
+
m3.md-sys-shape-values(),
|
|
84
|
+
m3.md-sys-state-values(),
|
|
85
|
+
(
|
|
86
|
+
// Form field native select option text color
|
|
87
|
+
neutral10: map.get($palettes, neutral, 10),
|
|
88
|
+
// Sidenav scrim (container background shadow when opened),
|
|
89
|
+
neutral-variant20: map.get($palettes, neutral-variant, 20)
|
|
90
|
+
),
|
|
91
|
+
m3-tokens.get-sys-typeface($typography, $typography-system-variables-prefix)
|
|
92
|
+
);
|
|
93
|
+
$system: (
|
|
94
|
+
density-scale: $density-scale,
|
|
95
|
+
);
|
|
96
|
+
@each $sys-map in $system-maps {
|
|
97
|
+
$system: map.merge($system, $sys-map);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
@return (
|
|
101
|
+
_mat-system: $system,
|
|
102
|
+
$internals: (
|
|
103
|
+
base-tokens: m3-tokens.generate-base-tokens(),
|
|
104
|
+
color-system-variables-prefix: $color-system-variables-prefix,
|
|
105
|
+
color-tokens: m3-tokens.generate-color-tokens(
|
|
106
|
+
$type,
|
|
107
|
+
$palettes,
|
|
108
|
+
$color-system-variables-prefix
|
|
109
|
+
),
|
|
110
|
+
density-scale: $density-scale,
|
|
111
|
+
font-definition: $typography,
|
|
112
|
+
palettes: $palettes,
|
|
113
|
+
theme-type: $type,
|
|
114
|
+
theme-version: $theme-version,
|
|
115
|
+
typography-system-variables-prefix: $typography-system-variables-prefix,
|
|
116
|
+
typography-tokens: m3-tokens.generate-typography-tokens(
|
|
117
|
+
$typography,
|
|
118
|
+
$typography-system-variables-prefix
|
|
119
|
+
),
|
|
120
|
+
)
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/// Defines an Angular Material theme object with color settings.
|
|
125
|
+
/// @param {Map} $config The color configuration
|
|
126
|
+
/// @return {Map} A theme object
|
|
127
|
+
/// @deprecated Use define-theme with a map using the "color" key
|
|
128
|
+
@function define-colors($config: ()) {
|
|
129
|
+
@return define-theme(
|
|
130
|
+
(
|
|
131
|
+
color: $config,
|
|
132
|
+
)
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/// Defines an Angular Material theme object with typography settings.
|
|
137
|
+
/// @param {Map} $config The typography configuration
|
|
138
|
+
/// @return {Map} A theme object
|
|
139
|
+
/// @deprecated Use define-theme with a map using the "typography" key
|
|
140
|
+
@function define-typography($config: ()) {
|
|
141
|
+
@return define-theme(
|
|
142
|
+
(
|
|
143
|
+
typography: $config,
|
|
144
|
+
)
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/// Defines an Angular Material theme object with density settings.
|
|
149
|
+
/// @param {Map} $config The density configuration
|
|
150
|
+
/// @return {Map} A theme object
|
|
151
|
+
/// @deprecated Use define-theme with a map using the "density" key
|
|
152
|
+
@function define-density($config: ()) {
|
|
153
|
+
@return define-theme(
|
|
154
|
+
(
|
|
155
|
+
density: $config,
|
|
156
|
+
)
|
|
157
|
+
);
|
|
158
|
+
}
|