mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
Upgrade sveld to v0.10 (#856)
* chore(deps-dev): upgrade sveld to v0.10.2 * feat(types): regenerate types using sveld@0.10.2 * fix(types): update @extends to use .svelte extension
This commit is contained in:
parent
c6fc8548d3
commit
3203e7a61f
190 changed files with 345 additions and 263 deletions
140
types/Modal/Modal.d.ts
vendored
140
types/Modal/Modal.d.ts
vendored
|
@ -1,140 +0,0 @@
|
|||
/// <reference types="svelte" />
|
||||
import { SvelteComponentTyped } from "svelte";
|
||||
|
||||
export interface ModalProps
|
||||
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
|
||||
/**
|
||||
* Set the size of the modal
|
||||
*/
|
||||
size?: "xs" | "sm" | "lg";
|
||||
|
||||
/**
|
||||
* Set to `true` to open the modal
|
||||
* @default false
|
||||
*/
|
||||
open?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to use the danger variant
|
||||
* @default false
|
||||
*/
|
||||
danger?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to enable alert mode
|
||||
* @default false
|
||||
*/
|
||||
alert?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to use the passive variant
|
||||
* @default false
|
||||
*/
|
||||
passiveModal?: boolean;
|
||||
|
||||
/**
|
||||
* Specify the modal heading
|
||||
*/
|
||||
modalHeading?: string;
|
||||
|
||||
/**
|
||||
* Specify the modal label
|
||||
*/
|
||||
modalLabel?: string;
|
||||
|
||||
/**
|
||||
* Specify the ARIA label for the modal
|
||||
*/
|
||||
modalAriaLabel?: string;
|
||||
|
||||
/**
|
||||
* Specify the ARIA label for the close icon
|
||||
* @default "Close the modal"
|
||||
*/
|
||||
iconDescription?: string;
|
||||
|
||||
/**
|
||||
* Set to `true` if the modal contains form elements
|
||||
* @default false
|
||||
*/
|
||||
hasForm?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` if the modal contains scrolling content
|
||||
* @default false
|
||||
*/
|
||||
hasScrollingContent?: boolean;
|
||||
|
||||
/**
|
||||
* Specify the primary button text
|
||||
* @default ""
|
||||
*/
|
||||
primaryButtonText?: string;
|
||||
|
||||
/**
|
||||
* Set to `true` to disable the primary button
|
||||
* @default false
|
||||
*/
|
||||
primaryButtonDisabled?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` for the primary button to be triggered when pressing "Enter"
|
||||
* @default true
|
||||
*/
|
||||
shouldSubmitOnEnter?: boolean;
|
||||
|
||||
/**
|
||||
* Specify the secondary button text
|
||||
* @default ""
|
||||
*/
|
||||
secondaryButtonText?: string;
|
||||
|
||||
/**
|
||||
* 2-tuple prop to render two secondary buttons for a 3 button modal
|
||||
* supersedes `secondaryButtonText`
|
||||
* @default []
|
||||
*/
|
||||
secondaryButtons?: [{ text: string }, { text: string }];
|
||||
|
||||
/**
|
||||
* Specify a selector to be focused when opening the modal
|
||||
* @default "[data-modal-primary-focus]"
|
||||
*/
|
||||
selectorPrimaryFocus?: string;
|
||||
|
||||
/**
|
||||
* Set to `true` to prevent the modal from closing when clicking outside
|
||||
* @default false
|
||||
*/
|
||||
preventCloseOnClickOutside?: boolean;
|
||||
|
||||
/**
|
||||
* Set an id for the top-level element
|
||||
* @default "ccs-" + Math.random().toString(36)
|
||||
*/
|
||||
id?: string;
|
||||
|
||||
/**
|
||||
* Obtain a reference to the top-level HTML element
|
||||
* @default null
|
||||
*/
|
||||
ref?: null | HTMLDivElement;
|
||||
}
|
||||
|
||||
export default class Modal extends SvelteComponentTyped<
|
||||
ModalProps,
|
||||
{
|
||||
transitionend: CustomEvent<{ open: boolean }>;
|
||||
["click:button--secondary"]: CustomEvent<{ text: string }>;
|
||||
keydown: WindowEventMap["keydown"];
|
||||
click: WindowEventMap["click"];
|
||||
mouseover: WindowEventMap["mouseover"];
|
||||
mouseenter: WindowEventMap["mouseenter"];
|
||||
mouseleave: WindowEventMap["mouseleave"];
|
||||
submit: CustomEvent<any>;
|
||||
["click:button--primary"]: CustomEvent<any>;
|
||||
close: CustomEvent<any>;
|
||||
open: CustomEvent<any>;
|
||||
},
|
||||
{ default: {}; heading: {}; label: {} }
|
||||
> {}
|
Loading…
Add table
Add a link
Reference in a new issue