@danske/sapphire-angular 1.28.2 → 1.30.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 (80) hide show
  1. package/esm2020/lib/badge/src/badge.component.mjs +4 -4
  2. package/esm2020/lib/button/src/button-group.component.mjs +3 -3
  3. package/esm2020/lib/button/src/button.component.mjs +24 -10
  4. package/esm2020/lib/button/src/icon-button.component.mjs +13 -12
  5. package/esm2020/lib/button/src/toggle-button.component.mjs +15 -7
  6. package/esm2020/lib/checkbox/src/checkbox-group.component.mjs +2 -2
  7. package/esm2020/lib/checkbox/src/checkbox.component.mjs +3 -3
  8. package/esm2020/lib/common/public_api.mjs +3 -1
  9. package/esm2020/lib/common/translate.pipe.mjs +22 -0
  10. package/esm2020/lib/common/translate.service.mjs +29 -0
  11. package/esm2020/lib/contextual-help/public_api.mjs +4 -1
  12. package/esm2020/lib/contextual-help/src/contextual-help.component.mjs +3 -3
  13. package/esm2020/lib/field/src/field.component.mjs +5 -5
  14. package/esm2020/lib/label/i18n/da-DK.json +3 -0
  15. package/esm2020/lib/label/i18n/de-DE.json +3 -0
  16. package/esm2020/lib/label/i18n/en-US.json +3 -0
  17. package/esm2020/lib/label/i18n/fi-FI.json +3 -0
  18. package/esm2020/lib/label/i18n/index.mjs +19 -0
  19. package/esm2020/lib/label/i18n/nb-NO.json +3 -0
  20. package/esm2020/lib/label/i18n/pl-PL.json +3 -0
  21. package/esm2020/lib/label/i18n/sv-SE.json +3 -0
  22. package/esm2020/lib/label/src/label.component.mjs +6 -3
  23. package/esm2020/lib/link/src/link.component.mjs +5 -5
  24. package/esm2020/lib/listbox/src/listbox.component.mjs +3 -3
  25. package/esm2020/lib/menu/src/menu.component.mjs +15 -4
  26. package/esm2020/lib/modal/i18n/da-DK.json +3 -0
  27. package/esm2020/lib/modal/i18n/de-DE.json +3 -0
  28. package/esm2020/lib/modal/i18n/en-US.json +3 -0
  29. package/esm2020/lib/modal/i18n/fi-FI.json +3 -0
  30. package/esm2020/lib/modal/i18n/index.mjs +19 -0
  31. package/esm2020/lib/modal/i18n/nb-NO.json +3 -0
  32. package/esm2020/lib/modal/i18n/pl-PL.json +3 -0
  33. package/esm2020/lib/modal/i18n/sv-SE.json +3 -0
  34. package/esm2020/lib/modal/src/dialog/dialog.component.mjs +7 -7
  35. package/esm2020/lib/modal/src/modal-close-button.directive.mjs +10 -7
  36. package/esm2020/lib/modal/src/panel/inline-panel.component.mjs +2 -2
  37. package/esm2020/lib/modal/src/panel/panel.component.mjs +4 -4
  38. package/esm2020/lib/notification-badge/src/notification-badge.component.mjs +3 -3
  39. package/esm2020/lib/pagination/i18n/da-DK.json +8 -0
  40. package/esm2020/lib/pagination/i18n/de-DE.json +8 -0
  41. package/esm2020/lib/pagination/i18n/en-US.json +8 -0
  42. package/esm2020/lib/pagination/i18n/fi-FI.json +8 -0
  43. package/esm2020/lib/pagination/i18n/index.mjs +19 -0
  44. package/esm2020/lib/pagination/i18n/nb-NO.json +8 -0
  45. package/esm2020/lib/pagination/i18n/pl-PL.json +8 -0
  46. package/esm2020/lib/pagination/i18n/sv-SE.json +8 -0
  47. package/esm2020/lib/pagination/src/pagination.component.mjs +4 -3
  48. package/esm2020/lib/pagination/src/pagination.module.mjs +8 -2
  49. package/esm2020/lib/popover/src/popover.component.mjs +2 -2
  50. package/esm2020/lib/radio/src/radio-group.component.mjs +3 -3
  51. package/esm2020/lib/radio/src/radio.component.mjs +3 -3
  52. package/esm2020/lib/segmented-tabs/src/segmented-tab.component.mjs +2 -2
  53. package/esm2020/lib/segmented-tabs/src/segmented-tabs.component.mjs +3 -3
  54. package/esm2020/lib/select/src/basic-select/basic-select.component.mjs +2 -2
  55. package/esm2020/lib/select/src/select/select.component.mjs +5 -5
  56. package/esm2020/lib/skeleton/src/skeleton.component.mjs +2 -2
  57. package/esm2020/lib/surface/src/surface.component.mjs +4 -4
  58. package/esm2020/lib/switch/src/switch.component.mjs +3 -3
  59. package/esm2020/lib/table/src/table-head-cell.component.mjs +3 -3
  60. package/esm2020/lib/table/src/table.component.mjs +2 -2
  61. package/esm2020/lib/text-field/src/text-field.component.mjs +5 -5
  62. package/esm2020/lib/theme/src/themes.mjs +4 -4
  63. package/esm2020/lib/tooltip/src/tooltip.component.mjs +5 -5
  64. package/esm2020/lib/typography/src/heading.component.mjs +2 -2
  65. package/esm2020/lib/typography/src/paragraph.component.mjs +5 -5
  66. package/fesm2015/danske-sapphire-angular.mjs +398 -125
  67. package/fesm2015/danske-sapphire-angular.mjs.map +1 -1
  68. package/fesm2020/danske-sapphire-angular.mjs +396 -125
  69. package/fesm2020/danske-sapphire-angular.mjs.map +1 -1
  70. package/lib/button/src/button.component.d.ts +1 -0
  71. package/lib/button/src/icon-button.component.d.ts +1 -0
  72. package/lib/common/public_api.d.ts +2 -0
  73. package/lib/common/translate.pipe.d.ts +11 -0
  74. package/lib/common/translate.service.d.ts +10 -0
  75. package/lib/label/i18n/index.d.ts +3 -0
  76. package/lib/modal/i18n/index.d.ts +3 -0
  77. package/lib/modal/src/modal-close-button.directive.d.ts +4 -2
  78. package/lib/pagination/i18n/index.d.ts +3 -0
  79. package/lib/pagination/src/pagination.module.d.ts +6 -5
  80. package/package.json +4 -3
