@getgreenline/blaze-ui 1.0.7 → 1.0.9
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/{build → dist}/components/button.d.ts +2 -3
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +31 -0
- package/dist/components/card.js +24 -0
- package/dist/components/checkbox.d.ts +5 -0
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +9 -0
- package/dist/components/input.d.ts +4 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +6 -0
- package/dist/components/label.d.ts +5 -0
- package/{build → dist}/components/label.d.ts.map +1 -1
- package/dist/components/label.js +8 -0
- package/dist/components/popover.d.ts +8 -0
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +17 -0
- package/dist/components/switch.d.ts +5 -0
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +8 -0
- package/dist/globals.css +127 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/lib/utils.js +5 -0
- package/package.json +46 -33
- package/README.md +0 -69
- package/build/components/button.d.ts.map +0 -1
- package/build/components/button.js +0 -106
- package/build/components/button.js.map +0 -1
- package/build/components/card.js +0 -51
- package/build/components/card.js.map +0 -1
- package/build/components/input.d.ts +0 -4
- package/build/components/input.d.ts.map +0 -1
- package/build/components/input.js +0 -57
- package/build/components/input.js.map +0 -1
- package/build/components/label.d.ts +0 -5
- package/build/components/label.js +0 -60
- package/build/components/label.js.map +0 -1
- package/build/components/popover.d.ts +0 -8
- package/build/components/popover.d.ts.map +0 -1
- package/build/components/popover.js +0 -69
- package/build/components/popover.js.map +0 -1
- package/build/components/segmented-control.d.ts +0 -24
- package/build/components/segmented-control.d.ts.map +0 -1
- package/build/components/segmented-control.js +0 -94
- package/build/components/segmented-control.js.map +0 -1
- package/build/components/switch.d.ts +0 -27
- package/build/components/switch.d.ts.map +0 -1
- package/build/components/switch.js +0 -72
- package/build/components/switch.js.map +0 -1
- package/build/index.d.ts +0 -9
- package/build/index.d.ts.map +0 -1
- package/build/index.js +0 -32
- package/build/index.js.map +0 -1
- package/build/index.mjs +0 -22
- package/build/lib/utils.js +0 -9
- package/build/lib/utils.js.map +0 -1
- package/src/styles/blaze-ui.css +0 -320
- package/tailwind.config.js +0 -6
- /package/{build → dist}/components/card.d.ts +0 -0
- /package/{build → dist}/components/card.d.ts.map +0 -0
- /package/{build → dist}/lib/utils.d.ts +0 -0
- /package/{build → dist}/lib/utils.d.ts.map +0 -0
|
@@ -3,10 +3,9 @@ import { type VariantProps } from "class-variance-authority";
|
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
4
|
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
5
5
|
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
6
|
-
} & import("class-variance-authority/
|
|
7
|
-
declare function Button({ className, variant, size, asChild,
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
8
8
|
asChild?: boolean;
|
|
9
|
-
loading?: boolean;
|
|
10
9
|
}): import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
export { Button, buttonVariants };
|
|
12
11
|
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,QAAA,MAAM,cAAc;;;8EA6BnB,CAAA;AAED,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAO,EACP,IAAI,EACJ,OAAe,EACf,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,GAC/B,YAAY,CAAC,OAAO,cAAc,CAAC,GAAG;IACpC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,2CAUF;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { cn } from "../lib/utils";
|
|
5
|
+
const buttonVariants = cva("tw:inline-flex tw:items-center tw:justify-center tw:gap-2 tw:whitespace-nowrap tw:rounded-md tw:text-sm tw:font-medium tw:transition-all tw:disabled:pointer-events-none tw:disabled:opacity-50 tw:[&_svg]:pointer-events-none tw:[&_svg:not([class*='size-'])]:size-4 tw:shrink-0 tw:[&_svg]:shrink-0 tw:outline-none tw:focus-visible:border-ring tw:focus-visible:ring-ring/50 tw:focus-visible:ring-[3px] tw:aria-invalid:ring-destructive/20 tw:dark:aria-invalid:ring-destructive/40 tw:aria-invalid:border-destructive", {
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
default: "tw:bg-primary tw:text-primary-foreground tw:shadow-xs tw:hover:bg-primary/90",
|
|
9
|
+
destructive: "tw:bg-destructive tw:text-white tw:shadow-xs tw:hover:bg-destructive/90 tw:focus-visible:ring-destructive/20 tw:dark:focus-visible:ring-destructive/40 tw:dark:bg-destructive/60",
|
|
10
|
+
outline: "tw:border tw:bg-background tw:shadow-xs tw:hover:bg-accent tw:hover:text-accent-foreground tw:dark:bg-input/30 tw:dark:border-input tw:dark:hover:bg-input/50",
|
|
11
|
+
secondary: "tw:bg-secondary tw:text-secondary-foreground tw:shadow-xs tw:hover:bg-secondary/80",
|
|
12
|
+
ghost: "tw:hover:bg-accent tw:hover:text-accent-foreground tw:dark:hover:bg-accent/50",
|
|
13
|
+
link: "tw:text-primary tw:underline-offset-4 tw:hover:underline",
|
|
14
|
+
},
|
|
15
|
+
size: {
|
|
16
|
+
default: "tw:h-9 tw:px-4 tw:py-2 tw:has-[>svg]:px-3",
|
|
17
|
+
sm: "tw:h-8 tw:rounded-md tw:gap-1.5 tw:px-3 tw:has-[>svg]:px-2.5",
|
|
18
|
+
lg: "tw:h-10 tw:rounded-md tw:px-6 tw:has-[>svg]:px-4",
|
|
19
|
+
icon: "tw:size-9",
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
variant: "default",
|
|
24
|
+
size: "default",
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
function Button({ className, variant, size, asChild = false, ...props }) {
|
|
28
|
+
const Comp = asChild ? Slot : "button";
|
|
29
|
+
return (_jsx(Comp, { "data-slot": "button", className: cn(buttonVariants({ variant, size, className })), ...props }));
|
|
30
|
+
}
|
|
31
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/utils";
|
|
3
|
+
function Card({ className, ...props }) {
|
|
4
|
+
return (_jsx("div", { "data-slot": "card", className: cn("tw:bg-card tw:text-card-foreground tw:flex tw:flex-col tw:gap-6 tw:rounded-xl tw:border tw:py-6 tw:shadow-sm", className), ...props }));
|
|
5
|
+
}
|
|
6
|
+
function CardHeader({ className, ...props }) {
|
|
7
|
+
return (_jsx("div", { "data-slot": "card-header", className: cn("tw:@container/card-header tw:grid tw:auto-rows-min tw:grid-rows-[auto_auto] tw:items-start tw:gap-1.5 tw:px-6 tw:has-data-[slot=card-action]:grid-cols-[1fr_auto] tw:[.border-b]:pb-6", className), ...props }));
|
|
8
|
+
}
|
|
9
|
+
function CardTitle({ className, ...props }) {
|
|
10
|
+
return (_jsx("div", { "data-slot": "card-title", className: cn("tw:leading-none tw:font-semibold", className), ...props }));
|
|
11
|
+
}
|
|
12
|
+
function CardDescription({ className, ...props }) {
|
|
13
|
+
return (_jsx("div", { "data-slot": "card-description", className: cn("tw:text-muted-foreground tw:text-sm", className), ...props }));
|
|
14
|
+
}
|
|
15
|
+
function CardAction({ className, ...props }) {
|
|
16
|
+
return (_jsx("div", { "data-slot": "card-action", className: cn("tw:col-start-2 tw:row-span-2 tw:row-start-1 tw:self-start tw:justify-self-end", className), ...props }));
|
|
17
|
+
}
|
|
18
|
+
function CardContent({ className, ...props }) {
|
|
19
|
+
return (_jsx("div", { "data-slot": "card-content", className: cn("tw:px-6", className), ...props }));
|
|
20
|
+
}
|
|
21
|
+
function CardFooter({ className, ...props }) {
|
|
22
|
+
return (_jsx("div", { "data-slot": "card-footer", className: cn("tw:flex tw:items-center tw:px-6 tw:[.border-t]:pt-6", className), ...props }));
|
|
23
|
+
}
|
|
24
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
3
|
+
declare function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export { Checkbox };
|
|
5
|
+
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/components/checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAA;AAK7D,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC,2CAkBrD;AAED,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
4
|
+
import { CheckIcon } from "lucide-react";
|
|
5
|
+
import { cn } from "../lib/utils";
|
|
6
|
+
function Checkbox({ className, ...props }) {
|
|
7
|
+
return (_jsx(CheckboxPrimitive.Root, { "data-slot": "checkbox", className: cn("tw:peer tw:border-input tw:dark:bg-input/30 tw:data-[state=checked]:bg-primary tw:data-[state=checked]:text-primary-foreground tw:dark:data-[state=checked]:bg-primary tw:data-[state=checked]:border-primary tw:focus-visible:border-ring tw:focus-visible:ring-ring/50 tw:aria-invalid:ring-destructive/20 tw:dark:aria-invalid:ring-destructive/40 tw:aria-invalid:border-destructive tw:size-4 tw:shrink-0 tw:rounded-[4px] tw:border tw:shadow-xs tw:transition-shadow tw:outline-none tw:focus-visible:ring-[3px] tw:disabled:cursor-not-allowed tw:disabled:opacity-50", className), ...props, children: _jsx(CheckboxPrimitive.Indicator, { "data-slot": "checkbox-indicator", className: "tw:flex tw:items-center tw:justify-center tw:text-current tw:transition-none", children: _jsx(CheckIcon, { className: "tw:size-3.5" }) }) }));
|
|
8
|
+
}
|
|
9
|
+
export { Checkbox };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/components/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,2CAc1E;AAED,OAAO,EAAE,KAAK,EAAE,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/utils";
|
|
3
|
+
function Input({ className, type, ...props }) {
|
|
4
|
+
return (_jsx("input", { type: type, "data-slot": "input", className: cn("tw:file:text-foreground tw:placeholder:text-muted-foreground tw:selection:bg-primary tw:selection:text-primary-foreground tw:dark:bg-input/30 tw:border-input tw:h-9 tw:w-full tw:min-w-0 tw:rounded-md tw:border tw:bg-transparent tw:px-3 tw:py-1 tw:text-base tw:shadow-xs tw:transition-[color,box-shadow] tw:outline-none tw:file:inline-flex tw:file:h-7 tw:file:border-0 tw:file:bg-transparent tw:file:text-sm tw:file:font-medium tw:disabled:pointer-events-none tw:disabled:cursor-not-allowed tw:disabled:opacity-50 tw:md:text-sm", "tw:focus-visible:border-ring tw:focus-visible:ring-ring/50 tw:focus-visible:ring-[3px]", "tw:aria-invalid:ring-destructive/20 tw:dark:aria-invalid:ring-destructive/40 tw:aria-invalid:border-destructive", className), ...props }));
|
|
5
|
+
}
|
|
6
|
+
export { Input };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
|
+
declare function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export { Label };
|
|
5
|
+
//# sourceMappingURL=label.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../src/components/label.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAA;AAIvD,
|
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../src/components/label.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAA;AAIvD,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,2CAWlD;AAED,OAAO,EAAE,KAAK,EAAE,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
4
|
+
import { cn } from "../lib/utils";
|
|
5
|
+
function Label({ className, ...props }) {
|
|
6
|
+
return (_jsx(LabelPrimitive.Root, { "data-slot": "label", className: cn("tw:flex tw:items-center tw:gap-2 tw:text-sm tw:leading-none tw:font-medium tw:select-none tw:group-data-[disabled=true]:pointer-events-none tw:group-data-[disabled=true]:opacity-50 tw:peer-disabled:cursor-not-allowed tw:peer-disabled:opacity-50", className), ...props }));
|
|
7
|
+
}
|
|
8
|
+
export { Label };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
3
|
+
declare function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function PopoverContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
|
|
8
|
+
//# sourceMappingURL=popover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../src/components/popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAA;AAI3D,iBAAS,OAAO,CAAC,EACf,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAEpD;AAED,iBAAS,cAAc,CAAC,EACtB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CAEvD;AAED,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,KAAgB,EAChB,UAAc,EACd,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CAevD;AAED,iBAAS,aAAa,CAAC,EACrB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,MAAM,CAAC,2CAEtD;AAED,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
4
|
+
import { cn } from "../lib/utils";
|
|
5
|
+
function Popover({ ...props }) {
|
|
6
|
+
return _jsx(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
7
|
+
}
|
|
8
|
+
function PopoverTrigger({ ...props }) {
|
|
9
|
+
return _jsx(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
10
|
+
}
|
|
11
|
+
function PopoverContent({ className, align = "center", sideOffset = 4, ...props }) {
|
|
12
|
+
return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { "data-slot": "popover-content", align: align, sideOffset: sideOffset, className: cn("tw:bg-popover tw:text-popover-foreground tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out tw:data-[state=closed]:fade-out-0 tw:data-[state=open]:fade-in-0 tw:data-[state=closed]:zoom-out-95 tw:data-[state=open]:zoom-in-95 tw:data-[side=bottom]:slide-in-from-top-2 tw:data-[side=left]:slide-in-from-right-2 tw:data-[side=right]:slide-in-from-left-2 tw:data-[side=top]:slide-in-from-bottom-2 tw:z-50 tw:w-72 tw:origin-(--radix-popover-content-transform-origin) tw:rounded-md tw:border tw:p-4 tw:shadow-md tw:outline-hidden", className), ...props }) }));
|
|
13
|
+
}
|
|
14
|
+
function PopoverAnchor({ ...props }) {
|
|
15
|
+
return _jsx(PopoverPrimitive.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
16
|
+
}
|
|
17
|
+
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
3
|
+
declare function Switch({ className, ...props }: React.ComponentProps<typeof SwitchPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export { Switch };
|
|
5
|
+
//# sourceMappingURL=switch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../src/components/switch.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AAIzD,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,2CAkBnD;AAED,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
4
|
+
import { cn } from "../lib/utils";
|
|
5
|
+
function Switch({ className, ...props }) {
|
|
6
|
+
return (_jsx(SwitchPrimitive.Root, { "data-slot": "switch", className: cn("tw:peer tw:data-[state=checked]:bg-primary tw:data-[state=unchecked]:bg-input tw:focus-visible:border-ring tw:focus-visible:ring-ring/50 tw:dark:data-[state=unchecked]:bg-input/80 tw:inline-flex tw:h-[1.15rem] tw:w-8 tw:shrink-0 tw:items-center tw:rounded-full tw:border tw:border-transparent tw:shadow-xs tw:transition-all tw:outline-none tw:focus-visible:ring-[3px] tw:disabled:cursor-not-allowed tw:disabled:opacity-50", className), ...props, children: _jsx(SwitchPrimitive.Thumb, { "data-slot": "switch-thumb", className: cn("tw:bg-background tw:dark:data-[state=unchecked]:bg-foreground tw:dark:data-[state=checked]:bg-primary-foreground tw:pointer-events-none tw:block tw:size-4 tw:rounded-full tw:ring-0 tw:transition-transform tw:data-[state=checked]:translate-x-[calc(100%-2px)] tw:data-[state=unchecked]:translate-x-0") }) }));
|
|
7
|
+
}
|
|
8
|
+
export { Switch };
|
package/dist/globals.css
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
@import "tailwindcss" prefix(tw);
|
|
2
|
+
@source "../../../apps/**/*.{ts,tsx}";
|
|
3
|
+
@source "../../../components/**/*.{ts,tsx}";
|
|
4
|
+
@source "../**/*.{ts,tsx}";
|
|
5
|
+
|
|
6
|
+
@import "tw-animate-css";
|
|
7
|
+
|
|
8
|
+
@custom-variant dark (&:is(.dark *));
|
|
9
|
+
|
|
10
|
+
:root {
|
|
11
|
+
--background: oklch(1 0 0);
|
|
12
|
+
--foreground: oklch(0.145 0 0);
|
|
13
|
+
--card: oklch(1 0 0);
|
|
14
|
+
--card-foreground: oklch(0.145 0 0);
|
|
15
|
+
--popover: oklch(1 0 0);
|
|
16
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
17
|
+
--primary: oklch(0.205 0 0);
|
|
18
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
19
|
+
--secondary: oklch(0.97 0 0);
|
|
20
|
+
--secondary-foreground: oklch(0.205 0 0);
|
|
21
|
+
--muted: oklch(0.97 0 0);
|
|
22
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
23
|
+
--accent: oklch(0.97 0 0);
|
|
24
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
25
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
26
|
+
--destructive-foreground: oklch(0.577 0.245 27.325);
|
|
27
|
+
--border: oklch(0.922 0 0);
|
|
28
|
+
--input: oklch(0.922 0 0);
|
|
29
|
+
--ring: oklch(0.708 0 0);
|
|
30
|
+
--chart-1: oklch(0.646 0.222 41.116);
|
|
31
|
+
--chart-2: oklch(0.6 0.118 184.704);
|
|
32
|
+
--chart-3: oklch(0.398 0.07 227.392);
|
|
33
|
+
--chart-4: oklch(0.828 0.189 84.429);
|
|
34
|
+
--chart-5: oklch(0.769 0.188 70.08);
|
|
35
|
+
--radius: 0.625rem;
|
|
36
|
+
--sidebar: oklch(0.985 0 0);
|
|
37
|
+
--sidebar-foreground: oklch(0.145 0 0);
|
|
38
|
+
--sidebar-primary: oklch(0.205 0 0);
|
|
39
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
40
|
+
--sidebar-accent: oklch(0.97 0 0);
|
|
41
|
+
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
42
|
+
--sidebar-border: oklch(0.922 0 0);
|
|
43
|
+
--sidebar-ring: oklch(0.708 0 0);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.dark {
|
|
47
|
+
--background: oklch(0.145 0 0);
|
|
48
|
+
--foreground: oklch(0.985 0 0);
|
|
49
|
+
--card: oklch(0.145 0 0);
|
|
50
|
+
--card-foreground: oklch(0.985 0 0);
|
|
51
|
+
--popover: oklch(0.145 0 0);
|
|
52
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
53
|
+
--primary: oklch(0.985 0 0);
|
|
54
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
55
|
+
--secondary: oklch(0.269 0 0);
|
|
56
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
57
|
+
--muted: oklch(0.269 0 0);
|
|
58
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
59
|
+
--accent: oklch(0.269 0 0);
|
|
60
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
61
|
+
--destructive: oklch(0.396 0.141 25.723);
|
|
62
|
+
--destructive-foreground: oklch(0.637 0.237 25.331);
|
|
63
|
+
--border: oklch(0.269 0 0);
|
|
64
|
+
--input: oklch(0.269 0 0);
|
|
65
|
+
--ring: oklch(0.556 0 0);
|
|
66
|
+
--chart-1: oklch(0.488 0.243 264.376);
|
|
67
|
+
--chart-2: oklch(0.696 0.17 162.48);
|
|
68
|
+
--chart-3: oklch(0.769 0.188 70.08);
|
|
69
|
+
--chart-4: oklch(0.627 0.265 303.9);
|
|
70
|
+
--chart-5: oklch(0.645 0.246 16.439);
|
|
71
|
+
--sidebar: oklch(0.205 0 0);
|
|
72
|
+
--sidebar-foreground: oklch(0.985 0 0);
|
|
73
|
+
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
74
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
75
|
+
--sidebar-accent: oklch(0.269 0 0);
|
|
76
|
+
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
77
|
+
--sidebar-border: oklch(0.269 0 0);
|
|
78
|
+
--sidebar-ring: oklch(0.439 0 0);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@theme inline {
|
|
82
|
+
--color-background: var(--background);
|
|
83
|
+
--color-foreground: var(--foreground);
|
|
84
|
+
--color-card: var(--card);
|
|
85
|
+
--color-card-foreground: var(--card-foreground);
|
|
86
|
+
--color-popover: var(--popover);
|
|
87
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
88
|
+
--color-primary: var(--primary);
|
|
89
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
90
|
+
--color-secondary: var(--secondary);
|
|
91
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
92
|
+
--color-muted: var(--muted);
|
|
93
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
94
|
+
--color-accent: var(--accent);
|
|
95
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
96
|
+
--color-destructive: var(--destructive);
|
|
97
|
+
--color-destructive-foreground: var(--destructive-foreground);
|
|
98
|
+
--color-border: var(--border);
|
|
99
|
+
--color-input: var(--input);
|
|
100
|
+
--color-ring: var(--ring);
|
|
101
|
+
--color-chart-1: var(--chart-1);
|
|
102
|
+
--color-chart-2: var(--chart-2);
|
|
103
|
+
--color-chart-3: var(--chart-3);
|
|
104
|
+
--color-chart-4: var(--chart-4);
|
|
105
|
+
--color-chart-5: var(--chart-5);
|
|
106
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
107
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
108
|
+
--radius-lg: var(--radius);
|
|
109
|
+
--radius-xl: calc(var(--radius) + 4px);
|
|
110
|
+
--color-sidebar: var(--sidebar);
|
|
111
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
112
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
113
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
114
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
115
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
116
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
117
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@layer base {
|
|
121
|
+
* {
|
|
122
|
+
@apply tw:border-border tw:outline-ring/50;
|
|
123
|
+
}
|
|
124
|
+
body {
|
|
125
|
+
@apply tw:bg-background tw:text-foreground;
|
|
126
|
+
}
|
|
127
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./components/button";
|
|
2
|
+
export * from "./components/card";
|
|
3
|
+
export * from "./components/checkbox";
|
|
4
|
+
export * from "./components/input";
|
|
5
|
+
export * from "./components/label";
|
|
6
|
+
export * from "./components/popover";
|
|
7
|
+
export * from "./components/switch";
|
|
8
|
+
export * from "./lib/utils";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,mBAAmB,CAAA;AACjC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA;AACpC,cAAc,qBAAqB,CAAA;AACnC,cAAc,aAAa,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./components/button";
|
|
2
|
+
export * from "./components/card";
|
|
3
|
+
export * from "./components/checkbox";
|
|
4
|
+
export * from "./components/input";
|
|
5
|
+
export * from "./components/label";
|
|
6
|
+
export * from "./components/popover";
|
|
7
|
+
export * from "./components/switch";
|
|
8
|
+
export * from "./lib/utils";
|
package/package.json
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getgreenline/blaze-ui",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"
|
|
5
|
-
"dev": "tsc -p tsconfig.json --watch",
|
|
6
|
-
"build": "yarn run clean && yarn run compile",
|
|
7
|
-
"compile": "tsc -p tsconfig.json && node ./scripts/build-entry.mjs",
|
|
8
|
-
"clean": "rm -rf ./build ./dist",
|
|
9
|
-
"lint": "eslint . --max-warnings 0",
|
|
10
|
-
"prepublishOnly": "yarn build"
|
|
11
|
-
},
|
|
3
|
+
"version": "1.0.9",
|
|
4
|
+
"type": "module",
|
|
12
5
|
"dependencies": {
|
|
6
|
+
"@radix-ui/react-checkbox": "^1.3.3",
|
|
13
7
|
"@radix-ui/react-label": "^2.1.7",
|
|
14
8
|
"@radix-ui/react-popover": "^1.1.15",
|
|
15
9
|
"@radix-ui/react-slot": "^1.2.3",
|
|
@@ -17,45 +11,64 @@
|
|
|
17
11
|
"class-variance-authority": "^0.7.1",
|
|
18
12
|
"clsx": "^2.1.1",
|
|
19
13
|
"lucide-react": "^0.475.0",
|
|
20
|
-
"next-themes": "^0.4.6",
|
|
21
14
|
"tailwind-merge": "^3.3.1",
|
|
22
15
|
"tw-animate-css": "^1.3.6",
|
|
23
16
|
"zod": "^3.25.76"
|
|
24
17
|
},
|
|
25
18
|
"peerDependencies": {
|
|
26
|
-
"react": ">=
|
|
27
|
-
"react-dom": ">=
|
|
28
|
-
"tailwindcss": ">=4.0.0"
|
|
19
|
+
"react": ">=16.14",
|
|
20
|
+
"react-dom": ">=16.14"
|
|
29
21
|
},
|
|
30
22
|
"devDependencies": {
|
|
31
23
|
"@tailwindcss/postcss": "^4.1.11",
|
|
32
24
|
"@turbo/gen": "^2.5.5",
|
|
33
25
|
"@types/node": "^20.19.9",
|
|
34
|
-
"@types/react": "^
|
|
35
|
-
"@types/react-dom": "^
|
|
36
|
-
"@workspace/eslint-config": "workspace:*",
|
|
37
|
-
"@workspace/typescript-config": "workspace:*",
|
|
38
|
-
"postcss": "^8.5.6",
|
|
26
|
+
"@types/react": "^19.1.9",
|
|
27
|
+
"@types/react-dom": "^19.1.7",
|
|
39
28
|
"tailwindcss": "^4.1.11",
|
|
40
|
-
"typescript": "^5.9.2"
|
|
29
|
+
"typescript": "^5.9.2",
|
|
30
|
+
"@workspace/eslint-config": "0.0.0",
|
|
31
|
+
"@workspace/typescript-config": "0.0.0"
|
|
32
|
+
},
|
|
33
|
+
"main": "./dist/index.js",
|
|
34
|
+
"module": "./dist/index.js",
|
|
35
|
+
"types": "./dist/index.d.ts",
|
|
36
|
+
"files": [
|
|
37
|
+
"dist",
|
|
38
|
+
"postcss.config.mjs"
|
|
39
|
+
],
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public"
|
|
41
42
|
},
|
|
42
|
-
"main": "build/index",
|
|
43
|
-
"types": "build/index",
|
|
44
43
|
"exports": {
|
|
45
44
|
".": {
|
|
46
|
-
"types": "./
|
|
47
|
-
"
|
|
48
|
-
"default": "./
|
|
45
|
+
"types": "./dist/index.d.ts",
|
|
46
|
+
"import": "./dist/index.js",
|
|
47
|
+
"default": "./dist/index.js"
|
|
49
48
|
},
|
|
50
|
-
"./
|
|
49
|
+
"./globals.css": "./dist/globals.css",
|
|
50
|
+
"./postcss.config": "./postcss.config.mjs",
|
|
51
|
+
"./components/*": {
|
|
52
|
+
"types": "./dist/components/*.d.ts",
|
|
53
|
+
"import": "./dist/components/*.js",
|
|
54
|
+
"default": "./dist/components/*.js"
|
|
55
|
+
},
|
|
56
|
+
"./lib/*": {
|
|
57
|
+
"types": "./dist/lib/*.d.ts",
|
|
58
|
+
"import": "./dist/lib/*.js",
|
|
59
|
+
"default": "./dist/lib/*.js"
|
|
60
|
+
},
|
|
61
|
+
"./hooks/*": {
|
|
62
|
+
"types": "./dist/hooks/*.d.ts",
|
|
63
|
+
"import": "./dist/hooks/*.js",
|
|
64
|
+
"default": "./dist/hooks/*.js"
|
|
65
|
+
}
|
|
51
66
|
},
|
|
52
|
-
"
|
|
53
|
-
"build
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
"publishConfig": {
|
|
59
|
-
"access": "restricted"
|
|
67
|
+
"scripts": {
|
|
68
|
+
"build": "pnpm run clean && pnpm run build:ts && pnpm run build:assets",
|
|
69
|
+
"build:ts": "tsc -p tsconfig.build.json",
|
|
70
|
+
"build:assets": "mkdir -p dist && cp src/styles/globals.css dist/globals.css",
|
|
71
|
+
"clean": "rm -rf dist",
|
|
72
|
+
"lint": "eslint . --max-warnings 0"
|
|
60
73
|
}
|
|
61
74
|
}
|
package/README.md
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
# Blaze UI Package
|
|
2
|
-
|
|
3
|
-
This workspace publishes the `@getgreenline/blaze-ui` component library used by
|
|
4
|
-
our React applications. Components are authored in TypeScript and consume the
|
|
5
|
-
Tailwind authoring file at `src/styles/blaze-ui.css`. Host applications are now
|
|
6
|
-
expected to compile that stylesheet themselves—`tailwindcss` is listed as a peer
|
|
7
|
-
dependency so consuming projects can control their own Tailwind pipeline.
|
|
8
|
-
|
|
9
|
-
## Build pipeline
|
|
10
|
-
|
|
11
|
-
`yarn workspace @getgreenline/blaze-ui build` performs three steps:
|
|
12
|
-
|
|
13
|
-
1. `clean` – removes the `build/` directory so every build starts from a clean
|
|
14
|
-
slate.
|
|
15
|
-
2. `tsc -p tsconfig.json` – emits CommonJS JavaScript and declaration files into
|
|
16
|
-
`build/`.
|
|
17
|
-
3. `node ./scripts/build-entry.mjs` – generates an ES module entry point that
|
|
18
|
-
re-exports everything from the CommonJS bundle for ESM consumers.
|
|
19
|
-
|
|
20
|
-
CSS is no longer compiled during the package build. Consumers must import the
|
|
21
|
-
Tailwind authoring file so their own Tailwind setup produces the required
|
|
22
|
-
utilities and tokens.
|
|
23
|
-
|
|
24
|
-
## Local development
|
|
25
|
-
|
|
26
|
-
- `yarn workspace @getgreenline/blaze-ui dev` – watch TypeScript sources.
|
|
27
|
-
- `yarn workspace @getgreenline/blaze-ui build` – clean + compile TS + build ESM
|
|
28
|
-
entry (required before publishing).
|
|
29
|
-
|
|
30
|
-
If you add new utilities or tokens, update `src/styles/blaze-ui.css` and ensure
|
|
31
|
-
Storybook/host apps pick up the changes via their Tailwind builds.
|
|
32
|
-
|
|
33
|
-
## Consuming the package
|
|
34
|
-
|
|
35
|
-
Add Blaze UI's stylesheet to your Tailwind entry file (or another file that is
|
|
36
|
-
processed by Tailwind):
|
|
37
|
-
|
|
38
|
-
```css
|
|
39
|
-
@import "@getgreenline/blaze-ui/styles/blaze-ui.css";
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
The import can live alongside your existing Tailwind directives. When your
|
|
43
|
-
application runs its Tailwind build it will produce the utilities and tokens
|
|
44
|
-
required by Blaze UI. The included `tailwind.config.js` sets `prefix: "tw"`,
|
|
45
|
-
so the generated utilities are namespaced (e.g. `tw:bg-primary`). If your app
|
|
46
|
-
overrides the Tailwind config for that entry point, remember to preserve the
|
|
47
|
-
same prefix. Components are then imported normally:
|
|
48
|
-
|
|
49
|
-
```tsx
|
|
50
|
-
import { Button } from "@getgreenline/blaze-ui";
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
Because the compiled CSS is no longer bundled with the package, make sure the
|
|
54
|
-
consumer application has `tailwindcss@>=4.0.0` installed and that your build
|
|
55
|
-
includes Blaze UI's sources in the content graph (the `@source` entries inside
|
|
56
|
-
`blaze-ui.css` cover the workspace by default). Tailwind will generate prefixed
|
|
57
|
-
utilities that match the component markup out of the box.
|
|
58
|
-
|
|
59
|
-
## Publishing checklist
|
|
60
|
-
|
|
61
|
-
1. Bump `version` in `package.json`.
|
|
62
|
-
2. Run `yarn workspace @getgreenline/blaze-ui build`.
|
|
63
|
-
3. Optionally verify the components in Storybook or a host app after running its
|
|
64
|
-
Tailwind build.
|
|
65
|
-
4. Use the root scripts (`yarn release:ui`, `yarn release:ui:dry-run`, or
|
|
66
|
-
`yarn release:ui:otp`) to publish.
|
|
67
|
-
|
|
68
|
-
These notes reflect the simplified pipeline where Blaze UI ships only TypeScript
|
|
69
|
-
artefacts and expects consumers to compile Tailwind locally.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,QAAA,MAAM,cAAc;;;mFA6BnB,CAAA;AAED,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAO,EACP,IAAI,EACJ,OAAe,EACf,OAAe,EACf,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,GAC/B,YAAY,CAAC,OAAO,cAAc,CAAC,GAAG;IACpC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,2CA4EF;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
|