@danske/sapphire-angular 1.18.1 → 1.19.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/button/src/button-group.component.mjs +34 -4
- package/esm2020/lib/modal/src/dialog/confirmation-dialog.component.mjs +1 -1
- package/esm2020/lib/modal/src/dialog/danger-dialog.component.mjs +1 -1
- package/esm2020/lib/modal/src/dialog/dialog-footer.component.mjs +43 -5
- package/esm2020/lib/modal/src/dialog/dialog.component.mjs +5 -3
- package/esm2020/lib/pagination/src/pagination.component.mjs +1 -1
- package/esm2020/lib/theme/src/themes.mjs +4 -4
- package/fesm2015/danske-sapphire-angular.mjs +85 -15
- package/fesm2015/danske-sapphire-angular.mjs.map +1 -1
- package/fesm2020/danske-sapphire-angular.mjs +84 -15
- package/fesm2020/danske-sapphire-angular.mjs.map +1 -1
- package/lib/button/src/button-group.component.d.ts +14 -1
- package/lib/modal/src/dialog/dialog-footer.component.d.ts +18 -1
- package/lib/modal/src/dialog/dialog.component.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
1
|
+
import { Component, Input, ViewEncapsulation } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
import * as i1 from "@angular/common";
|
|
4
4
|
/**
|
|
@@ -13,11 +13,27 @@ export class ButtonGroupComponent {
|
|
|
13
13
|
* @default "right"
|
|
14
14
|
*/
|
|
15
15
|
this.align = 'right';
|
|
16
|
+
/**
|
|
17
|
+
* Controls stretching of the contents.
|
|
18
|
+
*
|
|
19
|
+
* `none` - the children will not stretch and will respect the alignment set with the align prop.
|
|
20
|
+
*
|
|
21
|
+
* `default` - the children will stretch to take full width. If the children overflow, they will be wrapped vertically.
|
|
22
|
+
*
|
|
23
|
+
* `autoVertical` - same behaviour as `default`, but if there is more than 3 children, they will be wrapped vertically even if they don't overflow.
|
|
24
|
+
*
|
|
25
|
+
* @default "none"
|
|
26
|
+
*/
|
|
27
|
+
this.stretch = 'none';
|
|
16
28
|
/**
|
|
17
29
|
* Spacing between the buttons
|
|
18
30
|
* @default normal
|
|
19
31
|
*/
|
|
20
32
|
this.spacing = 'normal';
|
|
33
|
+
/**
|
|
34
|
+
* @default "horizontal"
|
|
35
|
+
*/
|
|
36
|
+
this.orientation = 'horizontal';
|
|
21
37
|
}
|
|
22
38
|
get iconSpacing() {
|
|
23
39
|
return this.spacing;
|
|
@@ -27,10 +43,10 @@ export class ButtonGroupComponent {
|
|
|
27
43
|
}
|
|
28
44
|
}
|
|
29
45
|
ButtonGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: ButtonGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
30
|
-
ButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: ButtonGroupComponent, selector: "sp-button-group", inputs: { align: "align", iconSpacing: "iconSpacing", spacing: "spacing", orientation: "orientation" }, ngImport: i0, template: "<div\n class=\"sapphire-button-group\"\n [ngClass]=\"'sapphire-button-group--align-' + align\"\n [class.sapphire-button-group--dense]=\"spacing === 'dense'\"\n [class.sapphire-button-group--large]=\"spacing === 'large'\"\n [class.sapphire-button-group--vertical]=\"orientation === 'vertical'\"\n>\n <ng-content></ng-content>\n</div>\n", styles: [".sapphire-button-group{display:flex;gap:var(--sapphire-button-group-size-spacing-m)}.sapphire-button-group--large{gap:var(--sapphire-button-group-size-spacing-l)}.sapphire-button-group--dense{gap:var(--sapphire-button-group-size-spacing-s)}.sapphire-button-group--align-center{justify-content:center}.sapphire-button-group--align-right{justify-content:flex-end}.sapphire-button-group--align-left{justify-content:flex-start}.sapphire-button-group--vertical{flex-direction:column}.sapphire-button-group--vertical.sapphire-button-group--align-center{align-items:center}.sapphire-button-group--vertical.sapphire-button-group--align-right{align-items:flex-end}.sapphire-button-group--vertical.sapphire-button-group--align-left{align-items:flex-start}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
46
|
+
ButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: ButtonGroupComponent, selector: "sp-button-group", inputs: { align: "align", stretch: "stretch", iconSpacing: "iconSpacing", spacing: "spacing", orientation: "orientation" }, ngImport: i0, template: "<div\n class=\"sapphire-button-group\"\n [ngClass]=\"\n stretch !== 'none'\n ? 'sapphire-button-group--stretch'\n : 'sapphire-button-group--align-' + align\n \"\n [class.sapphire-button-group--stretch-auto-vertical]=\"\n stretch === 'autoVertical'\n \"\n [class.sapphire-button-group--dense]=\"spacing === 'dense'\"\n [class.sapphire-button-group--large]=\"spacing === 'large'\"\n [class.sapphire-button-group--vertical]=\"orientation === 'vertical'\"\n>\n <ng-content></ng-content>\n</div>\n", styles: [".sapphire-button-group{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:stretch;gap:var(--sapphire-button-group-size-spacing-m)}.sapphire-button-group--stretch{flex-wrap:wrap-reverse;justify-content:normal;align-items:normal}.sapphire-button-group--stretch>*{min-width:-moz-fit-content!important;min-width:fit-content!important;max-width:100%!important;flex-grow:1!important}.sapphire-button-group--stretch.sapphire-button-group--vertical{flex-direction:column-reverse;flex-wrap:nowrap}.sapphire-button-group--stretch.sapphire-button-group--stretch-auto-vertical.sapphire-button-group:has(> *:nth-child(3)){flex-direction:column-reverse}.sapphire-button-group--large{gap:var(--sapphire-button-group-size-spacing-l)}.sapphire-button-group--dense{gap:var(--sapphire-button-group-size-spacing-s)}.sapphire-button-group--align-center{justify-content:center}.sapphire-button-group--align-right{justify-content:flex-end}.sapphire-button-group--align-left{justify-content:flex-start}.sapphire-button-group--vertical{flex-direction:column}.sapphire-button-group--vertical.sapphire-button-group--align-center{align-items:center}.sapphire-button-group--vertical.sapphire-button-group--align-right{align-items:flex-end}.sapphire-button-group--vertical.sapphire-button-group--align-left{align-items:flex-start}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
31
47
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: ButtonGroupComponent, decorators: [{
|
|
32
48
|
type: Component,
|
|
33
|
-
args: [{ selector: 'sp-button-group', template: "<div\n class=\"sapphire-button-group\"\n [ngClass]=\"'sapphire-button-group--align-' + align\"\n [class.sapphire-button-group--dense]=\"spacing === 'dense'\"\n [class.sapphire-button-group--large]=\"spacing === 'large'\"\n [class.sapphire-button-group--vertical]=\"orientation === 'vertical'\"\n>\n <ng-content></ng-content>\n</div>\n", styles: [".sapphire-button-group{display:flex;gap:var(--sapphire-button-group-size-spacing-m)}.sapphire-button-group--large{gap:var(--sapphire-button-group-size-spacing-l)}.sapphire-button-group--dense{gap:var(--sapphire-button-group-size-spacing-s)}.sapphire-button-group--align-center{justify-content:center}.sapphire-button-group--align-right{justify-content:flex-end}.sapphire-button-group--align-left{justify-content:flex-start}.sapphire-button-group--vertical{flex-direction:column}.sapphire-button-group--vertical.sapphire-button-group--align-center{align-items:center}.sapphire-button-group--vertical.sapphire-button-group--align-right{align-items:flex-end}.sapphire-button-group--vertical.sapphire-button-group--align-left{align-items:flex-start}\n"] }]
|
|
49
|
+
args: [{ selector: 'sp-button-group', encapsulation: ViewEncapsulation.None, template: "<div\n class=\"sapphire-button-group\"\n [ngClass]=\"\n stretch !== 'none'\n ? 'sapphire-button-group--stretch'\n : 'sapphire-button-group--align-' + align\n \"\n [class.sapphire-button-group--stretch-auto-vertical]=\"\n stretch === 'autoVertical'\n \"\n [class.sapphire-button-group--dense]=\"spacing === 'dense'\"\n [class.sapphire-button-group--large]=\"spacing === 'large'\"\n [class.sapphire-button-group--vertical]=\"orientation === 'vertical'\"\n>\n <ng-content></ng-content>\n</div>\n", styles: [".sapphire-button-group{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:stretch;gap:var(--sapphire-button-group-size-spacing-m)}.sapphire-button-group--stretch{flex-wrap:wrap-reverse;justify-content:normal;align-items:normal}.sapphire-button-group--stretch>*{min-width:-moz-fit-content!important;min-width:fit-content!important;max-width:100%!important;flex-grow:1!important}.sapphire-button-group--stretch.sapphire-button-group--vertical{flex-direction:column-reverse;flex-wrap:nowrap}.sapphire-button-group--stretch.sapphire-button-group--stretch-auto-vertical.sapphire-button-group:has(> *:nth-child(3)){flex-direction:column-reverse}.sapphire-button-group--large{gap:var(--sapphire-button-group-size-spacing-l)}.sapphire-button-group--dense{gap:var(--sapphire-button-group-size-spacing-s)}.sapphire-button-group--align-center{justify-content:center}.sapphire-button-group--align-right{justify-content:flex-end}.sapphire-button-group--align-left{justify-content:flex-start}.sapphire-button-group--vertical{flex-direction:column}.sapphire-button-group--vertical.sapphire-button-group--align-center{align-items:center}.sapphire-button-group--vertical.sapphire-button-group--align-right{align-items:flex-end}.sapphire-button-group--vertical.sapphire-button-group--align-left{align-items:flex-start}\n"] }]
|
|
34
50
|
}], propDecorators: {
|
|
35
51
|
/**
|
|
36
52
|
* Alignment of buttons within the group.
|
|
@@ -38,6 +54,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImpor
|
|
|
38
54
|
*/
|
|
39
55
|
align: [{
|
|
40
56
|
type: Input
|
|
57
|
+
}],
|
|
58
|
+
/**
|
|
59
|
+
* Controls stretching of the contents.
|
|
60
|
+
*
|
|
61
|
+
* `none` - the children will not stretch and will respect the alignment set with the align prop.
|
|
62
|
+
*
|
|
63
|
+
* `default` - the children will stretch to take full width. If the children overflow, they will be wrapped vertically.
|
|
64
|
+
*
|
|
65
|
+
* `autoVertical` - same behaviour as `default`, but if there is more than 3 children, they will be wrapped vertically even if they don't overflow.
|
|
66
|
+
*
|
|
67
|
+
* @default "none"
|
|
68
|
+
*/
|
|
69
|
+
stretch: [{
|
|
70
|
+
type: Input
|
|
41
71
|
}], iconSpacing: [{
|
|
42
72
|
type: Input
|
|
43
73
|
}],
|
|
@@ -54,4 +84,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImpor
|
|
|
54
84
|
orientation: [{
|
|
55
85
|
type: Input
|
|
56
86
|
}] } });
|
|
57
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
87
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uLWdyb3VwLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9saWIvYnV0dG9uL3NyYy9idXR0b24tZ3JvdXAuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vc3JjL2xpYi9idXR0b24vc3JjL2J1dHRvbi1ncm91cC5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGVBQWUsQ0FBQzs7O0FBSXBFOzs7O0dBSUc7QUFPSCxNQUFNLE9BQU8sb0JBQW9CO0lBTmpDO1FBUUU7OztXQUdHO1FBQ0gsVUFBSyxHQUFnQyxPQUFPLENBQUM7UUFHN0M7Ozs7Ozs7Ozs7V0FVRztRQUNILFlBQU8sR0FBNEIsTUFBTSxDQUFDO1FBaUIxQzs7O1dBR0c7UUFDSCxZQUFPLEdBQWlDLFFBQVEsQ0FBQztRQUdqRDs7V0FFRztRQUNILGdCQUFXLEdBQStCLFlBQVksQ0FBQztLQUN4RDtJQTFCQyxJQU9JLFdBQVc7UUFDYixPQUFPLElBQUksQ0FBQyxPQUFPLENBQUM7SUFDdEIsQ0FBQztJQUNELElBQUksV0FBVyxDQUFDLEtBQXNCO1FBQ3BDLElBQUksQ0FBQyxPQUFPLEdBQUcsS0FBSyxD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F1dG9WZXJ0aWNhbCdcbiAgXCJcbiAgW2NsYXNzLnNhcHBoaXJlLWJ1dHRvbi1ncm91cC0tZGVuc2VdPVwic3BhY2luZyA9PT0gJ2RlbnNlJ1wiXG4gIFtjbGFzcy5zYXBwaGlyZS1idXR0b24tZ3JvdXAtLWxhcmdlXT1cInNwYWNpbmcgPT09ICdsYXJnZSdcIlxuICBbY2xhc3Muc2FwcGhpcmUtYnV0dG9uLWdyb3VwLS12ZXJ0aWNhbF09XCJvcmllbnRhdGlvbiA9PT0gJ3ZlcnRpY2FsJ1wiXG4+XG4gIDxuZy1jb250ZW50PjwvbmctY29udGVudD5cbjwvZGl2PlxuIl19
|
|
@@ -40,7 +40,7 @@ export class ConfirmationDialogComponent {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
ConfirmationDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: ConfirmationDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
43
|
-
ConfirmationDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: ConfirmationDialogComponent, selector: "sp-confirmation-dialog", inputs: { heading: "heading", primaryActionLabel: "primaryActionLabel", secondaryActionLabel: "secondaryActionLabel" }, outputs: { primaryActionSelected: "primaryActionSelected", secondaryActionSelected: "secondaryActionSelected" }, viewQueries: [{ propertyName: "dialog", first: true, predicate: DialogComponent, descendants: true }], exportAs: ["spConfirmationDialog"], ngImport: i0, template: "<sp-dialog role=\"alertdialog\">\n <sp-dialog-header *ngIf=\"heading\">{{ heading }}</sp-dialog-header>\n <sp-dialog-content><ng-content></ng-content></sp-dialog-content>\n <sp-dialog-footer>\n <button\n sp-button\n variant=\"secondary\"\n (click)=\"dialog && secondaryActionSelected.emit({dialog})\"\n >\n {{ secondaryActionLabel }}\n </button>\n <button\n sp-button\n variant=\"primary\"\n (click)=\"dialog && primaryActionSelected.emit({dialog})\"\n >\n {{ primaryActionLabel }}\n </button>\n </sp-dialog-footer>\n</sp-dialog>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.ButtonComponent, selector: "button[sp-button], a[sp-button]", inputs: ["variant", "appearance", "surface", "size", "disabled", "iconAlign", "type"] }, { kind: "component", type: i3.DialogComponent, selector: "sp-dialog", inputs: ["size"] }, { kind: "component", type: i4.DialogHeaderComponent, selector: "sp-dialog-header" }, { kind: "directive", type: i5.DialogContentDirective, selector: "sp-dialog-content, [sp-dialog-content]" }, { kind: "component", type: i6.DialogFooterComponent, selector: "sp-dialog-footer" }] });
|
|
43
|
+
ConfirmationDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: ConfirmationDialogComponent, selector: "sp-confirmation-dialog", inputs: { heading: "heading", primaryActionLabel: "primaryActionLabel", secondaryActionLabel: "secondaryActionLabel" }, outputs: { primaryActionSelected: "primaryActionSelected", secondaryActionSelected: "secondaryActionSelected" }, viewQueries: [{ propertyName: "dialog", first: true, predicate: DialogComponent, descendants: true }], exportAs: ["spConfirmationDialog"], ngImport: i0, template: "<sp-dialog role=\"alertdialog\">\n <sp-dialog-header *ngIf=\"heading\">{{ heading }}</sp-dialog-header>\n <sp-dialog-content><ng-content></ng-content></sp-dialog-content>\n <sp-dialog-footer>\n <button\n sp-button\n variant=\"secondary\"\n (click)=\"dialog && secondaryActionSelected.emit({dialog})\"\n >\n {{ secondaryActionLabel }}\n </button>\n <button\n sp-button\n variant=\"primary\"\n (click)=\"dialog && primaryActionSelected.emit({dialog})\"\n >\n {{ primaryActionLabel }}\n </button>\n </sp-dialog-footer>\n</sp-dialog>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.ButtonComponent, selector: "button[sp-button], a[sp-button]", inputs: ["variant", "appearance", "surface", "size", "disabled", "iconAlign", "type"] }, { kind: "component", type: i3.DialogComponent, selector: "sp-dialog", inputs: ["size"] }, { kind: "component", type: i4.DialogHeaderComponent, selector: "sp-dialog-header" }, { kind: "directive", type: i5.DialogContentDirective, selector: "sp-dialog-content, [sp-dialog-content]" }, { kind: "component", type: i6.DialogFooterComponent, selector: "sp-dialog-footer", inputs: ["stretch", "orientation"] }] });
|
|
44
44
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: ConfirmationDialogComponent, decorators: [{
|
|
45
45
|
type: Component,
|
|
46
46
|
args: [{ selector: 'sp-confirmation-dialog', exportAs: 'spConfirmationDialog', template: "<sp-dialog role=\"alertdialog\">\n <sp-dialog-header *ngIf=\"heading\">{{ heading }}</sp-dialog-header>\n <sp-dialog-content><ng-content></ng-content></sp-dialog-content>\n <sp-dialog-footer>\n <button\n sp-button\n variant=\"secondary\"\n (click)=\"dialog && secondaryActionSelected.emit({dialog})\"\n >\n {{ secondaryActionLabel }}\n </button>\n <button\n sp-button\n variant=\"primary\"\n (click)=\"dialog && primaryActionSelected.emit({dialog})\"\n >\n {{ primaryActionLabel }}\n </button>\n </sp-dialog-footer>\n</sp-dialog>\n" }]
|
|
@@ -41,7 +41,7 @@ export class DangerDialogComponent {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
DangerDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: DangerDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
44
|
-
DangerDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: DangerDialogComponent, selector: "sp-danger-dialog", inputs: { heading: "heading", primaryActionLabel: "primaryActionLabel", secondaryActionLabel: "secondaryActionLabel" }, outputs: { primaryActionSelected: "primaryActionSelected", secondaryActionSelected: "secondaryActionSelected" }, viewQueries: [{ propertyName: "dialog", first: true, predicate: DialogComponent, descendants: true }], exportAs: ["spDangerDialog"], ngImport: i0, template: "<sp-dialog role=\"alertdialog\">\n <sp-dialog-header *ngIf=\"heading\">{{ heading }}</sp-dialog-header>\n <sp-dialog-content><ng-content></ng-content></sp-dialog-content>\n <sp-dialog-footer>\n <button\n sp-button\n variant=\"secondary\"\n (click)=\"dialog && secondaryActionSelected.emit({dialog})\"\n >\n {{ secondaryActionLabel }}\n </button>\n <button\n sp-button\n variant=\"dangerSecondary\"\n (click)=\"dialog && primaryActionSelected.emit({dialog})\"\n >\n {{ primaryActionLabel }}\n </button>\n </sp-dialog-footer>\n</sp-dialog>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.ButtonComponent, selector: "button[sp-button], a[sp-button]", inputs: ["variant", "appearance", "surface", "size", "disabled", "iconAlign", "type"] }, { kind: "component", type: i3.DialogComponent, selector: "sp-dialog", inputs: ["size"] }, { kind: "component", type: i4.DialogHeaderComponent, selector: "sp-dialog-header" }, { kind: "directive", type: i5.DialogContentDirective, selector: "sp-dialog-content, [sp-dialog-content]" }, { kind: "component", type: i6.DialogFooterComponent, selector: "sp-dialog-footer" }] });
|
|
44
|
+
DangerDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: DangerDialogComponent, selector: "sp-danger-dialog", inputs: { heading: "heading", primaryActionLabel: "primaryActionLabel", secondaryActionLabel: "secondaryActionLabel" }, outputs: { primaryActionSelected: "primaryActionSelected", secondaryActionSelected: "secondaryActionSelected" }, viewQueries: [{ propertyName: "dialog", first: true, predicate: DialogComponent, descendants: true }], exportAs: ["spDangerDialog"], ngImport: i0, template: "<sp-dialog role=\"alertdialog\">\n <sp-dialog-header *ngIf=\"heading\">{{ heading }}</sp-dialog-header>\n <sp-dialog-content><ng-content></ng-content></sp-dialog-content>\n <sp-dialog-footer>\n <button\n sp-button\n variant=\"secondary\"\n (click)=\"dialog && secondaryActionSelected.emit({dialog})\"\n >\n {{ secondaryActionLabel }}\n </button>\n <button\n sp-button\n variant=\"dangerSecondary\"\n (click)=\"dialog && primaryActionSelected.emit({dialog})\"\n >\n {{ primaryActionLabel }}\n </button>\n </sp-dialog-footer>\n</sp-dialog>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.ButtonComponent, selector: "button[sp-button], a[sp-button]", inputs: ["variant", "appearance", "surface", "size", "disabled", "iconAlign", "type"] }, { kind: "component", type: i3.DialogComponent, selector: "sp-dialog", inputs: ["size"] }, { kind: "component", type: i4.DialogHeaderComponent, selector: "sp-dialog-header" }, { kind: "directive", type: i5.DialogContentDirective, selector: "sp-dialog-content, [sp-dialog-content]" }, { kind: "component", type: i6.DialogFooterComponent, selector: "sp-dialog-footer", inputs: ["stretch", "orientation"] }] });
|
|
45
45
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: DangerDialogComponent, decorators: [{
|
|
46
46
|
type: Component,
|
|
47
47
|
args: [{ selector: 'sp-danger-dialog', exportAs: 'spDangerDialog', template: "<sp-dialog role=\"alertdialog\">\n <sp-dialog-header *ngIf=\"heading\">{{ heading }}</sp-dialog-header>\n <sp-dialog-content><ng-content></ng-content></sp-dialog-content>\n <sp-dialog-footer>\n <button\n sp-button\n variant=\"secondary\"\n (click)=\"dialog && secondaryActionSelected.emit({dialog})\"\n >\n {{ secondaryActionLabel }}\n </button>\n <button\n sp-button\n variant=\"dangerSecondary\"\n (click)=\"dialog && primaryActionSelected.emit({dialog})\"\n >\n {{ primaryActionLabel }}\n </button>\n </sp-dialog-footer>\n</sp-dialog>\n" }]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, Directive } from '@angular/core';
|
|
1
|
+
import { Component, Directive, Input } from '@angular/core';
|
|
2
2
|
import { UseComponentStyles } from '../../../common/sapphire-view-encapsulation';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
import * as i1 from "../../../common/sapphire-view-encapsulation";
|
|
@@ -29,15 +29,53 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImpor
|
|
|
29
29
|
* For a custom footer, use {@link DialogFooterDirective spDialogFooter attribute directive}.
|
|
30
30
|
*/
|
|
31
31
|
export class DialogFooterComponent {
|
|
32
|
+
constructor() {
|
|
33
|
+
/**
|
|
34
|
+
* Controls stretching of the contents.
|
|
35
|
+
*
|
|
36
|
+
* `none` - the children will not stretch and will respect the alignment set with the align prop.
|
|
37
|
+
*
|
|
38
|
+
* `default` - the children will stretch to take full width. If the children overflow, they will be wrapped vertically.
|
|
39
|
+
*
|
|
40
|
+
* `autoVertical` - same behaviour as `default`, but if there is more than 3 children, they will be wrapped vertically even if they don't overflow.
|
|
41
|
+
*
|
|
42
|
+
* @default "none"
|
|
43
|
+
*/
|
|
44
|
+
this.stretch = 'none';
|
|
45
|
+
/**
|
|
46
|
+
* @default "horizontal"
|
|
47
|
+
*/
|
|
48
|
+
this.orientation = 'horizontal';
|
|
49
|
+
}
|
|
32
50
|
}
|
|
33
51
|
DialogFooterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: DialogFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
34
|
-
DialogFooterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: DialogFooterComponent, selector: "sp-dialog-footer", hostDirectives: [{ directive: DialogFooterDirective }], ngImport: i0, template: '<sp-button-group
|
|
52
|
+
DialogFooterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: DialogFooterComponent, selector: "sp-dialog-footer", inputs: { stretch: "stretch", orientation: "orientation" }, hostDirectives: [{ directive: DialogFooterDirective }], ngImport: i0, template: '<sp-button-group [stretch]="stretch" [orientation]="orientation"><ng-content></ng-content></sp-button-group>', isInline: true, dependencies: [{ kind: "component", type: i2.ButtonGroupComponent, selector: "sp-button-group", inputs: ["align", "stretch", "iconSpacing", "spacing", "orientation"] }] });
|
|
35
53
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: DialogFooterComponent, decorators: [{
|
|
36
54
|
type: Component,
|
|
37
55
|
args: [{
|
|
38
56
|
selector: 'sp-dialog-footer',
|
|
39
|
-
template: '<sp-button-group
|
|
57
|
+
template: '<sp-button-group [stretch]="stretch" [orientation]="orientation"><ng-content></ng-content></sp-button-group>',
|
|
40
58
|
hostDirectives: [DialogFooterDirective],
|
|
41
59
|
}]
|
|
42
|
-
}]
|
|
43
|
-
|
|
60
|
+
}], propDecorators: {
|
|
61
|
+
/**
|
|
62
|
+
* Controls stretching of the contents.
|
|
63
|
+
*
|
|
64
|
+
* `none` - the children will not stretch and will respect the alignment set with the align prop.
|
|
65
|
+
*
|
|
66
|
+
* `default` - the children will stretch to take full width. If the children overflow, they will be wrapped vertically.
|
|
67
|
+
*
|
|
68
|
+
* `autoVertical` - same behaviour as `default`, but if there is more than 3 children, they will be wrapped vertically even if they don't overflow.
|
|
69
|
+
*
|
|
70
|
+
* @default "none"
|
|
71
|
+
*/
|
|
72
|
+
stretch: [{
|
|
73
|
+
type: Input
|
|
74
|
+
}],
|
|
75
|
+
/**
|
|
76
|
+
* @default "horizontal"
|
|
77
|
+
*/
|
|
78
|
+
orientation: [{
|
|
79
|
+
type: Input
|
|
80
|
+
}] } });
|
|
81
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlhbG9nLWZvb3Rlci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbGliL21vZGFsL3NyYy9kaWFsb2cvZGlhbG9nLWZ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kb24ndCBvdmVyZmxvdy5cbiAgICpcbiAgICogQGRlZmF1bHQgXCJub25lXCJcbiAgICovXG4gIHN0cmV0Y2g/OiBCdXR0b25Hcm91cFN0cmV0Y2hUeXBlID0gJ25vbmUnO1xuXG4gIEBJbnB1dCgpXG4gIC8qKlxuICAgKiBAZGVmYXVsdCBcImhvcml6b250YWxcIlxuICAgKi9cbiAgb3JpZW50YXRpb24/OiAndmVydGljYWwnIHwgJ2hvcml6b250YWwnID0gJ2hvcml6b250YWwnO1xufVxuIl19
|
|
@@ -7,6 +7,7 @@ import { UseComponentStylesOnHost } from '../../../common/sapphire-view-encapsul
|
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
import * as i1 from "@angular/cdk/dialog";
|
|
9
9
|
import * as i2 from "../../../common/sapphire-view-encapsulation";
|
|
10
|
+
import * as i3 from "@angular/common";
|
|
10
11
|
/**
|
|
11
12
|
* Dialogs focus the user's attention exclusively on one task or piece of
|
|
12
13
|
* information via a dialog box that sits on top of the page content.
|
|
@@ -35,17 +36,18 @@ export class DialogComponent extends ModalBaseComponent {
|
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
38
|
DialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: DialogComponent, deps: [{ token: i1.DialogRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
38
|
-
DialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: DialogComponent, selector: "sp-dialog", inputs: { size: "size" }, host: { properties: { "class.sapphire-dialog--small": "size === 'small'", "class.sapphire-dialog--medium": "size === 'medium'", "class.sapphire-dialog--large": "size === 'large'", "class.sapphire-dialog--passive": "type === 'passive'", "class.sapphire-dialog--exiting": "dialogRef.closing" }, classAttribute: "sapphire-dialog" }, queries: [{ propertyName: "footer", first: true, predicate: DialogFooterDirective, descendants: true }, { propertyName: "header", first: true, predicate: DialogHeaderDirective, descendants: true }, { propertyName: "content", first: true, predicate: DialogContentDirective, descendants: true }], usesInheritance: true, hostDirectives: [{ directive: i2.UseComponentStylesOnHost }], ngImport: i0, template: "<ng-content select=\"sp-dialog-header, [spDialogHeader]\"></ng-content>\n<ng-content select=\"sp-dialog-content, [sp-dialog-content]\"></ng-content>\n<ng-content select=\"sp-dialog-footer, [spDialogFooter]\"></ng-content>\n", styles: ["@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-out{0%{opacity:1}to{opacity:0}}.sapphire-dialog{border-radius:var(--sapphire-dialog-size-radius);background-color:var(--sapphire-dialog-color-background);font-family:var(--sapphire-dialog-font-name);color:var(--sapphire-dialog-color-content);box-sizing:border-box;overflow:hidden;max-height:90vh;max-width:90vw;display:flex;flex-direction:column;outline:none;animation-name:fade-in;animation-duration:var(--sapphire-dialog-time-transition);animation-timing-function:ease-in-out;animation-fill-mode:forwards}.sapphire-dialog--exiting{animation-name:fade-out}.sapphire-dialog--small{width:var(--sapphire-dialog-size-width-s)}.sapphire-dialog--medium{width:var(--sapphire-dialog-size-width-m)}.sapphire-dialog--large{width:var(--sapphire-dialog-size-width-l)}.sapphire-dialog-header{padding:var(--sapphire-dialog-size-spacing-header-top-default) var(--sapphire-dialog-size-spacing-header-right-default) var(--sapphire-dialog-size-spacing-header-bottom-default) var(--sapphire-dialog-size-spacing-header-left-default);display:flex;justify-content:space-between;align-items:center}.sapphire-dialog--passive .sapphire-dialog-header{padding:var(--sapphire-dialog-size-spacing-header-top-passive) var(--sapphire-dialog-size-spacing-header-right-passive) var(--sapphire-dialog-size-spacing-header-bottom-passive) var(--sapphire-dialog-size-spacing-header-left-passive)}.sapphire-dialog-close-button-container{align-self:flex-start}.sapphire-dialog-body{padding:var(--sapphire-dialog-size-spacing-body-top-default) var(--sapphire-dialog-size-spacing-body-right-default) var(--sapphire-dialog-size-spacing-body-bottom-default) var(--sapphire-dialog-size-spacing-body-left-default);overflow-y:auto;overflow-x:hidden}.sapphire-dialog--passive .sapphire-dialog-body{padding:var(--sapphire-dialog-size-spacing-body-top-passive) var(--sapphire-dialog-size-spacing-body-right-passive) var(--sapphire-dialog-size-spacing-body-bottom-passive) var(--sapphire-dialog-size-spacing-body-left-passive)}.sapphire-dialog-footer{padding:var(--sapphire-dialog-size-spacing-footer-top-default) var(--sapphire-dialog-size-spacing-footer-right-default) var(--sapphire-dialog-size-spacing-footer-bottom-default) var(--sapphire-dialog-size-spacing-footer-left-default)}.sapphire-dialog-header+.sapphire-dialog-body{border-top:var(--sapphire-dialog-size-border) solid transparent}.sapphire-dialog-header+.sapphire-dialog-body.sapphire-dialog-body--scrolled{border-top:var(--sapphire-dialog-size-border) solid var(--sapphire-dialog-color-separator)}.sapphire-dialog-body+.sapphire-dialog-footer{border-top:var(--sapphire-dialog-size-border) solid transparent}.sapphire-dialog-body.sapphire-dialog-body--scrollable+.sapphire-dialog-footer{border-top:var(--sapphire-dialog-size-border) solid var(--sapphire-dialog-color-separator)}.sapphire-dialog:has(.sapphire-dialog-body--scrollable)>.sapphire-dialog-footer{padding:var(--sapphire-dialog-size-spacing-footer-top-scrollable) var(--sapphire-dialog-size-spacing-footer-right-scrollable) var(--sapphire-dialog-size-spacing-footer-bottom-scrollable) var(--sapphire-dialog-size-spacing-footer-left-scrollable)}\n"] });
|
|
39
|
+
DialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: DialogComponent, selector: "sp-dialog", inputs: { size: "size" }, host: { properties: { "class.sapphire-dialog--extra-small": "size === 'extra-small'", "class.sapphire-dialog--small": "size === 'small'", "class.sapphire-dialog--medium": "size === 'medium'", "class.sapphire-dialog--large": "size === 'large'", "class.sapphire-dialog--passive": "type === 'passive'", "class.sapphire-dialog--exiting": "dialogRef.closing" }, classAttribute: "sapphire-dialog" }, queries: [{ propertyName: "footer", first: true, predicate: DialogFooterDirective, descendants: true }, { propertyName: "header", first: true, predicate: DialogHeaderDirective, descendants: true }, { propertyName: "content", first: true, predicate: DialogContentDirective, descendants: true }], usesInheritance: true, hostDirectives: [{ directive: i2.UseComponentStylesOnHost }], ngImport: i0, template: "<div #headerTemplate>\n <ng-content select=\"sp-dialog-header, [spDialogHeader]\"></ng-content>\n</div>\n\n<!--If header is not provided as <sp-dialog-header>, but as an another div with spDialogHeader,-->\n<!-- we still need the styling of the header to be rendered, so the dialog looks as expected in the spec.-->\n<ng-container *ngIf=\"!headerTemplate.children.length\">\n <div class=\"sapphire-dialog-header\"></div>\n</ng-container>\n\n<ng-content select=\"sp-dialog-content, [sp-dialog-content]\"></ng-content>\n<ng-content select=\"sp-dialog-footer, [spDialogFooter]\"></ng-content>\n", styles: ["@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-out{0%{opacity:1}to{opacity:0}}.sapphire-dialog{border-radius:var(--sapphire-dialog-size-radius);background-color:var(--sapphire-dialog-color-background);font-family:var(--sapphire-dialog-font-name);color:var(--sapphire-dialog-color-content);box-sizing:border-box;overflow:hidden;max-height:90vh;max-width:90vw;display:flex;flex-direction:column;outline:none;animation-name:fade-in;animation-duration:var(--sapphire-dialog-time-transition);animation-timing-function:ease-in-out;animation-fill-mode:forwards}.sapphire-dialog--exiting{animation-name:fade-out}.sapphire-dialog--extra-small{width:var(--sapphire-dialog-size-width-xs)}.sapphire-dialog--small{width:var(--sapphire-dialog-size-width-s)}.sapphire-dialog--medium{width:var(--sapphire-dialog-size-width-m)}.sapphire-dialog--large{width:var(--sapphire-dialog-size-width-l)}.sapphire-dialog-header{padding:var(--sapphire-dialog-size-spacing-header-top-default) var(--sapphire-dialog-size-spacing-header-right-default) var(--sapphire-dialog-size-spacing-header-bottom-default) var(--sapphire-dialog-size-spacing-header-left-default);display:flex;justify-content:space-between;align-items:center}.sapphire-dialog--passive .sapphire-dialog-header{padding:var(--sapphire-dialog-size-spacing-header-top-passive) var(--sapphire-dialog-size-spacing-header-right-passive) var(--sapphire-dialog-size-spacing-header-bottom-passive) var(--sapphire-dialog-size-spacing-header-left-passive)}.sapphire-dialog-close-button-container{align-self:flex-start}.sapphire-dialog-body{padding:var(--sapphire-dialog-size-spacing-body-top-default) var(--sapphire-dialog-size-spacing-body-right-default) var(--sapphire-dialog-size-spacing-body-bottom-default) var(--sapphire-dialog-size-spacing-body-left-default);overflow-y:auto;overflow-x:hidden}.sapphire-dialog--passive .sapphire-dialog-body{padding:var(--sapphire-dialog-size-spacing-body-top-passive) var(--sapphire-dialog-size-spacing-body-right-passive) var(--sapphire-dialog-size-spacing-body-bottom-passive) var(--sapphire-dialog-size-spacing-body-left-passive)}.sapphire-dialog-footer{padding:var(--sapphire-dialog-size-spacing-footer-top-default) var(--sapphire-dialog-size-spacing-footer-right-default) var(--sapphire-dialog-size-spacing-footer-bottom-default) var(--sapphire-dialog-size-spacing-footer-left-default)}.sapphire-dialog-header+.sapphire-dialog-body{border-top:var(--sapphire-dialog-size-border) solid transparent}.sapphire-dialog-header+.sapphire-dialog-body.sapphire-dialog-body--scrolled{border-top:var(--sapphire-dialog-size-border) solid var(--sapphire-dialog-color-separator)}.sapphire-dialog-body+.sapphire-dialog-footer{border-top:var(--sapphire-dialog-size-border) solid transparent}.sapphire-dialog-body.sapphire-dialog-body--scrollable+.sapphire-dialog-footer{border-top:var(--sapphire-dialog-size-border) solid var(--sapphire-dialog-color-separator)}.sapphire-dialog:has(.sapphire-dialog-body--scrollable)>.sapphire-dialog-footer{padding:var(--sapphire-dialog-size-spacing-footer-top-scrollable) var(--sapphire-dialog-size-spacing-footer-right-scrollable) var(--sapphire-dialog-size-spacing-footer-bottom-scrollable) var(--sapphire-dialog-size-spacing-footer-left-scrollable)}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
39
40
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: DialogComponent, decorators: [{
|
|
40
41
|
type: Component,
|
|
41
42
|
args: [{ selector: 'sp-dialog', host: {
|
|
42
43
|
class: 'sapphire-dialog',
|
|
44
|
+
'[class.sapphire-dialog--extra-small]': "size === 'extra-small'",
|
|
43
45
|
'[class.sapphire-dialog--small]': "size === 'small'",
|
|
44
46
|
'[class.sapphire-dialog--medium]': "size === 'medium'",
|
|
45
47
|
'[class.sapphire-dialog--large]': "size === 'large'",
|
|
46
48
|
'[class.sapphire-dialog--passive]': "type === 'passive'",
|
|
47
49
|
'[class.sapphire-dialog--exiting]': 'dialogRef.closing',
|
|
48
|
-
}, hostDirectives: [UseComponentStylesOnHost], template: "<ng-content select=\"sp-dialog-header, [spDialogHeader]\"></ng-content>\n<ng-content select=\"sp-dialog-content, [sp-dialog-content]\"></ng-content>\n<ng-content select=\"sp-dialog-footer, [spDialogFooter]\"></ng-content>\n", styles: ["@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-out{0%{opacity:1}to{opacity:0}}.sapphire-dialog{border-radius:var(--sapphire-dialog-size-radius);background-color:var(--sapphire-dialog-color-background);font-family:var(--sapphire-dialog-font-name);color:var(--sapphire-dialog-color-content);box-sizing:border-box;overflow:hidden;max-height:90vh;max-width:90vw;display:flex;flex-direction:column;outline:none;animation-name:fade-in;animation-duration:var(--sapphire-dialog-time-transition);animation-timing-function:ease-in-out;animation-fill-mode:forwards}.sapphire-dialog--exiting{animation-name:fade-out}.sapphire-dialog--small{width:var(--sapphire-dialog-size-width-s)}.sapphire-dialog--medium{width:var(--sapphire-dialog-size-width-m)}.sapphire-dialog--large{width:var(--sapphire-dialog-size-width-l)}.sapphire-dialog-header{padding:var(--sapphire-dialog-size-spacing-header-top-default) var(--sapphire-dialog-size-spacing-header-right-default) var(--sapphire-dialog-size-spacing-header-bottom-default) var(--sapphire-dialog-size-spacing-header-left-default);display:flex;justify-content:space-between;align-items:center}.sapphire-dialog--passive .sapphire-dialog-header{padding:var(--sapphire-dialog-size-spacing-header-top-passive) var(--sapphire-dialog-size-spacing-header-right-passive) var(--sapphire-dialog-size-spacing-header-bottom-passive) var(--sapphire-dialog-size-spacing-header-left-passive)}.sapphire-dialog-close-button-container{align-self:flex-start}.sapphire-dialog-body{padding:var(--sapphire-dialog-size-spacing-body-top-default) var(--sapphire-dialog-size-spacing-body-right-default) var(--sapphire-dialog-size-spacing-body-bottom-default) var(--sapphire-dialog-size-spacing-body-left-default);overflow-y:auto;overflow-x:hidden}.sapphire-dialog--passive .sapphire-dialog-body{padding:var(--sapphire-dialog-size-spacing-body-top-passive) var(--sapphire-dialog-size-spacing-body-right-passive) var(--sapphire-dialog-size-spacing-body-bottom-passive) var(--sapphire-dialog-size-spacing-body-left-passive)}.sapphire-dialog-footer{padding:var(--sapphire-dialog-size-spacing-footer-top-default) var(--sapphire-dialog-size-spacing-footer-right-default) var(--sapphire-dialog-size-spacing-footer-bottom-default) var(--sapphire-dialog-size-spacing-footer-left-default)}.sapphire-dialog-header+.sapphire-dialog-body{border-top:var(--sapphire-dialog-size-border) solid transparent}.sapphire-dialog-header+.sapphire-dialog-body.sapphire-dialog-body--scrolled{border-top:var(--sapphire-dialog-size-border) solid var(--sapphire-dialog-color-separator)}.sapphire-dialog-body+.sapphire-dialog-footer{border-top:var(--sapphire-dialog-size-border) solid transparent}.sapphire-dialog-body.sapphire-dialog-body--scrollable+.sapphire-dialog-footer{border-top:var(--sapphire-dialog-size-border) solid var(--sapphire-dialog-color-separator)}.sapphire-dialog:has(.sapphire-dialog-body--scrollable)>.sapphire-dialog-footer{padding:var(--sapphire-dialog-size-spacing-footer-top-scrollable) var(--sapphire-dialog-size-spacing-footer-right-scrollable) var(--sapphire-dialog-size-spacing-footer-bottom-scrollable) var(--sapphire-dialog-size-spacing-footer-left-scrollable)}\n"] }]
|
|
50
|
+
}, hostDirectives: [UseComponentStylesOnHost], template: "<div #headerTemplate>\n <ng-content select=\"sp-dialog-header, [spDialogHeader]\"></ng-content>\n</div>\n\n<!--If header is not provided as <sp-dialog-header>, but as an another div with spDialogHeader,-->\n<!-- we still need the styling of the header to be rendered, so the dialog looks as expected in the spec.-->\n<ng-container *ngIf=\"!headerTemplate.children.length\">\n <div class=\"sapphire-dialog-header\"></div>\n</ng-container>\n\n<ng-content select=\"sp-dialog-content, [sp-dialog-content]\"></ng-content>\n<ng-content select=\"sp-dialog-footer, [spDialogFooter]\"></ng-content>\n", styles: ["@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-out{0%{opacity:1}to{opacity:0}}.sapphire-dialog{border-radius:var(--sapphire-dialog-size-radius);background-color:var(--sapphire-dialog-color-background);font-family:var(--sapphire-dialog-font-name);color:var(--sapphire-dialog-color-content);box-sizing:border-box;overflow:hidden;max-height:90vh;max-width:90vw;display:flex;flex-direction:column;outline:none;animation-name:fade-in;animation-duration:var(--sapphire-dialog-time-transition);animation-timing-function:ease-in-out;animation-fill-mode:forwards}.sapphire-dialog--exiting{animation-name:fade-out}.sapphire-dialog--extra-small{width:var(--sapphire-dialog-size-width-xs)}.sapphire-dialog--small{width:var(--sapphire-dialog-size-width-s)}.sapphire-dialog--medium{width:var(--sapphire-dialog-size-width-m)}.sapphire-dialog--large{width:var(--sapphire-dialog-size-width-l)}.sapphire-dialog-header{padding:var(--sapphire-dialog-size-spacing-header-top-default) var(--sapphire-dialog-size-spacing-header-right-default) var(--sapphire-dialog-size-spacing-header-bottom-default) var(--sapphire-dialog-size-spacing-header-left-default);display:flex;justify-content:space-between;align-items:center}.sapphire-dialog--passive .sapphire-dialog-header{padding:var(--sapphire-dialog-size-spacing-header-top-passive) var(--sapphire-dialog-size-spacing-header-right-passive) var(--sapphire-dialog-size-spacing-header-bottom-passive) var(--sapphire-dialog-size-spacing-header-left-passive)}.sapphire-dialog-close-button-container{align-self:flex-start}.sapphire-dialog-body{padding:var(--sapphire-dialog-size-spacing-body-top-default) var(--sapphire-dialog-size-spacing-body-right-default) var(--sapphire-dialog-size-spacing-body-bottom-default) var(--sapphire-dialog-size-spacing-body-left-default);overflow-y:auto;overflow-x:hidden}.sapphire-dialog--passive .sapphire-dialog-body{padding:var(--sapphire-dialog-size-spacing-body-top-passive) var(--sapphire-dialog-size-spacing-body-right-passive) var(--sapphire-dialog-size-spacing-body-bottom-passive) var(--sapphire-dialog-size-spacing-body-left-passive)}.sapphire-dialog-footer{padding:var(--sapphire-dialog-size-spacing-footer-top-default) var(--sapphire-dialog-size-spacing-footer-right-default) var(--sapphire-dialog-size-spacing-footer-bottom-default) var(--sapphire-dialog-size-spacing-footer-left-default)}.sapphire-dialog-header+.sapphire-dialog-body{border-top:var(--sapphire-dialog-size-border) solid transparent}.sapphire-dialog-header+.sapphire-dialog-body.sapphire-dialog-body--scrolled{border-top:var(--sapphire-dialog-size-border) solid var(--sapphire-dialog-color-separator)}.sapphire-dialog-body+.sapphire-dialog-footer{border-top:var(--sapphire-dialog-size-border) solid transparent}.sapphire-dialog-body.sapphire-dialog-body--scrollable+.sapphire-dialog-footer{border-top:var(--sapphire-dialog-size-border) solid var(--sapphire-dialog-color-separator)}.sapphire-dialog:has(.sapphire-dialog-body--scrollable)>.sapphire-dialog-footer{padding:var(--sapphire-dialog-size-spacing-footer-top-scrollable) var(--sapphire-dialog-size-spacing-footer-right-scrollable) var(--sapphire-dialog-size-spacing-footer-bottom-scrollable) var(--sapphire-dialog-size-spacing-footer-left-scrollable)}\n"] }]
|
|
49
51
|
}], ctorParameters: function () { return [{ type: i1.DialogRef }]; }, propDecorators: { size: [{
|
|
50
52
|
type: Input
|
|
51
53
|
}], footer: [{
|
|
@@ -58,4 +60,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImpor
|
|
|
58
60
|
type: ContentChild,
|
|
59
61
|
args: [DialogContentDirective]
|
|
60
62
|
}] } });
|
|
61
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
63
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlhbG9nLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy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bmctY29udGVudCBzZWxlY3Q9XCJzcC1kaWFsb2ctY29udGVudCwgW3NwLWRpYWxvZy1jb250ZW50XVwiPjwvbmctY29udGVudD5cbjxuZy1jb250ZW50IHNlbGVjdD1cInNwLWRpYWxvZy1mb290ZXIsIFtzcERpYWxvZ0Zvb3Rlcl1cIj48L25nLWNvbnRlbnQ+XG4iXX0=
|
|
@@ -65,7 +65,7 @@ export class PaginationComponent {
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
PaginationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: PaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
68
|
-
PaginationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: PaginationComponent, selector: "sp-pagination", inputs: { pageSize: "pageSize", itemCount: "itemCount", page: "page", pageSizeOptions: "pageSizeOptions", disabled: "disabled" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<div class=\"sapphire-pagination\">\n <sp-basic-select\n *ngIf=\"pageSizeOptions\"\n placeholder=\"Select an option\"\n (valueChange)=\"_onPageSizeChange($event)\"\n [value]=\"'' + pageSize\"\n [disabled]=\"!!disabled\"\n aria-label=\"Number of items per page\"\n >\n <sp-option\n *ngFor=\"let pageSizeOption of pageSizeOptions\"\n [value]=\"'' + pageSizeOption\"\n >{{ pageSizeOption + ' items per page' }}</sp-option\n >\n </sp-basic-select>\n <span class=\"sapphire-pagination-controls\">\n <span class=\"sapphire-pagination-text\">\n {{ startItemIndex }} -\n {{ endItemIndex }}\n <span class=\"sapphire-pagination-text-alphabetic\"> of </span>\n {{ itemCount }}\n </span>\n <sp-button-group>\n <button\n sp-icon-button\n variant=\"tertiary\"\n appearance=\"ghost\"\n size=\"small\"\n (click)=\"_onPageChange('previous')\"\n [disabled]=\"_isPreviousPageButtonDisabled() || !!disabled\"\n aria-label=\"Previous\"\n >\n <sp-icon name=\"chevronLeft\"></sp-icon></button\n ><button\n sp-icon-button\n variant=\"tertiary\"\n appearance=\"ghost\"\n size=\"small\"\n (click)=\"_onPageChange('next')\"\n [disabled]=\"_isNextPageButtonDisabled() || !!disabled\"\n aria-label=\"Next\"\n >\n <sp-icon name=\"chevronRight\"></sp-icon>\n </button>\n </sp-button-group>\n </span>\n</div>\n", styles: [".sapphire-pagination{display:flex;justify-content:flex-end;align-items:center;padding:var(--sapphire-pagination-size-spacing-container-vertical) var(--sapphire-pagination-size-spacing-container-horizontal);background-color:var(--sapphire-pagination-color-background);font-family:var(--sapphire-pagination-font-name);font-size:var(--sapphire-pagination-size-font);height:var(--sapphire-pagination-size-height);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.sapphire-pagination-controls{display:flex;align-items:center;justify-content:flex-end;flex-grow:1}.sapphire-pagination-text{font-weight:var(--sapphire-pagination-font-weight-numeric-text);color:var(--sapphire-pagination-color-text);padding-right:var(--sapphire-pagination-size-spacing-controls-horizontal)}.sapphire-pagination-text-alphabetic{font-weight:var(--sapphire-pagination-font-weight-alphabetic-text);padding-left:var(--sapphire-pagination-size-spacing-text-horizontal);padding-right:var(--sapphire-pagination-size-spacing-text-horizontal)}sp-basic-select{margin-left:calc(-1 * var(--sapphire-button-size-spacing-horizontal-m))}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.OptionComponent, selector: "sp-option", inputs: ["value", "disabled"] }, { kind: "component", type: i3.BasicSelectComponent, selector: "sp-basic-select", inputs: ["size", "variant"], exportAs: ["spBasicSelect"] }, { kind: "directive", type: i3.BasicSingleSelectDirective, selector: "sp-basic-select:not([multiple])" }, { kind: "component", type: i4.IconButtonComponent, selector: "button[sp-icon-button], a[sp-icon-button]", inputs: ["variant", "appearance", "surface", "size", "disabled", "type"] }, { kind: "component", type: i5.ButtonGroupComponent, selector: "sp-button-group", inputs: ["align", "iconSpacing", "spacing", "orientation"] }, { kind: "component", type: i6.IconComponent, selector: "sp-icon", inputs: ["name", "size"] }] });
|
|
68
|
+
PaginationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: PaginationComponent, selector: "sp-pagination", inputs: { pageSize: "pageSize", itemCount: "itemCount", page: "page", pageSizeOptions: "pageSizeOptions", disabled: "disabled" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<div class=\"sapphire-pagination\">\n <sp-basic-select\n *ngIf=\"pageSizeOptions\"\n placeholder=\"Select an option\"\n (valueChange)=\"_onPageSizeChange($event)\"\n [value]=\"'' + pageSize\"\n [disabled]=\"!!disabled\"\n aria-label=\"Number of items per page\"\n >\n <sp-option\n *ngFor=\"let pageSizeOption of pageSizeOptions\"\n [value]=\"'' + pageSizeOption\"\n >{{ pageSizeOption + ' items per page' }}</sp-option\n >\n </sp-basic-select>\n <span class=\"sapphire-pagination-controls\">\n <span class=\"sapphire-pagination-text\">\n {{ startItemIndex }} -\n {{ endItemIndex }}\n <span class=\"sapphire-pagination-text-alphabetic\"> of </span>\n {{ itemCount }}\n </span>\n <sp-button-group>\n <button\n sp-icon-button\n variant=\"tertiary\"\n appearance=\"ghost\"\n size=\"small\"\n (click)=\"_onPageChange('previous')\"\n [disabled]=\"_isPreviousPageButtonDisabled() || !!disabled\"\n aria-label=\"Previous\"\n >\n <sp-icon name=\"chevronLeft\"></sp-icon></button\n ><button\n sp-icon-button\n variant=\"tertiary\"\n appearance=\"ghost\"\n size=\"small\"\n (click)=\"_onPageChange('next')\"\n [disabled]=\"_isNextPageButtonDisabled() || !!disabled\"\n aria-label=\"Next\"\n >\n <sp-icon name=\"chevronRight\"></sp-icon>\n </button>\n </sp-button-group>\n </span>\n</div>\n", styles: [".sapphire-pagination{display:flex;justify-content:flex-end;align-items:center;padding:var(--sapphire-pagination-size-spacing-container-vertical) var(--sapphire-pagination-size-spacing-container-horizontal);background-color:var(--sapphire-pagination-color-background);font-family:var(--sapphire-pagination-font-name);font-size:var(--sapphire-pagination-size-font);height:var(--sapphire-pagination-size-height);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.sapphire-pagination-controls{display:flex;align-items:center;justify-content:flex-end;flex-grow:1}.sapphire-pagination-text{font-weight:var(--sapphire-pagination-font-weight-numeric-text);color:var(--sapphire-pagination-color-text);padding-right:var(--sapphire-pagination-size-spacing-controls-horizontal)}.sapphire-pagination-text-alphabetic{font-weight:var(--sapphire-pagination-font-weight-alphabetic-text);padding-left:var(--sapphire-pagination-size-spacing-text-horizontal);padding-right:var(--sapphire-pagination-size-spacing-text-horizontal)}sp-basic-select{margin-left:calc(-1 * var(--sapphire-button-size-spacing-horizontal-m))}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.OptionComponent, selector: "sp-option", inputs: ["value", "disabled"] }, { kind: "component", type: i3.BasicSelectComponent, selector: "sp-basic-select", inputs: ["size", "variant"], exportAs: ["spBasicSelect"] }, { kind: "directive", type: i3.BasicSingleSelectDirective, selector: "sp-basic-select:not([multiple])" }, { kind: "component", type: i4.IconButtonComponent, selector: "button[sp-icon-button], a[sp-icon-button]", inputs: ["variant", "appearance", "surface", "size", "disabled", "type"] }, { kind: "component", type: i5.ButtonGroupComponent, selector: "sp-button-group", inputs: ["align", "stretch", "iconSpacing", "spacing", "orientation"] }, { kind: "component", type: i6.IconComponent, selector: "sp-icon", inputs: ["name", "size"] }] });
|
|
69
69
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: PaginationComponent, decorators: [{
|
|
70
70
|
type: Component,
|
|
71
71
|
args: [{ selector: 'sp-pagination', template: "<div class=\"sapphire-pagination\">\n <sp-basic-select\n *ngIf=\"pageSizeOptions\"\n placeholder=\"Select an option\"\n (valueChange)=\"_onPageSizeChange($event)\"\n [value]=\"'' + pageSize\"\n [disabled]=\"!!disabled\"\n aria-label=\"Number of items per page\"\n >\n <sp-option\n *ngFor=\"let pageSizeOption of pageSizeOptions\"\n [value]=\"'' + pageSizeOption\"\n >{{ pageSizeOption + ' items per page' }}</sp-option\n >\n </sp-basic-select>\n <span class=\"sapphire-pagination-controls\">\n <span class=\"sapphire-pagination-text\">\n {{ startItemIndex }} -\n {{ endItemIndex }}\n <span class=\"sapphire-pagination-text-alphabetic\"> of </span>\n {{ itemCount }}\n </span>\n <sp-button-group>\n <button\n sp-icon-button\n variant=\"tertiary\"\n appearance=\"ghost\"\n size=\"small\"\n (click)=\"_onPageChange('previous')\"\n [disabled]=\"_isPreviousPageButtonDisabled() || !!disabled\"\n aria-label=\"Previous\"\n >\n <sp-icon name=\"chevronLeft\"></sp-icon></button\n ><button\n sp-icon-button\n variant=\"tertiary\"\n appearance=\"ghost\"\n size=\"small\"\n (click)=\"_onPageChange('next')\"\n [disabled]=\"_isNextPageButtonDisabled() || !!disabled\"\n aria-label=\"Next\"\n >\n <sp-icon name=\"chevronRight\"></sp-icon>\n </button>\n </sp-button-group>\n </span>\n</div>\n", styles: [".sapphire-pagination{display:flex;justify-content:flex-end;align-items:center;padding:var(--sapphire-pagination-size-spacing-container-vertical) var(--sapphire-pagination-size-spacing-container-horizontal);background-color:var(--sapphire-pagination-color-background);font-family:var(--sapphire-pagination-font-name);font-size:var(--sapphire-pagination-size-font);height:var(--sapphire-pagination-size-height);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.sapphire-pagination-controls{display:flex;align-items:center;justify-content:flex-end;flex-grow:1}.sapphire-pagination-text{font-weight:var(--sapphire-pagination-font-weight-numeric-text);color:var(--sapphire-pagination-color-text);padding-right:var(--sapphire-pagination-size-spacing-controls-horizontal)}.sapphire-pagination-text-alphabetic{font-weight:var(--sapphire-pagination-font-weight-alphabetic-text);padding-left:var(--sapphire-pagination-size-spacing-text-horizontal);padding-right:var(--sapphire-pagination-size-spacing-text-horizontal)}sp-basic-select{margin-left:calc(-1 * var(--sapphire-button-size-spacing-horizontal-m))}\n"] }]
|