@rxap/plugin-angular 16.1.0-dev.40 → 16.1.0-dev.41
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [16.1.0-dev.41](https://gitlab.com/rxap/packages/compare/@rxap/plugin-angular@16.1.0-dev.40...@rxap/plugin-angular@16.1.0-dev.41) (2023-09-28)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- support dynamic font families and theme density ([a212366](https://gitlab.com/rxap/packages/commit/a21236669cfe89f51b5946cd2d28e72411481dc9))
|
|
11
|
+
|
|
6
12
|
# [16.1.0-dev.40](https://gitlab.com/rxap/packages/compare/@rxap/plugin-angular@16.1.0-dev.39...@rxap/plugin-angular@16.1.0-dev.40) (2023-09-27)
|
|
7
13
|
|
|
8
14
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ yarn add @rxap/plugin-angular
|
|
|
19
19
|
```
|
|
20
20
|
**Install peer dependencies:**
|
|
21
21
|
```bash
|
|
22
|
-
yarn add @nx/devkit@^16.5.0 @rxap/generator-utilities@^1.1.0-dev.
|
|
22
|
+
yarn add @nx/devkit@^16.5.0 @rxap/generator-utilities@^1.1.0-dev.15 @rxap/plugin-localazy@^16.1.0-dev.11 @rxap/plugin-utilities@^16.1.0-dev.16 @rxap/ts-morph@^0.1.0-dev.12 @rxap/utilities@^16.0.0-dev.19 @rxap/workspace-ts-morph@^0.1.0-dev.9 @rxap/workspace-utilities@^0.1.0-dev.17 nx@^16.5.0 ts-morph@^18.0.0 tslib@2.6.2
|
|
23
23
|
```
|
|
24
24
|
**Execute the init generator:**
|
|
25
25
|
```bash
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "16.1.0-dev.
|
|
2
|
+
"version": "16.1.0-dev.41",
|
|
3
3
|
"name": "@rxap/plugin-angular",
|
|
4
4
|
"license": "GPL-3.0-or-later",
|
|
5
5
|
"dependencies": {
|
|
@@ -11,17 +11,17 @@
|
|
|
11
11
|
},
|
|
12
12
|
"peerDependencies": {
|
|
13
13
|
"@nx/devkit": "^16.5.0",
|
|
14
|
-
"@rxap/generator-utilities": "^1.1.0-dev.
|
|
14
|
+
"@rxap/generator-utilities": "^1.1.0-dev.15",
|
|
15
15
|
"@rxap/plugin-localazy": "^16.1.0-dev.11",
|
|
16
|
-
"@rxap/plugin-utilities": "^16.1.0-dev.
|
|
17
|
-
"@rxap/ts-morph": "^0.1.0-dev.
|
|
18
|
-
"@rxap/utilities": "^16.0.0-dev.
|
|
19
|
-
"@rxap/workspace-ts-morph": "^0.1.0-dev.
|
|
20
|
-
"@rxap/workspace-utilities": "^0.1.0-dev.
|
|
16
|
+
"@rxap/plugin-utilities": "^16.1.0-dev.16",
|
|
17
|
+
"@rxap/ts-morph": "^0.1.0-dev.12",
|
|
18
|
+
"@rxap/utilities": "^16.0.0-dev.19",
|
|
19
|
+
"@rxap/workspace-ts-morph": "^0.1.0-dev.9",
|
|
20
|
+
"@rxap/workspace-utilities": "^0.1.0-dev.17",
|
|
21
21
|
"nx": "^16.5.0",
|
|
22
22
|
"ts-morph": "^18.0.0",
|
|
23
23
|
"tslib": "2.6.2",
|
|
24
|
-
"@rxap/node-utilities": "1.1.0-dev.
|
|
24
|
+
"@rxap/node-utilities": "1.1.0-dev.11"
|
|
25
25
|
},
|
|
26
26
|
"author": {
|
|
27
27
|
"name": "Merzough Münker",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"packageGroup": [
|
|
48
48
|
{
|
|
49
49
|
"package": "@rxap/generator-utilities",
|
|
50
|
-
"version": "1.1.0-dev.
|
|
50
|
+
"version": "1.1.0-dev.15"
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
"package": "@rxap/node-utilities",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
"package": "@rxap/plugin-utilities",
|
|
62
|
-
"version": "16.1.0-dev.
|
|
62
|
+
"version": "16.1.0-dev.16"
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
"package": "@rxap/schematics-ts-morph",
|
|
@@ -67,19 +67,19 @@
|
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
69
|
"package": "@rxap/ts-morph",
|
|
70
|
-
"version": "0.1.0-dev.
|
|
70
|
+
"version": "0.1.0-dev.12"
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
"package": "@rxap/utilities",
|
|
74
|
-
"version": "16.0.0-dev.
|
|
74
|
+
"version": "16.0.0-dev.19"
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
77
|
"package": "@rxap/workspace-ts-morph",
|
|
78
|
-
"version": "0.1.0-dev.
|
|
78
|
+
"version": "0.1.0-dev.9"
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
"package": "@rxap/workspace-utilities",
|
|
82
|
-
"version": "0.1.0-dev.
|
|
82
|
+
"version": "0.1.0-dev.17"
|
|
83
83
|
}
|
|
84
84
|
]
|
|
85
85
|
},
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
},
|
|
95
95
|
"schematics": "./generators.json",
|
|
96
96
|
"type": "commonjs",
|
|
97
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "59ccd7cb7c25002337d832609de637b59b3e545f",
|
|
98
98
|
"main": "./src/index.js",
|
|
99
99
|
"types": "./src/index.d.ts"
|
|
100
100
|
}
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
@use '@angular/material' as mat;
|
|
4
4
|
@use 'palette' as palette;
|
|
5
5
|
|
|
6
|
-
@import
|
|
7
|
-
@import 'loading-animation';
|
|
6
|
+
@import 'utilities';
|
|
8
7
|
|
|
9
8
|
@tailwind base;
|
|
10
9
|
@tailwind components;
|
|
@@ -12,91 +11,4 @@
|
|
|
12
11
|
|
|
13
12
|
@include mat.core();
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
$theme-accent: mat.define-palette(palette.$accent-pat, A200, A100, A400);
|
|
17
|
-
$theme-warn: mat.define-palette(palette.$warn-pat);
|
|
18
|
-
$theme-typography: mat.define-typography-config(
|
|
19
|
-
$font-family: theme("fontFamily.mono")
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
$light-theme: mat.define-light-theme((
|
|
24
|
-
color: (
|
|
25
|
-
primary: $theme-primary,
|
|
26
|
-
accent: $theme-accent,
|
|
27
|
-
warn: $theme-warn
|
|
28
|
-
),
|
|
29
|
-
// Only include `typography` and `density` in the default theme.
|
|
30
|
-
typography: $theme-typography,
|
|
31
|
-
// https://m2.material.io/design/layout/applying-density.html#usage
|
|
32
|
-
// between -3 and 0
|
|
33
|
-
// density < -1 -> form field label not visible
|
|
34
|
-
density: 0,
|
|
35
|
-
));
|
|
36
|
-
|
|
37
|
-
$dark-theme: mat.define-dark-theme((
|
|
38
|
-
color: (
|
|
39
|
-
primary: $theme-primary,
|
|
40
|
-
accent: $theme-accent,
|
|
41
|
-
warn: $theme-warn
|
|
42
|
-
),
|
|
43
|
-
));
|
|
44
|
-
|
|
45
|
-
// Emit theme-dependent styles for common features used across multiple components.
|
|
46
|
-
@include mat.core-theme($light-theme);
|
|
47
|
-
|
|
48
|
-
// Emit styles for MatButton based on `$light-theme`. Because the configuration
|
|
49
|
-
// passed to `define-light-theme` omits typography, `button-theme` will not
|
|
50
|
-
// emit any typography styles.
|
|
51
|
-
@include mat.all-component-themes($light-theme);
|
|
52
|
-
@include table-theme($light-theme);
|
|
53
|
-
|
|
54
|
-
@mixin define-utility-variables($theme) {
|
|
55
|
-
$foreground: map-get($theme, foreground);
|
|
56
|
-
$background: map-get($theme, background);
|
|
57
|
-
$primary: map-get($theme, primary);
|
|
58
|
-
$accent: map-get($theme, accent);
|
|
59
|
-
$warn: map-get($theme, warn);
|
|
60
|
-
$isDark: map-get($theme, is-dark);
|
|
61
|
-
|
|
62
|
-
--background-color: #{map-get($background, background)};
|
|
63
|
-
--primary-color: #{mat.get-color-from-palette($primary)};
|
|
64
|
-
--accent-color: #{mat.get-color-from-palette($accent)};
|
|
65
|
-
--warn-color: #{mat.get-color-from-palette($warn)};
|
|
66
|
-
|
|
67
|
-
--hint-text-color: #{mat.get-color-from-palette($foreground, hint-text)};
|
|
68
|
-
--foreground-color: #{mat.get-color-from-palette($foreground, base)};
|
|
69
|
-
|
|
70
|
-
--accept-color: rgb(115, 190, 105);
|
|
71
|
-
--decline-color: rgb(204, 73, 51);
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
@mixin body-theme($theme) {
|
|
76
|
-
|
|
77
|
-
$background: mat.get-color-from-palette(map-get($theme, background), background);
|
|
78
|
-
background-color: $background;
|
|
79
|
-
color: mat.get-color-from-palette(map-get($theme, foreground), text);
|
|
80
|
-
@include loadingAnimation($background);
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
:root {
|
|
85
|
-
@include define-utility-variables($light-theme);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
body.dark {
|
|
89
|
-
@include mat.core-color($dark-theme);
|
|
90
|
-
@include mat.all-component-colors($dark-theme);
|
|
91
|
-
@include table-theme($dark-theme);
|
|
92
|
-
@include define-utility-variables($dark-theme);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
body {
|
|
96
|
-
@include body-theme($light-theme);
|
|
97
|
-
|
|
98
|
-
&.dark, &.dark-theme {
|
|
99
|
-
@include body-theme($dark-theme);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
}
|
|
14
|
+
@include init-theme();
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
@use '@angular/material' as mat;
|
|
2
|
+
@use 'palette' as palette;
|
|
3
|
+
|
|
4
|
+
@import "table";
|
|
5
|
+
@import 'loading-animation';
|
|
6
|
+
|
|
7
|
+
@mixin colors($theme) {
|
|
8
|
+
$background: mat.get-color-from-palette(map-get($theme, background), background);
|
|
9
|
+
$foreground: mat.get-color-from-palette(map-get($theme, foreground), text);
|
|
10
|
+
|
|
11
|
+
--background-color: #{$background};
|
|
12
|
+
--foreground-color: #{$foreground};
|
|
13
|
+
|
|
14
|
+
--accept-color: rgb(115, 190, 105);
|
|
15
|
+
--decline-color: rgb(204, 73, 51);
|
|
16
|
+
|
|
17
|
+
@include mat.all-component-colors($theme);
|
|
18
|
+
|
|
19
|
+
@include table-theme($theme);
|
|
20
|
+
@include loadingAnimation($background);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@mixin density($theme) {
|
|
24
|
+
@include mat.all-component-densities($theme);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@mixin typography($theme) {
|
|
28
|
+
@include mat.all-component-typographies($theme);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@mixin base-theme() {
|
|
32
|
+
$theme: mat.define-light-theme((
|
|
33
|
+
color: (
|
|
34
|
+
primary: mat.$blue-palette,
|
|
35
|
+
accent: mat.$cyan-palette,
|
|
36
|
+
warn: mat.$red-palette
|
|
37
|
+
),
|
|
38
|
+
));
|
|
39
|
+
@include mat.core-theme($theme);
|
|
40
|
+
@include density($theme);
|
|
41
|
+
@include typography($theme);
|
|
42
|
+
|
|
43
|
+
body {
|
|
44
|
+
background-color: var(--background-color);
|
|
45
|
+
color: var(--foreground-color);
|
|
46
|
+
|
|
47
|
+
@for $i from -3 through -1 {
|
|
48
|
+
&.density#{$i} {
|
|
49
|
+
@include density(mat.define-light-theme((
|
|
50
|
+
// https://m2.material.io/design/layout/applying-density.html#usage
|
|
51
|
+
// between -3 and 0
|
|
52
|
+
// density < -1 -> form field label not visible
|
|
53
|
+
density: $i,
|
|
54
|
+
)));
|
|
55
|
+
--density: #{$i};
|
|
56
|
+
}
|
|
57
|
+
&.typography-mono {
|
|
58
|
+
@include typography(mat.define-light-theme((
|
|
59
|
+
typography: mat.define-typography-config(
|
|
60
|
+
$font-family: theme("fontFamily.mono")
|
|
61
|
+
),
|
|
62
|
+
)));
|
|
63
|
+
--typography: mono;
|
|
64
|
+
}
|
|
65
|
+
&.typography-serif {
|
|
66
|
+
@include typography(mat.define-light-theme((
|
|
67
|
+
typography: mat.define-typography-config(
|
|
68
|
+
$font-family: theme("fontFamily.serif")
|
|
69
|
+
),
|
|
70
|
+
)));
|
|
71
|
+
--typography: serif;
|
|
72
|
+
}
|
|
73
|
+
&.typography-sans {
|
|
74
|
+
@include typography(mat.define-light-theme((
|
|
75
|
+
typography: mat.define-typography-config(
|
|
76
|
+
$font-family: theme("fontFamily.sans")
|
|
77
|
+
),
|
|
78
|
+
)));
|
|
79
|
+
--typography: sans;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@mixin body-theme($theme) {
|
|
87
|
+
@include colors($theme);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@mixin init-theme(
|
|
91
|
+
$theme-primary: mat.define-palette(palette.$primary-pat),
|
|
92
|
+
$theme-accent: mat.define-palette(palette.$accent-pat),
|
|
93
|
+
$theme-warn: mat.define-palette(palette.$warn-pat),
|
|
94
|
+
$scope: null
|
|
95
|
+
) {
|
|
96
|
+
|
|
97
|
+
$light-theme: mat.define-light-theme((
|
|
98
|
+
color: (
|
|
99
|
+
primary: $theme-primary,
|
|
100
|
+
accent: $theme-accent,
|
|
101
|
+
warn: $theme-warn
|
|
102
|
+
),
|
|
103
|
+
));
|
|
104
|
+
|
|
105
|
+
$dark-theme: mat.define-dark-theme((
|
|
106
|
+
color: (
|
|
107
|
+
primary: $theme-primary,
|
|
108
|
+
accent: $theme-accent,
|
|
109
|
+
warn: $theme-warn
|
|
110
|
+
),
|
|
111
|
+
));
|
|
112
|
+
|
|
113
|
+
// generate the base theme independent of the preferred color scheme
|
|
114
|
+
@include base-theme();
|
|
115
|
+
|
|
116
|
+
@if $scope {
|
|
117
|
+
body.#{$scope} {
|
|
118
|
+
@include body-theme($light-theme);
|
|
119
|
+
|
|
120
|
+
&.dark, &.dark-theme {
|
|
121
|
+
@include body-theme($dark-theme);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
} @else {
|
|
125
|
+
body {
|
|
126
|
+
@include body-theme($light-theme);
|
|
127
|
+
|
|
128
|
+
&.dark, &.dark-theme {
|
|
129
|
+
@include body-theme($dark-theme);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|