@kumori/aurora-wui-components 0.0.339-dev4710 → 0.0.339

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.
@@ -24,7 +24,16 @@ export declare class AxebowCallToActionRow extends LitElement {
24
24
  timeText: string;
25
25
  buttons: CallToActionButton[];
26
26
  lowNoteText: string;
27
+ private _titleTruncated;
28
+ private _metaTruncated;
29
+ private _title?;
30
+ private _meta?;
31
+ private _resizeObserver?;
27
32
  static styles: import('lit').CSSResult[];
33
+ disconnectedCallback(): void;
34
+ protected updated(): void;
35
+ private _syncTruncation;
36
+ private get _metaText();
28
37
  render(): import('lit-html').TemplateResult<1>;
29
38
  private _renderDescription;
30
39
  private _renderLowNote;
@@ -1 +1 @@
1
- {"version":3,"file":"axebow-call-to-action-row.d.ts","sourceRoot":"","sources":["../../../src/components/axebow-call-to-action-row/axebow-call-to-action-row.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAwB,MAAM,KAAK,CAAC;AAEvD,OAAO,+BAA+B,CAAC;AACvC,OAAO,iCAAiC,CAAC;AACzC,OAAO,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAEnF,MAAM,MAAM,uBAAuB,GAAG,UAAU,GAAG,MAAM,GAAG,KAAK,CAAC;AAElE,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;IACrG,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,uBAAuB,EAAE,gBAAgB,CAIhF,CAAC;AAEF,qBACa,qBAAsB,SAAQ,UAAU;IACvB,WAAW,EAAE,uBAAuB,CAAS;IAC7C,OAAO,SAAM;IACb,UAAU,SAAM;IAChB,WAAW,SAAM;IAClB,UAAU,EAAE,0BAA0B,EAAE,CAAM;IAC7C,QAAQ,SAAM;IACf,OAAO,EAAE,kBAAkB,EAAE,CAAM;IAClC,WAAW,SAAM;IAE7C,MAAM,CAAC,MAAM,4BASX;IAEF,MAAM;IA4BN,OAAO,CAAC,kBAAkB;IAc1B,OAAO,CAAC,cAAc;IAWtB,OAAO,CAAC,cAAc;CAyBvB"}
1
+ {"version":3,"file":"axebow-call-to-action-row.d.ts","sourceRoot":"","sources":["../../../src/components/axebow-call-to-action-row/axebow-call-to-action-row.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAwB,MAAM,KAAK,CAAC;AAEvD,OAAO,+BAA+B,CAAC;AACvC,OAAO,iCAAiC,CAAC;AACzC,OAAO,mCAAmC,CAAC;AAC3C,OAAO,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAEnF,MAAM,MAAM,uBAAuB,GAAG,UAAU,GAAG,MAAM,GAAG,KAAK,CAAC;AAElE,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;IACrG,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,uBAAuB,EAAE,gBAAgB,CAIhF,CAAC;AAEF,qBACa,qBAAsB,SAAQ,UAAU;IACvB,WAAW,EAAE,uBAAuB,CAAS;IAC7C,OAAO,SAAM;IACb,UAAU,SAAM;IAChB,WAAW,SAAM;IAClB,UAAU,EAAE,0BAA0B,EAAE,CAAM;IAC7C,QAAQ,SAAM;IACf,OAAO,EAAE,kBAAkB,EAAE,CAAM;IAClC,WAAW,SAAM;IAEpC,OAAO,CAAC,eAAe,CAAS;IAChC,OAAO,CAAC,cAAc,CAAS;IACb,OAAO,CAAC,MAAM,CAAC,CAAc;IAC9B,OAAO,CAAC,KAAK,CAAC,CAAc;IACtD,OAAO,CAAC,eAAe,CAAC,CAAiB;IAEzC,MAAM,CAAC,MAAM,4BASX;IAEF,oBAAoB;IAMpB,SAAS,CAAC,OAAO;IASjB,OAAO,CAAC,eAAe;IASvB,OAAO,KAAK,SAAS,GAGpB;IAED,MAAM;IA8BN,OAAO,CAAC,kBAAkB;IAgB1B,OAAO,CAAC,cAAc;IAWtB,OAAO,CAAC,cAAc;CAyBvB"}
package/dist/index.js CHANGED
@@ -9904,6 +9904,8 @@ var AxebowCallToActionRow = class AxebowCallToActionRow extends LitElement {
9904
9904
  this.timeText = "";
9905
9905
  this.buttons = [];
9906
9906
  this.lowNoteText = "";
9907
+ this._titleTruncated = false;
9908
+ this._metaTruncated = false;
9907
9909
  }
9908
9910
  static {
9909
9911
  this.styles = [
@@ -9917,6 +9919,30 @@ var AxebowCallToActionRow = class AxebowCallToActionRow extends LitElement {
9917
9919
  `
9918
9920
  ];
9919
9921
  }
9922
+ disconnectedCallback() {
9923
+ super.disconnectedCallback();
9924
+ this._resizeObserver?.disconnect();
9925
+ this._resizeObserver = void 0;
9926
+ }
9927
+ updated() {
9928
+ this._resizeObserver ??= new ResizeObserver(() => this._syncTruncation());
9929
+ this._resizeObserver.disconnect();
9930
+ [this._title, this._meta].forEach((element) => {
9931
+ if (element) this._resizeObserver?.observe(element);
9932
+ });
9933
+ this._syncTruncation();
9934
+ }
9935
+ _syncTruncation() {
9936
+ const title = this._title;
9937
+ const meta = this._meta;
9938
+ const titleTruncated = !!title && title.scrollHeight > title.clientHeight + 1;
9939
+ const metaTruncated = !!meta && meta.scrollWidth > meta.clientWidth + 1;
9940
+ if (titleTruncated !== this._titleTruncated) this._titleTruncated = titleTruncated;
9941
+ if (metaTruncated !== this._metaTruncated) this._metaTruncated = metaTruncated;
9942
+ }
9943
+ get _metaText() {
9944
+ return [this.breadcrumb.map((item) => `${item.label}: ${item.name}`).join(" > "), this.timeText].filter(Boolean).join(" / ");
9945
+ }
9920
9946
  render() {
9921
9947
  const { bg, color, iconName } = CRITICALITY_STYLES[this.criticality] ?? CRITICALITY_STYLES.low;
9922
9948
  return html`
@@ -9929,7 +9955,9 @@ var AxebowCallToActionRow = class AxebowCallToActionRow extends LitElement {
9929
9955
 
9930
9956
  <div class="flex-1 min-w-0 flex flex-col gap-1">
9931
9957
  <div class="w-full flex flex-row items-start gap-2">
9932
- <span class="block min-w-0 text-base font-semibold wrap-break-word">${this.heading}</span>
9958
+ <axebow-tooltip class="block min-w-0" content=${this.heading} ?disabled=${!this._titleTruncated}>
9959
+ <span data-cta-title class="block min-w-0 text-base font-semibold line-clamp-2">${this.heading}</span>
9960
+ </axebow-tooltip>
9933
9961
  ${this.badgeLabel ? html`<div class="h-5 shrink-0 flex items-center">
9934
9962
  <axebow-badge class="uppercase" bgColor=${bg} textColor=${color}>${this.badgeLabel}</axebow-badge>
9935
9963
  </div>` : ""}
@@ -9942,11 +9970,13 @@ var AxebowCallToActionRow = class AxebowCallToActionRow extends LitElement {
9942
9970
  `;
9943
9971
  }
9944
9972
  _renderDescription() {
9945
- if (!this.breadcrumb.length && !this.timeText) return html`<div class="w-full text-(--axebow-secondary) wrap-break-word">${this.description}</div>`;
9973
+ if (!this.breadcrumb.length && !this.timeText) return html`<div class="w-full text-(--axebow-secondary)">${this.description}</div>`;
9946
9974
  return html`
9947
- <div class="w-full text-(--axebow-secondary) wrap-break-word">
9948
- ${this.breadcrumb.map((item, index) => html`${index > 0 ? " > " : ""}${item.label}: <span class="font-semibold">${item.name}</span>`)}${this.timeText ? `${this.breadcrumb.length ? " / " : ""}${this.timeText}` : ""}
9949
- </div>
9975
+ <axebow-tooltip class="block w-full min-w-0" content=${this._metaText} ?disabled=${!this._metaTruncated}>
9976
+ <div data-cta-meta class="w-full truncate text-(--axebow-secondary)">
9977
+ ${this.breadcrumb.map((item, index) => html`${index > 0 ? " > " : ""}${item.label}: <span class="font-semibold">${item.name}</span>`)}${this.timeText ? `${this.breadcrumb.length ? " / " : ""}${this.timeText}` : ""}
9978
+ </div>
9979
+ </axebow-tooltip>
9950
9980
  `;
9951
9981
  }
9952
9982
  _renderLowNote() {
@@ -9989,6 +10019,10 @@ __decorate([property({ type: Array })], AxebowCallToActionRow.prototype, "breadc
9989
10019
  __decorate([property({ type: String })], AxebowCallToActionRow.prototype, "timeText", void 0);
9990
10020
  __decorate([property({ type: Array })], AxebowCallToActionRow.prototype, "buttons", void 0);
9991
10021
  __decorate([property({ type: String })], AxebowCallToActionRow.prototype, "lowNoteText", void 0);
10022
+ __decorate([state()], AxebowCallToActionRow.prototype, "_titleTruncated", void 0);
10023
+ __decorate([state()], AxebowCallToActionRow.prototype, "_metaTruncated", void 0);
10024
+ __decorate([query("[data-cta-title]")], AxebowCallToActionRow.prototype, "_title", void 0);
10025
+ __decorate([query("[data-cta-meta]")], AxebowCallToActionRow.prototype, "_meta", void 0);
9992
10026
  AxebowCallToActionRow = __decorate([customElement("axebow-call-to-action-row")], AxebowCallToActionRow);
9993
10027
  //#endregion
9994
10028
  //#region src/components/axebow-tenant-card/axebow-tenant-card.ts