@angular/material 19.0.0-rc.1 → 19.0.0-rc.3
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/bottom-sheet/index.d.ts +6 -0
- package/core/theming/_inspection.scss +28 -17
- package/core/theming/_m2-inspection.scss +4 -4
- package/fesm2022/bottom-sheet.mjs +6 -0
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/core.mjs +1 -1
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/form-field.mjs +10 -2
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/input.mjs +20 -3
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/menu/testing.mjs +2 -2
- package/fesm2022/menu/testing.mjs.map +1 -1
- package/fesm2022/menu.mjs +7 -9
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +22 -8
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +2 -2
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/form-field/index.d.ts +1 -0
- package/input/index.d.ts +2 -0
- package/package.json +2 -2
- package/prebuilt-themes/azure-blue.css +1 -1
- package/prebuilt-themes/cyan-orange.css +1 -1
- package/prebuilt-themes/magenta-violet.css +1 -1
- package/prebuilt-themes/rose-red.css +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-add/theming/create-custom-theme.js +12 -28
- package/schematics/ng-add/theming/create-custom-theme.mjs +12 -28
- package/schematics/ng-update/index_bundled.js +93 -1
- package/schematics/ng-update/index_bundled.js.map +4 -4
- package/sidenav/index.d.ts +3 -0
|
@@ -14,33 +14,17 @@ function createCustomTheme(name = 'app') {
|
|
|
14
14
|
// Custom Theming for Angular Material
|
|
15
15
|
// For more information: https://material.angular.io/guide/theming
|
|
16
16
|
@use '@angular/material' as mat;
|
|
17
|
-
// Plus imports for other components in your app.
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
)
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
// Include theme styles for core and each component used in your app.
|
|
32
|
-
// Alternatively, you can import and @include the theme mixins for each component
|
|
33
|
-
// that you are using.
|
|
34
|
-
:root {
|
|
35
|
-
@include mat.all-component-themes($${name}-theme);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// Comment out the line below if you want to use the pre-defined typography utility classes.
|
|
39
|
-
// For more information: https://material.angular.io/guide/typography#using-typography-styles-in-your-application.
|
|
40
|
-
// @include mat.typography-hierarchy($${name}-theme);
|
|
41
|
-
|
|
42
|
-
// Comment out the line below if you want to use the deprecated \`color\` inputs.
|
|
43
|
-
// @include mat.color-variants-backwards-compatibility($${name}-theme);
|
|
44
|
-
`;
|
|
18
|
+
html {
|
|
19
|
+
@include mat.theme((
|
|
20
|
+
color: (
|
|
21
|
+
theme-type: light,
|
|
22
|
+
primary: mat.$azure-palette,
|
|
23
|
+
tertiary: mat.$blue-palette,
|
|
24
|
+
),
|
|
25
|
+
typography: Roboto,
|
|
26
|
+
density: 0,
|
|
27
|
+
));
|
|
28
|
+
}`;
|
|
45
29
|
}
|
|
46
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
30
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlLWN1c3RvbS10aGVtZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYXRlcmlhbC9zY2hlbWF0aWNzL25nLWFkZC90aGVtaW5nL2NyZWF0ZS1jdXN0b20tdGhlbWUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7R0FNRzs7QUFHSCw4Q0FpQkM7QUFsQkQsb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AgKSk7XG59YDtcbn1cbiJdfQ==
|
|
@@ -14,33 +14,17 @@ function createCustomTheme(name = 'app') {
|
|
|
14
14
|
// Custom Theming for Angular Material
|
|
15
15
|
// For more information: https://material.angular.io/guide/theming
|
|
16
16
|
@use '@angular/material' as mat;
|
|
17
|
-
// Plus imports for other components in your app.
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
)
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
// Include theme styles for core and each component used in your app.
|
|
32
|
-
// Alternatively, you can import and @include the theme mixins for each component
|
|
33
|
-
// that you are using.
|
|
34
|
-
:root {
|
|
35
|
-
@include mat.all-component-themes($${name}-theme);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// Comment out the line below if you want to use the pre-defined typography utility classes.
|
|
39
|
-
// For more information: https://material.angular.io/guide/typography#using-typography-styles-in-your-application.
|
|
40
|
-
// @include mat.typography-hierarchy($${name}-theme);
|
|
41
|
-
|
|
42
|
-
// Comment out the line below if you want to use the deprecated \`color\` inputs.
|
|
43
|
-
// @include mat.color-variants-backwards-compatibility($${name}-theme);
|
|
44
|
-
`;
|
|
18
|
+
html {
|
|
19
|
+
@include mat.theme((
|
|
20
|
+
color: (
|
|
21
|
+
theme-type: light,
|
|
22
|
+
primary: mat.$azure-palette,
|
|
23
|
+
tertiary: mat.$blue-palette,
|
|
24
|
+
),
|
|
25
|
+
typography: Roboto,
|
|
26
|
+
density: 0,
|
|
27
|
+
));
|
|
28
|
+
}`;
|
|
45
29
|
}
|
|
46
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
30
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlLWN1c3RvbS10aGVtZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4u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dGhlbWUtdHlwZTogbGlnaHQsXG4gICAgICBwcmltYXJ5OiBtYXQuJGF6dXJlLXBhbGV0dGUsXG4gICAgICB0ZXJ0aWFyeTogbWF0LiRibHVlLXBhbGV0dGUsXG4gICAgKSxcbiAgICB0eXBvZ3JhcGh5OiBSb2JvdG8sXG4gICAgZGVuc2l0eTogMCxcbiAgKSk7XG59YDtcbn1cbiJdfQ==
|
|
@@ -7278,6 +7278,94 @@ var require_mat_core_removal = __commonJS({
|
|
|
7278
7278
|
}
|
|
7279
7279
|
});
|
|
7280
7280
|
|
|
7281
|
+
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/migrations/explicit-system-variable-prefix.js
|
|
7282
|
+
var require_explicit_system_variable_prefix = __commonJS({
|
|
7283
|
+
"bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/migrations/explicit-system-variable-prefix.js"(exports) {
|
|
7284
|
+
"use strict";
|
|
7285
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7286
|
+
exports.ExplicitSystemVariablePrefixMigration = void 0;
|
|
7287
|
+
var schematics_1 = require("@angular/cdk/schematics");
|
|
7288
|
+
var ExplicitSystemVariablePrefixMigration2 = class extends schematics_1.Migration {
|
|
7289
|
+
constructor() {
|
|
7290
|
+
super(...arguments);
|
|
7291
|
+
__publicField(this, "enabled", true);
|
|
7292
|
+
}
|
|
7293
|
+
visitStylesheet(stylesheet) {
|
|
7294
|
+
if (!stylesheet.filePath.endsWith(".scss")) {
|
|
7295
|
+
return;
|
|
7296
|
+
}
|
|
7297
|
+
const content = this.fileSystem.read(stylesheet.filePath);
|
|
7298
|
+
if (!content || !content.includes("@angular/material")) {
|
|
7299
|
+
return;
|
|
7300
|
+
}
|
|
7301
|
+
const changes = this._getChanges(content);
|
|
7302
|
+
if (changes.length > 0) {
|
|
7303
|
+
const update = this.fileSystem.edit(stylesheet.filePath);
|
|
7304
|
+
for (let i = changes.length - 1; i > -1; i--) {
|
|
7305
|
+
update.insertRight(changes[i].start, changes[i].text);
|
|
7306
|
+
}
|
|
7307
|
+
this.fileSystem.commitEdits();
|
|
7308
|
+
}
|
|
7309
|
+
}
|
|
7310
|
+
_getChanges(content) {
|
|
7311
|
+
const key = "use-system-variables";
|
|
7312
|
+
const prefixKey = "system-variables-prefix";
|
|
7313
|
+
const changes = [];
|
|
7314
|
+
let index = content.indexOf(key);
|
|
7315
|
+
while (index > -1) {
|
|
7316
|
+
const colonIndex = content.indexOf(":", index);
|
|
7317
|
+
const valueEnd = colonIndex === -1 ? -1 : this._getValueEnd(content, colonIndex);
|
|
7318
|
+
if (valueEnd === -1) {
|
|
7319
|
+
index = content.indexOf(key, index + key.length);
|
|
7320
|
+
continue;
|
|
7321
|
+
}
|
|
7322
|
+
const value = content.slice(colonIndex + 1, valueEnd + 1).trim();
|
|
7323
|
+
if (value.startsWith("true") && !this._hasSystemPrefix(content, index, prefixKey)) {
|
|
7324
|
+
changes.push({
|
|
7325
|
+
start: this._getInsertIndex(content, valueEnd),
|
|
7326
|
+
text: `${value.endsWith(",") ? "" : ","}
|
|
7327
|
+
${prefixKey}: sys,`
|
|
7328
|
+
});
|
|
7329
|
+
}
|
|
7330
|
+
index = content.indexOf(key, valueEnd);
|
|
7331
|
+
}
|
|
7332
|
+
return changes;
|
|
7333
|
+
}
|
|
7334
|
+
_getValueEnd(content, startIndex) {
|
|
7335
|
+
for (let i = startIndex + 1; i < content.length; i++) {
|
|
7336
|
+
const char = content[i];
|
|
7337
|
+
if (char === "," || char === "\n" || char === ")") {
|
|
7338
|
+
return i;
|
|
7339
|
+
}
|
|
7340
|
+
}
|
|
7341
|
+
return -1;
|
|
7342
|
+
}
|
|
7343
|
+
_getInsertIndex(content, valueEnd) {
|
|
7344
|
+
for (let i = valueEnd; i < content.length; i++) {
|
|
7345
|
+
if (content[i] === "\n") {
|
|
7346
|
+
return i;
|
|
7347
|
+
} else if (content[i] === ")") {
|
|
7348
|
+
return i;
|
|
7349
|
+
}
|
|
7350
|
+
}
|
|
7351
|
+
return valueEnd;
|
|
7352
|
+
}
|
|
7353
|
+
_hasSystemPrefix(content, keyIndex, prefixKey) {
|
|
7354
|
+
const mapEnd = content.indexOf(")", keyIndex);
|
|
7355
|
+
if (mapEnd > -1) {
|
|
7356
|
+
for (let i = keyIndex; i > -1; i--) {
|
|
7357
|
+
if (content[i] === "(") {
|
|
7358
|
+
return content.slice(i, mapEnd).includes(prefixKey);
|
|
7359
|
+
}
|
|
7360
|
+
}
|
|
7361
|
+
}
|
|
7362
|
+
return false;
|
|
7363
|
+
}
|
|
7364
|
+
};
|
|
7365
|
+
exports.ExplicitSystemVariablePrefixMigration = ExplicitSystemVariablePrefixMigration2;
|
|
7366
|
+
}
|
|
7367
|
+
});
|
|
7368
|
+
|
|
7281
7369
|
// bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/index.mjs
|
|
7282
7370
|
var ng_update_exports = {};
|
|
7283
7371
|
__export(ng_update_exports, {
|
|
@@ -7287,7 +7375,11 @@ module.exports = __toCommonJS(ng_update_exports);
|
|
|
7287
7375
|
var import_schematics = require("@angular/cdk/schematics");
|
|
7288
7376
|
var import_upgrade_data = __toESM(require_upgrade_data(), 1);
|
|
7289
7377
|
var import_mat_core_removal = __toESM(require_mat_core_removal(), 1);
|
|
7290
|
-
var
|
|
7378
|
+
var import_explicit_system_variable_prefix = __toESM(require_explicit_system_variable_prefix(), 1);
|
|
7379
|
+
var materialMigrations = [
|
|
7380
|
+
import_mat_core_removal.MatCoreMigration,
|
|
7381
|
+
import_explicit_system_variable_prefix.ExplicitSystemVariablePrefixMigration
|
|
7382
|
+
];
|
|
7291
7383
|
function updateToV19() {
|
|
7292
7384
|
return (0, import_schematics.createMigrationSchematicRule)(import_schematics.TargetVersion.V19, materialMigrations, import_upgrade_data.materialUpgradeData, onMigrationComplete);
|
|
7293
7385
|
}
|