@skyux/layout 6.3.2 → 6.3.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/documentation.json +547 -547
- package/esm2020/lib/modules/action-button/action-button-container.component.mjs +27 -10
- package/fesm2015/skyux-layout.mjs +26 -9
- package/fesm2015/skyux-layout.mjs.map +1 -1
- package/fesm2020/skyux-layout.mjs +26 -9
- package/fesm2020/skyux-layout.mjs.map +1 -1
- package/lib/modules/action-button/action-button-container.component.d.ts +4 -3
- package/package.json +9 -9
|
@@ -12,6 +12,7 @@ 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
17
|
import { SkyMediaBreakpoints, SkyDockModule, SkyCoreAdapterService } from '@skyux/core';
|
|
17
18
|
import { Subject, BehaviorSubject, forkJoin } from 'rxjs';
|
|
@@ -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: [{
|