UNPKG

@shoelace-style/shoelace

Version:

A forward-thinking library of web components.

936 lines (897 loc) 149 kB
import type { DefineComponent } from "vue"; import type { SlAlert } from "../../components/alert/alert.component.js"; import type { SlAnimation } from "../../components/animation/animation.component.js"; import type { SlAnimatedImage } from "../../components/animated-image/animated-image.component.js"; import type { SlAvatar } from "../../components/avatar/avatar.component.js"; import type { SlBreadcrumb } from "../../components/breadcrumb/breadcrumb.component.js"; import type { SlBadge } from "../../components/badge/badge.component.js"; import type { SlBreadcrumbItem } from "../../components/breadcrumb-item/breadcrumb-item.component.js"; import type { SlButton } from "../../components/button/button.component.js"; import type { SlButtonGroup } from "../../components/button-group/button-group.component.js"; import type { SlCard } from "../../components/card/card.component.js"; import type { SlCarousel } from "../../components/carousel/carousel.component.js"; import type { SlCarouselItem } from "../../components/carousel-item/carousel-item.component.js"; import type { SlCheckbox } from "../../components/checkbox/checkbox.component.js"; import type { SlColorPicker } from "../../components/color-picker/color-picker.component.js"; import type { SlCopyButton } from "../../components/copy-button/copy-button.component.js"; import type { SlDetails } from "../../components/details/details.component.js"; import type { SlDialog } from "../../components/dialog/dialog.component.js"; import type { SlDivider } from "../../components/divider/divider.component.js"; import type { SlDrawer } from "../../components/drawer/drawer.component.js"; import type { SlDropdown } from "../../components/dropdown/dropdown.component.js"; import type { SlFormatBytes } from "../../components/format-bytes/format-bytes.component.js"; import type { SlFormatDate } from "../../components/format-date/format-date.component.js"; import type { SlFormatNumber } from "../../components/format-number/format-number.component.js"; import type { SlIcon } from "../../components/icon/icon.component.js"; import type { SlIconButton } from "../../components/icon-button/icon-button.component.js"; import type { SlImageComparer } from "../../components/image-comparer/image-comparer.component.js"; import type { SlInclude } from "../../components/include/include.component.js"; import type { SlInput } from "../../components/input/input.component.js"; import type { SlMenu } from "../../components/menu/menu.component.js"; import type { SlMenuItem } from "../../components/menu-item/menu-item.component.js"; import type { SlMenuLabel } from "../../components/menu-label/menu-label.component.js"; import type { SlMutationObserver } from "../../components/mutation-observer/mutation-observer.component.js"; import type { SlOption } from "../../components/option/option.component.js"; import type { SlPopup } from "../../components/popup/popup.component.js"; import type { SlProgressBar } from "../../components/progress-bar/progress-bar.component.js"; import type { SlProgressRing } from "../../components/progress-ring/progress-ring.component.js"; import type { SlQrCode } from "../../components/qr-code/qr-code.component.js"; import type { SlRadio } from "../../components/radio/radio.component.js"; import type { SlRadioGroup } from "../../components/radio-group/radio-group.component.js"; import type { SlRange } from "../../components/range/range.component.js"; import type { SlResizeObserver } from "../../components/resize-observer/resize-observer.component.js"; import type { SlRating } from "../../components/rating/rating.component.js"; import type { SlRelativeTime } from "../../components/relative-time/relative-time.component.js"; import type { SlRadioButton } from "../../components/radio-button/radio-button.component.js"; import type { SlSelect } from "../../components/select/select.component.js"; import type { SlSplitPanel } from "../../components/split-panel/split-panel.component.js"; import type { SlSkeleton } from "../../components/skeleton/skeleton.component.js"; import type { SlSwitch } from "../../components/switch/switch.component.js"; import type { SlSpinner } from "../../components/spinner/spinner.component.js"; import type { SlTabPanel } from "../../components/tab-panel/tab-panel.component.js"; import type { SlTabGroup } from "../../components/tab-group/tab-group.component.js"; import type { SlTab } from "../../components/tab/tab.component.js"; import type { SlTag } from "../../components/tag/tag.component.js"; import type { SlTextarea } from "../../components/textarea/textarea.component.js"; import type { SlTooltip } from "../../components/tooltip/tooltip.component.js"; import type { SlTree } from "../../components/tree/tree.component.js"; import type { SlTreeItem } from "../../components/tree-item/tree-item.component.js"; import type { SlVisuallyHidden } from "../../components/visually-hidden/visually-hidden.component.js"; type SlAlertProps = { /** Indicates whether or not the alert is open. You can toggle this attribute to show and hide the alert, or you can use the `show()` and `hide()` methods and this attribute will reflect the alert's open state. */ open?: SlAlert["open"]; /** Enables a close button that allows the user to dismiss the alert. */ closable?: SlAlert["closable"]; /** The alert's theme variant. */ variant?: SlAlert["variant"]; /** The length of time, in milliseconds, the alert will show before closing itself. If the user interacts with the alert before it closes (e.g. moves the mouse over it), the timer will restart. Defaults to `Infinity`, meaning the alert will not close on its own. */ duration?: SlAlert["duration"]; /** Enables a countdown that indicates the remaining time the alert will be displayed. Typically used to indicate the remaining time before a whole app refresh. */ countdown?: SlAlert["countdown"]; /** */ base?: SlAlert["base"]; /** */ countdownElement?: SlAlert["countdownElement"]; /** Emitted when the alert opens. */ onSlShow?: (e: CustomEvent<never>) => void; /** Emitted after the alert opens and all animations are complete. */ onSlAfterShow?: (e: CustomEvent<never>) => void; /** Emitted when the alert closes. */ onSlHide?: (e: CustomEvent<never>) => void; /** Emitted after the alert closes and all animations are complete. */ onSlAfterHide?: (e: CustomEvent<never>) => void; }; type SlAnimationProps = { /** The name of the built-in animation to use. For custom animations, use the `keyframes` prop. */ name?: SlAnimation["name"]; /** Plays the animation. When omitted, the animation will be paused. This attribute will be automatically removed when the animation finishes or gets canceled. */ play?: SlAnimation["play"]; /** The number of milliseconds to delay the start of the animation. */ delay?: SlAnimation["delay"]; /** Determines the direction of playback as well as the behavior when reaching the end of an iteration. [Learn more](https://developer.mozilla.org/en-US/docs/Web/CSS/animation-direction) */ direction?: SlAnimation["direction"]; /** The number of milliseconds each iteration of the animation takes to complete. */ duration?: SlAnimation["duration"]; /** The easing function to use for the animation. This can be a Shoelace easing function or a custom easing function such as `cubic-bezier(0, 1, .76, 1.14)`. */ easing?: SlAnimation["easing"]; /** The number of milliseconds to delay after the active period of an animation sequence. */ "end-delay"?: SlAnimation["endDelay"]; /** Sets how the animation applies styles to its target before and after its execution. */ fill?: SlAnimation["fill"]; /** The number of iterations to run before the animation completes. Defaults to `Infinity`, which loops. */ iterations?: SlAnimation["iterations"]; /** The offset at which to start the animation, usually between 0 (start) and 1 (end). */ "iteration-start"?: SlAnimation["iterationStart"]; /** Sets the animation's playback rate. The default is `1`, which plays the animation at a normal speed. Setting this to `2`, for example, will double the animation's speed. A negative value can be used to reverse the animation. This value can be changed without causing the animation to restart. */ "playback-rate"?: SlAnimation["playbackRate"]; /** */ defaultSlot?: SlAnimation["defaultSlot"]; /** The keyframes to use for the animation. If this is set, `name` will be ignored. */ keyframes?: SlAnimation["keyframes"]; /** Gets and sets the current animation time. */ currentTime?: SlAnimation["currentTime"]; /** Emitted when the animation is canceled. */ onSlCancel?: (e: CustomEvent<never>) => void; /** Emitted when the animation finishes. */ onSlFinish?: (e: CustomEvent<never>) => void; /** Emitted when the animation starts or restarts. */ onSlStart?: (e: CustomEvent<never>) => void; }; type SlAnimatedImageProps = { /** The path to the image to load. */ src?: SlAnimatedImage["src"]; /** A description of the image used by assistive devices. */ alt?: SlAnimatedImage["alt"]; /** Plays the animation. When this attribute is remove, the animation will pause. */ play?: SlAnimatedImage["play"]; /** */ animatedImage?: SlAnimatedImage["animatedImage"]; /** */ frozenFrame?: SlAnimatedImage["frozenFrame"]; /** */ isLoaded?: SlAnimatedImage["isLoaded"]; /** Emitted when the image loads successfully. */ onSlLoad?: (e: CustomEvent<never>) => void; /** Emitted when the image fails to load. */ onSlError?: (e: CustomEvent<never>) => void; }; type SlAvatarProps = { /** The image source to use for the avatar. */ image?: SlAvatar["image"]; /** A label to use to describe the avatar to assistive devices. */ label?: SlAvatar["label"]; /** Initials to use as a fallback when no image is available (1-2 characters max recommended). */ initials?: SlAvatar["initials"]; /** Indicates how the browser should load the image. */ loading?: SlAvatar["loading"]; /** The shape of the avatar. */ shape?: SlAvatar["shape"]; /** The image could not be loaded. This may because of an invalid URL, a temporary network condition, or some unknown cause. */ onSlError?: (e: CustomEvent<never>) => void; }; type SlBreadcrumbProps = { /** The label to use for the breadcrumb control. This will not be shown on the screen, but it will be announced by screen readers and other assistive devices to provide more context for users. */ label?: SlBreadcrumb["label"]; /** */ defaultSlot?: SlBreadcrumb["defaultSlot"]; /** */ separatorSlot?: SlBreadcrumb["separatorSlot"]; }; type SlBadgeProps = { /** The badge's theme variant. */ variant?: SlBadge["variant"]; /** Draws a pill-style badge with rounded edges. */ pill?: SlBadge["pill"]; /** Makes the badge pulsate to draw attention. */ pulse?: SlBadge["pulse"]; }; type SlBreadcrumbItemProps = { /** Optional URL to direct the user to when the breadcrumb item is activated. When set, a link will be rendered internally. When unset, a button will be rendered instead. */ href?: SlBreadcrumbItem["href"]; /** Tells the browser where to open the link. Only used when `href` is set. */ target?: SlBreadcrumbItem["target"]; /** The `rel` attribute to use on the link. Only used when `href` is set. */ rel?: SlBreadcrumbItem["rel"]; /** */ defaultSlot?: SlBreadcrumbItem["defaultSlot"]; }; type SlButtonProps = { /** */ title?: SlButton["title"]; /** The button's theme variant. */ variant?: SlButton["variant"]; /** The button's size. */ size?: SlButton["size"]; /** Draws the button with a caret. Used to indicate that the button triggers a dropdown menu or similar behavior. */ caret?: SlButton["caret"]; /** Disables the button. */ disabled?: SlButton["disabled"]; /** Draws the button in a loading state. */ loading?: SlButton["loading"]; /** Draws an outlined button. */ outline?: SlButton["outline"]; /** Draws a pill-style button with rounded edges. */ pill?: SlButton["pill"]; /** Draws a circular icon button. When this attribute is present, the button expects a single `<sl-icon>` in the default slot. */ circle?: SlButton["circle"]; /** The type of button. Note that the default value is `button` instead of `submit`, which is opposite of how native `<button>` elements behave. When the type is `submit`, the button will submit the surrounding form. */ type?: SlButton["type"]; /** The name of the button, submitted as a name/value pair with form data, but only when this button is the submitter. This attribute is ignored when `href` is present. */ name?: SlButton["name"]; /** The value of the button, submitted as a pair with the button's name as part of the form data, but only when this button is the submitter. This attribute is ignored when `href` is present. */ value?: SlButton["value"]; /** When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`. */ href?: SlButton["href"]; /** Tells the browser where to open the link. Only used when `href` is present. */ target?: SlButton["target"]; /** When using `href`, this attribute will map to the underlying link's `rel` attribute. Unlike regular links, the default is `noreferrer noopener` to prevent security exploits. However, if you're using `target` to point to a specific tab/window, this will prevent that from working correctly. You can remove or change the default value by setting the attribute to an empty string or a value of your choice, respectively. */ rel?: SlButton["rel"]; /** Tells the browser to download the linked file as this filename. Only used when `href` is present. */ download?: SlButton["download"]; /** The "form owner" to associate the button with. If omitted, the closest containing form will be used instead. The value of this attribute must be an id of a form in the same document or shadow root as the button. */ form?: SlButton["form"]; /** Used to override the form owner's `action` attribute. */ formaction?: SlButton["formAction"]; /** Used to override the form owner's `enctype` attribute. */ formenctype?: SlButton["formEnctype"]; /** Used to override the form owner's `method` attribute. */ formmethod?: SlButton["formMethod"]; /** Used to override the form owner's `novalidate` attribute. */ formnovalidate?: SlButton["formNoValidate"]; /** Used to override the form owner's `target` attribute. */ formtarget?: SlButton["formTarget"]; /** */ button?: SlButton["button"]; /** */ invalid?: SlButton["invalid"]; /** Gets the validity state object */ validity?: SlButton["validity"]; /** Gets the validation message */ validationMessage?: SlButton["validationMessage"]; /** Emitted when the button loses focus. */ onSlBlur?: (e: CustomEvent<never>) => void; /** Emitted when the button gains focus. */ onSlFocus?: (e: CustomEvent<never>) => void; /** Emitted when the form control has been checked for validity and its constraints aren't satisfied. */ onSlInvalid?: (e: CustomEvent<never>) => void; }; type SlButtonGroupProps = { /** A label to use for the button group. This won't be displayed on the screen, but it will be announced by assistive devices when interacting with the control and is strongly recommended. */ label?: SlButtonGroup["label"]; /** */ defaultSlot?: SlButtonGroup["defaultSlot"]; /** */ disableRole?: SlButtonGroup["disableRole"]; }; type SlCardProps = {}; type SlCarouselProps = { /** When set, allows the user to navigate the carousel in the same direction indefinitely. */ loop?: SlCarousel["loop"]; /** When set, show the carousel's navigation. */ navigation?: SlCarousel["navigation"]; /** When set, show the carousel's pagination indicators. */ pagination?: SlCarousel["pagination"]; /** When set, the slides will scroll automatically when the user is not interacting with them. */ autoplay?: SlCarousel["autoplay"]; /** Specifies the amount of time, in milliseconds, between each automatic scroll. */ "autoplay-interval"?: SlCarousel["autoplayInterval"]; /** Specifies how many slides should be shown at a given time. */ "slides-per-page"?: SlCarousel["slidesPerPage"]; /** Specifies the number of slides the carousel will advance when scrolling, useful when specifying a `slides-per-page` greater than one. It can't be higher than `slides-per-page`. */ "slides-per-move"?: SlCarousel["slidesPerMove"]; /** Specifies the orientation in which the carousel will lay out. */ orientation?: SlCarousel["orientation"]; /** When set, it is possible to scroll through the slides by dragging them with the mouse. */ "mouse-dragging"?: SlCarousel["mouseDragging"]; /** */ scrollContainer?: SlCarousel["scrollContainer"]; /** */ paginationContainer?: SlCarousel["paginationContainer"]; /** */ activeSlide?: SlCarousel["activeSlide"]; /** */ scrolling?: SlCarousel["scrolling"]; /** */ dragging?: SlCarousel["dragging"]; /** Emitted when the active slide changes. */ onSlSlideChange?: (e: CustomEvent<{ index: number; slide: SlCarouselItem }>) => void; }; type SlCarouselItemProps = {}; type SlCheckboxProps = { /** */ title?: SlCheckbox["title"]; /** The name of the checkbox, submitted as a name/value pair with form data. */ name?: SlCheckbox["name"]; /** The current value of the checkbox, submitted as a name/value pair with form data. */ value?: SlCheckbox["value"]; /** The checkbox's size. */ size?: SlCheckbox["size"]; /** Disables the checkbox. */ disabled?: SlCheckbox["disabled"]; /** Draws the checkbox in a checked state. */ checked?: SlCheckbox["checked"]; /** Draws the checkbox in an indeterminate state. This is usually applied to checkboxes that represents a "select all/none" behavior when associated checkboxes have a mix of checked and unchecked states. */ indeterminate?: SlCheckbox["indeterminate"]; /** By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you to place the form control outside of a form and associate it with the form that has this `id`. The form must be in the same document or shadow root for this to work. */ form?: SlCheckbox["form"]; /** Makes the checkbox a required field. */ required?: SlCheckbox["required"]; /** The checkbox's help text. If you need to display HTML, use the `help-text` slot instead. */ "help-text"?: SlCheckbox["helpText"]; /** */ input?: SlCheckbox["input"]; /** The default value of the form control. Primarily used for resetting the form control. */ defaultChecked?: SlCheckbox["defaultChecked"]; /** Gets the validity state object */ validity?: SlCheckbox["validity"]; /** Gets the validation message */ validationMessage?: SlCheckbox["validationMessage"]; /** Emitted when the checkbox loses focus. */ onSlBlur?: (e: CustomEvent<never>) => void; /** Emitted when the checked state changes. */ onSlChange?: (e: CustomEvent<never>) => void; /** Emitted when the checkbox gains focus. */ onSlFocus?: (e: CustomEvent<never>) => void; /** Emitted when the checkbox receives input. */ onSlInput?: (e: CustomEvent<never>) => void; /** Emitted when the form control has been checked for validity and its constraints aren't satisfied. */ onSlInvalid?: (e: CustomEvent<never>) => void; }; type SlColorPickerProps = { /** The current value of the color picker. The value's format will vary based the `format` attribute. To get the value in a specific format, use the `getFormattedValue()` method. The value is submitted as a name/value pair with form data. */ value?: SlColorPicker["value"]; /** The color picker's label. This will not be displayed, but it will be announced by assistive devices. If you need to display HTML, you can use the `label` slot` instead. */ label?: SlColorPicker["label"]; /** The format to use. If opacity is enabled, these will translate to HEXA, RGBA, HSLA, and HSVA respectively. The color picker will accept user input in any format (including CSS color names) and convert it to the desired format. */ format?: SlColorPicker["format"]; /** Renders the color picker inline rather than in a dropdown. */ inline?: SlColorPicker["inline"]; /** Determines the size of the color picker's trigger. This has no effect on inline color pickers. */ size?: SlColorPicker["size"]; /** Removes the button that lets users toggle between format. */ "no-format-toggle"?: SlColorPicker["noFormatToggle"]; /** The name of the form control, submitted as a name/value pair with form data. */ name?: SlColorPicker["name"]; /** Disables the color picker. */ disabled?: SlColorPicker["disabled"]; /** Enable this option to prevent the panel from being clipped when the component is placed inside a container with `overflow: auto|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all, scenarios. */ hoist?: SlColorPicker["hoist"]; /** Shows the opacity slider. Enabling this will cause the formatted value to be HEXA, RGBA, or HSLA. */ opacity?: SlColorPicker["opacity"]; /** By default, values are lowercase. With this attribute, values will be uppercase instead. */ uppercase?: SlColorPicker["uppercase"]; /** One or more predefined color swatches to display as presets in the color picker. Can include any format the color picker can parse, including HEX(A), RGB(A), HSL(A), HSV(A), and CSS color names. Each color must be separated by a semicolon (`;`). Alternatively, you can pass an array of color values to this property using JavaScript. */ swatches?: SlColorPicker["swatches"]; /** By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you to place the form control outside of a form and associate it with the form that has this `id`. The form must be in the same document or shadow root for this to work. */ form?: SlColorPicker["form"]; /** Makes the color picker a required field. */ required?: SlColorPicker["required"]; /** */ base?: SlColorPicker["base"]; /** */ input?: SlColorPicker["input"]; /** */ dropdown?: SlColorPicker["dropdown"]; /** */ previewButton?: SlColorPicker["previewButton"]; /** */ trigger?: SlColorPicker["trigger"]; /** The default value of the form control. Primarily used for resetting the form control. */ defaultValue?: SlColorPicker["defaultValue"]; /** Gets the validity state object */ validity?: SlColorPicker["validity"]; /** Gets the validation message */ validationMessage?: SlColorPicker["validationMessage"]; /** Emitted when the color picker loses focus. */ onSlBlur?: (e: CustomEvent<never>) => void; /** Emitted when the color picker's value changes. */ onSlChange?: (e: CustomEvent<never>) => void; /** Emitted when the color picker receives focus. */ onSlFocus?: (e: CustomEvent<never>) => void; /** Emitted when the color picker receives input. */ onSlInput?: (e: CustomEvent<never>) => void; /** Emitted when the form control has been checked for validity and its constraints aren't satisfied. */ onSlInvalid?: (e: CustomEvent<never>) => void; }; type SlCopyButtonProps = { /** The text value to copy. */ value?: SlCopyButton["value"]; /** An id that references an element in the same document from which data will be copied. If both this and `value` are present, this value will take precedence. By default, the target element's `textContent` will be copied. To copy an attribute, append the attribute name wrapped in square brackets, e.g. `from="el[value]"`. To copy a property, append a dot and the property name, e.g. `from="el.value"`. */ from?: SlCopyButton["from"]; /** Disables the copy button. */ disabled?: SlCopyButton["disabled"]; /** A custom label to show in the tooltip. */ "copy-label"?: SlCopyButton["copyLabel"]; /** A custom label to show in the tooltip after copying. */ "success-label"?: SlCopyButton["successLabel"]; /** A custom label to show in the tooltip when a copy error occurs. */ "error-label"?: SlCopyButton["errorLabel"]; /** The length of time to show feedback before restoring the default trigger. */ "feedback-duration"?: SlCopyButton["feedbackDuration"]; /** The preferred placement of the tooltip. */ "tooltip-placement"?: SlCopyButton["tooltipPlacement"]; /** Enable this option to prevent the tooltip from being clipped when the component is placed inside a container with `overflow: auto|hidden|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all, scenarios. */ hoist?: SlCopyButton["hoist"]; /** */ copyIcon?: SlCopyButton["copyIcon"]; /** */ successIcon?: SlCopyButton["successIcon"]; /** */ errorIcon?: SlCopyButton["errorIcon"]; /** */ tooltip?: SlCopyButton["tooltip"]; /** */ isCopying?: SlCopyButton["isCopying"]; /** */ status?: SlCopyButton["status"]; /** Emitted when the data has been copied. */ onSlCopy?: (e: CustomEvent<never>) => void; /** Emitted when the data could not be copied. */ onSlError?: (e: CustomEvent<never>) => void; }; type SlDetailsProps = { /** Indicates whether or not the details is open. You can toggle this attribute to show and hide the details, or you can use the `show()` and `hide()` methods and this attribute will reflect the details' open state. */ open?: SlDetails["open"]; /** The summary to show in the header. If you need to display HTML, use the `summary` slot instead. */ summary?: SlDetails["summary"]; /** Disables the details so it can't be toggled. */ disabled?: SlDetails["disabled"]; /** */ details?: SlDetails["details"]; /** */ header?: SlDetails["header"]; /** */ body?: SlDetails["body"]; /** */ expandIconSlot?: SlDetails["expandIconSlot"]; /** */ detailsObserver?: SlDetails["detailsObserver"]; /** Emitted when the details opens. */ onSlShow?: (e: CustomEvent<never>) => void; /** Emitted after the details opens and all animations are complete. */ onSlAfterShow?: (e: CustomEvent<never>) => void; /** Emitted when the details closes. */ onSlHide?: (e: CustomEvent<never>) => void; /** Emitted after the details closes and all animations are complete. */ onSlAfterHide?: (e: CustomEvent<never>) => void; }; type SlDialogProps = { /** Indicates whether or not the dialog is open. You can toggle this attribute to show and hide the dialog, or you can use the `show()` and `hide()` methods and this attribute will reflect the dialog's open state. */ open?: SlDialog["open"]; /** The dialog's label as displayed in the header. You should always include a relevant label even when using `no-header`, as it is required for proper accessibility. If you need to display HTML, use the `label` slot instead. */ label?: SlDialog["label"]; /** Disables the header. This will also remove the default close button, so please ensure you provide an easy, accessible way for users to dismiss the dialog. */ "no-header"?: SlDialog["noHeader"]; /** Exposes the internal modal utility that controls focus trapping. To temporarily disable focus trapping and allow third-party modals spawned from an active Shoelace modal, call `modal.activateExternal()` when the third-party modal opens. Upon closing, call `modal.deactivateExternal()` to restore Shoelace's focus trapping. */ modal?: SlDialog["modal"]; /** */ dialog?: SlDialog["dialog"]; /** */ panel?: SlDialog["panel"]; /** */ overlay?: SlDialog["overlay"]; /** Emitted when the dialog opens. */ onSlShow?: (e: CustomEvent<never>) => void; /** Emitted after the dialog opens and all animations are complete. */ onSlAfterShow?: (e: CustomEvent<never>) => void; /** Emitted when the dialog closes. */ onSlHide?: (e: CustomEvent<never>) => void; /** Emitted after the dialog closes and all animations are complete. */ onSlAfterHide?: (e: CustomEvent<never>) => void; /** Emitted when the dialog opens and is ready to receive focus. Calling `event.preventDefault()` will prevent focusing and allow you to set it on a different element, such as an input. */ onSlInitialFocus?: (e: CustomEvent<never>) => void; /** Emitted when the user attempts to close the dialog by clicking the close button, clicking the overlay, or pressing escape. Calling `event.preventDefault()` will keep the dialog open. Avoid using this unless closing the dialog will result in destructive behavior such as data loss. */ onSlRequestClose?: (e: CustomEvent<{ source: "close-button" | "keyboard" | "overlay" }>) => void; }; type SlDividerProps = { /** Draws the divider in a vertical orientation. */ vertical?: SlDivider["vertical"]; }; type SlDrawerProps = { /** Indicates whether or not the drawer is open. You can toggle this attribute to show and hide the drawer, or you can use the `show()` and `hide()` methods and this attribute will reflect the drawer's open state. */ open?: SlDrawer["open"]; /** The drawer's label as displayed in the header. You should always include a relevant label even when using `no-header`, as it is required for proper accessibility. If you need to display HTML, use the `label` slot instead. */ label?: SlDrawer["label"]; /** The direction from which the drawer will open. */ placement?: SlDrawer["placement"]; /** By default, the drawer slides out of its containing block (usually the viewport). To make the drawer slide out of its parent element, set this attribute and add `position: relative` to the parent. */ contained?: SlDrawer["contained"]; /** Removes the header. This will also remove the default close button, so please ensure you provide an easy, accessible way for users to dismiss the drawer. */ "no-header"?: SlDrawer["noHeader"]; /** Exposes the internal modal utility that controls focus trapping. To temporarily disable focus trapping and allow third-party modals spawned from an active Shoelace modal, call `modal.activateExternal()` when the third-party modal opens. Upon closing, call `modal.deactivateExternal()` to restore Shoelace's focus trapping. */ modal?: SlDrawer["modal"]; /** */ drawer?: SlDrawer["drawer"]; /** */ panel?: SlDrawer["panel"]; /** */ overlay?: SlDrawer["overlay"]; /** Emitted when the drawer opens. */ onSlShow?: (e: CustomEvent<never>) => void; /** Emitted after the drawer opens and all animations are complete. */ onSlAfterShow?: (e: CustomEvent<never>) => void; /** Emitted when the drawer closes. */ onSlHide?: (e: CustomEvent<never>) => void; /** Emitted after the drawer closes and all animations are complete. */ onSlAfterHide?: (e: CustomEvent<never>) => void; /** Emitted when the drawer opens and is ready to receive focus. Calling `event.preventDefault()` will prevent focusing and allow you to set it on a different element, such as an input. */ onSlInitialFocus?: (e: CustomEvent<never>) => void; /** Emitted when the user attempts to close the drawer by clicking the close button, clicking the overlay, or pressing escape. Calling `event.preventDefault()` will keep the drawer open. Avoid using this unless closing the drawer will result in destructive behavior such as data loss. */ onSlRequestClose?: (e: CustomEvent<{ source: "close-button" | "keyboard" | "overlay" }>) => void; }; type SlDropdownProps = { /** Indicates whether or not the dropdown is open. You can toggle this attribute to show and hide the dropdown, or you can use the `show()` and `hide()` methods and this attribute will reflect the dropdown's open state. */ open?: SlDropdown["open"]; /** The preferred placement of the dropdown panel. Note that the actual placement may vary as needed to keep the panel inside of the viewport. */ placement?: SlDropdown["placement"]; /** Disables the dropdown so the panel will not open. */ disabled?: SlDropdown["disabled"]; /** By default, the dropdown is closed when an item is selected. This attribute will keep it open instead. Useful for dropdowns that allow for multiple interactions. */ "stay-open-on-select"?: SlDropdown["stayOpenOnSelect"]; /** The distance in pixels from which to offset the panel away from its trigger. */ distance?: SlDropdown["distance"]; /** The distance in pixels from which to offset the panel along its trigger. */ skidding?: SlDropdown["skidding"]; /** Enable this option to prevent the panel from being clipped when the component is placed inside a container with `overflow: auto|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all, scenarios. */ hoist?: SlDropdown["hoist"]; /** Syncs the popup width or height to that of the trigger element. */ sync?: SlDropdown["sync"]; /** */ popup?: SlDropdown["popup"]; /** */ trigger?: SlDropdown["trigger"]; /** */ panel?: SlDropdown["panel"]; /** The dropdown will close when the user interacts outside of this element (e.g. clicking). Useful for composing other components that use a dropdown internally. */ containingElement?: SlDropdown["containingElement"]; /** Emitted when the dropdown opens. */ onSlShow?: (e: CustomEvent<never>) => void; /** Emitted after the dropdown opens and all animations are complete. */ onSlAfterShow?: (e: CustomEvent<never>) => void; /** Emitted when the dropdown closes. */ onSlHide?: (e: CustomEvent<never>) => void; /** Emitted after the dropdown closes and all animations are complete. */ onSlAfterHide?: (e: CustomEvent<never>) => void; }; type SlFormatBytesProps = { /** The number to format in bytes. */ value?: SlFormatBytes["value"]; /** The type of unit to display. */ unit?: SlFormatBytes["unit"]; /** Determines how to display the result, e.g. "100 bytes", "100 b", or "100b". */ display?: SlFormatBytes["display"]; }; type SlFormatDateProps = { /** The date/time to format. If not set, the current date and time will be used. When passing a string, it's strongly recommended to use the ISO 8601 format to ensure timezones are handled correctly. To convert a date to this format in JavaScript, use [`date.toISOString()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString). */ date?: SlFormatDate["date"]; /** The format for displaying the weekday. */ weekday?: SlFormatDate["weekday"]; /** The format for displaying the era. */ era?: SlFormatDate["era"]; /** The format for displaying the year. */ year?: SlFormatDate["year"]; /** The format for displaying the month. */ month?: SlFormatDate["month"]; /** The format for displaying the day. */ day?: SlFormatDate["day"]; /** The format for displaying the hour. */ hour?: SlFormatDate["hour"]; /** The format for displaying the minute. */ minute?: SlFormatDate["minute"]; /** The format for displaying the second. */ second?: SlFormatDate["second"]; /** The format for displaying the time. */ "time-zone-name"?: SlFormatDate["timeZoneName"]; /** The time zone to express the time in. */ "time-zone"?: SlFormatDate["timeZone"]; /** The format for displaying the hour. */ "hour-format"?: SlFormatDate["hourFormat"]; }; type SlFormatNumberProps = { /** The number to format. */ value?: SlFormatNumber["value"]; /** The formatting style to use. */ type?: SlFormatNumber["type"]; /** Turns off grouping separators. */ "no-grouping"?: SlFormatNumber["noGrouping"]; /** The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code to use when formatting. */ currency?: SlFormatNumber["currency"]; /** How to display the currency. */ "currency-display"?: SlFormatNumber["currencyDisplay"]; /** The minimum number of integer digits to use. Possible values are 1-21. */ "minimum-integer-digits"?: SlFormatNumber["minimumIntegerDigits"]; /** The minimum number of fraction digits to use. Possible values are 0-20. */ "minimum-fraction-digits"?: SlFormatNumber["minimumFractionDigits"]; /** The maximum number of fraction digits to use. Possible values are 0-0. */ "maximum-fraction-digits"?: SlFormatNumber["maximumFractionDigits"]; /** The minimum number of significant digits to use. Possible values are 1-21. */ "minimum-significant-digits"?: SlFormatNumber["minimumSignificantDigits"]; /** The maximum number of significant digits to use,. Possible values are 1-21. */ "maximum-significant-digits"?: SlFormatNumber["maximumSignificantDigits"]; }; type SlIconProps = { /** The name of the icon to draw. Available names depend on the icon library being used. */ name?: SlIcon["name"]; /** An external URL of an SVG file. Be sure you trust the content you are including, as it will be executed as code and can result in XSS attacks. */ src?: SlIcon["src"]; /** An alternate description to use for assistive devices. If omitted, the icon will be considered presentational and ignored by assistive devices. */ label?: SlIcon["label"]; /** The name of a registered custom icon library. */ library?: SlIcon["library"]; /** Emitted when the icon has loaded. When using `spriteSheet: true` this will not emit. */ onSlLoad?: (e: CustomEvent<never>) => void; /** Emitted when the icon fails to load due to an error. When using `spriteSheet: true` this will not emit. */ onSlError?: (e: CustomEvent<never>) => void; }; type SlIconButtonProps = { /** The name of the icon to draw. Available names depend on the icon library being used. */ name?: SlIconButton["name"]; /** The name of a registered custom icon library. */ library?: SlIconButton["library"]; /** An external URL of an SVG file. Be sure you trust the content you are including, as it will be executed as code and can result in XSS attacks. */ src?: SlIconButton["src"]; /** When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`. */ href?: SlIconButton["href"]; /** Tells the browser where to open the link. Only used when `href` is set. */ target?: SlIconButton["target"]; /** Tells the browser to download the linked file as this filename. Only used when `href` is set. */ download?: SlIconButton["download"]; /** A description that gets read by assistive devices. For optimal accessibility, you should always include a label that describes what the icon button does. */ label?: SlIconButton["label"]; /** Disables the button. */ disabled?: SlIconButton["disabled"]; /** */ button?: SlIconButton["button"]; /** Emitted when the icon button loses focus. */ onSlBlur?: (e: CustomEvent<never>) => void; /** Emitted when the icon button gains focus. */ onSlFocus?: (e: CustomEvent<never>) => void; }; type SlImageComparerProps = { /** The position of the divider as a percentage. */ position?: SlImageComparer["position"]; /** */ base?: SlImageComparer["base"]; /** */ handle?: SlImageComparer["handle"]; /** Emitted when the position changes. */ onSlChange?: (e: CustomEvent<never>) => void; }; type SlIncludeProps = { /** The location of the HTML file to include. Be sure you trust the content you are including as it will be executed as code and can result in XSS attacks. */ src?: SlInclude["src"]; /** The fetch mode to use. */ mode?: SlInclude["mode"]; /** Allows included scripts to be executed. Be sure you trust the content you are including as it will be executed as code and can result in XSS attacks. */ "allow-scripts"?: SlInclude["allowScripts"]; /** Emitted when the included file is loaded. */ onSlLoad?: (e: CustomEvent<never>) => void; /** Emitted when the included file fails to load due to an error. */ onSlError?: (e: CustomEvent<{ status: number }>) => void; }; type SlInputProps = { /** */ title?: SlInput["title"]; /** The type of input. Works the same as a native `<input>` element, but only a subset of types are supported. Defaults to `text`. */ type?: SlInput["type"]; /** The name of the input, submitted as a name/value pair with form data. */ name?: SlInput["name"]; /** The current value of the input, submitted as a name/value pair with form data. */ value?: SlInput["value"]; /** The input's size. */ size?: SlInput["size"]; /** Draws a filled input. */ filled?: SlInput["filled"]; /** Draws a pill-style input with rounded edges. */ pill?: SlInput["pill"]; /** The input's label. If you need to display HTML, use the `label` slot instead. */ label?: SlInput["label"]; /** The input's help text. If you need to display HTML, use the `help-text` slot instead. */ "help-text"?: SlInput["helpText"]; /** Adds a clear button when the input is not empty. */ clearable?: SlInput["clearable"]; /** Disables the input. */ disabled?: SlInput["disabled"]; /** Placeholder text to show as a hint when the input is empty. */ placeholder?: SlInput["placeholder"]; /** Makes the input readonly. */ readonly?: SlInput["readonly"]; /** Adds a button to toggle the password's visibility. Only applies to password types. */ "password-toggle"?: SlInput["passwordToggle"]; /** Determines whether or not the password is currently visible. Only applies to password input types. */ "password-visible"?: SlInput["passwordVisible"]; /** Hides the browser's built-in increment/decrement spin buttons for number inputs. */ "no-spin-buttons"?: SlInput["noSpinButtons"]; /** By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you to place the form control outside of a form and associate it with the form that has this `id`. The form must be in the same document or shadow root for this to work. */ form?: SlInput["form"]; /** Makes the input a required field. */ required?: SlInput["required"]; /** A regular expression pattern to validate input against. */ pattern?: SlInput["pattern"]; /** The minimum length of input that will be considered valid. */ minlength?: SlInput["minlength"]; /** The maximum length of input that will be considered valid. */ maxlength?: SlInput["maxlength"]; /** The input's minimum value. Only applies to date and number input types. */ min?: SlInput["min"]; /** The input's maximum value. Only applies to date and number input types. */ max?: SlInput["max"]; /** Specifies the granularity that the value must adhere to, or the special value `any` which means no stepping is implied, allowing any numeric value. Only applies to date and number input types. */ step?: SlInput["step"]; /** Controls whether and how text input is automatically capitalized as it is entered by the user. */ autocapitalize?: SlInput["autocapitalize"]; /** Indicates whether the browser's autocorrect feature is on or off. */ autocorrect?: SlInput["autocorrect"]; /** Specifies what permission the browser has to provide assistance in filling out form field values. Refer to [this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for available values. */ autocomplete?: SlInput["autocomplete"]; /** Indicates that the input should receive focus on page load. */ autofocus?: SlInput["autofocus"]; /** Used to customize the label or icon of the Enter key on virtual keyboards. */ enterkeyhint?: SlInput["enterkeyhint"]; /** Enables spell checking on the input. */ spellcheck?: SlInput["spellcheck"]; /** Tells the browser what type of data will be entered by the user, allowing it to display the appropriate virtual keyboard on supportive devices. */ inputmode?: SlInput["inputmode"]; /** */ input?: SlInput["input"]; /** The default value of the form control. Primarily used for resetting the form control. */ defaultValue?: SlInput["defaultValue"]; /** Gets or sets the current value as a `Date` object. Returns `null` if the value can't be converted. This will use the native `<input type="{{type}}">` implementation and may result in an error. */ valueAsDate?: SlInput["valueAsDate"]; /** Gets or sets the current value as a number. Returns `NaN` if the value can't be converted. */ valueAsNumber?: SlInput["valueAsNumber"]; /** Gets the validity state object */ validity?: SlInput["validity"]; /** Gets the validation message */ validationMessage?: SlInput["validationMessage"]; /** Emitted when the control loses focus. */ onSlBlur?: (e: CustomEvent<never>) => void; /** Emitted when an alteration to the control's value is committed by the user. */ onSlChange?: (e: CustomEvent<never>) => void; /** Emitted when the clear button is activated. */ onSlClear?: (e: CustomEvent<never>) => void; /** Emitted when the control gains focus. */ onSlFocus?: (e: CustomEvent<never>) => void; /** Emitted when the control receives input. */ onSlInput?: (e: CustomEvent<never>) => void; /** Emitted when the form control has been checked for validity and its constraints aren't satisfied. */ onSlInvalid?: (e: CustomEvent<never>) => void; }; type SlMenuProps = { /** */ defaultSlot?: SlMenu["defaultSlot"]; /** Emitted when a menu item is selected. */ onSlSelect?: (e: CustomEvent<{ item: SlMenuItem }>) => void; }; type SlMenuItemProps = { /** The type of menu item to render. To use `checked`, this value must be set to `checkbox`. */ type?: SlMenuItem["type"]; /** Draws the item in a checked state. */ checked?: SlMenuItem["checked"]; /** A unique value to store in the menu item. This can be used as a way to identify menu items when selected. */ value?: SlMenuItem["value"]; /** Draws the menu item in a loading state. */ loading?: SlMenuItem["loading"]; /** Draws the menu item in a disabled state, preventing selection. */ disabled?: SlMenuItem["disabled"]; /** */ defaultSlot?: SlMenuItem["defaultSlot"]; /** */ menuItem?: SlMenuItem["menuItem"]; }; type SlMenuLabelProps = {}; type SlMutationObserverProps = { /** Watches for changes to attributes. To watch only specific attributes, separate them by a space, e.g. `attr="class id title"`. To watch all attributes, use `*`. */ attr?: SlMutationObserver["attr"]; /** Indicates whether or not the attribute's previous value should be recorded when monitoring changes. */ "attr-old-value"?: SlMutationObserver["attrOldValue"]; /** Watches for changes to the character data contained within the node. */ "char-data"?: SlMutationObserver["charData"]; /** Indicates whether or not the previous value of the node's text should be recorded. */ "char-data-old-value"?: SlMutationObserver["charDataOldValue"]; /** Watches for the addition or removal of new child nodes. */ "child-list"?: SlMutationObserver["childList"]; /** Disables the observer. */ disabled?: SlMutationObserver["disabled"]; /** Emitted when a mutation occurs. */ onSlMutation?: (e: CustomEvent<{ mutationList: MutationRecord[] }>) => void; }; type SlOptionProps = { /** The option's value. When selected, the containing form control will receive this value. The value must be unique from other options in the same group. Values may not contain spaces, as spaces are used as delimiters when listing multiple values. */ value?: SlOption["value"]; /** Draws the option in a disabled state, preventing selection. */ disabled?: SlOption["disabled"]; /** */ defaultSlot?: SlOption["defaultSlot"]; /** */ current?: SlOption["current"]; /** */ selected?: SlOption["selected"]; /** */ hasHover?: SlOption["hasHover"]; }; type SlPopupProps = { /** The element the popup will be anchored to. If the anchor lives outside of the popup, you can provide the anchor element `id`, a DOM element reference, or a `VirtualElement`. If the anchor lives inside the popup, use the `anchor` slot instead. */ anchor?: SlPopup["anchor"]; /** Activates the positioning logic and shows the popup. When this attribute is removed, the positioning logic is torn down and the popup will be hidden. */ active?: SlPopup["active"]; /** The preferred placement of the popup. Note that the actual placement will vary as configured to keep the panel inside of the viewport. */ placement?: SlPopup["placement"]; /** Determines how the popup is positioned. The `absolute` strategy works well in most cases, but if overflow is clipped, using a `fixed` position strategy can often workaround it. */ strategy?: SlPopup["strategy"]; /** The distance in pixels from which to offset the panel away from its anchor. */ distance?: SlPopup["distance"]; /** The distance in pixels from which to offset the panel along its anchor. */ skidding?: SlPopup["skidding"]; /** Attaches an arrow to the popup. The arrow's size and color can be customized using the `--arrow-size` and `--arrow-color` custom properties. For additional customizations, you can also target the arrow using `::part(arrow)` in your stylesheet. */ arrow?: SlPopup["arrow"]; /** The placement of the arrow. The default is `anchor`, which will align the arrow as close to the center of the anchor as possible, considering available space and `arrow-padding`. A value of `start`, `end`, or `center` will align the arrow to the start, end, or center of the popover instead. */ "arrow-placement"?: SlPopup["arrowPlacement"]; /** The amount of padding between the arrow and the edges of the popup. If the popup has a border-radius, for example, this will prevent it from overflowing the corners. */ "arrow-padding"?: SlPopup["arrowPadding"]; /** When set, placement of the popup will flip to the opposite site to keep it in view. You can use `flipFallbackPlacements` to further configure how the fallback placement is determined. */ flip?: SlPopup["flip"]; /** If the preferred placement doesn't fit, popup will be tested in these fallback placements until one fits. Must be a string of any number of placements separated by a space, e.g. "top bottom left". If no placement fits, the flip fallback strategy will be used instead. */ "flip-fallback-placements"?: SlPopup["flipFallbackPlacements"]; /** When neither the preferred pl