import type * as Components from "./src/index"; import type { LitElement } from "lit"; import type { DefineComponent } from "vue"; /** * Overrides for properties whose TypeScript type differs between * the Lit class and the HTML attribute interface. * * "form" — InputMixin's getter returns `HTMLFormElement | null`, but in * templates the attribute is always a plain string (the form's id). * Without this override, Vue/JSX would expect an HTMLFormElement. */ type WCPropsOverrides = { form: string }; type WCProps = Partial< Omit & WCPropsOverrides >; interface NordComponents { "nord-avatar": DefineComponent & {}>; "nord-badge": DefineComponent & {}>; "nord-banner": DefineComponent & {}>; "nord-button": DefineComponent & {}>; "nord-button-group": DefineComponent & {}>; "nord-calendar": DefineComponent< WCProps & { /** * Dispatched when a date is selected and the value changes. */ onChange?: (event: Event) => void; /** * Dispatched when the calendar's focused date changes. */ onNordFocusDate?: (event: Event) => void; } >; "nord-card": DefineComponent & {}>; "nord-checkbox": DefineComponent< WCProps & { /** * Fired whenever the input's value is changed via user interaction. */ onChange?: (event: Event) => void; /** * Fired as the user types into the input. */ onInput?: (event: Event) => void; } >; "nord-command-menu": DefineComponent< WCProps & { /** * The command menu was closed. */ onClose?: (event: Event) => void; /** * Fired as the user types into the search input. */ onInput?: (event: Event) => void; /** * User selected a command from the menu. */ onNordSelect?: (event: Event) => void; /** * The command menu was opened. */ onOpen?: (event: Event) => void; } >; "nord-date-picker": DefineComponent< WCProps & { /** * Fired whenever the input's value is changed via user interaction. */ onChange?: (event: Event) => void; /** * Dispatched when the popout is closed. */ onClose?: (event: Event) => void; /** * Fired as the user types into the input. */ onInput?: (event: Event) => void; /** * Dispatched when the calendar's focused date changes. */ onNordFocusDate?: (event: Event) => void; /** * Dispatched when the popout is opened. */ onOpen?: (event: Event) => void; } >; "nord-divider": DefineComponent & {}>; "nord-drawer": DefineComponent & {}>; "nord-dropdown": DefineComponent< WCProps & { /** * Dispatched when the popout is closed. */ onClose?: (event: Event) => void; /** * Dispatched when the popout is opened. */ onOpen?: (event: Event) => void; } >; "nord-dropdown-group": DefineComponent< WCProps & {} >; "nord-dropdown-item": DefineComponent & {}>; "nord-dropdown-submenu": DefineComponent< WCProps & { /** * Forwarded from the internal nord-popout. */ onClose?: (event: Event) => void; /** * Fired when mobile stack navigation activates this submenu. */ onNordSubmenuNavigate?: (event: Event) => void; /** * Forwarded from the internal nord-popout. */ onOpen?: (event: Event) => void; } >; "nord-empty-state": DefineComponent & {}>; "nord-fieldset": DefineComponent & {}>; "nord-footer": DefineComponent & {}>; "nord-header": DefineComponent & {}>; "nord-icon": DefineComponent & {}>; "nord-input": DefineComponent< WCProps & { /** * Fired whenever the input's value is changed via user interaction. */ onChange?: (event: Event) => void; /** * Fired as the user types into the input. */ onInput?: (event: Event) => void; /** * Fired when some text has been selected. */ onSelect?: (event: Event) => void; } >; "nord-layout": DefineComponent & {}>; "nord-message": DefineComponent & {}>; "nord-modal": DefineComponent< WCProps & { /** * Dispatched before the modal has closed when a user attempts to dismiss a modal. The event includes a trigger property containing the original event that caused the dismiss. Call preventDefault() on the event to prevent the modal closing. */ onCancel?: (event: Event) => void; /** * Dispatched when a modal is closed for any reason. The event includes an optional trigger property containing the original event that caused the close, if the modal was closed by a user action. */ onClose?: (event: Event) => void; /** * undefined */ onCloseTrigger?: (event: Event) => void; /** * undefined */ onTrigger?: (event: Event) => void; } >; "nord-nav-group": DefineComponent< WCProps & { /** * Dispatched whenever a nav item has been marked as active */ onActivate?: (event: Event) => void; /** * Dispatched whenever a nav item's state changes between open and closed. */ onToggle?: (event: Event) => void; } >; "nord-navigation": DefineComponent< WCProps & { /** * Dispatched whenever a nav item has been marked as active */ onActivate?: (event: Event) => void; /** * Dispatched whenever a nav item's state changes between open and closed. */ onToggle?: (event: Event) => void; } >; "nord-nav-item": DefineComponent< WCProps & { /** * Dispatched whenever a nav item has been marked as active */ onActivate?: (event: Event) => void; /** * Dispatched whenever a nav item's state changes between open and closed. */ onToggle?: (event: Event) => void; } >; "nord-nav-toggle": DefineComponent & {}>; "nord-notification": DefineComponent< WCProps & { /** * Fired when the notification is dismissed, and its exit animation has completed. This event should be used to remove the dismissed notification from the DOM. */ onDismiss?: (event: Event) => void; } >; "nord-notification-group": DefineComponent< WCProps & { /** * Fired when a notification is dismissed, and its exit animation has completed. This event should be used to remove the dismissed notification from the DOM. */ onDismiss?: (event: Event) => void; } >; "nord-popout": DefineComponent< WCProps & { /** * Dispatched when the popout is closed. */ onClose?: (event: Event) => void; /** * Dispatched when the popout is opened. */ onOpen?: (event: Event) => void; } >; "nord-progress": DefineComponent & {}>; "nord-progress-bar": DefineComponent & {}>; "nord-qrcode": DefineComponent & {}>; "nord-radio": DefineComponent< WCProps & { /** * Fired whenever the input's value is changed via user interaction. */ onChange?: (event: Event) => void; /** * Fired as the user types into the input. */ onInput?: (event: Event) => void; } >; "nord-range": DefineComponent< WCProps & { /** * Fired whenever the input's value is changed via user interaction. */ onChange?: (event: Event) => void; /** * Fired as the user types into the input. */ onInput?: (event: Event) => void; } >; "nord-segmented-control": DefineComponent< WCProps & { /** * Fired whenever a segmented control item has been checked. */ onChange?: (event: Event) => void; } >; "nord-segmented-control-item": DefineComponent< WCProps & { /** * Fired whenever the segmented control item has been checked. */ onChange?: (event: Event) => void; /** * Fired as the user types into the input. */ onInput?: (event: Event) => void; } >; "nord-select": DefineComponent< WCProps & { /** * Fired whenever the input's value is changed via user interaction. */ onChange?: (event: Event) => void; /** * Fired as the user types into the input. */ onInput?: (event: Event) => void; } >; "nord-skeleton": DefineComponent & {}>; "nord-spinner": DefineComponent & {}>; "nord-stack": DefineComponent & {}>; "nord-tab": DefineComponent & {}>; "nord-tab-group": DefineComponent & {}>; "nord-table": DefineComponent & {}>; "nord-tab-panel": DefineComponent & {}>; "nord-tag": DefineComponent< WCProps & { /** * Fired whenever the tag has been checked or unchecked via user interaction. */ onChange?: (event: Event) => void; /** * Fired when the remove button is activated. This event should be used to remove the tag from the DOM. */ onRemove?: (event: Event) => void; } >; "nord-tag-group": DefineComponent< WCProps & { /** * Fired whenever a tag has been checked or unchecked via user interaction. */ onChange?: (event: Event) => void; /** * Fired when the remove button is activated on a tag. This event should be used to remove the tag from the DOM. */ onRemove?: (event: Event) => void; } >; "nord-textarea": DefineComponent< WCProps & { /** * Fired whenever the input's value is changed via user interaction. */ onChange?: (event: Event) => void; /** * Fired as the user types into the input. */ onInput?: (event: Event) => void; /** * Fired when some text has been selected. */ onSelect?: (event: Event) => void; } >; "nord-toast": DefineComponent< WCProps & { /** * Fired when the toast is dismissed (via user action or auto-dismiss), and its exit animation has completed. This event should be used to remove the dismissed toast from the DOM. */ onDismiss?: (event: Event) => void; } >; "nord-toast-group": DefineComponent< WCProps & { /** * Fired when a toast is dismissed (via user action or auto-dismiss), and its exit animation has completed. This event should be used to remove the dismissed toast from the DOM. */ onDismiss?: (event: Event) => void; } >; "nord-toggle": DefineComponent< WCProps & { /** * Fired whenever the input's value is changed via user interaction. */ onChange?: (event: Event) => void; /** * Fired as the user types into the input. */ onInput?: (event: Event) => void; } >; "nord-tooltip": DefineComponent & {}>; "nord-top-bar": DefineComponent & {}>; "nord-visually-hidden": DefineComponent< WCProps & {} >; } declare module "vue" { // eslint-disable-next-line @typescript-eslint/no-empty-interface interface GlobalComponents extends NordComponents {} } declare global { namespace JSX { // eslint-disable-next-line @typescript-eslint/no-empty-interface interface IntrinsicElements extends NordComponents {} } }