import { E as EmotionCache, I as Interpolation, C as CSSInterpolation, S as SerializedStyles, K as Keyframes, a as ComponentSelector, T as Typography, b as Color, B as Background, c as ThemeVars, d as StorybookTheme } from './create-8dd9d29b.js'; export { A as Animation, l as Brand, e as CSSObject, j as Easing, k as TextSize, i as ThemeVarsColors, h as ThemeVarsPartial, g as background, f as color, n as create, m as themes, t as typography } from './create-8dd9d29b.js'; import * as React$1 from 'react'; import { Provider, ReactElement, createElement, ReactNode } from 'react'; // Definitions by: Junyoung Clare Jang // TypeScript Version: 2.2 interface StylisElement { type: string value: string props: Array | string root: StylisElement | null parent: StylisElement | null children: Array | string line: number column: number length: number return: string } type StylisPluginCallback = ( element: StylisElement, index: number, children: Array, callback: StylisPluginCallback ) => string | void type StylisPlugin = ( element: StylisElement, index: number, children: Array, callback: StylisPluginCallback ) => string | void interface Options { nonce?: string stylisPlugins?: Array key: string container?: Node speedy?: boolean /** @deprecate use `insertionPoint` instead */ prepend?: boolean insertionPoint?: HTMLElement } declare function createCache(options: Options): EmotionCache type WithConditionalCSSProp

= 'className' extends keyof P ? string extends P['className' & keyof P] ? { css?: Interpolation } : {} : {} // unpack all here to avoid infinite self-referencing when defining our own JSX namespace type ReactJSXElement = JSX.Element type ReactJSXElementClass = JSX.ElementClass type ReactJSXElementAttributesProperty = JSX.ElementAttributesProperty type ReactJSXElementChildrenAttribute = JSX.ElementChildrenAttribute type ReactJSXLibraryManagedAttributes = JSX.LibraryManagedAttributes type ReactJSXIntrinsicAttributes = JSX.IntrinsicAttributes type ReactJSXIntrinsicClassAttributes = JSX.IntrinsicClassAttributes type ReactJSXIntrinsicElements = JSX.IntrinsicElements // based on the code from @types/react@18.2.8 // https://github.com/DefinitelyTyped/DefinitelyTyped/blob/3197efc097d522c4bf02b94e1a0766d007d6cdeb/types/react/index.d.ts#LL3204C13-L3204C13 type ReactJSXElementType = string | React.JSXElementConstructor declare namespace EmotionJSX { type ElementType = ReactJSXElementType interface Element extends ReactJSXElement {} interface ElementClass extends ReactJSXElementClass {} interface ElementAttributesProperty extends ReactJSXElementAttributesProperty {} interface ElementChildrenAttribute extends ReactJSXElementChildrenAttribute {} type LibraryManagedAttributes = WithConditionalCSSProp

