@skyux/layout 6.3.3 → 6.6.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.
@@ -14,7 +14,7 @@ import * as i3$1 from '@skyux/theme';
14
14
  import { SkyThemeModule } from '@skyux/theme';
15
15
  import { __classPrivateFieldSet, __classPrivateFieldGet } from 'tslib';
16
16
  import * as i1 from '@skyux/core';
17
- import { SkyMediaBreakpoints, SkyDockModule, SkyCoreAdapterService } from '@skyux/core';
17
+ import { SkyMediaBreakpoints, SkyDockModule, SkyCoreAdapterService, SkyTrimModule } from '@skyux/core';
18
18
  import { Subject, BehaviorSubject, forkJoin } from 'rxjs';
19
19
  import { takeUntil, take } from 'rxjs/operators';
20
20
  import * as i1$1 from '@skyux/i18n';
@@ -683,10 +683,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
683
683
  class SkyBoxComponent {
684
684
  }
685
685
  SkyBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
686
- SkyBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyBoxComponent, selector: "sky-box", inputs: { ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy", ariaRole: "ariaRole" }, ngImport: i0, template: "<section\n class=\"sky-box\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.role]=\"ariaRole\"\n [skyThemeClass]=\"{\n 'sky-shadow sky-border-dark': 'default',\n 'sky-elevation-1-bordered': 'modern'\n }\"\n>\n <div class=\"sky-box-header-content\">\n <ng-content select=\"sky-box-header\"></ng-content>\n <ng-content select=\"sky-box-controls\"></ng-content>\n </div>\n <ng-content></ng-content>\n</section>\n", styles: [".sky-box{background-color:#fff}.sky-box .sky-box-header-content{display:flex;flex-direction:row;flex-wrap:wrap;align-items:baseline;padding:20px 20px 0}.sky-box .sky-box-header-content:empty{display:none}.sky-box .sky-box-header-content sky-box-header{flex:1 0;order:0}.sky-box .sky-box-header-content sky-box-header .sky-box-header{padding:0 20px 0 0}.sky-box .sky-box-header-content sky-box-header .sky-box-header h1,.sky-box .sky-box-header-content sky-box-header .sky-box-header h2,.sky-box .sky-box-header-content sky-box-header .sky-box-header h3,.sky-box .sky-box-header-content sky-box-header .sky-box-header h4,.sky-box .sky-box-header-content sky-box-header .sky-box-header h5,.sky-box .sky-box-header-content sky-box-header .sky-box-header h6{margin:0}.sky-box .sky-box-header-content sky-box-controls{order:1}.sky-box .sky-box-header-content sky-box-controls .sky-box-controls{position:relative;top:-2px}.sky-box sky-box-content{flex:0 1 100%;order:2}.sky-box sky-box-content .sky-box-content{padding:20px}.sky-theme-modern .sky-box{border-radius:6px;overflow:hidden}.sky-theme-modern .sky-box .sky-box-header-content{padding:30px 30px 0}.sky-theme-modern .sky-box .sky-box-header-content sky-box-header .sky-box-header{padding:0 30px 0 0}.sky-theme-modern .sky-box sky-box-content .sky-box-content{padding:30px}\n"], directives: [{ type: i3$1.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }], encapsulation: i0.ViewEncapsulation.None });
686
+ SkyBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyBoxComponent, selector: "sky-box", inputs: { ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy", ariaRole: "ariaRole" }, ngImport: i0, template: "<section\n class=\"sky-box\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.role]=\"ariaRole\"\n [skyThemeClass]=\"{\n 'sky-shadow sky-border-dark': 'default',\n 'sky-elevation-1-bordered': 'modern'\n }\"\n>\n <div class=\"sky-box-header-content\">\n <ng-content select=\"sky-box-header\"></ng-content>\n <ng-content select=\"sky-box-controls\"></ng-content>\n </div>\n <ng-content></ng-content>\n</section>\n", styles: [".sky-box{background-color:#fff}.sky-box .sky-box-header-content{display:flex;flex-direction:row;flex-wrap:wrap;align-items:baseline;padding:20px 20px 0}.sky-box .sky-box-header-content:empty{display:none}.sky-box .sky-box-header-content sky-box-header{flex:1 0;order:0}.sky-box .sky-box-header-content sky-box-header .sky-box-header{padding:0 20px 0 0}.sky-box .sky-box-header-content sky-box-header .sky-box-header h1,.sky-box .sky-box-header-content sky-box-header .sky-box-header h2,.sky-box .sky-box-header-content sky-box-header .sky-box-header h3,.sky-box .sky-box-header-content sky-box-header .sky-box-header h4,.sky-box .sky-box-header-content sky-box-header .sky-box-header h5,.sky-box .sky-box-header-content sky-box-header .sky-box-header h6{margin:0}.sky-box .sky-box-header-content sky-box-controls{order:1;margin-left:auto}.sky-box .sky-box-header-content sky-box-controls .sky-box-controls{position:relative;top:-2px}.sky-box sky-box-content{flex:0 1 100%;order:2}.sky-box sky-box-content .sky-box-content{padding:20px}.sky-theme-modern .sky-box{border-radius:6px;overflow:hidden}.sky-theme-modern .sky-box .sky-box-header-content{padding:30px 30px 0}.sky-theme-modern .sky-box .sky-box-header-content sky-box-header .sky-box-header{padding:0 30px 0 0}.sky-theme-modern .sky-box sky-box-content .sky-box-content{padding:30px}\n"], directives: [{ type: i3$1.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }], encapsulation: i0.ViewEncapsulation.None });
687
687
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyBoxComponent, decorators: [{
688
688
  type: Component,
689
- args: [{ selector: 'sky-box', encapsulation: ViewEncapsulation.None, template: "<section\n class=\"sky-box\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.role]=\"ariaRole\"\n [skyThemeClass]=\"{\n 'sky-shadow sky-border-dark': 'default',\n 'sky-elevation-1-bordered': 'modern'\n }\"\n>\n <div class=\"sky-box-header-content\">\n <ng-content select=\"sky-box-header\"></ng-content>\n <ng-content select=\"sky-box-controls\"></ng-content>\n </div>\n <ng-content></ng-content>\n</section>\n", styles: [".sky-box{background-color:#fff}.sky-box .sky-box-header-content{display:flex;flex-direction:row;flex-wrap:wrap;align-items:baseline;padding:20px 20px 0}.sky-box .sky-box-header-content:empty{display:none}.sky-box .sky-box-header-content sky-box-header{flex:1 0;order:0}.sky-box .sky-box-header-content sky-box-header .sky-box-header{padding:0 20px 0 0}.sky-box .sky-box-header-content sky-box-header .sky-box-header h1,.sky-box .sky-box-header-content sky-box-header .sky-box-header h2,.sky-box .sky-box-header-content sky-box-header .sky-box-header h3,.sky-box .sky-box-header-content sky-box-header .sky-box-header h4,.sky-box .sky-box-header-content sky-box-header .sky-box-header h5,.sky-box .sky-box-header-content sky-box-header .sky-box-header h6{margin:0}.sky-box .sky-box-header-content sky-box-controls{order:1}.sky-box .sky-box-header-content sky-box-controls .sky-box-controls{position:relative;top:-2px}.sky-box sky-box-content{flex:0 1 100%;order:2}.sky-box sky-box-content .sky-box-content{padding:20px}.sky-theme-modern .sky-box{border-radius:6px;overflow:hidden}.sky-theme-modern .sky-box .sky-box-header-content{padding:30px 30px 0}.sky-theme-modern .sky-box .sky-box-header-content sky-box-header .sky-box-header{padding:0 30px 0 0}.sky-theme-modern .sky-box sky-box-content .sky-box-content{padding:30px}\n"] }]
689
+ args: [{ selector: 'sky-box', encapsulation: ViewEncapsulation.None, template: "<section\n class=\"sky-box\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.role]=\"ariaRole\"\n [skyThemeClass]=\"{\n 'sky-shadow sky-border-dark': 'default',\n 'sky-elevation-1-bordered': 'modern'\n }\"\n>\n <div class=\"sky-box-header-content\">\n <ng-content select=\"sky-box-header\"></ng-content>\n <ng-content select=\"sky-box-controls\"></ng-content>\n </div>\n <ng-content></ng-content>\n</section>\n", styles: [".sky-box{background-color:#fff}.sky-box .sky-box-header-content{display:flex;flex-direction:row;flex-wrap:wrap;align-items:baseline;padding:20px 20px 0}.sky-box .sky-box-header-content:empty{display:none}.sky-box .sky-box-header-content sky-box-header{flex:1 0;order:0}.sky-box .sky-box-header-content sky-box-header .sky-box-header{padding:0 20px 0 0}.sky-box .sky-box-header-content sky-box-header .sky-box-header h1,.sky-box .sky-box-header-content sky-box-header .sky-box-header h2,.sky-box .sky-box-header-content sky-box-header .sky-box-header h3,.sky-box .sky-box-header-content sky-box-header .sky-box-header h4,.sky-box .sky-box-header-content sky-box-header .sky-box-header h5,.sky-box .sky-box-header-content sky-box-header .sky-box-header h6{margin:0}.sky-box .sky-box-header-content sky-box-controls{order:1;margin-left:auto}.sky-box .sky-box-header-content sky-box-controls .sky-box-controls{position:relative;top:-2px}.sky-box sky-box-content{flex:0 1 100%;order:2}.sky-box sky-box-content .sky-box-content{padding:20px}.sky-theme-modern .sky-box{border-radius:6px;overflow:hidden}.sky-theme-modern .sky-box .sky-box-header-content{padding:30px 30px 0}.sky-theme-modern .sky-box .sky-box-header-content sky-box-header .sky-box-header{padding:0 30px 0 0}.sky-theme-modern .sky-box sky-box-content .sky-box-content{padding:30px}\n"] }]
690
690
  }], propDecorators: { ariaLabel: [{
691
691
  type: Input
692
692
  }], ariaLabelledBy: [{
@@ -1404,15 +1404,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
1404
1404
  }] } });
