@carbon/ibm-products-web-components
Version:
Carbon for IBM Products Web Components
132 lines • 4.5 kB
TypeScript
/**
* @license
*
* Copyright IBM Corp. 2023, 2024
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import { LitElement } from 'lit';
import '@carbon/web-components/es/components/button/index.js';
import '@carbon/web-components/es/components/toggle/index.js';
import '@carbon/web-components/es/components/icon-button/index.js';
import '@carbon-labs/wc-empty-state/es/index.js';
declare const CDSNotificationPanel_base: {
new (...args: any[]): {
_handles: Set<import("@carbon/web-components/es/globals/internal/handle").default>;
connectedCallback(): void;
disconnectedCallback(): void;
};
_hostListeners: {
[listenerName: string]: {
[type: string]: {
options?: boolean | AddEventListenerOptions;
};
};
};
} & typeof LitElement;
/**
* NotificationPanel.
*
* @element c4p-notification-panel
* @csspart dialog The dialog.
* @slot today - Today Section.
* @slot previous - Previous Section.
* @slot footer - Footer for the Panel.
* @fires c4p-notification-panel-beingclosed - The custom event before notification-panel is closed.
* @fires c4p-notification-dismiss-all - The custom event fired after notification-panel is closed upon a user gesture.
* @fires c4p-notification-donot-disturb-change - The custom event fired after notification-panel is closed upon a user gesture.
* @fires c4p-notification-click-outside - The custom event fired after user clicks outside the panel or Esc key is pressed.
*/
declare class CDSNotificationPanel extends CDSNotificationPanel_base {
/**
* Sets the Title for the Notification panel
*/
titleText: any;
/**
* Sets the Today text for the Notification panel
*/
todayText: any;
/**
* Sets the Previous section title for the Notification panel
*/
previousText: any;
/**
* Determines whether the notifications panel should render or not
*/
open: boolean;
/**
* Sets the label text for the "Dismiss all" button in the Notification panel
*/
dismissAllLabel: any;
/**
* Sets the empty state label text when there are no notifications
*/
emptyStateLabel: any;
/**
* Sets the label text for the "Do Not Disturb" toggle in the Notification panel
*/
doNotDisturbLabel: any;
/**
* Reference to the trigger button
*/
triggerButtonRef?: HTMLElement;
/**
* The language for each notification's time stamp.
* Used with `dateTimeStyle`.
*/
dateTimeLocale?: string;
private _providedLocale;
private todaySlot;
private previousSlot;
private _hasTodayContent;
private _hasPreviousContent;
_todayElements: Array<HTMLElement>;
_previousElements: Array<HTMLElement>;
private _mutationObserver?;
willUpdate(changedProperties: any): void;
firstUpdated(): void;
updated(): void;
render(): import("lit-html").TemplateResult<1>;
disconnectedCallback(): void;
private _handleMouseEnter;
private _handleMouseLeave;
private _handleFocusIn;
private _handleFocusOut;
private _markFirstNotification;
private _handleSlotChange;
private _tryFocusDismissButton;
/**
* Handles user-initiated dismiss of all notifications.
*
* @param event The event that triggered the click.
*/
private _onDismissAllNotifications;
private _handleToggle;
private _handleKeydown;
private _handleClick;
/**
* A selector selecting tabbable nodes.
*/
static get selectorTabbable(): string;
/**
* The name of the custom event fired before this notification-panel is being closed upon a user gesture.
* Cancellation of this event stops the user-initiated action of closing this notification-panel.
*/
static get eventBeforeClose(): string;
/**
* The name of the custom event fired after this notification-panel is closed upon a user gesture.
*/
static get eventClickOutside(): string;
/**
* The name of the custom event fired after dismiss all button click
*/
static get eventDismissAll(): string;
/**
* The name of the custom event fired after this do not disturb button toggled.
*/
static get eventDonotDisturbChange(): string;
static styles: any;
}
export default CDSNotificationPanel;
//# sourceMappingURL=notification-panel.d.ts.map