@design-factory/design-factory 20.0.0-next.0 → 20.0.0-next.2

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 (91) hide show
  1. package/design-factory-initial-branding.css +1 -1
  2. package/design-factory-initial-branding.scss +1 -1
  3. package/design-factory.css +2 -2
  4. package/fesm2022/design-factory-design-factory-tokens-style-dictionary.mjs +358 -0
  5. package/fesm2022/design-factory-design-factory-tokens-style-dictionary.mjs.map +1 -0
  6. package/fesm2022/design-factory.mjs +433 -530
  7. package/fesm2022/design-factory.mjs.map +1 -1
  8. package/index.d.ts +46 -168
  9. package/package.json +14 -2
  10. package/schematics/migrations/15_0_0/remove-ngx-slider/index.js +11 -5
  11. package/schematics/migrations/16_0_0/revert-to-old-brand/index.js +2 -2
  12. package/schematics/migrations/20_0_0/colors-new-branding/index.d.ts +14 -0
  13. package/schematics/migrations/20_0_0/colors-new-branding/index.js +108 -0
  14. package/schematics/migrations/20_0_0/navbar-toggler-logo-svg/index.js +6 -5
  15. package/schematics/migrations/20_0_0/spinner-new-branding/index.d.ts +7 -0
  16. package/schematics/migrations/20_0_0/spinner-new-branding/index.js +41 -0
  17. package/schematics/migrations/helpers.js +1 -1
  18. package/schematics/migrations/migration.json +12 -0
  19. package/schematics/migrations/utils/component-resource-collector.js +2 -2
  20. package/schematics/migrations/utils/project_tsconfig_paths.js +4 -0
  21. package/schematics/migrations/utils/style-updater.js +3 -1
  22. package/schematics/migrations/utils/template-updater.js +3 -1
  23. package/schematics/migrations/utils/typescript/compiler_host.js +6 -4
  24. package/schematics/ng-add/index.js +3 -6
  25. package/styles/scss/_common.root.scss +20 -3
  26. package/styles/scss/_common.scss +1 -1
  27. package/styles/scss/_common.variables.scss +2 -1
  28. package/styles/scss/_variables.scss +1 -0
  29. package/styles/scss/agnosui/_variables.scss +1 -1
  30. package/styles/scss/bootstrap/_utilities-override.scss +14 -8
  31. package/styles/scss/bootstrap/_variables.scss +2 -2
  32. package/styles/scss/components/accordion/_accordion.scss +7 -0
  33. package/styles/scss/components/alert/_alert.scss +32 -17
  34. package/styles/scss/components/badge/_badge.mixins.scss +12 -4
  35. package/styles/scss/components/badge/_badge.scss +191 -71
  36. package/styles/scss/components/badge/_badge.variables.scss +8 -0
  37. package/styles/scss/components/brand-color/_brand-color.mixins.scss +2 -2
  38. package/styles/scss/components/breadcrumbs/_breadcrumbs.scss +4 -1
  39. package/styles/scss/components/breadcrumbs/_breadcrumbs.variables.scss +3 -1
  40. package/styles/scss/components/button/_button.scss +389 -74
  41. package/styles/scss/components/button/_button.utils.scss +20 -1
  42. package/styles/scss/components/button/_button_container.scss +22 -5
  43. package/styles/scss/components/card/_card.scss +42 -10
  44. package/styles/scss/components/card/_card.variables.scss +2 -0
  45. package/styles/scss/components/carousel/_carousel.scss +2 -2
  46. package/styles/scss/components/checkbox/_checkbox.scss +2 -1
  47. package/styles/scss/components/datepicker/_datepicker.scss +2 -1
  48. package/styles/scss/components/dropdown/_dropdown.scss +18 -1
  49. package/styles/scss/components/fonts/_font-faces.mixins.scss +108 -54
  50. package/styles/scss/components/icon/_amadeus-icon.scss +2 -2
  51. package/styles/scss/components/inputs/_inputs.mixin.scss +2 -2
  52. package/styles/scss/components/inputs/_inputs.root.scss +1 -1
  53. package/styles/scss/components/inputs/_inputs.scss +10 -4
  54. package/styles/scss/components/link/_link.mixins.scss +7 -3
  55. package/styles/scss/components/link/_link.scss +6 -0
  56. package/styles/scss/components/media/_media.scss +4 -0
  57. package/styles/scss/components/media/_media.variables.scss +1 -0
  58. package/styles/scss/components/modal/_modal.scss +54 -14
  59. package/styles/scss/components/modal/_modal.variables.scss +1 -0
  60. package/styles/scss/components/navbar/_navbar.scss +12 -0
  61. package/styles/scss/components/pagination/_pagination.scss +5 -0
  62. package/styles/scss/components/pagination/_pagination_container.scss +1 -1
  63. package/styles/scss/components/progressbar/_progressbar.variables.scss +13 -4
  64. package/styles/scss/components/rating/_rating.scss +18 -2
  65. package/styles/scss/components/rating/_rating.variables.scss +1 -1
  66. package/styles/scss/components/scrollspy/_scrollspy.scss +1 -1
  67. package/styles/scss/components/select/_select.scss +14 -19
  68. package/styles/scss/components/separator/_separator.variables.scss +1 -1
  69. package/styles/scss/components/sidenav/_sidenav.scss +3 -3
  70. package/styles/scss/components/sidenav/_sidenav.variables.scss +6 -4
  71. package/styles/scss/components/spinner/_spinner.scss +14 -0
  72. package/styles/scss/components/spinner/_spinner.variables.scss +7 -4
  73. package/styles/scss/components/stepper/_stepper.variables.scss +3 -3
  74. package/styles/scss/components/tabs/_tabs.scss +8 -1
  75. package/styles/scss/components/timepicker/_timepicker.scss +5 -0
  76. package/styles/scss/components/timepicker/_timepicker.variables.scss +1 -0
  77. package/styles/scss/components/toast/_toast.scss +21 -30
  78. package/styles/scss/components/toggle/_toggle.scss +2 -1
  79. package/styles/scss/components/toggle/_toggle.variables.scss +1 -0
  80. package/styles/scss/components/tooltip/_tooltip.scss +5 -0
  81. package/styles/scss/components/tooltip/_tooltip.variables.scss +4 -0
  82. package/styles/scss/components/tooltip/_tooltip_container.scss +17 -13
  83. package/styles/scss/df-styles.scss +1 -0
  84. package/styles/scss/themes/brand2023/_variables.scss +161 -38
  85. package/styles/scss/themes/brand2023/tokens/_mapping.gen.scss +156 -186
  86. package/styles/scss/themes/brand2023/tokens/_root.gen.scss +1708 -0
  87. package/styles/scss/themes/brand2023/tokens/_sass-vars.gen.scss +1467 -0
  88. package/styles/scss/utilities/_common.utilities.scss +3 -10
  89. package/styles/scss/utilities/_rgb.scss +10 -0
  90. package/tokens/style-dictionary/index.d.ts +60 -0
  91. package/styles/scss/themes/brand2023/tokens/_figma.gen.scss +0 -3028
