@buildkitgg/shadcn-baseui-sera 0.2.0 → 0.3.0
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 +20 -1
- package/README.md +25 -0
- package/dist/animations.css +23 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/lib/utils.d.ts +1 -1
- package/dist/lib/utils.js +1 -1
- package/dist/shadcn.css +637 -0
- package/dist/styles-no-reset.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +45 -0
- package/dist/theme.css +63 -0
- package/dist/ui/accordion.js +2 -2
- package/dist/ui/alert-dialog.js +3 -3
- package/dist/ui/alert.js +3 -3
- package/dist/ui/aspect-ratio.js +1 -1
- package/dist/ui/attachment.js +2 -2
- package/dist/ui/avatar.js +2 -2
- package/dist/ui/badge.js +2 -2
- package/dist/ui/breadcrumb.js +7 -4
- package/dist/ui/bubble.js +4 -4
- package/dist/ui/button-group.js +2 -2
- package/dist/ui/button.js +5 -5
- package/dist/ui/calendar.js +9 -9
- package/dist/ui/card.js +1 -1
- package/dist/ui/carousel.js +19 -11
- package/dist/ui/chart.js +1 -1
- package/dist/ui/checkbox.js +1 -1
- package/dist/ui/code-block.js +3 -2
- package/dist/ui/combobox.d.ts +3 -1
- package/dist/ui/combobox.js +10 -7
- package/dist/ui/command.d.ts +1 -1
- package/dist/ui/command.js +7 -4
- package/dist/ui/context-menu.js +10 -10
- package/dist/ui/dialog.js +5 -3
- package/dist/ui/drawer.js +6 -6
- package/dist/ui/dropdown-menu.js +9 -9
- package/dist/ui/empty.js +1 -1
- package/dist/ui/field.js +3 -3
- package/dist/ui/hover-card.js +2 -2
- package/dist/ui/input-group.js +2 -2
- package/dist/ui/input-otp.js +1 -1
- package/dist/ui/input.js +1 -1
- package/dist/ui/item.js +2 -2
- package/dist/ui/kbd.js +1 -1
- package/dist/ui/label.js +1 -1
- package/dist/ui/marker.js +3 -3
- package/dist/ui/menubar.js +8 -8
- package/dist/ui/message-scroller.js +2 -2
- package/dist/ui/message.js +1 -1
- package/dist/ui/native-select.js +2 -2
- package/dist/ui/navigation-menu.js +4 -4
- package/dist/ui/pagination.d.ts +2 -2
- package/dist/ui/pagination.js +14 -7
- package/dist/ui/popover.js +2 -2
- package/dist/ui/progress.js +2 -2
- package/dist/ui/questionnaire.js +1 -1
- package/dist/ui/radio-group.js +2 -2
- package/dist/ui/resizable.js +2 -2
- package/dist/ui/scroll-area.js +2 -2
- package/dist/ui/select.js +4 -4
- package/dist/ui/separator.js +1 -1
- package/dist/ui/sheet.js +3 -2
- package/dist/ui/sidebar.js +15 -12
- package/dist/ui/skeleton.js +1 -1
- package/dist/ui/slider.js +1 -1
- package/dist/ui/spinner.js +4 -2
- package/dist/ui/switch.js +2 -2
- package/dist/ui/table.js +3 -3
- package/dist/ui/tabs.js +2 -2
- package/dist/ui/textarea.js +1 -1
- package/dist/ui/toast.js +5 -4
- package/dist/ui/toggle-group.js +2 -2
- package/dist/ui/toggle.js +4 -4
- package/dist/ui/tooltip.js +2 -2
- package/dist/ui/trace.js +5 -5
- package/package.json +12 -4
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
@import "./theme.css";
|
|
2
|
+
@import "./animations.css";
|
|
3
|
+
@import "./shadcn.css";
|
|
4
|
+
@source "./ui";
|
|
5
|
+
@custom-variant dark (&:where(.dark, .dark *):not(:where(.light, .light *)));
|
|
6
|
+
@theme inline {
|
|
7
|
+
--radius-sm: calc(var(--radius) * 0.6);
|
|
8
|
+
--radius-md: calc(var(--radius) * 0.8);
|
|
9
|
+
--radius-lg: var(--radius);
|
|
10
|
+
--radius-xl: calc(var(--radius) * 1.4);
|
|
11
|
+
--radius-2xl: calc(var(--radius) * 1.8);
|
|
12
|
+
--radius-3xl: calc(var(--radius) * 2.2);
|
|
13
|
+
--radius-4xl: calc(var(--radius) * 2.6);
|
|
14
|
+
--color-background: var(--background);
|
|
15
|
+
--color-foreground: var(--foreground);
|
|
16
|
+
--color-card: var(--card);
|
|
17
|
+
--color-card-foreground: var(--card-foreground);
|
|
18
|
+
--color-popover: var(--popover);
|
|
19
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
20
|
+
--color-primary: var(--primary);
|
|
21
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
22
|
+
--color-secondary: var(--secondary);
|
|
23
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
24
|
+
--color-muted: var(--muted);
|
|
25
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
26
|
+
--color-accent: var(--accent);
|
|
27
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
28
|
+
--color-destructive: var(--destructive);
|
|
29
|
+
--color-border: var(--border);
|
|
30
|
+
--color-input: var(--input);
|
|
31
|
+
--color-ring: var(--ring);
|
|
32
|
+
--color-chart-1: var(--chart-1);
|
|
33
|
+
--color-chart-2: var(--chart-2);
|
|
34
|
+
--color-chart-3: var(--chart-3);
|
|
35
|
+
--color-chart-4: var(--chart-4);
|
|
36
|
+
--color-chart-5: var(--chart-5);
|
|
37
|
+
--color-sidebar: var(--sidebar);
|
|
38
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
39
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
40
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
41
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
42
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
43
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
44
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
45
|
+
}
|
package/dist/theme.css
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
:root, .light {--background: oklch(1 0 0);
|
|
2
|
+
--foreground: oklch(0.145 0 0);
|
|
3
|
+
--card: oklch(1 0 0);
|
|
4
|
+
--card-foreground: oklch(0.145 0 0);
|
|
5
|
+
--popover: oklch(1 0 0);
|
|
6
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
7
|
+
--primary: oklch(0.205 0 0);
|
|
8
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
9
|
+
--secondary: oklch(0.97 0 0);
|
|
10
|
+
--secondary-foreground: oklch(0.205 0 0);
|
|
11
|
+
--muted: oklch(0.97 0 0);
|
|
12
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
13
|
+
--accent: oklch(0.97 0 0);
|
|
14
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
15
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
16
|
+
--border: oklch(0.922 0 0);
|
|
17
|
+
--input: oklch(0.922 0 0);
|
|
18
|
+
--ring: oklch(0.708 0 0);
|
|
19
|
+
--chart-1: oklch(0.87 0 0);
|
|
20
|
+
--chart-2: oklch(0.556 0 0);
|
|
21
|
+
--chart-3: oklch(0.439 0 0);
|
|
22
|
+
--chart-4: oklch(0.371 0 0);
|
|
23
|
+
--chart-5: oklch(0.269 0 0);
|
|
24
|
+
--radius: 0.625rem;
|
|
25
|
+
--sidebar: oklch(0.985 0 0);
|
|
26
|
+
--sidebar-foreground: oklch(0.145 0 0);
|
|
27
|
+
--sidebar-primary: oklch(0.205 0 0);
|
|
28
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
29
|
+
--sidebar-accent: oklch(0.97 0 0);
|
|
30
|
+
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
31
|
+
--sidebar-border: oklch(0.922 0 0);
|
|
32
|
+
--sidebar-ring: oklch(0.708 0 0);}
|
|
33
|
+
.dark {--background: oklch(0.145 0 0);
|
|
34
|
+
--foreground: oklch(0.985 0 0);
|
|
35
|
+
--card: oklch(0.205 0 0);
|
|
36
|
+
--card-foreground: oklch(0.985 0 0);
|
|
37
|
+
--popover: oklch(0.205 0 0);
|
|
38
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
39
|
+
--primary: oklch(0.922 0 0);
|
|
40
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
41
|
+
--secondary: oklch(0.269 0 0);
|
|
42
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
43
|
+
--muted: oklch(0.269 0 0);
|
|
44
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
45
|
+
--accent: oklch(0.269 0 0);
|
|
46
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
47
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
48
|
+
--border: oklch(1 0 0 / 10%);
|
|
49
|
+
--input: oklch(1 0 0 / 15%);
|
|
50
|
+
--ring: oklch(0.556 0 0);
|
|
51
|
+
--chart-1: oklch(0.87 0 0);
|
|
52
|
+
--chart-2: oklch(0.556 0 0);
|
|
53
|
+
--chart-3: oklch(0.439 0 0);
|
|
54
|
+
--chart-4: oklch(0.371 0 0);
|
|
55
|
+
--chart-5: oklch(0.269 0 0);
|
|
56
|
+
--sidebar: oklch(0.205 0 0);
|
|
57
|
+
--sidebar-foreground: oklch(0.985 0 0);
|
|
58
|
+
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
59
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
60
|
+
--sidebar-accent: oklch(0.269 0 0);
|
|
61
|
+
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
62
|
+
--sidebar-border: oklch(1 0 0 / 10%);
|
|
63
|
+
--sidebar-ring: oklch(0.556 0 0);}
|
package/dist/ui/accordion.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Accordion as AccordionPrimitive } from "@base-ui/react/accordion";
|
|
3
|
-
import { cn } from "
|
|
3
|
+
import { cn } from "@buildkitgg/shadcn-runtime";
|
|
4
4
|
import { ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
5
5
|
function Accordion({ className, ...props }) {
|
|
6
6
|
return (_jsx(AccordionPrimitive.Root, { "data-slot": "accordion", className: cn("flex w-full flex-col", className), ...props }));
|
|
@@ -9,7 +9,7 @@ function AccordionItem({ className, ...props }) {
|
|
|
9
9
|
return (_jsx(AccordionPrimitive.Item, { "data-slot": "accordion-item", className: cn("not-last:border-b", className), ...props }));
|
|
10
10
|
}
|
|
11
11
|
function AccordionTrigger({ className, children, ...props }) {
|
|
12
|
-
return (_jsx(AccordionPrimitive.Header, { className: "flex", children: _jsxs(AccordionPrimitive.Trigger, { "data-slot": "accordion-trigger", className: cn("focus-visible:ring-ring/30 focus-visible:border-ring **:data-[slot=accordion-trigger-icon]:text-muted-foreground rounded-none gap-6 py-4 text-
|
|
12
|
+
return (_jsx(AccordionPrimitive.Header, { className: "flex", children: _jsxs(AccordionPrimitive.Trigger, { "data-slot": "accordion-trigger", className: cn("focus-visible:ring-ring/30 focus-visible:border-ring **:data-[slot=accordion-trigger-icon]:text-muted-foreground rounded-none gap-6 py-4 text-start text-sm font-semibold hover:underline focus-visible:ring-2 **:data-[slot=accordion-trigger-icon]:ms-auto **:data-[slot=accordion-trigger-icon]:size-3.5 group/accordion-trigger relative flex flex-1 items-start justify-between border border-transparent transition-all outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50", className), ...props, children: [children, _jsx(ChevronDownIcon, { "data-slot": "accordion-trigger-icon", className: "pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden" }), _jsx(ChevronUpIcon, { "data-slot": "accordion-trigger-icon", className: "pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline" })] }) }));
|
|
13
13
|
}
|
|
14
14
|
function AccordionContent({ className, children, ...props }) {
|
|
15
15
|
return (_jsx(AccordionPrimitive.Panel, { "data-slot": "accordion-content", className: "data-open:animate-accordion-down data-closed:animate-accordion-up text-sm overflow-hidden", ...props, children: _jsx("div", { className: cn("pt-0 pb-4 h-(--accordion-panel-height) data-ending-style:h-0 data-starting-style:h-0 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4", className), children: children }) }));
|
package/dist/ui/alert-dialog.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog";
|
|
4
|
-
import { cn } from "
|
|
4
|
+
import { cn } from "@buildkitgg/shadcn-runtime";
|
|
5
5
|
import { Button } from "./button.js";
|
|
6
6
|
function AlertDialog({ ...props }) {
|
|
7
7
|
return _jsx(AlertDialogPrimitive.Root, { "data-slot": "alert-dialog", ...props });
|
|
@@ -16,10 +16,10 @@ function AlertDialogOverlay({ className, ...props }) {
|
|
|
16
16
|
return (_jsx(AlertDialogPrimitive.Backdrop, { "data-slot": "alert-dialog-overlay", className: cn("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/20 duration-100 supports-backdrop-filter:backdrop-blur-sm fixed inset-0 isolate z-50", className), ...props }));
|
|
17
17
|
}
|
|
18
18
|
function AlertDialogContent({ className, size = "default", ...props }) {
|
|
19
|
-
return (_jsxs(AlertDialogPortal, { children: [_jsx(AlertDialogOverlay, {}), _jsx(AlertDialogPrimitive.Popup, { "data-slot": "alert-dialog-content", "data-size": size, className: cn("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 bg-popover text-popover-foreground ring-foreground/10 gap-6 rounded-none p-6 shadow-md ring-1 duration-100 data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-md group/alert-dialog-content fixed top-1/2
|
|
19
|
+
return (_jsxs(AlertDialogPortal, { children: [_jsx(AlertDialogOverlay, {}), _jsx(AlertDialogPrimitive.Popup, { "data-slot": "alert-dialog-content", "data-size": size, className: cn("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 bg-popover text-popover-foreground ring-foreground/10 gap-6 rounded-none p-6 shadow-md ring-1 duration-100 data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-md group/alert-dialog-content fixed top-1/2 start-1/2 z-50 grid w-full -translate-x-1/2 rtl:translate-x-1/2 -translate-y-1/2 outline-none", className), ...props })] }));
|
|
20
20
|
}
|
|
21
21
|
function AlertDialogHeader({ className, ...props }) {
|
|
22
|
-
return (_jsx("div", { "data-slot": "alert-dialog-header", className: cn("grid grid-rows-[auto_1fr] place-items-center gap-2 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-
|
|
22
|
+
return (_jsx("div", { "data-slot": "alert-dialog-header", className: cn("grid grid-rows-[auto_1fr] place-items-center gap-2 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-start sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]", className), ...props }));
|
|
23
23
|
}
|
|
24
24
|
function AlertDialogFooter({ className, ...props }) {
|
|
25
25
|
return (_jsx("div", { "data-slot": "alert-dialog-footer", className: cn("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end", className), ...props }));
|
package/dist/ui/alert.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
|
-
import { cn } from "
|
|
4
|
-
const alertVariants = cva("grid gap-1 bg-background border px-4 py-3 text-
|
|
3
|
+
import { cn } from "@buildkitgg/shadcn-runtime";
|
|
4
|
+
const alertVariants = cva("grid gap-1 bg-background border px-4 py-3 text-start text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pe-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4 after:-inset-y-px after:-start-px after:w-0.5 after:absolute group/alert relative w-full", {
|
|
5
5
|
variants: {
|
|
6
6
|
variant: {
|
|
7
7
|
default: "bg-card text-card-foreground after:bg-foreground",
|
|
@@ -22,6 +22,6 @@ function AlertDescription({ className, ...props }) {
|
|
|
22
22
|
return (_jsx("div", { "data-slot": "alert-description", className: cn("text-muted-foreground text-sm text-balance md:text-pretty [&_p:not(:last-child)]:mb-4 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground", className), ...props }));
|
|
23
23
|
}
|
|
24
24
|
function AlertAction({ className, ...props }) {
|
|
25
|
-
return (_jsx("div", { "data-slot": "alert-action", className: cn("absolute top-2.5
|
|
25
|
+
return (_jsx("div", { "data-slot": "alert-action", className: cn("absolute top-2.5 end-3", className), ...props }));
|
|
26
26
|
}
|
|
27
27
|
export { Alert, AlertTitle, AlertDescription, AlertAction };
|
package/dist/ui/aspect-ratio.js
CHANGED
package/dist/ui/attachment.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
3
3
|
import { useRender } from "@base-ui/react/use-render";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
|
-
import { cn } from "
|
|
5
|
+
import { cn } from "@buildkitgg/shadcn-runtime";
|
|
6
6
|
import { Button } from "./button.js";
|
|
7
7
|
const attachmentVariants = cva("rounded-none w-fit focus-within:ring-1 focus-within:ring-ring/30 group/attachment relative flex max-w-full min-w-0 shrink-0 flex-wrap border bg-card text-card-foreground transition-colors has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 data-[state=idle]:border-dashed", {
|
|
8
8
|
variants: {
|
|
@@ -44,7 +44,7 @@ function AttachmentDescription({ className, ...props }) {
|
|
|
44
44
|
return (_jsx("span", { "data-slot": "attachment-description", className: cn("mt-0.5 text-xs block min-w-0 truncate text-muted-foreground group-data-[state=error]/attachment:text-destructive/80", "max-w-full", className), ...props }));
|
|
45
45
|
}
|
|
46
46
|
function AttachmentActions({ className, ...props }) {
|
|
47
|
-
return (_jsx("div", { "data-slot": "attachment-actions", className: cn("group-data-[orientation=vertical]/attachment:absolute group-data-[orientation=vertical]/attachment:top-3 group-data-[orientation=vertical]/attachment:
|
|
47
|
+
return (_jsx("div", { "data-slot": "attachment-actions", className: cn("group-data-[orientation=vertical]/attachment:absolute group-data-[orientation=vertical]/attachment:top-3 group-data-[orientation=vertical]/attachment:end-3 relative z-20 group-data-[orientation=vertical]/attachment:gap-1 flex shrink-0 items-center", className), ...props }));
|
|
48
48
|
}
|
|
49
49
|
function AttachmentAction({ className, variant, size = "icon-xs", ...props }) {
|
|
50
50
|
return (_jsx(Button, { "data-slot": "attachment-action", variant: variant ?? "ghost", size: size, className: cn(className), ...props }));
|
package/dist/ui/avatar.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Avatar as AvatarPrimitive } from "@base-ui/react/avatar";
|
|
4
|
-
import { cn } from "
|
|
4
|
+
import { cn } from "@buildkitgg/shadcn-runtime";
|
|
5
5
|
function Avatar({ className, size = "default", ...props }) {
|
|
6
6
|
return (_jsx(AvatarPrimitive.Root, { "data-slot": "avatar", "data-size": size, className: cn("size-8 rounded-full after:rounded-full data-[size=lg]:size-10 data-[size=sm]:size-6 group/avatar relative flex shrink-0 select-none after:absolute after:inset-0 after:border after:border-border after:mix-blend-darken dark:after:mix-blend-lighten", className), ...props }));
|
|
7
7
|
}
|
|
@@ -12,7 +12,7 @@ function AvatarFallback({ className, ...props }) {
|
|
|
12
12
|
return (_jsx(AvatarPrimitive.Fallback, { "data-slot": "avatar-fallback", className: cn("bg-muted text-muted-foreground rounded-full flex size-full items-center justify-center text-sm group-data-[size=sm]/avatar:text-xs", className), ...props }));
|
|
13
13
|
}
|
|
14
14
|
function AvatarBadge({ className, ...props }) {
|
|
15
|
-
return (_jsx("span", { "data-slot": "avatar-badge", className: cn("bg-primary text-primary-foreground ring-background absolute
|
|
15
|
+
return (_jsx("span", { "data-slot": "avatar-badge", className: cn("bg-primary text-primary-foreground ring-background absolute end-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-blend-color ring-2 select-none", "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden", "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2", "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2", className), ...props }));
|
|
16
16
|
}
|
|
17
17
|
function AvatarGroup({ className, ...props }) {
|
|
18
18
|
return (_jsx("div", { "data-slot": "avatar-group", className: cn("group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background", className), ...props }));
|
package/dist/ui/badge.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
2
2
|
import { useRender } from "@base-ui/react/use-render";
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
|
-
import { cn } from "
|
|
5
|
-
const badgeVariants = cva("gap-1.5 rounded-none border-0 bg-transparent px-0 py-0 text-[0.625rem] font-semibold uppercase tracking-widest transition-colors has-data-[icon=inline-end]:
|
|
4
|
+
import { cn } from "@buildkitgg/shadcn-runtime";
|
|
5
|
+
const badgeVariants = cva("gap-1.5 rounded-none border-0 bg-transparent px-0 py-0 text-[0.625rem] font-semibold uppercase tracking-widest transition-colors has-data-[icon=inline-end]:pe-0 has-data-[icon=inline-start]:ps-0 [&>svg]:size-3! group/badge inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none", {
|
|
6
6
|
variants: {
|
|
7
7
|
variant: {
|
|
8
8
|
default: "text-foreground [a]:hover:text-foreground/70",
|
package/dist/ui/breadcrumb.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
3
4
|
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
-
import { cn } from "
|
|
5
|
+
import { cn, useShadcnLocalization } from "@buildkitgg/shadcn-runtime";
|
|
5
6
|
import { ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
|
|
6
7
|
function Breadcrumb({ className, ...props }) {
|
|
7
|
-
|
|
8
|
+
const { strings } = useShadcnLocalization();
|
|
9
|
+
return (_jsx("nav", { "aria-label": strings.breadcrumb, "data-slot": "breadcrumb", className: cn(className), ...props }));
|
|
8
10
|
}
|
|
9
11
|
function BreadcrumbList({ className, ...props }) {
|
|
10
12
|
return (_jsx("ol", { "data-slot": "breadcrumb-list", className: cn("text-muted-foreground gap-1.5 text-xs uppercase tracking-wide sm:gap-2.5 flex flex-wrap items-center wrap-break-word", className), ...props }));
|
|
@@ -28,9 +30,10 @@ function BreadcrumbPage({ className, ...props }) {
|
|
|
28
30
|
return (_jsx("span", { "data-slot": "breadcrumb-page", role: "link", "aria-disabled": "true", "aria-current": "page", className: cn("text-foreground font-normal", className), ...props }));
|
|
29
31
|
}
|
|
30
32
|
function BreadcrumbSeparator({ children, className, ...props }) {
|
|
31
|
-
return (_jsx("li", { "data-slot": "breadcrumb-separator", role: "presentation", "aria-hidden": "true", className: cn("[&>svg]:size-3.5", className), ...props, children: children ?? (_jsx(ChevronRightIcon, { className: "
|
|
33
|
+
return (_jsx("li", { "data-slot": "breadcrumb-separator", role: "presentation", "aria-hidden": "true", className: cn("[&>svg]:size-3.5", className), ...props, children: children ?? (_jsx(ChevronRightIcon, { className: "rtl:rotate-180" })) }));
|
|
32
34
|
}
|
|
33
35
|
function BreadcrumbEllipsis({ className, ...props }) {
|
|
34
|
-
|
|
36
|
+
const { strings } = useShadcnLocalization();
|
|
37
|
+
return (_jsxs("span", { "data-slot": "breadcrumb-ellipsis", role: "presentation", "aria-hidden": "true", className: cn("size-5 [&>svg]:size-4 flex items-center justify-center", className), ...props, children: [_jsx(MoreHorizontalIcon, {}), _jsx("span", { className: "sr-only", children: strings.more })] }));
|
|
35
38
|
}
|
|
36
39
|
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
|
package/dist/ui/bubble.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
3
3
|
import { useRender } from "@base-ui/react/use-render";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
|
-
import { cn } from "
|
|
5
|
+
import { cn } from "@buildkitgg/shadcn-runtime";
|
|
6
6
|
function BubbleGroup({ className, ...props }) {
|
|
7
7
|
return (_jsx("div", { "data-slot": "bubble-group", className: cn("gap-2 flex min-w-0 flex-col", className), ...props }));
|
|
8
8
|
}
|
|
@@ -29,7 +29,7 @@ function BubbleContent({ className, render, ...props }) {
|
|
|
29
29
|
return useRender({
|
|
30
30
|
defaultTagName: "div",
|
|
31
31
|
props: mergeProps({
|
|
32
|
-
className: cn("rounded-none border border-transparent px-4 py-3 text-sm leading-relaxed [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-2 [button,a]:focus-visible:ring-ring/30 group-data-[align=end]/bubble:self-end w-fit max-w-full min-w-0 overflow-hidden wrap-break-word [button]:text-
|
|
32
|
+
className: cn("rounded-none border border-transparent px-4 py-3 text-sm leading-relaxed [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-2 [button,a]:focus-visible:ring-ring/30 group-data-[align=end]/bubble:self-end w-fit max-w-full min-w-0 overflow-hidden wrap-break-word [button]:text-start [button,a]:transition-colors", className),
|
|
33
33
|
}, props),
|
|
34
34
|
render,
|
|
35
35
|
state: {
|
|
@@ -44,8 +44,8 @@ const bubbleReactionsVariants = cva("rounded-none ring-3 ring-card bg-muted shri
|
|
|
44
44
|
bottom: "bottom-0 translate-y-3/4",
|
|
45
45
|
},
|
|
46
46
|
align: {
|
|
47
|
-
start: "
|
|
48
|
-
end: "
|
|
47
|
+
start: "start-3",
|
|
48
|
+
end: "end-3",
|
|
49
49
|
},
|
|
50
50
|
},
|
|
51
51
|
defaultVariants: {
|
package/dist/ui/button-group.js
CHANGED
|
@@ -2,12 +2,12 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
3
3
|
import { useRender } from "@base-ui/react/use-render";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
|
-
import { cn } from "
|
|
5
|
+
import { cn } from "@buildkitgg/shadcn-runtime";
|
|
6
6
|
import { Separator } from "./separator.js";
|
|
7
7
|
const buttonGroupVariants = cva("*:data-[slot=input]:px-4 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-none has-[>[data-variant=outline]]:[&>input]:border-border has-[>[data-variant=outline]]:[&>input:focus-visible]:border-ring has-[>[data-variant=outline]]:*:data-[slot=input-group]:border-border has-[>[data-variant=outline]]:[&>[data-slot=input-group]:has(:focus-visible)]:border-ring has-[>[data-variant=outline]]:*:data-[slot=select-trigger]:border-border has-[>[data-variant=outline]]:[&>[data-slot=select-trigger]:focus-visible]:border-ring has-[>[data-variant=outline]]:*:data-[slot=input-group]:px-2.5 has-[>[data-variant=outline]]:*:[[role=combobox]]:px-2.5 flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1", {
|
|
8
8
|
variants: {
|
|
9
9
|
orientation: {
|
|
10
|
-
horizontal: "[&>[data-slot]:not(:has(~[data-slot]))]:rounded-none! *:data-slot:rounded-
|
|
10
|
+
horizontal: "[&>[data-slot]:not(:has(~[data-slot]))]:rounded-none! *:data-slot:rounded-e-none [&>[data-slot]~[data-slot]]:rounded-s-none [&>[data-slot]~[data-slot]]:border-s-0",
|
|
11
11
|
vertical: "[&>[data-slot]:not(:has(~[data-slot]))]:rounded-none! flex-col *:data-slot:rounded-b-none [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0",
|
|
12
12
|
},
|
|
13
13
|
},
|
package/dist/ui/button.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
|
-
import { cn } from "
|
|
4
|
+
import { cn } from "@buildkitgg/shadcn-runtime";
|
|
5
5
|
const buttonVariants = cva("focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-none border border-transparent bg-clip-padding text-xs font-semibold uppercase tracking-widest focus-visible:ring-2 aria-invalid:ring-2 active:not-aria-[haspopup]:translate-y-px [&_svg:not([class*='size-'])]:size-3.5 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
6
6
|
variants: {
|
|
7
7
|
variant: {
|
|
@@ -13,10 +13,10 @@ const buttonVariants = cva("focus-visible:border-ring focus-visible:ring-ring/30
|
|
|
13
13
|
link: "text-primary underline-offset-4 hover:underline underline",
|
|
14
14
|
},
|
|
15
15
|
size: {
|
|
16
|
-
default: "h-10 gap-1.5 px-6 has-data-[icon=inline-end]:
|
|
17
|
-
xs: "h-7 gap-1 px-3 has-data-[icon=inline-end]:
|
|
18
|
-
sm: "h-9 gap-1 px-4 has-data-[icon=inline-end]:
|
|
19
|
-
lg: "h-11 gap-1.5 px-8 has-data-[icon=inline-end]:
|
|
16
|
+
default: "h-10 gap-1.5 px-6 has-data-[icon=inline-end]:pe-4 has-data-[icon=inline-start]:ps-4",
|
|
17
|
+
xs: "h-7 gap-1 px-3 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2 [&_svg:not([class*='size-'])]:size-3",
|
|
18
|
+
sm: "h-9 gap-1 px-4 has-data-[icon=inline-end]:pe-3 has-data-[icon=inline-start]:ps-3",
|
|
19
|
+
lg: "h-11 gap-1.5 px-8 has-data-[icon=inline-end]:pe-5 has-data-[icon=inline-start]:ps-5",
|
|
20
20
|
icon: "size-10",
|
|
21
21
|
"icon-xs": "size-7 [&_svg:not([class*='size-'])]:size-3",
|
|
22
22
|
"icon-sm": "size-9",
|
package/dist/ui/calendar.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import { cn } from "
|
|
4
|
+
import { cn } from "@buildkitgg/shadcn-runtime";
|
|
5
5
|
import { DayPicker, getDefaultClassNames, } from "react-day-picker";
|
|
6
6
|
import { Button, buttonVariants } from "./button.js";
|
|
7
7
|
import { ChevronLeftIcon, ChevronRightIcon, ChevronDownIcon } from "lucide-react";
|
|
@@ -30,12 +30,12 @@ function Calendar({ className, classNames, showOutsideDays = true, captionLayout
|
|
|
30
30
|
week: cn("mt-2 flex w-full", defaultClassNames.week),
|
|
31
31
|
week_number_header: cn("w-(--cell-size) select-none", defaultClassNames.week_number_header),
|
|
32
32
|
week_number: cn("text-[0.8rem] text-muted-foreground select-none", defaultClassNames.week_number),
|
|
33
|
-
day: cn("group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-
|
|
34
|
-
? "[&:nth-child(2)[data-selected=true]_button]:rounded-
|
|
35
|
-
: "[&:first-child[data-selected=true]_button]:rounded-
|
|
36
|
-
range_start: cn("relative isolate z-0 rounded-
|
|
33
|
+
day: cn("group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-e-(--cell-radius)", props.showWeekNumber
|
|
34
|
+
? "[&:nth-child(2)[data-selected=true]_button]:rounded-s-(--cell-radius)"
|
|
35
|
+
: "[&:first-child[data-selected=true]_button]:rounded-s-(--cell-radius)", defaultClassNames.day),
|
|
36
|
+
range_start: cn("relative isolate z-0 rounded-s-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:end-0 after:w-4 after:bg-muted", defaultClassNames.range_start),
|
|
37
37
|
range_middle: cn("rounded-none", defaultClassNames.range_middle),
|
|
38
|
-
range_end: cn("relative isolate z-0 rounded-
|
|
38
|
+
range_end: cn("relative isolate z-0 rounded-e-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:start-0 after:w-4 after:bg-muted", defaultClassNames.range_end),
|
|
39
39
|
today: cn("rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none", defaultClassNames.today),
|
|
40
40
|
outside: cn("text-muted-foreground aria-selected:text-muted-foreground", defaultClassNames.outside),
|
|
41
41
|
disabled: cn("text-muted-foreground opacity-50", defaultClassNames.disabled),
|
|
@@ -47,10 +47,10 @@ function Calendar({ className, classNames, showOutsideDays = true, captionLayout
|
|
|
47
47
|
},
|
|
48
48
|
Chevron: ({ className, orientation, ...props }) => {
|
|
49
49
|
if (orientation === "left") {
|
|
50
|
-
return (_jsx(ChevronLeftIcon, { className: cn("
|
|
50
|
+
return (_jsx(ChevronLeftIcon, { className: cn("rtl:rotate-180 size-4", className), ...props }));
|
|
51
51
|
}
|
|
52
52
|
if (orientation === "right") {
|
|
53
|
-
return (_jsx(ChevronRightIcon, { className: cn("
|
|
53
|
+
return (_jsx(ChevronRightIcon, { className: cn("rtl:rotate-180 size-4", className), ...props }));
|
|
54
54
|
}
|
|
55
55
|
return (_jsx(ChevronDownIcon, { className: cn("size-4", className), ...props }));
|
|
56
56
|
},
|
|
@@ -71,6 +71,6 @@ function CalendarDayButton({ className, day, modifiers, locale, ...props }) {
|
|
|
71
71
|
return (_jsx(Button, { variant: "ghost", size: "icon", "data-day": day.date.toLocaleDateString(locale?.code), "data-selected-single": modifiers.selected &&
|
|
72
72
|
!modifiers.range_start &&
|
|
73
73
|
!modifiers.range_end &&
|
|
74
|
-
!modifiers.range_middle, "data-range-start": modifiers.range_start, "data-range-end": modifiers.range_end, "data-range-middle": modifiers.range_middle, className: cn("relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-
|
|
74
|
+
!modifiers.range_middle, "data-range-start": modifiers.range_start, "data-range-end": modifiers.range_end, "data-range-middle": modifiers.range_middle, className: cn("relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-e-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-s-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70", defaultClassNames.day, className), ...props }));
|
|
75
75
|
}
|
|
76
76
|
export { Calendar, CalendarDayButton };
|
package/dist/ui/card.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "
|
|
2
|
+
import { cn } from "@buildkitgg/shadcn-runtime";
|
|
3
3
|
function Card({ className, size = "default", ...props }) {
|
|
4
4
|
return (_jsx("div", { "data-slot": "card", "data-size": size, className: cn("bg-card text-card-foreground ring-foreground/5 gap-(--card-spacing) overflow-hidden py-(--card-spacing) text-sm shadow-sm ring-1 [--card-spacing:--spacing(8)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(5)] *:[img:first-child]:rounded-none *:[img:last-child]:rounded-none group/card flex flex-col", className), ...props }));
|
|
5
5
|
}
|
package/dist/ui/carousel.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import { cn } from "
|
|
4
|
+
import { cn, useShadcnLocalization } from "@buildkitgg/shadcn-runtime";
|
|
5
5
|
import useEmblaCarousel from "embla-carousel-react";
|
|
6
6
|
import { Button } from "./button.js";
|
|
7
7
|
import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
|
|
8
|
+
import { useDirection } from "@base-ui/react/direction-provider";
|
|
8
9
|
const CarouselContext = React.createContext(null);
|
|
9
10
|
function useCarousel() {
|
|
10
11
|
const context = React.useContext(CarouselContext);
|
|
@@ -14,7 +15,11 @@ function useCarousel() {
|
|
|
14
15
|
return context;
|
|
15
16
|
}
|
|
16
17
|
function Carousel({ orientation = "horizontal", opts, setApi, plugins, className, children, ...props }) {
|
|
18
|
+
const { strings } = useShadcnLocalization();
|
|
19
|
+
const inheritedDirection = useDirection();
|
|
20
|
+
const direction = opts?.direction ?? inheritedDirection;
|
|
17
21
|
const [carouselRef, api] = useEmblaCarousel({
|
|
22
|
+
direction: direction,
|
|
18
23
|
...opts,
|
|
19
24
|
axis: orientation === "horizontal" ? "x" : "y",
|
|
20
25
|
}, plugins);
|
|
@@ -33,15 +38,15 @@ function Carousel({ orientation = "horizontal", opts, setApi, plugins, className
|
|
|
33
38
|
api?.scrollNext();
|
|
34
39
|
}, [api]);
|
|
35
40
|
const handleKeyDown = React.useCallback((event) => {
|
|
36
|
-
if (event.key === "ArrowLeft") {
|
|
41
|
+
if (event.key === (direction === "rtl" ? "ArrowRight" : "ArrowLeft")) {
|
|
37
42
|
event.preventDefault();
|
|
38
43
|
scrollPrev();
|
|
39
44
|
}
|
|
40
|
-
else if (event.key === "ArrowRight") {
|
|
45
|
+
else if (event.key === (direction === "rtl" ? "ArrowLeft" : "ArrowRight")) {
|
|
41
46
|
event.preventDefault();
|
|
42
47
|
scrollNext();
|
|
43
48
|
}
|
|
44
|
-
}, [scrollPrev, scrollNext]);
|
|
49
|
+
}, [scrollPrev, scrollNext, direction]);
|
|
45
50
|
React.useEffect(() => {
|
|
46
51
|
if (!api || !setApi)
|
|
47
52
|
return;
|
|
@@ -66,26 +71,29 @@ function Carousel({ orientation = "horizontal", opts, setApi, plugins, className
|
|
|
66
71
|
scrollNext,
|
|
67
72
|
canScrollPrev,
|
|
68
73
|
canScrollNext,
|
|
69
|
-
}, children: _jsx("div", { onKeyDownCapture: handleKeyDown, className: cn("relative", className), role: "region", "aria-roledescription":
|
|
74
|
+
}, children: _jsx("div", { onKeyDownCapture: handleKeyDown, className: cn("relative", className), role: "region", "aria-roledescription": strings.carousel, "data-slot": "carousel", ...props, children: children }) }));
|
|
70
75
|
}
|
|
71
76
|
function CarouselContent({ className, ...props }) {
|
|
72
77
|
const { carouselRef, orientation } = useCarousel();
|
|
73
|
-
return (_jsx("div", { ref: carouselRef, className: "overflow-hidden", "data-slot": "carousel-content", children: _jsx("div", { className: cn("flex", orientation === "horizontal" ? "-
|
|
78
|
+
return (_jsx("div", { ref: carouselRef, className: "overflow-hidden", "data-slot": "carousel-content", children: _jsx("div", { className: cn("flex", orientation === "horizontal" ? "-ms-4" : "-mt-4 flex-col", className), ...props }) }));
|
|
74
79
|
}
|
|
75
80
|
function CarouselItem({ className, ...props }) {
|
|
81
|
+
const { strings } = useShadcnLocalization();
|
|
76
82
|
const { orientation } = useCarousel();
|
|
77
|
-
return (_jsx("div", { role: "group", "aria-roledescription":
|
|
83
|
+
return (_jsx("div", { role: "group", "aria-roledescription": strings.slide, "data-slot": "carousel-item", className: cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "ps-4" : "pt-4", className), ...props }));
|
|
78
84
|
}
|
|
79
85
|
function CarouselPrevious({ className, variant = "outline", size = "icon-sm", ...props }) {
|
|
86
|
+
const { strings } = useShadcnLocalization();
|
|
80
87
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
81
88
|
return (_jsxs(Button, { "data-slot": "carousel-previous", variant: variant, size: size, className: cn("absolute touch-manipulation", orientation === "horizontal"
|
|
82
|
-
? "inset-y-0 -
|
|
83
|
-
: "-top-12
|
|
89
|
+
? "inset-y-0 -start-12 my-auto"
|
|
90
|
+
: "-top-12 start-1/2 -translate-x-1/2 rtl:translate-x-1/2 rotate-90", className), disabled: !canScrollPrev, onClick: scrollPrev, ...props, children: [_jsx(ChevronLeftIcon, { className: "rtl:rotate-180" }), _jsx("span", { className: "sr-only", children: strings.previousSlide })] }));
|
|
84
91
|
}
|
|
85
92
|
function CarouselNext({ className, variant = "outline", size = "icon-sm", ...props }) {
|
|
93
|
+
const { strings } = useShadcnLocalization();
|
|
86
94
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
87
95
|
return (_jsxs(Button, { "data-slot": "carousel-next", variant: variant, size: size, className: cn("absolute touch-manipulation", orientation === "horizontal"
|
|
88
|
-
? "inset-y-0 -
|
|
89
|
-
: "-bottom-12
|
|
96
|
+
? "inset-y-0 -end-12 my-auto"
|
|
97
|
+
: "-bottom-12 start-1/2 -translate-x-1/2 rtl:translate-x-1/2 rotate-90", className), disabled: !canScrollNext, onClick: scrollNext, ...props, children: [_jsx(ChevronRightIcon, { className: "rtl:rotate-180" }), _jsx("span", { className: "sr-only", children: strings.nextSlide })] }));
|
|
90
98
|
}
|
|
91
99
|
export { Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, useCarousel, };
|
package/dist/ui/chart.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import { cn } from "
|
|
4
|
+
import { cn } from "@buildkitgg/shadcn-runtime";
|
|
5
5
|
import * as RechartsPrimitive from "recharts";
|
|
6
6
|
// Format: { THEME_NAME: CSS_SELECTOR }
|
|
7
7
|
const THEMES = { light: "", dark: ".dark" };
|
package/dist/ui/checkbox.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";
|
|
4
|
-
import { cn } from "
|
|
4
|
+
import { cn } from "@buildkitgg/shadcn-runtime";
|
|
5
5
|
import { CheckIcon } from "lucide-react";
|
|
6
6
|
function Checkbox({ className, ...props }) {
|
|
7
7
|
return (_jsx(CheckboxPrimitive.Root, { "data-slot": "checkbox", className: cn("border-input bg-transparent data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary data-checked:border-primary aria-invalid:aria-checked:border-primary aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 flex size-4.5 items-center justify-center rounded-none border transition-shadow group-has-disabled/field:opacity-50 focus-visible:ring-2 aria-invalid:ring-2 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input group-has-[:focus-visible]/field-label:data-checked:border-primary peer relative shrink-0 outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50", className), ...props, children: _jsx(CheckboxPrimitive.Indicator, { "data-slot": "checkbox-indicator", className: "[&>svg]:size-3.5 grid place-content-center text-current transition-none", children: _jsx(CheckIcon, {}) }) }));
|
package/dist/ui/code-block.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
|
-
import { cn } from "
|
|
5
|
+
import { cn, useShadcnLocalization } from "@buildkitgg/shadcn-runtime";
|
|
6
6
|
import { Button } from "./button.js";
|
|
7
7
|
import { CheckIcon, CopyIcon } from "lucide-react";
|
|
8
8
|
const codeBlockVariants = cva("rounded-none text-sm data-[size=sm]:text-xs has-[>[data-slot=code-block-content]:focus-visible]:ring-2 has-[>[data-slot=code-block-content]:focus-visible]:ring-ring/30 group/code-block relative flex w-full min-w-0 flex-col overflow-hidden", {
|
|
@@ -29,6 +29,7 @@ function CodeBlockActions({ className, ...props }) {
|
|
|
29
29
|
return (_jsx("div", { "data-slot": "code-block-actions", className: cn("-my-1 -me-1.5 gap-1 [[data-slot=code-block]>&]:m-0 [[data-slot=code-block]>&]:top-3 [[data-slot=code-block]>&]:end-3 group-data-[size=sm]/code-block:[[data-slot=code-block]>&]:top-2 group-data-[size=sm]/code-block:[[data-slot=code-block]>&]:end-2 [[data-slot=code-block]>&]:*:[button]:bg-background [[data-slot=code-block]>&]:*:[button]:ring-1 [[data-slot=code-block]>&]:*:[button]:ring-foreground/10 ms-auto flex shrink-0 items-center [[data-slot=code-block]>&]:absolute [[data-slot=code-block]>&]:z-10 [[data-slot=code-block]>&]:opacity-0 [[data-slot=code-block]>&]:transition-opacity [[data-slot=code-block]>&]:group-focus-within/code-block:opacity-100 [[data-slot=code-block]>&]:group-hover/code-block:opacity-100 [[data-slot=code-block]>&]:pointer-coarse:opacity-100", className), ...props }));
|
|
30
30
|
}
|
|
31
31
|
function CodeBlockCopyButton({ value, variant = "ghost", size = "icon-xs", className, onClick, ...props }) {
|
|
32
|
+
const { strings } = useShadcnLocalization();
|
|
32
33
|
const [copied, setCopied] = React.useState(false);
|
|
33
34
|
React.useEffect(() => {
|
|
34
35
|
if (!copied) {
|
|
@@ -37,7 +38,7 @@ function CodeBlockCopyButton({ value, variant = "ghost", size = "icon-xs", class
|
|
|
37
38
|
const timeout = setTimeout(() => setCopied(false), 2000);
|
|
38
39
|
return () => clearTimeout(timeout);
|
|
39
40
|
}, [copied]);
|
|
40
|
-
return (_jsxs(_Fragment, { children: [_jsx(Button, { "data-slot": "code-block-copy-button", "data-copied": copied || undefined, variant: variant, size: size, "aria-label": copied ?
|
|
41
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { "data-slot": "code-block-copy-button", "data-copied": copied || undefined, variant: variant, size: size, "aria-label": copied ? strings.copied : strings.copy, className: cn(className), onClick: (event) => {
|
|
41
42
|
onClick?.(event);
|
|
42
43
|
navigator.clipboard
|
|
43
44
|
.writeText(value)
|
package/dist/ui/combobox.d.ts
CHANGED
|
@@ -16,8 +16,10 @@ declare function ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.P
|
|
|
16
16
|
declare function ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props): React.JSX.Element;
|
|
17
17
|
declare function ComboboxSeparator({ className, ...props }: ComboboxPrimitive.Separator.Props): React.JSX.Element;
|
|
18
18
|
declare function ComboboxChips({ className, ...props }: React.ComponentPropsWithRef<typeof ComboboxPrimitive.Chips> & ComboboxPrimitive.Chips.Props): React.JSX.Element;
|
|
19
|
-
declare function ComboboxChip({ className, children, showRemove, ...props }: ComboboxPrimitive.Chip.Props & {
|
|
19
|
+
declare function ComboboxChip({ removeLabel, className, children, showRemove, ...props }: ComboboxPrimitive.Chip.Props & {
|
|
20
20
|
showRemove?: boolean;
|
|
21
|
+
} & {
|
|
22
|
+
removeLabel?: string;
|
|
21
23
|
}): React.JSX.Element;
|
|
22
24
|
declare function ComboboxChipsInput({ className, ...props }: ComboboxPrimitive.Input.Props): React.JSX.Element;
|
|
23
25
|
declare function useComboboxAnchor(): React.RefObject<HTMLDivElement | null>;
|