@aic-kits/react 0.13.5 → 0.14.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.
@@ -0,0 +1,8 @@
1
+ import { GridProps, GridColumns } from './types';
2
+ export declare const StyledGrid: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('..').BoxProps & {
3
+ ref?: import('react').ForwardedRef<HTMLDivElement>;
4
+ }, GridProps & {
5
+ columnsContext: GridColumns;
6
+ }>> & string & Omit<(props: import('..').BoxProps & {
7
+ ref?: import('react').ForwardedRef<HTMLDivElement>;
8
+ }) => ReturnType<({ children, style, "data-testid": testId, ...otherProps }: import('..').BoxProps, ref: import('react').ForwardedRef<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element>, keyof import('react').Component<any, {}, any>>;
@@ -0,0 +1,6 @@
1
+ import { GridColumns } from './types';
2
+ interface GridContextProps {
3
+ columns: GridColumns;
4
+ }
5
+ export declare const GridContext: import('react').Context<GridContextProps>;
6
+ export {};
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { GridProps } from './types';
3
+ export declare const Grid: React.ForwardRefExoticComponent<GridProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,31 @@
1
+ import { ElementType, ReactNode } from 'react';
2
+ import { Space } from '../../theme';
3
+ import { BoxProps } from '../Box';
4
+ export type ResponsiveProp<T> = T | Partial<Record<BreakpointKey, T>>;
5
+ export declare const GRID_BREAKPOINTS: {
6
+ xs: number;
7
+ sm: number;
8
+ md: number;
9
+ lg: number;
10
+ xl: number;
11
+ };
12
+ export type BreakpointKey = keyof typeof GRID_BREAKPOINTS;
13
+ export type GridSizeValue = number | 'auto' | 'grow';
14
+ export type GridSize = GridSizeValue | Partial<Record<BreakpointKey, GridSizeValue>>;
15
+ export type GridOffsetValue = number | 'auto';
16
+ export type GridOffset = GridOffsetValue | Partial<Record<BreakpointKey, GridOffsetValue>>;
17
+ export type GridSpacingValue = Space | number;
18
+ export type GridSpacing = GridSpacingValue | Partial<Record<BreakpointKey, GridSpacingValue>>;
19
+ export type GridColumnsValue = number;
20
+ export type GridColumns = GridColumnsValue | Partial<Record<BreakpointKey, GridColumnsValue>>;
21
+ export interface GridProps extends Omit<BoxProps, 'offset'> {
22
+ children?: ReactNode;
23
+ container?: boolean;
24
+ spacing?: GridSpacing;
25
+ rowSpacing?: GridSpacing;
26
+ columnSpacing?: GridSpacing;
27
+ columns?: GridColumns;
28
+ size?: GridSize;
29
+ offset?: GridOffset;
30
+ as?: ElementType;
31
+ }
@@ -0,0 +1,9 @@
1
+ import { Theme } from '../../theme';
2
+ import { GridSpacing, ResponsiveProp, GridSize, GridOffset, GridColumns } from './types';
3
+ export declare const resolveSpacing: (theme: Theme, value?: GridSpacing) => ResponsiveProp<string | number> | undefined;
4
+ export declare const generateItemStyles: ({ size, offset, columnsContext, }: {
5
+ theme: Theme;
6
+ size?: GridSize;
7
+ offset?: GridOffset;
8
+ columnsContext: GridColumns;
9
+ }) => import('styled-components').RuleSet<object>;
@@ -16,3 +16,4 @@ export * from './Accordion';
16
16
  export * from './Tag';
17
17
  export * from './Checkbox';
18
18
  export * from './Select';
19
+ export * from './Grid';