@pathscale/ui 1.1.25 → 1.1.26
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.
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
flex-shrink: 0;
|
|
5
5
|
align-items: center;
|
|
6
6
|
justify-content: center;
|
|
7
|
-
gap: 0.
|
|
7
|
+
gap: 0.25rem;
|
|
8
8
|
font-weight: 500;
|
|
9
9
|
|
|
10
10
|
min-height: 1.75rem;
|
|
11
11
|
min-width: 1.75rem;
|
|
12
|
-
|
|
12
|
+
padding-inline: 0.625rem;
|
|
13
|
+
border-radius: 9999px;
|
|
13
14
|
font-size: 0.75rem;
|
|
14
15
|
line-height: 1.34;
|
|
15
16
|
|
|
@@ -23,7 +24,6 @@
|
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
.badge__label {
|
|
26
|
-
padding-inline: 0.125rem;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.badge-anchor {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
.badge--lg {
|
|
36
36
|
min-height: 2rem;
|
|
37
37
|
min-width: 2rem;
|
|
38
|
-
|
|
38
|
+
padding-inline: 0.75rem;
|
|
39
39
|
font-size: 0.875rem;
|
|
40
40
|
line-height: 1.43;
|
|
41
41
|
}
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
.badge--sm {
|
|
48
48
|
min-height: 1rem;
|
|
49
49
|
min-width: 1rem;
|
|
50
|
-
|
|
50
|
+
padding-inline: 0.375rem;
|
|
51
51
|
font-size: 10px;
|
|
52
52
|
line-height: 1.34;
|
|
53
53
|
}
|
|
@@ -8,7 +8,7 @@ declare const BadgeAnchor: (props: BadgeAnchorProps) => JSX.Element;
|
|
|
8
8
|
type BadgeColor = "default" | "accent" | "success" | "warning" | "danger";
|
|
9
9
|
type BadgeVariant = "primary" | "secondary" | "soft";
|
|
10
10
|
type BadgeSize = "sm" | "md" | "lg";
|
|
11
|
-
type BadgePlacement = "top-right" | "top-left" | "bottom-right" | "bottom-left";
|
|
11
|
+
type BadgePlacement = "none" | "top-right" | "top-left" | "bottom-right" | "bottom-left";
|
|
12
12
|
interface BadgeRootProps extends Omit<JSX.HTMLAttributes<HTMLSpanElement>, "color"> {
|
|
13
13
|
class?: string;
|
|
14
14
|
children?: JSX.Element;
|
|
@@ -39,6 +39,7 @@ const BADGE_VARIANT_CLASS = {
|
|
|
39
39
|
soft: "badge--soft"
|
|
40
40
|
};
|
|
41
41
|
const BADGE_PLACEMENT_CLASS = {
|
|
42
|
+
none: "",
|
|
42
43
|
"top-right": "badge--top-right",
|
|
43
44
|
"top-left": "badge--top-left",
|
|
44
45
|
"bottom-right": "badge--bottom-right",
|
|
@@ -57,7 +58,7 @@ const BadgeRoot = (props)=>{
|
|
|
57
58
|
const size = local.size ?? "md";
|
|
58
59
|
const color = local.color ?? "default";
|
|
59
60
|
const variant = local.variant ?? "primary";
|
|
60
|
-
const placement = local.placement ?? "
|
|
61
|
+
const placement = local.placement ?? "none";
|
|
61
62
|
return (0, __WEBPACK_EXTERNAL_MODULE_tailwind_merge_e05e3e95__.twMerge)((0, __WEBPACK_EXTERNAL_MODULE_clsx__.clsx)("badge", BADGE_SIZE_CLASS[size], BADGE_COLOR_CLASS[color], BADGE_VARIANT_CLASS[variant], BADGE_PLACEMENT_CLASS[placement], local.class));
|
|
62
63
|
};
|
|
63
64
|
const badgeChildren = ()=>{
|