Skip to content

Commit

Permalink
docs(modal): restore component-level doc (#10201)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcfranco authored Aug 31, 2024
1 parent 2bc4a71 commit 05a22d4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
12 changes: 12 additions & 0 deletions packages/calcite-components/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3522,6 +3522,9 @@ export namespace Components {
*/
"valueLabelType": MeterLabelType;
}
/**
* @deprecated Use the `calcite-dialog` component instead.
*/
interface CalciteModal {
/**
* Passes a function to run before the component closes.
Expand Down Expand Up @@ -7157,6 +7160,9 @@ declare global {
"calciteModalBeforeOpen": void;
"calciteModalOpen": void;
}
/**
* @deprecated Use the `calcite-dialog` component instead.
*/
interface HTMLCalciteModalElement extends Components.CalciteModal, HTMLStencilElement {
addEventListener<K extends keyof HTMLCalciteModalElementEventMap>(type: K, listener: (this: HTMLCalciteModalElement, ev: CalciteModalCustomEvent<HTMLCalciteModalElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
Expand Down Expand Up @@ -11643,6 +11649,9 @@ declare namespace LocalJSX {
*/
"valueLabelType"?: MeterLabelType;
}
/**
* @deprecated Use the `calcite-dialog` component instead.
*/
interface CalciteModal {
/**
* Passes a function to run before the component closes.
Expand Down Expand Up @@ -14320,6 +14329,9 @@ declare module "@stencil/core" {
"calcite-menu": LocalJSX.CalciteMenu & JSXBase.HTMLAttributes<HTMLCalciteMenuElement>;
"calcite-menu-item": LocalJSX.CalciteMenuItem & JSXBase.HTMLAttributes<HTMLCalciteMenuItemElement>;
"calcite-meter": LocalJSX.CalciteMeter & JSXBase.HTMLAttributes<HTMLCalciteMeterElement>;
/**
* @deprecated Use the `calcite-dialog` component instead.
*/
"calcite-modal": LocalJSX.CalciteModal & JSXBase.HTMLAttributes<HTMLCalciteModalElement>;
"calcite-navigation": LocalJSX.CalciteNavigation & JSXBase.HTMLAttributes<HTMLCalciteNavigationElement>;
"calcite-navigation-logo": LocalJSX.CalciteNavigationLogo & JSXBase.HTMLAttributes<HTMLCalciteNavigationLogoElement>;
Expand Down
13 changes: 6 additions & 7 deletions packages/calcite-components/src/components/modal/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ import { CSS, ICONS, SLOTS } from "./resources";
let totalOpenModals: number = 0;
let initialDocumentOverflowStyle: string = "";

logger.deprecated("component", {
name: "modal",
removalVersion: 4,
suggested: "dialog",
});

/**
* @deprecated Use the `calcite-dialog` component instead.
* @slot header - A slot for adding header text.
Expand All @@ -66,13 +72,6 @@ let initialDocumentOverflowStyle: string = "";
* @slot secondary - A slot for adding a secondary button.
* @slot back - A slot for adding a back button.
*/

logger.deprecated("component", {
name: "modal",
removalVersion: 4,
suggested: "dialog",
});

@Component({
tag: "calcite-modal",
styleUrl: "modal.scss",
Expand Down

0 comments on commit 05a22d4

Please sign in to comment.