@teamturing/react-kit 2.8.1 → 2.10.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.
@@ -1,6 +1,6 @@
1
- import { GridView as GridViewType } from '../../types';
1
+ import { GridViewType } from '../../types';
2
2
  type Props = {
3
3
  view: GridViewType;
4
4
  };
5
- declare const GridView: ({ view: { units, gridProps } }: Props) => import("react/jsx-runtime").JSX.Element;
5
+ declare const GridView: ({ view: { units, gridProps, spaceProps } }: Props) => import("react/jsx-runtime").JSX.Element;
6
6
  export default GridView;
@@ -1,6 +1,6 @@
1
- import { IconView as IconViewType } from '../../types';
1
+ import { IconViewType } from '../../types';
2
2
  type Props = {
3
3
  view: IconViewType;
4
4
  };
5
- declare const IconView: ({ view: { icon, iconProps } }: Props) => import("react/jsx-runtime").JSX.Element;
5
+ declare const IconView: ({ view: { icon, iconProps, spaceProps } }: Props) => import("react/jsx-runtime").JSX.Element;
6
6
  export default IconView;
@@ -1,6 +1,6 @@
1
- import { ImageView as ImageViewType } from '../../types';
1
+ import { ImageViewType } from '../../types';
2
2
  type Props = {
3
3
  view: ImageViewType;
4
4
  };
5
- declare const ImageView: ({ view: { imageProps, ...props } }: Props) => import("react/jsx-runtime").JSX.Element;
5
+ declare const ImageView: ({ view: { spaceProps, ...props } }: Props) => import("react/jsx-runtime").JSX.Element;
6
6
  export default ImageView;
@@ -1,6 +1,6 @@
1
- import { TextView as TextViewType } from '../../types';
1
+ import { TextViewType } from '../../types';
2
2
  type Props = {
3
3
  view: TextViewType;
4
4
  };
5
- declare const TextView: ({ view: { text, textProps } }: Props) => import("react/jsx-runtime").JSX.Element;
5
+ declare const TextView: ({ view: { text, textProps, spaceProps } }: Props) => import("react/jsx-runtime").JSX.Element;
6
6
  export default TextView;
@@ -3,72 +3,72 @@ import { ChipProps, StackProps, TextProps, SpaceProps, GridProps, GridUnitProps,
3
3
  /**
4
4
  * View Related Model
5
5
  */
6
- export type TextView = {
6
+ export type TextViewType = {
7
7
  text: string;
8
- textProps?: TextProps;
8
+ textProps?: {} & Pick<TextProps, 'typography' | 'textAlign' | 'color'>;
9
+ spaceProps?: Omit<SpaceProps, 'sx'>;
9
10
  };
10
- export type ImageView = {
11
+ export type ImageViewType = {
11
12
  src: ImageProps['src'];
12
13
  alt: ImageProps['alt'];
13
14
  width: ImageProps['width'];
14
15
  height: ImageProps['height'];
15
- imageProps: Omit<ImageProps, 'src' | 'alt' | 'width' | 'height'>;
16
+ spaceProps?: Omit<SpaceProps, 'sx'>;
16
17
  };
17
- export type IconView = {
18
+ export type IconViewType = {
18
19
  icon: keyof typeof icons;
19
- iconProps: Omit<StyledIconProps, 'icon'>;
20
+ iconProps?: {} & Pick<StyledIconProps, 'size' | 'color'>;
21
+ spaceProps?: Omit<SpaceProps, 'sx'>;
20
22
  };
21
- export type ChipGroupView = {
23
+ export type ChipGroupViewType = {
22
24
  chips: Array<{
23
25
  text: string;
24
26
  variant: ChipProps['variant'];
25
27
  }>;
26
- chipGroupProps: {
27
- size: ChipProps['size'];
28
- gapX: StackProps['gapX'];
29
- gapY: StackProps['gapY'];
30
- };
28
+ chipGroupProps?: {} & Pick<ChipProps, 'size'> & Pick<StackProps, 'gapX' | 'gapY'>;
29
+ spaceProps?: Omit<SpaceProps, 'sx'>;
31
30
  };
32
- export type GridView = {
31
+ export type GridViewType = {
33
32
  units: Array<{
34
- views: IViewContainer[];
35
- unitProps: Omit<GridUnitProps, 'sx'>;
33
+ views: ViewContainerType[];
34
+ unitProps: Pick<GridUnitProps, 'size' | 'order'>;
36
35
  }>;
37
- gridProps: Omit<GridProps, 'sx' | 'as'>;
36
+ gridProps?: Pick<GridProps, 'gapX' | 'gapY' | 'alignItems' | 'justifyContent' | 'wrap'>;
37
+ spaceProps?: Omit<SpaceProps, 'sx'>;
38
38
  };
39
- export type View = TextView | ImageView | IconView | ChipGroupView | GridView;
39
+ export type ViewType = TextViewType | ImageViewType | IconViewType | ChipGroupViewType | GridViewType;
40
40
  export type ViewComponentType = 'TextView' | 'ImageView' | 'IconView' | 'ChipGroupView' | 'GridView';
41
- export interface IViewContainer {
41
+ export interface ViewContainerType {
42
42
  id: string;
43
43
  viewComponentType: ViewComponentType;
44
- view: View;
44
+ view: ViewType;
45
45
  }
46
46
  /**
47
47
  * Layout Related Model
48
48
  */
49
- export interface IViewContainerDetail {
49
+ export interface ViewContainerDetailType {
50
50
  viewContainerId: string;
51
- spaceProps: SpaceProps;
51
+ spaceProps?: Omit<SpaceProps, 'sx'>;
52
52
  }
53
- export type SingleColumnLayout = {
54
- main: IViewContainerDetail[];
53
+ export type SingleColumnLayoutType = {
54
+ main: ViewContainerDetailType[];
55
55
  };
56
- export type Layout = SingleColumnLayout;
56
+ export type LayoutType = SingleColumnLayoutType;
57
57
  export type LayoutComponentType = 'SingleColumnLayout';
58
- export interface ILayoutContainer {
58
+ export interface LayoutContainerType {
59
59
  layoutComponentType: LayoutComponentType;
60
- layout: Layout;
60
+ layout: LayoutType;
61
61
  }
62
- export interface IResponsiveLayoutContainer {
63
- mobile: ILayoutContainer;
64
- tablet?: ILayoutContainer;
65
- desktop?: ILayoutContainer;
62
+ export interface ResponsiveLayoutContainerType {
63
+ mobile: LayoutContainerType;
64
+ tablet?: LayoutContainerType;
65
+ desktop?: LayoutContainerType;
66
66
  }
67
67
  /**
68
68
  * Section Related Model
69
69
  */
70
- export interface ISection {
70
+ export interface EnigmaSectionType {
71
71
  id: string;
72
- views: IViewContainer[];
73
- responsiveLayout: IResponsiveLayoutContainer;
72
+ views: ViewContainerType[];
73
+ responsiveLayout: ResponsiveLayoutContainerType;
74
74
  }
package/dist/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  /**
2
2
  * core components
3
3
  */
4
+ export { default as Breadcrumbs } from './core/Breadcrumbs';
5
+ export type { BreadcrumbsProps } from './core/Breadcrumbs';
4
6
  export { default as Button } from './core/Button';
5
7
  export type { ButtonProps } from './core/Button';
6
8
  export { default as Chip } from './core/Chip';