import { C as ComponentWithAs, a as CSSPropertyAccessorProxy, P as PropertyAccessorProxy, I as Input } from './Input-H4UkYWUP.js'; export { A as As, b as AssignableRef, c as CssCustomProperty, d as InputProps, e as PropsWithAs, f as assignRef, g as createNamedContext, h as cssProxy, i as flatten, j as groupBy, k as indexByKey, r as requiredProp, t as toArray, l as toCssLength, u as useForkedRef, m as useInputState, w as withAs } from './Input-H4UkYWUP.js'; import * as react from 'react'; import { ReactElement, ReactNode, HTMLProps, CSSProperties, ComponentProps, Dispatch, SetStateAction, ChangeEventHandler, Component, DetailedHTMLProps, HTMLAttributes, ImgHTMLAttributes, RefObject, ChangeEvent, MouseEvent, DependencyList, useEffect, ActionDispatch } from 'react'; import { FormatCurrencyOptions } from './format.js'; import * as Ariakit from '@ariakit/react'; import { TabListProps, TabPanelProps as TabPanelProps$1, TabProviderProps } from '@ariakit/react'; import { Locale } from 'date-fns'; export { default as cx } from 'classnames'; export { default as isDeepEqual } from 'react-fast-compare'; interface AccordionRowProps { title: ReactNode; children: ReactNode; index?: number; } declare function AccordionRow({ title, children, index }: AccordionRowProps): react.JSX.Element; interface AccordionProps { children: ReactElement[] | ReactElement; initialIndex?: number; [key: string]: any; } declare const Accordion: ComponentWithAs; declare const ALERT_INTENTS: readonly ["success", "error", "warning", "info", "none"]; type AlertIntent = (typeof ALERT_INTENTS)[number]; interface AlertProps extends Omit, 'title'> { intent?: AlertIntent; title?: ReactNode; children?: ReactNode; onClose?: () => void; } declare function Alert({ intent, title, onClose, children, ...props }: AlertProps): react.JSX.Element; interface AvatarProps { src?: string; name?: string; size?: number; } declare const Avatar: ComponentWithAs; type BadgeIntent = 'danger' | 'warning' | 'success' | 'none'; interface BadgeProps { intent?: BadgeIntent; children: ReactNode; pill?: boolean; /** Show the text in capitals. Default `true`. */ uppercase?: boolean; } declare const Badge: ComponentWithAs; interface NotificationBadgeProps { count: number; intent?: BadgeIntent; max?: number; dot?: boolean; pulse?: boolean; gap?: string; } declare const NotificationBadge: ComponentWithAs; type ResponsiveValue = Value | [Value, Value, Value]; /** * The value for the current screen size. The server does not know the * screen and renders the desktop value, so phones switch after hydration. * Use it only for behavior. For sizes, spacing and layout, use responsive * props or CSS, which are right in the server HTML. */ declare function useResponsiveValue(value: ResponsiveValue): Value; type R = ResponsiveValue; declare function useResponsiveValues(value: [R]): [A]; declare function useResponsiveValues(value: [R, R]): [A, B]; declare function useResponsiveValues(value: [R, R, R]): [A, B, C]; declare function useResponsiveValues(value: [R, R, R, R]): [A, B, C, D]; declare function useResponsiveValues(value: [R, R, R, R]): [A, B, C, D]; declare function useResponsiveValues(value: [R, R, R, R, R]): [A, B, C, D, E]; declare function useResponsiveValues(value: [R, R, R, R, R, R]): [A, B, C, D, E, F]; declare function useResponsiveValues(value: [R, R, R, R, R, R, R]): [A, B, C, D, E, F, G]; declare function useResponsiveValues(value: [R, R, R, R, R, R, R, R]): [A, B, C, D, E, F, G, H]; declare function useResponsiveValues(value: [R, R, R, R, R, R, R, R, R]): [A, B, C, D, E, F, G, H, I]; declare function useResponsiveValues(value: [R, R, R, R, R, R, R, R, R, R]): [A, B, C, D, E, F, G, H, I, J]; type ButtonVariant = 'contained' | 'outlined' | 'text'; type ButtonIntent = 'danger' | 'none'; type ButtonSize = 's' | 'm' | 'l'; interface ButtonProps { variant?: ButtonVariant; intent?: ButtonIntent; color?: string; size?: ResponsiveValue; style?: CSSProperties; isPending?: boolean; } declare const Button: ComponentWithAs; declare function useButtonStyles({ variant, intent, color, style, size, className, }?: ComponentProps): { style: {}; className: string; }; type ThemeTokenPrimitive = string | number | boolean; interface ThemeScale { [key: string]: string | number; } interface ThemeTokenGroup { [key: string]: ThemeTokenPrimitive | ThemeTokenGroup | undefined; } interface ThemeColorScale { '05'?: string; 10?: string; 20?: string; 30?: string; 40?: string; 50?: string; 60?: string; 70?: string; 80?: string; 90?: string; 95?: string; [key: string]: string | undefined; } interface ThemeColorsDefinition { primary?: string; secondary?: string; danger?: string; warning?: string; success?: string; info?: string; base?: string; surface?: string; gray?: ThemeColorScale; red?: ThemeColorScale; selection?: { background?: string; text?: string; }; [key: string]: string | ThemeColorScale | ThemeTokenGroup | undefined; } interface ThemeDefinition { id?: string; colors?: ThemeColorsDefinition; spacing?: ThemeScale; fonts?: { [key: string]: string; }; borderRadius?: ThemeScale; shadows?: ThemeScale; focusRing?: { color?: string; width?: string; }; cursor?: { pointer?: string; }; borders?: { width?: string; style?: string; }; typography?: { /** * Multiplier for text sizes, e.g. `0.875` for a denser UI. Applies to * body text, `dmk-text-*` classes and component text such as titles, * badges, tooltips, sidebar labels and form fields. Icon sizes do not * scale, and button text uses `button.fontSize`. * * Note: a scale below 1 makes form field text smaller than 16px, which * makes iOS Safari zoom in on focus. */ scale?: number; }; button?: { fontSize?: string; fontWeight?: string | number; textTransform?: string; letterSpacing?: string; height?: { s?: string; m?: string; l?: string; }; }; zIndex?: number[]; /** * Media queries for phone, tablet and desktop. The CSS for responsive * props is global, so give nested ThemeProviders the same breakpoints. */ breakpoints?: string[]; [key: string]: unknown; } type ThemeOptionKey = 'id' | 'colors' | 'spacing' | 'fonts' | 'borderRadius' | 'shadows' | 'focusRing' | 'cursor' | 'borders' | 'typography' | 'button' | 'zIndex' | 'breakpoints'; type DefinitionValue = Key extends keyof Definition ? NonNullable : {}; type FullThemeDefinition = ReturnType>; /** * Takes a light theme and automatically darkens it. A theme that is dark * already (see `isDarkTheme`) is returned as it is. */ declare function convertToDarkTheme(theme: FullThemeDefinition): FullThemeDefinition; /** * Whether a theme is dark, from the lightness of its surface color. */ declare function isDarkTheme(theme: Pick): boolean; declare function createTheme(theme: Definition): FullThemeDefinition; declare function _createTheme(theme: Definition): { id: string; tokens: Omit & { spacing: { auto: string; none: string; xxs: string; xs: string; s: string; m: string; l: string; xl: string; xxl: string; }; fonts: { base: string; heading: string; }; colors: { base: string; surface: string; gray: { '05': string; 10: string; 20: string; 30: string; 40: string; 50: string; 60: string; 70: string; 80: string; 90: string; 95: string; }; red: { '05': string; 10: string; 20: string; 30: string; 40: string; 50: string; 60: string; 70: string; 80: string; 90: string; 95: string; }; linkText: string; primaryText: string; baseText: string; primary: string; onPrimary: string; secondary: string; primaryLight: string; primaryDark: string; secondaryLight: string; secondaryDark: string; danger: string; onDanger: string; dangerLight: string; dangerDark: string; warning: string; onWarning: string; warningTint: string; warningLight: string; success: string; onSuccess: string; successTint: string; successLight: string; info: string; infoTint: string; infoLight: string; white: string; black: string; border: string; tooltipBackground: string; tooltipBorder: string; tooltipText: string; formsBorder: string; formsBorderHover: string; formsBorderFocus: string; formsBorderDisabled: string; formsBorderError: string; formsBorderWidth: string; formsBorderRadius: string; formsPadding: string; formsBackground: string; formsBackgroundHover: string; formsBackgroundFocus: string; formsBackgroundDisabled: string; formsBackgroundError: string; formsText: string; formsTextDisabled: string; formsTextError: string; formsTextPlaceholder: string; formsError: string; formsShadow: string; selection: { background: string; text: string; }; }; shadows: { elevation0: string; elevation1: string; elevation2: string; }; borderRadius: { s: string; m: string; }; focusRing: { color: string; width: string; }; zIndex: number[]; cursor: { pointer: string; }; borders: { width: string; style: string; }; typography: { scale: number; }; button: { height: { s: string; m: string; l: string; }; fontSize: string; fontWeight: string | number; textTransform: string; letterSpacing: string; }; }; breakpoints: string[]; } & { tokens: (Omit & { spacing: { auto: string; none: string; xxs: string; xs: string; s: string; m: string; l: string; xl: string; xxl: string; }; fonts: { base: string; heading: string; }; colors: { base: string; surface: string; gray: { '05': string; 10: string; 20: string; 30: string; 40: string; 50: string; 60: string; 70: string; 80: string; 90: string; 95: string; }; red: { '05': string; 10: string; 20: string; 30: string; 40: string; 50: string; 60: string; 70: string; 80: string; 90: string; 95: string; }; linkText: string; primaryText: string; baseText: string; primary: string; onPrimary: string; secondary: string; primaryLight: string; primaryDark: string; secondaryLight: string; secondaryDark: string; danger: string; onDanger: string; dangerLight: string; dangerDark: string; warning: string; onWarning: string; warningTint: string; warningLight: string; success: string; onSuccess: string; successTint: string; successLight: string; info: string; infoTint: string; infoLight: string; white: string; black: string; border: string; tooltipBackground: string; tooltipBorder: string; tooltipText: string; formsBorder: string; formsBorderHover: string; formsBorderFocus: string; formsBorderDisabled: string; formsBorderError: string; formsBorderWidth: string; formsBorderRadius: string; formsPadding: string; formsBackground: string; formsBackgroundHover: string; formsBackgroundFocus: string; formsBackgroundDisabled: string; formsBackgroundError: string; formsText: string; formsTextDisabled: string; formsTextError: string; formsTextPlaceholder: string; formsError: string; formsShadow: string; selection: { background: string; text: string; }; }; shadows: { elevation0: string; elevation1: string; elevation2: string; }; borderRadius: { s: string; m: string; }; focusRing: { color: string; width: string; }; zIndex: number[]; cursor: { pointer: string; }; borders: { width: string; style: string; }; typography: { scale: number; }; button: { height: { s: string; m: string; l: string; }; fontSize: string; fontWeight: string | number; textTransform: string; letterSpacing: string; }; }) & Omit & { colors: { base: string; surface: string; gray: { '05': string; 10: string; 20: string; 30: string; 40: string; 50: string; 60: string; 70: string; 80: string; 90: string; 95: string; }; red: { '05': string; 10: string; 20: string; 30: string; 40: string; 50: string; 60: string; 70: string; 80: string; 90: string; 95: string; }; linkText: string; primaryText: string; baseText: string; primary: string; onPrimary: string; secondary: string; primaryLight: string; primaryDark: string; secondaryLight: string; secondaryDark: string; danger: string; onDanger: string; dangerLight: string; dangerDark: string; warning: string; onWarning: string; warningTint: string; warningLight: string; success: string; onSuccess: string; successTint: string; successLight: string; info: string; infoTint: string; infoLight: string; white: string; black: string; border: string; tooltipBackground: string; tooltipBorder: string; tooltipText: string; formsBorder: string; formsBorderHover: string; formsBorderFocus: string; formsBorderDisabled: string; formsBorderError: string; formsBorderWidth: string; formsBorderRadius: string; formsPadding: string; formsBackground: string; formsBackgroundHover: string; formsBackgroundFocus: string; formsBackgroundDisabled: string; formsBackgroundError: string; formsText: string; formsTextDisabled: string; formsTextError: string; formsTextPlaceholder: string; formsError: string; formsShadow: string; selection: { background: string; text: string; }; } & DefinitionValue; spacing: { auto: string; none: string; xxs: string; xs: string; s: string; m: string; l: string; xl: string; xxl: string; } & DefinitionValue; fonts: { base: string; heading: string; } & DefinitionValue; borderRadius: { s: string; m: string; } & DefinitionValue; shadows: { elevation0: string; elevation1: string; elevation2: string; } & DefinitionValue; focusRing: { color: string; width: string; } & DefinitionValue; cursor: { pointer: string; } & DefinitionValue; borders: { width: string; style: string; } & DefinitionValue; typography: { scale: number; } & DefinitionValue; button: { height: { s: string; m: string; l: string; }; fontSize: string; fontWeight: string | number; textTransform: string; letterSpacing: string; } & DefinitionValue; }; }; declare const defaultTheme: { id: string; tokens: Omit<{ id: string; colors: { primary: string; secondary: string; }; }, "id" | "button" | "breakpoints" | "zIndex" | "colors" | "spacing" | "fonts" | "borderRadius" | "shadows" | "focusRing" | "cursor" | "borders" | "typography"> & { spacing: { auto: string; none: string; xxs: string; xs: string; s: string; m: string; l: string; xl: string; xxl: string; }; fonts: { base: string; heading: string; }; colors: { base: string; surface: string; gray: { '05': string; 10: string; 20: string; 30: string; 40: string; 50: string; 60: string; 70: string; 80: string; 90: string; 95: string; }; red: { '05': string; 10: string; 20: string; 30: string; 40: string; 50: string; 60: string; 70: string; 80: string; 90: string; 95: string; }; linkText: string; primaryText: string; baseText: string; primary: string; onPrimary: string; secondary: string; primaryLight: string; primaryDark: string; secondaryLight: string; secondaryDark: string; danger: string; onDanger: string; dangerLight: string; dangerDark: string; warning: string; onWarning: string; warningTint: string; warningLight: string; success: string; onSuccess: string; successTint: string; successLight: string; info: string; infoTint: string; infoLight: string; white: string; black: string; border: string; tooltipBackground: string; tooltipBorder: string; tooltipText: string; formsBorder: string; formsBorderHover: string; formsBorderFocus: string; formsBorderDisabled: string; formsBorderError: string; formsBorderWidth: string; formsBorderRadius: string; formsPadding: string; formsBackground: string; formsBackgroundHover: string; formsBackgroundFocus: string; formsBackgroundDisabled: string; formsBackgroundError: string; formsText: string; formsTextDisabled: string; formsTextError: string; formsTextPlaceholder: string; formsError: string; formsShadow: string; selection: { background: string; text: string; }; }; shadows: { elevation0: string; elevation1: string; elevation2: string; }; borderRadius: { s: string; m: string; }; focusRing: { color: string; width: string; }; zIndex: number[]; cursor: { pointer: string; }; borders: { width: string; style: string; }; typography: { scale: number; }; button: { height: { s: string; m: string; l: string; }; fontSize: string; fontWeight: string | number; textTransform: string; letterSpacing: string; }; }; breakpoints: string[]; } & { tokens: Omit<{ id: string; colors: { primary: string; secondary: string; }; }, "id" | "button" | "breakpoints" | "zIndex" | "colors" | "spacing" | "fonts" | "borderRadius" | "shadows" | "focusRing" | "cursor" | "borders" | "typography"> & { spacing: { auto: string; none: string; xxs: string; xs: string; s: string; m: string; l: string; xl: string; xxl: string; }; fonts: { base: string; heading: string; }; colors: { base: string; surface: string; gray: { '05': string; 10: string; 20: string; 30: string; 40: string; 50: string; 60: string; 70: string; 80: string; 90: string; 95: string; }; red: { '05': string; 10: string; 20: string; 30: string; 40: string; 50: string; 60: string; 70: string; 80: string; 90: string; 95: string; }; linkText: string; primaryText: string; baseText: string; primary: string; onPrimary: string; secondary: string; primaryLight: string; primaryDark: string; secondaryLight: string; secondaryDark: string; danger: string; onDanger: string; dangerLight: string; dangerDark: string; warning: string; onWarning: string; warningTint: string; warningLight: string; success: string; onSuccess: string; successTint: string; successLight: string; info: string; infoTint: string; infoLight: string; white: string; black: string; border: string; tooltipBackground: string; tooltipBorder: string; tooltipText: string; formsBorder: string; formsBorderHover: string; formsBorderFocus: string; formsBorderDisabled: string; formsBorderError: string; formsBorderWidth: string; formsBorderRadius: string; formsPadding: string; formsBackground: string; formsBackgroundHover: string; formsBackgroundFocus: string; formsBackgroundDisabled: string; formsBackgroundError: string; formsText: string; formsTextDisabled: string; formsTextError: string; formsTextPlaceholder: string; formsError: string; formsShadow: string; selection: { background: string; text: string; }; }; shadows: { elevation0: string; elevation1: string; elevation2: string; }; borderRadius: { s: string; m: string; }; focusRing: { color: string; width: string; }; zIndex: number[]; cursor: { pointer: string; }; borders: { width: string; style: string; }; typography: { scale: number; }; button: { height: { s: string; m: string; l: string; }; fontSize: string; fontWeight: string | number; textTransform: string; letterSpacing: string; }; } & Omit<{ id: string; colors: { primary: string; secondary: string; }; }, ThemeOptionKey> & { colors: { base: string; surface: string; gray: { '05': string; 10: string; 20: string; 30: string; 40: string; 50: string; 60: string; 70: string; 80: string; 90: string; 95: string; }; red: { '05': string; 10: string; 20: string; 30: string; 40: string; 50: string; 60: string; 70: string; 80: string; 90: string; 95: string; }; linkText: string; primaryText: string; baseText: string; primary: string; onPrimary: string; secondary: string; primaryLight: string; primaryDark: string; secondaryLight: string; secondaryDark: string; danger: string; onDanger: string; dangerLight: string; dangerDark: string; warning: string; onWarning: string; warningTint: string; warningLight: string; success: string; onSuccess: string; successTint: string; successLight: string; info: string; infoTint: string; infoLight: string; white: string; black: string; border: string; tooltipBackground: string; tooltipBorder: string; tooltipText: string; formsBorder: string; formsBorderHover: string; formsBorderFocus: string; formsBorderDisabled: string; formsBorderError: string; formsBorderWidth: string; formsBorderRadius: string; formsPadding: string; formsBackground: string; formsBackgroundHover: string; formsBackgroundFocus: string; formsBackgroundDisabled: string; formsBackgroundError: string; formsText: string; formsTextDisabled: string; formsTextError: string; formsTextPlaceholder: string; formsError: string; formsShadow: string; selection: { background: string; text: string; }; } & { primary: string; secondary: string; }; spacing: { auto: string; none: string; xxs: string; xs: string; s: string; m: string; l: string; xl: string; xxl: string; }; fonts: { base: string; heading: string; }; borderRadius: { s: string; m: string; }; shadows: { elevation0: string; elevation1: string; elevation2: string; }; focusRing: { color: string; width: string; }; cursor: { pointer: string; }; borders: { width: string; style: string; }; typography: { scale: number; }; button: { height: { s: string; m: string; l: string; }; fontSize: string; fontWeight: string | number; textTransform: string; letterSpacing: string; }; }; }; type Theme = typeof defaultTheme; type Spacing = keyof Theme['tokens']['spacing']; type Colors = keyof Theme['tokens']['colors']; interface ThemeContextValue { theme: ThemeType; setTheme: (theme: ThemeType) => void; darkMode: boolean; setDarkMode: Dispatch>; tokens: CSSPropertyAccessorProxy; } interface ThemeProviderProps { theme?: Theme; darkTheme?: Theme; children: ReactNode; injectCssCustomProperties?: boolean; /** * Whether or not to allow the automatic dark mode */ allowDarkMode?: boolean; respectDefaultDarkMode?: boolean; } declare function ThemeProvider({ theme, darkTheme, children, injectCssCustomProperties, allowDarkMode, respectDefaultDarkMode, }: ThemeProviderProps): react.JSX.Element; declare function useTheme(): ThemeContextValue; declare function useBreakpoints(): boolean[]; declare function useTokens(): PropertyAccessorProxy; declare function useDarkMode(): readonly [boolean, Dispatch>]; declare function adjustColor(color: string, amount: number): string; declare function hexToRGBA(hex: string): readonly [number, number, number, number]; declare function RGBAToHex(rgba: string): string; declare function RGBAToHSLA(r: number, g: number, b: number, a: number): readonly [number, number, number, number]; declare function hexToHSLA(hex: string): readonly [number, number, number, number]; declare const FLEX_ALIGN: readonly ["flex-start", "flex-end", "center", "stretch", "start", "end", "baseline"]; type FlexAlign = (typeof FLEX_ALIGN)[number]; declare const FLEX_JUSTIFY: readonly ["flex-start", "flex-end", "space-around", "space-between", "space-evenly", "center"]; type FlexJustify = (typeof FLEX_JUSTIFY)[number]; type Display = 'flex' | 'grid' | 'block' | 'inline-flex' | 'inline-block' | 'none'; type ResponsiveSpacingValue = ResponsiveValue; interface LayoutProps { display?: ResponsiveValue; spacing?: ResponsiveSpacingValue; justifyContent?: ResponsiveValue; alignItems?: ResponsiveValue; alignSelf?: ResponsiveValue; paddingY?: ResponsiveSpacingValue; paddingX?: ResponsiveSpacingValue; padding?: ResponsiveSpacingValue; paddingTop?: ResponsiveSpacingValue; paddingBottom?: ResponsiveSpacingValue; paddingLeft?: ResponsiveSpacingValue; paddingRight?: ResponsiveSpacingValue; marginY?: ResponsiveSpacingValue; marginX?: ResponsiveSpacingValue; margin?: ResponsiveSpacingValue; marginTop?: ResponsiveSpacingValue; marginBottom?: ResponsiveSpacingValue; marginLeft?: ResponsiveSpacingValue; marginRight?: ResponsiveSpacingValue; } interface SpacerProps extends Omit, 'height'> { height?: ResponsiveValue; horizontal?: ResponsiveValue; } declare function Spacer({ height, horizontal }: SpacerProps): react.JSX.Element; interface StackProps extends LayoutProps { horizontal?: ResponsiveValue; wrap?: ResponsiveValue; } /** * Stack */ declare const Stack: ComponentWithAs; interface PanelProps { title?: ReactNode; padding?: StackProps['padding']; elevation?: keyof Theme['tokens']['shadows'] extends `elevation${infer U}` ? U : never; transparent?: boolean; } declare const Panel: ComponentWithAs; interface CardProps { /** Image or other media. Fills the top of the card, or the left side when horizontal. */ media?: ReactNode; /** Put a `LinkOverlay` in the title to make the whole card clickable. */ title?: ReactNode; /** Small text above the title, like a category or a date. */ eyebrow?: ReactNode; description?: ReactNode; /** Buttons or links at the bottom of the card. */ actions?: ReactNode; /** Media on the left instead of on top. */ horizontal?: ResponsiveValue; padding?: PanelProps['padding']; elevation?: PanelProps['elevation']; } declare const Card: ComponentWithAs; type CheckboxProps = { error?: boolean; onChange?: ChangeEventHandler; indeterminate?: boolean; } & Omit, 'onChange' | 'label'>; declare function Checkbox({ children, error, style, className, indeterminate, ...props }: CheckboxProps): react.JSX.Element; declare function useCheckboxGroupContext(props: CheckboxProps): Pick; declare function useCheckboxState(defaultChecked?: boolean): Pick; interface CheckboxGroupProps { name: string; value: string[]; onChange: (value: string[]) => void; children: ReactNode; error?: boolean; disabled?: boolean; } interface ContextValue { name: string; onChange: ChangeEventHandler; disabled?: boolean; isChecked: (value: string) => boolean; } declare const CheckboxGroupContext: react.Context; declare const CheckboxGroup: ComponentWithAs; declare function useCheckboxGroupState(initialValues?: string[]): { value: string[]; onChange: react.Dispatch>; }; declare const InlineCheckboxGroupLayout: ComponentWithAs, "div">; declare const StandardCheckboxGroupLayout: ComponentWithAs, "div">; interface CircularProgressProps extends HTMLProps { size?: number; thickness?: number; value?: number; color?: string; children?: ReactNode; } declare function CircularProgress({ size, thickness, value, color, children, className, style, ...props }: CircularProgressProps): react.JSX.Element; interface ClientOnlyProps { children: ReactNode; fallback?: ReactNode; } declare function useClientOnly(): boolean; declare function ClientOnly({ children, fallback }: ClientOnlyProps): react.JSX.Element; interface ComboboxProps { value: string; onChange: (value: string) => void; placeholder?: string; /** Label, hint and error of the default input. With `children`, set them on your own input. */ label?: ReactNode; hint?: ReactNode; error?: ReactNode; suggestions: string[] | ((searchValue: string) => Promise); children?: ReactElement; renderCreateOption?: (value: string) => ReactElement; } declare function Combobox({ value, onChange, suggestions, placeholder, label, hint, error, children, renderCreateOption, }: ComboboxProps): react.JSX.Element; interface CounterProps extends Omit, 'onChange'> { onChange?: (event: CounterChangeEvent) => void; error?: boolean; decreaseIcon?: ReactNode; increaseIcon?: ReactNode; } type CounterValue = string | number; type CounterChangeEventTarget = Omit['target'], 'value'> & { value: CounterValue; }; interface CounterChangeEvent extends Omit, 'target'> { target: CounterChangeEventTarget; } /** * * * a11y: https://www.w3.org/TR/wai-aria-practices-1.1/#spinbutton */ declare function Counter({ id, name, value, defaultValue, onChange, min: _min, max: _max, step: _step, disabled, error, className, style, onFocus, onKeyDown, ref, decreaseIcon, increaseIcon, ...props }: CounterProps): react.JSX.Element; declare function useCounterState(initialValue?: number | string): Pick; type DialogIntent = 'none' | 'danger'; interface DialogProps { intent?: DialogIntent; title?: ReactNode; children: ReactNode; onCancel?: () => void; /** * Called when the user confirms. When it returns a promise, the confirm * button shows as pending until the promise settles. Handle errors inside * it, for example by showing a message. */ onConfirm?: () => void | Promise; /** Text on the confirm button. Say what happens, like "Delete customer". */ confirmLabel?: ReactNode; /** Text on the cancel button. */ cancelLabel?: ReactNode; isOpen: boolean; } declare function Dialog({ intent, title, isOpen, onCancel, onConfirm, confirmLabel, cancelLabel, children, }: DialogProps): react.JSX.Element; interface DescriptionListProps { /** Labels on the left and values on the right. Responsive. */ horizontal?: ResponsiveValue; /** Lines between the rows. */ divided?: boolean; /** Put the values at the end of the row, like the totals on a receipt. */ alignValues?: 'start' | 'end'; } /** * Pairs of labels and values, like the details of a product, an order or * a vehicle. Fill it with `DescriptionItem`. */ declare const DescriptionList: ComponentWithAs; interface DescriptionItemProps { label: ReactNode; children?: ReactNode; className?: string; } declare function DescriptionItem({ label, children, className, }: DescriptionItemProps): react.JSX.Element; declare const canUseDOM: boolean; declare function DarkModeSwitch(): react.JSX.Element; interface DividerProps { horizontal?: boolean; title?: ReactNode; color?: string; } declare function Divider({ horizontal, title, color }: DividerProps): react.JSX.Element; interface DropdownMenuItem { label: ReactNode; action?: () => void; separator?: boolean; selected?: boolean; /** An icon in front of the label. It is hidden from screen readers. */ icon?: ReactNode; /** `danger` for actions that delete or can not be undone. */ intent?: 'none' | 'danger'; /** Shown, but can not be chosen. Items without `action` are disabled too. */ disabled?: boolean; } interface DropdownMenuProps { items: DropdownMenuItem[]; label?: ReactNode; /** Props for the button that opens the menu, like `variant`, `size` and * `aria-label` for a button with only an icon. */ buttonProps?: ButtonProps & Omit, keyof ButtonProps | 'children'>; arrow?: boolean; } declare function DropdownMenu({ items, label, buttonProps, arrow, }: DropdownMenuProps): react.JSX.Element; interface EmptyStateProps { /** An icon or a small illustration. */ icon?: ReactNode; title: ReactNode; description?: ReactNode; /** Buttons that help the user move on, like "Add item" or "Clear filters". */ actions?: ReactNode; size?: 's' | 'm'; } /** * What to show when a list, a search or a page has nothing in it. */ declare const EmptyState: ComponentWithAs; interface ErrorBoundaryProps { fallback?: ReactNode | ((props: ErrorBoundaryFallbackProps) => ReactNode); onError?: (error: Error, info: any) => void; children?: ReactNode; onReset?: () => void; } interface ErrorBoundaryFallbackProps { error: Error; resetErrorBoundary: () => void; } interface State { error: Error | null; } declare class ErrorBoundary extends Component { state: State; static defaultProps: { fallback: react.JSX.Element; onError: (error: Error, info: any) => void; }; static getDerivedStateFromError(error: Error): { error: Error; }; componentDidCatch(error: Error, info: any): void; resetErrorBoundary: () => void; render(): ReactNode; } declare function useErrorHandler(givenError?: Error): react.Dispatch>; interface FileInputProps extends Omit, 'onChange'> { children?: ReactNode; onChange?(files: FileList): void; } declare function FileInput({ onChange, name, id, children, className, style, ...props }: FileInputProps): react.JSX.Element; interface FooterProps { /** The logo or name of the site. */ brand?: ReactNode; /** A line or two about the site, under the brand. */ description?: ReactNode; /** The last line, like the copyright and links to terms and privacy. */ bottom?: ReactNode; } /** * The footer of a site, with the brand, columns of links and a bottom line. * Put the links in `FooterColumn`s. */ declare const Footer: ComponentWithAs; interface FooterColumnProps { title: ReactNode; /** Links, one per row. */ children: ReactNode; } declare function FooterColumn({ title, children }: FooterColumnProps): react.JSX.Element; interface GridProps { /** Items are at least this wide. The grid fits as many columns as there is room for. */ minItemWidth?: number | string; spacing?: ResponsiveSpacingValue; } /** * A grid of equal columns that wraps by itself. Good for cards. */ declare const Grid: ComponentWithAs; interface Props extends HTMLProps { error?: boolean; className?: string; } declare function FieldSet({ error, className, ...props }: Props): react.JSX.Element; declare function HelperText({ error, className, ...props }: Props): react.JSX.Element; declare function Label({ error, className, ...props }: Props): react.JSX.Element; declare function Legend({ error, className, ...props }: Props): react.JSX.Element; declare function TextErrorMessage({ className, ...props }: Props): react.JSX.Element; interface HamburgerButtonProps extends DetailedHTMLProps, HTMLButtonElement> { open: boolean; } declare function HamburgerButton({ open, className, ...props }: HamburgerButtonProps): react.JSX.Element; interface HeroProps { /** Small text above the title. */ eyebrow?: ReactNode; title: ReactNode; description?: ReactNode; /** The main buttons, like "Get started". */ actions?: ReactNode; /** An image or illustration. Beside the text on wide screens, below on phones. */ media?: ReactNode; /** Center the text. Only without media. */ centered?: boolean; /** A background tinted with the primary color. */ tinted?: boolean; } /** * The top of a front page: a big title, a short text, the main actions and * an image. The layout follows the width of the hero itself, so it is right * before the page is hydrated. */ declare const Hero: ComponentWithAs; type ImageFit = CSSProperties['objectFit']; interface ImageProps extends DetailedHTMLProps, HTMLImageElement> { src: string; fallback?: string; alt?: string; fit?: ImageFit; } declare function Image({ alt, className, fallback, onError, onLoad, fit, ref: userRef, ...props }: ImageProps): react.JSX.Element; interface ImageContainerProps { } declare const ImageContainer: ComponentWithAs; interface ImageLightboxImage { src: string; /** What the image shows. Without it, the alt text is "Image 2 of 5". */ alt?: string; /** Text shown under the image. */ caption?: ReactNode; } interface ImageLightboxProps { open: boolean; onClose(): void; /** The image URLs, or objects with alt text and a caption. */ images: (string | ImageLightboxImage)[]; currentImage: number; onImageChange: (index: number) => void; } declare function ImageLightbox({ open, onClose, images, currentImage, onImageChange, }: ImageLightboxProps): react.JSX.Element; interface LinkOverlayProps { } /** * A link that makes its whole `Card` or `ListGroupItem` clickable. Put it * around the title. Other buttons and links in the same box still work. */ declare const LinkOverlay: ComponentWithAs; interface ListGroupProps { /** * No outer border or corners. Directly inside a `Card` or `Panel`, the * dividers reach the edges and the text lines up with the content. */ flush?: boolean; padding?: ResponsiveSpacingValue; } declare const ListGroup: ComponentWithAs; interface ListGroupItemProps { /** Icon, avatar or checkbox before the text. */ start?: ReactNode; /** Put a `LinkOverlay` in the title to make the whole row clickable. */ title?: ReactNode; description?: ReactNode; /** Value, badge or button after the text. */ end?: ReactNode; } declare const ListGroupItem: ComponentWithAs; interface LocaleProviderProps { /** * A language tag, like `nb-NO`, `en-US` or `de`. `en_US` works too. A tag * that is not valid, or `undefined`, gives the defaults, for example while * the user's language is loading. */ locale: string | undefined; children: ReactNode; } /** * Sets the language and region for the components inside, for example the * date format in `DatePicker`, month names in `Calendar`, 12 or 24 hours in * `TimePicker` and number format in `Money`. A `locale` prop on a component * wins over this. */ declare function LocaleProvider({ locale, children }: LocaleProviderProps): react.JSX.Element; /** The locale from the nearest `LocaleProvider`, or `undefined`. */ declare function useLocale(): string | undefined; interface LoaderProps { delay?: number; inline?: boolean; } declare const Loader: ComponentWithAs; interface LogoProps { size?: number | 'inherit'; name?: ReactNode; } declare function Logo({ size, name }: LogoProps): react.JSX.Element; interface ModalProps { children?: ReactNode; title?: ReactNode; isOpen?: boolean; onDismiss?: () => void; className?: string; style?: CSSProperties; initialFocusRef?: RefObject; hideOnInteractOutside?: boolean; /** * Hide the close button in the corner, while Escape and a click outside * still call `onDismiss`. Use it when the modal has its own buttons. */ hideCloseButton?: boolean; /** * Slide up from the bottom of the screen, as a bottom sheet. It can be * swiped down to close when `onDismiss` is set. Responsive, so * `[true, false, false]` is a sheet on phones and centered from tablets up. */ sheet?: ResponsiveValue; } declare function Modal({ title, isOpen, onDismiss, initialFocusRef, className, style, children, hideOnInteractOutside: hideOnInteractOutsideProp, hideCloseButton, sheet, }: ModalProps): react.JSX.Element; declare namespace Modal { var Footer: ({ children }: { children: ReactNode; }) => react.JSX.Element; } declare function useModalState(initialOpen?: boolean): readonly [() => void, { readonly isOpen: boolean; readonly onDismiss: () => void; }]; declare function useModal(initialValue?: boolean): { isOpen: boolean; open: () => void; dismiss: () => void; }; interface MoneyProps extends FormatCurrencyOptions { value: number; /** The value is in øre or cents, so it is divided by 100. */ minorUnits?: boolean; } /** * An amount of money, like `kr 1 234,50`. Digits have the same width, so * amounts line up in lists and tables, and the amount never breaks over two * lines. Negative amounts get `data-negative`, with no color, so apps can * style them with `[data-negative]`. */ declare const Money: ComponentWithAs; interface NumberInputProps { error?: ReactNode; hint?: ReactNode; label?: ReactNode; size?: string | number; multiline?: boolean; startAdornment?: ReactNode; endAdornment?: ReactNode; } declare const NumberInput: ComponentWithAs; type PopoverPlacement = Ariakit.PopoverStoreProps['placement']; interface PopoverProps { content: ReactNode; title?: ReactNode; children: ReactNode; placement?: PopoverPlacement; open?: boolean; onOpenChange?: (open: boolean) => void; arrow?: boolean; className?: string; } declare function Popover({ content, title, children, placement, open, onOpenChange, arrow, className, }: PopoverProps): react.JSX.Element; interface ProgressBarProps { /** How far it has come, from 0 to 1. */ value: number; } declare const ProgressBar: ComponentWithAs; interface PullToRefreshProps { /** * Called when the user pulls down far enough and lets go. Return a * promise to keep the spinner until it settles. */ onRefresh: () => unknown; /** * Shows the spinner while `true`, for example while a query loads. Leave * it out to show it while the promise from `onRefresh` runs. */ refreshing?: boolean; /** Turns off pulling. */ disabled?: boolean; children?: ReactNode; } /** * Lets the user pull down at the top of a list to refresh it, like in iOS * and Android apps. Pulling only works with touch, so also give mouse and * keyboard users a way to refresh, like a button. */ declare const PullToRefresh: ComponentWithAs; type RadioValue = HTMLProps['value']; interface RadioGroupProps { name?: string; onChange: ChangeEventHandler; error?: boolean; value?: RadioValue; disabled?: boolean; variant?: 'normal' | 'toggleGroup'; } declare const RadioGroup: ComponentWithAs; declare const RadioGroupContext: react.Context<{ onChange: ChangeEventHandler; isChecked: (value: RadioValue) => boolean; name?: string; disabled?: boolean; error?: boolean; } | null>; declare function useRadioGroupState(initialValue?: string): Pick; interface RadioProps extends Omit, 'children'> { error?: boolean; children?: ((checked: boolean) => ReactNode) | ReactNode; className?: string; } /** * `` renders a custom styled radio button input element * * ```tsx * Option 1 * ``` * * When used inside `` the group controls * the `checked` prop */ declare function Radio({ children, className, style, error, ...props }: RadioProps): react.JSX.Element; declare function useRadioGroupContext(props: RadioProps): Pick; declare const InlineRadioGroupLayout: ComponentWithAs, "div">; declare const StandardRadioGroupLayout: ComponentWithAs, "div">; interface RatingProps { value?: number; onChange?: (e: { target: { name?: string; value: number; }; }) => void; name?: string; max?: number; labels?: string[]; showLabel?: boolean; disabled?: boolean; } declare function Rating({ value, name, labels, onChange, max, showLabel, disabled, }: RatingProps): react.JSX.Element; declare function useRatingState(initialValue?: number): Pick; declare function useResponsiveSidebarAppLayoutGlobalSidebar(): { value: boolean; toggle: () => void; enable: () => void; disable: () => void; }; interface ResponsiveSidebarAppLayoutProps { header: ReactNode; sidebar: ReactNode; children: ReactNode; className?: string; maxWidth?: CSSProperties['maxWidth']; /** The header height. Takes one value per screen size, like `['260px', '120px', '120px']`. */ headerHeight?: ResponsiveValue>; style?: CSSProperties; } declare function ResponsiveSidebarAppLayout({ header, sidebar, children, className, maxWidth, headerHeight, style, }: ResponsiveSidebarAppLayoutProps): react.JSX.Element; interface ResponsiveSidebarAppHeaderProps { logo: ReactNode; children: ReactNode; className?: string; style?: CSSProperties; } declare function ResponsiveSidebarAppHeader({ logo, children, className, style, }: ResponsiveSidebarAppHeaderProps): react.JSX.Element; interface ResponsiveSidebarAppSidebarMenuItemProps { } declare const ResponsiveSidebarAppSidebarMenuItem: ComponentWithAs; interface ResponsiveSidebarAppSidebarHeadingProps { } declare const ResponsiveSidebarAppSidebarHeading: ComponentWithAs; interface ResponsiveSidebarAppSidebarSectionProps { title: ReactNode; children: ReactNode; defaultOpen?: boolean; className?: string; } declare function ResponsiveSidebarAppSidebarSection({ title, children, defaultOpen, className, }: ResponsiveSidebarAppSidebarSectionProps): react.JSX.Element; declare function ResponsiveMobileAppLayout({ children, header, maxWidth, style, className, }: { children: ReactNode; header: ReactNode; maxWidth?: CSSProperties['maxWidth']; style?: CSSProperties; className?: HTMLProps['className']; }): react.JSX.Element; declare function ResponsiveMobileAppHeader({ title, children, height, }: { title: ReactNode; children: ReactNode; height?: number; }): react.JSX.Element; interface ResponsiveMobileAppContentViewProps { } declare const ResponsiveMobileAppContentView: ComponentWithAs; interface SearchInputProps extends ComponentProps { value?: string; } /** * `` is an enhanced `` that adds a Search icon and * a clearing mechanism to quickly remove the query like native * search inputs do. */ declare function SearchInput({ value, ref, wrapperRef, startAdornment, ...props }: SearchInputProps): react.JSX.Element; interface SelectProps extends Omit, 'label' | 'size' | 'value' | 'onChange'> { label?: ReactNode; error?: ReactNode; hint?: ReactNode; value?: string | null; onChange?: ChangeEventHandler; placeholder?: string; } declare function Select({ style, className, error, hint, label, value, disabled, children, placeholder, id, ref, ...props }: SelectProps): react.JSX.Element; declare function useSelectState(initialValue: string): { value: string; onChange: (e: ChangeEvent) => void; }; interface ShareButtonProps { title: string; url: string; } declare function ShareButton({ title, url }: ShareButtonProps): react.JSX.Element; type SkeletonVariant = 'text' | 'rect' | 'circle'; interface SkeletonProps { variant?: SkeletonVariant; width?: CSSProperties['width']; height?: CSSProperties['height']; animate?: boolean; } declare const Skeleton: ComponentWithAs; interface SkeletonTextProps { lines?: number; animate?: boolean; } declare const SkeletonText: ComponentWithAs; interface SliderProps extends HTMLProps { } declare function Slider(props: SliderProps): react.JSX.Element; declare function useSliderState(initialValue: number): Pick & { value: number; }; interface SparklineProps { /** The values, oldest first. */ data: number[]; /** A label for each value, like a date. Shown with the value on hover. */ labels?: ReactNode[]; formatValue?: (value: number) => ReactNode; /** A line for change over time, bars for amounts per day or week. */ variant?: 'line' | 'bar'; /** Height in pixels. The width fills the parent. */ height?: number; /** The bottom of the scale. Defaults to the lowest value, or 0 for bars. */ min?: number; /** The top of the scale. Defaults to the highest value. */ max?: number; /** Says what the chart shows, like "Price the last 30 days". */ 'aria-label': string; className?: string; style?: CSSProperties; } /** * A small chart without axes, for a trend next to a number. Hover, touch or * use the arrow keys to see each value. */ declare function Sparkline({ data, labels, formatValue, variant, height, min: minProp, max: maxProp, 'aria-label': ariaLabel, className, style, }: SparklineProps): react.JSX.Element; type StatTrend = 'up' | 'down' | 'flat'; interface StatProps { /** What the number is, like "Total value". */ label: ReactNode; /** The number. Format it first, for example with `Money` or `formatNumber`. */ value: ReactNode; /** The change, like "+2.4%". Include the sign. */ change?: ReactNode; /** The direction of the change. Shows an arrow, colored by `upIsGood`. */ trend?: StatTrend; /** Set to false when a lower number is better, like costs or a running pace. */ upIsGood?: boolean; /** Small text under the value, like "since last week". */ description?: ReactNode; /** A small chart, like a `Sparkline`. */ chart?: ReactNode; size?: 's' | 'm' | 'l'; } /** * One number with a label, and an optional change and chart. Put a few of * them in a `Grid` for a row of key numbers. */ declare const Stat: ComponentWithAs; interface SwitchProps extends HTMLProps { error?: boolean; /** A second line of muted text under the label. */ description?: ReactNode; /** * Where the label goes. `'start'` puts the label first and the toggle at * the end of the row, like in a settings list. Default `'end'`. */ labelPosition?: 'start' | 'end'; } declare function Switch({ children, error, description, labelPosition, style, className, ...props }: SwitchProps): react.JSX.Element; declare const useSwitchContext: typeof useCheckboxGroupContext; declare const useSwitchState: typeof useCheckboxState; declare function TableContainer(props: HTMLProps): react.JSX.Element; interface TableProps extends HTMLProps { children?: ReactNode; isPending?: boolean; renderHeaderRow: () => ReactNode; renderRow: (row: T, index: number) => ReactNode; renderEmpty?: ({ numColumns }: { numColumns: number; }) => ReactNode; renderFooter?: ({ numColumns }: { numColumns: number; }) => ReactNode; items: T[] | null; caption?: ReactNode; } declare function Table({ ref, isPending, renderHeaderRow, renderRow, renderEmpty, renderFooter, items, caption, ...props }: TableProps): react.JSX.Element; interface SmartTableDefinition { id: string; header: ReactNode; renderCell: (obj: T) => ReactNode; sort: (obj: T) => unknown; width?: number; } interface SmartTableProps extends Omit, 'renderHeaderRow' | 'renderRow'> { getRowId?: (row: T) => number | string; columns?: SmartTableDefinition[]; } declare function SmartTable({ items, columns: columnsProp, getRowId, }: SmartTableProps): react.JSX.Element; type UsePaginationControls = ReturnType; declare function usePaginationControls(total: number): { props: { limit: number; onLimitChange: (limit: number) => void; page: number; onPageChange: (page: number) => void; total: number; }; paginate: (items: T[]) => T[]; }; interface PaginationControlsProps { limit: number; onLimitChange: (limit: number) => void; page: number; onPageChange: (page: number) => void; total: number; limits?: number[]; } declare function PaginationControls({ limit, onLimitChange, page, onPageChange, total, limits, }: PaginationControlsProps): react.JSX.Element; interface PaginationControlsRowLimitSelectProps extends Omit { value: number | null; onChange: (value: number) => void; options: number[]; } declare function PaginationControlsRowLimitSelect({ value, onChange, options, }: PaginationControlsRowLimitSelectProps): react.JSX.Element; declare function useTableRowSelection(availableIds: string[]): { has(id: string | number): boolean; toggleAll(): void; toggle(id: string | number): void; readonly length: number; select: (values: T[]) => void; indeterminate: boolean; }; interface TableFilterPanelProps { filterCount?: number; children?: ReactNode; } declare function TableFilterPanel({ filterCount, children, }: TableFilterPanelProps): react.JSX.Element; type TableOrder = 'desc' | 'asc'; type Invert = '' | '-'; type SortKey = T extends object ? `${Invert}${Extract}` : T extends string | number | boolean ? T : never; type ComparableValue = boolean | string | number | undefined | null | Date; type SortFnReturnValue = T extends object ? SortKey | ComparableValue : ComparableValue; type SortFn = (x: T) => SortFnReturnValue | SortFnReturnValue[]; type AnySortKey = SortKey | SortFn | typeof sortSelf; declare function sorted(collection: T[], keys?: AnySortKey[] | AnySortKey): T[]; declare const sortSelf: unique symbol; declare function createSorter(sortKeys: AnySortKey[] | AnySortKey, getters?: { [key in keyof T]?: (v: T, context: any) => unknown; }, sortingContext?: any, compare?: (a: unknown, b: unknown) => number): (items: T[]) => T[]; interface TableSortingOptions, C = any> { multi?: boolean; keys?: { [key in keyof T]?: (value: T, context: C) => unknown; }; } interface SortAction { column: keyof T | null; shiftKey: boolean; } interface TableSortingConfig, SortingContext = any> { multi: boolean; keys?: { [key in keyof T]?: (value: T, context: SortingContext) => unknown; }; sortReducer: (state: SortKey[], action: SortAction) => SortKey[]; } declare function createTableSorting, SortingContext = any>({ multi, keys, }?: TableSortingOptions): TableSortingConfig; interface UseSortingOptions, SortingContext = any> { initialSortingColumns?: SortKey[]; context?: SortingContext | undefined; } declare function useSorting, SortingContext = any>(config: TableSortingConfig, options?: UseSortingOptions): { sortColumns: any[]; toggleSortColumn: react.ActionDispatch<[action: SortAction]>; sorted: (items: T[]) => T[]; getThProps: (column: Exclude, label?: ReactNode) => { "data-sortable": boolean; onClick: (e: MouseEvent) => void; children: react.JSX.Element; }; }; interface TabsProps extends TabProviderProps { active: string | null | undefined; } declare function Tabs({ active, selectedId, defaultSelectedId, setSelectedId, ...props }: TabsProps): react.JSX.Element; declare function TabList(props: TabListProps): react.JSX.Element; interface TabProps { to: string; children?: ReactNode; className?: string; } declare const Tab: ComponentWithAs; interface TabPanelProps extends Omit { /** The `to` of the tab this panel belongs to. Without it, the panel shows * the content of the selected tab. */ id?: string; className?: string; } declare function TabPanel({ id, ...props }: TabPanelProps): react.JSX.Element; interface ToastAction { label: ReactNode; onClick: () => void; } interface ToastOptions { title: ReactNode; description: ReactNode; duration?: number; intent?: AlertProps['intent']; /** A button in the toast, like "Undo". The toast closes when it is clicked. */ action?: ToastAction; } type ToastContextValue = (toast: ToastOptions) => void; declare function ToastProvider({ children }: { children: ReactNode; }): react.JSX.Element; declare function useToast(): ToastContextValue; interface ToastProps extends ToastOptions { onClose: () => void; } declare function Toast({ title, description, intent, duration, action, onClose, }: ToastProps): react.JSX.Element; interface TooltipProps { title?: ReactNode; children?: ReactNode; } declare function Tooltip({ title, children }: TooltipProps): react.JSX.Element; /** A date-fns locale, or a language tag like `nb-NO`. */ type DateLocale = Locale | string; type WeekDay = 0 | 1 | 2 | 3 | 4 | 5 | 6; interface CalendarProps { /** * Currently selected date. If `null`, no date is selected. */ value?: Date | null; /** * Called when the user selects a new date. */ onChange?: (date: Date | null) => void; /** * Optional minimum selectable date (inclusive). */ minDate?: Date; /** * Optional maximum selectable date (inclusive). */ maxDate?: Date; /** * Custom predicate to disable individual days. */ isDateDisabled?: (date: Date) => boolean; /** * Locale for month and weekday names and the first day of the week. A * language tag like `nb-NO`, or a date-fns locale. Defaults to the locale * from `LocaleProvider`. */ locale?: DateLocale; /** * Day the week starts on. 0 = Sunday, 1 = Monday, ... Defaults to what is * normal in the locale, or Monday without a locale. */ weekStartsOn?: WeekDay; /** * Label for assistive technologies. Defaults to `"Calendar"`. */ 'aria-label'?: string; /** * Optional caption element below the calendar. */ caption?: ReactNode; /** * When true, the currently focused day will receive DOM focus when the * calendar is mounted. This is useful when opening the calendar from an * input using the keyboard. */ autoFocus?: boolean; } interface DateRange { start: Date | null; end: Date | null; } interface DateRangeCalendarProps extends Omit { value?: DateRange | null; onChange?: (value: DateRange | null) => void; } declare function Calendar(props: CalendarProps): react.JSX.Element; declare function DateRangeCalendar(props: DateRangeCalendarProps): react.JSX.Element; interface DatePickerProps extends Omit, 'type' | 'value' | 'onChange'>, Pick { value?: Date | null; onChange?: (value: Date | null) => void; /** * Custom formatter for the input value. Defaults to how the locale writes * dates, like `20.10.2026` for `nb-NO`, or `2026-10-20` without a locale. */ formatDate?: (value: Date | null) => string; /** * Custom parser for the input value. The default reads the locale's * format with any separator, and ISO dates like `2026-10-20`. */ parseInput?: (value: string) => Date | null; } declare function DatePicker({ value, onChange, minDate, maxDate, isDateDisabled, locale: localeProp, weekStartsOn, formatDate, parseInput, ref, onFocus, onBlur, onClick, onKeyDown, inputClassName, ...inputProps }: DatePickerProps): react.JSX.Element; interface TimePickerProps extends Omit, 'type' | 'value' | 'onChange'> { /** * Time value in 24-hour `HH:mm` or `HH:mm:ss` format. */ value?: string | null; /** * Called with the new time value or `null` when cleared. */ onChange?: (value: string | null) => void; /** * Step in seconds between selectable times. Defaults to 60 (1 minute). * Used to determine minute intervals (e.g., step=300 shows 5-minute intervals). */ step?: number; /** * Minimum time in `HH:mm` or `HH:mm:ss` format. */ min?: string; /** * Maximum time in `HH:mm` or `HH:mm:ss` format. */ max?: string; /** * Show seconds column in the picker. Defaults to false. */ showSeconds?: boolean; /** * Use 12-hour format with AM/PM. Defaults to what is normal in the locale, * or 24 hours without a locale. */ use12Hour?: boolean; /** * A language tag, like `en-US`. Defaults to the locale from * `LocaleProvider`. Sets the default for `use12Hour`. */ locale?: string; } /** * Custom time picker with a dropdown for selecting hours and minutes. * * The picker displays scrollable columns for hours and minutes (and optionally * seconds). It supports min/max constraints, step intervals, and both 12-hour * and 24-hour formats. */ declare function TimePicker({ value, onChange, step, min, max, showSeconds, use12Hour: use12HourProp, locale: localeProp, ref, onFocus, onClick, onKeyDown, inputClassName, ...inputProps }: TimePickerProps): react.JSX.Element; interface ThemePickerOption { value: string; label: ReactNode; theme: Theme; /** Shown in dark mode. Made from `theme` when not given. */ darkTheme?: Theme; } interface ThemePickerProps { /** What is picked, like "Theme" or "Look of your shop". */ label: ReactNode; options: ThemePickerOption[]; value: string; onChange: (value: string) => void; name?: string; className?: string; } /** * Lets the user pick one of a few themes. Each option shows a small preview * in its own theme. It works like radio buttons, with the arrow keys. */ declare function ThemePicker({ label, options, value, onChange, name, className, }: ThemePickerProps): react.JSX.Element; interface ThemeScopeProps { theme: Theme; } /** * The CSS variables of a theme, as an inline style. Setting them on an * element gives everything inside it that theme. */ declare function getThemeStyle(theme: Theme): CSSProperties; /** * Shows its children in another theme than the rest of the page, for * example to preview a theme the user is about to pick. The page theme * still comes from `ThemeProvider`. */ declare const ThemeScope: ComponentWithAs; interface AuthContextValue Promise>> { currentUser: User | null; login: LoginMethods; logout: () => void; isPending: boolean; } interface AuthOptions Promise>> { refreshUser: (signal?: AbortSignal | undefined) => Promise; logout: () => Promise; loginMethods: LoginMethods; waitForRefresh?: boolean; } declare function createAuth Promise>>(options: AuthOptions): { AuthProvider: (props: { children: ReactNode; }) => react.JSX.Element; useAuth: () => AuthContextValue; }; declare function parseJwt(token: string | null): T | null; type UseBoolean = ReturnType; declare function useBoolean(initialValue?: boolean | (() => boolean)): { value: boolean; toggle: () => void; enable: () => void; disable: () => void; }; /** * Copies `value` to the clipboard. `isCopied` is true for a moment after * the text was copied, and stays false when copying failed. */ declare function useCopyableText(value: string): { isCopied: boolean; onCopy: () => Promise; }; declare function useCounter(initialCount?: number | (() => number), step?: number): { value: number; increase: () => void; decrease: () => void; reset: () => void; }; declare function useCycle(values: T[]): { value: T; next: () => void; }; type Callback = () => void; /** * useInterval() * * https://overreacted.io/making-setinterval-declarative-with-react-hooks/ */ declare function useInterval(callback: Callback, delay: number): void; /** * Listen for changes to one or multiple media queries. * * ```tsx * const [s, m, l] = useMedia([ * 'screen and (min-width: 0px)', * 'screen and (min-width: 300px)', * 'screen and (min-width: 600px)' * ]) * * const darkMode = useMedia('(prefers-color-scheme: dark)'); * ``` */ declare function useMedia(query: string): boolean; declare function useMedia(query: string[]): boolean[]; declare function useMounted(): react.RefObject; declare function usePrevious(value: T): T | undefined; declare function useQuery(get: (signal: AbortSignal | undefined) => Promise, inputs: DependencyList): { abort: () => void; refetch: react.ActionDispatch<[]>; error: Error | null; loading: boolean; resolvedCount: number; data: T | null; }; declare function useMutation(mutationFn: (value: Input) => Promise): { isPending: boolean; mutate: (value: Input) => Promise; reset: () => void; error: null; data: unknown; loading: boolean; resolvedCount: number; } | { isPending: boolean; mutate: (value: Input) => Promise; reset: () => void; data: null; error: Error; loading: boolean; resolvedCount: number; } | { isPending: boolean; mutate: (value: Input) => Promise; reset: () => void; error: null; data: null; loading: boolean; resolvedCount: number; }; declare function hashKey(obj: unknown): string; declare const useSafeLayoutEffect: typeof useEffect; declare function useScrollToTop(): void; declare function ScrollToTop(): react.JSX.Element; /** * Like `useState`, but the value is kept in localStorage and synced between * tabs. Until the user sets a value, the current `defaultValue` is used, so a * default that changes over time is followed. * * Values must be JSON: a `Date` comes back as a string, and a value that * cannot be turned into JSON (a `BigInt` or a circular object) throws. * Updates are applied at once, also inside `startTransition`. * * The server does not know the stored value. It renders the default, and the * stored value is used right after hydration. */ declare function useStorageState(key: string, defaultValue: T): readonly [T, (action: SetStateAction) => void]; declare function useThrottle(value: T, limit: number): T; declare function useTimeout(callback: () => void, delay: number | null): void; declare function useToggle(initialValue?: boolean): [boolean, ActionDispatch<[] | [boolean]>]; interface VisuallyHiddenProps { /** * Show the content while it, or something in it, has focus. Use it for a * skip link. */ focusable?: boolean; } declare const VisuallyHidden: ComponentWithAs; export { ALERT_INTENTS, Accordion, AccordionRow, Alert, Avatar, Badge, Button, CSSPropertyAccessorProxy, Calendar, Card, Checkbox, CheckboxGroup, CheckboxGroupContext, CircularProgress, ClientOnly, Combobox, ComponentWithAs, Counter, DarkModeSwitch, DatePicker, DateRangeCalendar, DescriptionItem, DescriptionList, Dialog, Divider, DropdownMenu, EmptyState, ErrorBoundary, FLEX_ALIGN, FLEX_JUSTIFY, FieldSet, FileInput, Footer, FooterColumn, Grid, HamburgerButton, HelperText, Hero, Image, ImageContainer, ImageLightbox, InlineCheckboxGroupLayout, InlineRadioGroupLayout, Input, Label, Legend, LinkOverlay, ListGroup, ListGroupItem, Loader, LocaleProvider, Logo, Modal, Money, NotificationBadge, NumberInput, PaginationControls, PaginationControlsRowLimitSelect, Panel, Popover, ProgressBar, PropertyAccessorProxy, PullToRefresh, RGBAToHSLA, RGBAToHex, Radio, RadioGroup, RadioGroupContext, Rating, ResponsiveMobileAppContentView, ResponsiveMobileAppHeader, ResponsiveMobileAppLayout, ResponsiveSidebarAppHeader, ResponsiveSidebarAppLayout, ResponsiveSidebarAppSidebarHeading, ResponsiveSidebarAppSidebarMenuItem, ResponsiveSidebarAppSidebarSection, ScrollToTop, SearchInput, Select, ShareButton, Skeleton, SkeletonText, Slider, SmartTable, Spacer, Sparkline, Stack, StandardCheckboxGroupLayout, StandardRadioGroupLayout, Stat, Switch, Tab, TabList, TabPanel, Table, TableContainer, TableFilterPanel, Tabs, TextErrorMessage, ThemePicker, ThemeProvider, ThemeScope, TimePicker, Toast, ToastProvider, Tooltip, VisuallyHidden, adjustColor, canUseDOM, convertToDarkTheme, createAuth, createSorter, createTableSorting, createTheme, getThemeStyle, hashKey, hexToHSLA, hexToRGBA, isDarkTheme, parseJwt, sortSelf, sorted, useBoolean, useBreakpoints, useButtonStyles, useCheckboxGroupContext, useCheckboxGroupState, useCheckboxState, useClientOnly, useCopyableText, useCounter, useCounterState, useCycle, useDarkMode, useErrorHandler, useInterval, useLocale, useMedia, useModal, useModalState, useMounted, useMutation, usePaginationControls, usePrevious, useQuery, useRadioGroupContext, useRadioGroupState, useRatingState, useResponsiveSidebarAppLayoutGlobalSidebar, useResponsiveValue, useResponsiveValues, useSafeLayoutEffect, useScrollToTop, useSelectState, useSliderState, useSorting, useStorageState, useSwitchContext, useSwitchState, useTableRowSelection, useTheme, useThrottle, useTimeout, useToast, useToggle, useTokens }; export type { AccordionProps, AccordionRowProps, AlertIntent, AlertProps, AuthContextValue, AuthOptions, AvatarProps, BadgeIntent, BadgeProps, ButtonIntent, ButtonProps, ButtonSize, ButtonVariant, CalendarProps, CardProps, CheckboxGroupProps, CheckboxProps, CircularProgressProps, ClientOnlyProps, Colors, ComboboxProps, CounterProps, DatePickerProps, DateRange, DateRangeCalendarProps, DescriptionItemProps, DescriptionListProps, DialogIntent, DialogProps, DividerProps, DropdownMenuItem, DropdownMenuProps, EmptyStateProps, ErrorBoundaryFallbackProps, ErrorBoundaryProps, FileInputProps, FlexAlign, FlexJustify, FooterColumnProps, FooterProps, FullThemeDefinition, GridProps, HamburgerButtonProps, HeroProps, ImageContainerProps, ImageFit, ImageLightboxImage, ImageLightboxProps, ImageProps, LayoutProps, LinkOverlayProps, ListGroupItemProps, ListGroupProps, LoaderProps, LocaleProviderProps, LogoProps, ModalProps, MoneyProps, NotificationBadgeProps, NumberInputProps, PaginationControlsProps, PaginationControlsRowLimitSelectProps, PanelProps, PopoverPlacement, PopoverProps, ProgressBarProps, PullToRefreshProps, RadioGroupProps, RadioProps, RatingProps, ResponsiveSidebarAppHeaderProps, ResponsiveSidebarAppLayoutProps, ResponsiveSidebarAppSidebarSectionProps, ResponsiveSpacingValue, ResponsiveValue, SearchInputProps, SelectProps, ShareButtonProps, SkeletonProps, SkeletonTextProps, SkeletonVariant, SliderProps, SmartTableDefinition, SortKey, SpacerProps, Spacing, SparklineProps, StackProps, StatProps, StatTrend, SwitchProps, TabPanelProps, TabProps, TableFilterPanelProps, TableOrder, TableSortingConfig, TabsProps, Theme, ThemeColorScale, ThemeColorsDefinition, ThemeContextValue, ThemeDefinition, ThemePickerOption, ThemePickerProps, ThemeProviderProps, ThemeScopeProps, ThemeTokenGroup, TimePickerProps, ToastAction, ToastProps, TooltipProps, UseBoolean, UsePaginationControls, VisuallyHiddenProps };