UNPKG

@veracity/vui

Version:

Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.

40 lines (39 loc) 2.04 kB
import defaultTheme from "./defaultTheme.js"; //#region src/theme/types.d.ts type Animation = keyof VuiTheme['animations']; type Border = keyof VuiTheme['borders']; type Color = keyof VuiTheme['colors']; type Component = keyof VuiTheme['components']; type Elevation = keyof VuiTheme['shadows']; type Font = keyof VuiTheme['fonts']; type FontSize = keyof VuiTheme['fontSizes']; type FontWeight = keyof VuiTheme['fontWeights']; type GridTemplateColumn = keyof VuiTheme['gridTemplateColumns']; type GridTemplateRow = keyof VuiTheme['gridTemplateRows']; type Radius = keyof VuiTheme['radii']; type RingWidth = keyof VuiTheme['ringWidths']; type Screen = keyof VuiTheme['screens']; type Shadow = keyof VuiTheme['shadows']; type Size = keyof VuiTheme['sizes']; type Space = keyof VuiTheme['spaces']; type Transform = keyof VuiTheme['transforms']; type TransitionDuration = keyof VuiTheme['durations']; type ZIndex = keyof VuiTheme['zIndices']; type VuiThemeDefaults = typeof defaultTheme; /** Can be extended to add new properties to the theme or override default ones */ type VuiThemeExtensions = object; /** Defines variant, size and intent types of each component connected to the theme. */ type ThemingProps<ThemeComponent extends string = string> = { intent?: string; variant?: ThemeComponent extends Component ? VuiTheme['components'][ThemeComponent] extends { variants: infer V; } ? keyof V : string : string; size?: ThemeComponent extends keyof VuiTheme['components'] ? VuiTheme['components'][ThemeComponent] extends { sizes: infer S; } ? keyof S : string : string; }; /** VUI theme definition object, containing default values and extensions */ type VuiTheme = VuiThemeDefaults & VuiThemeExtensions; //#endregion export { Animation, Border, Color, Component, Elevation, Font, FontSize, FontWeight, GridTemplateColumn, GridTemplateRow, Radius, RingWidth, Screen, Shadow, Size, Space, ThemingProps, Transform, TransitionDuration, VuiTheme, VuiThemeDefaults, VuiThemeExtensions, ZIndex }; //# sourceMappingURL=types.d.ts.map