@design-factory/design-factory 20.0.0-next.1 → 20.0.0-next.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/README.md +17 -16
- package/design-factory-initial-branding.css +1 -1
- package/design-factory-initial-branding.scss +1 -1
- package/design-factory.css +2 -2
- package/design-factory.scss +0 -2
- package/fesm2022/design-factory-design-factory-tokens-style-dictionary.mjs +358 -0
- package/fesm2022/design-factory-design-factory-tokens-style-dictionary.mjs.map +1 -0
- package/fesm2022/design-factory.mjs +520 -476
- package/fesm2022/design-factory.mjs.map +1 -1
- package/index.d.ts +22 -72
- package/package.json +15 -3
- package/schematics/migrations/15_0_0/remove-ngx-slider/index.js +11 -5
- package/schematics/migrations/16_0_0/revert-to-old-brand/index.js +2 -2
- package/schematics/migrations/20_0_0/colors-new-branding/index.d.ts +18 -0
- package/schematics/migrations/20_0_0/colors-new-branding/index.js +151 -0
- package/schematics/migrations/20_0_0/modal-removal/index.d.ts +7 -0
- package/schematics/migrations/20_0_0/modal-removal/index.js +53 -0
- package/schematics/migrations/20_0_0/navbar-toggler-logo-svg/index.js +6 -5
- package/schematics/migrations/20_0_0/spinner-new-branding/index.d.ts +7 -0
- package/schematics/migrations/20_0_0/spinner-new-branding/index.js +41 -0
- package/schematics/migrations/20_0_0/style-import/index.d.ts +7 -0
- package/schematics/migrations/20_0_0/style-import/index.js +39 -0
- package/schematics/migrations/20_0_0/waves-of-progress/index.d.ts +7 -0
- package/schematics/migrations/20_0_0/waves-of-progress/index.js +69 -0
- package/schematics/migrations/helpers.js +1 -1
- package/schematics/migrations/migration.json +27 -0
- package/schematics/migrations/utils/component-resource-collector.js +2 -2
- package/schematics/migrations/utils/project_tsconfig_paths.js +4 -0
- package/schematics/migrations/utils/style-updater.js +3 -1
- package/schematics/migrations/utils/template-updater.js +3 -1
- package/schematics/migrations/utils/typescript/compiler_host.js +6 -4
- package/schematics/ng-add/index.js +3 -6
- package/styles/scss/_common.root.scss +20 -3
- package/styles/scss/_common.scss +1 -1
- package/styles/scss/bootstrap/_utilities-override.scss +14 -8
- package/styles/scss/bootstrap/_variables.scss +2 -2
- package/styles/scss/components/alert/_alert.scss +23 -11
- package/styles/scss/components/badge/_badge.mixins.scss +2 -4
- package/styles/scss/components/badge/_badge.scss +84 -23
- package/styles/scss/components/button/_button.scss +394 -86
- package/styles/scss/components/button/_button.utils.scss +20 -1
- package/styles/scss/components/button/_button_container.scss +22 -5
- package/styles/scss/components/card/_card.scss +29 -11
- package/styles/scss/components/checkbox/_checkbox.scss +2 -1
- package/styles/scss/components/collapse/_collapse.scss +6 -1
- package/styles/scss/components/datepicker/_datepicker.scss +9 -11
- package/styles/scss/components/dropdown/_dropdown.scss +23 -0
- package/styles/scss/components/fonts/_font-faces.mixins.scss +108 -54
- package/styles/scss/components/fonts/_icon-font.scss +2 -1
- package/styles/scss/components/footer/_footer.scss +1 -1
- package/styles/scss/components/inputs/_inputs.root.scss +1 -1
- package/styles/scss/components/inputs/_inputs.scss +7 -1
- package/styles/scss/components/link/_link.mixins.scss +7 -3
- package/styles/scss/components/link/_link.scss +10 -0
- package/styles/scss/components/link/_link.variables.scss +5 -2
- package/styles/scss/components/media/_media.scss +4 -0
- package/styles/scss/components/media/_media.variables.scss +1 -0
- package/styles/scss/components/modal/_modal.scss +51 -19
- package/styles/scss/components/navbar/_navbar.scss +12 -0
- package/styles/scss/components/pagination/_pagination.scss +1 -0
- package/styles/scss/components/pagination/_pagination_container.scss +1 -1
- package/styles/scss/components/progressbar/_progressbar.variables.scss +13 -4
- package/styles/scss/components/radio/_radio.scss +1 -1
- package/styles/scss/components/rating/_rating.scss +3 -3
- package/styles/scss/components/rating/_rating.variables.scss +1 -1
- package/styles/scss/components/scrollspy/_scrollspy.scss +5 -2
- package/styles/scss/components/select/_select.scss +14 -19
- package/styles/scss/components/separator/_separator.variables.scss +1 -1
- package/styles/scss/components/sidenav/_sidenav.scss +1 -1
- package/styles/scss/components/sidenav/_sidenav.variables.scss +6 -4
- package/styles/scss/components/spinner/_spinner.scss +14 -0
- package/styles/scss/components/spinner/_spinner.variables.scss +7 -4
- package/styles/scss/components/tabs/_tabs.scss +3 -0
- package/styles/scss/components/toast/_toast.scss +37 -32
- package/styles/scss/components/tooltip/_tooltip_container.scss +17 -13
- package/styles/scss/themes/brand2023/_variables.scss +68 -29
- package/styles/scss/themes/brand2023/tokens/_mapping.gen.scss +156 -186
- package/styles/scss/themes/brand2023/tokens/_root.gen.scss +1709 -0
- package/styles/scss/themes/brand2023/tokens/_sass-vars.gen.scss +1468 -0
- package/styles/scss/utilities/_common.utilities.scss +3 -10
- package/styles/scss/utilities/_rgb.scss +10 -0
- package/tokens/style-dictionary/index.d.ts +60 -0
- package/assets/waves_of_progress/arrowRight.svg +0 -34
- package/assets/waves_of_progress/arrowUp.svg +0 -35
- package/assets/waves_of_progress/circleDiagonal.svg +0 -29
- package/assets/waves_of_progress/circleUp.svg +0 -24
- package/styles/scss/components/waves/_waves.scss +0 -15
- package/styles/scss/components/waves/_waves.variables.scss +0 -86
- package/styles/scss/themes/brand2023/tokens/_figma.gen.scss +0 -3028
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = styleImport;
|
|
4
|
+
const workspace_1 = require("@schematics/angular/utility/workspace");
|
|
5
|
+
const regexDefault = /@import\s+['"]@design-factory\/design-factory['"];/g;
|
|
6
|
+
/**
|
|
7
|
+
* This migration updates the global styles to import the correct path of design factory styles.
|
|
8
|
+
*
|
|
9
|
+
* @returns the Rule to migrate the style import
|
|
10
|
+
*/
|
|
11
|
+
function styleImport() {
|
|
12
|
+
return async (tree, _context) => {
|
|
13
|
+
const workspace = await (0, workspace_1.getWorkspace)(tree);
|
|
14
|
+
for (const project of workspace.projects.values()) {
|
|
15
|
+
if (project.extensions['projectType'] === 'application') {
|
|
16
|
+
const sassStylePath = `${project.sourceRoot ?? ''}/styles.scss`;
|
|
17
|
+
if (tree.exists(sassStylePath)) {
|
|
18
|
+
const styleText = tree.readText(sassStylePath);
|
|
19
|
+
if (regexDefault.test(styleText)) {
|
|
20
|
+
const recorder = tree.beginUpdate(sassStylePath);
|
|
21
|
+
recorder.remove(0, styleText.length);
|
|
22
|
+
recorder.insertRight(0, styleText.replace(regexDefault, '@import "@design-factory/design-factory/design-factory.scss";'));
|
|
23
|
+
tree.commitUpdate(recorder);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
const cssStylePath = `${project.sourceRoot ?? ''}/styles.css`;
|
|
27
|
+
if (tree.exists(cssStylePath)) {
|
|
28
|
+
const styleText = tree.readText(cssStylePath);
|
|
29
|
+
if (regexDefault.test(styleText)) {
|
|
30
|
+
const recorder = tree.beginUpdate(cssStylePath);
|
|
31
|
+
recorder.remove(0, styleText.length);
|
|
32
|
+
recorder.insertRight(0, styleText.replace(regexDefault, '@import "@design-factory/design-factory/design-factory.css";'));
|
|
33
|
+
tree.commitUpdate(recorder);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Rule } from '@angular-devkit/schematics';
|
|
2
|
+
/**
|
|
3
|
+
* This migration updates templates to use inline svg instead of navbar span for the toggler icon.
|
|
4
|
+
*
|
|
5
|
+
* @returns the Rule to migrate the navbar logo
|
|
6
|
+
*/
|
|
7
|
+
export default function wavesOfProgressRefactor(): Rule;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = wavesOfProgressRefactor;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const project_tsconfig_paths_1 = require("../../utils/project_tsconfig_paths");
|
|
6
|
+
const compiler_host_1 = require("../../utils/typescript/compiler_host");
|
|
7
|
+
const template_updater_1 = require("../../utils/template-updater");
|
|
8
|
+
const waveOfProgressDirective = /(<[^>]*?)\s(\[dfWavesOfProgress]="[^"]*")([^>]*?>)/g;
|
|
9
|
+
const wavesClass = /class="([^"]*?)df-waves-(dark|vivid|light)-(sky|crimson|pumpkin|forest|canary|fuchsia|violet)([^"]*?)"/g;
|
|
10
|
+
function replaceHtmlContent(content, loggingContext) {
|
|
11
|
+
return content.replace(waveOfProgressDirective, (match, _g1, wavesDirective, _g2) => {
|
|
12
|
+
if (wavesDirective) {
|
|
13
|
+
loggingContext.foundWaves = true;
|
|
14
|
+
return match.replace(wavesClass, (_match, classesBefore, tonality, color, classesAfter) => {
|
|
15
|
+
if (tonality && color) {
|
|
16
|
+
if (classesBefore === '' && classesAfter === '') {
|
|
17
|
+
return `color="${tonality}-${color}"`;
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
return `color="${tonality}-${color}" class="${classesBefore}${classesAfter}"`;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
loggingContext.complexCase = true;
|
|
24
|
+
return _match;
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return match;
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* This migration updates templates to use inline svg instead of navbar span for the toggler icon.
|
|
32
|
+
*
|
|
33
|
+
* @returns the Rule to migrate the navbar logo
|
|
34
|
+
*/
|
|
35
|
+
function wavesOfProgressRefactor() {
|
|
36
|
+
return async (tree, _context) => {
|
|
37
|
+
const { buildPaths, testPaths } = await (0, project_tsconfig_paths_1.getProjectTsConfigPaths)(tree);
|
|
38
|
+
const basePath = process.cwd();
|
|
39
|
+
const allPaths = [...buildPaths, ...testPaths];
|
|
40
|
+
if (!allPaths.length) {
|
|
41
|
+
throw new schematics_1.SchematicsException('Could not find any tsconfig file. Cannot run the `waves of progress` migration.');
|
|
42
|
+
}
|
|
43
|
+
const loggingContext = { foundWaves: false, complexCase: false };
|
|
44
|
+
const templateUpdater = new template_updater_1.TemplateUpdater(tree, (content) => replaceHtmlContent(content, loggingContext));
|
|
45
|
+
for (const tsconfigPath of allPaths) {
|
|
46
|
+
const program = (0, compiler_host_1.createMigrationProgram)(tree, tsconfigPath, basePath);
|
|
47
|
+
const sourceFiles = program
|
|
48
|
+
.getSourceFiles()
|
|
49
|
+
.filter((sourceFile) => (0, compiler_host_1.canMigrateFile)(basePath, sourceFile, program));
|
|
50
|
+
for (const sourceFile of sourceFiles) {
|
|
51
|
+
templateUpdater.update(sourceFile, program.getTypeChecker());
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
if (loggingContext.foundWaves) {
|
|
55
|
+
_context.logger.warn('Waves of progress no longer relies on @design-factory/asset: please remove it from the angular.json assets configuration if not needed.' +
|
|
56
|
+
`Look for:
|
|
57
|
+
{
|
|
58
|
+
"glob": "**/*",
|
|
59
|
+
"input": "node-modules/@design-factory/design-factory/assets/",
|
|
60
|
+
"output": "assets/"
|
|
61
|
+
},
|
|
62
|
+
` +
|
|
63
|
+
`\n\nPlease keep in mind that the waves no longer need updateSvg() call, please remove it if you are using it.`);
|
|
64
|
+
if (loggingContext.complexCase) {
|
|
65
|
+
_context.logger.warn('The migration could not handle all cases. Please check the updated files for manual adjustments.');
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
}
|
|
@@ -23,7 +23,7 @@ function dedent(strings, ...values) {
|
|
|
23
23
|
if (matches === null) {
|
|
24
24
|
return joinedString;
|
|
25
25
|
}
|
|
26
|
-
const minLineIndent = Math.min(...matches.map(el => el.length));
|
|
26
|
+
const minLineIndent = Math.min(...matches.map((el) => el.length));
|
|
27
27
|
const omitMinIndentRegex = new RegExp(`^[ \\t]{${minLineIndent}}`, 'gm');
|
|
28
28
|
const omitEmptyLineWhitespaceRegex = /^[ \t]+$/gm;
|
|
29
29
|
const result = minLineIndent > 0 ? joinedString.replace(omitMinIndentRegex, '') : joinedString;
|
|
@@ -48,6 +48,33 @@
|
|
|
48
48
|
"version": "20.0.0",
|
|
49
49
|
"factory": "./20_0_0/navbar-toggler-logo-svg",
|
|
50
50
|
"optional": true
|
|
51
|
+
},
|
|
52
|
+
"colors-new-branding": {
|
|
53
|
+
"description": "Changes the color names to match the new branding taxonomy. As of Design Factory version 20, the color names have been updated to better reflect the new brand.",
|
|
54
|
+
"version": "20.0.0",
|
|
55
|
+
"factory": "./20_0_0/colors-new-branding",
|
|
56
|
+
"optional": true
|
|
57
|
+
},
|
|
58
|
+
"spinner-new-branding": {
|
|
59
|
+
"description": "Use df-spinner-{color} instead of text-{color} for spinners. Recommended for apps using the new amadeus branding.",
|
|
60
|
+
"version": "20.0.0",
|
|
61
|
+
"factory": "./20_0_0/spinner-new-branding",
|
|
62
|
+
"optional": true
|
|
63
|
+
},
|
|
64
|
+
"waves-of-progress": {
|
|
65
|
+
"description": "Refactor waves of progress",
|
|
66
|
+
"version": "20.0.0",
|
|
67
|
+
"factory": "./20_0_0/waves-of-progress"
|
|
68
|
+
},
|
|
69
|
+
"style-import": {
|
|
70
|
+
"description": "Sass default import for Design Factory styles has changed.",
|
|
71
|
+
"version": "20.0.0",
|
|
72
|
+
"factory": "./20_0_0/style-import"
|
|
73
|
+
},
|
|
74
|
+
"modal-removal": {
|
|
75
|
+
"description": "DfModalService has been removed and replaced with NgbModal.",
|
|
76
|
+
"version": "20.0.0",
|
|
77
|
+
"factory": "./20_0_0/modal-removal"
|
|
51
78
|
}
|
|
52
79
|
}
|
|
53
80
|
}
|
|
@@ -73,7 +73,7 @@ class ComponentResourceCollector {
|
|
|
73
73
|
// Need to add an offset of one to the start because the template quotes are
|
|
74
74
|
// not part of the template content.
|
|
75
75
|
const templateStartIdx = el.getStart() + 1;
|
|
76
|
-
const content = stripBom(el.
|
|
76
|
+
const content = stripBom(el.getText().slice(1, -1));
|
|
77
77
|
this.resolvedStylesheets.push({
|
|
78
78
|
filePath,
|
|
79
79
|
container: node,
|
|
@@ -94,7 +94,7 @@ class ComponentResourceCollector {
|
|
|
94
94
|
this.resolvedTemplates.push({
|
|
95
95
|
filePath,
|
|
96
96
|
container: node,
|
|
97
|
-
content: property.initializer.
|
|
97
|
+
content: property.initializer.getText().slice(1, -1),
|
|
98
98
|
inline: true,
|
|
99
99
|
start: templateStartIdx,
|
|
100
100
|
getCharacterAndLineOfPosition: (pos) => ts.getLineAndCharacterOfPosition(sourceFile, pos + templateStartIdx)
|
|
@@ -60,6 +60,7 @@ function* allTargetOptions(target) {
|
|
|
60
60
|
}
|
|
61
61
|
function createHost(tree) {
|
|
62
62
|
return {
|
|
63
|
+
// eslint-disable-next-line @typescript-eslint/require-await
|
|
63
64
|
async readFile(path) {
|
|
64
65
|
const data = tree.read(path);
|
|
65
66
|
if (!data) {
|
|
@@ -67,9 +68,11 @@ function createHost(tree) {
|
|
|
67
68
|
}
|
|
68
69
|
return core_1.virtualFs.fileBufferToString(data);
|
|
69
70
|
},
|
|
71
|
+
// eslint-disable-next-line @typescript-eslint/require-await
|
|
70
72
|
async writeFile(path, data) {
|
|
71
73
|
return tree.overwrite(path, data);
|
|
72
74
|
},
|
|
75
|
+
// eslint-disable-next-line @typescript-eslint/require-await
|
|
73
76
|
async isDirectory(path) {
|
|
74
77
|
// Approximate a directory check.
|
|
75
78
|
// We don't need to consider empty directories and hence this is a good enough approach.
|
|
@@ -77,6 +80,7 @@ function createHost(tree) {
|
|
|
77
80
|
// https://angular.io/guide/schematics-for-libraries#get-the-project-configuration
|
|
78
81
|
return !tree.exists(path) && tree.getDir(path).subfiles.length > 0;
|
|
79
82
|
},
|
|
83
|
+
// eslint-disable-next-line @typescript-eslint/require-await
|
|
80
84
|
async isFile(path) {
|
|
81
85
|
return tree.exists(path);
|
|
82
86
|
}
|
|
@@ -13,9 +13,11 @@ class StyleUpdater {
|
|
|
13
13
|
this._analyzedFiles = new Set();
|
|
14
14
|
}
|
|
15
15
|
update(file, typeChecker) {
|
|
16
|
-
|
|
16
|
+
const filePath = (0, core_1.normalize)(path_1.posix.resolve(file.fileName));
|
|
17
|
+
if (this._analyzedFiles.has(filePath)) {
|
|
17
18
|
return;
|
|
18
19
|
}
|
|
20
|
+
this._analyzedFiles.add(filePath);
|
|
19
21
|
const resourceCollector = new component_resource_collector_1.ComponentResourceCollector(typeChecker, this.tree);
|
|
20
22
|
const visitNodeAndCollectResources = (node) => {
|
|
21
23
|
ts.forEachChild(node, visitNodeAndCollectResources);
|
|
@@ -13,9 +13,11 @@ class TemplateUpdater {
|
|
|
13
13
|
this._analyzedFiles = new Set();
|
|
14
14
|
}
|
|
15
15
|
update(file, typeChecker) {
|
|
16
|
-
|
|
16
|
+
const filePath = (0, core_1.normalize)(path_1.posix.resolve(file.fileName));
|
|
17
|
+
if (this._analyzedFiles.has(filePath)) {
|
|
17
18
|
return;
|
|
18
19
|
}
|
|
20
|
+
this._analyzedFiles.add(filePath);
|
|
19
21
|
const resourceCollector = new component_resource_collector_1.ComponentResourceCollector(typeChecker, this.tree);
|
|
20
22
|
const visitNodeAndCollectResources = (node) => {
|
|
21
23
|
ts.forEachChild(node, visitNodeAndCollectResources);
|
|
@@ -48,14 +48,15 @@ function createMigrationCompilerHost(tree, options, basePath, fakeRead) {
|
|
|
48
48
|
// program to be based on the file contents in the virtual file tree. Otherwise
|
|
49
49
|
// if we run multiple migrations we might have intersecting changes and
|
|
50
50
|
// source files.
|
|
51
|
-
host.readFile = fileName => {
|
|
51
|
+
host.readFile = (fileName) => {
|
|
52
52
|
const treeRelativePath = (0, path_1.relative)(basePath, fileName);
|
|
53
53
|
let result = fakeRead?.(treeRelativePath);
|
|
54
54
|
if (typeof result !== 'string') {
|
|
55
55
|
// If the relative path resolved to somewhere outside of the tree, fall back to
|
|
56
56
|
// TypeScript's default file reading function since the `tree` will throw an error.
|
|
57
|
-
result = treeRelativePath.startsWith('..')
|
|
58
|
-
|
|
57
|
+
result = treeRelativePath.startsWith('..')
|
|
58
|
+
? defaultReadFile.call(host, fileName)
|
|
59
|
+
: tree.read(treeRelativePath)?.toString();
|
|
59
60
|
}
|
|
60
61
|
// Strip BOM as otherwise TSC methods (Ex: getWidth) will return an offset,
|
|
61
62
|
// which breaks the CLI UpdateRecorder.
|
|
@@ -72,7 +73,8 @@ function createMigrationCompilerHost(tree, options, basePath, fakeRead) {
|
|
|
72
73
|
*/
|
|
73
74
|
function canMigrateFile(basePath, sourceFile, program) {
|
|
74
75
|
// We shouldn't migrate .d.ts files, files from an external library or type checking files.
|
|
75
|
-
if (sourceFile.fileName.endsWith('.ngtypecheck.ts') ||
|
|
76
|
+
if (sourceFile.fileName.endsWith('.ngtypecheck.ts') ||
|
|
77
|
+
sourceFile.isDeclarationFile ||
|
|
76
78
|
program.isSourceFileFromExternalLibrary(sourceFile)) {
|
|
77
79
|
return false;
|
|
78
80
|
}
|
|
@@ -12,7 +12,7 @@ function addDependencies() {
|
|
|
12
12
|
return (tree) => {
|
|
13
13
|
const dfDependencies = JSON.parse((0, fs_1.readFileSync)((0, path_1.resolve)(__dirname, '..', '..', 'package.json'), { encoding: 'utf-8' })).peerDependencies;
|
|
14
14
|
for (const dependency in dfDependencies) {
|
|
15
|
-
if (
|
|
15
|
+
if (Object.prototype.hasOwnProperty.call(dfDependencies, dependency)) {
|
|
16
16
|
(0, dependencies_1.addPackageJsonDependency)(tree, {
|
|
17
17
|
type: dependencies_1.NodeDependencyType.Default,
|
|
18
18
|
name: dependency,
|
|
@@ -31,7 +31,7 @@ function install() {
|
|
|
31
31
|
}
|
|
32
32
|
// Add DF styles to the main styles file. If no styles.scss found, add DF styles to the workspace.
|
|
33
33
|
function addDFStyles(options) {
|
|
34
|
-
return async (tree
|
|
34
|
+
return async (tree) => {
|
|
35
35
|
const workspace = await (0, workspace_1.getWorkspace)(tree);
|
|
36
36
|
const project = workspace.projects.get(options.project);
|
|
37
37
|
if (!project) {
|
|
@@ -64,10 +64,7 @@ $font-path: '@design-factory/design-factory/assets/fonts';
|
|
|
64
64
|
const buildOptions = (buildTarget.options || {});
|
|
65
65
|
// if the main `styles.scss` was not found, add the DF styles to the workspace
|
|
66
66
|
if (addStyleToWorkspace) {
|
|
67
|
-
buildOptions.styles = [
|
|
68
|
-
...(buildOptions.styles ?? []),
|
|
69
|
-
'@design-factory/design-factory/design-factory.scss'
|
|
70
|
-
];
|
|
67
|
+
buildOptions.styles = [...(buildOptions.styles ?? []), '@design-factory/design-factory/design-factory.scss'];
|
|
71
68
|
}
|
|
72
69
|
// update the style preprocessor options
|
|
73
70
|
buildOptions.stylePreprocessorOptions = { includePaths: ['./src', 'node_modules'] };
|
|
@@ -24,9 +24,26 @@
|
|
|
24
24
|
|
|
25
25
|
// Form
|
|
26
26
|
--#{$prefix}form-valid-color-rgb: #{to-rgb($form-valid-color)};
|
|
27
|
-
--#{$prefix}form-invalid-color
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
--#{$prefix}form-invalid-border-color: #{variable-switch-brand2023(
|
|
28
|
+
'color-danger-alt-default-border',
|
|
29
|
+
$form-invalid-color
|
|
30
|
+
)};
|
|
31
|
+
--#{$prefix}form-invalid-color: #{variable-switch-brand2023(
|
|
32
|
+
'color-danger-alt-default-foreground',
|
|
33
|
+
$form-invalid-color
|
|
34
|
+
)};
|
|
35
|
+
--#{$prefix}form-invalid-color-rgb: #{variable-switch-brand2023(
|
|
36
|
+
'color-danger-alt-default-border-rgb',
|
|
37
|
+
to-rgb($form-invalid-color)
|
|
38
|
+
)};
|
|
39
|
+
--#{$prefix}form-warning-color: #{variable-switch-brand2023(
|
|
40
|
+
'color-warning-alt-default-foreground',
|
|
41
|
+
$df-form-feedback-warning-color
|
|
42
|
+
)};
|
|
43
|
+
--#{$prefix}form-warning-color-rgb: #{variable-switch-brand2023(
|
|
44
|
+
'color-warning-alt-default-foreground-rgb',
|
|
45
|
+
to-rgb($df-form-feedback-warning-color)
|
|
46
|
+
)};
|
|
30
47
|
--#{$prefix}form-feedback-warning-color: #{$df-form-feedback-warning-color};
|
|
31
48
|
--#{$prefix}form-feedback-help-warning-color: #{$df-form-feedback-help-warning-color};
|
|
32
49
|
--#{$prefix}form-feedback-warning-icon: #{$df-form-feedback-warning-icon};
|
package/styles/scss/_common.scss
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.mandatory-indicator {
|
|
2
2
|
// add
|
|
3
|
-
color: $df-mandatory-indicator-color;
|
|
3
|
+
color: #{variable-switch-brand2023('color-danger-alt-default-foreground', $df-mandatory-indicator-color)};
|
|
4
4
|
font-weight: $df-mandatory-indicator-font-weight;
|
|
5
5
|
margin-left: $df-mandatory-indicator-margin;
|
|
6
6
|
margin-right: $df-mandatory-indicator-margin;
|
|
@@ -4,16 +4,22 @@
|
|
|
4
4
|
$utilities: map.merge(
|
|
5
5
|
$utilities,
|
|
6
6
|
(
|
|
7
|
-
|
|
7
|
+
'swatch': (
|
|
8
8
|
property: background-color,
|
|
9
9
|
class: swatch,
|
|
10
10
|
values: $grays
|
|
11
11
|
),
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
'width': map.merge(
|
|
13
|
+
map.get($utilities, 'width'),
|
|
14
|
+
(
|
|
15
|
+
responsive: true
|
|
16
|
+
)
|
|
17
|
+
),
|
|
18
|
+
'height': map.merge(
|
|
19
|
+
map.get($utilities, 'height'),
|
|
20
|
+
(
|
|
21
|
+
responsive: true
|
|
22
|
+
)
|
|
23
|
+
)
|
|
18
24
|
)
|
|
19
|
-
);
|
|
25
|
+
);
|
|
@@ -707,7 +707,7 @@ $lights-mapping: (
|
|
|
707
707
|
'bg-subtle-hover-color': var(--#{$prefix}light-50),
|
|
708
708
|
'bg-subtle-active-color': var(--#{$prefix}light-100),
|
|
709
709
|
'border-color': var(--#{$prefix}light-500),
|
|
710
|
-
'text-color': var(--#{$prefix}light-
|
|
710
|
+
'text-color': var(--#{$prefix}light-100),
|
|
711
711
|
'text-hover-color': var(--#{$prefix}light-800),
|
|
712
712
|
'text-active-color': var(--#{$prefix}light-900),
|
|
713
713
|
'bg-hover-alt-color': var(--#{$prefix}light-50),
|
|
@@ -723,7 +723,7 @@ $whites-mapping: (
|
|
|
723
723
|
'bg-subtle-hover-color': var(--#{$prefix}white-100),
|
|
724
724
|
'bg-subtle-active-color': var(--#{$prefix}white-500),
|
|
725
725
|
'border-color': var(--#{$prefix}white-50),
|
|
726
|
-
'text-color': var(--#{$prefix}white-
|
|
726
|
+
'text-color': var(--#{$prefix}white-50),
|
|
727
727
|
'text-hover-color': var(--#{$prefix}white-800),
|
|
728
728
|
'text-active-color': var(--#{$prefix}white-900),
|
|
729
729
|
'bg-hover-alt-color': var(--#{$prefix}white-100),
|
|
@@ -105,23 +105,33 @@
|
|
|
105
105
|
} @else {
|
|
106
106
|
--#{$prefix}alert-border-color: #{shades-rgba-css-var-with-opacity($state, 'border-color')};
|
|
107
107
|
}
|
|
108
|
-
--#{$prefix}alert-border-start-color: #{shades-css-var(
|
|
108
|
+
--#{$prefix}alert-border-start-color: #{shades-css-var-brand2023(
|
|
109
|
+
'color-' + $state + '-alt-default-border',
|
|
110
|
+
$state,
|
|
111
|
+
'inert-color'
|
|
112
|
+
)};
|
|
109
113
|
--#{$prefix}alert-icon-color: #{shades-css-var($state, 'inert-color')};
|
|
110
114
|
}
|
|
111
115
|
}
|
|
116
|
+
@if meta.variable-exists($name: 'df-enableBranding2023') and $df-enableBranding2023 {
|
|
117
|
+
&.alert-warning {
|
|
118
|
+
--#{$prefix}alert-icon-color: var(--#{$prefix}color-icon-warning-foreground);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
112
121
|
&.alert-tip {
|
|
113
122
|
@if meta.variable-exists($name: 'df-enableBranding2023') and $df-enableBranding2023 {
|
|
114
123
|
hr {
|
|
115
124
|
border-top-color: shades-css-var('mystery', 'separator-color');
|
|
116
125
|
}
|
|
126
|
+
} @else {
|
|
127
|
+
--#{$prefix}alert-color: #{$df-alert-tip-color};
|
|
128
|
+
--#{$prefix}alert-bg-color: #{$df-alert-tip-background};
|
|
129
|
+
--#{$prefix}alert-border-color: #{$df-alert-tip-border-color};
|
|
130
|
+
--#{$prefix}alert-border-start-color: #{$df-alert-tip-border-start-color};
|
|
131
|
+
--#{$prefix}alert-icon-font-weight: #{$df-icon-light-font-weight};
|
|
132
|
+
--#{$prefix}alert-icon-margin-start: #{$df-alert-tip-size-default-icon-margin-start};
|
|
133
|
+
--#{$prefix}alert-icon-color: #{$df-alert-tip-icon-color};
|
|
117
134
|
}
|
|
118
|
-
--#{$prefix}alert-color: #{$df-alert-tip-color};
|
|
119
|
-
--#{$prefix}alert-bg-color: #{$df-alert-tip-background};
|
|
120
|
-
--#{$prefix}alert-border-color: #{$df-alert-tip-border-color};
|
|
121
|
-
--#{$prefix}alert-border-start-color: #{$df-alert-tip-border-start-color};
|
|
122
|
-
--#{$prefix}alert-icon-font-weight: #{$df-icon-light-font-weight};
|
|
123
|
-
--#{$prefix}alert-icon-margin-start: #{$df-alert-tip-size-default-icon-margin-start};
|
|
124
|
-
--#{$prefix}alert-icon-color: #{$df-alert-tip-icon-color};
|
|
125
135
|
}
|
|
126
136
|
|
|
127
137
|
// Alerts sizes
|
|
@@ -180,14 +190,16 @@
|
|
|
180
190
|
@each $state, $value in $theme-colors {
|
|
181
191
|
&.alert-#{$state} {
|
|
182
192
|
--#{$prefix}alert-border-bottom-color: #{shades-css-var-brand2023(
|
|
183
|
-
'color-#{$state}-
|
|
193
|
+
'color-#{$state}-alt-default-border',
|
|
184
194
|
$state,
|
|
185
195
|
'border-color'
|
|
186
196
|
)};
|
|
187
197
|
}
|
|
188
198
|
}
|
|
189
|
-
|
|
190
|
-
|
|
199
|
+
@if not meta.variable-exists($name: 'df-enableBranding2023') or not $df-enableBranding2023 {
|
|
200
|
+
&.alert-tip {
|
|
201
|
+
--#{$prefix}alert-border-bottom-color: #{$df-alert-tip-border-start-color};
|
|
202
|
+
}
|
|
191
203
|
}
|
|
192
204
|
}
|
|
193
205
|
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
@use 'sass:meta';
|
|
2
2
|
|
|
3
|
-
@mixin df-disable-badge($color, $bg-color, $
|
|
3
|
+
@mixin df-disable-badge($color, $bg-color, $border-color) {
|
|
4
4
|
cursor: var(--#{$prefix}disabled-cursor);
|
|
5
5
|
color: $color !important;
|
|
6
6
|
background-color: $bg-color !important;
|
|
7
|
-
|
|
8
|
-
border-color: $color;
|
|
9
|
-
}
|
|
7
|
+
border-color: $border-color;
|
|
10
8
|
&:focus-visible,
|
|
11
9
|
&:focus,
|
|
12
10
|
&:focus-within {
|