@design-factory/design-factory 15.2.3 → 16.0.0

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 (205) hide show
  1. package/README.md +17 -1
  2. package/assets/fonts/amadeus-neue/bold/AmadeusNeue-Bold.ttf +0 -0
  3. package/assets/fonts/amadeus-neue/bold/AmadeusNeue-Bold.woff +0 -0
  4. package/assets/fonts/amadeus-neue/bold/AmadeusNeue-Bold.woff2 +0 -0
  5. package/assets/fonts/amadeus-neue/bold/AmadeusNeue-BoldItalic.ttf +0 -0
  6. package/assets/fonts/amadeus-neue/bold/AmadeusNeue-BoldItalic.woff +0 -0
  7. package/assets/fonts/amadeus-neue/bold/AmadeusNeue-BoldItalic.woff2 +0 -0
  8. package/assets/fonts/amadeus-neue/light/AmadeusNeue-Light.ttf +0 -0
  9. package/assets/fonts/amadeus-neue/light/AmadeusNeue-Light.woff +0 -0
  10. package/assets/fonts/amadeus-neue/light/AmadeusNeue-Light.woff2 +0 -0
  11. package/assets/fonts/amadeus-neue/light/AmadeusNeue-LightItalic.ttf +0 -0
  12. package/assets/fonts/amadeus-neue/light/AmadeusNeue-LightItalic.woff +0 -0
  13. package/assets/fonts/amadeus-neue/light/AmadeusNeue-LightItalic.woff2 +0 -0
  14. package/assets/fonts/amadeus-neue/medium/AmadeusNeue-Medium.ttf +0 -0
  15. package/assets/fonts/amadeus-neue/medium/AmadeusNeue-Medium.woff +0 -0
  16. package/assets/fonts/amadeus-neue/medium/AmadeusNeue-Medium.woff2 +0 -0
  17. package/assets/fonts/amadeus-neue/medium/AmadeusNeue-MediumItalic.ttf +0 -0
  18. package/assets/fonts/amadeus-neue/medium/AmadeusNeue-MediumItalic.woff +0 -0
  19. package/assets/fonts/amadeus-neue/medium/AmadeusNeue-MediumItalic.woff2 +0 -0
  20. package/assets/fonts/amadeus-neue/regular/AmadeusNeue-Regular.ttf +0 -0
  21. package/assets/fonts/amadeus-neue/regular/AmadeusNeue-Regular.woff +0 -0
  22. package/assets/fonts/amadeus-neue/regular/AmadeusNeue-Regular.woff2 +0 -0
  23. package/assets/fonts/amadeus-neue/regular/AmadeusNeue-RegularItalic.ttf +0 -0
  24. package/assets/fonts/amadeus-neue/regular/AmadeusNeue-RegularItalic.woff +0 -0
  25. package/assets/fonts/amadeus-neue/regular/AmadeusNeue-RegularItalic.woff2 +0 -0
  26. package/design-factory-initial-branding.css +1 -0
  27. package/design-factory-initial-branding.scss +1 -0
  28. package/design-factory.css +1 -3
  29. package/design-factory.scss +1 -0
  30. package/esm2022/lib/angular/accessibility/components/skip-links-container/skip-links-container.component.mjs +3 -3
  31. package/esm2022/lib/angular/df.module.mjs +102 -0
  32. package/esm2022/lib/angular/icon/amadeus-icon.mjs +2 -2
  33. package/esm2022/lib/angular/sidenav/sidenavlist.component.mjs +3 -12
  34. package/esm2022/lib/angular/stepper/stepper.component.mjs +65 -0
  35. package/esm2022/lib/angular/stepper/stepper.directive.mjs +174 -0
  36. package/esm2022/lib/angular/stepper/stepper.module.mjs +17 -0
  37. package/esm2022/lib/angular/stepper/stepper.service.mjs +213 -0
  38. package/esm2022/lib/angular/tooltip/truncate/tooltipTruncate.directive.mjs +5 -3
  39. package/esm2022/lib/index.mjs +9 -96
  40. package/fesm2022/design-factory.mjs +1838 -1427
  41. package/fesm2022/design-factory.mjs.map +1 -1
  42. package/lib/angular/df.module.d.ts +26 -0
  43. package/lib/angular/stepper/stepper.component.d.ts +31 -0
  44. package/lib/angular/stepper/stepper.directive.d.ts +37 -0
  45. package/lib/angular/stepper/stepper.module.d.ts +8 -0
  46. package/lib/angular/stepper/stepper.service.d.ts +126 -0
  47. package/lib/angular/tooltip/truncate/tooltipTruncate.directive.d.ts +1 -0
  48. package/lib/index.d.ts +7 -23
  49. package/package.json +23 -4
  50. package/schematics/migrations/15_0_0/remove-ngx-slider/index.js +0 -1
  51. package/schematics/migrations/16_0_0/navbar-logo-dark/index.d.ts +9 -0
  52. package/schematics/migrations/16_0_0/navbar-logo-dark/index.js +43 -0
  53. package/schematics/migrations/16_0_0/revert-to-old-brand/index.d.ts +7 -0
  54. package/schematics/migrations/16_0_0/revert-to-old-brand/index.js +115 -0
  55. package/schematics/migrations/16_0_0/scss-var/files/removed.json +55 -0
  56. package/schematics/migrations/16_0_0/scss-var/files/renames.json +76 -0
  57. package/schematics/migrations/16_0_0/scss-var/index.d.ts +7 -0
  58. package/schematics/migrations/16_0_0/scss-var/index.js +57 -0
  59. package/schematics/migrations/16_0_0/stepper-classes/index.d.ts +13 -0
  60. package/schematics/migrations/16_0_0/stepper-classes/index.js +63 -0
  61. package/schematics/migrations/helpers.js +0 -1
  62. package/schematics/migrations/migration.json +23 -1
  63. package/schematics/migrations/utils/component-resource-collector.d.ts +44 -0
  64. package/schematics/migrations/utils/component-resource-collector.js +166 -0
  65. package/schematics/migrations/utils/project_tsconfig_paths.js +0 -1
  66. package/schematics/migrations/utils/style-updater.d.ts +9 -0
  67. package/schematics/migrations/utils/style-updater.js +38 -0
  68. package/schematics/migrations/utils/template-updater.d.ts +9 -0
  69. package/schematics/migrations/utils/template-updater.js +38 -0
  70. package/schematics/migrations/utils/typescript/compiler_host.js +0 -1
  71. package/schematics/migrations/utils/typescript/decorators.d.ts +22 -0
  72. package/schematics/migrations/utils/typescript/decorators.js +41 -0
  73. package/schematics/migrations/utils/typescript/functions.d.ts +14 -0
  74. package/schematics/migrations/utils/typescript/functions.js +20 -0
  75. package/schematics/migrations/utils/typescript/imports.d.ts +17 -0
  76. package/schematics/migrations/utils/typescript/imports.js +110 -0
  77. package/schematics/migrations/utils/typescript/line-mappings.d.ts +21 -0
  78. package/schematics/migrations/utils/typescript/line-mappings.js +75 -0
  79. package/schematics/migrations/utils/typescript/parse_tsconfig.js +0 -1
  80. package/schematics/migrations/utils/typescript/property-name.d.ts +18 -0
  81. package/schematics/migrations/utils/typescript/property-name.js +27 -0
  82. package/schematics/ng-add/index.js +0 -1
  83. package/schematics/ng-add/schema.js +0 -1
  84. package/styles/scss/_common.root.scss +37 -0
  85. package/styles/scss/_common.scss +3 -9
  86. package/styles/scss/_common.variables.scss +16 -6
  87. package/styles/scss/_variables.scss +0 -1
  88. package/styles/scss/bootstrap/_maps.scss +10 -9
  89. package/styles/scss/bootstrap/_mixins-override.scss +26 -0
  90. package/styles/scss/bootstrap/_variables.scss +927 -267
  91. package/styles/scss/components/accordion/_accordion.scss +31 -14
  92. package/styles/scss/components/accordion/_accordion.variables.scss +5 -5
  93. package/styles/scss/components/alert/_alert.scss +130 -228
  94. package/styles/scss/components/alert/_alert.variables.scss +22 -33
  95. package/styles/scss/components/badge/_badge.scss +130 -118
  96. package/styles/scss/components/badge/_badge.variables.scss +14 -8
  97. package/styles/scss/components/brand-color/_brand-color.mixins.scss +19 -4
  98. package/styles/scss/components/brand-color/_brand-color.scss +4 -6
  99. package/styles/scss/components/brand-color/_brand-color.variables.scss +1 -7
  100. package/styles/scss/components/brand-color/_brand-color_container.scss +28 -0
  101. package/styles/scss/components/breadcrumbs/_breadcrumbs.scss +77 -65
  102. package/styles/scss/components/breadcrumbs/_breadcrumbs.variables.scss +6 -4
  103. package/styles/scss/components/button/_button.scss +120 -55
  104. package/styles/scss/components/button/_button.variables.scss +18 -4
  105. package/styles/scss/components/button/_button_container.scss +9 -45
  106. package/styles/scss/components/card/_card.scss +90 -58
  107. package/styles/scss/components/card/_card.variables.scss +13 -13
  108. package/styles/scss/components/carousel/_carousel.scss +22 -23
  109. package/styles/scss/components/carousel/_carousel.variables.scss +2 -1
  110. package/styles/scss/components/checkbox/_checkbox.scss +14 -8
  111. package/styles/scss/components/checkbox/_checkbox.variables.scss +2 -2
  112. package/styles/scss/components/collapse/_collapse.scss +15 -7
  113. package/styles/scss/components/collapse/_collapse.variables.scss +3 -3
  114. package/styles/scss/components/datepicker/_datepicker.scss +178 -122
  115. package/styles/scss/components/datepicker/_datepicker.variables.scss +22 -15
  116. package/styles/scss/components/dropdown/_dropdown.mixins.scss +4 -4
  117. package/styles/scss/components/dropdown/_dropdown.scss +39 -19
  118. package/styles/scss/components/dropdown/_dropdown.variables.scss +4 -4
  119. package/styles/scss/components/fieldset/_fieldset.scss +4 -2
  120. package/styles/scss/components/fonts/_fonts-family.scss +112 -29
  121. package/styles/scss/components/fonts/_fonts.root.scss +27 -0
  122. package/styles/scss/components/fonts/_fonts.scss +25 -26
  123. package/styles/scss/components/fonts/_fonts.variables.scss +2 -2
  124. package/styles/scss/components/footer/_footer.scss +48 -18
  125. package/styles/scss/components/footer/_footer.variables.scss +4 -2
  126. package/styles/scss/components/form/_form.scss +69 -16
  127. package/styles/scss/components/form/_form.variables.scss +23 -3
  128. package/styles/scss/components/icon/_amadeus-icon.scss +2 -2
  129. package/styles/scss/components/icon/_amadeus-icon.variables.scss +1 -0
  130. package/styles/scss/components/inputs/_inputs.mixin.scss +8 -4
  131. package/styles/scss/components/inputs/_inputs.root.scss +8 -0
  132. package/styles/scss/components/inputs/_inputs.scss +159 -118
  133. package/styles/scss/components/inputs/_inputs.variables.scss +2 -1
  134. package/styles/scss/components/link/_link.mixins.scss +49 -49
  135. package/styles/scss/components/link/_link.scss +84 -22
  136. package/styles/scss/components/link/_link.variables.scss +6 -6
  137. package/styles/scss/components/list/_list.scss +10 -5
  138. package/styles/scss/components/list-group/_list-group.scss +54 -48
  139. package/styles/scss/components/list-group/_list-group.variables.scss +6 -14
  140. package/styles/scss/components/media/_media.scss +17 -9
  141. package/styles/scss/components/media/_media.variables.scss +2 -1
  142. package/styles/scss/components/modal/_modal.scss +88 -39
  143. package/styles/scss/components/modal/_modal.variables.scss +4 -5
  144. package/styles/scss/components/navbar/_navbar.scss +298 -115
  145. package/styles/scss/components/navbar/_navbar.variables.scss +29 -18
  146. package/styles/scss/components/pagination/_pagination.scss +68 -82
  147. package/styles/scss/components/pagination/_pagination.variables.scss +5 -8
  148. package/styles/scss/components/pagination/_pagination_container.scss +3 -0
  149. package/styles/scss/components/popover/_popover.mixin.scss +20 -33
  150. package/styles/scss/components/popover/_popover.scss +25 -7
  151. package/styles/scss/components/popover/_popover_container.scss +123 -74
  152. package/styles/scss/components/progressbar/_progressbar.scss +15 -7
  153. package/styles/scss/components/progressbar/_progressbar.variables.scss +3 -2
  154. package/styles/scss/components/radio/_radio.scss +19 -14
  155. package/styles/scss/components/rating/_rating.scss +41 -22
  156. package/styles/scss/components/rating/_rating.variables.scss +5 -5
  157. package/styles/scss/components/scrollspy/_scrollspy.scss +30 -13
  158. package/styles/scss/components/scrollspy/_scrollspy.variables.scss +2 -1
  159. package/styles/scss/components/select/_select.scss +232 -166
  160. package/styles/scss/components/select/_select.variables.scss +15 -15
  161. package/styles/scss/components/separator/_separator.scss +2 -1
  162. package/styles/scss/components/sidenav/_sidenav.scss +208 -135
  163. package/styles/scss/components/sidenav/_sidenav.variables.scss +19 -20
  164. package/styles/scss/components/skip-links/_skip-links.scss +31 -16
  165. package/styles/scss/components/skip-links/_skip-links.variables.scss +6 -6
  166. package/styles/scss/components/slider/_slider.scss +11 -10
  167. package/styles/scss/components/slider/_slider.variables.scss +8 -8
  168. package/styles/scss/components/speechbubble/_speechbubble.scss +50 -30
  169. package/styles/scss/components/speechbubble/_speechbubble.variables.scss +4 -2
  170. package/styles/scss/components/spinner/_spinner.scss +34 -29
  171. package/styles/scss/components/stepper/_stepper.mixins.scss +111 -151
  172. package/styles/scss/components/stepper/_stepper.scss +163 -69
  173. package/styles/scss/components/stepper/_stepper.variables.scss +23 -17
  174. package/styles/scss/components/table/_advancedtables.scss +50 -31
  175. package/styles/scss/components/table/_table.variables.scss +3 -2
  176. package/styles/scss/components/tabs/_tabs.scss +98 -49
  177. package/styles/scss/components/tabs/_tabs.variables.scss +11 -10
  178. package/styles/scss/components/toast/_toast.scss +136 -68
  179. package/styles/scss/components/toast/_toast.variables.scss +4 -4
  180. package/styles/scss/components/toggle/_toggle.scss +90 -44
  181. package/styles/scss/components/toggle/_toggle.variables.scss +7 -5
  182. package/styles/scss/components/typeahead/_typeahead.scss +18 -8
  183. package/styles/scss/components/typeahead/_typeahead.variables.scss +1 -1
  184. package/styles/scss/df-styles-namespace.scss +8 -11
  185. package/styles/scss/df-styles.scss +6 -3
  186. package/styles/scss/themes/brand2023/_variables.scss +585 -0
  187. package/styles/scss/utilities/_common.utilities.scss +112 -32
  188. package/assets/fonts/amadeus-light/amadeus-light.svg +0 -8658
  189. package/assets/fonts/amadeus-light/amadeus-light.ttf +0 -0
  190. package/assets/fonts/amadeus-light/amadeus-light.woff +0 -0
  191. package/assets/fonts/amadeus-light/amadeus-light.woff2 +0 -0
  192. package/assets/icon-amadeus.svg +0 -1
  193. package/esm2022/lib/angular/utils/html-element-helper.mjs +0 -8
  194. package/esm2022/lib/angular/utils/titleTruncate.directive.mjs +0 -39
  195. package/lib/angular/utils/html-element-helper.d.ts +0 -5
  196. package/lib/angular/utils/titleTruncate.directive.d.ts +0 -16
  197. package/schematics/migrations/15_0_0/remove-ngx-slider/index.js.map +0 -1
  198. package/schematics/migrations/helpers.js.map +0 -1
  199. package/schematics/migrations/utils/project_tsconfig_paths.js.map +0 -1
  200. package/schematics/migrations/utils/typescript/compiler_host.js.map +0 -1
  201. package/schematics/migrations/utils/typescript/parse_tsconfig.js.map +0 -1
  202. package/schematics/ng-add/index.js.map +0 -1
  203. package/schematics/ng-add/schema.js.map +0 -1
  204. package/styles/scss/components/tooltip/_tooltip.scss +0 -3
  205. package/styles/scss/components/tooltip/_tooltip.variables.scss +0 -5
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+ import * as ts from 'typescript';
9
+ /**
10
+ * Unwraps a given expression TypeScript node. Expressions can be wrapped within multiple
11
+ * parentheses. e.g. "(((({exp}))))()". The function should return the TypeScript node
12
+ * referring to the inner expression. e.g "exp".
13
+ */
14
+ export declare function unwrapExpression(node: ts.Expression | ts.ParenthesizedExpression): ts.Expression;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ /**
3
+ * @license
4
+ * Copyright Google LLC All Rights Reserved.
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://angular.io/license
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.unwrapExpression = void 0;
11
+ const ts = require("typescript");
12
+ /**
13
+ * Unwraps a given expression TypeScript node. Expressions can be wrapped within multiple
14
+ * parentheses. e.g. "(((({exp}))))()". The function should return the TypeScript node
15
+ * referring to the inner expression. e.g "exp".
16
+ */
17
+ function unwrapExpression(node) {
18
+ return ts.isParenthesizedExpression(node) ? unwrapExpression(node.expression) : node;
19
+ }
20
+ exports.unwrapExpression = unwrapExpression;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+ import * as ts from 'typescript';
9
+ /** Interface describing a resolved import. */
10
+ export interface Import {
11
+ /** Name of the imported symbol. */
12
+ symbolName: string;
13
+ /** Module name from which the symbol has been imported. */
14
+ moduleName: string;
15
+ }
16
+ /** Resolves the import of the specified identifier. */
17
+ export declare function getImportOfIdentifier(node: ts.Identifier, typeChecker: ts.TypeChecker): Import | null;
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+ /**
3
+ * @license
4
+ * Copyright Google LLC All Rights Reserved.
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://angular.io/license
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.getImportOfIdentifier = void 0;
11
+ const ts = require("typescript");
12
+ /** Resolves the import of the specified identifier. */
13
+ function getImportOfIdentifier(node, typeChecker) {
14
+ // Free standing identifiers which resolve to an import will be handled
15
+ // as direct imports. e.g. "@Component()" where "Component" is an identifier
16
+ // referring to an import specifier.
17
+ const directImport = getSpecificImportOfIdentifier(node, typeChecker);
18
+ if (directImport !== null) {
19
+ return directImport;
20
+ }
21
+ else if (ts.isQualifiedName(node.parent) && node.parent.right === node) {
22
+ // Determines the import of a qualified name. e.g. "let t: core.Component". In that
23
+ // case, the import of the most left identifier will be determined ("core").
24
+ const qualifierRoot = getQualifiedNameRoot(node.parent);
25
+ if (qualifierRoot) {
26
+ const moduleName = getImportOfNamespacedIdentifier(qualifierRoot, typeChecker);
27
+ if (moduleName) {
28
+ return { moduleName, symbolName: node.text };
29
+ }
30
+ }
31
+ }
32
+ else if (ts.isPropertyAccessExpression(node.parent) && node.parent.name === node) {
33
+ // Determines the import of a property expression. e.g. "@core.Component". In that
34
+ // case, the import of the most left identifier will be determined ("core").
35
+ const rootIdentifier = getPropertyAccessRoot(node.parent);
36
+ if (rootIdentifier) {
37
+ const moduleName = getImportOfNamespacedIdentifier(rootIdentifier, typeChecker);
38
+ if (moduleName) {
39
+ return { moduleName, symbolName: node.text };
40
+ }
41
+ }
42
+ }
43
+ return null;
44
+ }
45
+ exports.getImportOfIdentifier = getImportOfIdentifier;
46
+ /**
47
+ * Resolves the import of the specified identifier. Expects the identifier to resolve
48
+ * to a fine-grained import declaration with import specifiers.
49
+ */
50
+ function getSpecificImportOfIdentifier(node, typeChecker) {
51
+ const symbol = typeChecker.getSymbolAtLocation(node);
52
+ if (!symbol || !symbol.declarations || !symbol.declarations.length) {
53
+ return null;
54
+ }
55
+ const declaration = symbol.declarations[0];
56
+ if (!ts.isImportSpecifier(declaration)) {
57
+ return null;
58
+ }
59
+ // Since the declaration is an import specifier, we can walk up three times to get a reference
60
+ // to the import declaration node (NamedImports -> ImportClause -> ImportDeclaration).
61
+ const importDecl = declaration.parent.parent.parent;
62
+ if (!ts.isStringLiteral(importDecl.moduleSpecifier)) {
63
+ return null;
64
+ }
65
+ return {
66
+ moduleName: importDecl.moduleSpecifier.text,
67
+ symbolName: declaration.propertyName ? declaration.propertyName.text : declaration.name.text
68
+ };
69
+ }
70
+ /**
71
+ * Resolves the import of the specified identifier. Expects the identifier to
72
+ * resolve to a namespaced import declaration. e.g. "import * as core from ...".
73
+ */
74
+ function getImportOfNamespacedIdentifier(node, typeChecker) {
75
+ const symbol = typeChecker.getSymbolAtLocation(node);
76
+ if (!symbol || !symbol.declarations || !symbol.declarations.length) {
77
+ return null;
78
+ }
79
+ const declaration = symbol.declarations[0];
80
+ if (!ts.isNamespaceImport(declaration)) {
81
+ return null;
82
+ }
83
+ // Since the declaration is a namespace import, we can walk up three times to get a reference
84
+ // to the import declaration node (NamespaceImport -> ImportClause -> ImportDeclaration).
85
+ const importDecl = declaration.parent.parent;
86
+ if (!ts.isStringLiteral(importDecl.moduleSpecifier)) {
87
+ return null;
88
+ }
89
+ return importDecl.moduleSpecifier.text;
90
+ }
91
+ /**
92
+ * Gets the root identifier of a qualified type chain. For example: "core.GestureConfig"
93
+ * will return the "core" identifier. Allowing us to find the import of "core".
94
+ */
95
+ function getQualifiedNameRoot(name) {
96
+ while (ts.isQualifiedName(name.left)) {
97
+ name = name.left;
98
+ }
99
+ return ts.isIdentifier(name.left) ? name.left : null;
100
+ }
101
+ /**
102
+ * Gets the root identifier of a property access chain. For example: "core.GestureConfig"
103
+ * will return the "core" identifier. Allowing us to find the import of "core".
104
+ */
105
+ function getPropertyAccessRoot(node) {
106
+ while (ts.isPropertyAccessExpression(node.expression)) {
107
+ node = node.expression;
108
+ }
109
+ return ts.isIdentifier(node.expression) ? node.expression : null;
110
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+ export interface LineAndCharacter {
9
+ character: number;
10
+ line: number;
11
+ }
12
+ /** Gets the line and character for the given position from the line starts map. */
13
+ export declare function getLineAndCharacterFromPosition(lineStartsMap: number[], position: number): {
14
+ character: number;
15
+ line: number;
16
+ };
17
+ /**
18
+ * Computes the line start map of the given text. This can be used in order to
19
+ * retrieve the line and character of a given text position index.
20
+ */
21
+ export declare function computeLineStartsMap(text: string): number[];
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ /**
3
+ * @license
4
+ * Copyright Google LLC All Rights Reserved.
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://angular.io/license
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.computeLineStartsMap = exports.getLineAndCharacterFromPosition = void 0;
11
+ /*
12
+ * Line mapping utilities which can be used to retrieve line and character based
13
+ * on an absolute character position in a given file. This functionality is similar
14
+ * to TypeScript's "ts.getLineAndCharacterFromPosition" utility, but we cannot leverage
15
+ * their logic for line mappings as it's internal and we need to generate line mappings
16
+ * for non-TypeScript files such as HTML templates or stylesheets.
17
+ *
18
+ * Line and character can be retrieved by splitting a given source text based on
19
+ * line breaks into line start entries. Later when a specific position is requested,
20
+ * the closest line-start position is determined based on the given position.
21
+ */
22
+ const LF_CHAR = 10;
23
+ const CR_CHAR = 13;
24
+ const LINE_SEP_CHAR = 8232;
25
+ const PARAGRAPH_CHAR = 8233;
26
+ /** Gets the line and character for the given position from the line starts map. */
27
+ function getLineAndCharacterFromPosition(lineStartsMap, position) {
28
+ const lineIndex = findClosestLineStartPosition(lineStartsMap, position);
29
+ return { character: position - lineStartsMap[lineIndex], line: lineIndex };
30
+ }
31
+ exports.getLineAndCharacterFromPosition = getLineAndCharacterFromPosition;
32
+ /**
33
+ * Computes the line start map of the given text. This can be used in order to
34
+ * retrieve the line and character of a given text position index.
35
+ */
36
+ function computeLineStartsMap(text) {
37
+ const result = [0];
38
+ let pos = 0;
39
+ while (pos < text.length) {
40
+ const char = text.charCodeAt(pos++);
41
+ // Handles the "CRLF" line break. In that case we peek the character
42
+ // after the "CR" and check if it is a line feed.
43
+ if (char === CR_CHAR) {
44
+ if (text.charCodeAt(pos) === LF_CHAR) {
45
+ pos++;
46
+ }
47
+ result.push(pos);
48
+ }
49
+ else if (char === LF_CHAR || char === LINE_SEP_CHAR || char === PARAGRAPH_CHAR) {
50
+ result.push(pos);
51
+ }
52
+ }
53
+ result.push(pos);
54
+ return result;
55
+ }
56
+ exports.computeLineStartsMap = computeLineStartsMap;
57
+ /** Finds the closest line start for the given position. */
58
+ function findClosestLineStartPosition(linesMap, position, low = 0, high = linesMap.length - 1) {
59
+ while (low <= high) {
60
+ const pivotIndex = Math.floor((low + high) / 2);
61
+ const pivotEl = linesMap[pivotIndex];
62
+ if (pivotEl === position) {
63
+ return pivotIndex;
64
+ }
65
+ else if (position > pivotEl) {
66
+ low = pivotIndex + 1;
67
+ }
68
+ else {
69
+ high = pivotIndex - 1;
70
+ }
71
+ }
72
+ // In case there was no exact match, return the closest "lower" line index. We also
73
+ // subtract the index by one because want the index of the previous line start.
74
+ return low - 1;
75
+ }
@@ -27,4 +27,3 @@ function parseTsconfigFile(tsconfigPath, basePath) {
27
27
  return ts.parseJsonConfigFileContent(config, parseConfigHost, basePath, {});
28
28
  }
29
29
  exports.parseTsconfigFile = parseTsconfigFile;
30
- //# sourceMappingURL=parse_tsconfig.js.map
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+ import * as ts from 'typescript';
9
+ /** Type that describes a property name with an obtainable text. */
10
+ type PropertyNameWithText = Exclude<ts.PropertyName, ts.ComputedPropertyName>;
11
+ /**
12
+ * Gets the text of the given property name. Returns null if the property
13
+ * name couldn't be determined statically.
14
+ */
15
+ export declare function getPropertyNameText(node: ts.PropertyName): string | null;
16
+ /** Checks whether the given property name has a text. */
17
+ export declare function hasPropertyNameText(node: ts.PropertyName): node is PropertyNameWithText;
18
+ export {};
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ /**
3
+ * @license
4
+ * Copyright Google LLC All Rights Reserved.
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://angular.io/license
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.hasPropertyNameText = exports.getPropertyNameText = void 0;
11
+ const ts = require("typescript");
12
+ /**
13
+ * Gets the text of the given property name. Returns null if the property
14
+ * name couldn't be determined statically.
15
+ */
16
+ function getPropertyNameText(node) {
17
+ if (ts.isIdentifier(node) || ts.isStringLiteralLike(node)) {
18
+ return node.text;
19
+ }
20
+ return null;
21
+ }
22
+ exports.getPropertyNameText = getPropertyNameText;
23
+ /** Checks whether the given property name has a text. */
24
+ function hasPropertyNameText(node) {
25
+ return ts.isStringLiteral(node) || ts.isNumericLiteral(node) || ts.isIdentifier(node);
26
+ }
27
+ exports.hasPropertyNameText = hasPropertyNameText;
@@ -81,4 +81,3 @@ function ngAdd(options) {
81
81
  };
82
82
  }
