Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(ui5-card): remove ICardHeader interface #8497

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 3 additions & 17 deletions packages/main/src/Card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,11 @@ import {
ARIA_ROLEDESCRIPTION_CARD,
ARIA_LABEL_CARD_CONTENT,
} from "./generated/i18n/i18n-defaults.js";
import type CardHeader from "./CardHeader.js";

// Styles
import cardCss from "./generated/themes/Card.css.js";

/**
* Interface for components that may be slotted inside `ui5-card` as header
* @public
*/
interface ICardHeader extends HTMLElement {
subtitleText: string,
titleText: string,
status: string,
interactive: boolean,
}

/**
* @class
* ### Overview
Expand All @@ -40,7 +30,7 @@ interface ICardHeader extends HTMLElement {
*
* ### ES6 Module Import
*
* `import "@ui5/webcomponents/dist/Card";`
* `import "@ui5/webcomponents/dist/Card.js";`
*
* `import "@ui5/webcomponents/dist/CardHeader.js";` (for `ui5-card-header`)
* @constructor
Expand Down Expand Up @@ -93,7 +83,7 @@ class Card extends UI5Element {
* @public
*/
@slot({ type: HTMLElement, invalidateOnChildChange: true })
header!: Array<ICardHeader>;
header!: Array<CardHeader>;

static i18nBundle: I18nBundle;

Expand Down Expand Up @@ -129,7 +119,3 @@ class Card extends UI5Element {
Card.define();

export default Card;

export type {
ICardHeader,
};
7 changes: 1 addition & 6 deletions packages/main/src/CardHeader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
import { isSpace, isEnter } from "@ui5/webcomponents-base/dist/Keys.js";
import { isFirefox } from "@ui5/webcomponents-base/dist/Device.js";
import Integer from "@ui5/webcomponents-base/dist/types/Integer.js";
import type { ICardHeader } from "./Card.js";
import CardHeaderTemplate from "./generated/templates/CardHeaderTemplate.lit.js";

import {
Expand All @@ -36,7 +35,6 @@ import cardHeaderCss from "./generated/themes/CardHeader.css.js";
*
* `import "@ui5/webcomponents/dist/CardHeader";`
* @constructor
* @implements {ICardHeader}
* @extends UI5Element
* @public
* @since 1.0.0-rc.15
Expand All @@ -59,7 +57,7 @@ import cardHeaderCss from "./generated/themes/CardHeader.css.js";
* @public
*/
@event("click")
class CardHeader extends UI5Element implements ICardHeader {
class CardHeader extends UI5Element {
/**
* Defines the title text.
* @default ""
Expand Down Expand Up @@ -238,6 +236,3 @@ class CardHeader extends UI5Element implements ICardHeader {
CardHeader.define();

export default CardHeader;
export type {
ICardHeader,
};