import React from 'react'; import { RequiredMark } from '../Form/Form.types'; import { ValidateMessages } from '../Form/Internal/OcForm.types'; import { FocusVisibleOptions } from './A11y'; import { FeatureFlags } from './FeatureFlagProvider'; import { Shape } from './ShapeContext'; import { Size } from './SizeContext'; import { FontOptions, IRegisterFont, IRegisterTheme, ThemeOptions } from './Theming'; import type { Locale } from '../LocaleProvider'; export declare type DirectionType = 'ltr' | 'rtl' | undefined; export interface ConfigContextProps { /** * If true, no contextual disable for a given component * @default false */ noDisabledContext?: boolean; /** * If true, no contextual gradient for a given component * @default false */ noGradientContext?: boolean; /** * If true, no contextual shape for a given component * @default false */ noShapeContext?: boolean; /** * If true, no contextual size for a given component * @default false */ noSizeContext?: boolean; /** * If true, no contextual theme for a given component * @default false */ noThemeContext?: boolean; } export interface IConfigContext { fontOptions: FontOptions; themeOptions: ThemeOptions; setFontOptions: (fontOptions: FontOptions) => void; setThemeOptions: (themeOptions: ThemeOptions) => void; disabled?: boolean; focusVisibleOptions?: FocusVisibleOptions; form?: { validateMessages?: ValidateMessages; requiredMark?: RequiredMark; colon?: boolean; }; gradient?: boolean; icomoonIconSet?: Object; locale?: Locale; registeredFont?: IRegisterFont; registeredTheme?: IRegisterTheme; shape?: Shape; size?: Size; } export interface ConfigProviderProps { /** * The child component renderer. */ children?: React.ReactNode; /** * The name of the component for use in child components to determine if they are a child of this component. */ componentName?: string; /** * Used by the disabled context provider to disable components. */ disabled?: boolean; /** * Options for Octuple features that can be conditionally enabled. */ featureFlags?: FeatureFlags; /** * Options for font * @default { fontFamily: 'Source Sans Pro', fontSize: '16px', fontStack: '-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif' } */ fontOptions?: FontOptions; /** * Options for keyboard modality styles * @default { focusVisible: true, focusVisibleElement: document.documentElement } */ focusVisibleOptions?: FocusVisibleOptions; /** * Global Form properties. */ form?: { validateMessages?: ValidateMessages; requiredMark?: RequiredMark; colon?: boolean; }; /** * Used by the gradient context provider to theme components. */ gradient?: boolean; /** * selection.json as generated by icomoon for icons * @default {} */ icomoonIconSet?: Object; /** * The locale of the application. */ locale?: Locale; /** * Used by the shape context provider to determine the shape of components. */ shape?: Shape; /** * Used by the size context provider to determine the size of components. */ size?: Size; /** * Options for theming * @default { name: 'blue', customTheme: null } */ themeOptions?: ThemeOptions; }