& ReactJSXLibraryManagedAttributes interface IntrinsicAttributes extends ReactJSXIntrinsicAttributes {} interface IntrinsicClassAttributes extends ReactJSXIntrinsicClassAttributes {} type IntrinsicElements = { [K in keyof ReactJSXIntrinsicElements]: ReactJSXIntrinsicElements[K] & { css?: Interpolation } } } /** * @desc Utility type for getting props type of React component. * It takes `defaultProps` into an account - making props with defaults optional. */ type PropsOf< C extends keyof JSX.IntrinsicElements | React$1.JSXElementConstructor > = JSX.LibraryManagedAttributes> // We need to use this version of Omit as it's distributive (Will preserve unions) type DistributiveOmit = T extends any ? Pick> : never // Definitions by: Junyoung Clare Jang // TypeScript Version: 3.1 interface ThemeProviderProps { theme: Partial | ((outerTheme: Theme) => Theme) children: React$1.ReactNode } declare function useTheme(): Theme interface ThemeProvider { (props: ThemeProviderProps): React$1.ReactElement } declare const ThemeProvider: ThemeProvider type withTheme = < C extends React$1.ComponentType> >( component: C ) => React$1.FC, 'theme'> & { theme?: Theme }> declare const withTheme: withTheme // Definitions by: Junyoung Clare Jang // TypeScript Version: 3.4 // tslint:disable-next-line: no-empty-interface interface Theme {} declare const CacheProvider: Provider declare function css( template: TemplateStringsArray, ...args: Array ): SerializedStyles declare function css(...args: Array): SerializedStyles interface GlobalProps { styles: Interpolation } /** * @desc * JSX generic are supported only after TS@2.9 */ declare function Global(props: GlobalProps): ReactElement declare function keyframes( template: TemplateStringsArray, ...args: Array ): Keyframes declare function keyframes(...args: Array): Keyframes interface ArrayClassNamesArg extends Array {} type ClassNamesArg = | undefined | null | string | boolean | { [className: string]: boolean | null | undefined } | ArrayClassNamesArg interface ClassNamesContent { css(template: TemplateStringsArray, ...args: Array): string css(...args: Array): string cx(...args: Array): string theme: Theme } interface ClassNamesProps { children(content: ClassNamesContent): ReactNode } /** * @desc * JSX generic are supported only after TS@2.9 */ declare function ClassNames(props: ClassNamesProps): ReactElement declare const jsx: typeof createElement declare namespace jsx { namespace JSX { type ElementType = EmotionJSX.ElementType interface Element extends EmotionJSX.Element {} interface ElementClass extends EmotionJSX.ElementClass {} interface ElementAttributesProperty extends EmotionJSX.ElementAttributesProperty {} interface ElementChildrenAttribute extends EmotionJSX.ElementChildrenAttribute {} type LibraryManagedAttributes = EmotionJSX.LibraryManagedAttributes< C, P > interface IntrinsicAttributes extends EmotionJSX.IntrinsicAttributes {} interface IntrinsicClassAttributes extends EmotionJSX.IntrinsicClassAttributes {} type IntrinsicElements = EmotionJSX.IntrinsicElements } } // Definitions by: Junyoung Clare Jang // TypeScript Version: 3.2 /** Same as StyledOptions but shouldForwardProp must be a type guard */ interface FilteringStyledOptions< Props = Record, ForwardedProps extends keyof Props & string = keyof Props & string > { label?: string shouldForwardProp?: (propName: string) => propName is ForwardedProps target?: string } interface StyledOptions> { label?: string shouldForwardProp?: (propName: string) => boolean target?: string } /** * @typeparam ComponentProps Props which will be included when withComponent is called * @typeparam SpecificComponentProps Props which will *not* be included when withComponent is called */ interface StyledComponent< ComponentProps extends {}, SpecificComponentProps extends {} = {}, JSXProps extends {} = {} > extends React$1.FC, ComponentSelector { withComponent>>( component: C ): StyledComponent< ComponentProps & PropsOf, {}, { ref?: React$1.Ref> } > withComponent>>( component: C ): StyledComponent> withComponent( tag: Tag ): StyledComponent } /** * @typeparam ComponentProps Props which will be included when withComponent is called * @typeparam SpecificComponentProps Props which will *not* be included when withComponent is called */ interface CreateStyledComponent< ComponentProps extends {}, SpecificComponentProps extends {} = {}, JSXProps extends {} = {} > { /** * @typeparam AdditionalProps Additional props to add to your styled component */ ( ...styles: Array< Interpolation< ComponentProps & SpecificComponentProps & AdditionalProps & { theme: Theme } > > ): StyledComponent< ComponentProps & AdditionalProps, SpecificComponentProps, JSXProps > ( template: TemplateStringsArray, ...styles: Array< Interpolation > ): StyledComponent /** * @typeparam AdditionalProps Additional props to add to your styled component */ ( template: TemplateStringsArray, ...styles: Array< Interpolation< ComponentProps & SpecificComponentProps & AdditionalProps & { theme: Theme } > > ): StyledComponent< ComponentProps & AdditionalProps, SpecificComponentProps, JSXProps > } /** * @desc * This function accepts a React component or tag ('div', 'a' etc). * * @example styled(MyComponent)({ width: 100 }) * @example styled(MyComponent)(myComponentProps => ({ width: myComponentProps.width }) * @example styled('div')({ width: 100 }) * @example styled('div')(props => ({ width: props.width }) */ interface CreateStyled$1 { < C extends React$1.ComponentClass>, ForwardedProps extends keyof React$1.ComponentProps & string = keyof React$1.ComponentProps & string >( component: C, options: FilteringStyledOptions, ForwardedProps> ): CreateStyledComponent< Pick, ForwardedProps> & { theme?: Theme }, {}, { ref?: React$1.Ref> } > >>( component: C, options?: StyledOptions> ): CreateStyledComponent< PropsOf & { theme?: Theme }, {}, { ref?: React$1.Ref> } > < C extends React$1.ComponentType>, ForwardedProps extends keyof React$1.ComponentProps & string = keyof React$1.ComponentProps & string >( component: C, options: FilteringStyledOptions, ForwardedProps> ): CreateStyledComponent< Pick, ForwardedProps> & { theme?: Theme } > >>( component: C, options?: StyledOptions> ): CreateStyledComponent< PropsOf & { theme?: Theme } > < Tag extends keyof JSX.IntrinsicElements, ForwardedProps extends keyof JSX.IntrinsicElements[Tag] & string = keyof JSX.IntrinsicElements[Tag] & string >( tag: Tag, options: FilteringStyledOptions ): CreateStyledComponent< { theme?: Theme; as?: React$1.ElementType }, Pick > ( tag: Tag, options?: StyledOptions ): CreateStyledComponent< { theme?: Theme; as?: React$1.ElementType }, JSX.IntrinsicElements[Tag] > } // Definitions by: Junyoung Clare Jang // TypeScript Version: 3.2 type StyledTags = { [Tag in keyof JSX.IntrinsicElements]: CreateStyledComponent< { theme?: Theme as?: React.ElementType }, JSX.IntrinsicElements[Tag] > } interface CreateStyled extends CreateStyled$1, StyledTags {} declare const styled: CreateStyled // Definitions by: Junyoung Clare Jang // TypeScript Version: 2.1 declare function isPropValid(prop: string): boolean type Value = string | number; interface Return { [key: string]: { [key: string]: Value; }; } declare const createReset: ({ typography }: { typography: Typography; }) => Return; declare const createGlobal: ({ color, background, typography, }: { color: Color; background: Background; typography: Typography; }) => Return; declare const convert: (inherit?: ThemeVars) => StorybookTheme; declare const ensure: (input: ThemeVars) => StorybookTheme; declare const lightenColor: (color: string) => string; declare const darkenColor: (color: string) => string; declare const ignoreSsrWarning = "/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */"; export { Background, CacheProvider, ClassNames, Color, Global, Keyframes, StorybookTheme, StyledComponent, ThemeProvider, ThemeVars, Typography, convert, createCache, createGlobal, createReset, css, darkenColor as darken, ensure, ignoreSsrWarning, isPropValid, jsx, keyframes, lightenColor as lighten, styled, useTheme, withTheme }; interface Theme extends StorybookTheme {} export type { Theme };