@sproutsocial/seeds-react-badge 1.0.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.
@@ -0,0 +1,71 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { TypeIconName } from '@sproutsocial/seeds-react-icon';
3
+ import { TypeSystemCommonProps, TypeStyledComponentsCommonProps } from '@sproutsocial/seeds-react-system-props';
4
+
5
+ /**
6
+ * @deprecated Use badgeColor instead
7
+ */
8
+ declare const legacyBadgeColors: {
9
+ primary: {
10
+ color: string;
11
+ background: string;
12
+ };
13
+ secondary: {
14
+ color: string;
15
+ background: string;
16
+ };
17
+ passive: {
18
+ color: string;
19
+ background: string;
20
+ };
21
+ common: {
22
+ color: string;
23
+ background: string;
24
+ };
25
+ approval: {
26
+ color: string;
27
+ background: string;
28
+ };
29
+ default: {
30
+ color: string;
31
+ background: string;
32
+ };
33
+ suggestion: {
34
+ color: string;
35
+ background: string;
36
+ };
37
+ };
38
+ declare const badgeColors: {
39
+ readonly green: "green";
40
+ readonly blue: "blue";
41
+ readonly purple: "purple";
42
+ readonly yellow: "yellow";
43
+ readonly orange: "orange";
44
+ readonly red: "red";
45
+ readonly neutral: "neutral";
46
+ readonly magenta: "magenta";
47
+ readonly pink: "pink";
48
+ readonly aqua: "aqua";
49
+ readonly teal: "teal";
50
+ };
51
+
52
+ type TypeBadgeColor = keyof typeof badgeColors;
53
+ interface TypeBaseBadgeProps extends Omit<React.ComponentPropsWithoutRef<"span">, keyof TypeSystemCommonProps>, TypeSystemCommonProps, TypeStyledComponentsCommonProps {
54
+ }
55
+ interface TypeBadgeProps extends TypeBaseBadgeProps {
56
+ children?: React.ReactNode;
57
+ /** DEPRECATED: Use children instead of text */
58
+ text?: React.ReactNode;
59
+ /** Size default is deprecated in favor of small and large */
60
+ size?: "small" | "large" | "default";
61
+ badgeColor?: TypeBadgeColor;
62
+ iconName?: TypeIconName;
63
+ /** DEPRECATED: Possibly only used for testing. Refrain from using at all if possible. (optional) */
64
+ tip?: React.ReactNode;
65
+ /** DEPRECATED: The legacy method of choosing a theme. Use badgeColor instead. (optional) */
66
+ type?: string;
67
+ }
68
+
69
+ declare const Badge: ({ children, text, iconName, type, tip, size, badgeColor, color, ...rest }: TypeBadgeProps) => react_jsx_runtime.JSX.Element;
70
+
71
+ export { Badge, type TypeBadgeColor, type TypeBadgeProps, type TypeBaseBadgeProps, badgeColors, Badge as default, legacyBadgeColors };
@@ -0,0 +1,71 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { TypeIconName } from '@sproutsocial/seeds-react-icon';
3
+ import { TypeSystemCommonProps, TypeStyledComponentsCommonProps } from '@sproutsocial/seeds-react-system-props';
4
+
5
+ /**
6
+ * @deprecated Use badgeColor instead
7
+ */
8
+ declare const legacyBadgeColors: {
9
+ primary: {
10
+ color: string;
11
+ background: string;
12
+ };
13
+ secondary: {
14
+ color: string;
15
+ background: string;
16
+ };
17
+ passive: {
18
+ color: string;
19
+ background: string;
20
+ };
21
+ common: {
22
+ color: string;
23
+ background: string;
24
+ };
25
+ approval: {
26
+ color: string;
27
+ background: string;
28
+ };
29
+ default: {
30
+ color: string;
31
+ background: string;
32
+ };
33
+ suggestion: {
34
+ color: string;
35
+ background: string;
36
+ };
37
+ };
38
+ declare const badgeColors: {
39
+ readonly green: "green";
40
+ readonly blue: "blue";
41
+ readonly purple: "purple";
42
+ readonly yellow: "yellow";
43
+ readonly orange: "orange";
44
+ readonly red: "red";
45
+ readonly neutral: "neutral";
46
+ readonly magenta: "magenta";
47
+ readonly pink: "pink";
48
+ readonly aqua: "aqua";
49
+ readonly teal: "teal";
50
+ };
51
+
52
+ type TypeBadgeColor = keyof typeof badgeColors;
53
+ interface TypeBaseBadgeProps extends Omit<React.ComponentPropsWithoutRef<"span">, keyof TypeSystemCommonProps>, TypeSystemCommonProps, TypeStyledComponentsCommonProps {
54
+ }
55
+ interface TypeBadgeProps extends TypeBaseBadgeProps {
56
+ children?: React.ReactNode;
57
+ /** DEPRECATED: Use children instead of text */
58
+ text?: React.ReactNode;
59
+ /** Size default is deprecated in favor of small and large */
60
+ size?: "small" | "large" | "default";
61
+ badgeColor?: TypeBadgeColor;
62
+ iconName?: TypeIconName;
63
+ /** DEPRECATED: Possibly only used for testing. Refrain from using at all if possible. (optional) */
64
+ tip?: React.ReactNode;
65
+ /** DEPRECATED: The legacy method of choosing a theme. Use badgeColor instead. (optional) */
66
+ type?: string;
67
+ }
68
+
69
+ declare const Badge: ({ children, text, iconName, type, tip, size, badgeColor, color, ...rest }: TypeBadgeProps) => react_jsx_runtime.JSX.Element;
70
+
71
+ export { Badge, type TypeBadgeColor, type TypeBadgeProps, type TypeBaseBadgeProps, badgeColors, Badge as default, legacyBadgeColors };