@release-test/ui 0.3.0-canary.16.0 → 0.3.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.
- package/dist/components/Badge/Badge.cjs +13 -0
- package/dist/components/Badge/Badge.cjs.map +1 -0
- package/dist/components/Badge/Badge.js +13 -0
- package/dist/components/Badge/Badge.js.map +1 -0
- package/dist/components/Button/Button.cjs +1 -2
- package/dist/components/Button/Button.cjs.map +1 -1
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.js +1 -2
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/ui.css +0 -7
- package/package.json +3 -3
|
@@ -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;;"}
|
|
@@ -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;"}
|
|
@@ -23,8 +23,7 @@ const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
|
23
23
|
const variantClassNames = {
|
|
24
24
|
primary: "bg-primary text-primary-foreground hover:bg-primary-hover",
|
|
25
25
|
secondary: "border border-surface-border bg-surface text-gray-900 hover:bg-gray-50",
|
|
26
|
-
danger: "bg-danger text-danger-foreground hover:bg-danger-hover"
|
|
27
|
-
ghost: "bg-transparent text-gray-900 hover:bg-gray-100"
|
|
26
|
+
danger: "bg-danger text-danger-foreground hover:bg-danger-hover"
|
|
28
27
|
};
|
|
29
28
|
const Button = React__namespace.forwardRef(function Button2(props, ref) {
|
|
30
29
|
const { variant = "secondary", type = "button", className, ...otherProps } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.cjs","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import cn from 'clsx';\nimport * as React from 'react';\n\nexport type ButtonVariant = 'primary' | 'secondary' | 'danger'
|
|
1
|
+
{"version":3,"file":"Button.cjs","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import cn from 'clsx';\nimport * as React from 'react';\n\nexport type ButtonVariant = 'primary' | 'secondary' | 'danger';\n\nexport type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {\n /** Visual style of the button */\n variant?: ButtonVariant;\n};\n\nconst variantClassNames: Record<ButtonVariant, string> = {\n primary: 'bg-primary text-primary-foreground hover:bg-primary-hover',\n secondary: 'border border-surface-border bg-surface text-gray-900 hover:bg-gray-50',\n danger: 'bg-danger text-danger-foreground hover:bg-danger-hover',\n};\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(function Button(props, ref) {\n const { variant = 'secondary', type = 'button', className, ...otherProps } = props;\n\n return (\n <button\n {...otherProps}\n className={cn(\n 'inline-flex h-8 items-center justify-center rounded px-3 text-sm font-medium disabled:cursor-not-allowed disabled:opacity-50',\n variantClassNames[variant],\n className\n )}\n data-taco=\"button\"\n data-variant={variant}\n ref={ref}\n type={type}\n />\n );\n});\n"],"names":["React","Button","jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAUA,MAAM,oBAAmD;AAAA,EACrD,SAAS;AAAA,EACT,WAAW;AAAA,EACX,QAAQ;AACZ;AAEO,MAAM,SAASA,iBAAM,WAA2C,SAASC,QAAO,OAAO,KAAK;AAC/F,QAAM,EAAE,UAAU,aAAa,OAAO,UAAU,WAAW,GAAG,eAAe;AAE7E,SACIC,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACI,GAAG;AAAA,MACJ,WAAW;AAAA,QACP;AAAA,QACA,kBAAkB,OAAO;AAAA,QACzB;AAAA,MAAA;AAAA,MAEJ,aAAU;AAAA,MACV,gBAAc;AAAA,MACd;AAAA,MACA;AAAA,IAAA;AAAA,EAAA;AAGZ,CAAC;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export type ButtonVariant = 'primary' | 'secondary' | 'danger'
|
|
2
|
+
export type ButtonVariant = 'primary' | 'secondary' | 'danger';
|
|
3
3
|
export type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
4
4
|
/** Visual style of the button */
|
|
5
5
|
variant?: ButtonVariant;
|
|
@@ -4,8 +4,7 @@ import * as React from "react";
|
|
|
4
4
|
const variantClassNames = {
|
|
5
5
|
primary: "bg-primary text-primary-foreground hover:bg-primary-hover",
|
|
6
6
|
secondary: "border border-surface-border bg-surface text-gray-900 hover:bg-gray-50",
|
|
7
|
-
danger: "bg-danger text-danger-foreground hover:bg-danger-hover"
|
|
8
|
-
ghost: "bg-transparent text-gray-900 hover:bg-gray-100"
|
|
7
|
+
danger: "bg-danger text-danger-foreground hover:bg-danger-hover"
|
|
9
8
|
};
|
|
10
9
|
const Button = React.forwardRef(function Button2(props, ref) {
|
|
11
10
|
const { variant = "secondary", type = "button", className, ...otherProps } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import cn from 'clsx';\nimport * as React from 'react';\n\nexport type ButtonVariant = 'primary' | 'secondary' | 'danger'
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import cn from 'clsx';\nimport * as React from 'react';\n\nexport type ButtonVariant = 'primary' | 'secondary' | 'danger';\n\nexport type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {\n /** Visual style of the button */\n variant?: ButtonVariant;\n};\n\nconst variantClassNames: Record<ButtonVariant, string> = {\n primary: 'bg-primary text-primary-foreground hover:bg-primary-hover',\n secondary: 'border border-surface-border bg-surface text-gray-900 hover:bg-gray-50',\n danger: 'bg-danger text-danger-foreground hover:bg-danger-hover',\n};\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(function Button(props, ref) {\n const { variant = 'secondary', type = 'button', className, ...otherProps } = props;\n\n return (\n <button\n {...otherProps}\n className={cn(\n 'inline-flex h-8 items-center justify-center rounded px-3 text-sm font-medium disabled:cursor-not-allowed disabled:opacity-50',\n variantClassNames[variant],\n className\n )}\n data-taco=\"button\"\n data-variant={variant}\n ref={ref}\n type={type}\n />\n );\n});\n"],"names":["Button"],"mappings":";;;AAUA,MAAM,oBAAmD;AAAA,EACrD,SAAS;AAAA,EACT,WAAW;AAAA,EACX,QAAQ;AACZ;AAEO,MAAM,SAAS,MAAM,WAA2C,SAASA,QAAO,OAAO,KAAK;AAC/F,QAAM,EAAE,UAAU,aAAa,OAAO,UAAU,WAAW,GAAG,eAAe;AAE7E,SACI;AAAA,IAAC;AAAA,IAAA;AAAA,MACI,GAAG;AAAA,MACJ,WAAW;AAAA,QACP;AAAA,QACA,kBAAkB,OAAO;AAAA,QACzB;AAAA,MAAA;AAAA,MAEJ,aAAU;AAAA,MACV,gBAAc;AAAA,MACd;AAAA,MACA;AAAA,IAAA;AAAA,EAAA;AAGZ,CAAC;"}
|
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
|
package/dist/index.cjs.map
CHANGED
|
@@ -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
package/dist/index.js
CHANGED
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/dist/ui.css
CHANGED
|
@@ -581,9 +581,6 @@ video {
|
|
|
581
581
|
--tw-bg-opacity: 1;
|
|
582
582
|
background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
|
|
583
583
|
}
|
|
584
|
-
.bg-transparent {
|
|
585
|
-
background-color: transparent;
|
|
586
|
-
}
|
|
587
584
|
.p-4 {
|
|
588
585
|
padding: 1rem;
|
|
589
586
|
}
|
|
@@ -629,10 +626,6 @@ video {
|
|
|
629
626
|
--tw-bg-opacity: 1;
|
|
630
627
|
background-color: rgb(153 27 27 / var(--tw-bg-opacity, 1));
|
|
631
628
|
}
|
|
632
|
-
.hover\:bg-gray-100:hover {
|
|
633
|
-
--tw-bg-opacity: 1;
|
|
634
|
-
background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1));
|
|
635
|
-
}
|
|
636
629
|
.hover\:bg-gray-50:hover {
|
|
637
630
|
--tw-bg-opacity: 1;
|
|
638
631
|
background-color: rgb(249 250 251 / var(--tw-bg-opacity, 1));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@release-test/ui",
|
|
3
|
-
"version": "0.3.0
|
|
3
|
+
"version": "0.3.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
|
|
30
|
+
"@release-test/tokens": "^0.1.1"
|
|
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": "
|
|
53
|
+
"gitHead": "8885e75c9239131db58d885a9cd5acc304b05f80"
|
|
54
54
|
}
|