@skyux/layout 15.0.0-alpha.2 → 15.0.0-alpha.3
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/fesm2022/skyux-layout.mjs +19 -10
- package/fesm2022/skyux-layout.mjs.map +1 -1
- package/package.json +11 -11
- package/types/skyux-layout.d.ts +2 -2
|
@@ -11,7 +11,7 @@ import { SkyHrefModule } from '@skyux/router';
|
|
|
11
11
|
import * as i1$1 from '@skyux/theme';
|
|
12
12
|
import { SkyThemeService, SkyThemeComponentClassDirective, SkyThemeModule } from '@skyux/theme';
|
|
13
13
|
import * as i2$2 from '@skyux/core';
|
|
14
|
-
import { SkyCoreAdapterService, SkyMediaQueryService, SkyScrollableHostService, SkyAppWindowRef, SkyDockService, SkyContentInfoProvider, SkyLogService, SkyIdService, SkyTrimModule, _SkyAnimationEndHandlerDirective, SkyIdModule, _SkyTransitionEndHandlerDirective } from '@skyux/core';
|
|
14
|
+
import { SkyCoreAdapterService, SkyMediaQueryService, SkyScrollableHostService, SkyAppWindowRef, SkyDockService, SkyContentInfoProvider, SkyLogService, SkyIdService, SkyTrimModule, _SkyAnimationEndHandlerDirective, SkyResizeObserverService, SkyIdModule, _SkyTransitionEndHandlerDirective } from '@skyux/core';
|
|
15
15
|
import { Subject, BehaviorSubject, forkJoin } from 'rxjs';
|
|
16
16
|
import { takeUntil, take } from 'rxjs/operators';
|
|
17
17
|
import { toSignal } from '@angular/core/rxjs-interop';
|
|
@@ -1561,6 +1561,7 @@ class SkyDescriptionListComponent {
|
|
|
1561
1561
|
#adapterService = inject(SkyDescriptionListAdapterService);
|
|
1562
1562
|
#changeDetector = inject(ChangeDetectorRef);
|
|
1563
1563
|
#descriptionListService = inject(SkyDescriptionListService);
|
|
1564
|
+
#resizeObserverSvc = inject(SkyResizeObserverService);
|
|
1564
1565
|
ngAfterContentInit() {
|
|
1565
1566
|
// Wait for all content to render before detecting parent width.
|
|
1566
1567
|
setTimeout(() => {
|
|
@@ -1575,13 +1576,24 @@ class SkyDescriptionListComponent {
|
|
|
1575
1576
|
});
|
|
1576
1577
|
}
|
|
1577
1578
|
}
|
|
1579
|
+
ngAfterViewInit() {
|
|
1580
|
+
// Recalculate the responsive class whenever the container size changes so
|
|
1581
|
+
// the layout stays correct for containers that are hidden (width 0) or
|
|
1582
|
+
// resized after the initial measurement, such as inactive tab content that
|
|
1583
|
+
// is later revealed — not just on window resize.
|
|
1584
|
+
if (this.elementRef) {
|
|
1585
|
+
this.#resizeObserverSvc
|
|
1586
|
+
.observe(this.elementRef)
|
|
1587
|
+
.pipe(takeUntil(this.#ngUnsubscribe))
|
|
1588
|
+
.subscribe(() => {
|
|
1589
|
+
this.#updateResponsiveClass();
|
|
1590
|
+
});
|
|
1591
|
+
}
|
|
1592
|
+
}
|
|
1578
1593
|
ngOnDestroy() {
|
|
1579
1594
|
this.#ngUnsubscribe.next();
|
|
1580
1595
|
this.#ngUnsubscribe.complete();
|
|
1581
1596
|
}
|
|
1582
|
-
onWindowResize() {
|
|
1583
|
-
this.#updateResponsiveClass();
|
|
1584
|
-
}
|
|
1585
1597
|
#updateResponsiveClass() {
|
|
1586
1598
|
if (this.elementRef) {
|
|
1587
1599
|
this.#adapterService.setResponsiveClass(this.elementRef);
|
|
@@ -1589,7 +1601,7 @@ class SkyDescriptionListComponent {
|
|
|
1589
1601
|
}
|
|
1590
1602
|
}
|
|
1591
1603
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SkyDescriptionListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1592
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: SkyDescriptionListComponent, isStandalone: false, selector: "sky-description-list", inputs: { defaultDescription: "defaultDescription", listItemWidth: "listItemWidth", mode: "mode" },
|
|
1604
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: SkyDescriptionListComponent, isStandalone: false, selector: "sky-description-list", inputs: { defaultDescription: "defaultDescription", listItemWidth: "listItemWidth", mode: "mode" }, providers: [SkyDescriptionListAdapterService, SkyDescriptionListService], queries: [{ propertyName: "contentComponents", predicate: SkyDescriptionListContentComponent }], viewQueries: [{ propertyName: "elementRef", first: true, predicate: ["descriptionListElement"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<dl\n #descriptionListElement\n class=\"sky-description-list\"\n [ngClass]=\"{\n 'sky-description-list-long-description-mode': mode === 'longDescription',\n 'sky-description-list-vertical-mode': mode === 'vertical',\n 'sky-description-list-horizontal-mode': mode === 'horizontal'\n }\"\n>\n <!--\n Wrapping div is for horizontal flexing. Also injecting children's templateRef directly\n to avoid adding non-semantic HTML tags to DOM\n -->\n @for (contentComponent of contentComponents; track contentComponent) {\n <div\n class=\"sky-description-list-content\"\n [style.width]=\"mode === 'horizontal' ? listItemWidth : ''\"\n >\n @for (\n termComponent of contentComponent?.termComponents;\n track termComponent\n ) {\n <dt>\n @if (termComponent.templateRef) {\n <ng-container *ngTemplateOutlet=\"termComponent.templateRef\" />\n }\n </dt>\n }\n @for (\n descriptionComponent of contentComponent?.descriptionComponents;\n track descriptionComponent\n ) {\n <dd>\n @if (descriptionComponent.templateRef) {\n <ng-container\n *ngTemplateOutlet=\"descriptionComponent.templateRef\"\n />\n }\n </dd>\n }\n </div>\n }\n</dl>\n", styles: [".sky-description-list:not(.sky-theme-modern *){--sky-override-description-list-term-color: #686c73;--sky-override-description-list-term-font-size: 14px;--sky-override-description-list-term-font-weight: 400;--sky-override-description-list-term-font-line-height: normal;--sky-override-description-list-term-bottom-margin: 3px;--sky-override-description-list-pair-bottom-margin: 15px;--sky-override-description-list-horizontal-pair-padding-right: 60px;--sky-override-description-list-long-bottom-margin: 10px;--sky-override-description-list-long-term-font-weight: 600;--sky-override-description-list-long-term-font-size: 16px;--sky-override-description-list-long-term-font-color: #212327;--sky-override-description-list-long-term-right-margin: 20px;--sky-override-description-list-long-term-bottom-margin-xs: 3px;--sky-override-description-list-long-pair-bottom-margin: 10px}:host{display:block}.sky-description-list{margin:0;padding:0}.sky-description-list dt{color:var(--sky-override-description-list-term-color, var(--sky-color-text-deemphasized));font-size:var(--sky-override-description-list-term-font-size, var(--sky-font-size-body-s));font-weight:var(--sky-override-description-list-term-font-weight, var(--sky-font-style-body-s));line-height:var(--sky-override-description-list-term-font-line-height, var(--sky-font-line_height-body-s));margin:0 0 var(--sky-override-description-list-term-bottom-margin, var(--sky-space-gap-label-xs));white-space:nowrap}.sky-description-list dd{margin:0;padding:0}.sky-description-list.sky-description-list-vertical-mode .sky-description-list-content{width:auto}.sky-description-list.sky-description-list-vertical-mode .sky-description-list-content:not(:last-child){margin:0 0 var(--sky-override-description-list-pair-bottom-margin, var(--sky-space-stacked-l))}.sky-description-list.sky-description-list-horizontal-mode{display:flex;flex-wrap:wrap;margin:0 0 calc(-1 * var(--sky-override-description-list-pair-bottom-margin, var(--sky-space-stacked-l)))}.sky-description-list.sky-description-list-horizontal-mode .sky-description-list-content{margin:0 0 var(--sky-override-description-list-pair-bottom-margin, var(--sky-space-stacked-l));padding:0 var(--sky-override-description-list-horizontal-pair-padding-right, var(--sky-space-inline-xxl)) 0 0;min-width:100px;width:auto}.sky-description-list.sky-description-list-horizontal-mode.sky-responsive-container-xs .sky-description-list-content,.sky-description-list.sky-description-list-horizontal-mode.sky-responsive-container-sm .sky-description-list-content{width:50%}.sky-description-list.sky-description-list-long-description-mode .sky-description-list-content{display:flex}.sky-description-list.sky-description-list-long-description-mode .sky-description-list-content:not(:last-child){margin:0 0 var(--sky-override-description-list-long-bottom-margin, var(--sky-space-stacked-s))}.sky-description-list.sky-description-list-long-description-mode .sky-description-list-content dt{color:var(--sky-override-description-list-long-term-font-color, inherit);font-size:var(--sky-override-description-list-long-term-font-size, inherit);font-weight:var(--sky-override-description-list-long-term-font-weight, var(--sky-font-style-emphasized));margin:0 var(--sky-override-description-list-long-term-right-margin, var(--sky-space-inline-l)) 0 0;width:25%;overflow-wrap:break-word}.sky-description-list.sky-description-list-long-description-mode .sky-description-list-content dd{flex:1}.sky-description-list.sky-description-list-long-description-mode.sky-responsive-container-xs .sky-description-list-content{flex-direction:column}.sky-description-list.sky-description-list-long-description-mode.sky-responsive-container-xs .sky-description-list-content dt{margin:0 0 var(--sky-override-description-list-long-term-bottom-margin-xs, var(--sky-space-stacked-xs));width:100%}.sky-description-list.sky-description-list-long-description-mode.sky-responsive-container-xs .sky-description-list-content dd{margin:0 0 var(--sky-override-description-list-long-pair-bottom-margin, var(--sky-space-stacked-l))}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1593
1605
|
}
|
|
1594
1606
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SkyDescriptionListComponent, decorators: [{
|
|
1595
1607
|
type: Component,
|
|
@@ -1609,9 +1621,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
1609
1621
|
read: ElementRef,
|
|
1610
1622
|
static: true,
|
|
1611
1623
|
}]
|
|
1612
|
-
}], onWindowResize: [{
|
|
1613
|
-
type: HostListener,
|
|
1614
|
-
args: ['window:resize']
|
|
1615
1624
|
}] } });
|
|
1616
1625
|
|
|
1617
1626
|
class SkyDescriptionListModule {
|
|
@@ -2072,11 +2081,11 @@ class SkyPageSummaryComponent {
|
|
|
2072
2081
|
});
|
|
2073
2082
|
}
|
|
2074
2083
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SkyPageSummaryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2075
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.6", type: SkyPageSummaryComponent, isStandalone: false, selector: "sky-page-summary", providers: [SkyPageSummaryAdapterService], queries: [{ propertyName: "keyInfoComponents", predicate: SkyPageSummaryKeyInfoComponent, isSignal: true }], ngImport: i0, template: "<div\n class=\"sky-page-summary\"\n [ngClass]=\"{\n 'sky-page-summary-with-key-info': keyInfoComponents().length > 0\n }\"\n>\n <ng-content select=\"sky-page-summary-alert\" />\n <div class=\"sky-page-summary-row\">\n <div class=\"sky-page-summary-left\">\n <ng-content select=\"sky-page-summary-image\" />\n <div class=\"sky-page-summary-data\">\n <ng-content select=\"sky-page-summary-title\" />\n <ng-content select=\"sky-page-summary-subtitle\" />\n <ng-content select=\"sky-page-summary-status\" />\n <div class=\"sky-page-summary-key-info-xs\"></div>\n <ng-content select=\"sky-page-summary-content\" />\n </div>\n </div>\n <div class=\"sky-page-summary-key-info-sm\">\n <div class=\"sky-page-summary-key-info-container\">\n <ng-content select=\"sky-page-summary-key-info\" />\n </div>\n </div>\n </div>\n</div>\n", styles: [".sky-page-summary{background-color
|
|
2084
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.6", type: SkyPageSummaryComponent, isStandalone: false, selector: "sky-page-summary", providers: [SkyPageSummaryAdapterService], queries: [{ propertyName: "keyInfoComponents", predicate: SkyPageSummaryKeyInfoComponent, isSignal: true }], ngImport: i0, template: "<div\n class=\"sky-page-summary\"\n [ngClass]=\"{\n 'sky-page-summary-with-key-info': keyInfoComponents().length > 0\n }\"\n>\n <ng-content select=\"sky-page-summary-alert\" />\n <div class=\"sky-page-summary-row\">\n <div class=\"sky-page-summary-left\">\n <ng-content select=\"sky-page-summary-image\" />\n <div class=\"sky-page-summary-data\">\n <ng-content select=\"sky-page-summary-title\" />\n <ng-content select=\"sky-page-summary-subtitle\" />\n <ng-content select=\"sky-page-summary-status\" />\n <div class=\"sky-page-summary-key-info-xs\"></div>\n <ng-content select=\"sky-page-summary-content\" />\n </div>\n </div>\n <div class=\"sky-page-summary-key-info-sm\">\n <div class=\"sky-page-summary-key-info-container\">\n <ng-content select=\"sky-page-summary-key-info\" />\n </div>\n </div>\n </div>\n</div>\n", styles: [".sky-page-summary:not(.sky-theme-modern *){--sky-override-page-summary-background-color: #fff}.sky-page-summary{background-color:var(--sky-override-page-summary-background-color, var(--sky-color-background-page));padding:20px 15px}.sky-page-summary-row{align-items:stretch;display:flex}:host .sky-page-summary-left{flex-basis:100%;display:initial;align-items:initial}:host .sky-page-summary-with-key-info .sky-page-summary-left{flex-basis:100%;padding-right:initial}:host-context(.sky-responsive-container-xs) .sky-page-summary-left,:host-context(.sky-responsive-container-sm) .sky-page-summary-left,:host-context(.sky-responsive-container-md) .sky-page-summary-left,:host-context(.sky-responsive-container-lg) .sky-page-summary-left{flex-basis:100%;display:initial;align-items:initial}:host-context(.sky-responsive-container-xs) .sky-page-summary-with-key-info .sky-page-summary-left,:host-context(.sky-responsive-container-sm) .sky-page-summary-with-key-info .sky-page-summary-left,:host-context(.sky-responsive-container-md) .sky-page-summary-with-key-info .sky-page-summary-left,:host-context(.sky-responsive-container-lg) .sky-page-summary-with-key-info .sky-page-summary-left{flex-basis:100%;padding-right:initial}@media(min-width:768px){:host .sky-page-summary-with-key-info .sky-page-summary-left{flex-basis:75%;padding-right:15px}:host .sky-page-summary-with-key-info .sky-page-summary-right{flex-basis:25%}:host .sky-page-summary-left{align-items:stretch;display:flex}:host .sky-page-summary-data{flex-grow:1}}:host-context(.sky-responsive-container-sm) .sky-page-summary-with-key-info .sky-page-summary-left,:host-context(.sky-responsive-container-md) .sky-page-summary-with-key-info .sky-page-summary-left,:host-context(.sky-responsive-container-lg) .sky-page-summary-with-key-info .sky-page-summary-left{flex-basis:75%;padding-right:15px}:host-context(.sky-responsive-container-sm) .sky-page-summary-with-key-info .sky-page-summary-right,:host-context(.sky-responsive-container-md) .sky-page-summary-with-key-info .sky-page-summary-right,:host-context(.sky-responsive-container-lg) .sky-page-summary-with-key-info .sky-page-summary-right{flex-basis:25%}:host-context(.sky-responsive-container-sm) .sky-page-summary-left,:host-context(.sky-responsive-container-md) .sky-page-summary-left,:host-context(.sky-responsive-container-lg) .sky-page-summary-left{align-items:stretch;display:flex}:host-context(.sky-responsive-container-sm) .sky-page-summary-data,:host-context(.sky-responsive-container-md) .sky-page-summary-data,:host-context(.sky-responsive-container-lg) .sky-page-summary-data{flex-grow:1}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
|
|
2076
2085
|
}
|
|
2077
2086
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SkyPageSummaryComponent, decorators: [{
|
|
2078
2087
|
type: Component,
|
|
2079
|
-
args: [{ selector: 'sky-page-summary', providers: [SkyPageSummaryAdapterService], changeDetection: ChangeDetectionStrategy.Eager, standalone: false, template: "<div\n class=\"sky-page-summary\"\n [ngClass]=\"{\n 'sky-page-summary-with-key-info': keyInfoComponents().length > 0\n }\"\n>\n <ng-content select=\"sky-page-summary-alert\" />\n <div class=\"sky-page-summary-row\">\n <div class=\"sky-page-summary-left\">\n <ng-content select=\"sky-page-summary-image\" />\n <div class=\"sky-page-summary-data\">\n <ng-content select=\"sky-page-summary-title\" />\n <ng-content select=\"sky-page-summary-subtitle\" />\n <ng-content select=\"sky-page-summary-status\" />\n <div class=\"sky-page-summary-key-info-xs\"></div>\n <ng-content select=\"sky-page-summary-content\" />\n </div>\n </div>\n <div class=\"sky-page-summary-key-info-sm\">\n <div class=\"sky-page-summary-key-info-container\">\n <ng-content select=\"sky-page-summary-key-info\" />\n </div>\n </div>\n </div>\n</div>\n", styles: [".sky-page-summary{background-color
|
|
2088
|
+
args: [{ selector: 'sky-page-summary', providers: [SkyPageSummaryAdapterService], changeDetection: ChangeDetectionStrategy.Eager, standalone: false, template: "<div\n class=\"sky-page-summary\"\n [ngClass]=\"{\n 'sky-page-summary-with-key-info': keyInfoComponents().length > 0\n }\"\n>\n <ng-content select=\"sky-page-summary-alert\" />\n <div class=\"sky-page-summary-row\">\n <div class=\"sky-page-summary-left\">\n <ng-content select=\"sky-page-summary-image\" />\n <div class=\"sky-page-summary-data\">\n <ng-content select=\"sky-page-summary-title\" />\n <ng-content select=\"sky-page-summary-subtitle\" />\n <ng-content select=\"sky-page-summary-status\" />\n <div class=\"sky-page-summary-key-info-xs\"></div>\n <ng-content select=\"sky-page-summary-content\" />\n </div>\n </div>\n <div class=\"sky-page-summary-key-info-sm\">\n <div class=\"sky-page-summary-key-info-container\">\n <ng-content select=\"sky-page-summary-key-info\" />\n </div>\n </div>\n </div>\n</div>\n", styles: [".sky-page-summary:not(.sky-theme-modern *){--sky-override-page-summary-background-color: #fff}.sky-page-summary{background-color:var(--sky-override-page-summary-background-color, var(--sky-color-background-page));padding:20px 15px}.sky-page-summary-row{align-items:stretch;display:flex}:host .sky-page-summary-left{flex-basis:100%;display:initial;align-items:initial}:host .sky-page-summary-with-key-info .sky-page-summary-left{flex-basis:100%;padding-right:initial}:host-context(.sky-responsive-container-xs) .sky-page-summary-left,:host-context(.sky-responsive-container-sm) .sky-page-summary-left,:host-context(.sky-responsive-container-md) .sky-page-summary-left,:host-context(.sky-responsive-container-lg) .sky-page-summary-left{flex-basis:100%;display:initial;align-items:initial}:host-context(.sky-responsive-container-xs) .sky-page-summary-with-key-info .sky-page-summary-left,:host-context(.sky-responsive-container-sm) .sky-page-summary-with-key-info .sky-page-summary-left,:host-context(.sky-responsive-container-md) .sky-page-summary-with-key-info .sky-page-summary-left,:host-context(.sky-responsive-container-lg) .sky-page-summary-with-key-info .sky-page-summary-left{flex-basis:100%;padding-right:initial}@media(min-width:768px){:host .sky-page-summary-with-key-info .sky-page-summary-left{flex-basis:75%;padding-right:15px}:host .sky-page-summary-with-key-info .sky-page-summary-right{flex-basis:25%}:host .sky-page-summary-left{align-items:stretch;display:flex}:host .sky-page-summary-data{flex-grow:1}}:host-context(.sky-responsive-container-sm) .sky-page-summary-with-key-info .sky-page-summary-left,:host-context(.sky-responsive-container-md) .sky-page-summary-with-key-info .sky-page-summary-left,:host-context(.sky-responsive-container-lg) .sky-page-summary-with-key-info .sky-page-summary-left{flex-basis:75%;padding-right:15px}:host-context(.sky-responsive-container-sm) .sky-page-summary-with-key-info .sky-page-summary-right,:host-context(.sky-responsive-container-md) .sky-page-summary-with-key-info .sky-page-summary-right,:host-context(.sky-responsive-container-lg) .sky-page-summary-with-key-info .sky-page-summary-right{flex-basis:25%}:host-context(.sky-responsive-container-sm) .sky-page-summary-left,:host-context(.sky-responsive-container-md) .sky-page-summary-left,:host-context(.sky-responsive-container-lg) .sky-page-summary-left{align-items:stretch;display:flex}:host-context(.sky-responsive-container-sm) .sky-page-summary-data,:host-context(.sky-responsive-container-md) .sky-page-summary-data,:host-context(.sky-responsive-container-lg) .sky-page-summary-data{flex-grow:1}\n"] }]
|
|
2080
2089
|
}], ctorParameters: () => [], propDecorators: { keyInfoComponents: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SkyPageSummaryKeyInfoComponent), { isSignal: true }] }] } });
|
|
2081
2090
|
|
|
2082
2091
|
/**
|