@nikala-ui/core 0.10.1 → 0.11.0-nightly.b01fa01
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/package.json +1 -1
- package/registry/banner.json +1 -1
- package/registry/bubble.json +18 -0
- package/registry/button-group.json +20 -0
- package/registry/button.json +1 -1
- package/registry/checkbox.json +4 -1
- package/registry/combobox.json +1 -1
- package/registry/command.json +3 -2
- package/registry/context-menu.json +1 -1
- package/registry/create-app-updater.json +13 -0
- package/registry/create-chat-scroll.json +13 -0
- package/registry/create-document-tabs.json +13 -0
- package/registry/create-drop-zone.json +13 -0
- package/registry/create-global-shortcut.json +13 -0
- package/registry/create-pagination.json +13 -0
- package/registry/create-tauri-window.json +13 -0
- package/registry/dialog.json +1 -1
- package/registry/dropdown-menu.json +3 -2
- package/registry/dropzone.json +21 -0
- package/registry/field.json +1 -1
- package/registry/footer.json +18 -0
- package/registry/forgot-password-01.json +28 -0
- package/registry/form-message.json +3 -2
- package/registry/hero-01.json +22 -0
- package/registry/icon-button.json +1 -1
- package/registry/index.json +432 -5
- package/registry/login-01.json +28 -0
- package/registry/marker.json +17 -0
- package/registry/marquee.json +17 -0
- package/registry/message.json +17 -0
- package/registry/navbar.json +19 -0
- package/registry/navigation-menu.json +22 -0
- package/registry/number-input.json +1 -1
- package/registry/otp-verification-01.json +26 -0
- package/registry/pagination.json +22 -0
- package/registry/popover.json +4 -1
- package/registry/rating.json +19 -0
- package/registry/register-01.json +31 -0
- package/registry/resizable.json +1 -1
- package/registry/review-card.json +23 -0
- package/registry/scroll-area.json +1 -1
- package/registry/select.json +3 -2
- package/registry/sheet.json +1 -1
- package/registry/sidebar.json +24 -0
- package/registry/spinner.json +1 -1
- package/registry/stat.json +19 -0
- package/registry/status.json +1 -1
- package/registry/switch.json +4 -1
- package/registry/table.json +17 -0
- package/registry/tabs.json +4 -1
- package/registry/theme-manager.json +4 -3
- package/registry/timeline.json +18 -0
- package/registry/titlebar-tabs.json +24 -0
- package/registry/titlebar.json +26 -0
- package/registry/toggle-group.json +21 -0
- package/registry/updater-modal.json +26 -0
- package/src/registry/blocks/forgot-password-01.tsx +141 -0
- package/src/registry/blocks/hero-01.tsx +28 -0
- package/src/registry/blocks/login-01.tsx +231 -0
- package/src/registry/blocks/otp-verification-01.tsx +170 -0
- package/src/registry/blocks/register-01.tsx +318 -0
- package/src/registry/components/ui/banner.tsx +0 -2
- package/src/registry/components/ui/bubble.tsx +142 -0
- package/src/registry/components/ui/button-group.tsx +42 -0
- package/src/registry/components/ui/button.tsx +1 -1
- package/src/registry/components/ui/checkbox.tsx +1 -1
- package/src/registry/components/ui/combobox.tsx +83 -18
- package/src/registry/components/ui/command.tsx +101 -105
- package/src/registry/components/ui/context-menu.tsx +67 -22
- package/src/registry/components/ui/dialog.tsx +42 -32
- package/src/registry/components/ui/dropdown-menu.tsx +69 -31
- package/src/registry/components/ui/dropzone.tsx +189 -0
- package/src/registry/components/ui/field.tsx +7 -3
- package/src/registry/components/ui/footer.tsx +247 -0
- package/src/registry/components/ui/form-message.tsx +2 -2
- package/src/registry/components/ui/icon-button.tsx +1 -1
- package/src/registry/components/ui/marker.tsx +102 -0
- package/src/registry/components/ui/marquee.tsx +118 -0
- package/src/registry/components/ui/message.tsx +168 -0
- package/src/registry/components/ui/navbar.tsx +375 -0
- package/src/registry/components/ui/navigation-menu.tsx +358 -0
- package/src/registry/components/ui/number-input.tsx +3 -3
- package/src/registry/components/ui/pagination.tsx +258 -0
- package/src/registry/components/ui/popover.tsx +1 -1
- package/src/registry/components/ui/rating.tsx +185 -0
- package/src/registry/components/ui/resizable.tsx +3 -1
- package/src/registry/components/ui/review-card.tsx +195 -0
- package/src/registry/components/ui/scroll-area.tsx +13 -3
- package/src/registry/components/ui/select.tsx +16 -19
- package/src/registry/components/ui/sheet.tsx +58 -53
- package/src/registry/components/ui/sidebar.tsx +692 -0
- package/src/registry/components/ui/spinner.tsx +1 -1
- package/src/registry/components/ui/stat.tsx +245 -0
- package/src/registry/components/ui/status.tsx +7 -5
- package/src/registry/components/ui/switch.tsx +1 -1
- package/src/registry/components/ui/table.tsx +160 -0
- package/src/registry/components/ui/tabs.tsx +1 -1
- package/src/registry/components/ui/theme-toggle.tsx +80 -79
- package/src/registry/components/ui/timeline.tsx +350 -0
- package/src/registry/components/ui/titlebar-tabs.tsx +412 -0
- package/src/registry/components/ui/titlebar.tsx +399 -0
- package/src/registry/components/ui/toggle-group.tsx +203 -0
- package/src/registry/components/ui/updater-modal.tsx +254 -0
- package/src/registry/index.ts +3 -3
- package/src/registry/metadata.ts +184 -5
- package/src/registry/providers/theme-transitions.ts +81 -50
|
@@ -3,7 +3,7 @@ import * as DialogPrimitive from "@kobalte/core/dialog";
|
|
|
3
3
|
import type { PolymorphicProps } from "@kobalte/core/polymorphic";
|
|
4
4
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
5
5
|
import { X } from "lucide-solid";
|
|
6
|
-
import { ScrollArea } from "
|
|
6
|
+
import { ScrollArea } from "@/components/ui/scroll-area";
|
|
7
7
|
import { cn } from "@/lib/cn";
|
|
8
8
|
|
|
9
9
|
// Global CSS Keyframe Animations specifically designed for Kobalte animationend DOM events
|
|
@@ -15,7 +15,7 @@ const sheetStyles = `
|
|
|
15
15
|
@keyframes sheet-slide-in-top { from { transform: translateY(-100%); } to { transform: translateY(0); } }
|
|
16
16
|
@keyframes sheet-slide-out-top { from { transform: translateY(0); } to { transform: translateY(-100%); } }
|
|
17
17
|
@keyframes sheet-slide-in-bottom { from { transform: translateY(100%); } to { transform: translateY(0); } }
|
|
18
|
-
@keyframes sheet-slide-out-bottom { from { transform: translateY(0); } to { transform: translateY(
|
|
18
|
+
@keyframes sheet-slide-out-bottom { from { transform: translateY(0); } to { transform: translateY(100%); } }
|
|
19
19
|
@keyframes sheet-fade-in { from { opacity: 0; } to { opacity: 1; } }
|
|
20
20
|
@keyframes sheet-fade-out { from { opacity: 1; } to { opacity: 0; } }
|
|
21
21
|
`;
|
|
@@ -28,12 +28,10 @@ export const sheetVariants = cva(
|
|
|
28
28
|
{
|
|
29
29
|
variants: {
|
|
30
30
|
side: {
|
|
31
|
-
|
|
32
|
-
bottom:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
right:
|
|
36
|
-
"inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm data-[expanded]:animate-[sheet-slide-in-right_300ms_ease-in-out] data-[closed]:animate-[sheet-slide-out-right_300ms_ease-in-out]",
|
|
31
|
+
left: "fixed top-0 bottom-0 left-0 w-3/4 border-r border-border sm:max-w-sm data-[expanded]:animate-[sheet-slide-in-left_300ms_ease-in-out] data-[closed]:animate-[sheet-slide-out-left_300ms_ease-in-out]",
|
|
32
|
+
right: "fixed top-0 bottom-0 right-0 w-3/4 border-l border-border sm:max-w-sm data-[expanded]:animate-[sheet-slide-in-right_300ms_ease-in-out] data-[closed]:animate-[sheet-slide-out-right_300ms_ease-in-out]",
|
|
33
|
+
top: "fixed top-0 left-0 right-0 border-b border-border data-[expanded]:animate-[sheet-slide-in-top_300ms_ease-in-out] data-[closed]:animate-[sheet-slide-out-top_300ms_ease-in-out]",
|
|
34
|
+
bottom: "fixed bottom-0 left-0 right-0 border-t border-border data-[expanded]:animate-[sheet-slide-in-bottom_300ms_ease-in-out] data-[closed]:animate-[sheet-slide-out-bottom_300ms_ease-in-out]",
|
|
37
35
|
},
|
|
38
36
|
},
|
|
39
37
|
defaultVariants: {
|
|
@@ -42,20 +40,23 @@ export const sheetVariants = cva(
|
|
|
42
40
|
}
|
|
43
41
|
);
|
|
44
42
|
|
|
45
|
-
export
|
|
43
|
+
export type SheetRootProps = DialogPrimitive.DialogRootProps;
|
|
44
|
+
|
|
45
|
+
export const Sheet: Component<SheetRootProps> = (props) => {
|
|
46
|
+
return <DialogPrimitive.Root {...props} />;
|
|
47
|
+
};
|
|
48
|
+
|
|
46
49
|
export const SheetTrigger = DialogPrimitive.Trigger;
|
|
47
50
|
export const SheetClose = DialogPrimitive.CloseButton;
|
|
48
|
-
export const SheetPortal = DialogPrimitive.Portal;
|
|
49
51
|
|
|
50
|
-
export
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
};
|
|
52
|
+
export interface SheetOverlayProps<T extends ValidComponent = "div"> {
|
|
53
|
+
/** Whether to apply background blur effect or keep transparent (default: true) */
|
|
54
|
+
blur?: boolean;
|
|
55
|
+
class?: string;
|
|
56
|
+
}
|
|
56
57
|
|
|
57
58
|
/**
|
|
58
|
-
*
|
|
59
|
+
* Backdrop overlay wrapper with fade-in and fade-out animations.
|
|
59
60
|
*/
|
|
60
61
|
export const SheetOverlay = <T extends ValidComponent = "div">(
|
|
61
62
|
props: PolymorphicProps<T, SheetOverlayProps<T>>
|
|
@@ -65,8 +66,8 @@ export const SheetOverlay = <T extends ValidComponent = "div">(
|
|
|
65
66
|
return (
|
|
66
67
|
<DialogPrimitive.Overlay
|
|
67
68
|
class={cn(
|
|
68
|
-
"fixed inset-0 z-50
|
|
69
|
-
local.blur !== false ? "bg-black/80 backdrop-blur-sm" : "bg-
|
|
69
|
+
"fixed inset-0 z-50 data-[expanded]:animate-[sheet-fade-in_300ms_ease-in-out] data-[closed]:animate-[sheet-fade-out_300ms_ease-in-out]",
|
|
70
|
+
local.blur !== false ? "bg-black/80 backdrop-blur-sm" : "bg-transparent",
|
|
70
71
|
local.class
|
|
71
72
|
)}
|
|
72
73
|
{...(rest as any)}
|
|
@@ -76,28 +77,32 @@ export const SheetOverlay = <T extends ValidComponent = "div">(
|
|
|
76
77
|
|
|
77
78
|
export type SheetContentProps<T extends ValidComponent = "div"> =
|
|
78
79
|
DialogPrimitive.DialogContentProps<T> &
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
80
|
+
VariantProps<typeof sheetVariants> & {
|
|
81
|
+
/** Direction from which the sheet slides out: top, bottom, left, right */
|
|
82
|
+
side?: "top" | "bottom" | "left" | "right";
|
|
83
|
+
/** Whether to display the top-right close (X) button (default: true) */
|
|
84
|
+
showCloseButton?: boolean;
|
|
85
|
+
/** Whether clicking outside closes the sheet (default: true) */
|
|
86
|
+
closeOnOutsideClick?: boolean;
|
|
87
|
+
/** Whether to apply background backdrop blur (default: true) */
|
|
88
|
+
blur?: boolean;
|
|
89
|
+
class?: string;
|
|
90
|
+
children?: JSX.Element;
|
|
91
|
+
};
|
|
87
92
|
|
|
88
93
|
/**
|
|
89
|
-
*
|
|
94
|
+
* Main sheet container with smooth CSS keyframe slide animations.
|
|
90
95
|
*/
|
|
91
96
|
export const SheetContent = <T extends ValidComponent = "div">(
|
|
92
97
|
props: PolymorphicProps<T, SheetContentProps<T>>
|
|
93
98
|
) => {
|
|
94
99
|
const [local, rest] = splitProps(props as SheetContentProps, [
|
|
95
|
-
"class",
|
|
96
|
-
"children",
|
|
97
100
|
"side",
|
|
98
101
|
"showCloseButton",
|
|
99
102
|
"closeOnOutsideClick",
|
|
100
103
|
"blur",
|
|
104
|
+
"class",
|
|
105
|
+
"children",
|
|
101
106
|
"onPointerDownOutside",
|
|
102
107
|
"onInteractOutside",
|
|
103
108
|
]);
|
|
@@ -123,7 +128,7 @@ export const SheetContent = <T extends ValidComponent = "div">(
|
|
|
123
128
|
};
|
|
124
129
|
|
|
125
130
|
return (
|
|
126
|
-
<
|
|
131
|
+
<DialogPrimitive.Portal>
|
|
127
132
|
<style>{sheetStyles}</style>
|
|
128
133
|
<SheetOverlay blur={local.blur} />
|
|
129
134
|
<DialogPrimitive.Content
|
|
@@ -144,7 +149,7 @@ export const SheetContent = <T extends ValidComponent = "div">(
|
|
|
144
149
|
</DialogPrimitive.CloseButton>
|
|
145
150
|
</Show>
|
|
146
151
|
</DialogPrimitive.Content>
|
|
147
|
-
</
|
|
152
|
+
</DialogPrimitive.Portal>
|
|
148
153
|
);
|
|
149
154
|
};
|
|
150
155
|
|
|
@@ -172,44 +177,44 @@ export const SheetFooter: Component<SheetFooterProps> = (props) => {
|
|
|
172
177
|
|
|
173
178
|
return (
|
|
174
179
|
<div
|
|
175
|
-
class={cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2
|
|
180
|
+
class={cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", local.class)}
|
|
176
181
|
{...rest}
|
|
177
182
|
/>
|
|
178
183
|
);
|
|
179
184
|
};
|
|
180
185
|
|
|
181
|
-
export
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}
|
|
186
|
+
export type SheetTitleProps<T extends ValidComponent = "h2"> =
|
|
187
|
+
DialogPrimitive.DialogTitleProps<T> & {
|
|
188
|
+
class?: string;
|
|
189
|
+
};
|
|
185
190
|
|
|
186
|
-
export const SheetTitle
|
|
187
|
-
|
|
191
|
+
export const SheetTitle = <T extends ValidComponent = "h2">(
|
|
192
|
+
props: PolymorphicProps<T, SheetTitleProps<T>>
|
|
193
|
+
) => {
|
|
194
|
+
const [local, rest] = splitProps(props as SheetTitleProps, ["class"]);
|
|
188
195
|
|
|
189
196
|
return (
|
|
190
197
|
<DialogPrimitive.Title
|
|
191
198
|
class={cn("text-lg font-semibold text-foreground", local.class)}
|
|
192
|
-
{...rest}
|
|
193
|
-
|
|
194
|
-
{local.children}
|
|
195
|
-
</DialogPrimitive.Title>
|
|
199
|
+
{...(rest as any)}
|
|
200
|
+
/>
|
|
196
201
|
);
|
|
197
202
|
};
|
|
198
203
|
|
|
199
|
-
export
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
}
|
|
204
|
+
export type SheetDescriptionProps<T extends ValidComponent = "p"> =
|
|
205
|
+
DialogPrimitive.DialogDescriptionProps<T> & {
|
|
206
|
+
class?: string;
|
|
207
|
+
};
|
|
203
208
|
|
|
204
|
-
export const SheetDescription
|
|
205
|
-
|
|
209
|
+
export const SheetDescription = <T extends ValidComponent = "p">(
|
|
210
|
+
props: PolymorphicProps<T, SheetDescriptionProps<T>>
|
|
211
|
+
) => {
|
|
212
|
+
const [local, rest] = splitProps(props as SheetDescriptionProps, ["class"]);
|
|
206
213
|
|
|
207
214
|
return (
|
|
208
215
|
<DialogPrimitive.Description
|
|
209
216
|
class={cn("text-sm text-muted-foreground", local.class)}
|
|
210
|
-
{...rest}
|
|
211
|
-
|
|
212
|
-
{local.children}
|
|
213
|
-
</DialogPrimitive.Description>
|
|
217
|
+
{...(rest as any)}
|
|
218
|
+
/>
|
|
214
219
|
);
|
|
215
220
|
};
|