@release-test/ui 0.3.0-alpha-feat-badge-component.14.0 → 0.3.0-alpha-fix-export-badge.18.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,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const cn = require("clsx");
5
+ const variantClassNames = {
6
+ primary: "bg-primary text-primary-foreground",
7
+ secondary: "bg-surface text-gray-900"
8
+ };
9
+ const Badge = ({ variant = "primary", children, className, ...props }) => {
10
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { ...props, "data-taco": "badge", className: cn(variantClassNames[variant], className), children });
11
+ };
12
+ exports.Badge = Badge;
13
+ //# sourceMappingURL=Badge.cjs.map
@@ -0,0 +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 {...props} data-taco=\"badge\" className={cn(variantClassNames[variant], className)}>\n {children}\n </span>\n );\n};\n"],"names":["jsx"],"mappings":";;;;AAYA,MAAM,oBAAkD;AAAA,EACpD,SAAS;AAAA,EACT,WAAW;AACf;AAKO,MAAM,QAAQ,CAAC,EAAE,UAAU,WAAW,UAAU,WAAW,GAAG,YAAwB;AACzF,SACIA,2BAAAA,IAAC,QAAA,EAAM,GAAG,OAAO,aAAU,SAAQ,WAAW,GAAG,kBAAkB,OAAO,GAAG,SAAS,GACjF,SAAA,CACL;AAER;;"}
@@ -1,2 +1,12 @@
1
- export type BadgeProps = React.HTMLAttributes<HTMLSpanElement>;
2
- export declare const Badge: ({ children, ...props }: BadgeProps) => import('react').JSX.Element;
1
+ export type BadgeVariant = 'primary' | 'secondary';
2
+ export type BadgeProps = React.HTMLAttributes<HTMLSpanElement> & {
3
+ /**
4
+ * Visual style of the badge
5
+ * @default 'primary'
6
+ */
7
+ variant?: BadgeVariant;
8
+ };
9
+ /**
10
+ * A component that displays a small badge, often used to indicate status or counts.
11
+ */
12
+ export declare const Badge: ({ variant, children, className, ...props }: BadgeProps) => import('react').JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import cn from "clsx";
3
+ const variantClassNames = {
4
+ primary: "bg-primary text-primary-foreground",
5
+ secondary: "bg-surface text-gray-900"
6
+ };
7
+ const Badge = ({ variant = "primary", children, className, ...props }) => {
8
+ return /* @__PURE__ */ jsx("span", { ...props, "data-taco": "badge", className: cn(variantClassNames[variant], className), children });
9
+ };
10
+ export {
11
+ Badge
12
+ };
13
+ //# sourceMappingURL=Badge.js.map
@@ -0,0 +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 {...props} data-taco=\"badge\" className={cn(variantClassNames[variant], className)}>\n {children}\n </span>\n );\n};\n"],"names":[],"mappings":";;AAYA,MAAM,oBAAkD;AAAA,EACpD,SAAS;AAAA,EACT,WAAW;AACf;AAKO,MAAM,QAAQ,CAAC,EAAE,UAAU,WAAW,UAAU,WAAW,GAAG,YAAwB;AACzF,SACI,oBAAC,QAAA,EAAM,GAAG,OAAO,aAAU,SAAQ,WAAW,GAAG,kBAAkB,OAAO,GAAG,SAAS,GACjF,SAAA,CACL;AAER;"}
package/dist/index.cjs CHANGED
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  ;/* empty css */
4
+ const Badge = require("./components/Badge/Badge.cjs");
4
5
  const Button = require("./components/Button/Button.cjs");
5
6
  const Card = require("./components/Card/Card.cjs");
7
+ exports.Badge = Badge.Badge;
6
8
  exports.Button = Button.Button;
7
9
  exports.Card = Card.Card;
8
10
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
+ export * from './components/Badge/Badge';
1
2
  export * from './components/Button/Button';
2
3
  export * from './components/Card/Card';
package/dist/index.js CHANGED
@@ -1,7 +1,9 @@
1
1
  /* empty css */
2
+ import { Badge } from "./components/Badge/Badge.js";
2
3
  import { Button } from "./components/Button/Button.js";
3
4
  import { Card } from "./components/Card/Card.js";
4
5
  export {
6
+ Badge,
5
7
  Button,
6
8
  Card
7
9
  };
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@release-test/ui",
3
- "version": "0.3.0-alpha-feat-badge-component.14.0",
3
+ "version": "0.3.0-alpha-fix-export-badge.18.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -27,7 +27,7 @@
27
27
  "typecheck": "tsc --noEmit"
28
28
  },
29
29
  "dependencies": {
30
- "@release-test/tokens": "0.1.1-alpha-feat-badge-component.14.0"
30
+ "@release-test/tokens": "0.1.1-alpha-fix-export-badge.18.0"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "clsx": "^2.1.1",
@@ -50,5 +50,5 @@
50
50
  "publishConfig": {
51
51
  "access": "public"
52
52
  },
53
- "gitHead": "7bc7577b8961ec54b5fa8f3eae3da24e02c23c4d"
53
+ "gitHead": "5ca32ce8e905b657cca54b7a4a869b3942b4edf6"
54
54
  }