83
83
  exports.default = ngAdd;
84
- //# sourceMappingURL=index.js.map
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=schema.js.map
@@ -0,0 +1,37 @@
1
+ :root {
2
+ --#{$prefix}disabled-color: #{$df-disabled-color};
3
+ --#{$prefix}disabled-bg-color: #{$gray-100};
4
+ --#{$prefix}focus-outline: #{$df-focus-outline};
5
+ --#{$prefix}disabled-cursor: #{$df-disabled-cursor};
6
+ --#{$prefix}link-hover-text-decoration: #{$df-link-hover-text-decoration};
7
+ --#{$prefix}disabled-opacity: #{$df-disabled-opacity};
8
+ --#{$prefix}box-shadow: #{$df-box-shadow};
9
+ --#{$prefix}focused-box-shadow: #{$df-focused-box-shadow};
10
+ --#{$prefix}font-family: #{$df-font-family};
11
+
12
+ --#{$prefix}dark-primary: #{$dark-primary};
13
+ --#{$prefix}yellow-rgb: #{to-rgb($yellow)};
14
+ --#{$prefix}dark-primary-rgb: #{to-rgb($dark-primary)};
15
+ --#{$prefix}white-color: #{color-contrast($white)};
16
+ --#{$prefix}black-color: #{color-contrast($black)};
17
+
18
+ @each $breakpoint, $value in $grid-breakpoints {
19
+ --#{$prefix}breakpoint-#{$breakpoint}: #{$value};
20
+ }
21
+
22
+ @each $color, $value in $shade-colors {
23
+ --#{$prefix}#{$color}: #{$value};
24
+ }
25
+
26
+ @each $color, $value in $shade-colors-rgb {
27
+ --#{$prefix}#{$color}-rgb: #{$value};
28
+ }
29
+
30
+ @each $color, $value in $shade-colors-text {
31
+ --#{$prefix}#{$color}-color: #{$value};
32
+ }
33
+
34
+ @each $color, $value in $shade-colors-text-rgb {
35
+ --#{$prefix}#{$color}-color-rgb: #{$value};
36
+ }
37
+ }
@@ -13,7 +13,8 @@
13
13
 