@@ -12,6 +12,7 @@ export declare class ButtonComponent implements AfterContentInit {
12
12
  /**
13
13
  * Applies different styles for a better contrast with the secondary color background.
14
14
  * @default 'primary'
15
+ * @deprecated This will be done automatically.
15
16
  */
16
17
  surface?: 'primary' | 'secondary';
17
18
  size?: 'small' | 'medium' | 'large';
@@ -10,6 +10,7 @@ export declare class IconButtonComponent implements IconSizeProvider, AfterViewI
10
10
  /**
11
11
  * Applies different styles for a better contrast with the secondary color background.
12
12
  * @default 'primary'
13
+ * @deprecated This will be done automatically
13
14
  */
14
15
  surface?: 'primary' | 'secondary';
15
16
  size?: 'extraSmall' | 'small' | 'medium' | 'large';
@@ -2,3 +2,5 @@ export { ScrollMonitorDirective } from './scroll-monitor.directive';
2
2
  export { UseComponentStyles, UseComponentStylesOnHost, ViewEncapsulationProvider, } from './sapphire-view-encapsulation';
3
3
  export { PressedDirective } from './pressed.directive';
4
4
  export { FocusedDirective } from './focused.directive';
5
+ export { TranslateService } from './translate.service';
6
+ export { TranslatePipe } from './translate.pipe';
@@ -0,0 +1,11 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { MessageDictionary, MessageFormatter } from '@internationalized/message';
3
+ import { TranslateService } from './translate.service';
4
+ import * as i0 from "@angular/core";
5
+ export declare class TranslatePipe implements PipeTransform {
6
+ constructor(translate: TranslateService, translations: MessageDictionary);
7
+ formatter: MessageFormatter;
8
+ transform(value: string, vars?: Record<string, any>): string;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<TranslatePipe, never>;
10
+ static ɵpipe: i0.ɵɵPipeDeclaration<TranslatePipe, "t", true>;
11
+ }
@@ -0,0 +1,10 @@
1
+ import { MessageDictionary, MessageFormatter } from '@internationalized/message';
2
+ import * as i0 from "@angular/core";
3
+ export declare class TranslateService {
4
+ private locale;
5
+ constructor(locale: string);
6
+ translate(value: string, translations: MessageDictionary): string;
7
+ stringFormatter(translations: MessageDictionary): MessageFormatter;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<TranslateService, [{ optional: true; }]>;
9
+ static ɵprov: i0.ɵɵInjectableDeclaration<TranslateService>;
10
+ }
@@ -0,0 +1,3 @@
1
+ import { MessageDictionary } from '@internationalized/message';
2
+ declare const translations: MessageDictionary;
3
+ export default translations;
@@ -0,0 +1,3 @@
1
+ import { MessageDictionary } from '@internationalized/message';
2
+ declare const translations: MessageDictionary;
3
+ export default translations;
@@ -1,9 +1,11 @@
1
1
  import { DialogRef } from '@angular/cdk/dialog';
2
+ import { TranslateService } from '../../common/translate.service';
2
3
  import * as i0 from "@angular/core";
3
4
  export declare class ModalCloseButtonDirective {
4
5
  private dialogRef;
5
- constructor(dialogRef: DialogRef | null);
6
+ constructor(t: TranslateService, dialogRef: DialogRef | null);
7
+ dismissLabel: string;
6
8
  close(): void;
7
- static ɵfac: i0.ɵɵFactoryDeclaration<ModalCloseButtonDirective, [{ optional: true; }]>;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModalCloseButtonDirective, [null, { optional: true; }]>;
8
10
  static ɵdir: i0.ɵɵDirectiveDeclaration<ModalCloseButtonDirective, never, never, {}, {}, never, never, true, never>;
9
11
  }
@@ -0,0 +1,3 @@
1
+ import { MessageDictionary } from '@internationalized/message';
2
+ declare const translations: MessageDictionary;
3
+ export default translations;
@@ -1,12 +1,13 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "./pagination.component";
3
3
  import * as i2 from "@angular/common";
4
- import * as i3 from "@angular/cdk/a11y";
5
- import * as i4 from "../../select/src/select/select.module";
6
- import * as i5 from "../../button/src/button.module";
7
- import * as i6 from "../../icon/src/icon.module";
4
+ import * as i3 from "../../common/translate.pipe";
5
+ import * as i4 from "@angular/cdk/a11y";
6
+ import * as i5 from "../../select/src/select/select.module";
7
+ import * as i6 from "../../button/src/button.module";
8
+ import * as i7 from "../../icon/src/icon.module";
8
9
  export declare class SapphirePaginationModule {
9
10
  static ɵfac: i0.ɵɵFactoryDeclaration<SapphirePaginationModule, never>;
10
- static ɵmod: i0.ɵɵNgModuleDeclaration<SapphirePaginationModule, [typeof i1.PaginationComponent], [typeof i2.CommonModule, typeof i3.A11yModule, typeof i4.SapphireSelectModule, typeof i5.SapphireButtonModule, typeof i6.SapphireIconModule], [typeof i1.PaginationComponent]>;
11
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SapphirePaginationModule, [typeof i1.PaginationComponent], [typeof i2.CommonModule, typeof i3.TranslatePipe, typeof i4.A11yModule, typeof i5.SapphireSelectModule, typeof i6.SapphireButtonModule, typeof i7.SapphireIconModule], [typeof i1.PaginationComponent]>;
11
12
  static ɵinj: i0.ɵɵInjectorDeclaration<SapphirePaginationModule>;
12
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danske/sapphire-angular",
3
- "version": "1.28.2",
3
+ "version": "1.30.2",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "description": "The Angular implementation of the Sapphire Design System from Danske Bank A/S",
6
6
  "module": "fesm2015/danske-sapphire-angular.mjs",
@@ -16,10 +16,11 @@
16
16
  "@danske/sapphire-icons": "^1.0.2"
17
17
  },
18
18
  "dependencies": {
19
- "@danske/sapphire-css": "^32.2.1",
19
+ "@danske/sapphire-css": "^34.0.0",
20
+ "@internationalized/message": "^3.1.5",
20
21
  "tslib": "^2.3.0"
21
22
  },
22
- "gitHead": "5e2a8940e35f0f19bb62daa6b4abf5ef3ebf6c00",
23
+ "gitHead": "038080059449e1550c0283e6ee617f11437cbeb6",
23
24
  "es2020": "fesm2020/danske-sapphire-angular.mjs",
24
25
  "esm2020": "esm2020/danske-sapphire-angular.mjs",
25
26
  "fesm2020": "fesm2020/danske-sapphire-angular.mjs",