@aic-kits/react 0.10.4 → 0.11.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/Tag/StyledTag.d.ts +29 -0
- package/dist/components/Tag/index.d.ts +3 -0
- package/dist/components/Tag/types.d.ts +55 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.cjs +120 -99
- package/dist/index.js +3536 -3432
- package/dist/theme/components/index.d.ts +3 -0
- package/dist/theme/components/tag.d.ts +19 -0
- package/package.json +2 -2
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Color, FontSize, Radius, Size, Space, TagSize, TagVariant, Theme } from '../../theme';
|
|
2
|
+
export declare const getTagTextColor: (theme: Theme, color: Color, textColor?: Color, variant?: TagVariant) => string;
|
|
3
|
+
export interface StyledTagProps {
|
|
4
|
+
$variant: TagVariant;
|
|
5
|
+
$color: Color;
|
|
6
|
+
$textColor?: Color;
|
|
7
|
+
$size: TagSize;
|
|
8
|
+
$radius: Radius | string;
|
|
9
|
+
$paddingVertical: Space;
|
|
10
|
+
$paddingHorizontal: Space;
|
|
11
|
+
$fontSize: FontSize;
|
|
12
|
+
$gap: Space;
|
|
13
|
+
$iconSize: Size;
|
|
14
|
+
}
|
|
15
|
+
export declare const StyledTagContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('..').BoxProps & {
|
|
16
|
+
ref?: import('react').ForwardedRef<HTMLDivElement>;
|
|
17
|
+
}, StyledTagProps>> & string & Omit<(props: import('..').BoxProps & {
|
|
18
|
+
ref?: import('react').ForwardedRef<HTMLDivElement>;
|
|
19
|
+
}) => 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>>;
|
|
20
|
+
export declare const StyledTagText: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('..').TextProps & {
|
|
21
|
+
useRichText?: boolean;
|
|
22
|
+
}, {
|
|
23
|
+
$color: Color;
|
|
24
|
+
$textColor?: Color;
|
|
25
|
+
$variant: TagVariant;
|
|
26
|
+
$fontSize: FontSize;
|
|
27
|
+
}>> & string & Omit<(props: import('..').TextProps & {
|
|
28
|
+
useRichText?: boolean;
|
|
29
|
+
}) => import("react/jsx-runtime").JSX.Element, keyof import('react').Component<any, {}, any>>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Icon } from '@phosphor-icons/react';
|
|
2
|
+
import { Color, Radius, TagSize, TagVariant } from '../../theme';
|
|
3
|
+
import { BoxProps } from '../Box';
|
|
4
|
+
export interface TagProps extends BoxProps {
|
|
5
|
+
/**
|
|
6
|
+
* The variant style of the tag.
|
|
7
|
+
* 'solid': Filled background.
|
|
8
|
+
* 'outlined': Transparent background with border.
|
|
9
|
+
* @default 'solid'
|
|
10
|
+
*/
|
|
11
|
+
variant?: TagVariant;
|
|
12
|
+
/**
|
|
13
|
+
* The base color scheme of the tag. Affects background/border and potentially text color.
|
|
14
|
+
* @default 'primary'
|
|
15
|
+
*/
|
|
16
|
+
color?: Color;
|
|
17
|
+
/**
|
|
18
|
+
* The explicit color for the tag text. Overrides default logic based on variant/color.
|
|
19
|
+
*/
|
|
20
|
+
textColor?: Color;
|
|
21
|
+
/**
|
|
22
|
+
* The size of the tag, affecting padding and font size.
|
|
23
|
+
* @default 'md'
|
|
24
|
+
*/
|
|
25
|
+
size?: TagSize;
|
|
26
|
+
/**
|
|
27
|
+
* The border radius of the tag. Can use theme keys or specific pixel values.
|
|
28
|
+
* @default 'full'
|
|
29
|
+
*/
|
|
30
|
+
radius?: Radius;
|
|
31
|
+
/**
|
|
32
|
+
* Icon to display before the main children.
|
|
33
|
+
*/
|
|
34
|
+
icon?: Icon;
|
|
35
|
+
/**
|
|
36
|
+
* Icon to display after the main children.
|
|
37
|
+
*/
|
|
38
|
+
rightIcon?: Icon;
|
|
39
|
+
/**
|
|
40
|
+
* Optional content to display before the main children, like an icon.
|
|
41
|
+
*/
|
|
42
|
+
leftElement?: React.ReactNode;
|
|
43
|
+
/**
|
|
44
|
+
* Optional content to display after the main children, like a close button.
|
|
45
|
+
*/
|
|
46
|
+
rightElement?: React.ReactNode;
|
|
47
|
+
/**
|
|
48
|
+
* The main content of the tag.
|
|
49
|
+
*/
|
|
50
|
+
children: React.ReactNode;
|
|
51
|
+
/**
|
|
52
|
+
* Testing ID
|
|
53
|
+
*/
|
|
54
|
+
'data-testid'?: string;
|
|
55
|
+
}
|