@skyux/layout 6.3.1 → 6.4.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/documentation.json +561 -561
- package/esm2020/lib/modules/action-button/action-button-container.component.mjs +27 -10
- package/esm2020/lib/modules/description-list/description-list-term.component.mjs +7 -4
- package/esm2020/lib/modules/description-list/description-list.module.mjs +6 -2
- package/esm2020/lib/modules/page/page-theme-adapter.service.mjs +6 -1
- package/esm2020/lib/modules/page/page.component.mjs +4 -6
- package/fesm2015/skyux-layout.mjs +44 -19
- package/fesm2015/skyux-layout.mjs.map +1 -1
- package/fesm2020/skyux-layout.mjs +44 -19
- package/fesm2020/skyux-layout.mjs.map +1 -1
- package/lib/modules/action-button/action-button-container.component.d.ts +4 -3
- package/lib/modules/description-list/description-list-term.component.d.ts +4 -2
- package/lib/modules/description-list/description-list.module.d.ts +2 -1
- package/lib/modules/page/page-theme-adapter.service.d.ts +5 -0
- package/lib/modules/page/page.component.d.ts +1 -3
- package/package.json +9 -9
|
@@ -12,8 +12,9 @@ import * as i4 from '@skyux/router';
|
|
|
12
12
|
import { SkyHrefModule } from '@skyux/router';
|
|
13
13
|
import * as i3$1 from '@skyux/theme';
|
|
14
14
|
import { SkyThemeModule } from '@skyux/theme';
|
|
15
|
+
import { __classPrivateFieldSet, __classPrivateFieldGet } from 'tslib';
|
|
15
16
|
import * as i1 from '@skyux/core';
|
|
16
|
-
import { SkyMediaBreakpoints, SkyDockModule, SkyCoreAdapterService } from '@skyux/core';
|
|
17
|
+
import { SkyMediaBreakpoints, SkyDockModule, SkyCoreAdapterService, SkyTrimModule } from '@skyux/core';
|
|
17
18
|
import { Subject, BehaviorSubject, forkJoin } from 'rxjs';
|
|
18
19
|
import { takeUntil, take } from 'rxjs/operators';
|
|
19
20
|
import * as i1$1 from '@skyux/i18n';
|
|
@@ -110,6 +111,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
110
111
|
type: Output
|
|
111
112
|
}] } });
|
|
112
113
|
|
|
114
|
+
var _SkyActionButtonContainerComponent_viewInitialized;
|
|
113
115
|
/**
|
|
114
116
|
* Wraps action buttons to ensures that they have consistent height and spacing.
|
|
115
117
|
* @required
|
|
@@ -122,6 +124,7 @@ class SkyActionButtonContainerComponent {
|
|
|
122
124
|
this.hostElRef = hostElRef;
|
|
123
125
|
this.themeSvc = themeSvc;
|
|
124
126
|
this.ngUnsubscribe = new Subject();
|
|
127
|
+
_SkyActionButtonContainerComponent_viewInitialized.set(this, false);
|
|
125
128
|
}
|
|
126
129
|
/**
|
|
127
130
|
* Specifies how to display the action buttons inside the action button container.
|
|
@@ -154,7 +157,7 @@ class SkyActionButtonContainerComponent {
|
|
|
154
157
|
this.updateResponsiveClass();
|
|
155
158
|
});
|
|
156
159
|
}
|
|
157
|
-
|
|
160
|
+
ngAfterViewInit() {
|
|
158
161
|
// Watch for dynamic action button changes and recalculate height.
|
|
159
162
|
/* istanbul ignore else */
|
|
160
163
|
if (this.actionButtons) {
|
|
@@ -164,6 +167,8 @@ class SkyActionButtonContainerComponent {
|
|
|
164
167
|
this.updateHeight();
|
|
165
168
|
});
|
|
166
169
|
}
|
|
170
|
+
__classPrivateFieldSet(this, _SkyActionButtonContainerComponent_viewInitialized, true, "f");
|
|
171
|
+
this.updateHeight();
|
|
167
172
|
}
|
|
168
173
|
ngOnDestroy() {
|
|
169
174
|
this.ngUnsubscribe.next();
|
|
@@ -175,14 +180,25 @@ class SkyActionButtonContainerComponent {
|
|
|
175
180
|
onWindowResize() {
|
|
176
181
|
this.updateResponsiveClass();
|
|
177
182
|
}
|
|
178
|
-
updateHeight() {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
183
|
+
updateHeight(delay = 0) {
|
|
184
|
+
if (__classPrivateFieldGet(this, _SkyActionButtonContainerComponent_viewInitialized, "f")) {
|
|
185
|
+
const ref = this.containerRef;
|
|
186
|
+
this.coreAdapterService.resetHeight(ref, '.sky-action-button');
|
|
187
|
+
if (this._themeName === 'modern') {
|
|
188
|
+
// Wait for children components to complete rendering before height is determined.
|
|
189
|
+
clearTimeout(this.syncMaxHeightTimeout);
|
|
190
|
+
this.syncMaxHeightTimeout = setTimeout(() => {
|
|
191
|
+
const selector = '.sky-action-button:not([hidden])';
|
|
192
|
+
const button = ref.nativeElement.querySelector(selector);
|
|
193
|
+
if (button && button.offsetHeight > 0) {
|
|
194
|
+
this.coreAdapterService.syncMaxHeight(ref, selector);
|
|
195
|
+
}
|
|
196
|
+
else if (delay < 200) {
|
|
197
|
+
// Wait progressively longer between retries.
|
|
198
|
+
this.updateHeight(delay + 50);
|
|
199
|
+
}
|
|
200
|
+
}, delay);
|
|
201
|
+
}
|
|
186
202
|
}
|
|
187
203
|
}
|
|
188
204
|
updateResponsiveClass() {
|
|
@@ -190,6 +206,7 @@ class SkyActionButtonContainerComponent {
|
|
|
190
206
|
this.actionButtonAdapterService.setResponsiveClass(this.containerRef, parentWidth);
|
|
191
207
|
}
|
|
192
208
|
}
|
|
209
|
+
_SkyActionButtonContainerComponent_viewInitialized = new WeakMap();
|
|
193
210
|
SkyActionButtonContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyActionButtonContainerComponent, deps: [{ token: SkyActionButtonAdapterService }, { token: i0.ChangeDetectorRef }, { token: i1.SkyCoreAdapterService }, { token: i0.ElementRef }, { token: i3$1.SkyThemeService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
194
211
|
SkyActionButtonContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyActionButtonContainerComponent, selector: "sky-action-button-container", inputs: { alignItems: "alignItems" }, host: { listeners: { "window:resize": "onWindowResize()" } }, providers: [SkyActionButtonAdapterService], queries: [{ propertyName: "actionButtons", predicate: SkyActionButtonComponent }], viewQueries: [{ propertyName: "containerRef", first: true, predicate: ["container"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<div class=\"sky-action-button-container\" #container>\n <div\n class=\"sky-action-button-flex\"\n [ngClass]=\"{\n 'sky-action-button-flex-align-left': alignItems === 'left',\n 'sky-action-button-flex-align-center': alignItems === 'center'\n }\"\n (cdkObserveContent)=\"onContentChange()\"\n >\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [":host{display:block}.sky-action-button-flex sky-action-button{display:block}.sky-action-button-flex .sky-action-button{height:100%;min-width:236px;margin-left:10px;margin-right:10px}.sky-action-button-flex{display:block;padding:0}.sky-action-button-flex sky-action-button{margin:20px 0}.sky-responsive-container-xs .sky-action-button-flex,.sky-responsive-container-sm .sky-action-button-flex,.sky-responsive-container-md .sky-action-button-flex,.sky-responsive-container-lg .sky-action-button-flex{display:block;padding:0}.sky-responsive-container-xs .sky-action-button-flex sky-action-button,.sky-responsive-container-sm .sky-action-button-flex sky-action-button,.sky-responsive-container-md .sky-action-button-flex sky-action-button,.sky-responsive-container-lg .sky-action-button-flex sky-action-button{margin:20px 0}@media (min-width: 768px){.sky-action-button-flex{display:flex;flex-flow:row wrap;padding:10px 0}.sky-action-button-flex.sky-action-button-flex-align-center{justify-content:center}.sky-action-button-flex.sky-action-button-flex-align-left{justify-content:flex-start}.sky-action-button-flex sky-action-button{margin:10px 0}}.sky-responsive-container-sm .sky-action-button-flex,.sky-responsive-container-md .sky-action-button-flex,.sky-responsive-container-lg .sky-action-button-flex{display:flex;flex-flow:row wrap;padding:10px 0}.sky-responsive-container-sm .sky-action-button-flex.sky-action-button-flex-align-center,.sky-responsive-container-md .sky-action-button-flex.sky-action-button-flex-align-center,.sky-responsive-container-lg .sky-action-button-flex.sky-action-button-flex-align-center{justify-content:center}.sky-responsive-container-sm .sky-action-button-flex.sky-action-button-flex-align-left,.sky-responsive-container-md .sky-action-button-flex.sky-action-button-flex-align-left,.sky-responsive-container-lg .sky-action-button-flex.sky-action-button-flex-align-left{justify-content:flex-start}.sky-responsive-container-sm .sky-action-button-flex sky-action-button,.sky-responsive-container-md .sky-action-button-flex sky-action-button,.sky-responsive-container-lg .sky-action-button-flex sky-action-button{margin:10px 0}.sky-theme-modern .sky-action-button-container{margin:0 auto}.sky-theme-modern .sky-action-button-container.sky-action-button-container-sm{max-width:446px}.sky-theme-modern .sky-action-button-container.sky-action-button-container-md{max-width:912px}.sky-theme-modern .sky-action-button-container.sky-action-button-container-lg{max-width:1378px}.sky-theme-modern .sky-action-button-container .sky-action-button-flex .sky-action-button{height:auto;min-width:auto;margin:0}.sky-theme-modern .sky-action-button-flex{display:flex;flex-flow:row wrap;padding:0;margin:0 0 -20px -20px}.sky-theme-modern .sky-action-button-flex sky-action-button{margin:0 0 20px 20px;flex:0 1 446px}.sky-theme-modern .sky-responsive-container-xs .sky-action-button-flex,.sky-theme-modern .sky-responsive-container-sm .sky-action-button-flex,.sky-theme-modern .sky-responsive-container-md .sky-action-button-flex,.sky-theme-modern .sky-responsive-container-lg .sky-action-button-flex{display:flex;flex-flow:row wrap;padding:0;margin:0 0 -20px -20px}.sky-theme-modern .sky-responsive-container-xs .sky-action-button-flex sky-action-button,.sky-theme-modern .sky-responsive-container-sm .sky-action-button-flex sky-action-button,.sky-theme-modern .sky-responsive-container-md .sky-action-button-flex sky-action-button,.sky-theme-modern .sky-responsive-container-lg .sky-action-button-flex sky-action-button{margin:0 0 20px 20px;flex:0 1 446px}\n"], directives: [{ type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5.CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
195
212
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyActionButtonContainerComponent, decorators: [{
|
|
@@ -1387,15 +1404,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
1387
1404
|
}] } });
|
|
1388
1405
|
|
|
1389
1406
|
/**
|
|
1390
|
-
* 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.
|
|
1391
1410
|
*/
|
|
1392
1411
|
class SkyDescriptionListTermComponent {
|
|
1393
1412
|
}
|
|
1394
1413
|
SkyDescriptionListTermComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyDescriptionListTermComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1395
|
-
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
|
|
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 });
|
|
1396
1415
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyDescriptionListTermComponent, decorators: [{
|
|
1397
1416
|
type: Component,
|
|
1398
|
-
args: [{ selector: 'sky-description-list-term', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #termTemplateRef
|
|
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"] }]
|
|
1399
1418
|
}], propDecorators: { templateRef: [{
|
|
1400
1419
|
type: ViewChild,
|
|
1401
1420
|
args: ['termTemplateRef', {
|
|
@@ -1561,7 +1580,8 @@ SkyDescriptionListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0"
|
|
|
1561
1580
|
SkyDescriptionListDescriptionComponent], imports: [CommonModule,
|
|
1562
1581
|
SkyI18nModule,
|
|
1563
1582
|
SkyLayoutResourcesModule,
|
|
1564
|
-
SkyThemeModule
|
|
1583
|
+
SkyThemeModule,
|
|
1584
|
+
SkyTrimModule], exports: [SkyDescriptionListComponent,
|
|
1565
1585
|
SkyDescriptionListContentComponent,
|
|
1566
1586
|
SkyDescriptionListTermComponent,
|
|
1567
1587
|
SkyDescriptionListDescriptionComponent] });
|
|
@@ -1570,6 +1590,7 @@ SkyDescriptionListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0"
|
|
|
1570
1590
|
SkyI18nModule,
|
|
1571
1591
|
SkyLayoutResourcesModule,
|
|
1572
1592
|
SkyThemeModule,
|
|
1593
|
+
SkyTrimModule,
|
|
1573
1594
|
]] });
|
|
1574
1595
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyDescriptionListModule, decorators: [{
|
|
1575
1596
|
type: NgModule,
|
|
@@ -1585,6 +1606,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
1585
1606
|
SkyI18nModule,
|
|
1586
1607
|
SkyLayoutResourcesModule,
|
|
1587
1608
|
SkyThemeModule,
|
|
1609
|
+
SkyTrimModule,
|
|
1588
1610
|
],
|
|
1589
1611
|
exports: [
|
|
1590
1612
|
SkyDescriptionListComponent,
|
|
@@ -1858,6 +1880,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
1858
1880
|
* @internal
|
|
1859
1881
|
*/
|
|
1860
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
|
+
*/
|
|
1861
1888
|
addTheme() {
|
|
1862
1889
|
if (!this.styleEl) {
|
|
1863
1890
|
this.styleEl = document.createElement('style');
|
|
@@ -1879,9 +1906,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
1879
1906
|
}] });
|
|
1880
1907
|
|
|
1881
1908
|
/**
|
|
1882
|
-
*
|
|
1883
|
-
* element to let consumers override CSS styling. Consumers can override any element by writing
|
|
1884
|
-
* CSS selectors like this: `:host-context(.sky-theme-default) .my-class {}`.
|
|
1909
|
+
* Sets the correct background color for a page.
|
|
1885
1910
|
*/
|
|
1886
1911
|
class SkyPageComponent {
|
|
1887
1912
|
constructor(themeAdapter) {
|
|
@@ -1895,10 +1920,10 @@ class SkyPageComponent {
|
|
|
1895
1920
|
}
|
|
1896
1921
|
}
|
|
1897
1922
|
SkyPageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyPageComponent, deps: [{ token: SkyPageThemeAdapterService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1898
|
-
SkyPageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyPageComponent, selector: "sky-page", providers: [SkyPageThemeAdapterService], ngImport: i0, template: "<div
|
|
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" });
|
|
1899
1924
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyPageComponent, decorators: [{
|
|
1900
1925
|
type: Component,
|
|
1901
|
-
args: [{ selector: 'sky-page', providers: [SkyPageThemeAdapterService], template: "<div
|
|
1926
|
+
args: [{ selector: 'sky-page', providers: [SkyPageThemeAdapterService], template: "<div>\n <ng-content></ng-content>\n</div>\n" }]
|
|
1902
1927
|
}], ctorParameters: function () { return [{ type: SkyPageThemeAdapterService }]; } });
|
|
1903
1928
|
|
|
1904
1929
|
class SkyPageModule {
|