14
14
  @each $extension, $ratio in $df-size-ratios {
15
15
  .df-font-#{$extension} {
16
- font-size: $font-size-base * $ratio;
16
+ --#{$prefix}body-font-size: #{$font-size-base * $ratio};
17
+ font-size: var(--#{$prefix}body-font-size);
17
18
  }
18
19
  }
19
20
 
@@ -29,7 +30,7 @@
29
30
  border-radius: $df-focused-border-radius;
30
31
  box-shadow: $df-focused-box-shadow;
31
32
  border: $df-focused-border;
32
- outline: none; //disable default
33
+ outline: var(--#{$prefix}focus-outline); //disable default
33
34
  }
34
35
 
35
36
  @each $degree, $value in $df-degrees {
@@ -48,10 +49,3 @@
48
49
  display: flex;
49
50
  flex-direction: column;
50
51
  }
51
-
52
- // Generate breakpoint CSS variable to be used in media service
53
- :root {
54
- @each $breakpoint, $value in $grid-breakpoints {
55
- --#{$variable-prefix}breakpoint-#{$breakpoint}: #{$value};
56
- }
57
- }
@@ -4,7 +4,7 @@
4
4
 
5
5
  // stylelint-disable-next-line scss/dollar-variable-pattern
6
6
  $font-path: '../../../../assets/fonts' !default;
