@danske/sapphire-angular 1.18.0 → 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/text-field/public_api.mjs +1 -2
- package/esm2020/lib/text-field/src/text-field-postfix.directive.mjs +17 -4
- package/esm2020/lib/text-field/src/text-field-prefix.directive.mjs +17 -4
- package/esm2020/lib/text-field/src/text-field.component.mjs +4 -20
- package/esm2020/lib/text-field/src/text-field.module.mjs +1 -6
- package/esm2020/lib/theme/src/themes.mjs +4 -4
- package/fesm2015/danske-sapphire-angular.mjs +119 -66
- package/fesm2015/danske-sapphire-angular.mjs.map +1 -1
- package/fesm2020/danske-sapphire-angular.mjs +117 -66
- 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/lib/text-field/public_api.d.ts +0 -1
- package/lib/text-field/src/text-field-postfix.directive.d.ts +6 -1
- package/lib/text-field/src/text-field-prefix.directive.d.ts +6 -1
- package/lib/text-field/src/text-field.component.d.ts +1 -5
- package/lib/text-field/src/text-field.module.d.ts +9 -10
- package/package.json +3 -3
- package/esm2020/lib/text-field/src/text-field-affix.directive.mjs +0 -26
- package/lib/text-field/src/text-field-affix.directive.d.ts +0 -10
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
+
export type ButtonGroupStretchType = 'none' | 'default' | 'autoVertical';
|
|
2
3
|
/**
|
|
3
4
|
* ButtonGroup is a utility component which ensures consistent spacing between
|
|
4
5
|
* buttons All children must be of type Button. Icon buttons cannot be mixed
|
|
@@ -10,6 +11,18 @@ export declare class ButtonGroupComponent {
|
|
|
10
11
|
* @default "right"
|
|
11
12
|
*/
|
|
12
13
|
align: 'left' | 'center' | 'right';
|
|
14
|
+
/**
|
|
15
|
+
* Controls stretching of the contents.
|
|
16
|
+
*
|
|
17
|
+
* `none` - the children will not stretch and will respect the alignment set with the align prop.
|
|
18
|
+
*
|
|
19
|
+
* `default` - the children will stretch to take full width. If the children overflow, they will be wrapped vertically.
|
|
20
|
+
*
|
|
21
|
+
* `autoVertical` - same behaviour as `default`, but if there is more than 3 children, they will be wrapped vertically even if they don't overflow.
|
|
22
|
+
*
|
|
23
|
+
* @default "none"
|
|
24
|
+
*/
|
|
25
|
+
stretch?: ButtonGroupStretchType;
|
|
13
26
|
get iconSpacing(): this['spacing'];
|
|
14
27
|
set iconSpacing(value: this['spacing']);
|
|
15
28
|
/**
|
|
@@ -22,5 +35,5 @@ export declare class ButtonGroupComponent {
|
|
|
22
35
|
*/
|
|
23
36
|
orientation?: 'vertical' | 'horizontal';
|
|
24
37
|
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonGroupComponent, never>;
|
|
25
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ButtonGroupComponent, "sp-button-group", never, { "align": "align"; "iconSpacing": "iconSpacing"; "spacing": "spacing"; "orientation": "orientation"; }, {}, never, ["*"], false, never>;
|
|
38
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ButtonGroupComponent, "sp-button-group", never, { "align": "align"; "stretch": "stretch"; "iconSpacing": "iconSpacing"; "spacing": "spacing"; "orientation": "orientation"; }, {}, never, ["*"], false, never>;
|
|
26
39
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ButtonGroupStretchType } from '../../../button/src/button-group.component';
|
|
1
2
|
import * as i0 from "@angular/core";
|
|
2
3
|
import * as i1 from "../../../common/sapphire-view-encapsulation";
|
|
3
4
|
/**
|
|
@@ -15,6 +16,22 @@ export declare class DialogFooterDirective {
|
|
|
15
16
|
* For a custom footer, use {@link DialogFooterDirective spDialogFooter attribute directive}.
|
|
16
17
|
*/
|
|
17
18
|
export declare class DialogFooterComponent {
|
|
19
|
+
/**
|
|
20
|
+
* Controls stretching of the contents.
|
|
21
|
+
*
|
|
22
|
+
* `none` - the children will not stretch and will respect the alignment set with the align prop.
|
|
23
|
+
*
|
|
24
|
+
* `default` - the children will stretch to take full width. If the children overflow, they will be wrapped vertically.
|
|
25
|
+
*
|
|
26
|
+
* `autoVertical` - same behaviour as `default`, but if there is more than 3 children, they will be wrapped vertically even if they don't overflow.
|
|
27
|
+
*
|
|
28
|
+
* @default "none"
|
|
29
|
+
*/
|
|
30
|
+
stretch?: ButtonGroupStretchType;
|
|
31
|
+
/**
|
|
32
|
+
* @default "horizontal"
|
|
33
|
+
*/
|
|
34
|
+
orientation?: 'vertical' | 'horizontal';
|
|
18
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<DialogFooterComponent, never>;
|
|
19
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DialogFooterComponent, "sp-dialog-footer", never, {}, {}, never, ["*"], false, [{ directive: typeof DialogFooterDirective; inputs: {}; outputs: {}; }]>;
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DialogFooterComponent, "sp-dialog-footer", never, { "stretch": "stretch"; "orientation": "orientation"; }, {}, never, ["*"], false, [{ directive: typeof DialogFooterDirective; inputs: {}; outputs: {}; }]>;
|
|
20
37
|
}
|
|
@@ -14,7 +14,7 @@ export declare class DialogComponent extends ModalBaseComponent {
|
|
|
14
14
|
/**
|
|
15
15
|
* Dialog size, constraining the width of the dialog.
|
|
16
16
|
*/
|
|
17
|
-
size: 'small' | 'medium' | 'large';
|
|
17
|
+
size: 'extra-small' | 'small' | 'medium' | 'large';
|
|
18
18
|
/**
|
|
19
19
|
* Type of the dialog:
|
|
20
20
|
* - 'passive': A dialog without footer with actions. Passive dialogs are
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { TextFieldComponent } from './src/text-field.component';
|
|
2
2
|
export { TextFieldInputDirective } from './src/text-field-input.directive';
|
|
3
|
-
export { TextFieldAffixDirective } from './src/text-field-affix.directive';
|
|
4
3
|
export { TextFieldPrefixDirective } from './src/text-field-prefix.directive';
|
|
5
4
|
export { TextFieldPostfixDirective } from './src/text-field-postfix.directive';
|
|
6
5
|
export { TextFieldTextareaAutosizeDirective } from './src/text-field-textarea-autosize.directive';
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
1
2
|
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "../../common/sapphire-view-encapsulation";
|
|
2
4
|
export declare class TextFieldPostfixDirective {
|
|
5
|
+
private _elementRef;
|
|
6
|
+
isTextNode(): boolean;
|
|
7
|
+
constructor(_elementRef: ElementRef<HTMLElement>);
|
|
3
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<TextFieldPostfixDirective, never>;
|
|
4
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TextFieldPostfixDirective, "sp-text-field-postfix", never, {}, {}, never, never, false,
|
|
9
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TextFieldPostfixDirective, "sp-text-field-postfix", never, {}, {}, never, never, false, [{ directive: typeof i1.UseComponentStyles; inputs: {}; outputs: {}; }]>;
|
|
5
10
|
}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
1
2
|
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "../../common/sapphire-view-encapsulation";
|
|
2
4
|
export declare class TextFieldPrefixDirective {
|
|
5
|
+
private _elementRef;
|
|
6
|
+
isTextNode(): boolean;
|
|
7
|
+
constructor(_elementRef: ElementRef<HTMLElement>);
|
|
3
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<TextFieldPrefixDirective, never>;
|
|
4
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TextFieldPrefixDirective, "sp-text-field-prefix", never, {}, {}, never, never, false,
|
|
9
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TextFieldPrefixDirective, "sp-text-field-prefix", never, {}, {}, never, never, false, [{ directive: typeof i1.UseComponentStyles; inputs: {}; outputs: {}; }]>;
|
|
5
10
|
}
|
|
@@ -10,14 +10,10 @@ export declare class TextFieldComponent implements FieldControl {
|
|
|
10
10
|
characterCounterMax?: NumberInput;
|
|
11
11
|
inputElement?: ElementRef<HTMLInputElement | HTMLTextAreaElement>;
|
|
12
12
|
_inputDirective?: TextFieldInputDirective;
|
|
13
|
-
private prefixDirective?;
|
|
14
|
-
private postfixDirective?;
|
|
15
13
|
constructor(field?: FieldComponent | undefined);
|
|
16
14
|
isCharacterCounterExceeded(): boolean;
|
|
17
|
-
hasPrefix(): boolean;
|
|
18
|
-
hasPostfix(): boolean;
|
|
19
15
|
isDisabled(): boolean;
|
|
20
16
|
getId(): string | undefined;
|
|
21
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<TextFieldComponent, [{ optional: true; }]>;
|
|
22
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TextFieldComponent, "sp-text-field", never, { "characterCounterMax": "characterCounterMax"; }, {}, ["inputElement", "_inputDirective"
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TextFieldComponent, "sp-text-field", never, { "characterCounterMax": "characterCounterMax"; }, {}, ["inputElement", "_inputDirective"], ["sp-text-field-prefix", "input", "sp-text-field-postfix", "textarea"], false, [{ directive: typeof i1.ThemeCheckDirective; inputs: {}; outputs: {}; }, { directive: typeof i2.UseComponentStylesOnHost; inputs: {}; outputs: {}; }]>;
|
|
23
19
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./text-field.component";
|
|
3
3
|
import * as i2 from "./text-field-input.directive";
|
|
4
|
-
import * as i3 from "./text-field-
|
|
5
|
-
import * as i4 from "./text-field-
|
|
6
|
-
import * as i5 from "./text-field-
|
|
7
|
-
import * as i6 from "
|
|
8
|
-
import * as i7 from "@angular/
|
|
9
|
-
import * as i8 from "@angular/
|
|
10
|
-
import * as i9 from "
|
|
11
|
-
import * as i10 from "../../
|
|
12
|
-
import * as i11 from "../../field/src/field.module";
|
|
4
|
+
import * as i3 from "./text-field-prefix.directive";
|
|
5
|
+
import * as i4 from "./text-field-postfix.directive";
|
|
6
|
+
import * as i5 from "./text-field-textarea-autosize.directive";
|
|
7
|
+
import * as i6 from "@angular/common";
|
|
8
|
+
import * as i7 from "@angular/forms";
|
|
9
|
+
import * as i8 from "@angular/cdk/portal";
|
|
10
|
+
import * as i9 from "../../label/src/label.component";
|
|
11
|
+
import * as i10 from "../../field/src/field.module";
|
|
13
12
|
export declare class SapphireTextFieldModule {
|
|
14
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<SapphireTextFieldModule, never>;
|
|
15
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SapphireTextFieldModule, [typeof i1.TextFieldComponent, typeof i2.TextFieldInputDirective, typeof i3.
|
|
14
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SapphireTextFieldModule, [typeof i1.TextFieldComponent, typeof i2.TextFieldInputDirective, typeof i3.TextFieldPrefixDirective, typeof i4.TextFieldPostfixDirective, typeof i5.TextFieldTextareaAutosizeDirective], [typeof i6.CommonModule, typeof i7.FormsModule, typeof i8.PortalModule, typeof i9.LabelComponent, typeof i10.SapphireFieldModule], [typeof i1.TextFieldComponent, typeof i2.TextFieldInputDirective, typeof i10.SapphireFieldModule, typeof i3.TextFieldPrefixDirective, typeof i4.TextFieldPostfixDirective, typeof i5.TextFieldTextareaAutosizeDirective]>;
|
|
16
15
|
static ɵinj: i0.ɵɵInjectorDeclaration<SapphireTextFieldModule>;
|
|
17
16
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danske/sapphire-angular",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.19.0",
|
|
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,10 @@
|
|
|
16
16
|
"@danske/sapphire-icons": "^1.0.2"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@danske/sapphire-css": "^
|
|
19
|
+
"@danske/sapphire-css": "^27.1.0",
|
|
20
20
|
"tslib": "^2.3.0"
|
|
21
21
|
},
|
|
22
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "b32c314ce39dda19db3c38304864b4e63c0f9470",
|
|
23
23
|
"es2020": "fesm2020/danske-sapphire-angular.mjs",
|
|
24
24
|
"esm2020": "esm2020/danske-sapphire-angular.mjs",
|
|
25
25
|
"fesm2020": "fesm2020/danske-sapphire-angular.mjs",
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Directive } from '@angular/core';
|
|
2
|
-
import { UseComponentStyles } from '../../common/sapphire-view-encapsulation';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "../../common/sapphire-view-encapsulation";
|
|
5
|
-
export class TextFieldAffixDirective {
|
|
6
|
-
isTextNode() {
|
|
7
|
-
return (this._elementRef?.nativeElement.firstChild?.nodeType === Node.TEXT_NODE);
|
|
8
|
-
}
|
|
9
|
-
constructor(_elementRef) {
|
|
10
|
-
this._elementRef = _elementRef;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
TextFieldAffixDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: TextFieldAffixDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
14
|
-
TextFieldAffixDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.0", type: TextFieldAffixDirective, selector: "sp-text-field-prefix, sp-text-field-postfix", host: { properties: { "class.sapphire-text-field__affix--icon": "!isTextNode()" }, classAttribute: "sapphire-text-field__affix" }, hostDirectives: [{ directive: i1.UseComponentStyles }], ngImport: i0 });
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: TextFieldAffixDirective, decorators: [{
|
|
16
|
-
type: Directive,
|
|
17
|
-
args: [{
|
|
18
|
-
selector: 'sp-text-field-prefix, sp-text-field-postfix',
|
|
19
|
-
host: {
|
|
20
|
-
class: 'sapphire-text-field__affix',
|
|
21
|
-
'[class.sapphire-text-field__affix--icon]': '!isTextNode()',
|
|
22
|
-
},
|
|
23
|
-
hostDirectives: [UseComponentStyles],
|
|
24
|
-
}]
|
|
25
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
|
|
26
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGV4dC1maWVsZC1hZmZpeC5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbGliL3RleHQtZmllbGQvc3JjL3RleHQtZmllbGQtYWZmaXguZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQWMsTUFBTSxlQUFlLENBQUM7QUFDdEQsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sMENBQTBDLENBQUM7OztBQVU5RSxNQUFNLE9BQU8sdUJBQXVCO0lBQ2xDLFVBQVU7UUFDUixPQUFPLENBQ0wsSUFBSSxDQUFDLFdBQVcsRUFBRSxhQUFhLENBQUMsVUFBVSxFQUFFLFFBQVEsS0FBSyxJQUFJLENBQUMsU0FBUyxDQUN4RSxDQUFDO0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hUX05PREVcbiAgICApO1xuICB9XG5cbiAgY29uc3RydWN0b3IocHJpdmF0ZSBfZWxlbWVudFJlZjogRWxlbWVudFJlZjxIVE1MRWxlbWVudD4pIHt9XG59XG4iXX0=
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ElementRef } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "../../common/sapphire-view-encapsulation";
|
|
4
|
-
export declare class TextFieldAffixDirective {
|
|
5
|
-
private _elementRef;
|
|
6
|
-
isTextNode(): boolean;
|
|
7
|
-
constructor(_elementRef: ElementRef<HTMLElement>);
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TextFieldAffixDirective, never>;
|
|
9
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TextFieldAffixDirective, "sp-text-field-prefix, sp-text-field-postfix", never, {}, {}, never, never, false, [{ directive: typeof i1.UseComponentStyles; inputs: {}; outputs: {}; }]>;
|
|
10
|
-
}
|