gantri-components 2.33.0 → 2.34.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/dist/components/aspect-ratio/aspect-ratio.styles.d.ts +2 -1
- package/dist/components/badge/badge.styles.d.ts +1 -1
- package/dist/components/box/box.styles.d.ts +3 -1
- package/dist/components/box/box.types.d.ts +21 -4
- package/dist/components/button/button.styles.d.ts +2 -1
- package/dist/components/cell/cell.styles.d.ts +3 -1
- package/dist/components/grid/grid.styles.d.ts +3 -1
- package/dist/components/modal/modal.styles.d.ts +4 -2
- package/dist/global/constants.d.ts +92 -0
- package/dist/global/index.d.ts +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/styles/theme.d.ts +17 -1
- package/dist/types/resolution-aware-prop.type.d.ts +5 -1
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Property } from 'csstype';
|
|
2
2
|
import { ResolutionAwareProp } from '../../types/resolution-aware-prop.type';
|
|
3
3
|
import { AspectRatioProps } from './aspect-ratio.types';
|
|
4
|
+
import { PropsWithHidden } from '../box/box.types';
|
|
4
5
|
export declare const populateAspectRatioStyles: (aspectRatio: ResolutionAwareProp<string>, height?: ResolutionAwareProp<Property.Height>) => import("styled-components").FlattenSimpleInterpolation;
|
|
5
|
-
export declare const StyledAspectRatio: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Partial<AspectRatioProps
|
|
6
|
+
export declare const StyledAspectRatio: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Partial<PropsWithHidden<AspectRatioProps>>, never>;
|
|
6
7
|
export declare const StyledAspectRatioContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { BadgeProps } from './badge.types';
|
|
2
|
-
export declare const StyledBadge: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, Pick<BadgeProps, "color" | "
|
|
2
|
+
export declare const StyledBadge: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, Pick<BadgeProps, "color" | "minWidth" | "width" | "variant" | "opacity" | "size" | "borderColor" | "textColor">, never>;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import { BoxProps } from './box.types';
|
|
2
|
-
export declare const StyledBoxContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, BoxProps
|
|
2
|
+
export declare const StyledBoxContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, BoxProps & {
|
|
3
|
+
$hidden?: import("../../types/resolution-aware-prop.type").ResolutionAwareProp<boolean> | undefined;
|
|
4
|
+
}, never>;
|
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { ResolutionAwareProp } from '../../types/resolution-aware-prop.type';
|
|
2
|
+
import { Property } from 'csstype';
|
|
4
3
|
import { Color } from '../../styles';
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
import { ResolutionAwareProp } from '../../types/resolution-aware-prop.type';
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Use values from our 8 point grid instead
|
|
7
|
+
*/
|
|
8
|
+
type DeprecatedSize = 's1' | 's2' | 's3' | 's4' | 's5' | 's6';
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
export type BoxDimension = DeprecatedSize | '.5x' | 'x' | '2x' | '3x' | '4x' | '5x' | '6x' | '7x' | '8x' | '9x' | '10x' | '11x' | '12x' | '16x' | '24x' | 'unset' | null | `${number}px` | `${number}rem`;
|
|
13
|
+
type AllowedBoxDimension<T> = T extends BoxDimension ? T : never;
|
|
14
|
+
export interface ResolutionAwarePropBase<T> {
|
|
15
|
+
lg?: AllowedBoxDimension<T>;
|
|
16
|
+
md?: AllowedBoxDimension<T>;
|
|
17
|
+
sm?: AllowedBoxDimension<T>;
|
|
18
|
+
}
|
|
19
|
+
export interface BaseProps extends Omit<HTMLAttributes<any>, 'hidden'> {
|
|
7
20
|
children?: any;
|
|
8
21
|
className?: string;
|
|
9
22
|
}
|
|
@@ -36,3 +49,7 @@ export interface BoxProps extends BaseProps {
|
|
|
36
49
|
verticalPadding?: ResolutionAwareProp<BoxDimension>;
|
|
37
50
|
width?: ResolutionAwareProp<string>;
|
|
38
51
|
}
|
|
52
|
+
export type PropsWithHidden<T> = T & {
|
|
53
|
+
$hidden?: ResolutionAwareProp<boolean>;
|
|
54
|
+
};
|
|
55
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DefaultTheme } from 'styled-components';
|
|
2
2
|
import { ButtonProps } from './button.types';
|
|
3
|
-
|
|
3
|
+
import { PropsWithHidden } from '../box/box.types';
|
|
4
|
+
export declare const StyledButton: import("styled-components").StyledComponent<"button", DefaultTheme, Partial<PropsWithHidden<ButtonProps>>, never>;
|
|
4
5
|
export declare const StyledButtonContent: import("styled-components").StyledComponent<"div", DefaultTheme, ButtonProps, never>;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import { CellProps } from './cell.types';
|
|
2
|
-
export declare const StyledCell: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, CellProps
|
|
2
|
+
export declare const StyledCell: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, CellProps & {
|
|
3
|
+
$hidden?: import("../../types/resolution-aware-prop.type").ResolutionAwareProp<boolean> | undefined;
|
|
4
|
+
}, never>;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import { GridProps } from './grid.types';
|
|
2
|
-
export declare const StyledGrid: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, GridProps
|
|
2
|
+
export declare const StyledGrid: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, GridProps & {
|
|
3
|
+
$hidden?: import("../../types/resolution-aware-prop.type").ResolutionAwareProp<boolean> | undefined;
|
|
4
|
+
}, never>;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { Property } from 'csstype';
|
|
2
3
|
import { ModalProps } from './modal.types';
|
|
4
|
+
import { ResolutionAwareProp } from '../../types/resolution-aware-prop.type';
|
|
3
5
|
export declare const StyledModal: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
6
|
export declare const StyledModalBody: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, ModalProps & {
|
|
5
7
|
isFullScreen?: boolean | undefined;
|
|
6
8
|
noTopSpacing?: boolean | undefined;
|
|
7
9
|
} & {
|
|
8
|
-
$height?: 0 | (string & {}) |
|
|
9
|
-
$width?: 0 | (string & {}) |
|
|
10
|
+
$height?: ResolutionAwareProp<Property.Height<0 | (string & {})>> | undefined;
|
|
11
|
+
$width?: ResolutionAwareProp<Property.Width<0 | (string & {})>> | undefined;
|
|
10
12
|
}, never>;
|
|
11
13
|
export declare const StyledModalContent: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../stack/stack.types").StackProps & import("react").RefAttributes<import("../stack/stack.types").StackProps>>, import("styled-components").DefaultTheme, {
|
|
12
14
|
isFullScreen?: boolean | undefined;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
export declare const storyBookSpacingArgType: {
|
|
2
|
+
control: {
|
|
3
|
+
type: string;
|
|
4
|
+
};
|
|
5
|
+
options: string[];
|
|
6
|
+
};
|
|
7
|
+
export declare const storyBookSpacingArgs: {
|
|
8
|
+
horizontalMargin: {
|
|
9
|
+
control: {
|
|
10
|
+
type: string;
|
|
11
|
+
};
|
|
12
|
+
options: string[];
|
|
13
|
+
};
|
|
14
|
+
horizontalPadding: {
|
|
15
|
+
control: {
|
|
16
|
+
type: string;
|
|
17
|
+
};
|
|
18
|
+
options: string[];
|
|
19
|
+
};
|
|
20
|
+
margin: {
|
|
21
|
+
control: {
|
|
22
|
+
type: string;
|
|
23
|
+
};
|
|
24
|
+
options: string[];
|
|
25
|
+
};
|
|
26
|
+
marginBottom: {
|
|
27
|
+
control: {
|
|
28
|
+
type: string;
|
|
29
|
+
};
|
|
30
|
+
options: string[];
|
|
31
|
+
};
|
|
32
|
+
marginLeft: {
|
|
33
|
+
control: {
|
|
34
|
+
type: string;
|
|
35
|
+
};
|
|
36
|
+
options: string[];
|
|
37
|
+
};
|
|
38
|
+
marginRight: {
|
|
39
|
+
control: {
|
|
40
|
+
type: string;
|
|
41
|
+
};
|
|
42
|
+
options: string[];
|
|
43
|
+
};
|
|
44
|
+
marginTop: {
|
|
45
|
+
control: {
|
|
46
|
+
type: string;
|
|
47
|
+
};
|
|
48
|
+
options: string[];
|
|
49
|
+
};
|
|
50
|
+
padding: {
|
|
51
|
+
control: {
|
|
52
|
+
type: string;
|
|
53
|
+
};
|
|
54
|
+
options: string[];
|
|
55
|
+
};
|
|
56
|
+
paddingBottom: {
|
|
57
|
+
control: {
|
|
58
|
+
type: string;
|
|
59
|
+
};
|
|
60
|
+
options: string[];
|
|
61
|
+
};
|
|
62
|
+
paddingLeft: {
|
|
63
|
+
control: {
|
|
64
|
+
type: string;
|
|
65
|
+
};
|
|
66
|
+
options: string[];
|
|
67
|
+
};
|
|
68
|
+
paddingRight: {
|
|
69
|
+
control: {
|
|
70
|
+
type: string;
|
|
71
|
+
};
|
|
72
|
+
options: string[];
|
|
73
|
+
};
|
|
74
|
+
paddingTop: {
|
|
75
|
+
control: {
|
|
76
|
+
type: string;
|
|
77
|
+
};
|
|
78
|
+
options: string[];
|
|
79
|
+
};
|
|
80
|
+
verticalMargin: {
|
|
81
|
+
control: {
|
|
82
|
+
type: string;
|
|
83
|
+
};
|
|
84
|
+
options: string[];
|
|
85
|
+
};
|
|
86
|
+
verticalPadding: {
|
|
87
|
+
control: {
|
|
88
|
+
type: string;
|
|
89
|
+
};
|
|
90
|
+
options: string[];
|
|
91
|
+
};
|
|
92
|
+
};
|
package/dist/global/index.d.ts
CHANGED