import { ThemeSize } from "../../types/shared.js"; import { AccordionProps } from "../accordion/types.js"; import { AlertProps } from "../alert/types.js"; import "../alert/index.js"; import { AspectRatioProps } from "../aspect-ratio/types.js"; import "../aspect-ratio/index.js"; import { AvatarProps } from "../avatar/types.js"; import { BadgeProps } from "../badge/types.js"; import { BreadcrumbItem, BreadcrumbProps } from "../breadcrumb/types.js"; import { IconProps } from "../icon/types.js"; import "../icon/index.js"; import { ButtonProps } from "../button/types.js"; import { CardProps } from "../card/types.js"; import { CarouselProps } from "../carousel/types.js"; import { CheckboxProps } from "../checkbox/types.js"; import { ChipProps } from "../chip/types.js"; import { CollapsibleProps } from "../collapsible/types.js"; import { DialogProps } from "../dialog/types.js"; import { CommandProps } from "../command/types.js"; import { MenuProps } from "../menu/types.js"; import { ContextMenuProps } from "../context-menu/types.js"; import { DividerProps } from "../divider/types.js"; import { DrawerProps } from "../drawer/types.js"; import { DropdownMenuProps } from "../dropdown-menu/types.js"; import { LabelProps } from "../label/types.js"; import { FormFieldProps } from "../form/types.js"; import { HoverCardProps } from "../hover-card/types.js"; import { InputProps } from "../input/types.js"; import { InputOTPProps } from "../input-otp/types.js"; import { KeyboardKeyProps } from "../keyboard-key/types.js"; import { SheetProps } from "../sheet/types.js"; import { LayoutProps } from "../layout/types.js"; import { PopoverProps } from "../popover/types.js"; import { ProgressProps } from "../progress/types.js"; import { RadioGroupProps } from "../radio/types.js"; import { ScrollAreaProps } from "../scroll-area/types.js"; import { TabsOptionData, TabsProps } from "../tabs/types.js"; import { SegmentOptionData, SegmentProps } from "../segment/types.js"; import { SelectProps } from "../select/types.js"; import { SkeletonProps } from "../skeleton/types.js"; import { SliderProps } from "../slider/types.js"; import { SwitchProps } from "../switch/types.js"; import { TextareaProps } from "../textarea/types.js"; import { ToggleProps } from "../toggle/types.js"; import { TooltipProps } from "../tooltip/types.js"; import { AlertDialogProps } from "../alert-dialog/types.js"; import "../alert-dialog/index.js"; import { ToasterProps } from "sonner"; import { ThemeOptions } from "@skyroc/tailwind-plugin"; //#region src/components/config-provider/types.d.ts /** * Props for the ConfigProvider component. * Provides global configuration and theming for all child components. * * @example * ```tsx * * * * ``` */ interface ConfigProviderProps extends ConfigProps { /** * Child components that will inherit the configuration. */ children: React.ReactNode; } /** * Configuration options for the config provider. * Controls global theme, direction, and default component sizes. */ interface ConfigProps extends ComponentConfig { /** * Text direction for the entire application. * Affects layout and text alignment for RTL languages. * @default 'ltr' */ direction?: 'ltr' | 'rtl'; /** * Default size variant for components. * Can be overridden on individual components. */ size?: ThemeSize; /** * Theme configuration object. * Defines colors, spacing, typography, and other design tokens. */ theme?: ThemeOptions; } /** * Component-specific configuration options. * Allows setting default props for specific components globally. */ interface ComponentConfig { /** * Default configuration for accordion components. */ accordion?: AccordionConfig; /** * Default configuration for alert components. */ alert?: AlertConfig; /** * Default configuration for alert dialog components. */ alertDialog?: AlertDialogConfig; /** * Default configuration for aspect ratio components. */ aspectRatio?: AspectRatioConfig; /** * Default configuration for avatar components. */ avatar?: AvatarConfig; /** * Default configuration for badge components. */ badge?: BadgeConfig; /** * Default configuration for breadcrumb components. */ breadcrumb?: BreadcrumbConfig; /** * Default configuration for button components. */ button?: ButtonConfig; /** * Default configuration for card components. */ card?: CardConfig; /** * Default configuration for carousel components. */ carousel?: CarouselConfig; /** * Default configuration for checkbox components. */ checkbox?: CheckboxConfig; /** * Default configuration for chip components. */ chip?: ChipConfig; /** * Default configuration for collapsible components. */ collapsible?: CollapsibleConfig; /** * Default configuration for command components. */ command?: CommandConfig; /** * Default configuration for context menu components. */ contextMenu?: ContextMenuConfig; /** * Default configuration for dialog components. */ dialog?: DialogConfig; /** * Default configuration for divider components. */ divider?: DividerConfig; /** * Default configuration for drawer components. */ drawer?: DrawerConfig; /** * Default configuration for dropdown menu components. */ dropdownMenu?: DropdownMenuConfig; /** * Default configuration for form field components. */ formField?: FormFieldConfig; /** * Default configuration for hover card components. */ hoverCard?: HoverCardConfig; /** * Default configuration for icon components. */ icon?: IconConfig; /** * Default configuration for input components. */ input?: InputConfig; /** * Default configuration for input OTP components. */ inputOtp?: InputOtpConfig; /** * Default configuration for keyboard key components. */ keyboardKey?: KeyboardKeyConfig; /** * Default configuration for label components. */ label?: LabelConfig; /** * Default configuration for layout components. */ layout?: LayoutConfig; /** * Default configuration for menu components. */ menu?: MenuConfig; /** * Default configuration for popover components. */ popover?: PopoverConfig; /** * Default configuration for progress components. */ progress?: ProgressConfig; /** * Default configuration for radio components. */ radio?: RadioConfig; /** * Default configuration for scroll area components. */ scrollArea?: ScrollAreaConfig; /** * Default configuration for segment components. */ segment?: SegmentConfig; /** * Default configuration for select components. */ select?: SelectConfig; /** * Default configuration for sheet components. */ sheet?: SheetConfig; /** * Default configuration for skeleton components. */ skeleton?: SkeletonConfig; /** * Default configuration for slider components. */ slider?: SliderConfig; /** * Default configuration for sonner/toast components. */ sonner?: SonnerConfig; /** * Default configuration for switch components. */ switch?: SwitchConfig; /** * Default configuration for tabs components. */ tabs?: TabsConfig; /** * Default configuration for textarea components. */ textarea?: TextareaConfig; /** * Default configuration for toggle components. */ toggle?: ToggleConfig; /** * Default configuration for tooltip components. */ tooltip?: TooltipConfig; } /** * Configuration options for accordion components. * Allows setting default props that apply to all accordion instances globally. * * @example * ```tsx * accordion: { * size: 'lg', * orientation: 'vertical', * collapsible: true, * triggerIcon: , * classNames: { trigger: 'custom-trigger' } * } * ``` */ type AccordionConfig = Pick & { /** * Whether accordion items can be collapsed after expansion (Single mode only). * @default false */ collapsible?: boolean; }; /** * Configuration options for alert components. * Selects specific props that can be set globally for all alerts. * * @example * ```tsx * alert: { * variant: 'outline', * size: 'md', * color: 'success' * } * ``` */ type AlertConfig = Pick; /** * Configuration options for alert dialog components. * Selects specific props that can be set globally for all alert dialogs. * * @example * ```tsx * alertDialog: { * type: 'info', * size: 'md', * forceMountOverlay: true, * classNames: { content: 'custom-content' } * } * ``` */ type AlertDialogConfig = Pick; /** * Configuration options for aspect ratio components. * Selects specific props that can be set globally for all aspect ratios. * * @example * ```tsx * aspectRatio: { * className: 'custom-aspect-ratio' * } * ``` */ type AspectRatioConfig = Pick; /** * Configuration options for collapsible components. * Selects specific props that can be set globally for all collapsible instances. */ type CollapsibleConfig = Pick; /** * Configuration options for command components. * Selects specific props that can be set globally for all command instances. */ type CommandConfig = Pick; /** * Configuration options for context menu components. * Selects specific props that can be set globally for all context menu instances. */ type ContextMenuConfig = Pick; /** * Configuration options for dialog components. * Selects specific props that can be set globally for all dialog instances. */ type DialogConfig = Pick; /** * Configuration options for divider components. * Selects specific props that can be set globally for all divider instances. */ type DividerConfig = Pick; /** * Configuration options for drawer components. * Selects specific props that can be set globally for all drawer instances. */ type DrawerConfig = Pick; /** * Configuration options for dropdown menu components. * Selects specific props that can be set globally for all dropdown menu instances. */ type DropdownMenuConfig = Pick; /** * Configuration options for form field components. * Selects specific props that can be set globally for all form field instances. */ type FormFieldConfig = Pick; /** * Configuration options for icon components. * Selects specific props that can be set globally for all icons. * * @example * ```tsx * icon: { * width: 24, * height: 24, * color: 'currentColor' * } * ``` */ type IconConfig = Pick; /** * Configuration options for input components. * Selects specific props that can be set globally for all inputs. */ type InputConfig = Pick; /** * Configuration options for button components. * Selects specific props that can be set globally for all buttons. * * @example * ```tsx * button: { * variant: 'solid', * color: 'primary', * size: 'md', * shape: 'rounded' * } * ``` */ type ButtonConfig = Pick; /** * Configuration options for badge components. * Selects specific props that can be set globally for all badges. */ type BadgeConfig = Pick; /** * Configuration options for radio components. * Selects specific props that can be set globally for all radio groups. */ type RadioConfig = Pick; /** * Configuration options for switch components. * Selects specific props that can be set globally for all switches. */ type SwitchConfig = Pick; /** * Configuration options for slider components. * Selects specific props that can be set globally for all sliders. */ type SliderConfig = Pick; /** * Configuration options for progress components. * Selects specific props that can be set globally for all progress bars. */ type ProgressConfig = Pick; /** * Configuration options for avatar components. * Selects specific props that can be set globally for all avatars. */ type AvatarConfig = Pick; /** * Configuration options for card components. * Selects specific props that can be set globally for all cards. */ type CardConfig = Pick; /** * Configuration options for checkbox components. * Selects specific props that can be set globally for all checkboxes. */ type CheckboxConfig = Pick; /** * Configuration options for textarea components. * Selects specific props that can be set globally for all textareas. */ type TextareaConfig = Pick; /** * Configuration options for tooltip components. * Selects specific props that can be set globally for all tooltips. */ type TooltipConfig = Pick; /** * Configuration options for tabs components. * Selects specific props that can be set globally for all tabs. */ type TabsConfig = Pick, 'classNames' | 'enableIndicator' | 'orientation' | 'size'>; /** * Configuration options for chip components. * Selects specific props that can be set globally for all chips. */ type ChipConfig = Pick; /** * Configuration options for toggle components. * Selects specific props that can be set globally for all toggles. */ type ToggleConfig = Pick; /** * Configuration options for popover components. * Selects specific props that can be set globally for all popovers. */ type PopoverConfig = Pick; /** * Configuration options for select components. * Selects specific props that can be set globally for all selects. */ type SelectConfig = Pick; /** * Configuration options for breadcrumb components. * Selects specific props that can be set globally for all breadcrumbs. */ type BreadcrumbConfig = Pick, 'className' | 'classNames' | 'separator'>; /** * Configuration options for carousel components. * Selects specific props that can be set globally for all carousels. */ type CarouselConfig = Pick; /** * Configuration options for segment components. * Selects specific props that can be set globally for all segments. */ type SegmentConfig = Pick, 'classNames' | 'enableIndicator' | 'orientation' | 'size'>; /** * Configuration options for scroll area components. * Selects specific props that can be set globally for all scroll areas. */ type ScrollAreaConfig = Pick; /** * Configuration options for layout components. * Selects specific props that can be set globally for all layouts. */ type LayoutConfig = Pick; /** * Configuration options for label components. * Selects specific props that can be set globally for all labels. */ type LabelConfig = Pick; /** * Configuration options for skeleton components. * Selects specific props that can be set globally for all skeletons. */ type SkeletonConfig = Pick; /** * Configuration options for keyboard key components. * Selects specific props that can be set globally for all keyboard keys. */ type KeyboardKeyConfig = Pick; /** * Configuration options for sheet components. * Selects specific props that can be set globally for all sheets. */ type SheetConfig = Pick; /** * Configuration options for input OTP components. * Selects specific props that can be set globally for all input OTPs. */ type InputOtpConfig = Pick; /** * Configuration options for hover card components. * Selects specific props that can be set globally for all hover cards. */ type HoverCardConfig = Pick; /** * Configuration options for menu components. * Selects specific props that can be set globally for all menus. */ type MenuConfig = Pick; /** * Configuration options for sonner/toast components. * Selects specific props that can be set globally for all toasters. */ type SonnerConfig = Pick; //#endregion export { AccordionConfig, AlertConfig, AlertDialogConfig, AspectRatioConfig, AvatarConfig, BadgeConfig, BreadcrumbConfig, ButtonConfig, CardConfig, CarouselConfig, CheckboxConfig, ChipConfig, CollapsibleConfig, CommandConfig, ComponentConfig, ConfigProps, ConfigProviderProps, ContextMenuConfig, DialogConfig, DividerConfig, DrawerConfig, DropdownMenuConfig, FormFieldConfig, HoverCardConfig, IconConfig, InputConfig, InputOtpConfig, KeyboardKeyConfig, LabelConfig, LayoutConfig, MenuConfig, PopoverConfig, ProgressConfig, RadioConfig, ScrollAreaConfig, SegmentConfig, SelectConfig, SheetConfig, SkeletonConfig, SliderConfig, SonnerConfig, SwitchConfig, TabsConfig, TextareaConfig, ToggleConfig, TooltipConfig };