@dexma/ui-components 8.0.48 → 8.0.50
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/lib/components/Tag/Tag.d.ts +5 -2
- package/dist/lib/styles/Tag/StyledTag.d.ts +8 -3
- package/dist/ui-components.es.js +7566 -7542
- package/dist/ui-components.umd.js +401 -393
- package/package.json +1 -1
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { TagVariant } from '../../styles/Tag/StyledTag';
|
|
2
3
|
export type TagProps = {
|
|
3
4
|
dataId?: string;
|
|
5
|
+
/** Theme colour key, hex value, or a Tag preset: `red`, `green`, `gray`, `success`, `warning`, `error`. */
|
|
4
6
|
color?: string;
|
|
5
7
|
icon?: string;
|
|
6
8
|
closable?: boolean;
|
|
7
9
|
onClose?: () => void;
|
|
8
10
|
type?: 'normal' | 'rounded';
|
|
9
|
-
variant?:
|
|
11
|
+
variant?: TagVariant;
|
|
10
12
|
iconAriaLabel?: string;
|
|
11
13
|
} & HTMLAttributes<HTMLDivElement>;
|
|
12
14
|
export declare const Tag: import('react').ForwardRefExoticComponent<{
|
|
13
15
|
dataId?: string;
|
|
16
|
+
/** Theme colour key, hex value, or a Tag preset: `red`, `green`, `gray`, `success`, `warning`, `error`. */
|
|
14
17
|
color?: string;
|
|
15
18
|
icon?: string;
|
|
16
19
|
closable?: boolean;
|
|
17
20
|
onClose?: () => void;
|
|
18
21
|
type?: "normal" | "rounded";
|
|
19
|
-
variant?:
|
|
22
|
+
variant?: TagVariant;
|
|
20
23
|
iconAriaLabel?: string;
|
|
21
24
|
} & HTMLAttributes<HTMLDivElement> & {
|
|
22
25
|
dataId?: string;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { Theme } from '../../utils/theme';
|
|
2
|
-
export
|
|
3
|
-
export declare const
|
|
2
|
+
export type TagVariant = 'primary' | 'outline' | 'filled';
|
|
3
|
+
export declare const getTagColors: (theme: Theme, color: string) => {
|
|
4
|
+
base: string;
|
|
5
|
+
tint: string;
|
|
6
|
+
border: string;
|
|
7
|
+
text: string;
|
|
8
|
+
};
|
|
4
9
|
type StyledTagProps = {
|
|
5
10
|
theme: Theme;
|
|
6
11
|
$color: string;
|
|
7
12
|
$type: 'normal' | 'rounded';
|
|
8
|
-
$variant:
|
|
13
|
+
$variant: TagVariant;
|
|
9
14
|
$icon?: string;
|
|
10
15
|
$closable?: boolean;
|
|
11
16
|
};
|