@skybin-tech/nebula-ui 0.0.15 → 0.0.16
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/cjs/components/Badge/Badge.cjs +2 -1
- package/dist/cjs/components/Badge/Badge.cjs.map +1 -1
- package/dist/cjs/components/Button/Button.cjs +2 -1
- package/dist/cjs/components/Button/Button.cjs.map +1 -1
- package/dist/cjs/index.cjs +2 -4
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/components/Badge/Badge.js +2 -2
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/Button/Button.js +2 -2
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/index.js +2 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -6,6 +6,7 @@ function Badge(props) {
|
|
|
6
6
|
return /* @__PURE__ */ jsxRuntime.jsx(badge.Badge, { ...props });
|
|
7
7
|
}
|
|
8
8
|
Badge.displayName = "Badge";
|
|
9
|
-
|
|
9
|
+
const badgeVariants = badge.badgeVariants;
|
|
10
10
|
exports.Badge = Badge;
|
|
11
|
+
exports.badgeVariants = badgeVariants;
|
|
11
12
|
//# sourceMappingURL=Badge.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.cjs","sources":["../../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import { Badge as BadgePrimitive, badgeVariants } from \"../../primitives/badge\"\nimport type { BadgeProps as BadgePrimitiveProps } from \"../../primitives/badge\"\n\nexport type BadgeProps = BadgePrimitiveProps\n\nexport function Badge(props: BadgeProps) {\n return <BadgePrimitive {...props} />\n}\nBadge.displayName = \"Badge\"\n\nexport
|
|
1
|
+
{"version":3,"file":"Badge.cjs","sources":["../../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import { Badge as BadgePrimitive, badgeVariants as badgeVariantsPrimitive } from \"../../primitives/badge\"\nimport type { BadgeProps as BadgePrimitiveProps } from \"../../primitives/badge\"\n\nexport type BadgeProps = BadgePrimitiveProps\n\nexport function Badge(props: BadgeProps) {\n return <BadgePrimitive {...props} />\n}\nBadge.displayName = \"Badge\"\n\nexport const badgeVariants = badgeVariantsPrimitive\n"],"names":["jsx","BadgePrimitive","badgeVariantsPrimitive"],"mappings":";;;;AAKO,SAAS,MAAM,OAAmB;AACvC,SAAOA,+BAACC,MAAAA,OAAA,EAAgB,GAAG,MAAA,CAAO;AACpC;AACA,MAAM,cAAc;AAEb,MAAM,gBAAgBC,MAAAA;;;"}
|
|
@@ -5,6 +5,7 @@ const React = require("react");
|
|
|
5
5
|
require("class-variance-authority");
|
|
6
6
|
const cn = require("../../utils/cn.cjs");
|
|
7
7
|
const button = require("../../primitives/button.cjs");
|
|
8
|
+
const buttonVariants = button.buttonVariants;
|
|
8
9
|
const variantMap = {
|
|
9
10
|
primary: "default",
|
|
10
11
|
secondary: "secondary",
|
|
@@ -48,6 +49,6 @@ const Button = React.forwardRef(function Button2({
|
|
|
48
49
|
);
|
|
49
50
|
});
|
|
50
51
|
Button.displayName = "Button";
|
|
51
|
-
exports.buttonVariants = button.buttonVariants;
|
|
52
52
|
exports.Button = Button;
|
|
53
|
+
exports.buttonVariants = buttonVariants;
|
|
53
54
|
//# sourceMappingURL=Button.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.cjs","sources":["../../../../src/components/Button/Button.tsx"],"sourcesContent":["import { forwardRef, type ButtonHTMLAttributes, type ReactNode } from \"react\";\nimport { type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../../utils/cn\";\nimport { ButtonPrimitive, buttonVariants } from \"../../primitives/button\"\n\nexport
|
|
1
|
+
{"version":3,"file":"Button.cjs","sources":["../../../../src/components/Button/Button.tsx"],"sourcesContent":["import { forwardRef, type ButtonHTMLAttributes, type ReactNode } from \"react\";\nimport { type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../../utils/cn\";\nimport { ButtonPrimitive, buttonVariants as buttonVariantsPrimitive } from \"../../primitives/button\"\n\nexport const buttonVariants = buttonVariantsPrimitive;\n\ntype PrimitiveVariant = NonNullable<VariantProps<typeof buttonVariants>[\"variant\"]>;\ntype PrimitiveSize = NonNullable<VariantProps<typeof buttonVariants>[\"size\"]>;\n\nconst variantMap: Record<string, PrimitiveVariant> = {\n primary: \"default\",\n secondary: \"secondary\",\n outline: \"outline\",\n ghost: \"ghost\",\n danger: \"destructive\",\n};\n\nconst sizeMap: Record<string, PrimitiveSize> = {\n sm: \"sm\",\n md: \"default\",\n lg: \"lg\",\n};\n\nexport interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** Visual style variant */\n variant?: keyof typeof variantMap;\n /** Size of the button */\n size?: keyof typeof sizeMap;\n /** Stretch button to full container width */\n fullWidth?: boolean;\n /** Show a loading spinner and disable interaction */\n loading?: boolean;\n /** Render as child element via Slot (e.g. wrap a Link) */\n asChild?: boolean;\n children: ReactNode;\n}\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n children,\n variant = \"primary\",\n size = \"md\",\n fullWidth = false,\n loading = false,\n disabled,\n className,\n asChild = false,\n style,\n ...props\n },\n ref\n) {\n return (\n <ButtonPrimitive\n ref={ref}\n variant={variantMap[variant]}\n size={sizeMap[size]}\n asChild={asChild}\n disabled={disabled || loading}\n className={cn(fullWidth && \"w-full\", \"relative cursor-pointer\", className)}\n style={style}\n {...props}\n >\n {asChild ? (\n children\n ) : (\n <>\n {loading && (\n <span className=\"absolute inset-0 flex items-center justify-center\">\n <span className=\"size-4 border-2 border-current border-r-transparent rounded-full animate-spin\" />\n </span>\n )}\n <span className={cn(loading && \"invisible\")}>{children}</span>\n </>\n )}\n </ButtonPrimitive>\n );\n});\n\nButton.displayName = \"Button\";\n"],"names":["buttonVariantsPrimitive","forwardRef","Button","jsx","ButtonPrimitive","cn","jsxs","Fragment"],"mappings":";;;;;;;AAKO,MAAM,iBAAiBA,OAAAA;AAK9B,MAAM,aAA+C;AAAA,EACnD,SAAS;AAAA,EACT,WAAW;AAAA,EACX,SAAS;AAAA,EACT,OAAO;AAAA,EACP,QAAQ;AACV;AAEA,MAAM,UAAyC;AAAA,EAC7C,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAgBO,MAAM,SAASC,MAAAA,WAA2C,SAASC,QACxE;AAAA,EACE;AAAA,EACA,UAAU;AAAA,EACV,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,SACEC,2BAAAA;AAAAA,IAACC,OAAAA;AAAAA,IAAA;AAAA,MACC;AAAA,MACA,SAAS,WAAW,OAAO;AAAA,MAC3B,MAAM,QAAQ,IAAI;AAAA,MAClB;AAAA,MACA,UAAU,YAAY;AAAA,MACtB,WAAWC,GAAAA,GAAG,aAAa,UAAU,2BAA2B,SAAS;AAAA,MACzE;AAAA,MACC,GAAG;AAAA,MAEH,UAAA,UACC,WAEAC,2BAAAA,KAAAC,WAAAA,UAAA,EACG,UAAA;AAAA,QAAA,WACCJ,2BAAAA,IAAC,UAAK,WAAU,qDACd,yCAAC,QAAA,EAAK,WAAU,iFAAgF,EAAA,CAClG;AAAA,uCAED,QAAA,EAAK,WAAWE,GAAAA,GAAG,WAAW,WAAW,GAAI,SAAA,CAAS;AAAA,MAAA,EAAA,CACzD;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC;AAED,OAAO,cAAc;;;"}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -17,8 +17,6 @@ const Separator = require("./components/Separator/Separator.cjs");
|
|
|
17
17
|
const Switch = require("./components/Form/Switch.cjs");
|
|
18
18
|
const TextArea = require("./components/Form/TextArea.cjs");
|
|
19
19
|
const TextBox = require("./components/Form/TextBox.cjs");
|
|
20
|
-
const badge = require("./primitives/badge.cjs");
|
|
21
|
-
const button = require("./primitives/button.cjs");
|
|
22
20
|
const hooks = require("./components/Form/hooks.cjs");
|
|
23
21
|
exports.useToggle = useToggle.useToggle;
|
|
24
22
|
exports.useDebounce = useDebounce.useDebounce;
|
|
@@ -27,7 +25,9 @@ exports.Avatar = Avatar.Avatar;
|
|
|
27
25
|
exports.AvatarFallback = Avatar.AvatarFallback;
|
|
28
26
|
exports.AvatarImage = Avatar.AvatarImage;
|
|
29
27
|
exports.Badge = Badge.Badge;
|
|
28
|
+
exports.badgeVariants = Badge.badgeVariants;
|
|
30
29
|
exports.Button = Button.Button;
|
|
30
|
+
exports.buttonVariants = Button.buttonVariants;
|
|
31
31
|
exports.Card = Card.Card;
|
|
32
32
|
exports.CardContent = Card.CardContent;
|
|
33
33
|
exports.CardDescription = Card.CardDescription;
|
|
@@ -62,8 +62,6 @@ exports.Separator = Separator.Separator;
|
|
|
62
62
|
exports.Switch = Switch.Switch;
|
|
63
63
|
exports.TextArea = TextArea.TextArea;
|
|
64
64
|
exports.TextBox = TextBox.TextBox;
|
|
65
|
-
exports.badgeVariants = badge.badgeVariants;
|
|
66
|
-
exports.buttonVariants = button.buttonVariants;
|
|
67
65
|
exports.useFieldError = hooks.useFieldError;
|
|
68
66
|
exports.useForm = hooks.useForm;
|
|
69
67
|
exports.useFormConfig = hooks.useFormConfig;
|
package/dist/cjs/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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Badge as Badge$1 } from "../../primitives/badge.js";
|
|
3
|
-
import { badgeVariants } from "../../primitives/badge.js";
|
|
2
|
+
import { badgeVariants as badgeVariants$1, Badge as Badge$1 } from "../../primitives/badge.js";
|
|
4
3
|
function Badge(props) {
|
|
5
4
|
return /* @__PURE__ */ jsx(Badge$1, { ...props });
|
|
6
5
|
}
|
|
7
6
|
Badge.displayName = "Badge";
|
|
7
|
+
const badgeVariants = badgeVariants$1;
|
|
8
8
|
export {
|
|
9
9
|
Badge,
|
|
10
10
|
badgeVariants
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.js","sources":["../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import { Badge as BadgePrimitive, badgeVariants } from \"../../primitives/badge\"\nimport type { BadgeProps as BadgePrimitiveProps } from \"../../primitives/badge\"\n\nexport type BadgeProps = BadgePrimitiveProps\n\nexport function Badge(props: BadgeProps) {\n return <BadgePrimitive {...props} />\n}\nBadge.displayName = \"Badge\"\n\nexport
|
|
1
|
+
{"version":3,"file":"Badge.js","sources":["../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import { Badge as BadgePrimitive, badgeVariants as badgeVariantsPrimitive } from \"../../primitives/badge\"\nimport type { BadgeProps as BadgePrimitiveProps } from \"../../primitives/badge\"\n\nexport type BadgeProps = BadgePrimitiveProps\n\nexport function Badge(props: BadgeProps) {\n return <BadgePrimitive {...props} />\n}\nBadge.displayName = \"Badge\"\n\nexport const badgeVariants = badgeVariantsPrimitive\n"],"names":["BadgePrimitive","badgeVariantsPrimitive"],"mappings":";;AAKO,SAAS,MAAM,OAAmB;AACvC,SAAO,oBAACA,SAAA,EAAgB,GAAG,MAAA,CAAO;AACpC;AACA,MAAM,cAAc;AAEb,MAAM,gBAAgBC;"}
|
|
@@ -2,8 +2,8 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import "class-variance-authority";
|
|
4
4
|
import { cn } from "../../utils/cn.js";
|
|
5
|
-
import { ButtonPrimitive } from "../../primitives/button.js";
|
|
6
|
-
|
|
5
|
+
import { buttonVariants as buttonVariants$1, ButtonPrimitive } from "../../primitives/button.js";
|
|
6
|
+
const buttonVariants = buttonVariants$1;
|
|
7
7
|
const variantMap = {
|
|
8
8
|
primary: "default",
|
|
9
9
|
secondary: "secondary",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import { forwardRef, type ButtonHTMLAttributes, type ReactNode } from \"react\";\nimport { type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../../utils/cn\";\nimport { ButtonPrimitive, buttonVariants } from \"../../primitives/button\"\n\nexport
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import { forwardRef, type ButtonHTMLAttributes, type ReactNode } from \"react\";\nimport { type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../../utils/cn\";\nimport { ButtonPrimitive, buttonVariants as buttonVariantsPrimitive } from \"../../primitives/button\"\n\nexport const buttonVariants = buttonVariantsPrimitive;\n\ntype PrimitiveVariant = NonNullable<VariantProps<typeof buttonVariants>[\"variant\"]>;\ntype PrimitiveSize = NonNullable<VariantProps<typeof buttonVariants>[\"size\"]>;\n\nconst variantMap: Record<string, PrimitiveVariant> = {\n primary: \"default\",\n secondary: \"secondary\",\n outline: \"outline\",\n ghost: \"ghost\",\n danger: \"destructive\",\n};\n\nconst sizeMap: Record<string, PrimitiveSize> = {\n sm: \"sm\",\n md: \"default\",\n lg: \"lg\",\n};\n\nexport interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** Visual style variant */\n variant?: keyof typeof variantMap;\n /** Size of the button */\n size?: keyof typeof sizeMap;\n /** Stretch button to full container width */\n fullWidth?: boolean;\n /** Show a loading spinner and disable interaction */\n loading?: boolean;\n /** Render as child element via Slot (e.g. wrap a Link) */\n asChild?: boolean;\n children: ReactNode;\n}\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n children,\n variant = \"primary\",\n size = \"md\",\n fullWidth = false,\n loading = false,\n disabled,\n className,\n asChild = false,\n style,\n ...props\n },\n ref\n) {\n return (\n <ButtonPrimitive\n ref={ref}\n variant={variantMap[variant]}\n size={sizeMap[size]}\n asChild={asChild}\n disabled={disabled || loading}\n className={cn(fullWidth && \"w-full\", \"relative cursor-pointer\", className)}\n style={style}\n {...props}\n >\n {asChild ? (\n children\n ) : (\n <>\n {loading && (\n <span className=\"absolute inset-0 flex items-center justify-center\">\n <span className=\"size-4 border-2 border-current border-r-transparent rounded-full animate-spin\" />\n </span>\n )}\n <span className={cn(loading && \"invisible\")}>{children}</span>\n </>\n )}\n </ButtonPrimitive>\n );\n});\n\nButton.displayName = \"Button\";\n"],"names":["buttonVariantsPrimitive","Button"],"mappings":";;;;;AAKO,MAAM,iBAAiBA;AAK9B,MAAM,aAA+C;AAAA,EACnD,SAAS;AAAA,EACT,WAAW;AAAA,EACX,SAAS;AAAA,EACT,OAAO;AAAA,EACP,QAAQ;AACV;AAEA,MAAM,UAAyC;AAAA,EAC7C,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAgBO,MAAM,SAAS,WAA2C,SAASC,QACxE;AAAA,EACE;AAAA,EACA,UAAU;AAAA,EACV,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,SAAS,WAAW,OAAO;AAAA,MAC3B,MAAM,QAAQ,IAAI;AAAA,MAClB;AAAA,MACA,UAAU,YAAY;AAAA,MACtB,WAAW,GAAG,aAAa,UAAU,2BAA2B,SAAS;AAAA,MACzE;AAAA,MACC,GAAG;AAAA,MAEH,UAAA,UACC,WAEA,qBAAA,UAAA,EACG,UAAA;AAAA,QAAA,WACC,oBAAC,UAAK,WAAU,qDACd,8BAAC,QAAA,EAAK,WAAU,iFAAgF,EAAA,CAClG;AAAA,4BAED,QAAA,EAAK,WAAW,GAAG,WAAW,WAAW,GAAI,SAAA,CAAS;AAAA,MAAA,EAAA,CACzD;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC;AAED,OAAO,cAAc;"}
|
package/dist/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import { useToggle } from "./hooks/useToggle.js";
|
|
|
2
2
|
import { useDebounce } from "./hooks/useDebounce.js";
|
|
3
3
|
import { cn } from "./utils/cn.js";
|
|
4
4
|
import { Avatar, AvatarFallback, AvatarImage } from "./components/Avatar/Avatar.js";
|
|
5
|
-
import { Badge } from "./components/Badge/Badge.js";
|
|
6
|
-
import { Button } from "./components/Button/Button.js";
|
|
5
|
+
import { Badge, badgeVariants } from "./components/Badge/Badge.js";
|
|
6
|
+
import { Button, buttonVariants } from "./components/Button/Button.js";
|
|
7
7
|
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "./components/Card/Card.js";
|
|
8
8
|
import { Checkbox } from "./components/Form/Checkbox.js";
|
|
9
9
|
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./components/DropdownMenu/DropdownMenu.js";
|
|
@@ -15,8 +15,6 @@ import { Separator } from "./components/Separator/Separator.js";
|
|
|
15
15
|
import { Switch } from "./components/Form/Switch.js";
|
|
16
16
|
import { TextArea } from "./components/Form/TextArea.js";
|
|
17
17
|
import { TextBox } from "./components/Form/TextBox.js";
|
|
18
|
-
import { badgeVariants } from "./primitives/badge.js";
|
|
19
|
-
import { buttonVariants } from "./primitives/button.js";
|
|
20
18
|
import { useFieldError, useForm, useFormConfig, useFormField } from "./components/Form/hooks.js";
|
|
21
19
|
export {
|
|
22
20
|
Avatar,
|
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