@aic-kits/react 0.14.5 → 0.15.1
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/Art/ImageArt.d.ts +1 -1
- package/dist/components/Art/types.d.ts +20 -0
- package/dist/components/Box/StyledBox.d.ts +4 -52
- package/dist/components/Box/types.d.ts +5 -3
- package/dist/components/Button/StyledButton.d.ts +3 -4
- package/dist/components/Button/types.d.ts +4 -4
- package/dist/components/Pagination/Pagination.d.ts +3 -0
- package/dist/components/Pagination/PaginationItem.d.ts +3 -0
- package/dist/components/Pagination/hooks.d.ts +19 -0
- package/dist/components/Pagination/index.d.ts +2 -0
- package/dist/components/Pagination/types.d.ts +113 -0
- package/dist/components/Progress/Progress.d.ts +31 -0
- package/dist/components/Progress/StyledProgress.d.ts +29 -0
- package/dist/components/Progress/index.d.ts +1 -0
- package/dist/components/Text/StyledText.d.ts +8 -7
- package/dist/components/Text/types.d.ts +9 -8
- package/dist/components/index.d.ts +2 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useResponsiveBreakpoint.d.ts +8 -0
- package/dist/index.cjs +164 -83
- package/dist/index.js +4543 -3916
- package/dist/theme/components/button.d.ts +6 -6
- package/dist/theme/components/index.d.ts +7 -1
- package/dist/theme/components/pagination.d.ts +48 -0
- package/dist/theme/components/progress.d.ts +21 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/responsiveness.d.ts +79 -0
- package/package.json +2 -2
|
@@ -13,4 +13,4 @@ import { ImageArtProps } from './types';
|
|
|
13
13
|
* @param {string} [props.'data-testid'] - Test ID for the container Box.
|
|
14
14
|
* @returns {React.ReactElement} The rendered ImageArt component.
|
|
15
15
|
*/
|
|
16
|
-
export declare const ImageArt: ({ art, width, height, style, "data-testid": testId, alt, fallback, useSkeleton, ...boxProps }: ImageArtProps) => React.ReactElement;
|
|
16
|
+
export declare const ImageArt: ({ art, width, height, style, "data-testid": testId, alt, fallback, useSkeleton, objectFit, objectPosition, aspectRatio, mixBlendMode, imageRendering, ...boxProps }: ImageArtProps) => React.ReactElement;
|
|
@@ -91,6 +91,26 @@ export interface ImageArtProps extends BaseArtProps, WidthHeightProps {
|
|
|
91
91
|
* Fallback text or React node
|
|
92
92
|
*/
|
|
93
93
|
fallback?: string | React.ReactNode;
|
|
94
|
+
/**
|
|
95
|
+
* Fit the image to the container
|
|
96
|
+
*/
|
|
97
|
+
objectFit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
|
|
98
|
+
/**
|
|
99
|
+
* The object position
|
|
100
|
+
*/
|
|
101
|
+
objectPosition?: 'center' | 'top' | 'bottom' | 'left' | 'right';
|
|
102
|
+
/**
|
|
103
|
+
* The aspect ratio
|
|
104
|
+
*/
|
|
105
|
+
aspectRatio?: number;
|
|
106
|
+
/**
|
|
107
|
+
* The mix blend mode
|
|
108
|
+
*/
|
|
109
|
+
mixBlendMode?: 'normal' | 'multiply' | 'screen' | 'overlay' | 'darken' | 'lighten' | 'color-dodge' | 'color-burn' | 'hard-light' | 'soft-light' | 'difference' | 'exclusion' | 'hue' | 'saturation' | 'color' | 'luminosity';
|
|
110
|
+
/**
|
|
111
|
+
* The image rendering
|
|
112
|
+
*/
|
|
113
|
+
imageRendering?: 'auto' | 'pixelated' | 'crisp-edges' | 'smooth';
|
|
94
114
|
}
|
|
95
115
|
export interface BrandArtProps extends BaseArtProps, WidthHeightProps {
|
|
96
116
|
/**
|
|
@@ -2,59 +2,11 @@ import { Theme } from '../../theme';
|
|
|
2
2
|
import { ConfigType } from './config';
|
|
3
3
|
import { CustomBoxProps, CSSStyleProps, StyleProps } from './types';
|
|
4
4
|
export declare const getThemeValue: (theme: Theme, key: keyof StyleProps, props: StyleProps) => {
|
|
5
|
-
[x: string]: string
|
|
5
|
+
[x: string]: import('../..').WithResponsiveValue<string>;
|
|
6
6
|
} | {
|
|
7
|
-
[x: string]: number
|
|
7
|
+
[x: string]: import('../..').WithResponsiveValue<number>;
|
|
8
8
|
} | undefined;
|
|
9
9
|
export declare const mapStylePropToThemeValue: (theme: Theme, props: StyleProps) => {};
|
|
10
10
|
export declare const configKeys: Array<keyof ConfigType>;
|
|
11
|
-
export declare const genBoxStyle: (theme: Theme, props: StyleProps & CSSStyleProps & CustomBoxProps) =>
|
|
12
|
-
|
|
13
|
-
width?: import("csstype").Property.Width<string | number> | undefined;
|
|
14
|
-
height?: import("csstype").Property.Height<string | number> | undefined;
|
|
15
|
-
minWidth?: import("csstype").Property.MinWidth<string | number> | undefined;
|
|
16
|
-
maxWidth?: import("csstype").Property.MaxWidth<string | number> | undefined;
|
|
17
|
-
minHeight?: import("csstype").Property.MinHeight<string | number> | undefined;
|
|
18
|
-
maxHeight?: import("csstype").Property.MaxHeight<string | number> | undefined;
|
|
19
|
-
display?: import("csstype").Property.Display | undefined;
|
|
20
|
-
alignItems?: import("csstype").Property.AlignItems | undefined;
|
|
21
|
-
alignContent?: import("csstype").Property.AlignContent | undefined;
|
|
22
|
-
justifyContent?: import("csstype").Property.JustifyContent | undefined;
|
|
23
|
-
flexWrap?: import("csstype").Property.FlexWrap | undefined;
|
|
24
|
-
flexDirection?: import("csstype").Property.FlexDirection | undefined;
|
|
25
|
-
flex?: import("csstype").Property.Flex<string | number> | undefined;
|
|
26
|
-
flexGrow?: import("csstype").Property.FlexGrow | undefined;
|
|
27
|
-
flexShrink?: import("csstype").Property.FlexShrink | undefined;
|
|
28
|
-
flexBasis?: import("csstype").Property.FlexBasis<string | number> | undefined;
|
|
29
|
-
alignSelf?: import("csstype").Property.AlignSelf | undefined;
|
|
30
|
-
position?: import("csstype").Property.Position | undefined;
|
|
31
|
-
top?: import("csstype").Property.Top<string | number> | undefined;
|
|
32
|
-
right?: import("csstype").Property.Right<string | number> | undefined;
|
|
33
|
-
bottom?: import("csstype").Property.Bottom<string | number> | undefined;
|
|
34
|
-
left?: import("csstype").Property.Left<string | number> | undefined;
|
|
35
|
-
overflow?: import("csstype").Property.Overflow | undefined;
|
|
36
|
-
cursor?: import("csstype").Property.Cursor | undefined;
|
|
37
|
-
transition?: import("csstype").Property.Transition<string & {}> | undefined;
|
|
38
|
-
transform?: import("csstype").Property.Transform | undefined;
|
|
39
|
-
animation?: import("csstype").Property.Animation<string & {}> | undefined;
|
|
40
|
-
willChange?: import("csstype").Property.WillChange | undefined;
|
|
41
|
-
pointerEvents?: import("csstype").Property.PointerEvents | undefined;
|
|
42
|
-
userSelect?: import("csstype").Property.UserSelect | undefined;
|
|
43
|
-
resize?: import("csstype").Property.Resize | undefined;
|
|
44
|
-
boxShadow?: import("csstype").Property.BoxShadow | undefined;
|
|
45
|
-
textShadow?: import("csstype").Property.TextShadow | undefined;
|
|
46
|
-
filter?: import("csstype").Property.Filter | undefined;
|
|
47
|
-
backdropFilter?: import("csstype").Property.BackdropFilter | undefined;
|
|
48
|
-
mixBlendMode?: import("csstype").Property.MixBlendMode | undefined;
|
|
49
|
-
isolation?: import("csstype").Property.Isolation | undefined;
|
|
50
|
-
zIndex?: import("csstype").Property.ZIndex | undefined;
|
|
51
|
-
marginInline?: import("csstype").Property.MarginInline<string | number> | undefined;
|
|
52
|
-
marginBlock?: import("csstype").Property.MarginBlock<string | number> | undefined;
|
|
53
|
-
paddingInline?: import("csstype").Property.PaddingInline<string | number> | undefined;
|
|
54
|
-
paddingBlock?: import("csstype").Property.PaddingBlock<string | number> | undefined;
|
|
55
|
-
whiteSpace?: import("csstype").Property.WhiteSpace | undefined;
|
|
56
|
-
textOverflow?: import("csstype").Property.TextOverflow | undefined;
|
|
57
|
-
overflowY?: import("csstype").Property.OverflowY | undefined;
|
|
58
|
-
overflowX?: import("csstype").Property.OverflowX | undefined;
|
|
59
|
-
};
|
|
60
|
-
export declare const StyledBox: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyleProps & CSSStyleProps & CustomBoxProps>> & string;
|
|
11
|
+
export declare const genBoxStyle: (theme: Theme, props: StyleProps & CSSStyleProps & CustomBoxProps) => import('styled-components').RuleSet<object>;
|
|
12
|
+
export declare const StyledBox: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyleProps & import('../..').WithResponsive<Pick<import('react').CSSProperties, "opacity" | "width" | "height" | "minWidth" | "maxWidth" | "minHeight" | "maxHeight" | "display" | "alignItems" | "alignContent" | "justifyContent" | "flexWrap" | "flexDirection" | "flex" | "flexGrow" | "flexShrink" | "flexBasis" | "alignSelf" | "position" | "top" | "right" | "bottom" | "left" | "overflow" | "cursor" | "transition" | "transform" | "animation" | "willChange" | "pointerEvents" | "userSelect" | "resize" | "boxShadow" | "textShadow" | "filter" | "backdropFilter" | "mixBlendMode" | "isolation" | "zIndex" | "marginInline" | "marginBlock" | "paddingInline" | "paddingBlock" | "whiteSpace" | "textOverflow" | "overflowY" | "overflowX">> & CustomBoxProps>> & string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CSSProperties, HTMLAttributes } from 'react';
|
|
2
2
|
import { BorderWidth, Color, Radius, Space } from '../../theme';
|
|
3
|
+
import { WithResponsive, WithResponsiveValue } from '../../utils';
|
|
3
4
|
import { ConfigType, CSSPropsKeyType } from './config';
|
|
4
5
|
export interface ThemeScale {
|
|
5
6
|
colors: Color;
|
|
@@ -9,10 +10,10 @@ export interface ThemeScale {
|
|
|
9
10
|
}
|
|
10
11
|
type ConfigKeyType = keyof ConfigType;
|
|
11
12
|
export type StyleProps = {
|
|
12
|
-
[key in ConfigKeyType]?: ThemeScale[ConfigType[key]['scale']]
|
|
13
|
+
[key in ConfigKeyType]?: WithResponsiveValue<ThemeScale[ConfigType[key]['scale']]>;
|
|
13
14
|
};
|
|
14
|
-
export type CSSStyleProps = Pick<CSSProperties, CSSPropsKeyType
|
|
15
|
-
export interface CustomBoxProps {
|
|
15
|
+
export type CSSStyleProps = WithResponsive<Pick<CSSProperties, CSSPropsKeyType>>;
|
|
16
|
+
export interface CustomBoxProps extends WithResponsive<{
|
|
16
17
|
/**
|
|
17
18
|
* If true, the box will take the full width and height of its parent.
|
|
18
19
|
* It is equivalent to setting `position: 'absolute'`, `top: 0`, `bottom: 0`, `left: 0`, `right: 0`.
|
|
@@ -34,6 +35,7 @@ export interface CustomBoxProps {
|
|
|
34
35
|
* If true, the box will take the full height of its parent.
|
|
35
36
|
*/
|
|
36
37
|
fh?: boolean;
|
|
38
|
+
}> {
|
|
37
39
|
}
|
|
38
40
|
export interface BoxHTMLProps extends HTMLAttributes<HTMLDivElement> {
|
|
39
41
|
/**
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { BorderWidth, Color, FontSize, Space, Size, FontWeight } from '../../theme
|
|
2
|
-
import { ButtonSize } from '../../theme/components/button';
|
|
1
|
+
import { BorderWidth, Color, FontSize, Space, Size, FontWeight, Radius, ButtonSize, ButtonVariant } from '../../theme';
|
|
3
2
|
type ButtonContainerProps = {
|
|
4
3
|
$backgroundColor: Color | 'disabled';
|
|
5
|
-
$borderRadius:
|
|
4
|
+
$borderRadius: Radius;
|
|
6
5
|
$borderWidth: BorderWidth;
|
|
7
6
|
$disabled?: boolean;
|
|
8
|
-
$variant:
|
|
7
|
+
$variant: ButtonVariant;
|
|
9
8
|
$color: Color;
|
|
10
9
|
$paddingHorizontal: Space;
|
|
11
10
|
$paddingVertical: Space;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Icon } from '@phosphor-icons/react';
|
|
2
|
-
import { Color } from '../../theme';
|
|
2
|
+
import { ButtonCorner, ButtonSize, ButtonVariant, Color } from '../../theme';
|
|
3
3
|
export interface ButtonProps {
|
|
4
4
|
/**
|
|
5
5
|
* Disable state of button.
|
|
@@ -36,17 +36,17 @@ export interface ButtonProps {
|
|
|
36
36
|
/**
|
|
37
37
|
* Corner style of button.
|
|
38
38
|
*/
|
|
39
|
-
corner?:
|
|
39
|
+
corner?: ButtonCorner;
|
|
40
40
|
/**
|
|
41
41
|
* Button style variant.
|
|
42
42
|
* @default 'solid'
|
|
43
43
|
*/
|
|
44
|
-
variant?:
|
|
44
|
+
variant?: ButtonVariant;
|
|
45
45
|
/**
|
|
46
46
|
* Button size.
|
|
47
47
|
* @default 'md'
|
|
48
48
|
*/
|
|
49
|
-
size?:
|
|
49
|
+
size?: ButtonSize;
|
|
50
50
|
/**
|
|
51
51
|
* Additional style.
|
|
52
52
|
*/
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PaginationItemType } from './types';
|
|
2
|
+
interface UsePaginationParams {
|
|
3
|
+
count: number;
|
|
4
|
+
page: number;
|
|
5
|
+
boundaryCount?: number;
|
|
6
|
+
siblingCount?: number;
|
|
7
|
+
showFirstButton?: boolean;
|
|
8
|
+
showLastButton?: boolean;
|
|
9
|
+
showPrevNextButtons?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const usePagination: ({ count, page, boundaryCount, siblingCount, showFirstButton, showLastButton, showPrevNextButtons, }: UsePaginationParams) => {
|
|
12
|
+
items: {
|
|
13
|
+
type: PaginationItemType;
|
|
14
|
+
page: number | undefined;
|
|
15
|
+
selected: boolean;
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
}[];
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { Color } from '../../theme';
|
|
2
|
+
export type PaginationItemType = 'page' | 'previous' | 'next' | 'first' | 'last' | 'start-ellipsis' | 'end-ellipsis';
|
|
3
|
+
export interface PaginationItemProps {
|
|
4
|
+
/**
|
|
5
|
+
* The type of pagination item.
|
|
6
|
+
*/
|
|
7
|
+
type?: PaginationItemType;
|
|
8
|
+
/**
|
|
9
|
+
* The page number.
|
|
10
|
+
*/
|
|
11
|
+
page?: number;
|
|
12
|
+
/**
|
|
13
|
+
* The current page number.
|
|
14
|
+
*/
|
|
15
|
+
currentPage: number;
|
|
16
|
+
/**
|
|
17
|
+
* If true, the item is selected.
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
|
+
selected?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* If true, the item is disabled.
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Callback fired when the item is clicked.
|
|
28
|
+
* Should handle its own disabled check if necessary for the clickable element.
|
|
29
|
+
*/
|
|
30
|
+
onClick?: (page: number | null, event: React.MouseEvent<HTMLDivElement>) => void;
|
|
31
|
+
/**
|
|
32
|
+
* The shape of the pagination item.
|
|
33
|
+
* @default 'circular'
|
|
34
|
+
*/
|
|
35
|
+
shape?: 'circular' | 'rounded';
|
|
36
|
+
/**
|
|
37
|
+
* The size of the pagination item.
|
|
38
|
+
* @default 'medium'
|
|
39
|
+
*/
|
|
40
|
+
size?: 'small' | 'medium' | 'large';
|
|
41
|
+
/**
|
|
42
|
+
* The color of the pagination item.
|
|
43
|
+
* @default 'primary'
|
|
44
|
+
*/
|
|
45
|
+
color?: Color;
|
|
46
|
+
/**
|
|
47
|
+
* The total number of pages.
|
|
48
|
+
*/
|
|
49
|
+
count: number;
|
|
50
|
+
}
|
|
51
|
+
export interface PaginationProps {
|
|
52
|
+
/**
|
|
53
|
+
* The total number of pages.
|
|
54
|
+
* @default 1
|
|
55
|
+
*/
|
|
56
|
+
count?: number;
|
|
57
|
+
/**
|
|
58
|
+
* The current page number (1-indexed).
|
|
59
|
+
* @default 1
|
|
60
|
+
*/
|
|
61
|
+
page?: number;
|
|
62
|
+
/**
|
|
63
|
+
* Callback fired when the page is changed.
|
|
64
|
+
* @param event The event source of the callback.
|
|
65
|
+
* @param page The page selected.
|
|
66
|
+
*/
|
|
67
|
+
onChange?: (page: number, event: React.MouseEvent<HTMLDivElement>) => void;
|
|
68
|
+
/**
|
|
69
|
+
* Number of pages at the beginning and end of the page navigation.
|
|
70
|
+
* @default 1
|
|
71
|
+
*/
|
|
72
|
+
boundaryCount?: number;
|
|
73
|
+
/**
|
|
74
|
+
* Number of pages to show on each side of the current page.
|
|
75
|
+
* @default 1
|
|
76
|
+
*/
|
|
77
|
+
siblingCount?: number;
|
|
78
|
+
/**
|
|
79
|
+
* If `true`, show the first-page button.
|
|
80
|
+
* @default false
|
|
81
|
+
*/
|
|
82
|
+
showFirstButton?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* If `true`, show the last-page button.
|
|
85
|
+
* @default false
|
|
86
|
+
*/
|
|
87
|
+
showLastButton?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* If `true`, show the previous and next buttons.
|
|
90
|
+
* @default true
|
|
91
|
+
*/
|
|
92
|
+
showPrevNextButtons?: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* The shape of the pagination items.
|
|
95
|
+
* @default 'circular'
|
|
96
|
+
*/
|
|
97
|
+
shape?: 'circular' | 'rounded';
|
|
98
|
+
/**
|
|
99
|
+
* The size of the pagination items.
|
|
100
|
+
* @default 'medium'
|
|
101
|
+
*/
|
|
102
|
+
size?: 'small' | 'medium' | 'large';
|
|
103
|
+
/**
|
|
104
|
+
* The color of the pagination items.
|
|
105
|
+
* @default 'primary'
|
|
106
|
+
*/
|
|
107
|
+
color?: Color;
|
|
108
|
+
/**
|
|
109
|
+
* If `true`, the pagination items will be disabled.
|
|
110
|
+
* @default false
|
|
111
|
+
*/
|
|
112
|
+
disabled?: boolean;
|
|
113
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Color } from '../../theme/common';
|
|
3
|
+
import { ProgressSize as ThemeProgressSize, ProgressVariant as ThemeProgressVariant } from '../../theme/components/progress';
|
|
4
|
+
import { BoxProps } from '../Box';
|
|
5
|
+
export interface ProgressProps extends Omit<BoxProps, 'size'> {
|
|
6
|
+
/**
|
|
7
|
+
* The current value of the progress bar.
|
|
8
|
+
* If undefined, the progress bar will be in an indeterminate state.
|
|
9
|
+
* Value should be between 0 and 100.
|
|
10
|
+
*/
|
|
11
|
+
value?: number;
|
|
12
|
+
/**
|
|
13
|
+
* The color of the progress indicator. Refers to a theme color key.
|
|
14
|
+
*/
|
|
15
|
+
color?: Color;
|
|
16
|
+
/**
|
|
17
|
+
* The size (thickness) of the progress bar.
|
|
18
|
+
* @default 'md'
|
|
19
|
+
*/
|
|
20
|
+
size?: ThemeProgressSize;
|
|
21
|
+
/**
|
|
22
|
+
* The visual variant of the progress bar.
|
|
23
|
+
* @default 'soft'
|
|
24
|
+
*/
|
|
25
|
+
variant?: ThemeProgressVariant;
|
|
26
|
+
/**
|
|
27
|
+
* Test ID for automation.
|
|
28
|
+
*/
|
|
29
|
+
testID?: string;
|
|
30
|
+
}
|
|
31
|
+
export declare const Progress: React.FC<ProgressProps>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Color, Size, Radius, BorderWidth } from '../../theme/common';
|
|
2
|
+
interface StyledProgressContainerProps {
|
|
3
|
+
$heightKey: Size;
|
|
4
|
+
$borderRadiusKey: Radius;
|
|
5
|
+
$backgroundColorKey: Color | string;
|
|
6
|
+
$borderColorKey?: Color | string;
|
|
7
|
+
$borderWidthKey?: BorderWidth;
|
|
8
|
+
}
|
|
9
|
+
interface StyledProgressIndicatorProps {
|
|
10
|
+
$progressColorKey: Color;
|
|
11
|
+
$progressValue?: number;
|
|
12
|
+
$borderRadiusKey: Radius;
|
|
13
|
+
}
|
|
14
|
+
export declare const StyledProgressContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('..').BoxProps & {
|
|
15
|
+
ref?: import('react').ForwardedRef<HTMLDivElement>;
|
|
16
|
+
}, StyledProgressContainerProps>> & string & Omit<(props: import('..').BoxProps & {
|
|
17
|
+
ref?: import('react').ForwardedRef<HTMLDivElement>;
|
|
18
|
+
}) => 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>>;
|
|
19
|
+
export declare const StyledProgressBar: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('..').BoxProps & {
|
|
20
|
+
ref?: import('react').ForwardedRef<HTMLDivElement>;
|
|
21
|
+
}, never>> & string & Omit<(props: import('..').BoxProps & {
|
|
22
|
+
ref?: import('react').ForwardedRef<HTMLDivElement>;
|
|
23
|
+
}) => 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>>;
|
|
24
|
+
export declare const StyledProgressIndicator: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('..').BoxProps & {
|
|
25
|
+
ref?: import('react').ForwardedRef<HTMLDivElement>;
|
|
26
|
+
}, StyledProgressIndicatorProps>> & string & Omit<(props: import('..').BoxProps & {
|
|
27
|
+
ref?: import('react').ForwardedRef<HTMLDivElement>;
|
|
28
|
+
}) => 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>>;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Progress';
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Color, FontSize, FontWeight, Typeface } from '../../theme';
|
|
2
|
+
import { WithResponsiveValue } from '../../utils';
|
|
2
3
|
interface StyledTextProps {
|
|
3
|
-
$themeFontSize: FontSize
|
|
4
|
-
$themeFontWeight: FontWeight
|
|
5
|
-
$themeColor: Color
|
|
6
|
-
$themeTypeface: Typeface
|
|
7
|
-
$textAlign?: 'left' | 'right' | 'center' | 'justify'
|
|
8
|
-
$textTransform?: 'none' | 'capitalize' | 'uppercase' | 'lowercase'
|
|
9
|
-
$textDecoration?: 'none' | 'underline' | 'line-through' | 'underline line-through'
|
|
4
|
+
$themeFontSize: WithResponsiveValue<FontSize>;
|
|
5
|
+
$themeFontWeight: WithResponsiveValue<FontWeight>;
|
|
6
|
+
$themeColor: WithResponsiveValue<Color>;
|
|
7
|
+
$themeTypeface: WithResponsiveValue<Typeface>;
|
|
8
|
+
$textAlign?: WithResponsiveValue<'left' | 'right' | 'center' | 'justify'>;
|
|
9
|
+
$textTransform?: WithResponsiveValue<'none' | 'capitalize' | 'uppercase' | 'lowercase'>;
|
|
10
|
+
$textDecoration?: WithResponsiveValue<'none' | 'underline' | 'line-through' | 'underline line-through'>;
|
|
10
11
|
}
|
|
11
12
|
declare const StyledText: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('styled-components/dist/types').Substitute<import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>>, {
|
|
12
13
|
as?: "p" | "span";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { Color, FontSize, FontWeight, Typeface } from '../../theme';
|
|
3
|
-
|
|
3
|
+
import { WithResponsiveValue } from '../../utils';
|
|
4
|
+
export interface TextProps extends Omit<HTMLAttributes<HTMLParagraphElement>, 'color'> {
|
|
4
5
|
/**
|
|
5
6
|
* Text content.
|
|
6
7
|
*/
|
|
@@ -8,27 +9,27 @@ export interface TextProps extends HTMLAttributes<HTMLParagraphElement> {
|
|
|
8
9
|
/**
|
|
9
10
|
* Size of the text.
|
|
10
11
|
*/
|
|
11
|
-
fontSize?: FontSize
|
|
12
|
+
fontSize?: WithResponsiveValue<FontSize>;
|
|
12
13
|
/**
|
|
13
14
|
* Font weight of the text.
|
|
14
15
|
*/
|
|
15
|
-
fontWeight?: FontWeight
|
|
16
|
+
fontWeight?: WithResponsiveValue<FontWeight>;
|
|
16
17
|
/**
|
|
17
18
|
* Visual color to apply to the text.
|
|
18
19
|
*/
|
|
19
|
-
color?: Color
|
|
20
|
+
color?: WithResponsiveValue<Color>;
|
|
20
21
|
/**
|
|
21
22
|
* Specifies the alignment of the text.
|
|
22
23
|
*/
|
|
23
|
-
textAlign?: 'left' | 'right' | 'center' | 'justify'
|
|
24
|
+
textAlign?: WithResponsiveValue<'left' | 'right' | 'center' | 'justify'>;
|
|
24
25
|
/**
|
|
25
26
|
* Transform the text.
|
|
26
27
|
*/
|
|
27
|
-
textTransform?: 'none' | 'capitalize' | 'uppercase' | 'lowercase'
|
|
28
|
+
textTransform?: WithResponsiveValue<'none' | 'capitalize' | 'uppercase' | 'lowercase'>;
|
|
28
29
|
/**
|
|
29
30
|
* Specifies the decoration of the text.
|
|
30
31
|
*/
|
|
31
|
-
textDecoration?: 'none' | 'underline' | 'line-through' | 'underline line-through'
|
|
32
|
+
textDecoration?: WithResponsiveValue<'none' | 'underline' | 'line-through' | 'underline line-through'>;
|
|
32
33
|
/**
|
|
33
34
|
* Testing id of the component.
|
|
34
35
|
*/
|
|
@@ -37,7 +38,7 @@ export interface TextProps extends HTMLAttributes<HTMLParagraphElement> {
|
|
|
37
38
|
* The typeface to render the text in:
|
|
38
39
|
* - `neutral`: The default typeface for the platform.
|
|
39
40
|
*/
|
|
40
|
-
typeface?: Typeface
|
|
41
|
+
typeface?: WithResponsiveValue<Typeface>;
|
|
41
42
|
/**
|
|
42
43
|
* Whether to render the text with rich text formatting.
|
|
43
44
|
*/
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ResponsiveKey } from '../utils';
|
|
2
|
+
/**
|
|
3
|
+
* Hook that returns the current responsive breakpoint key.
|
|
4
|
+
* It directly manages MediaQueryList objects for efficiency.
|
|
5
|
+
* Breakpoints are checked from largest (xl) to smallest (sm), defaulting to 'xs'.
|
|
6
|
+
* @returns The current ResponsiveKey ('xs', 'sm', 'md', 'lg', or 'xl').
|
|
7
|
+
*/
|
|
8
|
+
export declare const useResponsiveBreakpoint: (defaultBreakpoint?: ResponsiveKey) => ResponsiveKey;
|