@cube-dev/ui-kit 0.4.0 → 0.4.4

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.
@@ -1,7 +1,6 @@
1
- import { PropsWithChildren } from 'react';
1
+ import { ForwardedRef, PropsWithChildren } from 'react';
2
2
  import { ResponsiveStyleValue } from './utils/styles';
3
3
  import { Props } from './components/types';
4
- export declare const UIKitContext: import("react").Context<ProviderProps>;
5
4
  export interface ProviderProps extends Props {
6
5
  breakpoints?: number[];
7
6
  insideForm?: boolean;
@@ -16,6 +15,10 @@ export interface ProviderProps extends Props {
16
15
  } | Function;
17
16
  };
18
17
  ref?: JSX.Element;
18
+ root?: ForwardedRef<any>;
19
19
  }
20
+ export interface ProviderInsideProps extends Omit<ProviderProps, 'styles' | 'breakpoints'> {
21
+ }
22
+ export declare const UIKitContext: import("react").Context<ProviderInsideProps>;
20
23
  export declare function Provider(allProps: PropsWithChildren<ProviderProps>): JSX.Element;
21
- export declare function useProviderProps<T = Props>(props: T): T;
24
+ export declare function useProviderProps<T extends Props = Props>(props: T): T;
@@ -5,4 +5,4 @@ import { Styles } from '../styles/types';
5
5
  * @param responsive - A list of responsive zones
6
6
  * @return {string}
7
7
  */
8
- export declare function renderStyles(styles: Styles, responsive: number[]): string;
8
+ export declare function renderStyles(styles: Styles, responsive: number[]): any;
@@ -48,8 +48,6 @@ export declare type StyleStateMapList = StyleStateMap[];
48
48
  export declare type StyleStateListMap = {
49
49
  [key: string]: StyleStateList;
50
50
  };
51
- export declare const NO_VALUES: (string | boolean)[];
52
- export declare const YES_VALUES: (string | boolean)[];
53
51
  export declare const CUSTOM_UNITS: {
54
52
  r: string;
55
53
  bw: string;
@@ -106,18 +104,6 @@ export declare function hexToRgb(hex: any): string | null;
106
104
  export declare function transferMods(mods: any, from: any, to: any): void;
107
105
  export declare function filterMods(mods: any, allowedMods: any): any;
108
106
  export declare function customUnit(value: any, unit: any): any;
109
- /**
110
- * Check for "no" value.
111
- * @param {string} value - original attribute value.
112
- * @return {boolean}
113
- */
114
- export declare function isNoValue(value: any): boolean;
115
- /**
116
- * Check for "yes" value.
117
- * @param {string} value - original attribute value.
118
- * @return {boolean}
119
- */
120
- export declare function isYesValue(value: any): boolean;
121
107
  export declare function extendStyles(defaultStyles: any, newStyles: any): {};
122
108
  /**
123
109
  * Split properties into style and non-style properties.
@@ -209,9 +195,3 @@ export declare function computeState(computeModel: ComputeModel, valueMap: (numb
209
195
  [key: string]: boolean;
210
196
  } | Function): any;
211
197
  export declare function cacheWrapper(handler: Function, limit?: number): (arg: any) => any;
212
- /**
213
- * Check for "no" value in modifiers.
214
- * @param mods {Array<String>} - original attribute value.
215
- * @return {boolean}
216
- */
217
- export declare function hasNegativeMod(mods: any): boolean;
@@ -10,4 +10,4 @@ export interface CubeRootProps extends BaseProps {
10
10
  font?: string;
11
11
  monospaceFont?: string;
12
12
  }
13
- export declare const Root: import("react").ForwardRefExoticComponent<CubeRootProps & import("react").RefAttributes<unknown>>;
13
+ export declare const Root: (allProps: CubeRootProps) => JSX.Element;
@@ -2,6 +2,6 @@
2
2
  import THEMES from '../../../data/themes';
3
3
  import { BaseProps, ContainerStyleProps } from '../../types';
4
4
  export interface CubeBadgeProps extends BaseProps, ContainerStyleProps {
5
- type?: keyof typeof THEMES;
5
+ type?: keyof typeof THEMES | string;
6
6
  }
7
7
  export declare const Badge: import("react").ForwardRefExoticComponent<CubeBadgeProps & import("react").RefAttributes<unknown>>;
@@ -2,7 +2,7 @@
2
2
  import { Styles } from '../../../styles/types';
3
3
  import { BaseProps, ContainerStyleProps } from '../../types';
4
4
  export interface CubePlaceholderProps extends BaseProps, ContainerStyleProps {
5
- size?: Styles['size'];
5
+ size?: Styles['fontSize'];
6
6
  circle?: boolean;
7
7
  }
8
8
  export declare const Placeholder: import("react").ForwardRefExoticComponent<CubePlaceholderProps & import("react").RefAttributes<unknown>>;
@@ -2,7 +2,7 @@
2
2
  import THEMES from '../../../data/themes';
3
3
  import { BaseProps, ContainerStyleProps } from '../../types';
4
4
  export interface CubeTagProps extends BaseProps, ContainerStyleProps {
5
- type?: keyof typeof THEMES;
5
+ type?: keyof typeof THEMES | string;
6
6
  isClosable?: boolean;
7
7
  onClose?: () => void;
8
8
  }
@@ -36,7 +36,7 @@ export interface BasePropsWithoutChildren extends Pick<AllHTMLAttributes<HTMLEle
36
36
  }
37
37
  export interface BaseProps extends BasePropsWithoutChildren, Pick<AllHTMLAttributes<HTMLElementTagNameMap['div']>, 'children'> {
38
38
  }
39
- export interface AllBaseProps<K extends keyof HTMLElementTagNameMap = 'div'> extends BaseProps, Omit<AllHTMLAttributes<HTMLElementTagNameMap[K]>, 'style'> {
39
+ export interface AllBaseProps<K extends keyof HTMLElementTagNameMap = 'div'> extends BaseProps, Omit<AllHTMLAttributes<HTMLElementTagNameMap[K]>, 'style' | 'size'> {
40
40
  as?: string;
41
41
  }
42
42
  export declare type BaseStyleProps = Pick<Styles, typeof BASE_STYLES[number]>;
@@ -76,6 +76,7 @@ declare const PROPS: {
76
76
  'h5m-font-weight': string;
77
77
  'h6-font-size': string;
78
78
  'h6-line-height': string;
79
+ 'h6-font-weight': string;
79
80
  't1-font-size': string;
80
81
  't1-line-height': string;
81
82
  't1-letter-spacing': string;