baseui 0.0.0-next-8b2a019 → 0.0.0-next-47bec88

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -5,53 +5,47 @@ import {
5
5
  WithStyleFn as StyletronWithStyleFn,
6
6
  StyledFn as StyletronStyledFn,
7
7
  } from 'styletron-react';
8
- import {Override, Overrides} from './overrides';
9
- import {Locale} from './locale';
10
- import {Theme, ThemePrimitives} from './theme';
8
+ import { Override, Overrides } from './overrides';
9
+ import { Locale } from './locale';
10
+ import { Theme, ThemePrimitives } from './theme';
11
11
 
12
12
  type UseStyletronFn<Theme> = () => [(arg: StyleObject) => string, Theme];
13
13
  export function createThemedUseStyletron<Theme>(): UseStyletronFn<Theme>;
14
14
  export const useStyletron: UseStyletronFn<Theme>;
15
- export function withWrapper<
16
- C extends StyletronComponent<any>,
17
- P extends object
18
- >(
15
+ export function withWrapper<C extends StyletronComponent<any>, P extends object>(
19
16
  component: C,
20
- wrapper: (component: C) => React.ComponentType<P>,
17
+ wrapper: (component: C) => React.ComponentType<P>
21
18
  ): StyletronComponent<React.ComponentProps<C> & P>;
22
19
 
23
20
  export function createTheme<P extends object>(
24
21
  primitives: Partial<ThemePrimitives>,
25
- overrides?: P,
22
+ overrides?: P
26
23
  ): Theme & P;
27
24
  export function createLightTheme<P extends object>(
28
25
  primitives: Partial<ThemePrimitives>,
29
- overrides?: P,
26
+ overrides?: P
30
27
  ): Theme & P;
31
28
  export function createDarkTheme<P extends object>(
32
29
  primitives: Partial<ThemePrimitives>,
33
- overrides?: P,
30
+ overrides?: P
34
31
  ): Theme & P;
35
- export function mergeOverrides<T>(
36
- target?: Overrides<T>,
37
- source?: Overrides<T>,
38
- ): Overrides<T>;
32
+ export function mergeOverrides<T>(target?: Overrides<T>, source?: Overrides<T>): Overrides<T>;
39
33
  export function styled<
40
34
  P extends object,
41
35
  C extends keyof JSX.IntrinsicElements | React.ComponentType<any>,
42
36
  T = Theme
43
37
  >(
44
38
  component: C,
45
- styledFn: StyleObject | ((props: {$theme: T} & P) => StyleObject),
39
+ styledFn: StyleObject | ((props: { $theme: T } & P) => StyleObject)
46
40
  ): StyletronComponent<
47
- Pick<
48
- React.ComponentProps<C>,
49
- Exclude<keyof React.ComponentProps<C>, {className: string}>
50
- > &
51
- P
41
+ Pick<React.ComponentProps<C>, Exclude<keyof React.ComponentProps<C>, { className: string }>> & P
52
42
  >;
43
+ export function withStyle<C extends StyletronComponent<any>, P extends object, T = Theme>(
44
+ component: C,
45
+ styledFn: StyleObject | ((props: { $theme: T } & P) => StyleObject)
46
+ ): StyletronComponent<React.ComponentProps<C> & P>;
53
47
 
54
- export {Theme} from 'baseui/theme';
48
+ export { Theme } from 'baseui/theme';
55
49
  export const LightTheme: Theme;
56
50
  export const LightThemeMove: Theme;
57
51
  export const lightThemePrimitives: ThemePrimitives;
@@ -85,18 +79,11 @@ export interface ThemeProviderProps {
85
79
  export const ThemeProvider: React.FC<ThemeProviderProps>;
86
80
 
87
81
  export interface StyledFn<T> extends StyletronStyledFn {
88
- <
89
- C extends keyof JSX.IntrinsicElements | React.ComponentType<any>,
90
- P extends object
91
- >(
82
+ <C extends keyof JSX.IntrinsicElements | React.ComponentType<any>, P extends object>(
92
83
  component: C,
93
- style: (props: {$theme: T} & P) => StyleObject,
84
+ style: (props: { $theme: T } & P) => StyleObject
94
85
  ): StyletronComponent<
95
- Pick<
96
- React.ComponentProps<C>,
97
- Exclude<keyof React.ComponentProps<C>, {className: string}>
98
- > &
99
- P
86
+ Pick<React.ComponentProps<C>, Exclude<keyof React.ComponentProps<C>, { className: string }>> & P
100
87
  >;
101
88
  }
102
89
 
@@ -105,10 +92,8 @@ export function createThemedStyled<Theme>(): StyledFn<Theme>;
105
92
  export interface WithStyleFn<T = Theme> extends StyletronWithStyleFn {
106
93
  <C extends StyletronComponent<any>, P extends object, T1 = T>(
107
94
  component: C,
108
- style: (props: P & {$theme: T1}) => StyleObject,
95
+ style: (props: P & { $theme: T1 }) => StyleObject
109
96
  ): StyletronComponent<React.ComponentProps<C> & P>;
110
97
  }
111
98
 
112
- export const withStyle: WithStyleFn;
113
-
114
99
  export function createThemedWithStyle<Theme>(): WithStyleFn<Theme>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "baseui",
3
- "version": "0.0.0-next-8b2a019",
3
+ "version": "0.0.0-next-47bec88",
4
4
  "description": "A React Component library implementing the Base design language",
5
5
  "keywords": [
6
6
  "react",
@@ -1,5 +1,5 @@
1
- import {StyletronComponent} from 'styletron-react';
2
- import {Sizing} from '../theme.ts';
1
+ import { StyletronComponent } from 'styletron-react';
2
+ import { Sizing } from '../theme.ts';
3
3
 
4
4
  export enum SIZE {
5
5
  small = 'small',
@@ -8,6 +8,7 @@ export enum SIZE {
8
8
  }
9
9
 
10
10
  export interface SpinnerProps {
11
+ [key: string]: any;
11
12
  $color?: string;
12
13
  $borderWidth?: number | string | SIZE | Sizing;
13
14
  $size?: number | string | SIZE | Sizing;