gantri-components 1.119.0 → 1.119.2
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/badge/badge.styles.d.ts +1 -1
- package/dist/components/color-picker/__tests__/color-picker.test.d.ts +1 -0
- package/dist/components/color-picker/color-picker.presets.d.ts +2 -2
- package/dist/components/color-picker/color-picker.types.d.ts +7 -8
- package/dist/components/color-picker/components/color-picker-item/__tests__/color-picker-item.test.d.ts +1 -0
- package/dist/components/color-picker/components/color-picker-item/color-picker-item.presets.d.ts +2 -0
- package/dist/components/color-picker/components/color-picker-item/color-picker-item.types.d.ts +7 -4
- package/dist/components/color-picker/components/color-picker-item/color-picker.styles.d.ts +3 -3
- package/dist/components/overlay/__tests__/overlay.test.d.ts +1 -0
- package/dist/components/overlay/overlay.types.d.ts +12 -1
- package/dist/components/typography/__tests__/typhography.test.d.ts +1 -0
- package/dist/components/typography/typography.d.ts +2 -9
- package/dist/components/typography/typography.presets.d.ts +2 -2
- package/dist/components/typography/typography.types.d.ts +9 -7
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
|
@@ -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" | "variant" | "minWidth" | "width" | "borderColor" | "opacity" | "size" | "textColor">, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const ColorPickerPresets:
|
|
1
|
+
import { ColorPickerDefaultProps } from './color-picker.types';
|
|
2
|
+
export declare const ColorPickerPresets: ColorPickerDefaultProps;
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { ChangeEvent } from 'react';
|
|
2
2
|
export declare type ColorPickerVariant = 'large' | 'small';
|
|
3
|
-
export interface ColorPickerProps {
|
|
4
|
-
allowMultipleSelection?: boolean;
|
|
5
|
-
/**
|
|
6
|
-
* List of colors to render,
|
|
7
|
-
* defaults to gantri's product colors list
|
|
8
|
-
* */
|
|
9
|
-
colors?: PickerColor[];
|
|
3
|
+
export interface ColorPickerProps extends Partial<ColorPickerDefaultProps> {
|
|
10
4
|
labelText?: string;
|
|
11
5
|
labelTx?: string;
|
|
12
6
|
labelTxValues?: Record<string, unknown>;
|
|
@@ -15,7 +9,12 @@ export interface ColorPickerProps {
|
|
|
15
9
|
onValueChange?: (selected: PickerColor | PickerColor[] | null) => void;
|
|
16
10
|
readOnly?: boolean;
|
|
17
11
|
value?: string | string[];
|
|
18
|
-
|
|
12
|
+
}
|
|
13
|
+
export interface ColorPickerDefaultProps {
|
|
14
|
+
allowMultipleSelection: boolean;
|
|
15
|
+
/** List of colors to render. Defaults to Gantri's product colors list. */
|
|
16
|
+
colors: PickerColor[];
|
|
17
|
+
variant: ColorPickerVariant;
|
|
19
18
|
}
|
|
20
19
|
export interface PickerColor {
|
|
21
20
|
code: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/components/color-picker/components/color-picker-item/color-picker-item.types.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CSSProperties } from 'styled-components';
|
|
2
2
|
import { ColorPickerVariant, PickerColor } from '../../color-picker.types';
|
|
3
|
-
export interface ColorPickerItemProps {
|
|
3
|
+
export interface ColorPickerItemProps extends Partial<ColorPickerItemDefaultProps> {
|
|
4
4
|
active?: boolean;
|
|
5
5
|
color: PickerColor;
|
|
6
6
|
onColorClick: (color: PickerColor) => void;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
/** Overrides `variant`. */
|
|
8
|
+
size?: CSSProperties['width'];
|
|
9
|
+
}
|
|
10
|
+
export interface ColorPickerItemDefaultProps {
|
|
11
|
+
variant: ColorPickerVariant;
|
|
9
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CSSProperties } from 'styled-components';
|
|
2
2
|
import { ColorPickerVariant } from '../../color-picker.types';
|
|
3
3
|
export declare const StyledColorOutline: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
4
4
|
$selected?: boolean | undefined;
|
|
5
|
-
$size?:
|
|
5
|
+
$size?: CSSProperties['width'];
|
|
6
6
|
$variant?: ColorPickerVariant | undefined;
|
|
7
7
|
}, never>;
|
|
8
8
|
export declare const StyledColor: import("styled-components").StyledComponent<import("react-spring").AnimatedComponent<"span">, import("styled-components").DefaultTheme, {
|
|
9
|
-
$size?:
|
|
9
|
+
$size?: CSSProperties['width'];
|
|
10
10
|
$variant?: ColorPickerVariant | undefined;
|
|
11
11
|
color: string;
|
|
12
12
|
}, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,19 +1,30 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
export interface OverlayProps {
|
|
3
|
+
/** Trigger event interactions with this component causes `content` to render, as appropriate. */
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
/** Applied as inline styles to the `children` wrapper. */
|
|
3
6
|
containerStyles?: CSSProperties;
|
|
7
|
+
/** The component to show/hide. */
|
|
4
8
|
content: ReactNode;
|
|
5
9
|
disabled?: boolean;
|
|
6
10
|
offsetBottom?: string;
|
|
7
11
|
offsetLeft?: string;
|
|
8
12
|
offsetRight?: string;
|
|
9
13
|
offsetTop?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Not called if `triggerEvent` is `'manual'`.
|
|
16
|
+
*
|
|
17
|
+
* If `triggerEvent` is `'hover'`, this can be called twice. Once for unhovering the child, and once for unhovering the content.
|
|
18
|
+
* */
|
|
10
19
|
onClose?: (opened: false) => void;
|
|
20
|
+
/** Not called if `triggerEvent` is `'manual'` */
|
|
11
21
|
onOpen?: (opened: true) => void;
|
|
22
|
+
/** Should be used when `triggerEvent` is `'manual'`. */
|
|
12
23
|
open?: boolean;
|
|
13
24
|
parentContainer?: HTMLElement;
|
|
14
25
|
position?: OverlayPosition;
|
|
15
26
|
prerenderContent?: boolean;
|
|
16
|
-
triggerEvent?: 'click' | 'hover' | '
|
|
27
|
+
triggerEvent?: 'click' | 'hover' | 'manual';
|
|
17
28
|
}
|
|
18
29
|
export interface UseOverlayParams {
|
|
19
30
|
content: ReactNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TypographyProps } from './typography.types';
|
|
3
|
-
export declare const variantToType:
|
|
4
|
-
readonly badge: "span";
|
|
5
|
-
readonly hero: "h1";
|
|
6
|
-
readonly p0: "p";
|
|
7
|
-
readonly p1: "p";
|
|
8
|
-
readonly p2: "p";
|
|
9
|
-
readonly p3: "p";
|
|
10
|
-
};
|
|
2
|
+
import { TextVariant, TypographyProps } from './typography.types';
|
|
3
|
+
export declare const variantToType: Partial<Record<TextVariant, 'h1' | 'p'>>;
|
|
11
4
|
export declare const Typography: React.ForwardRefExoticComponent<TypographyProps & React.RefAttributes<unknown>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const TypographyPresets:
|
|
1
|
+
import { TypographyDefaultProps } from './typography.types';
|
|
2
|
+
export declare const TypographyPresets: TypographyDefaultProps;
|
|
@@ -6,13 +6,11 @@ export declare type TextAlign = 'string' | 'left' | 'center' | 'right' | 'unset'
|
|
|
6
6
|
export declare type TypographyColor = keyof DefaultTheme['colors']['typography'];
|
|
7
7
|
export declare type TextVariant = 'p0' | 'p1' | 'p2' | 'p3' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'hero';
|
|
8
8
|
export declare type TextStyle = 'regular' | 'bold';
|
|
9
|
-
export interface TypographyProps {
|
|
9
|
+
export interface TypographyProps extends Partial<TypographyDefaultProps> {
|
|
10
10
|
align?: ResolutionAwareProp<string>;
|
|
11
11
|
alignSelf?: ResolutionAwareProp<Property.AlignSelf>;
|
|
12
12
|
className?: string;
|
|
13
|
-
color?: TypographyColor;
|
|
14
13
|
decoration?: Property.TextDecoration;
|
|
15
|
-
display?: ResolutionAwareProp<Property.Display>;
|
|
16
14
|
fontSize?: ResolutionAwareProp<Property.Font>;
|
|
17
15
|
fontWeight?: Property.FontWeight;
|
|
18
16
|
hidden?: ResolutionAwareProp<boolean>;
|
|
@@ -21,7 +19,6 @@ export interface TypographyProps {
|
|
|
21
19
|
htmlFor?: string;
|
|
22
20
|
htmlText?: string;
|
|
23
21
|
icon?: JSX.Element;
|
|
24
|
-
iconPosition?: 'left' | 'right';
|
|
25
22
|
justifySelf?: ResolutionAwareProp<Property.JustifySelf>;
|
|
26
23
|
letterSpacing?: ResolutionAwareProp<Property.LetterSpacing>;
|
|
27
24
|
lineHeight?: ResolutionAwareProp<Property.LineHeight>;
|
|
@@ -45,9 +42,14 @@ export interface TypographyProps {
|
|
|
45
42
|
transform?: Property.TextTransform;
|
|
46
43
|
tx?: string;
|
|
47
44
|
txValues?: Record<string, unknown>;
|
|
48
|
-
type?:
|
|
49
|
-
variant?: TextVariant;
|
|
45
|
+
type?: keyof HTMLElementTagNameMap;
|
|
50
46
|
verticalMargin?: ResolutionAwareProp<Property.Margin>;
|
|
51
47
|
verticalPadding?: ResolutionAwareProp<Property.Padding>;
|
|
52
|
-
|
|
48
|
+
}
|
|
49
|
+
export interface TypographyDefaultProps {
|
|
50
|
+
color: TypographyColor;
|
|
51
|
+
display: ResolutionAwareProp<Property.Display>;
|
|
52
|
+
iconPosition: 'left' | 'right';
|
|
53
|
+
variant: TextVariant;
|
|
54
|
+
whiteSpace: ResolutionAwareProp<any>;
|
|
53
55
|
}
|