@kumori/aurora-wui-components 0.0.299-dev4447.2 → 0.0.299-dev4447.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/dist/components/axebow-summary/axebow-summary-card.d.ts +10 -0
- package/dist/components/axebow-summary/axebow-summary-card.d.ts.map +1 -1
- package/dist/index.js +35 -2
- package/dist/index.js.map +1 -1
- package/dist/playground/schemas/axebow-summary-card.schema.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,17 @@ export declare class AxebowSummaryCard extends LitElement {
|
|
|
4
4
|
title: string;
|
|
5
5
|
cardWidth: string;
|
|
6
6
|
cardHeight: string;
|
|
7
|
+
fitContent: boolean;
|
|
7
8
|
isSummaryOpen: boolean;
|
|
9
|
+
private _fitsViewport;
|
|
10
|
+
private _card?;
|
|
11
|
+
private _resizeObserver?;
|
|
12
|
+
connectedCallback(): void;
|
|
13
|
+
disconnectedCallback(): void;
|
|
14
|
+
protected firstUpdated(): void;
|
|
15
|
+
private _updateFitsViewport;
|
|
16
|
+
private get _positionClass();
|
|
17
|
+
private get _heightClass();
|
|
8
18
|
render(): import('lit-html').TemplateResult<1>;
|
|
9
19
|
private _renderHeader;
|
|
10
20
|
private _toggleMobileSummary;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axebow-summary-card.d.ts","sourceRoot":"","sources":["../../../src/components/axebow-summary/axebow-summary-card.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAwB,MAAM,KAAK,CAAC;AAIvD,OAAO,+BAA+B,CAAC;AACvC,OAAO,qCAAqC,CAAC;AAC7C,OAAO,uDAAuD,CAAC;AAE/D,qBACa,iBAAkB,SAAQ,UAAU;IAC/C,MAAM,CAAC,MAAM,4BAoBX;IAE0B,KAAK,SAAa;IAClB,SAAS,SAAe;IACxB,UAAU,SAAM;
|
|
1
|
+
{"version":3,"file":"axebow-summary-card.d.ts","sourceRoot":"","sources":["../../../src/components/axebow-summary/axebow-summary-card.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAwB,MAAM,KAAK,CAAC;AAIvD,OAAO,+BAA+B,CAAC;AACvC,OAAO,qCAAqC,CAAC;AAC7C,OAAO,uDAAuD,CAAC;AAE/D,qBACa,iBAAkB,SAAQ,UAAU;IAC/C,MAAM,CAAC,MAAM,4BAoBX;IAE0B,KAAK,SAAa;IAClB,SAAS,SAAe;IACxB,UAAU,SAAM;IACf,UAAU,UAAS;IAEvC,aAAa,UAAQ;IACrB,OAAO,CAAC,aAAa,CAAQ;IAER,OAAO,CAAC,KAAK,CAAC,CAAc;IAC1D,OAAO,CAAC,eAAe,CAAC,CAAiB;IAEzC,iBAAiB;IAKjB,oBAAoB;IAMpB,SAAS,CAAC,YAAY;IAOtB,OAAO,CAAC,mBAAmB,CAIzB;IAEF,OAAO,KAAK,cAAc,GAEzB;IAED,OAAO,KAAK,YAAY,GAGvB;IAED,MAAM;IAyBN,OAAO,CAAC,aAAa;IAmBrB,OAAO,CAAC,oBAAoB;IAMrB,cAAc;CAMtB"}
|
package/dist/index.js
CHANGED
|
@@ -10978,7 +10978,7 @@ var AxebowDeploySummary = class AxebowDeploySummary extends LitElement {
|
|
|
10978
10978
|
}
|
|
10979
10979
|
render() {
|
|
10980
10980
|
return html`
|
|
10981
|
-
<axebow-summary-card title="${this.summaryTitle}">
|
|
10981
|
+
<axebow-summary-card title="${this.summaryTitle}" fitContent>
|
|
10982
10982
|
${this.showDownloadButton ? html`
|
|
10983
10983
|
<axebow-button slot="header-actions" variant="text" size="medium" @click=${this._handleDownloadBundle}>
|
|
10984
10984
|
<axebow-icon
|
|
@@ -11605,7 +11605,14 @@ var AxebowSummaryCard = class AxebowSummaryCard extends LitElement {
|
|
|
11605
11605
|
this.title = "Summary";
|
|
11606
11606
|
this.cardWidth = "24.125rem";
|
|
11607
11607
|
this.cardHeight = "";
|
|
11608
|
+
this.fitContent = false;
|
|
11608
11609
|
this.isSummaryOpen = true;
|
|
11610
|
+
this._fitsViewport = true;
|
|
11611
|
+
this._updateFitsViewport = () => {
|
|
11612
|
+
if (!this._card) return;
|
|
11613
|
+
const top = parseFloat(getComputedStyle(this._card).top) || 0;
|
|
11614
|
+
this._fitsViewport = this._card.getBoundingClientRect().height + top <= window.innerHeight;
|
|
11615
|
+
};
|
|
11609
11616
|
}
|
|
11610
11617
|
static {
|
|
11611
11618
|
this.styles = [
|
|
@@ -11630,10 +11637,33 @@ var AxebowSummaryCard = class AxebowSummaryCard extends LitElement {
|
|
|
11630
11637
|
`
|
|
11631
11638
|
];
|
|
11632
11639
|
}
|
|
11640
|
+
connectedCallback() {
|
|
11641
|
+
super.connectedCallback();
|
|
11642
|
+
window.addEventListener("resize", this._updateFitsViewport);
|
|
11643
|
+
}
|
|
11644
|
+
disconnectedCallback() {
|
|
11645
|
+
super.disconnectedCallback();
|
|
11646
|
+
window.removeEventListener("resize", this._updateFitsViewport);
|
|
11647
|
+
this._resizeObserver?.disconnect();
|
|
11648
|
+
}
|
|
11649
|
+
firstUpdated() {
|
|
11650
|
+
if (!this._card) return;
|
|
11651
|
+
this._resizeObserver = new ResizeObserver(this._updateFitsViewport);
|
|
11652
|
+
this._resizeObserver.observe(this._card);
|
|
11653
|
+
this._updateFitsViewport();
|
|
11654
|
+
}
|
|
11655
|
+
get _positionClass() {
|
|
11656
|
+
return this.fitContent && !this._fitsViewport ? "static" : "lg:sticky static";
|
|
11657
|
+
}
|
|
11658
|
+
get _heightClass() {
|
|
11659
|
+
if (this.cardHeight) return "lg:min-h-(--card-height)";
|
|
11660
|
+
return this.fitContent ? "" : "lg:min-h-[calc(100vh-7.25rem)]";
|
|
11661
|
+
}
|
|
11633
11662
|
render() {
|
|
11634
11663
|
return html`
|
|
11635
11664
|
<div
|
|
11636
|
-
|
|
11665
|
+
data-summary-card
|
|
11666
|
+
class="w-full lg:w-(--card-width) ${this._positionClass} top-25 h-auto ${this._heightClass} rounded-md z-10 transition-all duration-300"
|
|
11637
11667
|
style="--card-width: ${this.cardWidth}; --card-height: ${this.cardHeight};"
|
|
11638
11668
|
>
|
|
11639
11669
|
<sl-card
|
|
@@ -11683,7 +11713,10 @@ var AxebowSummaryCard = class AxebowSummaryCard extends LitElement {
|
|
|
11683
11713
|
__decorate([property({ type: String })], AxebowSummaryCard.prototype, "title", void 0);
|
|
11684
11714
|
__decorate([property({ type: String })], AxebowSummaryCard.prototype, "cardWidth", void 0);
|
|
11685
11715
|
__decorate([property({ type: String })], AxebowSummaryCard.prototype, "cardHeight", void 0);
|
|
11716
|
+
__decorate([property({ type: Boolean })], AxebowSummaryCard.prototype, "fitContent", void 0);
|
|
11686
11717
|
__decorate([state()], AxebowSummaryCard.prototype, "isSummaryOpen", void 0);
|
|
11718
|
+
__decorate([state()], AxebowSummaryCard.prototype, "_fitsViewport", void 0);
|
|
11719
|
+
__decorate([query("[data-summary-card]")], AxebowSummaryCard.prototype, "_card", void 0);
|
|
11687
11720
|
AxebowSummaryCard = __decorate([customElement("axebow-summary-card")], AxebowSummaryCard);
|
|
11688
11721
|
//#endregion
|
|
11689
11722
|
//#region src/components/axebow-summary/axebow-summary-limits.ts
|