@@ -5,12 +5,13 @@ const schematics_1 = require("@angular-devkit/schematics");
5
5
  const project_tsconfig_paths_1 = require("../../utils/project_tsconfig_paths");
6
6
  const compiler_host_1 = require("../../utils/typescript/compiler_host");
7
7
  const template_updater_1 = require("../../utils/template-updater");
8
+ const navbarTogglerIconRegexp = /<span\s+class="navbar-toggler-icon"><\/span>/g;
9
+ const navbarTogglerIconComplexRegexp = /([ \t]*<span[^>]+navbar-toggler-icon)/g;
8
10
  function replaceHtmlContentFactory(loggingContext) {
9
11
  function replaceHtmlContent(content) {
10
- content = content.replace(/<span\s+class="navbar-toggler-icon"><\/span>/g, `<svg class="navbar-toggler-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"/></svg>`);
11
- loggingContext.foundComplexCase =
12
- loggingContext.foundComplexCase || /([ \t]*<span[^>]+navbar-toggler-icon)/g.test(content);
13
- content = content.replace(/([ \t]*<span[^>]+navbar-toggler-icon)/g, '<!-- TODO Avoid using spans with navbar-toggler-icon and replace with inline svgs. -->\n' +
12
+ content = content.replace(navbarTogglerIconRegexp, `<svg class="navbar-toggler-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"/></svg>`);
13
+ loggingContext.foundComplexCase = loggingContext.foundComplexCase || navbarTogglerIconComplexRegexp.test(content);
14
+ content = content.replace(navbarTogglerIconComplexRegexp, '<!-- TODO Avoid using spans with navbar-toggler-icon and replace with inline svgs. -->\n' +
14
15
  '<!-- You can check an example of the inline svg in the SideNav example: https://design-factory.amadeus.net/components/sidenav/examples#basic -->\n$1');
15
16
  return content;
16
17
  }
@@ -27,7 +28,7 @@ function navbarTogglerLogo() {
27
28
  const basePath = process.cwd();
28
29
  const allPaths = [...buildPaths, ...testPaths];
29
30
  if (!allPaths.length) {
30
- throw new schematics_1.SchematicsException('Could not find any tsconfig file. Cannot run the `Font Awesome 6` migration.');
31
+ throw new schematics_1.SchematicsException('Could not find any tsconfig file. Cannot run the `navbar toggler logo` migration.');
31
32
  }
32
33
  const loggingContext = { foundComplexCase: false };
33
34
  const templateUpdater = new template_updater_1.TemplateUpdater(tree, replaceHtmlContentFactory(loggingContext));
@@ -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 spinnerNewBranding(): Rule;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = spinnerNewBranding;
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 spinner = /(\s+class=")([^"]*spinner-border[^"]*)"/g;
9
+ const spinnerText = /(^|\s)text-([a-z]+)/g;
10
+ function replaceSpinnerClass(_match, p1, p2) {
11
+ return `${p1}${p2.replace(spinnerText, '$1df-spinner-$2')}"`;
12
+ }
13
+ function replaceHtmlContent(content) {
14
+ content = content.replace(spinner, replaceSpinnerClass);
15
+ return content;
16
+ }
17
+ /**
18
+ * This migration updates templates to use inline svg instead of navbar span for the toggler icon.
19
+ *
20
+ * @returns the Rule to migrate the navbar logo
21
+ */
22
+ function spinnerNewBranding() {
23
+ return async (tree, _context) => {
24
+ const { buildPaths, testPaths } = await (0, project_tsconfig_paths_1.getProjectTsConfigPaths)(tree);
25
+ const basePath = process.cwd();
26
+ const allPaths = [...buildPaths, ...testPaths];
27
+ if (!allPaths.length) {
28
+ throw new schematics_1.SchematicsException('Could not find any tsconfig file. Cannot run the `spinner new branding` migration.');
29
+ }
30
+ const templateUpdater = new template_updater_1.TemplateUpdater(tree, replaceHtmlContent);
31
+ for (const tsconfigPath of allPaths) {
32
+ const program = (0, compiler_host_1.createMigrationProgram)(tree, tsconfigPath, basePath);
33
+ const sourceFiles = program
34
+ .getSourceFiles()
35
+ .filter((sourceFile) => (0, compiler_host_1.canMigrateFile)(basePath, sourceFile, program));
36
+ for (const sourceFile of sourceFiles) {
37
+ templateUpdater.update(sourceFile, program.getTypeChecker());
38
+ }
39
+ }
40
+ };
41
+ }
@@ -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,18 @@
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
51
63
  }
52
64
  }
53
65
  }
@@ -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.text);
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.text,
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
- if (this._analyzedFiles.has((0, core_1.normalize)(path_1.posix.resolve(file.fileName)))) {
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
- if (this._analyzedFiles.has((0, core_1.normalize)(path_1.posix.resolve(file.fileName)))) {
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('..') ? defaultReadFile.call(host, fileName) :
58
- tree.read(treeRelativePath)?.toString();
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') || sourceFile.isDeclarationFile ||
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 (dfDependencies.hasOwnProperty(dependency)) {
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, _context) => {
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-rgb: #{to-rgb($form-invalid-color)};
28
- --#{$prefix}form-warning-color: #{$df-form-feedback-warning-color};
29
- --#{$prefix}form-warning-color-rgb: #{to-rgb($df-form-feedback-warning-color)};
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};
@@ -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;
@@ -16,11 +16,12 @@ $df-zindex-topmost: 10000 !default;
16
16
  $df-font-size-xs: $font-size-sm !default;
17
17
  $df-form-placeholder-font-style: italic !default;
18
18
  // Merge DF Spacer with BS ones
19
+ // @deprecated - will be removed in version 21, use $spacer-4 instead of '75'
19
20
  // stylelint-disable-next-line scss/dollar-variable-pattern, scss/dollar-variable-default
20
21
  $spacers: map.merge(
21
22
  (
22
23
  '75': (
23
- $spacer * 0.75
24
+ calc($spacer * 0.75)
24
25
  )
25
26
  ),
26
27
  $spacers
@@ -55,6 +55,7 @@
55
55
  @import 'components/sidenav/sidenav.variables';
56
56
  @import 'components/footer/footer.variables';
57
57
  @import 'components/separator/separator.variables';
58
+ @import 'components/timepicker/timepicker.variables';
58
59
  @import 'components/toast/toast.variables';
59
60
  @import 'components/scrollspy/scrollspy.variables';
60
61
  @import 'components/tooltip/tooltip.variables';
@@ -23,6 +23,6 @@
23
23
  $au-tree-expand-icon-color-default: $primary !default,
24
24
  $au-tree-expand-icon-color-hover: $primary-800 !default,
25
25
  $au-tree-expand-icon-background-color-hover: var(--#{$prefix}primary-200) !default,
26
-
26
+ $au-tree-expand-icon-margin-inline-end: var(--#{$prefix}spacing-3) !default,
27
27
  $au-slider-tick-neutral-color: $gray-600 !default
28
28
  );
@@ -4,16 +4,22 @@
4
4
  $utilities: map.merge(
5
5
  $utilities,
6
6
  (
7
- "swatch": (
7
+ 'swatch': (
8
8
  property: background-color,
9
9
  class: swatch,
10
10
  values: $grays
11
11
  ),
12
- "width": map.merge(
13
- map.get($utilities, "width"), ( responsive: true )
14
- ),
15
- "height": map.merge(
16
- map.get($utilities, "height"), ( responsive: true )
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-600),
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-600),
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),
@@ -72,6 +72,13 @@
72
72
  .df-accordion-number {
73
73
  color: var(--#{$prefix}accordion-title-number-color);
74
74
  }
75
+
76
+ &:focus {
77
+ box-shadow: none;
78
+ }
79
+ &:focus-visible {
80
+ box-shadow: var(--#{$prefix}accordion-btn-focus-box-shadow);
81
+ }
75
82
  }
76
83
 
77
84
  // Reverse accordion
@@ -73,12 +73,8 @@
73
73
  }
74
74
 
75
75
  .df-alert-collapsed-text {
76
- @include ltr {
77
- margin-left: var(--#{$prefix}alert-icon-margin-start);
78
- }
79
- @include rtl {
80
- margin-right: var(--#{$prefix}alert-icon-margin-start);
81
- }
76
+ margin-block-start: var(--#{$prefix}spacing-5);
77
+ margin-inline-start: var(--#{$prefix}alert-icon-margin-start);
82
78
  }
83
79
  }
84
80
 
@@ -86,6 +82,13 @@
86
82
  .btn-close {
87
83
  padding-top: var(--#{$prefix}alert-btn-close-padding-y);
88
84
  padding-bottom: var(--#{$prefix}alert-btn-close-padding-y);
85
+
86
+ &:focus {
87
+ box-shadow: none;
88
+ }
89
+ &:focus-visible {
90
+ box-shadow: var(--#{$prefix}btn-close-focus-shadow);
91
+ }
89
92
  }
90
93
 
91
94
  // Variants of the alerts
@@ -102,23 +105,33 @@
102
105
  } @else {
103
106
  --#{$prefix}alert-border-color: #{shades-rgba-css-var-with-opacity($state, 'border-color')};
104
107
  }
105
- --#{$prefix}alert-border-start-color: #{shades-css-var($state, 'inert-color')};
108
+ --#{$prefix}alert-border-start-color: #{shades-css-var-brand2023(
109
+ 'color-' + $state + '-alt-default-border',
110
+ $state,
111
+ 'inert-color'
112
+ )};
106
113
  --#{$prefix}alert-icon-color: #{shades-css-var($state, 'inert-color')};
107
114
  }
108
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
+ }
109
121
  &.alert-tip {
110
122
  @if meta.variable-exists($name: 'df-enableBranding2023') and $df-enableBranding2023 {
111
123
  hr {
112
124
  border-top-color: shades-css-var('mystery', 'separator-color');
113
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};
114
134
  }
115
- --#{$prefix}alert-color: #{$df-alert-tip-color};
116
- --#{$prefix}alert-bg-color: #{$df-alert-tip-background};
117
- --#{$prefix}alert-border-color: #{$df-alert-tip-border-color};
118
- --#{$prefix}alert-border-start-color: #{$df-alert-tip-border-start-color};
119
- --#{$prefix}alert-icon-font-weight: #{$df-icon-light-font-weight};
120
- --#{$prefix}alert-icon-margin-start: #{$df-alert-tip-size-default-icon-margin-start};
121
- --#{$prefix}alert-icon-color: #{$df-alert-tip-icon-color};
122
135
  }
123
136
 
124
137
  // Alerts sizes
@@ -177,14 +190,16 @@
177
190
  @each $state, $value in $theme-colors {
178
191
  &.alert-#{$state} {
179
192
  --#{$prefix}alert-border-bottom-color: #{shades-css-var-brand2023(
180
- 'color-#{$state}-main-default-border',
193
+ 'color-#{$state}-alt-default-border',
181
194
  $state,
182
195
  'border-color'
183
196
  )};
184
197
  }
185
198
  }
186
- &.alert-tip {
187
- --#{$prefix}alert-border-bottom-color: #{$df-alert-tip-border-start-color};
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
+ }
188
203
  }
189
204
  }
190
205
 
@@ -1,15 +1,23 @@
1
1
  @use 'sass:meta';
2
2
 
3
- @mixin df-disable-badge($color, $bg-color, $changeBorder: false) {
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
- @if $changeBorder {
8
- border-color: $color;
9
- }
7
+ border-color: $border-color;
10
8
  &:focus-visible,
11
9
  &:focus,
12
10
  &:focus-within {
13
11
  box-shadow: none;
14
12
  }
15
13
  }
14
+
15
+ @mixin df-badge-sizing($height, $font-size, $padding-inline, $close-btn-width) {
16
+ font-size: $font-size;
17
+ height: $height;
18
+ --#{$prefix}badge-padding-x: #{$padding-inline};
19
+
20
+ button {
21
+ width: $close-btn-width;
22
+ }
23
+ }