@getgreenline/blaze-ui 1.0.9 → 1.0.10
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/button.js +7 -5
- package/dist/components/card.js +12 -10
- package/dist/components/checkbox.js +7 -6
- package/dist/components/input.js +5 -3
- package/dist/components/label.js +6 -5
- package/dist/components/popover.js +10 -9
- package/dist/components/switch.js +6 -5
- package/dist/index.js +8 -8
- package/dist/lib/utils.js +6 -3
- package/package.json +10 -5
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import { Slot } from
|
|
3
|
-
import { cva } from
|
|
4
|
-
import { cn } from
|
|
1
|
+
import { 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.js';
|
|
5
|
+
|
|
5
6
|
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
7
|
variants: {
|
|
7
8
|
variant: {
|
|
@@ -26,6 +27,7 @@ const buttonVariants = cva("tw:inline-flex tw:items-center tw:justify-center tw:
|
|
|
26
27
|
});
|
|
27
28
|
function Button({ className, variant, size, asChild = false, ...props }) {
|
|
28
29
|
const Comp = asChild ? Slot : "button";
|
|
29
|
-
return (
|
|
30
|
+
return (jsx(Comp, { "data-slot": "button", className: cn(buttonVariants({ variant, size, className })), ...props }));
|
|
30
31
|
}
|
|
32
|
+
|
|
31
33
|
export { Button, buttonVariants };
|
package/dist/components/card.js
CHANGED
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import { cn } from
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { cn } from '../lib/utils.js';
|
|
3
|
+
|
|
3
4
|
function Card({ className, ...props }) {
|
|
4
|
-
return (
|
|
5
|
+
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
|
}
|
|
6
7
|
function CardHeader({ className, ...props }) {
|
|
7
|
-
return (
|
|
8
|
+
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
|
}
|
|
9
10
|
function CardTitle({ className, ...props }) {
|
|
10
|
-
return (
|
|
11
|
+
return (jsx("div", { "data-slot": "card-title", className: cn("tw:leading-none tw:font-semibold", className), ...props }));
|
|
11
12
|
}
|
|
12
13
|
function CardDescription({ className, ...props }) {
|
|
13
|
-
return (
|
|
14
|
+
return (jsx("div", { "data-slot": "card-description", className: cn("tw:text-muted-foreground tw:text-sm", className), ...props }));
|
|
14
15
|
}
|
|
15
16
|
function CardAction({ className, ...props }) {
|
|
16
|
-
return (
|
|
17
|
+
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
|
}
|
|
18
19
|
function CardContent({ className, ...props }) {
|
|
19
|
-
return (
|
|
20
|
+
return (jsx("div", { "data-slot": "card-content", className: cn("tw:px-6", className), ...props }));
|
|
20
21
|
}
|
|
21
22
|
function CardFooter({ className, ...props }) {
|
|
22
|
-
return (
|
|
23
|
+
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
|
}
|
|
24
|
-
|
|
25
|
+
|
|
26
|
+
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
3
|
+
import { CheckIcon } from 'lucide-react';
|
|
4
|
+
import { cn } from '../lib/utils.js';
|
|
5
|
+
|
|
6
6
|
function Checkbox({ className, ...props }) {
|
|
7
|
-
return (
|
|
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
8
|
}
|
|
9
|
+
|
|
9
10
|
export { Checkbox };
|
package/dist/components/input.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import { cn } from
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { cn } from '../lib/utils.js';
|
|
3
|
+
|
|
3
4
|
function Input({ className, type, ...props }) {
|
|
4
|
-
return (
|
|
5
|
+
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
|
}
|
|
7
|
+
|
|
6
8
|
export { Input };
|
package/dist/components/label.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
3
|
+
import { cn } from '../lib/utils.js';
|
|
4
|
+
|
|
5
5
|
function Label({ className, ...props }) {
|
|
6
|
-
return (
|
|
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
7
|
}
|
|
8
|
+
|
|
8
9
|
export { Label };
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
|
+
import { cn } from '../lib/utils.js';
|
|
4
|
+
|
|
5
5
|
function Popover({ ...props }) {
|
|
6
|
-
return
|
|
6
|
+
return jsx(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
7
7
|
}
|
|
8
8
|
function PopoverTrigger({ ...props }) {
|
|
9
|
-
return
|
|
9
|
+
return jsx(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
10
10
|
}
|
|
11
11
|
function PopoverContent({ className, align = "center", sideOffset = 4, ...props }) {
|
|
12
|
-
return (
|
|
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
13
|
}
|
|
14
14
|
function PopoverAnchor({ ...props }) {
|
|
15
|
-
return
|
|
15
|
+
return jsx(PopoverPrimitive.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
|
|
18
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
3
|
+
import { cn } from '../lib/utils.js';
|
|
4
|
+
|
|
5
5
|
function Switch({ className, ...props }) {
|
|
6
|
-
return (
|
|
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
7
|
}
|
|
8
|
+
|
|
8
9
|
export { Switch };
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
1
|
+
export { Button, buttonVariants } from './components/button.js';
|
|
2
|
+
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from './components/card.js';
|
|
3
|
+
export { Checkbox } from './components/checkbox.js';
|
|
4
|
+
export { Input } from './components/input.js';
|
|
5
|
+
export { Label } from './components/label.js';
|
|
6
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from './components/popover.js';
|
|
7
|
+
export { Switch } from './components/switch.js';
|
|
8
|
+
export { cn } from './lib/utils.js';
|
package/dist/lib/utils.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { clsx } from
|
|
2
|
-
import { twMerge } from
|
|
3
|
-
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
|
+
import { twMerge } from 'tailwind-merge';
|
|
3
|
+
|
|
4
|
+
function cn(...inputs) {
|
|
4
5
|
return twMerge(clsx(inputs));
|
|
5
6
|
}
|
|
7
|
+
|
|
8
|
+
export { cn };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getgreenline/blaze-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@radix-ui/react-checkbox": "^1.3.3",
|
|
@@ -22,13 +22,17 @@
|
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@tailwindcss/postcss": "^4.1.11",
|
|
24
24
|
"@turbo/gen": "^2.5.5",
|
|
25
|
+
"@rollup/plugin-commonjs": "^28.0.0",
|
|
26
|
+
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
27
|
+
"@rollup/plugin-typescript": "^12.1.0",
|
|
25
28
|
"@types/node": "^20.19.9",
|
|
26
29
|
"@types/react": "^19.1.9",
|
|
27
30
|
"@types/react-dom": "^19.1.7",
|
|
31
|
+
"rollup": "^4.52.0",
|
|
28
32
|
"tailwindcss": "^4.1.11",
|
|
29
33
|
"typescript": "^5.9.2",
|
|
30
|
-
"@workspace/
|
|
31
|
-
"@workspace/
|
|
34
|
+
"@workspace/typescript-config": "0.0.0",
|
|
35
|
+
"@workspace/eslint-config": "0.0.0"
|
|
32
36
|
},
|
|
33
37
|
"main": "./dist/index.js",
|
|
34
38
|
"module": "./dist/index.js",
|
|
@@ -65,8 +69,9 @@
|
|
|
65
69
|
}
|
|
66
70
|
},
|
|
67
71
|
"scripts": {
|
|
68
|
-
"build": "pnpm run clean && pnpm run build:
|
|
69
|
-
"build:
|
|
72
|
+
"build": "pnpm run clean && pnpm run build:js && pnpm run build:types && pnpm run build:assets",
|
|
73
|
+
"build:js": "rollup -c",
|
|
74
|
+
"build:types": "tsc -p tsconfig.build.json",
|
|
70
75
|
"build:assets": "mkdir -p dist && cp src/styles/globals.css dist/globals.css",
|
|
71
76
|
"clean": "rm -rf dist",
|
|
72
77
|
"lint": "eslint . --max-warnings 0"
|