@release-test/ui 1.0.0 → 1.1.0-alpha-feat-badge-improvements.26.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.
|
@@ -4,10 +4,19 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
4
4
|
const cn = require("clsx");
|
|
5
5
|
const variantClassNames = {
|
|
6
6
|
primary: "bg-primary text-primary-foreground",
|
|
7
|
-
secondary: "bg-surface text-gray-900"
|
|
7
|
+
secondary: "bg-surface text-gray-900 border border-surface-border"
|
|
8
8
|
};
|
|
9
9
|
const Badge = ({ variant = "primary", children, className, ...props }) => {
|
|
10
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11
|
+
"span",
|
|
12
|
+
{
|
|
13
|
+
...props,
|
|
14
|
+
"data-taco": "badge",
|
|
15
|
+
"data-variant": variant,
|
|
16
|
+
className: cn(variantClassNames[variant], "rounded-full px-2 py-1 text-xs", className),
|
|
17
|
+
children
|
|
18
|
+
}
|
|
19
|
+
);
|
|
11
20
|
};
|
|
12
21
|
exports.Badge = Badge;
|
|
13
22
|
//# sourceMappingURL=Badge.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.cjs","sources":["../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import cn from 'clsx';\n\nexport type BadgeVariant = 'primary' | 'secondary';\n\nexport type BadgeProps = React.HTMLAttributes<HTMLSpanElement> & {\n /**\n * Visual style of the badge\n * @default 'primary'\n */\n variant?: BadgeVariant;\n};\n\nconst variantClassNames: Record<BadgeVariant, string> = {\n primary: 'bg-primary text-primary-foreground',\n secondary: 'bg-surface text-gray-900',\n};\n\n/**\n * A component that displays a small badge, often used to indicate status or counts.\n */\nexport const Badge = ({ variant = 'primary', children, className, ...props }: BadgeProps) => {\n return (\n <span
|
|
1
|
+
{"version":3,"file":"Badge.cjs","sources":["../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import cn from 'clsx';\nimport * as React from 'react';\n\nexport type BadgeVariant = 'primary' | 'secondary';\n\nexport type BadgeProps = React.HTMLAttributes<HTMLSpanElement> & {\n /**\n * Visual style of the badge\n * @default 'primary'\n */\n variant?: BadgeVariant;\n};\n\nconst variantClassNames: Record<BadgeVariant, string> = {\n primary: 'bg-primary text-primary-foreground',\n secondary: 'bg-surface text-gray-900 border border-surface-border',\n};\n\n/**\n * A component that displays a small badge, often used to indicate status or counts.\n */\nexport const Badge = ({ variant = 'primary', children, className, ...props }: BadgeProps) => {\n return (\n <span\n {...props}\n data-taco=\"badge\"\n data-variant={variant}\n className={cn(variantClassNames[variant], 'rounded-full px-2 py-1 text-xs', className)}>\n {children}\n </span>\n );\n};\n"],"names":["jsx"],"mappings":";;;;AAaA,MAAM,oBAAkD;AAAA,EACpD,SAAS;AAAA,EACT,WAAW;AACf;AAKO,MAAM,QAAQ,CAAC,EAAE,UAAU,WAAW,UAAU,WAAW,GAAG,YAAwB;AACzF,SACIA,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACI,GAAG;AAAA,MACJ,aAAU;AAAA,MACV,gBAAc;AAAA,MACd,WAAW,GAAG,kBAAkB,OAAO,GAAG,kCAAkC,SAAS;AAAA,MACpF;AAAA,IAAA;AAAA,EAAA;AAGb;;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
export type BadgeVariant = 'primary' | 'secondary';
|
|
2
3
|
export type BadgeProps = React.HTMLAttributes<HTMLSpanElement> & {
|
|
3
4
|
/**
|
|
@@ -9,4 +10,4 @@ export type BadgeProps = React.HTMLAttributes<HTMLSpanElement> & {
|
|
|
9
10
|
/**
|
|
10
11
|
* A component that displays a small badge, often used to indicate status or counts.
|
|
11
12
|
*/
|
|
12
|
-
export declare const Badge: ({ variant, children, className, ...props }: BadgeProps) =>
|
|
13
|
+
export declare const Badge: ({ variant, children, className, ...props }: BadgeProps) => React.JSX.Element;
|
|
@@ -2,10 +2,19 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import cn from "clsx";
|
|
3
3
|
const variantClassNames = {
|
|
4
4
|
primary: "bg-primary text-primary-foreground",
|
|
5
|
-
secondary: "bg-surface text-gray-900"
|
|
5
|
+
secondary: "bg-surface text-gray-900 border border-surface-border"
|
|
6
6
|
};
|
|
7
7
|
const Badge = ({ variant = "primary", children, className, ...props }) => {
|
|
8
|
-
return /* @__PURE__ */ jsx(
|
|
8
|
+
return /* @__PURE__ */ jsx(
|
|
9
|
+
"span",
|
|
10
|
+
{
|
|
11
|
+
...props,
|
|
12
|
+
"data-taco": "badge",
|
|
13
|
+
"data-variant": variant,
|
|
14
|
+
className: cn(variantClassNames[variant], "rounded-full px-2 py-1 text-xs", className),
|
|
15
|
+
children
|
|
16
|
+
}
|
|
17
|
+
);
|
|
9
18
|
};
|
|
10
19
|
export {
|
|
11
20
|
Badge
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.js","sources":["../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import cn from 'clsx';\n\nexport type BadgeVariant = 'primary' | 'secondary';\n\nexport type BadgeProps = React.HTMLAttributes<HTMLSpanElement> & {\n /**\n * Visual style of the badge\n * @default 'primary'\n */\n variant?: BadgeVariant;\n};\n\nconst variantClassNames: Record<BadgeVariant, string> = {\n primary: 'bg-primary text-primary-foreground',\n secondary: 'bg-surface text-gray-900',\n};\n\n/**\n * A component that displays a small badge, often used to indicate status or counts.\n */\nexport const Badge = ({ variant = 'primary', children, className, ...props }: BadgeProps) => {\n return (\n <span
|
|
1
|
+
{"version":3,"file":"Badge.js","sources":["../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import cn from 'clsx';\nimport * as React from 'react';\n\nexport type BadgeVariant = 'primary' | 'secondary';\n\nexport type BadgeProps = React.HTMLAttributes<HTMLSpanElement> & {\n /**\n * Visual style of the badge\n * @default 'primary'\n */\n variant?: BadgeVariant;\n};\n\nconst variantClassNames: Record<BadgeVariant, string> = {\n primary: 'bg-primary text-primary-foreground',\n secondary: 'bg-surface text-gray-900 border border-surface-border',\n};\n\n/**\n * A component that displays a small badge, often used to indicate status or counts.\n */\nexport const Badge = ({ variant = 'primary', children, className, ...props }: BadgeProps) => {\n return (\n <span\n {...props}\n data-taco=\"badge\"\n data-variant={variant}\n className={cn(variantClassNames[variant], 'rounded-full px-2 py-1 text-xs', className)}>\n {children}\n </span>\n );\n};\n"],"names":[],"mappings":";;AAaA,MAAM,oBAAkD;AAAA,EACpD,SAAS;AAAA,EACT,WAAW;AACf;AAKO,MAAM,QAAQ,CAAC,EAAE,UAAU,WAAW,UAAU,WAAW,GAAG,YAAwB;AACzF,SACI;AAAA,IAAC;AAAA,IAAA;AAAA,MACI,GAAG;AAAA,MACJ,aAAU;AAAA,MACV,gBAAc;AAAA,MACd,WAAW,GAAG,kBAAkB,OAAO,GAAG,kCAAkC,SAAS;AAAA,MACpF;AAAA,IAAA;AAAA,EAAA;AAGb;"}
|
package/dist/ui.css
CHANGED
|
@@ -556,6 +556,9 @@ video {
|
|
|
556
556
|
.rounded {
|
|
557
557
|
border-radius: 0.25rem;
|
|
558
558
|
}
|
|
559
|
+
.rounded-full {
|
|
560
|
+
border-radius: 9999px;
|
|
561
|
+
}
|
|
559
562
|
.rounded-lg {
|
|
560
563
|
border-radius: 0.5rem;
|
|
561
564
|
}
|
|
@@ -584,6 +587,10 @@ video {
|
|
|
584
587
|
.p-4 {
|
|
585
588
|
padding: 1rem;
|
|
586
589
|
}
|
|
590
|
+
.px-2 {
|
|
591
|
+
padding-left: 0.5rem;
|
|
592
|
+
padding-right: 0.5rem;
|
|
593
|
+
}
|
|
587
594
|
.px-3 {
|
|
588
595
|
padding-left: 0.75rem;
|
|
589
596
|
padding-right: 0.75rem;
|
|
@@ -592,6 +599,10 @@ video {
|
|
|
592
599
|
padding-left: 1rem;
|
|
593
600
|
padding-right: 1rem;
|
|
594
601
|
}
|
|
602
|
+
.py-1 {
|
|
603
|
+
padding-top: 0.25rem;
|
|
604
|
+
padding-bottom: 0.25rem;
|
|
605
|
+
}
|
|
595
606
|
.py-3 {
|
|
596
607
|
padding-top: 0.75rem;
|
|
597
608
|
padding-bottom: 0.75rem;
|
|
@@ -604,6 +615,10 @@ video {
|
|
|
604
615
|
font-size: 0.875rem;
|
|
605
616
|
line-height: 1.25rem;
|
|
606
617
|
}
|
|
618
|
+
.text-xs {
|
|
619
|
+
font-size: 0.75rem;
|
|
620
|
+
line-height: 1rem;
|
|
621
|
+
}
|
|
607
622
|
.font-medium {
|
|
608
623
|
font-weight: 500;
|
|
609
624
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@release-test/ui",
|
|
3
|
-
"version": "1.0.0",
|
|
3
|
+
"version": "1.1.0-alpha-feat-badge-improvements.26.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"publishConfig": {
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "f48255d9bec4bf5fdd8b4601121853e95307c87f"
|
|
54
54
|
}
|