7
- $df-brand-primary-85: #006cd4 !default; //add, use for hover
7
+ $df-brand-primary-85: #006cd4 !default; // deprecated sass var
8
8
  $df-font-family: Design-Factory-icon !default;
9
9
  $df-font-icon-color: $gray-600 !default;
10
10
  $df-mandatory-indicator-color: $danger !default;
@@ -35,16 +35,26 @@ $df-size-ratios: map.merge(
35
35
 
36
36
  $df-cursor-type: pointer !default;
37
37
  $df-focused-border-radius: $border-radius !default;
38
- $df-focused-box-shadow: $btn-focus-box-shadow !default;
39
- $df-focused-border: $border-width solid $primary !default;
38
+ $df-focused-box-shadow: $input-btn-focus-box-shadow !default; // $input-btn-focus-box-shadow need to be customize for changing the whole box-shadow
39
+ $df-focused-inset-box-shadow: inset 0 0 var(--#{$prefix}box-shadow-blur, $input-btn-focus-blur) var(--#{$prefix}box-shadow-width, $input-btn-focus-width) var(--#{$prefix}box-shadow-color, $input-btn-focus-color) !default; // default $input-btn-focus-box-shadow
40
+ $df-focused-border: $border-width solid shades-css-var("primary") !default;
40
41
  $df-enable-rtl: false !default;
41
42
 
42
43
  // Disabled state
43
- $df-disabled-bg-color: $gray-100 !default;
44
- $df-disabled-color: $gray-300 !default;
44
+ $df-disabled-bg-color: var(--#{$prefix}gray-100) !default;
45
+ $df-disabled-color: var(--#{$prefix}gray-300) !default;
45
46
  $df-disabled-opacity: 1 !default;
46
47
  $df-disabled-cursor: not-allowed !default;
47
- $df-hover-bg-color: $gray-100 !default; // hover on light (white) bg not button
48
+ $df-hover-bg-color: shades-css-var('white', 'bg-hover-color') !default; // hover on light (white) bg not button. Migrate to white color shade ?
49
+ $df-focus-outline: none !default;
50
+
51
+ // TODO propagate the usage of the variables for the link hover text-decoration
52
+ $df-link-hover-text-decoration: none !default;
53
+ // TODO same for visited / disabled / more link / icon in link ?
54
+ // stylelint-disable scss/dollar-variable-pattern
55
+ $shade-colors-rgb: map-loop($shade-colors, to-rgb, "$value") !default;
56
+ $shade-colors-text: map-loop($shade-colors, color-contrast, "$value") !default;
57
+ $shade-colors-text-rgb: map-loop($shade-colors-text, to-rgb, "$value") !default;
48
58
 
49
59
  //Windows High Contrast Mode
50
60
  $df-high-contrast-color: rgba(0, 0, 0, 0) !default;
@@ -38,7 +38,6 @@
38
38
  @import 'components/collapse/collapse.variables';
39
39
  @import 'components/progressbar/progressbar.variables';
40
40
  @import 'components/spinner/spinner.variables';
41
- @import 'components/tooltip/tooltip.variables';
42
41
  @import 'components/rating/rating.variables';
43
42
  @import 'components/list-group/list-group.variables';
44
43
  @import 'components/datepicker/datepicker.variables';
@@ -22,7 +22,7 @@ $utilities-colors: map.merge(
22
22
  // scss-docs-end utilities-colors
23
23
 
24
24
  // scss-docs-start utilities-text-colors
25
- // $utilities-text: map-merge(
25
+ // $utilities-text: map.merge(
26
26
  // $utilities-colors,
27
27
  // (
28
28
  // "black": to-rgb($black),
@@ -34,14 +34,15 @@ $utilities-colors: map.merge(
34
34
  // scss-docs-end utilities-text-colors
35
35
 
36
36
  // scss-docs-start utilities-bg-colors
37
- // $utilities-bg: map-merge(
38
- // $utilities-colors,
39
- // (
40
- // "black": to-rgb($black),
41
- // "white": to-rgb($white),
42
- // "body": to-rgb($body-bg)
43
- // )
44
- // ) !default;
37
+ $utilities-bg: map.merge(
38
+ $utilities-colors,
39
+ (
40
+ "black": to-rgb($black),
41
+ "white": to-rgb($white),
42
+ "body": to-rgb($body-bg),
43
+ "dark-primary": to-rgb($dark-primary),
44
+ )
45
+ ) !default;
45
46
  // $utilities-bg-colors: map-loop($utilities-bg, rgba-css-var, "$key", "bg") !default;
46
47
  // scss-docs-end utilities-bg-colors
47
48
 
@@ -66,4 +66,30 @@
66
66
  border-bottom-right-radius: valid-radius($radius);
67
67
  }
68
68
  }
69
+ }
70
+
71
+ @mixin table-variant($state, $background) {
72
+ .table-#{$state} {
73
+ $text-color: shades-css-var($state, 'bg-color', true);
74
+ $hover-bg-color: shades-css-var($state, 'bg-subtle-color');
75
+ $text-hover-color: shades-css-var($state, 'bg-subtle-color', true);
76
+ $striped-bg-color: shades-css-var($state, 'bg-subtle-hover-color');
77
+ $striped-text-color: shades-css-var($state, 'bg-subtle-hover-color', true);
78
+ $active-bg: shades-css-var($state, 'bg-subtle-active-color');
79
+ $active-text-color: shades-css-var($state, 'bg-subtle-active-color', true);
80
+ $border-color: shades-css-var($state, 'border-color');
81
+
82
+ --#{$prefix}table-color: #{$text-color};
83
+ --#{$prefix}table-bg: #{$background};
84
+ --#{$prefix}table-border-color: #{$border-color};
85
+ --#{$prefix}table-striped-bg: #{$striped-bg-color};
86
+ --#{$prefix}table-striped-color: #{$striped-text-color};
87
+ --#{$prefix}table-active-bg: #{$active-bg};
88
+ --#{$prefix}table-active-color: #{$active-text-color};
89
+ --#{$prefix}table-hover-bg: #{$hover-bg-color};
90
+ --#{$prefix}table-hover-color: #{$text-hover-color};
91
+
92
+ color: var(--#{$prefix}table-color);
93
+ border-color: var(--#{$prefix}table-border-color);
94
+ }
69
95
  }