@norwegian/core-components 6.42.2 → 6.43.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/assets/icons/medium/spenn-extra-six--light.svg +12 -0
- package/assets/icons/medium/spenn-extra-six.svg +12 -0
- package/assets/icons/medium/spenn-extra-two--light.svg +11 -0
- package/assets/icons/medium/spenn-extra-two.svg +11 -0
- package/assets/icons/medium/spenn-no-expiry--light.svg +13 -0
- package/assets/icons/medium/spenn-no-expiry.svg +13 -0
- package/assets/icons/small/close--light.svg +7 -0
- package/assets/icons/small/close.svg +7 -0
- package/assets/icons/small/left--disabled.svg +5 -0
- package/assets/icons/small/right--disabled.svg +5 -0
- package/assets/icons/small/spenn-extra-six--light.svg +12 -0
- package/assets/icons/small/spenn-extra-six.svg +12 -0
- package/assets/icons/small/spenn-extra-two--light.svg +11 -0
- package/assets/icons/small/spenn-extra-two.svg +11 -0
- package/assets/icons/small/spenn-no-expiry--light.svg +11 -0
- package/assets/icons/small/spenn-no-expiry.svg +11 -0
- package/assets/icons/xsmall/left--disabled.svg +6 -0
- package/assets/icons/xsmall/right--disabled.svg +6 -0
- package/esm2022/lib/components/button-new/button-new.component.mjs +3 -3
- package/esm2022/lib/components/campaign-header/campaign-header.component.mjs +1 -1
- package/esm2022/lib/components/icon/icon.component.mjs +2 -2
- package/esm2022/lib/components/micro-button/micro-button.component.mjs +58 -5
- package/esm2022/lib/core/services/language/language-helper.service.mjs +2 -3
- package/fesm2022/norwegian-core-components.mjs +61 -10
- package/fesm2022/norwegian-core-components.mjs.map +1 -1
- package/lib/components/micro-button/micro-button.component.d.ts +96 -9
- package/package.json +1 -1
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Norwegian Air Shuttle. All Rights Reserved.
|
|
4
|
+
*/
|
|
5
|
+
import { EventEmitter } from '@angular/core';
|
|
1
6
|
import { ClassModel, NasComponentBase } from '../../core';
|
|
2
|
-
import { LinkModel } from '../../core/models/link.model';
|
|
3
7
|
import * as i0 from "@angular/core";
|
|
4
8
|
/**
|
|
5
9
|
* @description
|
|
@@ -15,15 +19,27 @@ export declare class MicroButtonComponent extends NasComponentBase {
|
|
|
15
19
|
/**
|
|
16
20
|
* @property Input
|
|
17
21
|
* @description
|
|
18
|
-
* Sets the
|
|
22
|
+
* Sets the type of icon on the input
|
|
19
23
|
*/
|
|
20
|
-
|
|
24
|
+
iconType: string;
|
|
21
25
|
/**
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
* @property Input
|
|
27
|
+
* @description
|
|
28
|
+
* String to support href.
|
|
29
|
+
* Can be combined with all other properties.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* <nas-micro-button [href]="http://www.norwegian.com">Click on me!</nas-micro-button>
|
|
33
|
+
*/
|
|
34
|
+
href?: string;
|
|
35
|
+
/**
|
|
36
|
+
* @property Input
|
|
37
|
+
* @description
|
|
38
|
+
* The target attribute specifies where to open the link.
|
|
39
|
+
* @example
|
|
40
|
+
* <nas-button link href="https://www.norwegian.com" target="_blank">Click on me!</nas-button>
|
|
41
|
+
*/
|
|
42
|
+
target: string;
|
|
27
43
|
/**
|
|
28
44
|
* @property Input
|
|
29
45
|
* @description
|
|
@@ -53,9 +69,80 @@ export declare class MicroButtonComponent extends NasComponentBase {
|
|
|
53
69
|
* <nas-micro-button secondary>Click on me!</nas-micro-button>
|
|
54
70
|
*/
|
|
55
71
|
white?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* @property Input
|
|
74
|
+
* @description
|
|
75
|
+
* Boolean to set disabled state of button (white).
|
|
76
|
+
* Primary is default style.
|
|
77
|
+
*/
|
|
78
|
+
disabled?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* @property Input
|
|
81
|
+
* @description
|
|
82
|
+
* Boolean to override disabled. Button will be clickable even though disabled is set.
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* <nas-button canContinueOnDisabled>Click on me!</nas-button>
|
|
86
|
+
*/
|
|
87
|
+
canContinueOnDisabled?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* @property Input
|
|
90
|
+
* @description
|
|
91
|
+
* To set the icon on the right side of the button
|
|
92
|
+
*/
|
|
93
|
+
iconLeft?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* @property Input
|
|
96
|
+
* @description
|
|
97
|
+
* String to be tracked by e.x. GTM og GA.
|
|
98
|
+
* Can be combined with all other properties.
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* <nas-button [trackingValue]="trackingValue">Click on me!</nas-button>
|
|
102
|
+
*/
|
|
103
|
+
trackingvalue?: string;
|
|
104
|
+
/**
|
|
105
|
+
* @property Input
|
|
106
|
+
* @description
|
|
107
|
+
* String to set aria label on button.
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* <nas-button [ariaLabel]="'this is my aria label'">Click on me!</nas-button>
|
|
111
|
+
*/
|
|
112
|
+
ariaLabel?: string;
|
|
113
|
+
/**
|
|
114
|
+
* @property Input
|
|
115
|
+
* @description
|
|
116
|
+
* Number to set custom tab index on button.
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* <nas-button [tabIndex]="10">Click on me!</nas-button>
|
|
120
|
+
*/
|
|
121
|
+
tabindex: number;
|
|
122
|
+
/**
|
|
123
|
+
* @property Input
|
|
124
|
+
* @description
|
|
125
|
+
* String to set button type. Default value is "button".
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* <nas-button [type]="'submit'">Click on me!</nas-button>
|
|
129
|
+
*/
|
|
130
|
+
type: string;
|
|
131
|
+
/**
|
|
132
|
+
* @property Output
|
|
133
|
+
* @description
|
|
134
|
+
* Change event when clicking on button.
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* <nas-button (clickChange)="myFunction()">Click on me!</nas-button>
|
|
138
|
+
*/
|
|
139
|
+
clickChange: EventEmitter<Event>;
|
|
56
140
|
constructor();
|
|
141
|
+
private trackingEventSource;
|
|
142
|
+
trackingEvent$: import("rxjs").Observable<string>;
|
|
57
143
|
get modifiers(): Array<string>;
|
|
58
144
|
getClasses(element?: string, modifiers?: any): Array<ClassModel>;
|
|
145
|
+
emitTrackingAndClickEvent(event: Event): void;
|
|
59
146
|
static ɵfac: i0.ɵɵFactoryDeclaration<MicroButtonComponent, never>;
|
|
60
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MicroButtonComponent, "nas-micro-button", never, { "icon": { "alias": "icon"; "required": false; }; "href": { "alias": "href"; "required": false; }; "
|
|
147
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MicroButtonComponent, "nas-micro-button", never, { "icon": { "alias": "icon"; "required": false; }; "iconType": { "alias": "iconType"; "required": false; }; "href": { "alias": "href"; "required": false; }; "target": { "alias": "target"; "required": false; }; "primary": { "alias": "primary"; "required": false; }; "secondary": { "alias": "secondary"; "required": false; }; "white": { "alias": "white"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "canContinueOnDisabled": { "alias": "canContinueOnDisabled"; "required": false; }; "iconLeft": { "alias": "iconLeft"; "required": false; }; "trackingvalue": { "alias": "trackingvalue"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "type": { "alias": "type"; "required": false; }; }, { "clickChange": "clickChange"; }, never, ["*"], false, never>;
|
|
61
148
|
}
|