1405
1405
 
1406
1406
  /**
1407
- * Specifies the term in a term-description pair.
1407
+ * Specifies the term in a term-description pair. To display a help button beside
1408
+ * the term, include a help button element in the sky-description-list-term element
1409
+ * and a sky-control-help CSS class on that element.
1408
1410
  */
1409
1411
  class SkyDescriptionListTermComponent {
1410
1412
  }
1411
1413
  SkyDescriptionListTermComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyDescriptionListTermComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1412
- SkyDescriptionListTermComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyDescriptionListTermComponent, selector: "sky-description-list-term", viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["termTemplateRef"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<ng-template #termTemplateRef>\n <ng-content></ng-content>\n</ng-template>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
1414
+ SkyDescriptionListTermComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyDescriptionListTermComponent, selector: "sky-description-list-term", viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["termTemplateRef"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<ng-template #termTemplateRef\n ><span skyTrim><ng-content></ng-content></span\n ><span class=\"sky-description-list-term-help\"\n ><ng-content select=\".sky-control-help\"></ng-content></span\n></ng-template>\n", styles: [".sky-description-list-term-help:not(:empty){margin-left:var(--sky-margin-inline-sm)}\n"], directives: [{ type: i1.λ4, selector: "[skyTrim]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1413
1415
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyDescriptionListTermComponent, decorators: [{
1414
1416
  type: Component,
1415
- args: [{ selector: 'sky-description-list-term', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #termTemplateRef>\n <ng-content></ng-content>\n</ng-template>\n" }]
1417
+ args: [{ selector: 'sky-description-list-term', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #termTemplateRef\n ><span skyTrim><ng-content></ng-content></span\n ><span class=\"sky-description-list-term-help\"\n ><ng-content select=\".sky-control-help\"></ng-content></span\n></ng-template>\n", styles: [".sky-description-list-term-help:not(:empty){margin-left:var(--sky-margin-inline-sm)}\n"] }]
1416
1418
  }], propDecorators: { templateRef: [{
1417
1419
  type: ViewChild,
1418
1420
  args: ['termTemplateRef', {
@@ -1578,7 +1580,8 @@ SkyDescriptionListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0"
1578
1580
  SkyDescriptionListDescriptionComponent], imports: [CommonModule,
1579
1581
  SkyI18nModule,
1580
1582
  SkyLayoutResourcesModule,
1581
- SkyThemeModule], exports: [SkyDescriptionListComponent,
1583
+ SkyThemeModule,
1584
+ SkyTrimModule], exports: [SkyDescriptionListComponent,
1582
1585
  SkyDescriptionListContentComponent,
1583
1586
  SkyDescriptionListTermComponent,
1584
1587
  SkyDescriptionListDescriptionComponent] });
@@ -1587,6 +1590,7 @@ SkyDescriptionListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0"
1587
1590
  SkyI18nModule,
1588
1591
  SkyLayoutResourcesModule,
1589
1592
  SkyThemeModule,
1593
+ SkyTrimModule,
1590
1594
  ]] });
1591
1595
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyDescriptionListModule, decorators: [{
1592
1596
  type: NgModule,
@@ -1602,6 +1606,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
1602
1606
  SkyI18nModule,
1603
1607
  SkyLayoutResourcesModule,
1604
1608
  SkyThemeModule,
1609
+ SkyTrimModule,
1605
1610
  ],
1606
1611
  exports: [
1607
1612
  SkyDescriptionListComponent,
@@ -1875,6 +1880,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
1875
1880
  * @internal
1876
1881
  */
1877
1882
  class SkyPageThemeAdapterService {
1883
+ /**
1884
+ * We can't use ViewEncapsulation.None for this behavior because Angular does
1885
+ * not remove `style` tags from the HEAD element after route changes.
1886
+ * @see https://github.com/angular/angular/issues/16670
1887
+ */
1878
1888
  addTheme() {
1879
1889
  if (!this.styleEl) {
1880
1890
  this.styleEl = document.createElement('style');
@@ -1896,9 +1906,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
1896
1906
  }] });
1897
1907
 
1898
1908
  /**
1899
- * Resets the SPA's background to white and adds the `sky-theme-default` CSS class to the host
1900
- * element to let consumers override CSS styling. Consumers can override any element by writing
1901
- * CSS selectors like this: `:host-context(.sky-theme-default) .my-class {}`.
1909
+ * Sets the correct background color for a page.
1902
1910
  */
1903
1911
  class SkyPageComponent {
1904
1912
  constructor(themeAdapter) {
@@ -1912,10 +1920,10 @@ class SkyPageComponent {
1912
1920
  }
1913
1921
  }
1914
1922
  SkyPageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyPageComponent, deps: [{ token: SkyPageThemeAdapterService }], target: i0.ɵɵFactoryTarget.Component });
1915
- SkyPageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyPageComponent, selector: "sky-page", providers: [SkyPageThemeAdapterService], ngImport: i0, template: "<div class=\"sky-theme-default\">\n <ng-content></ng-content>\n</div>\n" });
1923
+ SkyPageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyPageComponent, selector: "sky-page", providers: [SkyPageThemeAdapterService], ngImport: i0, template: "<div>\n <ng-content></ng-content>\n</div>\n" });
1916
1924
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyPageComponent, decorators: [{
1917
1925
  type: Component,
1918
- args: [{ selector: 'sky-page', providers: [SkyPageThemeAdapterService], template: "<div class=\"sky-theme-default\">\n <ng-content></ng-content>\n</div>\n" }]
1926
+ args: [{ selector: 'sky-page', providers: [SkyPageThemeAdapterService], template: "<div>\n <ng-content></ng-content>\n</div>\n" }]
1919
1927
  }], ctorParameters: function () { return [{ type: SkyPageThemeAdapterService }]; } });
1920
1928
 
1921
1929
  class SkyPageModule {