@danske/sapphire-angular 2.8.0 → 3.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.
- package/esm2020/lib/avatar/public_api.mjs +3 -0
- package/esm2020/lib/avatar/src/avatar.component.mjs +53 -0
- package/esm2020/lib/avatar/src/avatar.module.mjs +16 -0
- package/esm2020/lib/badge/src/badge.component.mjs +11 -7
- package/esm2020/lib/button/src/button-group.component.mjs +3 -3
- package/esm2020/lib/button/src/button-icon.directive.mjs +2 -1
- package/esm2020/lib/button/src/button.component.mjs +19 -6
- package/esm2020/lib/button/src/icon-button.component.mjs +21 -8
- package/esm2020/lib/button/src/toggle-button-required-validator.mjs +2 -1
- package/esm2020/lib/button/src/toggle-button.component.mjs +19 -6
- package/esm2020/lib/checkbox/src/checkbox-group.component.mjs +3 -3
- package/esm2020/lib/checkbox/src/checkbox-required-validator.mjs +2 -1
- package/esm2020/lib/checkbox/src/checkbox.component.mjs +3 -3
- package/esm2020/lib/core.module.mjs +22 -1
- package/esm2020/lib/feedback-message/public_api.mjs +7 -0
- package/esm2020/lib/feedback-message/src/feedback-message.component.mjs +104 -0
- package/esm2020/lib/feedback-message/src/feedback-message.module.mjs +40 -0
- package/esm2020/lib/field/src/field-note.directive.mjs +18 -2
- package/esm2020/lib/field/src/field.component.mjs +33 -15
- package/esm2020/lib/field/src/field.module.mjs +7 -3
- package/esm2020/lib/help-button/src/help-button.component.mjs +15 -12
- package/esm2020/lib/icon/public_api.mjs +2 -1
- package/esm2020/lib/icon/src/icon-size-provider.mjs +1 -1
- package/esm2020/lib/icon/src/icon.component.mjs +30 -18
- package/esm2020/lib/icon/src/icon.module.mjs +4 -2
- package/esm2020/lib/icon/src/iconRegistry.service.mjs +37 -0
- package/esm2020/lib/icon/src/svgSanitizer.mjs +690 -0
- package/esm2020/lib/label/src/label.component.mjs +3 -3
- package/esm2020/lib/link/src/link.component.mjs +3 -8
- package/esm2020/lib/list/src/list.component.mjs +2 -2
- package/esm2020/lib/listbox/src/listbox-item.component.mjs +15 -15
- package/esm2020/lib/listbox/src/listbox.component.mjs +7 -10
- package/esm2020/lib/listbox/src/option-icon.directive.mjs +2 -1
- package/esm2020/lib/listbox/src/option-primary-text.directive.mjs +2 -1
- package/esm2020/lib/listbox/src/option-secondary-text.directive.mjs +2 -1
- package/esm2020/lib/listbox/src/option.component.mjs +2 -1
- package/esm2020/lib/listbox/src/section.directive.mjs +2 -1
- package/esm2020/lib/menu/src/menu-icon.component.mjs +2 -1
- package/esm2020/lib/menu/src/menu-item.component.mjs +4 -4
- package/esm2020/lib/menu/src/menu-primary-text.component.mjs +2 -1
- package/esm2020/lib/menu/src/menu-secondary-text.component.mjs +2 -1
- package/esm2020/lib/menu/src/menu-section.component.mjs +2 -2
- package/esm2020/lib/menu/src/menu-trigger.directive.mjs +2 -1
- package/esm2020/lib/menu/src/menu.component.mjs +8 -13
- package/esm2020/lib/modal/public_api.mjs +2 -1
- package/esm2020/lib/modal/src/dialog/alert-dialog.component.mjs +111 -0
- package/esm2020/lib/modal/src/dialog/confirmation-dialog.component.mjs +2 -2
- package/esm2020/lib/modal/src/dialog/danger-dialog.component.mjs +2 -2
- package/esm2020/lib/modal/src/dialog/dialog-trigger.directive.mjs +2 -1
- package/esm2020/lib/modal/src/dialog/dialog.component.mjs +3 -3
- package/esm2020/lib/modal/src/layout/modal-back-button.directive.mjs +2 -1
- package/esm2020/lib/modal/src/layout/modal-body.component.mjs +2 -1
- package/esm2020/lib/modal/src/layout/modal-close-button.directive.mjs +2 -1
- package/esm2020/lib/modal/src/layout/modal-footer.component.mjs +2 -2
- package/esm2020/lib/modal/src/layout/modal-header.component.mjs +15 -12
- package/esm2020/lib/modal/src/layout/modal-layout.component.mjs +3 -3
- package/esm2020/lib/modal/src/modal-base.component.mjs +2 -1
- package/esm2020/lib/modal/src/modal.module.mjs +27 -2
- package/esm2020/lib/modal/src/panel/panel-trigger.directive.mjs +2 -1
- package/esm2020/lib/modal/src/panel/panel.component.mjs +3 -3
- package/esm2020/lib/notification-badge/src/notification-badge.component.mjs +3 -3
- package/esm2020/lib/pagination/src/page-selection-row.component.mjs +3 -3
- package/esm2020/lib/pagination/src/pagination.component.mjs +16 -13
- package/esm2020/lib/popover/src/popover-close-button.directive.mjs +2 -1
- package/esm2020/lib/popover/src/popover-title.directive.mjs +2 -1
- package/esm2020/lib/popover/src/popover-trigger.directive.mjs +3 -2
- package/esm2020/lib/popover/src/popover.component.mjs +3 -3
- package/esm2020/lib/radio/src/radio-group.component.mjs +3 -3
- package/esm2020/lib/radio/src/radio.component.mjs +3 -3
- package/esm2020/lib/radio/src/segmented/segmented-radio-group.component.mjs +3 -3
- package/esm2020/lib/radio/src/segmented/segmented-radio.component.mjs +2 -2
- package/esm2020/lib/segmented-tabs/src/segmented-tab-content.directive.mjs +2 -1
- package/esm2020/lib/segmented-tabs/src/segmented-tab-label.directive.mjs +2 -1
- package/esm2020/lib/segmented-tabs/src/segmented-tab.component.mjs +3 -3
- package/esm2020/lib/segmented-tabs/src/segmented-tabs.component.mjs +3 -3
- package/esm2020/lib/select/public_api.mjs +2 -2
- package/esm2020/lib/select/src/common/hidden-select.component.mjs +2 -2
- package/esm2020/lib/select/src/select/searchable-select.directive.mjs +2 -1
- package/esm2020/lib/select/src/select/select.component.mjs +25 -20
- package/esm2020/lib/select/src/select/select.module.mjs +10 -10
- package/esm2020/lib/select/src/select/selection-text.directive.mjs +2 -1
- package/esm2020/lib/select/src/select-button/select-button.component.mjs +136 -0
- package/esm2020/lib/skeleton/src/skeleton-block.directive.mjs +2 -1
- package/esm2020/lib/skeleton/src/skeleton-circle.directive.mjs +2 -1
- package/esm2020/lib/skeleton/src/skeleton-text.directive.mjs +2 -1
- package/esm2020/lib/skeleton/src/skeleton.component.mjs +3 -3
- package/esm2020/lib/spinner/public_api.mjs +7 -0
- package/esm2020/lib/spinner/src/spinner.component.mjs +26 -0
- package/esm2020/lib/spinner/src/spinner.module.mjs +18 -0
- package/esm2020/lib/surface/src/surface.component.mjs +5 -3
- package/esm2020/lib/switch/src/switch-required-validator.mjs +2 -1
- package/esm2020/lib/switch/src/switch.component.mjs +3 -3
- package/esm2020/lib/table/src/table-body.directive.mjs +2 -1
- package/esm2020/lib/table/src/table-cell.directive.mjs +2 -1
- package/esm2020/lib/table/src/table-footer.directive.mjs +2 -1
- package/esm2020/lib/table/src/table-head-cell.component.mjs +16 -13
- package/esm2020/lib/table/src/table-head.directive.mjs +2 -1
- package/esm2020/lib/table/src/table-row.directive.mjs +2 -1
- package/esm2020/lib/table/src/table-sort-header.directive.mjs +2 -1
- package/esm2020/lib/table/src/table-sort.directive.mjs +2 -1
- package/esm2020/lib/table/src/table.component.mjs +3 -3
- package/esm2020/lib/table/src/table.directive.mjs +2 -1
- package/esm2020/lib/text-field/src/text-field-input.directive.mjs +2 -1
- package/esm2020/lib/text-field/src/text-field-postfix.directive.mjs +2 -1
- package/esm2020/lib/text-field/src/text-field-prefix.directive.mjs +2 -1
- package/esm2020/lib/text-field/src/text-field-textarea-autosize.directive.mjs +2 -1
- package/esm2020/lib/text-field/src/text-field.component.mjs +3 -3
- package/esm2020/lib/theme/src/themes.mjs +4 -4
- package/esm2020/lib/tooltip/src/tooltip.component.mjs +3 -3
- package/esm2020/lib/typography/public_api.mjs +4 -2
- package/esm2020/lib/typography/src/body.component.mjs +43 -0
- package/esm2020/lib/typography/src/caption.component.mjs +37 -0
- package/esm2020/lib/typography/src/heading.component.mjs +23 -13
- package/esm2020/lib/typography/src/subheading.component.mjs +37 -0
- package/esm2020/lib/typography/src/typography.module.mjs +23 -5
- package/esm2020/public-api.mjs +4 -1
- package/fesm2015/danske-sapphire-angular.mjs +1566 -235
- package/fesm2015/danske-sapphire-angular.mjs.map +1 -1
- package/fesm2020/danske-sapphire-angular.mjs +1566 -234
- package/fesm2020/danske-sapphire-angular.mjs.map +1 -1
- package/lib/avatar/public_api.d.ts +2 -0
- package/lib/avatar/src/avatar.component.d.ts +22 -0
- package/lib/avatar/src/avatar.module.d.ts +7 -0
- package/lib/badge/src/badge.component.d.ts +3 -3
- package/lib/button/src/button.component.d.ts +1 -1
- package/lib/button/src/icon-button.component.d.ts +2 -3
- package/lib/core.module.d.ts +23 -20
- package/lib/feedback-message/public_api.d.ts +2 -0
- package/lib/feedback-message/src/feedback-message.component.d.ts +33 -0
- package/lib/feedback-message/src/feedback-message.module.d.ts +10 -0
- package/lib/field/src/field-note.directive.d.ts +3 -1
- package/lib/field/src/field.component.d.ts +2 -1
- package/lib/field/src/field.module.d.ts +2 -1
- package/lib/help-button/src/help-button.component.d.ts +2 -0
- package/lib/icon/public_api.d.ts +1 -0
- package/lib/icon/src/icon-size-provider.d.ts +1 -1
- package/lib/icon/src/icon.component.d.ts +16 -9
- package/lib/icon/src/iconRegistry.service.d.ts +14 -0
- package/lib/icon/src/svgSanitizer.d.ts +1 -0
- package/lib/link/src/link.component.d.ts +1 -2
- package/lib/listbox/src/listbox-item.component.d.ts +3 -3
- package/lib/listbox/src/listbox.component.d.ts +2 -4
- package/lib/menu/src/menu-item.component.d.ts +1 -1
- package/lib/menu/src/menu.component.d.ts +1 -2
- package/lib/modal/public_api.d.ts +1 -0
- package/lib/modal/src/dialog/alert-dialog.component.d.ts +42 -0
- package/lib/modal/src/layout/modal-header.component.d.ts +2 -0
- package/lib/modal/src/modal.module.d.ts +13 -11
- package/lib/pagination/src/pagination.component.d.ts +2 -0
- package/lib/select/public_api.d.ts +1 -1
- package/lib/select/src/select/select.component.d.ts +3 -2
- package/lib/select/src/select/select.module.d.ts +2 -2
- package/lib/select/src/{basic-select/basic-select.component.d.ts → select-button/select-button.component.d.ts} +12 -11
- package/lib/spinner/public_api.d.ts +2 -0
- package/lib/spinner/src/spinner.component.d.ts +14 -0
- package/lib/spinner/src/spinner.module.d.ts +8 -0
- package/lib/surface/src/surface.component.d.ts +1 -1
- package/lib/table/src/table-head-cell.component.d.ts +3 -2
- package/lib/typography/public_api.d.ts +3 -1
- package/lib/typography/src/body.component.d.ts +16 -0
- package/lib/typography/src/caption.component.d.ts +14 -0
- package/lib/typography/src/heading.component.d.ts +5 -3
- package/lib/typography/src/subheading.component.d.ts +14 -0
- package/lib/typography/src/typography.module.d.ts +5 -3
- package/package.json +9 -8
- package/public-api.d.ts +3 -0
- package/esm2020/lib/select/src/basic-select/basic-select.component.mjs +0 -132
- package/esm2020/lib/typography/src/paragraph.component.mjs +0 -24
- package/lib/typography/src/paragraph.component.d.ts +0 -8
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Injectable, isDevMode } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class IconRegistry {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.icons = new Map();
|
|
6
|
+
}
|
|
7
|
+
registerIcon(icon) {
|
|
8
|
+
if (!this.icons.has(icon.name)) {
|
|
9
|
+
this.icons.set(icon.name, icon.data);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
registerIcons(icons) {
|
|
13
|
+
icons.forEach((icon) => this.registerIcon(icon));
|
|
14
|
+
}
|
|
15
|
+
getSvg(iconName) {
|
|
16
|
+
const svg = this.icons.get(iconName);
|
|
17
|
+
if (svg === undefined) {
|
|
18
|
+
if (isDevMode()) {
|
|
19
|
+
throw new Error(`Icon named "${iconName}" not found. Make sure you register it using the "IconRegistry" service before using it.`);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
// eslint-disable-next-line no-console
|
|
23
|
+
console.error(`Icon named "${iconName}" not found. Make sure you register it before using it.`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return svg;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
IconRegistry.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: IconRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
30
|
+
IconRegistry.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: IconRegistry, providedIn: 'root' });
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: IconRegistry, decorators: [{
|
|
32
|
+
type: Injectable,
|
|
33
|
+
args: [{
|
|
34
|
+
providedIn: 'root',
|
|
35
|
+
}]
|
|
36
|
+
}], ctorParameters: function () { return []; } });
|
|
37
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWNvblJlZ2lzdHJ5LnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbGliL2ljb24vc3JjL2ljb25SZWdpc3RyeS5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsU0FBUyxFQUFFLE1BQU0sZUFBZSxDQUFDOztBQVV0RCxNQUFNLE9BQU8sWUFBWTtJQUN2QjtRQUNFLElBQUksQ0FBQyxLQUFLLEdBQUcsSUFBSSxHQUFHLEVBQUUsQ0FBQztJQUN6QixDQUFDO0lBSUQsWUFBWSxDQUFDLElBQWM7UUFDekIsSUFBSSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsR0FBRyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsRUFBRTtZQUM5QixJQUFJLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxJQUFJLENBQUMsSUFBSSxFQUFFLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQztTQUN0QztJQUNILENBQUM7SUFFRCxhQUFhLENBQUMsS0FBaUI7UUFDN0IsS0FBSyxDQUFDLE9BQU8sQ0FBQyxDQUFDLElBQUksRUFBRSxFQUFFLENBQUMsSUFBSSxDQUFDLFlBQVksQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDO0lBQ25ELENBQUM7SUFFRCxNQUFNLENBQUMsUUFBZ0I7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