UNPKG

@public-ui/components

Version:

Contains all web components that belong to KoliBri - The accessible HTML-Standard.

22 lines (21 loc) 1.82 kB
import type { Generic } from 'adopted-style-sheets'; import type { AriaExpandedPropType, ButtonVariantPropType, LinkVariantPropType, PropAccessKey, PropAlternativeButtonLinkRole, PropAriaControls, PropAriaDescription, PropAriaSelected, PropButtonCallbacks, PropButtonType, PropButtonVariant, PropCustomClass, PropDisabled, PropHideLabel, PropIcons, PropId, PropLabelWithExpertSlot, PropName, PropShortKey, PropSyncValueBySelector, PropTooltipAlign } from '../props'; import type { KoliBriAllIcons, StencilUnknown } from '../types'; export type RequiredButtonProps = PropLabelWithExpertSlot; export type OptionalButtonProps = { tabIndex: number; value: StencilUnknown; ariaExpanded: AriaExpandedPropType; } & PropAccessKey & PropAlternativeButtonLinkRole & PropAriaControls & PropAriaDescription & PropAriaSelected & PropButtonCallbacks<StencilUnknown> & PropButtonType & PropButtonVariant & PropCustomClass & PropDisabled & PropHideLabel & PropIcons & PropId & PropName & PropShortKey & PropSyncValueBySelector & PropTooltipAlign; export type RequiredButtonStates = RequiredButtonProps & PropButtonType & { icons: KoliBriAllIcons; }; export type OptionalButtonStates = Omit<RequiredButtonProps & OptionalButtonProps, keyof RequiredButtonStates> & { buttonVariant: ButtonVariantPropType; linkVariant: LinkVariantPropType; }; export type ButtonProps = Generic.Element.Members<RequiredButtonProps, OptionalButtonProps>; export type ButtonStates = Generic.Element.Members<RequiredButtonStates, OptionalButtonStates>; export type ButtonAPI = Generic.Element.ComponentApi<RequiredButtonProps, OptionalButtonProps, RequiredButtonStates, OptionalButtonStates>; export type InternalButtonProps = RequiredButtonProps & OptionalButtonProps; export type InternalButtonAPI = Omit<ButtonAPI, 'validateVariant'>;