@danske/sapphire-angular 1.14.0 → 1.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/contextual-help/src/contextual-help.component.mjs +3 -3
- package/esm2020/lib/table/src/table-cell.directive.mjs +9 -9
- package/esm2020/lib/table/src/table-row.directive.mjs +3 -3
- package/esm2020/lib/text-field/src/text-field-input.directive.mjs +23 -3
- package/esm2020/lib/text-field/src/text-field.component.mjs +2 -2
- package/fesm2015/danske-sapphire-angular.mjs +40 -16
- package/fesm2015/danske-sapphire-angular.mjs.map +1 -1
- package/fesm2020/danske-sapphire-angular.mjs +35 -15
- package/fesm2020/danske-sapphire-angular.mjs.map +1 -1
- package/lib/table/src/table-cell.directive.d.ts +8 -6
- package/lib/table/src/table-row.directive.d.ts +1 -1
- package/lib/text-field/src/text-field-input.directive.d.ts +5 -0
- package/package.json +3 -3
|
@@ -2323,8 +2323,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImpor
|
|
|
2323
2323
|
|
|
2324
2324
|
class TextFieldInputDirective {
|
|
2325
2325
|
ngDoCheck() {
|
|
2326
|
+
this.updateValueLength();
|
|
2327
|
+
this.updateAutofillStyle();
|
|
2328
|
+
}
|
|
2329
|
+
onBlur() {
|
|
2330
|
+
this.updateAutofillStyle();
|
|
2331
|
+
}
|
|
2332
|
+
updateValueLength() {
|
|
2326
2333
|
this.valueLength = this._elementRef.nativeElement.value.length;
|
|
2327
2334
|
}
|
|
2335
|
+
get style() {
|
|
2336
|
+
return this.autofillStyle;
|
|
2337
|
+
}
|
|
2338
|
+
updateAutofillStyle() {
|
|
2339
|
+
const { backgroundColor } = window.getComputedStyle(this._elementRef.nativeElement);
|
|
2340
|
+
this.autofillStyle = `box-shadow: -100px 0 ${backgroundColor}, 100px 0 ${backgroundColor}`;
|
|
2341
|
+
}
|
|
2328
2342
|
constructor(_elementRef) {
|
|
2329
2343
|
this._elementRef = _elementRef;
|
|
2330
2344
|
this.id = '';
|
|
@@ -2337,7 +2351,7 @@ class TextFieldInputDirective {
|
|
|
2337
2351
|
}
|
|
2338
2352
|
}
|
|
2339
2353
|
TextFieldInputDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: TextFieldInputDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2340
|
-
TextFieldInputDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.0", type: TextFieldInputDirective, selector: "[spTextFieldInput]", inputs: { id: "id", disabled: "disabled", required: "required" }, host: { listeners: { "input": "ngDoCheck($event.target.value)" }, properties: { "id": "id" }, classAttribute: "sapphire-text-field__input" }, hostDirectives: [{ directive: UseComponentStyles }], ngImport: i0 });
|
|
2354
|
+
TextFieldInputDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.0", type: TextFieldInputDirective, selector: "[spTextFieldInput]", inputs: { id: "id", disabled: "disabled", required: "required" }, host: { listeners: { "input": "ngDoCheck($event.target.value)", "blur": "onBlur()" }, properties: { "id": "id", "style": "this.style" }, classAttribute: "sapphire-text-field__input" }, hostDirectives: [{ directive: UseComponentStyles }], ngImport: i0 });
|
|
2341
2355
|
__decorate([
|
|
2342
2356
|
AutoId()
|
|
2343
2357
|
], TextFieldInputDirective.prototype, "id", void 0);
|
|
@@ -2363,6 +2377,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImpor
|
|
|
2363
2377
|
}], ngDoCheck: [{
|
|
2364
2378
|
type: HostListener,
|
|
2365
2379
|
args: ['input', ['$event.target.value']]
|
|
2380
|
+
}], onBlur: [{
|
|
2381
|
+
type: HostListener,
|
|
2382
|
+
args: ['blur']
|
|
2383
|
+
}], style: [{
|
|
2384
|
+
type: HostBinding,
|
|
2385
|
+
args: ['style']
|
|
2366
2386
|
}] } });
|
|
2367
2387
|
|
|
2368
2388
|
class TextFieldPrefixDirective {
|
|
@@ -2414,7 +2434,7 @@ TextFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ver
|
|
|
2414
2434
|
provide: FieldControl,
|
|
2415
2435
|
useExisting: forwardRef(() => TextFieldComponent),
|
|
2416
2436
|
},
|
|
2417
|
-
], queries: [{ propertyName: "inputElement", first: true, predicate: TextFieldInputDirective, descendants: true, read: ElementRef }, { propertyName: "_inputDirective", first: true, predicate: TextFieldInputDirective, descendants: true }, { propertyName: "prefixDirective", first: true, predicate: TextFieldPrefixDirective, descendants: true }, { propertyName: "postfixDirective", first: true, predicate: TextFieldPostfixDirective, descendants: true }], hostDirectives: [{ directive: ThemeCheckDirective }, { directive: UseComponentStylesOnHost }], ngImport: i0, template: "<ng-content\n select=\"sp-text-field-prefix\"\n *ngIf=\"!_inputDirective?.textarea\"\n></ng-content>\n<ng-content select=\"input\"></ng-content>\n<ng-content\n select=\"sp-text-field-postfix\"\n *ngIf=\"!_inputDirective?.textarea\"\n></ng-content>\n<ng-content select=\"textarea\"></ng-content>\n\n<span\n *ngIf=\"characterCounterMax !== undefined\"\n spFieldNoteSuffix\n class=\"sapphire-text-field__counter\"\n [class.sapphire-text-field__counter--error]=\"isCharacterCounterExceeded()\"\n >{{ _inputDirective?.valueLength }}/{{ characterCounterMax }}</span\n>\n", styles: [".sapphire-text-field{width:var(--sapphire-text-field-size-width-control);
|
|
2437
|
+
], queries: [{ propertyName: "inputElement", first: true, predicate: TextFieldInputDirective, descendants: true, read: ElementRef }, { propertyName: "_inputDirective", first: true, predicate: TextFieldInputDirective, descendants: true }, { propertyName: "prefixDirective", first: true, predicate: TextFieldPrefixDirective, descendants: true }, { propertyName: "postfixDirective", first: true, predicate: TextFieldPostfixDirective, descendants: true }], hostDirectives: [{ directive: ThemeCheckDirective }, { directive: UseComponentStylesOnHost }], ngImport: i0, template: "<ng-content\n select=\"sp-text-field-prefix\"\n *ngIf=\"!_inputDirective?.textarea\"\n></ng-content>\n<ng-content select=\"input\"></ng-content>\n<ng-content\n select=\"sp-text-field-postfix\"\n *ngIf=\"!_inputDirective?.textarea\"\n></ng-content>\n<ng-content select=\"textarea\"></ng-content>\n\n<span\n *ngIf=\"characterCounterMax !== undefined\"\n spFieldNoteSuffix\n class=\"sapphire-text-field__counter\"\n [class.sapphire-text-field__counter--error]=\"isCharacterCounterExceeded()\"\n >{{ _inputDirective?.valueLength }}/{{ characterCounterMax }}</span\n>\n", styles: [".sapphire-text-field{width:var(--sapphire-text-field-size-width-control);outline:solid var(--sapphire-text-field-size-width-border) var(--sapphire-text-field-color-border-default);outline-offset:calc(0px - var(--sapphire-text-field-size-width-border));box-sizing:border-box;overflow-x:hidden;display:flex;align-items:center;border-radius:var(--sapphire-text-field-size-radius);cursor:text;color:var(--sapphire-text-field-color-content);background-color:var(--sapphire-text-field-color-background);height:var(--sapphire-text-field-size-height-field-l);font-family:var(--sapphire-text-field-font-name);font-size:var(--sapphire-text-field-size-font-content-l);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.sapphire-text-field--medium{height:var(--sapphire-text-field-size-height-field-m);font-size:var(--sapphire-text-field-size-font-content-m)}.sapphire-text-field__input{box-sizing:border-box;width:100%;height:100%;margin:0;padding:0 var(--sapphire-text-field-size-spacing-control-horizontal-l);line-height:var(--sapphire-text-field-size-line-height-content);font-family:inherit;font-size:inherit;font-weight:var(--sapphire-text-field-size-font-weight-input);caret-color:var(--sapphire-text-field-color-caret);color:inherit;background-color:transparent;border:none;outline:none}.sapphire-text-field--medium .sapphire-text-field__input{padding:0 var(--sapphire-text-field-size-spacing-control-horizontal-m)}.sapphire-text-field__input::placeholder{opacity:1;color:var(--sapphire-text-field-color-placeholder)}.sapphire-text-field__input--align-right{text-align:right}.sapphire-text-field:not(.sapphire-text-field--multiline){gap:var(--sapphire-text-field-size-spacing-control-gap)}.sapphire-text-field .sapphire-text-field__affix{color:var(--sapphire-text-field-color-affix);flex-shrink:0;z-index:1}.sapphire-text-field .sapphire-text-field__affix--icon{width:var(--sapphire-text-field-size-affix-icon-width-l);height:var(--sapphire-text-field-size-affix-icon-height-l)}.sapphire-text-field--medium .sapphire-text-field__affix--icon{width:var(--sapphire-text-field-size-affix-icon-width-m);height:var(--sapphire-text-field-size-affix-icon-height-m)}.sapphire-text-field--with-prefix{padding-left:var(--sapphire-text-field-size-spacing-control-horizontal-l)}.sapphire-text-field--medium .sapphire-text-field--with-prefix{padding-left:var(--sapphire-text-field-size-spacing-control-horizontal-m)}.sapphire-text-field--with-prefix .sapphire-text-field__input{padding-left:0}.sapphire-text-field--with-postfix{padding-right:var(--sapphire-text-field-size-spacing-control-horizontal-l)}.sapphire-text-field--medium .sapphire-text-field--with-postfix{padding-right:var(--sapphire-text-field-size-spacing-control-horizontal-m)}.sapphire-text-field--with-postfix .sapphire-text-field__input{padding-right:0}.sapphire-text-field--multiline{display:inline-block;line-height:0;height:unset;padding:0}.sapphire-text-field--multiline .sapphire-text-field__input{resize:none;width:100%;padding:var(--sapphire-text-field-size-spacing-control-vertical-l) var(--sapphire-text-field-size-spacing-control-horizontal-l);scroll-padding-bottom:var(--sapphire-text-field-size-spacing-control-vertical-l)}.sapphire-text-field--medium .sapphire-text-field--multiline .sapphire-text-field__input{padding:var(--sapphire-text-field-size-spacing-control-vertical-m) var(--sapphire-text-field-size-spacing-control-horizontal-m);scroll-padding-bottom:var(--sapphire-text-field-size-spacing-control-vertical-m)}.sapphire-text-field--multiline.sapphire-text-field--resizable .sapphire-text-field__input{resize:vertical}.sapphire-text-field__counter{color:var(--sapphire-text-field-color-counter-default);padding-left:var(--sapphire-text-field-size-spacing-note-horizontal);margin-left:auto}.sapphire-text-field__counter--error{color:var(--sapphire-text-field-color-counter-error)}.sapphire-text-field--error{outline:solid var(--sapphire-text-field-size-width-border) var(--sapphire-text-field-color-border-error)}.sapphire-text-field.is-focus,.sapphire-text-field:focus-within{outline:solid var(--sapphire-text-field-size-focus-ring) var(--sapphire-text-field-color-focus-ring);outline-offset:calc(0px - var(--sapphire-text-field-size-focus-ring))}.sapphire-text-field.is-focus .sapphire-text-field__input:-webkit-autofill,.sapphire-text-field:focus-within .sapphire-text-field__input:-webkit-autofill{box-shadow:0 0 0 var(--sapphire-text-field-size-height-field-l) inset var(--sapphire-text-field-color-background)!important}.sapphire-text-field.is-focus .sapphire-text-field__input:autofill,.sapphire-text-field:focus-within .sapphire-text-field__input:autofill{box-shadow:0 0 0 var(--sapphire-text-field-size-height-field-l) inset var(--sapphire-text-field-color-background)!important}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: FieldNoteSuffixDirective, selector: "[spFieldNoteSuffix]" }] });
|
|
2418
2438
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: TextFieldComponent, decorators: [{
|
|
2419
2439
|
type: Component,
|
|
2420
2440
|
args: [{ selector: 'sp-text-field', host: {
|
|
@@ -2429,7 +2449,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImpor
|
|
|
2429
2449
|
provide: FieldControl,
|
|
2430
2450
|
useExisting: forwardRef(() => TextFieldComponent),
|
|
2431
2451
|
},
|
|
2432
|
-
], hostDirectives: [ThemeCheckDirective, UseComponentStylesOnHost], template: "<ng-content\n select=\"sp-text-field-prefix\"\n *ngIf=\"!_inputDirective?.textarea\"\n></ng-content>\n<ng-content select=\"input\"></ng-content>\n<ng-content\n select=\"sp-text-field-postfix\"\n *ngIf=\"!_inputDirective?.textarea\"\n></ng-content>\n<ng-content select=\"textarea\"></ng-content>\n\n<span\n *ngIf=\"characterCounterMax !== undefined\"\n spFieldNoteSuffix\n class=\"sapphire-text-field__counter\"\n [class.sapphire-text-field__counter--error]=\"isCharacterCounterExceeded()\"\n >{{ _inputDirective?.valueLength }}/{{ characterCounterMax }}</span\n>\n", styles: [".sapphire-text-field{width:var(--sapphire-text-field-size-width-control);
|
|
2452
|
+
], hostDirectives: [ThemeCheckDirective, UseComponentStylesOnHost], template: "<ng-content\n select=\"sp-text-field-prefix\"\n *ngIf=\"!_inputDirective?.textarea\"\n></ng-content>\n<ng-content select=\"input\"></ng-content>\n<ng-content\n select=\"sp-text-field-postfix\"\n *ngIf=\"!_inputDirective?.textarea\"\n></ng-content>\n<ng-content select=\"textarea\"></ng-content>\n\n<span\n *ngIf=\"characterCounterMax !== undefined\"\n spFieldNoteSuffix\n class=\"sapphire-text-field__counter\"\n [class.sapphire-text-field__counter--error]=\"isCharacterCounterExceeded()\"\n >{{ _inputDirective?.valueLength }}/{{ characterCounterMax }}</span\n>\n", styles: [".sapphire-text-field{width:var(--sapphire-text-field-size-width-control);outline:solid var(--sapphire-text-field-size-width-border) var(--sapphire-text-field-color-border-default);outline-offset:calc(0px - var(--sapphire-text-field-size-width-border));box-sizing:border-box;overflow-x:hidden;display:flex;align-items:center;border-radius:var(--sapphire-text-field-size-radius);cursor:text;color:var(--sapphire-text-field-color-content);background-color:var(--sapphire-text-field-color-background);height:var(--sapphire-text-field-size-height-field-l);font-family:var(--sapphire-text-field-font-name);font-size:var(--sapphire-text-field-size-font-content-l);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.sapphire-text-field--medium{height:var(--sapphire-text-field-size-height-field-m);font-size:var(--sapphire-text-field-size-font-content-m)}.sapphire-text-field__input{box-sizing:border-box;width:100%;height:100%;margin:0;padding:0 var(--sapphire-text-field-size-spacing-control-horizontal-l);line-height:var(--sapphire-text-field-size-line-height-content);font-family:inherit;font-size:inherit;font-weight:var(--sapphire-text-field-size-font-weight-input);caret-color:var(--sapphire-text-field-color-caret);color:inherit;background-color:transparent;border:none;outline:none}.sapphire-text-field--medium .sapphire-text-field__input{padding:0 var(--sapphire-text-field-size-spacing-control-horizontal-m)}.sapphire-text-field__input::placeholder{opacity:1;color:var(--sapphire-text-field-color-placeholder)}.sapphire-text-field__input--align-right{text-align:right}.sapphire-text-field:not(.sapphire-text-field--multiline){gap:var(--sapphire-text-field-size-spacing-control-gap)}.sapphire-text-field .sapphire-text-field__affix{color:var(--sapphire-text-field-color-affix);flex-shrink:0;z-index:1}.sapphire-text-field .sapphire-text-field__affix--icon{width:var(--sapphire-text-field-size-affix-icon-width-l);height:var(--sapphire-text-field-size-affix-icon-height-l)}.sapphire-text-field--medium .sapphire-text-field__affix--icon{width:var(--sapphire-text-field-size-affix-icon-width-m);height:var(--sapphire-text-field-size-affix-icon-height-m)}.sapphire-text-field--with-prefix{padding-left:var(--sapphire-text-field-size-spacing-control-horizontal-l)}.sapphire-text-field--medium .sapphire-text-field--with-prefix{padding-left:var(--sapphire-text-field-size-spacing-control-horizontal-m)}.sapphire-text-field--with-prefix .sapphire-text-field__input{padding-left:0}.sapphire-text-field--with-postfix{padding-right:var(--sapphire-text-field-size-spacing-control-horizontal-l)}.sapphire-text-field--medium .sapphire-text-field--with-postfix{padding-right:var(--sapphire-text-field-size-spacing-control-horizontal-m)}.sapphire-text-field--with-postfix .sapphire-text-field__input{padding-right:0}.sapphire-text-field--multiline{display:inline-block;line-height:0;height:unset;padding:0}.sapphire-text-field--multiline .sapphire-text-field__input{resize:none;width:100%;padding:var(--sapphire-text-field-size-spacing-control-vertical-l) var(--sapphire-text-field-size-spacing-control-horizontal-l);scroll-padding-bottom:var(--sapphire-text-field-size-spacing-control-vertical-l)}.sapphire-text-field--medium .sapphire-text-field--multiline .sapphire-text-field__input{padding:var(--sapphire-text-field-size-spacing-control-vertical-m) var(--sapphire-text-field-size-spacing-control-horizontal-m);scroll-padding-bottom:var(--sapphire-text-field-size-spacing-control-vertical-m)}.sapphire-text-field--multiline.sapphire-text-field--resizable .sapphire-text-field__input{resize:vertical}.sapphire-text-field__counter{color:var(--sapphire-text-field-color-counter-default);padding-left:var(--sapphire-text-field-size-spacing-note-horizontal);margin-left:auto}.sapphire-text-field__counter--error{color:var(--sapphire-text-field-color-counter-error)}.sapphire-text-field--error{outline:solid var(--sapphire-text-field-size-width-border) var(--sapphire-text-field-color-border-error)}.sapphire-text-field.is-focus,.sapphire-text-field:focus-within{outline:solid var(--sapphire-text-field-size-focus-ring) var(--sapphire-text-field-color-focus-ring);outline-offset:calc(0px - var(--sapphire-text-field-size-focus-ring))}.sapphire-text-field.is-focus .sapphire-text-field__input:-webkit-autofill,.sapphire-text-field:focus-within .sapphire-text-field__input:-webkit-autofill{box-shadow:0 0 0 var(--sapphire-text-field-size-height-field-l) inset var(--sapphire-text-field-color-background)!important}.sapphire-text-field.is-focus .sapphire-text-field__input:autofill,.sapphire-text-field:focus-within .sapphire-text-field__input:autofill{box-shadow:0 0 0 var(--sapphire-text-field-size-height-field-l) inset var(--sapphire-text-field-color-background)!important}\n"] }]
|
|
2433
2453
|
}], ctorParameters: function () { return [{ type: FieldComponent, decorators: [{
|
|
2434
2454
|
type: Optional
|
|
2435
2455
|
}] }]; }, propDecorators: { characterCounterMax: [{
|
|
@@ -5207,9 +5227,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImpor
|
|
|
5207
5227
|
|
|
5208
5228
|
class TableCellDirective {
|
|
5209
5229
|
get role() {
|
|
5210
|
-
return this.
|
|
5211
|
-
? 'rowheader'
|
|
5212
|
-
: 'cell';
|
|
5230
|
+
return this.isFirstCellInRow ? 'rowheader' : 'cell';
|
|
5213
5231
|
}
|
|
5214
5232
|
/**
|
|
5215
5233
|
* Horizontal alignment of content in the cell.
|
|
@@ -5217,29 +5235,31 @@ class TableCellDirective {
|
|
|
5217
5235
|
* @default 'left'
|
|
5218
5236
|
*/
|
|
5219
5237
|
get align() {
|
|
5220
|
-
return
|
|
5221
|
-
this.tableRow.getColumnHeadCellProperty(this, 'align'));
|
|
5238
|
+
return this._align || this.headCell?.align;
|
|
5222
5239
|
}
|
|
5223
5240
|
set align(value) {
|
|
5224
5241
|
this._align = value;
|
|
5225
5242
|
}
|
|
5226
5243
|
get width() {
|
|
5227
|
-
return this.
|
|
5244
|
+
return this.headCell?.width;
|
|
5228
5245
|
}
|
|
5229
5246
|
get minWidth() {
|
|
5230
|
-
return this.
|
|
5247
|
+
return this.headCell?.minWidth;
|
|
5231
5248
|
}
|
|
5232
5249
|
get maxWidth() {
|
|
5233
|
-
return this.
|
|
5250
|
+
return this.headCell?.maxWidth;
|
|
5234
5251
|
}
|
|
5235
5252
|
constructor(table, truncatedWithTooltipDirective, tableRow) {
|
|
5236
5253
|
this.table = table;
|
|
5237
5254
|
this.truncatedWithTooltipDirective = truncatedWithTooltipDirective;
|
|
5238
5255
|
this.tableRow = tableRow;
|
|
5256
|
+
this.isFirstCellInRow = false;
|
|
5239
5257
|
}
|
|
5240
5258
|
ngAfterContentChecked() {
|
|
5241
5259
|
this.truncatedWithTooltipDirective.enabled =
|
|
5242
5260
|
this.table.cellOverflow === 'truncate';
|
|
5261
|
+
this.headCell = this.tableRow.getColumnHeadCell(this);
|
|
5262
|
+
this.isFirstCellInRow = this.tableRow.cells.toArray().indexOf(this) === 0;
|
|
5243
5263
|
}
|
|
5244
5264
|
}
|
|
5245
5265
|
TableCellDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: TableCellDirective, deps: [{ token: forwardRef(() => TableComponent) }, { token: TruncatedWithTooltipDirective }, { token: forwardRef(() => TableRowDirective) }], target: i0.ɵɵFactoryTarget.Directive });
|
|
@@ -5288,9 +5308,9 @@ class TableRowDirective {
|
|
|
5288
5308
|
rowData: this.rowData,
|
|
5289
5309
|
});
|
|
5290
5310
|
}
|
|
5291
|
-
|
|
5311
|
+
getColumnHeadCell(cell) {
|
|
5292
5312
|
const index = this.cells.toArray().indexOf(cell);
|
|
5293
|
-
return this.table.headCells?.toArray()[index]
|
|
5313
|
+
return this.table.headCells?.toArray()[index];
|
|
5294
5314
|
}
|
|
5295
5315
|
constructor(table) {
|
|
5296
5316
|
this.table = table;
|
|
@@ -7577,7 +7597,7 @@ class ContextualHelpComponent {
|
|
|
7577
7597
|
}
|
|
7578
7598
|
}
|
|
7579
7599
|
ContextualHelpComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: ContextualHelpComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7580
|
-
ContextualHelpComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: ContextualHelpComponent, isStandalone: true, selector: "sp-contextual-help", inputs: { variant: "variant", placement: "placement", ariaLabel: ["aria-label", "ariaLabel"] }, host: { properties: { "attr.aria-label": "null" } }, queries: [{ propertyName: "_footer", first: true, predicate: ContextualHelpFooterDirective, descendants: true }, { propertyName: "_header", first: true, predicate: ContextualHelpHeaderDirective, descendants: true }], viewQueries: [{ propertyName: "_trigger", first: true, predicate: PopoverTriggerDirective, descendants: true }], ngImport: i0, template: "<button\n sp-icon-button\n size=\"extraSmall\"\n variant=\"tertiary\"\n appearance=\"ghost\"\n [spPopoverTriggerFor]=\"popover\"\n [spPopoverPlacement]=\"placement\"\n [attr.aria-label]=\"ariaLabel\"\n>\n <sp-icon\n *ngIf=\"variant === 'help'; else defaultIcon\"\n name=\"questionMarkCircle\"\n size=\"16px\"\n ></sp-icon>\n <ng-template #defaultIcon>\n <sp-icon name=\"info\"></sp-icon>\n </ng-template>\n</button>\n\n<ng-template #popover>\n <sp-popover noPadding>\n <div class=\"sapphire-contextual-help\">\n <div *ngIf=\"_header\" class=\"sapphire-contextual-help__header\">\n <h6 sp-heading spPopoverTitle>\n <ng-content select=\"sp-contextual-help-header\"></ng-content>\n </h6>\n </div>\n <ng-content select=\"sp-contextual-help-content\"></ng-content>\n <div *ngIf=\"_footer\" class=\"sapphire-contextual-help__footer\">\n <ng-content select=\"sp-contextual-help-footer\"></ng-content>\n </div>\n </div>\n </sp-popover>\n</ng-template>\n", styles: [".sapphire-contextual-help{color:var(--sapphire-contextual-help-color-content);line-height:var(--sapphire-contextual-help-size-line-height);max-width:var(--sapphire-contextual-help-size-width-max);font-family:var(--sapphire-contextual-help-font-name);font-weight:var(--sapphire-contextual-help-font-weight);font-size:var(--sapphire-contextual-help-size-font);padding:var(--sapphire-contextual-help-size-spacing-vertical) var(--sapphire-contextual-help-size-spacing-horizontal);outline:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.sapphire-contextual-help__header{padding-bottom:var(--sapphire-contextual-help-size-spacing-header)}.sapphire-contextual-help__footer{padding-top:var(--sapphire-contextual-help-size-spacing-footer)}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: SapphireTypographyModule }, { kind: "component", type: HeadingComponent, selector: "h1[sp-heading],h2[sp-heading],h3[sp-heading],h4[sp-heading],h5[sp-heading],h6[sp-heading]", inputs: ["sp-heading", "fontVariant"] }, { kind: "ngmodule", type: SapphireButtonModule }, { kind: "component", type: IconButtonComponent, selector: "button[sp-icon-button], a[sp-icon-button]", inputs: ["variant", "appearance", "surface", "size", "disabled", "type"] }, { kind: "ngmodule", type: SapphireIconModule }, { kind: "component", type: IconComponent, selector: "sp-icon", inputs: ["name", "size"] }, { kind: "ngmodule", type: SapphirePopoverModule }, { kind: "component", type: PopoverComponent, selector: "sp-popover", inputs: ["noPadding", "noMaxWidth"] }, { kind: "directive", type: PopoverTriggerDirective, selector: "[spPopoverTriggerFor]", inputs: ["spPopoverPlacement", "spPopoverTriggerFor", "spPopoverNonModal", "spPopoverTriggerOpenOnPressStart", "spPopoverTriggerCloseOnScroll", "spPopoverTriggerDisabled"], outputs: ["spPopoverTriggerOpened", "spPopoverTriggerClosed"], exportAs: ["spPopoverTrigger"] }, { kind: "directive", type: PopoverTitleDirective, selector: "[spPopoverTitle]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7600
|
+
ContextualHelpComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: ContextualHelpComponent, isStandalone: true, selector: "sp-contextual-help", inputs: { variant: "variant", placement: "placement", ariaLabel: ["aria-label", "ariaLabel"] }, host: { properties: { "attr.aria-label": "null" } }, queries: [{ propertyName: "_footer", first: true, predicate: ContextualHelpFooterDirective, descendants: true }, { propertyName: "_header", first: true, predicate: ContextualHelpHeaderDirective, descendants: true }], viewQueries: [{ propertyName: "_trigger", first: true, predicate: PopoverTriggerDirective, descendants: true }], ngImport: i0, template: "<button\n sp-icon-button\n size=\"extraSmall\"\n variant=\"tertiary\"\n appearance=\"ghost\"\n [spPopoverTriggerFor]=\"popover\"\n [spPopoverPlacement]=\"placement\"\n [attr.aria-label]=\"ariaLabel\"\n>\n <sp-icon\n *ngIf=\"variant === 'help'; else defaultIcon\"\n name=\"questionMarkCircle\"\n size=\"16px\"\n ></sp-icon>\n <ng-template #defaultIcon>\n <sp-icon name=\"info\"></sp-icon>\n </ng-template>\n</button>\n\n<ng-template #popover>\n <sp-popover noPadding>\n <div class=\"sapphire-contextual-help\">\n <div *ngIf=\"_header\" class=\"sapphire-contextual-help__header\">\n <h6 sp-heading spPopoverTitle>\n <ng-content select=\"sp-contextual-help-header\"></ng-content>\n </h6>\n </div>\n <ng-content select=\"sp-contextual-help-content\"></ng-content>\n <div *ngIf=\"_footer\" class=\"sapphire-contextual-help__footer\">\n <ng-content select=\"sp-contextual-help-footer\"></ng-content>\n </div>\n </div>\n </sp-popover>\n</ng-template>\n", styles: [".sapphire-contextual-help{color:var(--sapphire-contextual-help-color-content);line-height:var(--sapphire-contextual-help-size-line-height);max-width:var(--sapphire-contextual-help-size-width-max);font-family:var(--sapphire-contextual-help-font-name);font-weight:var(--sapphire-contextual-help-font-weight);font-size:var(--sapphire-contextual-help-size-font);padding:var(--sapphire-contextual-help-size-spacing-vertical) var(--sapphire-contextual-help-size-spacing-horizontal);outline:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.sapphire-contextual-help__header{padding-bottom:var(--sapphire-contextual-help-size-spacing-header)}.sapphire-contextual-help__footer{padding-top:var(--sapphire-contextual-help-size-spacing-footer)}.sapphire-contextual-help--no-max-width{max-width:initial}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: SapphireTypographyModule }, { kind: "component", type: HeadingComponent, selector: "h1[sp-heading],h2[sp-heading],h3[sp-heading],h4[sp-heading],h5[sp-heading],h6[sp-heading]", inputs: ["sp-heading", "fontVariant"] }, { kind: "ngmodule", type: SapphireButtonModule }, { kind: "component", type: IconButtonComponent, selector: "button[sp-icon-button], a[sp-icon-button]", inputs: ["variant", "appearance", "surface", "size", "disabled", "type"] }, { kind: "ngmodule", type: SapphireIconModule }, { kind: "component", type: IconComponent, selector: "sp-icon", inputs: ["name", "size"] }, { kind: "ngmodule", type: SapphirePopoverModule }, { kind: "component", type: PopoverComponent, selector: "sp-popover", inputs: ["noPadding", "noMaxWidth"] }, { kind: "directive", type: PopoverTriggerDirective, selector: "[spPopoverTriggerFor]", inputs: ["spPopoverPlacement", "spPopoverTriggerFor", "spPopoverNonModal", "spPopoverTriggerOpenOnPressStart", "spPopoverTriggerCloseOnScroll", "spPopoverTriggerDisabled"], outputs: ["spPopoverTriggerOpened", "spPopoverTriggerClosed"], exportAs: ["spPopoverTrigger"] }, { kind: "directive", type: PopoverTitleDirective, selector: "[spPopoverTitle]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7581
7601
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: ContextualHelpComponent, decorators: [{
|
|
7582
7602
|
type: Component,
|
|
7583
7603
|
args: [{ selector: 'sp-contextual-help', standalone: true, imports: [
|
|
@@ -7588,7 +7608,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImpor
|
|
|
7588
7608
|
SapphirePopoverModule,
|
|
7589
7609
|
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
7590
7610
|
'[attr.aria-label]': 'null',
|
|
7591
|
-
}, template: "<button\n sp-icon-button\n size=\"extraSmall\"\n variant=\"tertiary\"\n appearance=\"ghost\"\n [spPopoverTriggerFor]=\"popover\"\n [spPopoverPlacement]=\"placement\"\n [attr.aria-label]=\"ariaLabel\"\n>\n <sp-icon\n *ngIf=\"variant === 'help'; else defaultIcon\"\n name=\"questionMarkCircle\"\n size=\"16px\"\n ></sp-icon>\n <ng-template #defaultIcon>\n <sp-icon name=\"info\"></sp-icon>\n </ng-template>\n</button>\n\n<ng-template #popover>\n <sp-popover noPadding>\n <div class=\"sapphire-contextual-help\">\n <div *ngIf=\"_header\" class=\"sapphire-contextual-help__header\">\n <h6 sp-heading spPopoverTitle>\n <ng-content select=\"sp-contextual-help-header\"></ng-content>\n </h6>\n </div>\n <ng-content select=\"sp-contextual-help-content\"></ng-content>\n <div *ngIf=\"_footer\" class=\"sapphire-contextual-help__footer\">\n <ng-content select=\"sp-contextual-help-footer\"></ng-content>\n </div>\n </div>\n </sp-popover>\n</ng-template>\n", styles: [".sapphire-contextual-help{color:var(--sapphire-contextual-help-color-content);line-height:var(--sapphire-contextual-help-size-line-height);max-width:var(--sapphire-contextual-help-size-width-max);font-family:var(--sapphire-contextual-help-font-name);font-weight:var(--sapphire-contextual-help-font-weight);font-size:var(--sapphire-contextual-help-size-font);padding:var(--sapphire-contextual-help-size-spacing-vertical) var(--sapphire-contextual-help-size-spacing-horizontal);outline:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.sapphire-contextual-help__header{padding-bottom:var(--sapphire-contextual-help-size-spacing-header)}.sapphire-contextual-help__footer{padding-top:var(--sapphire-contextual-help-size-spacing-footer)}\n"] }]
|
|
7611
|
+
}, template: "<button\n sp-icon-button\n size=\"extraSmall\"\n variant=\"tertiary\"\n appearance=\"ghost\"\n [spPopoverTriggerFor]=\"popover\"\n [spPopoverPlacement]=\"placement\"\n [attr.aria-label]=\"ariaLabel\"\n>\n <sp-icon\n *ngIf=\"variant === 'help'; else defaultIcon\"\n name=\"questionMarkCircle\"\n size=\"16px\"\n ></sp-icon>\n <ng-template #defaultIcon>\n <sp-icon name=\"info\"></sp-icon>\n </ng-template>\n</button>\n\n<ng-template #popover>\n <sp-popover noPadding>\n <div class=\"sapphire-contextual-help\">\n <div *ngIf=\"_header\" class=\"sapphire-contextual-help__header\">\n <h6 sp-heading spPopoverTitle>\n <ng-content select=\"sp-contextual-help-header\"></ng-content>\n </h6>\n </div>\n <ng-content select=\"sp-contextual-help-content\"></ng-content>\n <div *ngIf=\"_footer\" class=\"sapphire-contextual-help__footer\">\n <ng-content select=\"sp-contextual-help-footer\"></ng-content>\n </div>\n </div>\n </sp-popover>\n</ng-template>\n", styles: [".sapphire-contextual-help{color:var(--sapphire-contextual-help-color-content);line-height:var(--sapphire-contextual-help-size-line-height);max-width:var(--sapphire-contextual-help-size-width-max);font-family:var(--sapphire-contextual-help-font-name);font-weight:var(--sapphire-contextual-help-font-weight);font-size:var(--sapphire-contextual-help-size-font);padding:var(--sapphire-contextual-help-size-spacing-vertical) var(--sapphire-contextual-help-size-spacing-horizontal);outline:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.sapphire-contextual-help__header{padding-bottom:var(--sapphire-contextual-help-size-spacing-header)}.sapphire-contextual-help__footer{padding-top:var(--sapphire-contextual-help-size-spacing-footer)}.sapphire-contextual-help--no-max-width{max-width:initial}\n"] }]
|
|
7592
7612
|
}], propDecorators: { variant: [{
|
|
7593
7613
|
type: Input
|
|
7594
7614
|
}], placement: [{
|