@kala-ui/react 0.0.1-beta.5 → 0.0.1-beta.7
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/CHANGELOG.md +110 -110
- package/LICENSE +21 -21
- package/README.md +366 -366
- package/dist/components/combobox/combobox.d.ts +1 -2
- package/dist/components/combobox/combobox.js +1 -1
- package/dist/components/combobox/index.d.ts +1 -1
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/container/container.d.ts +11 -0
- package/dist/components/container/container.js +29 -0
- package/dist/components/container/container.stories.d.ts +8 -0
- package/dist/components/container/container.stories.js +34 -0
- package/dist/components/container/index.d.ts +1 -0
- package/dist/components/container/index.js +1 -0
- package/dist/components/dnd/dnd.stories.js +35 -35
- package/dist/components/flex/flex.d.ts +16 -0
- package/dist/components/flex/flex.js +78 -0
- package/dist/components/flex/flex.stories.d.ts +8 -0
- package/dist/components/flex/flex.stories.js +51 -0
- package/dist/components/flex/index.d.ts +1 -0
- package/dist/components/flex/index.js +1 -0
- package/dist/components/group/group.d.ts +7 -0
- package/dist/components/group/group.js +9 -0
- package/dist/components/group/group.stories.d.ts +7 -0
- package/dist/components/group/group.stories.js +34 -0
- package/dist/components/group/index.d.ts +1 -0
- package/dist/components/group/index.js +1 -0
- package/dist/components/heading/heading.d.ts +12 -0
- package/dist/components/heading/heading.js +44 -0
- package/dist/components/heading/heading.stories.d.ts +9 -0
- package/dist/components/heading/heading.stories.js +45 -0
- package/dist/components/heading/index.d.ts +1 -0
- package/dist/components/heading/index.js +1 -0
- package/dist/components/resizable/resizable.stories.js +8 -8
- package/dist/components/scroll-area/scroll-area.stories.js +25 -25
- package/dist/components/stack/index.d.ts +1 -0
- package/dist/components/stack/index.js +1 -0
- package/dist/components/stack/stack.d.ts +7 -0
- package/dist/components/stack/stack.js +9 -0
- package/dist/components/stack/stack.stories.d.ts +8 -0
- package/dist/components/stack/stack.stories.js +44 -0
- package/dist/components/text/index.d.ts +1 -0
- package/dist/components/text/index.js +1 -0
- package/dist/components/text/text.d.ts +14 -0
- package/dist/components/text/text.js +66 -0
- package/dist/components/text/text.stories.d.ts +8 -0
- package/dist/components/text/text.stories.js +40 -0
- package/dist/index.d.ts +68 -0
- package/dist/index.js +80 -0
- package/dist/lib/animations.js +94 -94
- package/dist/styles/globals.css +171 -20
- package/package.json +446 -414
|
@@ -120,14 +120,14 @@ export const DisabledHandle = {
|
|
|
120
120
|
*/
|
|
121
121
|
export const IDELayout = {
|
|
122
122
|
args: {},
|
|
123
|
-
render: () => (_jsxs(ResizablePanelGroup, { direction: "horizontal", className: "min-h-[500px] rounded-lg border", children: [_jsx(ResizablePanel, { defaultSize: 20, minSize: 15, maxSize: 30, className: "border-r", children: _jsxs("div", { className: "flex h-full flex-col", children: [_jsx("div", { className: "border-b p-4 font-semibold", children: "Explorer" }), _jsx("div", { className: "flex-1 p-4", children: _jsxs("div", { className: "space-y-2", children: [_jsx("div", { className: "text-sm", children: "\uD83D\uDCC1 src" }), _jsxs("div", { className: "ml-4 space-y-1 text-sm", children: [_jsx("div", { children: "\uD83D\uDCC4 App.tsx" }), _jsx("div", { children: "\uD83D\uDCC4 index.tsx" }), _jsx("div", { children: "\uD83D\uDCC4 styles.css" })] })] }) })] }) }), _jsx(ResizableHandle, {}), _jsx(ResizablePanel, { defaultSize: 60, children: _jsxs(ResizablePanelGroup, { direction: "vertical", children: [_jsx(ResizablePanel, { defaultSize: 70, minSize: 30, children: _jsxs("div", { className: "flex h-full flex-col", children: [_jsx("div", { className: "border-b p-4 font-semibold", children: "Editor" }), _jsx("div", { className: "bg-muted/20 flex-1 p-4", children: _jsx("pre", { className: "text-sm", children: _jsx("code", { children: `import React from 'react';
|
|
124
|
-
|
|
125
|
-
function App() {
|
|
126
|
-
return (
|
|
127
|
-
<div>Hello World</div>
|
|
128
|
-
);
|
|
129
|
-
}
|
|
130
|
-
|
|
123
|
+
render: () => (_jsxs(ResizablePanelGroup, { direction: "horizontal", className: "min-h-[500px] rounded-lg border", children: [_jsx(ResizablePanel, { defaultSize: 20, minSize: 15, maxSize: 30, className: "border-r", children: _jsxs("div", { className: "flex h-full flex-col", children: [_jsx("div", { className: "border-b p-4 font-semibold", children: "Explorer" }), _jsx("div", { className: "flex-1 p-4", children: _jsxs("div", { className: "space-y-2", children: [_jsx("div", { className: "text-sm", children: "\uD83D\uDCC1 src" }), _jsxs("div", { className: "ml-4 space-y-1 text-sm", children: [_jsx("div", { children: "\uD83D\uDCC4 App.tsx" }), _jsx("div", { children: "\uD83D\uDCC4 index.tsx" }), _jsx("div", { children: "\uD83D\uDCC4 styles.css" })] })] }) })] }) }), _jsx(ResizableHandle, {}), _jsx(ResizablePanel, { defaultSize: 60, children: _jsxs(ResizablePanelGroup, { direction: "vertical", children: [_jsx(ResizablePanel, { defaultSize: 70, minSize: 30, children: _jsxs("div", { className: "flex h-full flex-col", children: [_jsx("div", { className: "border-b p-4 font-semibold", children: "Editor" }), _jsx("div", { className: "bg-muted/20 flex-1 p-4", children: _jsx("pre", { className: "text-sm", children: _jsx("code", { children: `import React from 'react';
|
|
124
|
+
|
|
125
|
+
function App() {
|
|
126
|
+
return (
|
|
127
|
+
<div>Hello World</div>
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
131
|
export default App;` }) }) })] }) }), _jsx(ResizableHandle, { withHandle: true }), _jsx(ResizablePanel, { defaultSize: 30, minSize: 20, children: _jsxs("div", { className: "flex h-full flex-col", children: [_jsx("div", { className: "border-t p-4 font-semibold", children: "Terminal" }), _jsx("div", { className: "bg-muted/40 flex-1 p-4", children: _jsxs("div", { className: "font-mono text-sm", children: [_jsx("div", { children: "$ npm run dev" }), _jsx("div", { className: "text-muted-foreground mt-2", children: "Server running on port 3000..." })] }) })] }) })] }) }), _jsx(ResizableHandle, {}), _jsx(ResizablePanel, { defaultSize: 20, minSize: 15, maxSize: 30, className: "border-l", children: _jsxs("div", { className: "flex h-full flex-col", children: [_jsx("div", { className: "border-b p-4 font-semibold", children: "Properties" }), _jsxs("div", { className: "flex-1 space-y-4 p-4", children: [_jsxs("div", { children: [_jsx("div", { className: "text-muted-foreground mb-1 text-xs font-medium", children: "File Info" }), _jsx("div", { className: "text-sm", children: "App.tsx" })] }), _jsxs("div", { children: [_jsx("div", { className: "text-muted-foreground mb-1 text-xs font-medium", children: "Lines" }), _jsx("div", { className: "text-sm", children: "9" })] }), _jsxs("div", { children: [_jsx("div", { className: "text-muted-foreground mb-1 text-xs font-medium", children: "Size" }), _jsx("div", { className: "text-sm", children: "128 bytes" })] })] })] }) })] })),
|
|
132
132
|
};
|
|
133
133
|
/**
|
|
@@ -81,31 +81,31 @@ export const Styled = {
|
|
|
81
81
|
*/
|
|
82
82
|
export const CodeBlock = {
|
|
83
83
|
args: {},
|
|
84
|
-
render: () => (_jsxs(ScrollArea, { className: "h-[300px] w-[500px] rounded-md border", children: [_jsx("div", { className: "bg-muted/50 p-4", children: _jsx("pre", { className: "text-sm", children: _jsx("code", { children: `import { ScrollArea } from '@repo/ui/scroll-area';
|
|
85
|
-
|
|
86
|
-
export function Example() {
|
|
87
|
-
return (
|
|
88
|
-
<ScrollArea className="h-72 w-48 rounded-md border">
|
|
89
|
-
<div className="p-4">
|
|
90
|
-
<h4>Title</h4>
|
|
91
|
-
{/* Your scrollable content */}
|
|
92
|
-
</div>
|
|
93
|
-
</ScrollArea>
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
// Advanced usage with horizontal scrolling
|
|
98
|
-
export function HorizontalExample() {
|
|
99
|
-
return (
|
|
100
|
-
<ScrollArea className="w-96 whitespace-nowrap">
|
|
101
|
-
<div className="flex w-max space-x-4 p-4">
|
|
102
|
-
{items.map((item) => (
|
|
103
|
-
<div key={item.id}>{item.content}</div>
|
|
104
|
-
))}
|
|
105
|
-
</div>
|
|
106
|
-
<ScrollBar orientation="horizontal" />
|
|
107
|
-
</ScrollArea>
|
|
108
|
-
);
|
|
84
|
+
render: () => (_jsxs(ScrollArea, { className: "h-[300px] w-[500px] rounded-md border", children: [_jsx("div", { className: "bg-muted/50 p-4", children: _jsx("pre", { className: "text-sm", children: _jsx("code", { children: `import { ScrollArea } from '@repo/ui/scroll-area';
|
|
85
|
+
|
|
86
|
+
export function Example() {
|
|
87
|
+
return (
|
|
88
|
+
<ScrollArea className="h-72 w-48 rounded-md border">
|
|
89
|
+
<div className="p-4">
|
|
90
|
+
<h4>Title</h4>
|
|
91
|
+
{/* Your scrollable content */}
|
|
92
|
+
</div>
|
|
93
|
+
</ScrollArea>
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Advanced usage with horizontal scrolling
|
|
98
|
+
export function HorizontalExample() {
|
|
99
|
+
return (
|
|
100
|
+
<ScrollArea className="w-96 whitespace-nowrap">
|
|
101
|
+
<div className="flex w-max space-x-4 p-4">
|
|
102
|
+
{items.map((item) => (
|
|
103
|
+
<div key={item.id}>{item.content}</div>
|
|
104
|
+
))}
|
|
105
|
+
</div>
|
|
106
|
+
<ScrollBar orientation="horizontal" />
|
|
107
|
+
</ScrollArea>
|
|
108
|
+
);
|
|
109
109
|
}` }) }) }), _jsx(ScrollBar, { orientation: "horizontal" })] })),
|
|
110
110
|
};
|
|
111
111
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './stack';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './stack';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type FlexProps } from "../flex/flex";
|
|
3
|
+
export interface StackProps extends Omit<FlexProps, "direction"> {
|
|
4
|
+
direction?: "column" | "columnReverse";
|
|
5
|
+
}
|
|
6
|
+
declare const Stack: React.ForwardRefExoticComponent<StackProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { Stack };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../../lib/utils";
|
|
4
|
+
import { Flex } from "../flex/flex";
|
|
5
|
+
const Stack = React.forwardRef(({ className, direction = "column", gap = 4, align = "stretch", ...props }, ref) => {
|
|
6
|
+
return (_jsx(Flex, { ref: ref, direction: direction, gap: gap, align: align, className: cn("w-full", className), ...props }));
|
|
7
|
+
});
|
|
8
|
+
Stack.displayName = "Stack";
|
|
9
|
+
export { Stack };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Stack } from "./stack";
|
|
3
|
+
declare const meta: Meta<typeof Stack>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Stack>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Reverse: Story;
|
|
8
|
+
export declare const Vertical: Story;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Stack } from "./stack";
|
|
3
|
+
const meta = {
|
|
4
|
+
title: "Components/Stack",
|
|
5
|
+
component: Stack,
|
|
6
|
+
tags: ["autodocs"],
|
|
7
|
+
argTypes: {
|
|
8
|
+
direction: {
|
|
9
|
+
control: "select",
|
|
10
|
+
options: ["column", "columnReverse"],
|
|
11
|
+
},
|
|
12
|
+
gap: {
|
|
13
|
+
control: "select",
|
|
14
|
+
options: [0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 16],
|
|
15
|
+
},
|
|
16
|
+
align: {
|
|
17
|
+
control: "select",
|
|
18
|
+
options: ["start", "center", "end", "baseline", "stretch"],
|
|
19
|
+
},
|
|
20
|
+
justify: {
|
|
21
|
+
control: "select",
|
|
22
|
+
options: ["start", "center", "end", "between", "around", "evenly"],
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
export default meta;
|
|
27
|
+
export const Default = {
|
|
28
|
+
args: {
|
|
29
|
+
children: (_jsxs(_Fragment, { children: [_jsx("div", { className: "w-20 h-20 bg-primary rounded" }), _jsx("div", { className: "w-20 h-20 bg-secondary rounded" }), _jsx("div", { className: "w-20 h-20 bg-accent rounded" })] })),
|
|
30
|
+
gap: 4,
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
export const Reverse = {
|
|
34
|
+
args: {
|
|
35
|
+
...Default.args,
|
|
36
|
+
direction: "columnReverse",
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
export const Vertical = {
|
|
40
|
+
args: {
|
|
41
|
+
...Default.args,
|
|
42
|
+
direction: "column",
|
|
43
|
+
},
|
|
44
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './text';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './text';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const textVariants: (props?: ({
|
|
4
|
+
size?: "base" | "sm" | "lg" | "xl" | "xs" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | null | undefined;
|
|
5
|
+
weight?: "bold" | "black" | "normal" | "medium" | "thin" | "light" | "semibold" | "extrabold" | "extralight" | null | undefined;
|
|
6
|
+
align?: "center" | "end" | "start" | "left" | "right" | "justify" | null | undefined;
|
|
7
|
+
color?: "default" | "primary" | "secondary" | "destructive" | "muted" | "accent" | null | undefined;
|
|
8
|
+
truncate?: boolean | null | undefined;
|
|
9
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
|
+
export interface TextProps extends Omit<React.HTMLAttributes<HTMLParagraphElement>, "color">, VariantProps<typeof textVariants> {
|
|
11
|
+
asChild?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
14
|
+
export { Text, textVariants };
|
|
@@ -0,0 +1,66 @@
|
|
|
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 * as React from "react";
|
|
5
|
+
import { cn } from "../../lib/utils";
|
|
6
|
+
const textVariants = cva("text-foreground", {
|
|
7
|
+
variants: {
|
|
8
|
+
size: {
|
|
9
|
+
xs: "text-xs",
|
|
10
|
+
sm: "text-sm",
|
|
11
|
+
base: "text-base",
|
|
12
|
+
lg: "text-lg",
|
|
13
|
+
xl: "text-xl",
|
|
14
|
+
"2xl": "text-2xl",
|
|
15
|
+
"3xl": "text-3xl",
|
|
16
|
+
"4xl": "text-4xl",
|
|
17
|
+
"5xl": "text-5xl",
|
|
18
|
+
"6xl": "text-6xl",
|
|
19
|
+
"7xl": "text-7xl",
|
|
20
|
+
"8xl": "text-8xl",
|
|
21
|
+
"9xl": "text-9xl",
|
|
22
|
+
},
|
|
23
|
+
weight: {
|
|
24
|
+
thin: "font-thin",
|
|
25
|
+
extralight: "font-extralight",
|
|
26
|
+
light: "font-light",
|
|
27
|
+
normal: "font-normal",
|
|
28
|
+
medium: "font-medium",
|
|
29
|
+
semibold: "font-semibold",
|
|
30
|
+
bold: "font-bold",
|
|
31
|
+
extrabold: "font-extrabold",
|
|
32
|
+
black: "font-black",
|
|
33
|
+
},
|
|
34
|
+
align: {
|
|
35
|
+
left: "text-left",
|
|
36
|
+
center: "text-center",
|
|
37
|
+
right: "text-right",
|
|
38
|
+
justify: "text-justify",
|
|
39
|
+
start: "text-start",
|
|
40
|
+
end: "text-end",
|
|
41
|
+
},
|
|
42
|
+
color: {
|
|
43
|
+
default: "text-foreground",
|
|
44
|
+
muted: "text-muted-foreground",
|
|
45
|
+
primary: "text-primary",
|
|
46
|
+
secondary: "text-secondary-foreground",
|
|
47
|
+
destructive: "text-destructive",
|
|
48
|
+
accent: "text-accent-foreground",
|
|
49
|
+
},
|
|
50
|
+
truncate: {
|
|
51
|
+
true: "truncate",
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
defaultVariants: {
|
|
55
|
+
size: "base",
|
|
56
|
+
weight: "normal",
|
|
57
|
+
align: "left",
|
|
58
|
+
color: "default",
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
const Text = React.forwardRef(({ className, size, weight, align, color, truncate, asChild = false, ...props }, ref) => {
|
|
62
|
+
const Comp = asChild ? Slot : "p";
|
|
63
|
+
return (_jsx(Comp, { className: cn(textVariants({ size, weight, align, color, truncate, className })), ref: ref, ...props }));
|
|
64
|
+
});
|
|
65
|
+
Text.displayName = "Text";
|
|
66
|
+
export { Text, textVariants };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Text } from "./text";
|
|
3
|
+
declare const meta: Meta<typeof Text>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Text>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Sizes: Story;
|
|
8
|
+
export declare const Colors: Story;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Text } from "./text";
|
|
3
|
+
const meta = {
|
|
4
|
+
title: "Components/Text",
|
|
5
|
+
component: Text,
|
|
6
|
+
tags: ["autodocs"],
|
|
7
|
+
argTypes: {
|
|
8
|
+
size: {
|
|
9
|
+
control: "select",
|
|
10
|
+
options: ["xs", "sm", "base", "lg", "xl", "2xl", "3xl", "4xl", "5xl", "6xl", "7xl", "8xl", "9xl"],
|
|
11
|
+
},
|
|
12
|
+
weight: {
|
|
13
|
+
control: "select",
|
|
14
|
+
options: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
|
|
15
|
+
},
|
|
16
|
+
align: {
|
|
17
|
+
control: "select",
|
|
18
|
+
options: ["left", "center", "right", "justify", "start", "end"],
|
|
19
|
+
},
|
|
20
|
+
color: {
|
|
21
|
+
control: "select",
|
|
22
|
+
options: ["default", "muted", "primary", "secondary", "destructive", "accent"],
|
|
23
|
+
},
|
|
24
|
+
truncate: {
|
|
25
|
+
control: "boolean",
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
export default meta;
|
|
30
|
+
export const Default = {
|
|
31
|
+
args: {
|
|
32
|
+
children: "The quick brown fox jumps over the lazy dog",
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
export const Sizes = {
|
|
36
|
+
render: () => (_jsxs("div", { className: "flex flex-col gap-4", children: [_jsx(Text, { size: "xs", children: "Extra Small Text" }), _jsx(Text, { size: "sm", children: "Small Text" }), _jsx(Text, { size: "base", children: "Base Text" }), _jsx(Text, { size: "lg", children: "Large Text" }), _jsx(Text, { size: "xl", children: "Extra Large Text" }), _jsx(Text, { size: "2xl", children: "2XL Text" })] })),
|
|
37
|
+
};
|
|
38
|
+
export const Colors = {
|
|
39
|
+
render: () => (_jsxs("div", { className: "flex flex-col gap-4", children: [_jsx(Text, { color: "default", children: "Default Color" }), _jsx(Text, { color: "muted", children: "Muted Color" }), _jsx(Text, { color: "primary", children: "Primary Color" }), _jsx(Text, { color: "secondary", children: "Secondary Color" }), _jsx(Text, { color: "destructive", children: "Destructive Color" })] })),
|
|
40
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export * from "./components/accordion";
|
|
2
|
+
export * from "./components/alert";
|
|
3
|
+
export * from "./components/alert-dialog";
|
|
4
|
+
export * from "./components/aspect-ratio";
|
|
5
|
+
export * from "./components/avatar";
|
|
6
|
+
export * from "./components/badge";
|
|
7
|
+
export * from "./components/banner";
|
|
8
|
+
export * from "./components/breadcrumbs";
|
|
9
|
+
export * from "./components/button";
|
|
10
|
+
export * from "./components/button-group";
|
|
11
|
+
export * from "./components/calendar";
|
|
12
|
+
export * from "./components/card";
|
|
13
|
+
export * from "./components/charts";
|
|
14
|
+
export * from "./components/checkbox";
|
|
15
|
+
export * from "./components/combobox";
|
|
16
|
+
export * from "./components/command";
|
|
17
|
+
export * from "./components/container";
|
|
18
|
+
export * from "./components/data-table";
|
|
19
|
+
export * from "./components/date-picker";
|
|
20
|
+
export * from "./components/dialog";
|
|
21
|
+
export * from "./components/dnd";
|
|
22
|
+
export * from "./components/drawer";
|
|
23
|
+
export * from "./components/dropdown-menu";
|
|
24
|
+
export * from "./components/empty-state";
|
|
25
|
+
export * from "./components/error-boundary";
|
|
26
|
+
export * from "./components/field";
|
|
27
|
+
export * from "./components/file-upload";
|
|
28
|
+
export * from "./components/flex";
|
|
29
|
+
export * from "./components/footer";
|
|
30
|
+
export * from "./components/group";
|
|
31
|
+
export * from "./components/header";
|
|
32
|
+
export * from "./components/heading";
|
|
33
|
+
export * from "./components/input";
|
|
34
|
+
export * from "./components/input-group";
|
|
35
|
+
export * from "./components/input-otp";
|
|
36
|
+
export * from "./components/label";
|
|
37
|
+
export * from "./components/list";
|
|
38
|
+
export * from "./components/loading";
|
|
39
|
+
export * from "./components/menubar";
|
|
40
|
+
export * from "./components/metric-card";
|
|
41
|
+
export * from "./components/multi-select";
|
|
42
|
+
export * from "./components/navigation";
|
|
43
|
+
export * from "./components/navigation-menu";
|
|
44
|
+
export * from "./components/page-transition";
|
|
45
|
+
export * from "./components/pagination";
|
|
46
|
+
export * from "./components/password-strength-indicator";
|
|
47
|
+
export * from "./components/popover";
|
|
48
|
+
export * from "./components/progress";
|
|
49
|
+
export * from "./components/radio-group";
|
|
50
|
+
export * from "./components/resizable";
|
|
51
|
+
export * from "./components/scroll-area";
|
|
52
|
+
export * from "./components/select";
|
|
53
|
+
export * from "./components/separator";
|
|
54
|
+
export * from "./components/session-card";
|
|
55
|
+
export * from "./components/sidebar";
|
|
56
|
+
export * from "./components/slider";
|
|
57
|
+
export * from "./components/social-login-button";
|
|
58
|
+
export * from "./components/sparkline-chart";
|
|
59
|
+
export * from "./components/stack";
|
|
60
|
+
export * from "./components/switch";
|
|
61
|
+
export * from "./components/table";
|
|
62
|
+
export * from "./components/tabs";
|
|
63
|
+
export * from "./components/tag-input";
|
|
64
|
+
export * from "./components/text";
|
|
65
|
+
export * from "./components/textarea";
|
|
66
|
+
export * from "./components/toast";
|
|
67
|
+
export * from "./components/tooltip";
|
|
68
|
+
export * from "./components/user-menu-dropdown";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// Main entry point for @kala-ui/react
|
|
2
|
+
// Export all components
|
|
3
|
+
export * from "./components/accordion";
|
|
4
|
+
export * from "./components/alert";
|
|
5
|
+
export * from "./components/alert-dialog";
|
|
6
|
+
export * from "./components/aspect-ratio";
|
|
7
|
+
export * from "./components/avatar";
|
|
8
|
+
export * from "./components/badge";
|
|
9
|
+
export * from "./components/banner";
|
|
10
|
+
export * from "./components/breadcrumbs";
|
|
11
|
+
export * from "./components/button";
|
|
12
|
+
export * from "./components/button-group";
|
|
13
|
+
export * from "./components/calendar";
|
|
14
|
+
export * from "./components/card";
|
|
15
|
+
export * from "./components/charts";
|
|
16
|
+
export * from "./components/checkbox";
|
|
17
|
+
export * from "./components/combobox";
|
|
18
|
+
export * from "./components/command";
|
|
19
|
+
export * from "./components/container";
|
|
20
|
+
export * from "./components/data-table";
|
|
21
|
+
export * from "./components/date-picker";
|
|
22
|
+
// export * from "./components/design-system"; // No index
|
|
23
|
+
export * from "./components/dialog";
|
|
24
|
+
export * from "./components/dnd";
|
|
25
|
+
export * from "./components/drawer";
|
|
26
|
+
export * from "./components/dropdown-menu";
|
|
27
|
+
export * from "./components/empty-state";
|
|
28
|
+
export * from "./components/error-boundary";
|
|
29
|
+
export * from "./components/field";
|
|
30
|
+
export * from "./components/file-upload";
|
|
31
|
+
export * from "./components/flex";
|
|
32
|
+
export * from "./components/footer";
|
|
33
|
+
export * from "./components/group";
|
|
34
|
+
export * from "./components/header";
|
|
35
|
+
export * from "./components/heading";
|
|
36
|
+
export * from "./components/input";
|
|
37
|
+
export * from "./components/input-group";
|
|
38
|
+
export * from "./components/input-otp";
|
|
39
|
+
export * from "./components/label";
|
|
40
|
+
export * from "./components/list";
|
|
41
|
+
export * from "./components/loading";
|
|
42
|
+
export * from "./components/menubar";
|
|
43
|
+
export * from "./components/metric-card";
|
|
44
|
+
export * from "./components/multi-select";
|
|
45
|
+
export * from "./components/navigation";
|
|
46
|
+
export * from "./components/navigation-menu";
|
|
47
|
+
export * from "./components/page-transition";
|
|
48
|
+
export * from "./components/pagination";
|
|
49
|
+
export * from "./components/password-strength-indicator";
|
|
50
|
+
export * from "./components/popover";
|
|
51
|
+
export * from "./components/progress";
|
|
52
|
+
export * from "./components/radio-group";
|
|
53
|
+
export * from "./components/resizable";
|
|
54
|
+
export * from "./components/scroll-area";
|
|
55
|
+
export * from "./components/select";
|
|
56
|
+
export * from "./components/separator";
|
|
57
|
+
export * from "./components/session-card";
|
|
58
|
+
export * from "./components/sidebar";
|
|
59
|
+
// export * from "./components/skeleton"; // Conflicts with others
|
|
60
|
+
export * from "./components/slider";
|
|
61
|
+
export * from "./components/social-login-button";
|
|
62
|
+
export * from "./components/sparkline-chart";
|
|
63
|
+
export * from "./components/stack";
|
|
64
|
+
export * from "./components/switch";
|
|
65
|
+
export * from "./components/table";
|
|
66
|
+
export * from "./components/tabs";
|
|
67
|
+
export * from "./components/tag-input";
|
|
68
|
+
export * from "./components/text";
|
|
69
|
+
export * from "./components/textarea";
|
|
70
|
+
export * from "./components/toast";
|
|
71
|
+
export * from "./components/tooltip";
|
|
72
|
+
export * from "./components/user-menu-dropdown";
|
|
73
|
+
// Export styles - but styles is a css file, not ts
|
|
74
|
+
// export * from "./styles";
|
|
75
|
+
// Export config - no index
|
|
76
|
+
// export * from "./config";
|
|
77
|
+
// Export lib - no index
|
|
78
|
+
// export * from "./lib";
|
|
79
|
+
// Export primitives - no index
|
|
80
|
+
// export * from "./primitives";
|
package/dist/lib/animations.js
CHANGED
|
@@ -94,100 +94,100 @@ export const transitionClasses = {
|
|
|
94
94
|
* Define the actual CSS keyframes in your global styles or Tailwind config.
|
|
95
95
|
* These values match the keyframes from design tokens.
|
|
96
96
|
*/
|
|
97
|
-
export const keyframesCSS = `
|
|
98
|
-
@keyframes fade-in {
|
|
99
|
-
from { opacity: 0; }
|
|
100
|
-
to { opacity: 1; }
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
@keyframes fade-out {
|
|
104
|
-
from { opacity: 1; }
|
|
105
|
-
to { opacity: 0; }
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
@keyframes slide-in-from-top {
|
|
109
|
-
from { transform: translateY(-100%); }
|
|
110
|
-
to { transform: translateY(0); }
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
@keyframes slide-in-from-bottom {
|
|
114
|
-
from { transform: translateY(100%); }
|
|
115
|
-
to { transform: translateY(0); }
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
@keyframes slide-in-from-left {
|
|
119
|
-
from { transform: translateX(-100%); }
|
|
120
|
-
to { transform: translateX(0); }
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
@keyframes slide-in-from-right {
|
|
124
|
-
from { transform: translateX(100%); }
|
|
125
|
-
to { transform: translateX(0); }
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
@keyframes slide-out-to-top {
|
|
129
|
-
from { transform: translateY(0); }
|
|
130
|
-
to { transform: translateY(-100%); }
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
@keyframes slide-out-to-bottom {
|
|
134
|
-
from { transform: translateY(0); }
|
|
135
|
-
to { transform: translateY(100%); }
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
@keyframes slide-out-to-left {
|
|
139
|
-
from { transform: translateX(0); }
|
|
140
|
-
to { transform: translateX(-100%); }
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
@keyframes slide-out-to-right {
|
|
144
|
-
from { transform: translateX(0); }
|
|
145
|
-
to { transform: translateX(100%); }
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
@keyframes scale-in {
|
|
149
|
-
from { transform: scale(0.95); opacity: 0; }
|
|
150
|
-
to { transform: scale(1); opacity: 1; }
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
@keyframes scale-out {
|
|
154
|
-
from { transform: scale(1); opacity: 1; }
|
|
155
|
-
to { transform: scale(0.95); opacity: 0; }
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
@keyframes expand-vertical {
|
|
159
|
-
from {
|
|
160
|
-
max-height: 0;
|
|
161
|
-
opacity: 0;
|
|
162
|
-
}
|
|
163
|
-
to {
|
|
164
|
-
max-height: var(--max-height, 1000px);
|
|
165
|
-
opacity: 1;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
@keyframes collapse-vertical {
|
|
170
|
-
from {
|
|
171
|
-
max-height: var(--max-height, 1000px);
|
|
172
|
-
opacity: 1;
|
|
173
|
-
}
|
|
174
|
-
to {
|
|
175
|
-
max-height: 0;
|
|
176
|
-
opacity: 0;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
/* Respect prefers-reduced-motion */
|
|
181
|
-
@media (prefers-reduced-motion: reduce) {
|
|
182
|
-
*,
|
|
183
|
-
*::before,
|
|
184
|
-
*::after {
|
|
185
|
-
animation-duration: 0.01ms !important;
|
|
186
|
-
animation-iteration-count: 1 !important;
|
|
187
|
-
transition-duration: 0.01ms !important;
|
|
188
|
-
scroll-behavior: auto !important;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
97
|
+
export const keyframesCSS = `
|
|
98
|
+
@keyframes fade-in {
|
|
99
|
+
from { opacity: 0; }
|
|
100
|
+
to { opacity: 1; }
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@keyframes fade-out {
|
|
104
|
+
from { opacity: 1; }
|
|
105
|
+
to { opacity: 0; }
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@keyframes slide-in-from-top {
|
|
109
|
+
from { transform: translateY(-100%); }
|
|
110
|
+
to { transform: translateY(0); }
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@keyframes slide-in-from-bottom {
|
|
114
|
+
from { transform: translateY(100%); }
|
|
115
|
+
to { transform: translateY(0); }
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@keyframes slide-in-from-left {
|
|
119
|
+
from { transform: translateX(-100%); }
|
|
120
|
+
to { transform: translateX(0); }
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@keyframes slide-in-from-right {
|
|
124
|
+
from { transform: translateX(100%); }
|
|
125
|
+
to { transform: translateX(0); }
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@keyframes slide-out-to-top {
|
|
129
|
+
from { transform: translateY(0); }
|
|
130
|
+
to { transform: translateY(-100%); }
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
@keyframes slide-out-to-bottom {
|
|
134
|
+
from { transform: translateY(0); }
|
|
135
|
+
to { transform: translateY(100%); }
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
@keyframes slide-out-to-left {
|
|
139
|
+
from { transform: translateX(0); }
|
|
140
|
+
to { transform: translateX(-100%); }
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@keyframes slide-out-to-right {
|
|
144
|
+
from { transform: translateX(0); }
|
|
145
|
+
to { transform: translateX(100%); }
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
@keyframes scale-in {
|
|
149
|
+
from { transform: scale(0.95); opacity: 0; }
|
|
150
|
+
to { transform: scale(1); opacity: 1; }
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
@keyframes scale-out {
|
|
154
|
+
from { transform: scale(1); opacity: 1; }
|
|
155
|
+
to { transform: scale(0.95); opacity: 0; }
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
@keyframes expand-vertical {
|
|
159
|
+
from {
|
|
160
|
+
max-height: 0;
|
|
161
|
+
opacity: 0;
|
|
162
|
+
}
|
|
163
|
+
to {
|
|
164
|
+
max-height: var(--max-height, 1000px);
|
|
165
|
+
opacity: 1;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@keyframes collapse-vertical {
|
|
170
|
+
from {
|
|
171
|
+
max-height: var(--max-height, 1000px);
|
|
172
|
+
opacity: 1;
|
|
173
|
+
}
|
|
174
|
+
to {
|
|
175
|
+
max-height: 0;
|
|
176
|
+
opacity: 0;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/* Respect prefers-reduced-motion */
|
|
181
|
+
@media (prefers-reduced-motion: reduce) {
|
|
182
|
+
*,
|
|
183
|
+
*::before,
|
|
184
|
+
*::after {
|
|
185
|
+
animation-duration: 0.01ms !important;
|
|
186
|
+
animation-iteration-count: 1 !important;
|
|
187
|
+
transition-duration: 0.01ms !important;
|
|
188
|
+
scroll-behavior: auto !important;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
191
|
`;
|
|
192
192
|
/**
|
|
193
193
|
* Utility function to build animation class string
|