UNPKG

koval-ui

Version:

React components collection with minimalistic design. Supports theming, layout, and input validation.

1,580 lines (1,501 loc) 120 kB
import { AccessorFn as AccessorFn_2 } from '@tanstack/react-table'; import { ActionProps } from '../../internal/Actions'; import { AriaAttributes } from 'react'; import { AriaRole } from 'react'; import { ButtonHTMLAttributes } from 'react'; import { CellContext } from '@tanstack/react-table'; import { ChangeEvent } from 'react'; import { ColumnFiltersState } from '@tanstack/react-table'; import { ColumnPinningState } from '@tanstack/react-table'; import { ComponentProps } from 'react'; import { DataAttributes as DataAttributes_2 } from '../../internal/LibraryAPI/LibraryTypes.tsx'; import { DetailedHTMLProps } from 'react'; import { ElementType } from 'react'; import { FC } from 'react'; import { FieldsetHTMLAttributes } from 'react'; import { FilterFnOption } from '@tanstack/react-table'; import { FocusEvent as FocusEvent_2 } from 'react'; import { FormHTMLAttributes } from 'react'; import { ForwardedRef } from 'react'; import { ForwardRefExoticComponent } from 'react'; import { HeaderContext } from '@tanstack/react-table'; import { HTMLAttributeReferrerPolicy } from 'react'; import { HTMLAttributes } from 'react'; import { HTMLInputAutoCompleteAttribute } from 'react'; import { IframeHTMLAttributes } from 'react'; import { ImgHTMLAttributes } from 'react'; import { InputHTMLAttributes } from 'react'; import { InvalidEvent } from 'react'; import { KeyboardEvent as KeyboardEvent_2 } from 'react'; import { MouseEvent as MouseEvent_2 } from 'react'; import { MutableRefObject } from 'react'; import { NativeProps } from '../../internal/inputs/NativeProps'; import { NativeProps as NativeProps_3 } from '../../internal/inputs/NativeProps.ts'; import { NativePropsTextual as NativePropsTextual_2 } from '../../internal/inputs'; import { PaginationState } from '@tanstack/react-table'; import { Placement } from '@floating-ui/react-dom'; import { ReactElement } from 'react'; import { ReactNode } from 'react'; import { RefAttributes } from 'react'; import { RowSelectionState } from '@tanstack/react-table'; import { SelectHTMLAttributes } from 'react'; import { SortingFn as SortingFn_2 } from '@tanstack/react-table'; import { SortingState } from '@tanstack/react-table'; import { SVGProps } from 'react'; import { SyntheticEvent } from 'react'; import { TextareaHTMLAttributes } from 'react'; export declare const A: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { children?: ReactNode; } & { href?: string | undefined; } & RefAttributes<HTMLAnchorElement>>; export declare type AccessorFn = AccessorFn_2<TableData, TableRow | TableValue>; declare const Actions: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { children?: ReactNode; /** Provide an array of actions with callbacks */ actions?: (Props_10 | [Props_10, Props_10])[] | undefined; /** Set design of Actions block */ variant?: "primary" | "inverted" | undefined; /** Provide CSS class name for action button */ classNameAction?: string | undefined; /** Provide CSS class name for action button row container */ classNameRow?: string | undefined; } & RefAttributes<HTMLDivElement>>; declare enum ActionTypes { default = "default", success = "success", link = "link", danger = "danger" } declare const Audio_2: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { /** * A URL for an image to be shown left to audio controls. * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio#poster */ poster?: string | undefined; /** * Set a callback to run when the audio is buffered enough to play on the user side */ onReady?: ((event: SyntheticEvent<Element_2>) => void) | undefined; /** * Set a callback to capture audio errors */ onError?: ((event: SyntheticEvent<Element_2>) => void) | undefined; /** * Set a callback to run when the user plays the audio */ onPlay?: ((event: SyntheticEvent<Element_2>) => void) | undefined; /** * Set a callback to run when the user pauses the audio */ onPause?: ((event: SyntheticEvent<Element_2>) => void) | undefined; /** * Provide audio file url * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio */ src?: string | undefined; /** * Provide audio sources configs array. An advanced alternative to `src` prop * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio */ sources?: Source_2[] | undefined; /** * Provide a title for the audio */ title?: string | undefined; children?: ReactNode; } & RefAttributes<HTMLAudioElement>>; export { Audio_2 as Audio } export declare const B: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { children?: ReactNode; } & RefAttributes<HTMLElement>>; export declare const BlockQuote: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { children?: ReactNode; } & RefAttributes<HTMLQuoteElement>>; export declare const Breadcrumbs: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { children?: ReactNode; /** Provide a list of items to render inside breadcrumbs */ items: Item[]; /** Enable to show ellipsis (...) after the first breadcrumb item */ showEllipsis?: boolean | undefined; /** * Provide a link component to render as a breadcrumb. Can be used with Next.js * @example * import Link from 'next/link' * <Breadcrumbs linkComponent={Link} /> */ linkComponent?: FC<LinkProps> | undefined; } & RefAttributes<HTMLDivElement>>; export declare const Button: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { children?: ReactNode; onClick?: ((event: MouseEvent_2<HTMLButtonElement>) => void) | undefined; type?: DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>['type']; disabled?: boolean | undefined; variant?: "link" | "success" | "danger" | "primary" | "action" | "alternative" | undefined; size?: "small" | "medium" | "large" | undefined; prefix?: FC<HTMLAttributes<HTMLOrSVGElement>> | undefined; suffix?: FC<HTMLAttributes<HTMLOrSVGElement>> | undefined; } & RefAttributes<HTMLButtonElement>>; export declare const ButtonGroup: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { children?: ReactNode; layout?: "horizontal" | "vertical" | undefined; } & RefAttributes<HTMLDivElement>>; declare type CallbackPropsInteractive = { /** * Provide value CheckboxInput. * NB! This prop is unlike TextInput and doesn't influence a state of input! Use `checked` prop for that. * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#additional_attributes */ value?: InputHTMLAttributes<HTMLInputElement>['value']; /** * Provide default checked state for non-controlled CheckboxInput. * Setting this prop enables non-controlled mode. * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#additional_attributes */ defaultChecked?: InputHTMLAttributes<HTMLInputElement>['checked']; /** * Provide checked state for controlled CheckboxInput. * Setting this prop enables controlled mode. * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#additional_attributes */ checked?: InputHTMLAttributes<HTMLInputElement>['checked']; /** * Set on change callback to get Event object. * @see https://reactjs.org/docs/events.html#form-events */ onChange?: (event: ChangeEvent<HTMLInputElement>) => void; /** * Set on focus callback to get Event object. * @see https://reactjs.org/docs/events.html#onfocus */ onFocus?: (event: FocusEvent_2<HTMLInputElement>) => void; /** * Set on blur callback to get Event object. * @see https://reactjs.org/docs/events.html#onblur */ onBlur?: (event: FocusEvent_2<HTMLInputElement>) => void; /** * Set on key down callback to get Event object. * @see https://reactjs.org/docs/events.html#keyboard-events */ onKeyDown?: (event: KeyboardEvent_2<HTMLInputElement>) => void; /** * Set on key up callback to get Event object. * @see https://reactjs.org/docs/events.html#keyboard-events */ onKeyUp?: (event: KeyboardEvent_2<HTMLInputElement>) => void; }; declare type CallbackPropsTextual<TElement = HTMLInputElement> = { /** * Provide value for controlled TextInput. * Setting this prop enables controlled mode. * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value */ value?: InputHTMLAttributes<TElement>['value']; /** * Provide value for non-controlled TextInput. * Setting this prop enables non-controlled mode. * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value */ defaultValue?: InputHTMLAttributes<TElement>['defaultValue']; /** * Makes the element not mutable, meaning the user can not edit the control * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly */ readOnly?: InputHTMLAttributes<HTMLInputElement>['readOnly']; /** * Set on change callback to get Event object. * @see https://reactjs.org/docs/events.html#form-events */ onChange?: (event: ChangeEvent<TElement>) => void; /** * Set on focus callback to get Event object. * @see https://reactjs.org/docs/events.html#onfocus */ onFocus?: (event: FocusEvent_2<TElement>) => void; /** * Set on blur callback to get Event object. * @see https://reactjs.org/docs/events.html#onblur */ onBlur?: (event: FocusEvent_2<TElement>) => void; /** * Set on key down callback to get Event object. * @see https://reactjs.org/docs/events.html#keyboard-events */ onKeyDown?: (event: KeyboardEvent_2<TElement>) => void; /** * Set on key up callback to get Event object. * @see https://reactjs.org/docs/events.html#keyboard-events */ onKeyUp?: (event: KeyboardEvent_2<TElement>) => void; }; export declare const Card: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { children?: ReactNode; /** Provide an url for header image */ headerImageUrl?: string | undefined; /** Provide an array of actions with callbacks */ actions?: (ActionProps | [ActionProps, ActionProps])[] | undefined; /** Set vertical or horizontal layout for the card */ variant?: "horizontal" | "vertical" | undefined; /** Provide width of the card. Applied in vertical mode */ width?: number | undefined; /** Provide height of the card. Applied in horizontal mode */ height?: number | undefined; } & RefAttributes<HTMLDivElement>>; export declare const Carousel: FC<Props_6>; export declare type CellComponent = FC<unknown & { value?: TableValue; cellContext: CellContext<TableData, TableRow | TableValue>; }>; declare type ChildProps = { name?: Props_4['name']; disabled?: Props_4['disabled']; required?: Props_4['required']; id?: Props_4['id']; }; export declare const Code: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { children?: ReactNode; } & RefAttributes<HTMLElement>>; export declare const Col: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & Partial<SizesConfig> & Partial<OffsetConfig> & { /** Select an HTML element to render as a container */ as?: string | undefined; children?: ReactNode; } & RefAttributes<HTMLElement>>; /** * Table column config */ export declare type Column = { /** * Provide a unique id for the column */ id: string; /** * Provide a human-readable title for the column */ name: string; /** * Define a type of column data * @see ColumnTypes */ columnType?: keyof typeof ColumnTypes; /** * Provide a custom React component to render column cells * @see CellComponent */ columnCell?: CellComponent; /** * Set the width of the columns. Defaults to 166 */ size?: number; /** * Enable to allow user editing of the column */ editable?: boolean; /** * Enable to allow user filtering of the column */ filterable?: boolean; /** * Enable to make a column able to sort in ascending or descending order */ sortable?: boolean; /** * Enable to make a column able to pin the left or right side */ pinnable?: boolean; /** * Define a type of sorting to be used for the column. Can be one of supported modes or custom function * @see SortingModes * @see SortingFn */ sortingFn?: keyof typeof SortingModes | SortingFn; /** * Define a type of filtering to be used for the column. Can be one of supported modes or custom function * @see FilterFnOption * @see CustomFilterFns */ filterFn?: FilterFnOption<TableData> | keyof typeof CustomFilterFns; /** * Set props for each table cell. Useful for formatting dates, currencies, etc. * @see ColumnFormatOptions */ cellProps?: ColumnFormatOptions; /** * Provide a custom React component to render the column header * @see HeaderCell */ headerCell?: HeaderCell; /** * Provide a custom React component to render the column footer * @see FooterCell */ footerCell?: FooterCell; /** * Provide a custom React component to render the column filter input * @see FilterInput */ filterInput?: FilterInput; } & ({ /** * Provide an accessor key to get column cell value from table data * @example * { * accessorKey: "foo.bar[6].bazz" * } */ accessorKey: string; /** * Provide an accessor function to get column cell value from table data */ accessorFn?: never; } | { /** * Provide an accessor key to get column cell value from table data * @example * { * accessorKey: "foo.bar[6].bazz" * } */ accessorKey?: never; /** * Provide an accessor function to get column cell value from table data */ accessorFn: AccessorFn; }); export { ColumnFiltersState } export declare type ColumnFormatOptions = NumberProps | DateFormatOptions | Record<string, unknown>; export { ColumnPinningState } export declare enum ColumnTypes { text = "text", decimal = "decimal", percentage = "percentage", currency = "currency", unit = "unit", date = "date", select = "select" } declare enum CompactDisplayModes { short = "short", long = "long" } export declare const Content: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { children?: ReactNode; } & RefAttributes<HTMLDivElement>>; declare enum CountryCodes { AF = "Afghanistan", AX = "AlandIslands", AL = "Albania", DZ = "Algeria", AS = "American Samoa", AD = "Andorra", AO = "Angola", AI = "Anguilla", AQ = "Antarctica", AG = "Antigua and Barbuda", AR = "Argentina", AM = "Armenia", AW = "Aruba", AU = "Australia", AT = "Austria", AZ = "Azerbaijan", BS = "Bahamas", BH = "Bahrain", BD = "Bangladesh", BB = "Barbados", BY = "Belarus", BE = "Belgium", BZ = "Belize", BJ = "Benin", BM = "Bermuda", BT = "Bhutan", BO = "Bolivia", BA = "Bosnia and Herzegovina", BW = "Botswana", BV = "Bouvet Island", BR = "Brazil", IO = "British Indian Ocean Territory", BN = "Brunei Darussalam", BG = "Bulgaria", BF = "Burkina Faso", BI = "Burundi", KH = "Cambodia", CM = "Cameroon", CA = "Canada", CV = "Cape Verde", KY = "Cayman Islands", CF = "Central African Republic", TD = "Chad", CL = "Chile", CN = "China", CX = "Christmas Island", CC = "Cocos Keeling Islands", CO = "Colombia", KM = "Comoros", CG = "Congo", CD = "Congo Democratic Republic", CK = "Cook Islands", CR = "Costa Rica", CI = "CoteDIvoire", HR = "Croatia", CU = "Cuba", CW = "Cura\u00E7ao", CY = "Cyprus", CZ = "CzechRepublic", DK = "Denmark", DJ = "Djibouti", DM = "Dominica", DO = "Dominican Republic", EC = "Ecuador", EG = "Egypt", SV = "El Salvador", GQ = "Equatorial Guinea", ER = "Eritrea", EE = "Estonia", ET = "Ethiopia", FK = "Falkland Islands", FO = "Faroe Islands", FJ = "Fiji", FI = "Finland", FR = "France", GF = "French Guiana", PF = "French Polynesia", TF = "French Southern Territories", GA = "Gabon", GM = "Gambia", GE = "Georgia", DE = "Germany", GH = "Ghana", GI = "Gibraltar", GR = "Greece", GL = "Greenland", GD = "Grenada", GP = "Guadeloupe", GU = "Guam", GT = "Guatemala", GG = "Guernsey", GN = "Guinea", GW = "Guinea Bissau", GY = "Guyana", HT = "Haiti", HM = "Heard Island Mcdonald Islands", VA = "Holy See Vatican City State", HN = "Honduras", HK = "HongKong", HU = "Hungary", IS = "Iceland", IN = "India", ID = "Indonesia", IR = "Iran", IQ = "Iraq", IE = "Ireland", IM = "Isle Of Man", IL = "Israel", IT = "Italy", JM = "Jamaica", JP = "Japan", JE = "Jersey", JO = "Jordan", KZ = "Kazakhstan", KE = "Kenya", KI = "Kiribati", KR = "Korea, Republic of", KP = "Korea, Democratic People's Republic of", KW = "Kuwait", KG = "Kyrgyzstan", LA = "Lao Peoples Democratic Republic", LV = "Latvia", LB = "Lebanon", LS = "Lesotho", LR = "Liberia", LY = "Libyan Arab Jamahiriya", LI = "Liechtenstein", LT = "Lithuania", LU = "Luxembourg", MO = "Macao", MG = "Madagascar", MW = "Malawi", MY = "Malaysia", MV = "Maldives", ML = "Mali", MT = "Malta", MH = "Marshall Islands", MQ = "Martinique", MR = "Mauritania", MU = "Mauritius", YT = "Mayotte", MX = "Mexico", FM = "Micronesia", MD = "Moldova", MC = "Monaco", MN = "Mongolia", ME = "Montenegro", MS = "Montserrat", MA = "Morocco", MZ = "Mozambique", MM = "Myanmar", NA = "Namibia", NR = "Nauru", NP = "Nepal", NL = "Netherlands", NC = "New Caledonia", NZ = "New Zealand", NI = "Nicaragua", NE = "Niger", NG = "Nigeria", NU = "Niue", NF = "Norfolk Island", MP = "Northern Mariana Islands", NO = "Norway", OM = "Oman", PK = "Pakistan", PW = "Palau", PS = "Palestinian Territory", PA = "Panama", PG = "Papua New Guinea", PY = "Paraguay", PE = "Peru", PH = "Philippines", PN = "Pitcairn", PL = "Poland", PT = "Portugal", PR = "Puerto Rico", QA = "Qatar", RE = "Reunion", MK = "Republic of North Macedonia", RO = "Romania", RU = "Russian Federation", RW = "Rwanda", BL = "Saint Barthelemy", SH = "Saint Helena", KN = "Saint Kitts And Nevis", LC = "Saint Lucia", MF = "Saint Martin", PM = "Saint Pierre And Miquelon", VC = "Saint Vincent And Grenadines", WS = "Samoa", SM = "San Marino", ST = "Sao Tome And Principe", SA = "Saudi Arabia", SN = "Senegal", RS = "Serbia", SC = "Seychelles", SL = "Sierra Leone", SG = "Singapore", SK = "Slovakia", SI = "Slovenia", SB = "Solomon Islands", SO = "Somalia", ZA = "South Africa", GS = "South Georgia And Sandwich Island", ES = "Spain", LK = "Sri Lanka", SD = "Sudan", SS = "South Sudan", SR = "Suriname", SJ = "Svalbard And Jan Mayen", SZ = "Swaziland", SE = "Sweden", CH = "Switzerland", SX = "Sint Maarten (Dutch part)", SY = "Syrian Arab Republic", TW = "Taiwan", TJ = "Tajikistan", TZ = "Tanzania", TH = "Thailand", TL = "TimorLeste", TG = "Togo", TK = "Tokelau", TO = "Tonga", TT = "Trinidad And Tobago", TN = "Tunisia", TR = "Turkey", TM = "Turkmenistan", TC = "Turks And Caicos Islands", TV = "Tuvalu", UG = "Uganda", UA = "Ukraine", AE = "United Arab Emirates", GB = "United Kingdom", US = "United States", UM = "United States Outlying Islands", UY = "Uruguay", UZ = "Uzbekistan", VU = "Vanuatu", VE = "Venezuela", VN = "Vietnam", VG = "Virgin Islands British", VI = "Virgin Islands US", WF = "Wallis And Futuna", EH = "Western Sahara", YE = "Yemen", ZM = "Zambia", ZW = "Zimbabwe" } /** * List of available currency codes. ISO 4217 * @see https://www.iso.org/iso-4217-currency-codes.html */ declare enum CurrencyCodes { USD = "USD", CAD = "CAD", EUR = "EUR", AED = "AED", AFN = "AFN", ALL = "ALL", AMD = "AMD", ARS = "ARS", AUD = "AUD", AZN = "AZN", BAM = "BAM", BDT = "BDT", BGN = "BGN", BHD = "BHD", BIF = "BIF", BND = "BND", BOB = "BOB", BRL = "BRL", BWP = "BWP", BYN = "BYN", BZD = "BZD", CDF = "CDF", CHF = "CHF", CLP = "CLP", CNY = "CNY", COP = "COP", CRC = "CRC", CVE = "CVE", CZK = "CZK", DJF = "DJF", DKK = "DKK", DOP = "DOP", DZD = "DZD", EEK = "EEK", EGP = "EGP", ERN = "ERN", ETB = "ETB", GBP = "GBP", GEL = "GEL", GHS = "GHS", GNF = "GNF", GTQ = "GTQ", HKD = "HKD", HNL = "HNL", HRK = "HRK", HUF = "HUF", IDR = "IDR", ILS = "ILS", INR = "INR", IQD = "IQD", IRR = "IRR", ISK = "ISK", JMD = "JMD", JOD = "JOD", JPY = "JPY", KES = "KES", KHR = "KHR", KMF = "KMF", KRW = "KRW", KWD = "KWD", KZT = "KZT", LBP = "LBP", LKR = "LKR", LTL = "LTL", LVL = "LVL", LYD = "LYD", MAD = "MAD", MDL = "MDL", MGA = "MGA", MKD = "MKD", MMK = "MMK", MOP = "MOP", MUR = "MUR", MXN = "MXN", MYR = "MYR", MZN = "MZN", NAD = "NAD", NGN = "NGN", NIO = "NIO", NOK = "NOK", NPR = "NPR", NZD = "NZD", OMR = "OMR", PAB = "PAB", PEN = "PEN", PHP = "PHP", PKR = "PKR", PLN = "PLN", PYG = "PYG", QAR = "QAR", RON = "RON", RSD = "RSD", RUB = "RUB", RWF = "RWF", SAR = "SAR", SDG = "SDG", SEK = "SEK", SGD = "SGD", SOS = "SOS", SYP = "SYP", THB = "THB", TND = "TND", TOP = "TOP", TRY = "TRY", TTD = "TTD", TWD = "TWD", TZS = "TZS", UAH = "UAH", UGX = "UGX", UYU = "UYU", UZS = "UZS", VEF = "VEF", VND = "VND", XAF = "XAF", XOF = "XOF", YER = "YER", ZAR = "ZAR", ZMK = "ZMK", ZWL = "ZWL" } declare enum CurrencyDisplayTypes { code = "code", symbol = "symbol", narrowSymbol = "narrowSymbol", name = "name" } declare enum CurrencySignModes { standard = "standard", accounting = "accounting" } declare enum CustomFilterFns { isInDateRange = "isInDateRange", isInPercentRange = "isInPercentRange" } declare type DataAttributeKey = `data-${string}`; declare type DataAttributes = Record<DataAttributeKey, string>; export declare const DataTable: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { children?: ReactNode; /** * Provide table columns configuration * @see Column */ columns: Column[]; /** * Provide data for the table * @see TableData */ tableData: TableData; /** * Provide a callback to capture table data changes * @see EditState */ onEdit?: ((editState: EditState) => void) | undefined; /** * Control column pinning state externally * @see ColumnPinningState */ columnPinning?: ColumnPinningState | undefined; /** * Control pagination state externally * @see PaginationState */ pagination?: PaginationState | undefined; /** * Provide a callback to capture pagination changes * @see PaginationState */ onPaginationChange?: ((paginationState: PaginationState) => void) | undefined; /** * Manage column filters externally * @see ColumnFiltersState */ columnFilters?: ColumnFiltersState | undefined; /** * Provide a callback to capture column filters changes * @see ColumnFiltersState */ onFiltersChange?: ((filterState: ColumnFiltersState) => void) | undefined; /** * Manage row selection externally * @see RowSelectionState */ rowSelection?: RowSelectionState | undefined; /** * Provide a callback to capture row selection changes * @see RowSelectionState */ onRowSelect?: ((selectionState: RowSelectionState) => void) | undefined; /** * Control table data sorting externally * @see SortingState */ sorting?: SortingState | undefined; /** * Provide a callback to capture table data sorting changes * @see SortingState */ onSortingChange?: ((sortingState: SortingState) => void) | undefined; /** * Configure how table data is processed inside or outside the component * @see ProcessingModes */ processingMode?: "external" | "internal" | undefined; /** * Select which type of table to render * @see RenderModes */ renderMode?: "virtual" | "paginated" | undefined; /** * Set a controlled page count number for pagination. Required for renderMode="paginated-controlled" * @see https://morewings.github.io/koval-ui/?path=/story/components-datatable--paginated-controlled&args=tableData:rows100 */ pageCount?: number | undefined; /** * Provide a string with a BCP 47 language tag or an Intl.Locale instance, * or an array of such locale identifiers. * Used to format dates, numbers, and units. * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales * @see Locale */ locale?: Locale | undefined; /** * Enable column selection */ selectable?: boolean | undefined; /** * Set a height constrain to the data table. 'full' sets to 100% of viewport height */ tableHeight?: number | "full" | undefined; /** * Set a caption text to render below the table */ caption?: string | undefined; } & RefAttributes<HTMLTableElement>>; declare type DateFormatOptions = { /** * The representation of the weekday * @example * 'long' // => Thursday * 'short' // => Thu * 'narrow' // => T */ weekday?: keyof typeof TimeNamedUnit; /** * The representation of the era * @example * 'long' // => Anno Domini * 'short' // => AD * 'narrow' // => A */ era?: keyof typeof TimeNamedUnit; /** * The representation of the year * @example * 'numeric' // => 2008 * '2-digit' // => 08 */ year?: keyof typeof TimeNumericUnit; /** * The representation of the month * @example * 'long' // => March * 'short' // => Mar * 'narrow' // => M * 'numeric' // => 3 * '2-digit' // => 03 */ month?: keyof typeof TimeNumericUnit | keyof typeof TimeNamedUnit; /** * The representation of the day * @example * 'numeric' // => 6 * '2-digit' // => 06 */ day?: keyof typeof TimeNumericUnit; /** * The representation of the hour * @example * 'numeric' // => 6 * '2-digit' // => 06 */ hour?: keyof typeof TimeNumericUnit; /** * The representation of the minute * @example * 'numeric' // => 6 * '2-digit' // => 06 */ minute?: keyof typeof TimeNumericUnit; /** * The representation of the second * @example * 'numeric' // => 6 * '2-digit' // => 06 */ second?: keyof typeof TimeNumericUnit; /** * The localized representation of the time zone name * @example * 'long' // => Long localized form (Pacific Standard Time, Nordamerikanische Westküsten-Normalzeit) * 'short' // => Short localized form (PST, GMT-8) * 'shortOffset' // => Short localized GMT format (GMT-8) * 'longOffset' // => Long localized GMT format (GMT-08:00) * 'shortGeneric' // => Short generic non-location format (PT, Los Angeles Zeit). * 'longGeneric' // => Long generic non-location format (Pacific Time, Nordamerikanische Westküstenzeit) */ timeZoneName?: keyof typeof TimeZoneName; /** * Whether to use 12-hour time (as opposed to 24-hour time) */ hour12?: boolean; /** * The time zone to use * @see https://www.iana.org/time-zones */ timeZone?: string; }; declare type DateRangeFilterValue = string[]; export declare const DateTime: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { /** * String representing the date in a simplified format based on ISO 8601. * Is always 24 or 27 characters long. * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#date_time_string_format * @see https://en.wikipedia.org/wiki/ISO_8601 */ value?: string | undefined; /** * Provide a string with a BCP 47 language tag or an Intl.Locale instance, * or an array of such locale identifiers. Defaults to user setting * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales */ locale?: Locale | undefined; /** * Prevents line wrapping of formatted dates and times */ enableNoWrap?: boolean | undefined; } & DateFormatOptions & RefAttributes<HTMLSpanElement>>; export declare const Del: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { children?: ReactNode; } & RefAttributes<HTMLModElement>>; declare type DensityDescriptor = `${number}x`; export declare const Dialog: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { /** Provide unique id for Dialog */ id: NonNullable<LibraryProps['id']>; children?: ReactNode; /** Configure outside click behavior */ closeOnClickOutside?: boolean | undefined; /** Callback triggered when Dialog toggles */ onToggle?: ((open: boolean) => void) | undefined; /** Display close icon at the right top corner */ showCloseButton?: boolean | undefined; /** Provide an array of actions with callbacks */ actions?: (ActionProps | [ActionProps, ActionProps])[] | undefined; /** Set a title of Dialog */ dialogTitle?: string | undefined; /** Provide a localized value for close button */ closeLabel?: string | undefined; /** Enable a focus trap for Dialog */ trapFocus?: boolean | undefined; /** Select Dialog animation style */ animation?: "slide-top" | "scale-in" | undefined; } & RefAttributes<HTMLDialogElement>>; /** Dialog parameters */ declare type DialogParams = Record<string, unknown>; declare type DigitsConfig = { integer?: { /** * The minimum number of integer digits to use * @example * // minimumIntegerDigits=3 * <Number value={3} /> // => 003 * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#minimumintegerdigits */ minimum?: Range_2<1, 22>; }; fraction?: { /** * The minimum number of fraction digits to use * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#minimumfractiondigits */ minimum?: Range_2<0, 101>; /** * The maximum number of fraction digits to use * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#maximumfractiondigits */ maximum?: Range_2<0, 101>; }; significant?: { /** * The minimum number of significant digits to use * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#minimumsignificantdigits */ minimum?: Range_2<1, 22>; /** * The maximum number of significant digits to use * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#maximumsignificantdigits */ maximum?: Range_2<1, 22>; }; }; export declare const Dl: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { children?: ReactNode; } & RefAttributes<HTMLDListElement>>; export declare const Drawer: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { children?: ReactNode; /** Choose side to attach Drawer */ placement?: "left" | "right" | undefined; /** Provide unique id for Drawer */ id: string; } & RefAttributes<HTMLDivElement>>; /** * Record which represents table change requested by the user. Key is equal to row index */ export declare type EditState = Record<number, TableRow>; declare type Element_2 = HTMLAudioElement; export declare const Em: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { children?: ReactNode; } & RefAttributes<HTMLElement>>; declare type Enumerate<TNumber extends number, TAccumulator extends number[] = []> = TAccumulator['length'] extends TNumber ? TAccumulator[number] : Enumerate<TNumber, [...TAccumulator, TAccumulator['length']]>; export declare const Figure: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { children: ReactElement; caption?: string | undefined; position?: "center" | "left" | "right" | undefined; } & RefAttributes<HTMLDivElement>>; export declare type FilterInput = FC<unknown & { value: FilterValue; onChange: (value: FilterValue) => void; }>; declare type FilterValue = DateRangeFilterValue | RangeFilterValue | string; export declare const Flag: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { /** * Provide a two-letter ISO 3166 region code * @see https://www.iso.org/iso-3166-country-codes.html */ countryCode: keyof typeof CountryCodes; /** * Set the size of the flag icon in pixels. Applied to both width and height */ size?: number | undefined; } & RefAttributes<HTMLDivElement>>; declare type FluidUnit = 'fluid'; export declare const Footer: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { children?: ReactNode; } & RefAttributes<HTMLDivElement>>; export declare type FooterCell = FC<unknown & { cellContext: HeaderContext<TableData, TableRow | TableValue>; }>; export declare const Form: ForwardRefExoticComponent<Omit<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { /** * Set the name of the HTMLFormElement. * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/name */ name?: FormHTMLAttributes<HTMLFormElement>['name']; /** * Define whether inputted text is automatically capitalized and, if so, in what manner. * Relevant for mobile devices with virtual keyboards or voice input * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocapitalize */ autoCapitalize?: FormHTMLAttributes<HTMLFormElement>['autoCapitalize']; /** * Control autocomplete behavior * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete */ autoComplete?: FormHTMLAttributes<HTMLFormElement>['autoComplete']; /** * Disable validation * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#novalidate */ noValidate?: FormHTMLAttributes<HTMLFormElement>['noValidate']; /** * Callback when the form was submitted. Gets form state as a second parameter */ onSubmit?: ((event: SyntheticEvent<HTMLFormElement>, formState: FormState) => void) | undefined; /** * Callback when the form has failed validation. Gets form state as a second parameter */ onInvalid?: ((event: InvalidEvent<HTMLFormElement>, formState: FormState) => void) | undefined; /** * Callback when the form was reset. Gets form state as a second parameter */ onReset?: ((event: ChangeEvent<HTMLFormElement>, formState: FormState) => void) | undefined; /** * Callback when the form content was change. Gets form state as a second parameter */ onChange?: ((event: ChangeEvent<HTMLFormElement>, formState: FormState) => void) | undefined; children: ReactNode; } & RefAttributes<HTMLFormElement>, "ref"> & RefAttributes<HTMLFormElement>>; export declare const FormField: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { children: ReactElement; /** Set text label */ label: string; /** Set hint text to be displayed below the input */ hint?: string | undefined; /** * Renders * character after label indicating required input status. * Also, set automatically when required input is provided. */ required?: boolean | undefined; } & RefAttributes<HTMLDivElement>>; declare type FormState = Record<string, FormDataEntryValue>; declare type FormState_2 = Record<string, FormDataEntryValue>; export declare const Grid: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { /** Set Container width in pixels as a number or set to `fluid` to make it 100% */ width?: number | "fluid" | undefined; /** Set amount of columns to place in container */ base?: number | undefined; /** Set a gap between columns in pixels */ gap?: number | undefined; /** Select HTML element to render as a container */ as?: string | undefined; children: ReactNode; } & RefAttributes<HTMLElement>>; export declare const H1: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { children?: ReactNode; } & RefAttributes<HTMLHeadingElement>>; export declare const H2: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { children?: ReactNode; } & RefAttributes<HTMLHeadingElement>>; export declare const H3: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { children?: ReactNode; } & RefAttributes<HTMLHeadingElement>>; export declare const H4: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { children?: ReactNode; } & RefAttributes<HTMLHeadingElement>>; export declare const H5: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { children?: ReactNode; } & RefAttributes<HTMLHeadingElement>>; export declare const H6: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { children?: ReactNode; } & RefAttributes<HTMLHeadingElement>>; export declare const Header: FC<Props_3>; export declare type HeaderCell = FC<unknown & { title?: string; headerContext: HeaderContext<TableData, TableValue | TableRow>; }>; export declare const I: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { children?: ReactNode; } & RefAttributes<HTMLElement>>; /** Dialog ID type */ declare type Id = string; export declare const Iframe: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { children?: ReactNode; /** Provide an url of the embedded page */ src?: string | undefined; /** * Provide custom HTML for the iframe. * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/srcdoc */ srcDoc?: string | undefined; /** * Set the width of the iframe in pixels. * Responsive * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/width */ width: number; /** * Set the height of the iframe in pixels. * Responsive * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/height */ height: number; /** * Define which referrer is sent when fetching the resource. * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/referrerPolicy */ referrerPolicy?: HTMLAttributeReferrerPolicy | undefined; /** * Allow the iframe's contents to use requestFullscreen(). * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/allowFullscreen */ allowFullScreen?: boolean | undefined; /** * Provide a unique name for the iframe. * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/name * @example * <iframe id="el" name="example"></iframe> * const el = document.getElementById("el"); * console.log(el.name); // Output: "example" */ name?: string | undefined; /** * Provide a title for accessibility */ title?: string | undefined; /** * Set iframe loading behavior * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/loading */ loading?: IframeHTMLAttributes<unknown>['loading']; /** * Provide a SandboxConfig object. * @see SandboxConfig * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/sandbox */ sandboxConfig?: SandboxConfig | undefined; /** * Provide a callback to capture iframe loaded event. */ onLoad?: ((event: SyntheticEvent<HTMLIFrameElement>) => void) | undefined; /** * Provide a PermissionsConfig object. * @see PermissionsConfig * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/allow */ permissionsConfig?: PermissionsConfig | undefined; } & RefAttributes<HTMLIFrameElement>>; export declare const InputCheckbox: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & NativeProps & CallbackPropsInteractive & ValidationProps & { /** Set a text for the checkbox label */ label?: string | undefined; /** * Set an indeterminate state for the checkbox * @see https://developer.mozilla.org/en-US/docs/Web/CSS/:indeterminate */ indeterminate?: boolean | undefined; } & RefAttributes<HTMLInputElement>>; export declare const InputColor: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & NativeProps_3 & CallbackPropsTextual & ValidationProps & { /** * Set text for placeholder. * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#placeholder */ placeholder?: InputHTMLAttributes<HTMLInputElement>['placeholder']; /** * Provide a list if predefined colors to show in a browser-provided interface. Colors have to be in HEX format #000000. * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist#color_type */ predefinedColors?: string[] | undefined; } & RefAttributes<HTMLInputElement>>; export declare const InputDate: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & Omit<NativePropsTextual, "pattern" | "inputMode" | "autoComplete" | "maxLength" | "minLength"> & CallbackPropsTextual & ValidationProps & { min?: string | undefined; max?: string | undefined; } & RefAttributes<HTMLInputElement>>; export declare const InputDateTime: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & Omit<NativePropsTextual, "pattern" | "inputMode" | "autoComplete" | "maxLength" | "minLength"> & Omit<CallbackPropsTextual, "defaultValue"> & ValidationProps & { prefix?: FC | undefined; } & RefAttributes<HTMLInputElement>>; export declare const InputFile: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & Omit<NativePropsTextual, "pattern" | "inputMode" | "maxLength" | "minLength" | "readOnly"> & ValidationProps & CallbackPropsTextual & { accept?: InputHTMLAttributes<HTMLInputElement>['accept']; multiple?: InputHTMLAttributes<HTMLInputElement>['multiple']; } & RefAttributes<HTMLInputElement>>; export declare const InputGroup: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & { /** * Set a label text for the group */ label?: string | undefined; children: ReactElement<ChildProps & unknown>[]; /** * Provide a name for each input control in the group * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#name */ name: string; /** * Disable all inputs in the group * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#disabled */ disabled?: FieldsetHTMLAttributes<HTMLFieldSetElement>['disabled']; /** * Make all inputs in the group required * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/required */ required?: boolean | undefined; /** * Set a text for the hint displayed below the group */ hint?: string | undefined; } & RefAttributes<HTMLFieldSetElement>>; export declare const InputNumber: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & Omit<NativePropsTextual_2, "pattern" | "inputMode" | "maxLength" | "minLength"> & { min?: string | number | undefined; max?: string | number | undefined; step?: string | number | undefined; } & CallbackPropsTextual & ValidationProps & { /** * Define the width of the input in characters */ size?: InputHTMLAttributes<HTMLInputElement>['size']; } & RefAttributes<HTMLInputElement>>; export declare const InputNumeric: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & Omit<NativePropsTextual, "pattern" | "inputMode" | "autoComplete"> & CallbackPropsTextual & ValidationProps & { /** * Specify the amount of increment/decrement applied to the value when the user presses arrow keys */ step?: number | undefined; /** * Define the width of the input in characters */ size?: InputHTMLAttributes<HTMLInputElement>['size']; /** Select a mode of numeric input. `scientific` mode disables arrow stepper */ mode?: "natural" | "integer" | "floating" | "scientific" | undefined; } & RefAttributes<HTMLInputElement>>; export declare const InputPassword: ForwardRefExoticComponent<DataAttributes & AriaAttributes & { id?: string | undefined; role?: AriaRole | undefined; className?: string | undefined; } & NativeProps & { inputMode?: "none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined; placeholder?: string | undefined; autoComplete?: HTMLInputAutoCompleteAttribute | undefined; maxLength?: number | undefined; minLength?: number | undefined; pattern?: string | undefined; size?: number | undefined; } & CallbackPropsTextual & Valid