import { ReactNode } from 'react'; import { Color } from '../types.js'; import type { AccordionItemDefaultProps } from './AccordionItem.js'; import type { AccordionRootDefaultProps } from './AccordionRoot.js'; import type { BackdropDefaultProps } from './Backdrop.js'; import type { ButtonDefaultProps } from './Button.js'; import type { CheckboxDefaultProps } from './Checkbox.js'; import type { ChipDefaultProps } from './Chip.js'; import type { CollapsibleIndicatorDefaultProps } from './CollapsibleIndicator.js'; import type { CollapsiblePanelDefaultProps } from './CollapsiblePanel.js'; import type { CollapsibleRootDefaultProps } from './CollapsibleRoot.js'; import type { ColorEditorDefaultProps } from './ColorEditor.js'; import type { ColorPickerDefaultProps } from './ColorPicker.js'; import type { DialogDefaultProps } from './Dialog.js'; import type { InputDefaultProps } from './Input.js'; import type { LinkDefaultProps } from './Link.js'; import type { ListDefaultProps } from './List.js'; import type { ListButtonDefaultProps } from './ListButton.js'; import type { ListItemDefaultProps } from './ListItem.js'; import type { ListSeparatorDefaultProps } from './ListSeparator.js'; import type { ListTitleDefaultProps } from './ListTitle.js'; import type { NumberFieldDefaultProps } from './NumberField.js'; import type { NumberScrubberDefaultProps } from './NumberScrubber.js'; import type { OTPFieldDefaultProps } from './OTPField.js'; import type { OTPFieldInputDefaultProps } from './OTPFieldInput.js'; import type { OTPFieldSeparatorDefaultProps } from './OTPFieldSeparator.js'; import type { PopoverDefaultProps } from './Popover.js'; import type { PopupDefaultProps } from './Popup.js'; import type { PopupContentDefaultProps } from './PopupContent.js'; import type { RadioDefaultProps } from './Radio.js'; import type { SearchFieldDefaultProps } from './SearchField.js'; import type { SectionTitleDefaultProps } from './SectionTitle.js'; import type { SegmentedDefaultProps } from './Segmented.js'; import type { SegmentedButtonDefaultProps } from './SegmentedButton.js'; import type { SelectDefaultProps } from './Select.js'; import type { ShortcutDefaultProps } from './Shortcut.js'; import type { SliderDefaultProps } from './Slider.js'; import type { SpinnerDefaultProps } from './Spinner.js'; import type { SurfaceDefaultProps } from './Surface.js'; import type { SurfaceContentDefaultProps } from './SurfaceContent.js'; import type { SurfaceCutDefaultProps } from './SurfaceCut.js'; import type { SurfaceCutContentDefaultProps } from './SurfaceCutContent.js'; import type { SwitchDefaultProps } from './Switch.js'; import type { TabDefaultProps } from './Tab.js'; import type { TabPanelDefaultProps } from './TabPanel.js'; import type { TabsDefaultProps } from './Tabs.js'; import type { TabsListDefaultProps } from './TabsList.js'; import type { TextareaDefaultProps } from './Textarea.js'; import type { ToastDefaultProps } from './Toast.js'; import type { ToggleButtonDefaultProps } from './ToggleButton.js'; import type { ToggleGroupDefaultProps } from './ToggleGroup.js'; import type { ToolbarDefaultProps } from './Toolbar.js'; import type { ToolbarButtonDefaultProps } from './ToolbarButton.js'; import type { ToolbarSeparatorDefaultProps } from './ToolbarSeparator.js'; import type { TooltipDefaultProps } from './Tooltip.js'; import type { TooltipPrimitiveDefaultProps } from './TooltipPrimitive.js'; /** * Registry of per-component default props that can be supplied to * `CladdProvider` via the `defaults` prop. * * Each entry is `Partial` (with polymorphic and per-instance * props excluded — see each component's `*DefaultProps` type). * * Add new entries here as additional components opt into context defaults. */ export interface ComponentDefaults { AccordionRoot?: AccordionRootDefaultProps; AccordionItem?: AccordionItemDefaultProps; Backdrop?: BackdropDefaultProps; Button?: ButtonDefaultProps; Checkbox?: CheckboxDefaultProps; Chip?: ChipDefaultProps; ColorEditor?: ColorEditorDefaultProps; ColorPicker?: ColorPickerDefaultProps; CollapsibleRoot?: CollapsibleRootDefaultProps; CollapsiblePanel?: CollapsiblePanelDefaultProps; CollapsibleIndicator?: CollapsibleIndicatorDefaultProps; Dialog?: DialogDefaultProps; Input?: InputDefaultProps; Link?: LinkDefaultProps; List?: ListDefaultProps; ListButton?: ListButtonDefaultProps; ListItem?: ListItemDefaultProps; ListSeparator?: ListSeparatorDefaultProps; ListTitle?: ListTitleDefaultProps; NumberField?: NumberFieldDefaultProps; NumberScrubber?: NumberScrubberDefaultProps; OTPField?: OTPFieldDefaultProps; OTPFieldInput?: OTPFieldInputDefaultProps; OTPFieldSeparator?: OTPFieldSeparatorDefaultProps; Popover?: PopoverDefaultProps; Popup?: PopupDefaultProps; PopupContent?: PopupContentDefaultProps; Radio?: RadioDefaultProps; SearchField?: SearchFieldDefaultProps; SectionTitle?: SectionTitleDefaultProps; Segmented?: SegmentedDefaultProps; SegmentedButton?: SegmentedButtonDefaultProps; Select?: SelectDefaultProps; Shortcut?: ShortcutDefaultProps; Slider?: SliderDefaultProps; Spinner?: SpinnerDefaultProps; Surface?: SurfaceDefaultProps; SurfaceContent?: SurfaceContentDefaultProps; SurfaceCut?: SurfaceCutDefaultProps; SurfaceCutContent?: SurfaceCutContentDefaultProps; Switch?: SwitchDefaultProps; Tabs?: TabsDefaultProps; TabsList?: TabsListDefaultProps; Tab?: TabDefaultProps; TabPanel?: TabPanelDefaultProps; Textarea?: TextareaDefaultProps; Toast?: ToastDefaultProps; ToggleGroup?: ToggleGroupDefaultProps; ToggleButton?: ToggleButtonDefaultProps; Toolbar?: ToolbarDefaultProps; ToolbarButton?: ToolbarButtonDefaultProps; ToolbarSeparator?: ToolbarSeparatorDefaultProps; Tooltip?: TooltipDefaultProps; TooltipPrimitive?: TooltipPrimitiveDefaultProps; } type ThemeContextValue = { theme: 'dark' | 'light'; accentColor: Color; overlaysRoot: string; defaults: ComponentDefaults; }; export declare const ThemeContext: import("react").Context; /** * Provides `{ theme, accentColor }` to the rest of the tree via `ThemeContext`. * Most apps use `CladdProvider` instead, which wraps this together with the dialog/toast portals. * * Components read these values via `useTheme()` and `useAccentColor()` to pick: * - per-theme defaults (Dialog/Popover/Tooltip variant, outline, surfaceLevel), * - the default `color` for interactive components (Button/Switch/Checkbox/Radio default to `accentColor`). */ export declare const ThemeProvider: ({ children, theme, accentColor, overlaysRoot, defaults, }: { /** App subtree to expose theme context to. */ children: ReactNode; /** Color scheme to expose to descendants. */ theme: "dark" | "light"; /** App-wide accent color token used as the default for interactive components. */ accentColor: string; /** The root element(s) to insert overlays to. Default `'#app, #__next, #root'`. */ overlaysRoot?: string; /** Per-component default props, read via `useComponentDefaults`. */ defaults?: ComponentDefaults; }) => import("react/jsx-runtime").JSX.Element; export {}; //# sourceMappingURL=ThemeContext.d.ts.map