@cube-dev/ui-kit 0.1.5 → 0.2.0

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/README.md CHANGED
@@ -14,7 +14,9 @@ You will also see any lint errors in the console.
14
14
 
15
15
  Run storybook with all the components of UI Kit.
16
16
 
17
- ### yarn run build
17
+ Deployed version of the Storybook from the `main` branch is here: https://cube-uikit-storybook.netlify.app/
18
+
19
+ ### yarn build
18
20
 
19
21
  Builds a static copy of UIKit to the `dist/` folder.
20
22
  Your app is ready to be deployed!
@@ -1,7 +1,7 @@
1
1
  import { MouseEventHandler } from 'react';
2
- import { BaseProps, ContainerStyleProps, TagNameProps, TextStyleProps } from '../types';
2
+ import { BaseProps, BaseStyleProps, ContainerStyleProps, TagNameProps, TextStyleProps } from '../types';
3
3
  import { AriaButtonProps } from '@react-types/button';
4
- export interface CubeActionProps extends BaseProps, TagNameProps, ContainerStyleProps, TextStyleProps, Omit<AriaButtonProps, 'type'> {
4
+ export interface CubeActionProps extends BaseProps, TagNameProps, BaseStyleProps, ContainerStyleProps, TextStyleProps, Omit<AriaButtonProps, 'type'> {
5
5
  to?: string;
6
6
  label?: string;
7
7
  skipWarnings?: boolean;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import THEMES from '../../../data/themes';
3
+ import { BaseProps, ContainerStyleProps } from '../../types';
4
+ export interface CubeTagProps extends BaseProps, ContainerStyleProps {
5
+ type?: keyof typeof THEMES;
6
+ isClosable?: boolean;
7
+ onClose?: () => void;
8
+ }
9
+ declare const _Tag: import("react").ForwardRefExoticComponent<CubeTagProps & import("react").RefAttributes<unknown>>;
10
+ export { _Tag as Tag };
@@ -18,7 +18,7 @@ export interface CubeTextProps extends BaseProps, TagNameProps, TextStyleProps,
18
18
  * Whether the text has italic style
19
19
  */
20
20
  italic?: ResponsiveStyleValue<CSSProperties['fontStyle']>;
21
- weight?: ResponsiveStyleValue<CSSProperties['fontWeight']>;
21
+ weight?: string | number;
22
22
  align?: ResponsiveStyleValue<CSSProperties['textAlign']>;
23
23
  transform?: ResponsiveStyleValue<CSSProperties['textTransform']>;
24
24
  }
@@ -1,12 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import { CubeTextProps } from './Text';
3
- import { ResponsiveStyleValue } from '../../utils/styles';
4
- import { BlockStyleProps, PositionStyleProps, TagNameProps } from '../types';
5
- export interface CubeTitleProps extends CubeTextProps, TagNameProps, BlockStyleProps, PositionStyleProps {
3
+ import { BaseProps, BlockStyleProps, PositionStyleProps, TagNameProps } from '../types';
4
+ export interface CubeTitleProps extends BaseProps, CubeTextProps, TagNameProps, BlockStyleProps, PositionStyleProps {
6
5
  /** The level of the heading **/
7
6
  level?: 1 | 2 | 3 | 4 | 5 | 6;
8
- /** The size style for the heading **/
9
- size?: ResponsiveStyleValue<'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | string>;
10
7
  }
11
8
  declare const Title: import("react").ForwardRefExoticComponent<CubeTitleProps & import("react").RefAttributes<unknown>> & {
12
9
  Danger: import("react").ForwardRefExoticComponent<CubeTitleProps & import("react").RefAttributes<unknown>>;
@@ -1,4 +1,4 @@
1
- import { AllHTMLAttributes, CSSProperties, JSXElementConstructor, ReactElement, ReactNodeArray, ReactPortal } from 'react';
1
+ import { AllHTMLAttributes, CSSProperties } from 'react';
2
2
  import { Styles } from '../styles/types';
3
3
  import { BASE_STYLES, BLOCK_STYLES, COLOR_STYLES, CONTAINER_STYLES, DIMENSION_STYLES, FLOW_STYLES, OUTER_STYLES, POSITION_STYLES, TEXT_STYLES } from '../styles/list';
4
4
  export interface BasePropsWithoutChildren extends Pick<AllHTMLAttributes<HTMLElement>, 'className' | 'role' | 'id'> {
@@ -34,11 +34,10 @@ export interface BasePropsWithoutChildren extends Pick<AllHTMLAttributes<HTMLEle
34
34
  [key: string]: string | number | null;
35
35
  });
36
36
  }
37
- export interface BaseProps extends BasePropsWithoutChildren {
38
- children?: ReactElement<any, string | JSXElementConstructor<any>> | string | number | {} | ReactNodeArray | ReactPortal | boolean | null | undefined;
37
+ export interface BaseProps extends BasePropsWithoutChildren, Pick<AllHTMLAttributes<HTMLElementTagNameMap['div']>, 'children'> {
39
38
  }
40
39
  export interface AllBaseProps<K extends keyof HTMLElementTagNameMap = 'div'> extends BaseProps, Omit<AllHTMLAttributes<HTMLElementTagNameMap[K]>, 'style'> {
41
- as?: K;
40
+ as?: string;
42
41
  }
43
42
  export declare type BaseStyleProps = Pick<Styles, typeof BASE_STYLES[number]>;
44
43
  export declare type PositionStyleProps = Pick<Styles, typeof POSITION_STYLES[number]>;
@@ -17,6 +17,7 @@ declare const PROPS: {
17
17
  'minor-color': string;
18
18
  'success-bg-color': string;
19
19
  'note-bg-color': string;
20
+ 'note-text-color': string;
20
21
  'danger-bg-color': string;
21
22
  'danger-bg-hover-color': string;
22
23
  'primary-1': string;
@@ -64,15 +65,76 @@ declare const PROPS: {
64
65
  'h1-font-size': string;
65
66
  'h1-line-height': string;
66
67
  'h1-letter-spacing': string;
68
+ 'h1-font-weight': string;
67
69
  'h2-font-size': string;
68
70
  'h2-line-height': string;
71
+ 'h2-letter-spacing': string;
72
+ 'h2-font-weight': string;
69
73
  'h3-font-size': string;
70
74
  'h3-line-height': string;
75
+ 'h3-letter-spacing': string;
76
+ 'h3-font-weight': string;
71
77
  'h4-font-size': string;
72
78
  'h4-line-height': string;
79
+ 'h4-letter-spacing': string;
80
+ 'h4-font-weight': string;
73
81
  'h5-font-size': string;
74
82
  'h5-line-height': string;
83
+ 'h5-letter-spacing': string;
84
+ 'h5-font-weight': string;
85
+ 'h5s-font-size': string;
86
+ 'h5s-line-height': string;
87
+ 'h5s-letter-spacing': string;
88
+ 'h5s-font-weight': string;
89
+ 'h5m-font-size': string;
90
+ 'h5m-line-height': string;
91
+ 'h5m-letter-spacing': string;
92
+ 'h5m-font-weight': string;
75
93
  'h6-font-size': string;
76
94
  'h6-line-height': string;
95
+ 't1-font-size': string;
96
+ 't1-line-height': string;
97
+ 't1-letter-spacing': string;
98
+ 't1-font-weight': string;
99
+ 't2-font-size': string;
100
+ 't2-line-height': string;
101
+ 't2-letter-spacing': string;
102
+ 't2-font-weight': string;
103
+ 't3-font-size': string;
104
+ 't3-line-height': string;
105
+ 't3-letter-spacing': string;
106
+ 't3-font-weight': string;
107
+ 't4-font-size': string;
108
+ 't4-line-height': string;
109
+ 't4-letter-spacing': string;
110
+ 't4-font-weight': string;
111
+ 't4m-font-size': string;
112
+ 't4m-line-height': string;
113
+ 't4m-letter-spacing': string;
114
+ 't4m-font-weight': string;
115
+ 'p1-font-size': string;
116
+ 'p1-line-height': string;
117
+ 'p1-letter-spacing': string;
118
+ 'p1-font-weight': string;
119
+ 'p2-font-size': string;
120
+ 'p2-line-height': string;
121
+ 'p2-letter-spacing': string;
122
+ 'p2-font-weight': string;
123
+ 'p3-font-size': string;
124
+ 'p3-line-height': string;
125
+ 'p3-letter-spacing': string;
126
+ 'p3-font-weight': string;
127
+ 'p4-font-size': string;
128
+ 'p4-line-height': string;
129
+ 'p4-letter-spacing': string;
130
+ 'p4-font-weight': string;
131
+ 'tag-font-size': string;
132
+ 'tag-line-height': string;
133
+ 'tag-letter-spacing': string;
134
+ 'tag-font-weight': string;
135
+ 'default-font-size': string;
136
+ 'default-line-height': string;
137
+ 'default-letter-spacing': string;
138
+ 'default-font-weight': string;
77
139
  };
78
140
  export default PROPS;
@@ -11,7 +11,7 @@ declare const _default: {
11
11
  };
12
12
  readonly note: {
13
13
  readonly fill: "#note-bg";
14
- readonly color: "#note";
14
+ readonly color: "#note-text";
15
15
  readonly border: "#note.40";
16
16
  };
17
17
  readonly disabled: {
@@ -64,6 +64,8 @@ export type { CubeSkeletonProps } from './components/content/Skeleton/Skeleton';
64
64
  export { CloudLogo } from './components/other/CloudLogo/CloudLogo';
65
65
  export { Badge } from './components/content/Badge/Badge';
66
66
  export type { CubeBadgeProps } from './components/content/Badge/Badge';
67
+ export { Tag } from './components/content/Tag/Tag';
68
+ export type { CubeTagProps } from './components/content/Tag/Tag';
67
69
  export { SearchInput } from './components/forms/SearchInput/SearchInput';
68
70
  export type { CubeSearchInputProps } from './components/forms/SearchInput/SearchInput';
69
71
  export { Submit } from './components/actions/Button/Submit';