@siyahi/ui 0.1.9-next.33 → 0.1.9-next.35
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/DESIGN.md +21 -7
- package/README.md +5 -5
- package/agents/examples/app-sidebar.tsx +0 -2
- package/agents/examples/chart-panels-three.tsx +51 -0
- package/agents/examples/context-menu.tsx +14 -4
- package/agents/examples/overview-dashboard.tsx +2 -2
- package/agents/examples/{page-hero.tsx → page-header.tsx} +4 -4
- package/agents/examples/select.tsx +2 -1
- package/agents/manifest.json +16 -5
- package/dist/components/registry/charts/area-chart-card.js +1 -0
- package/dist/components/registry/charts/bar-chart-card.js +0 -2
- package/dist/components/registry/heatmap/calendar-heatmap.js +1 -1
- package/dist/components/registry/heatmap/status-heatmap.js +1 -1
- package/dist/components/registry/heatmap/weekday-heatmap.js +1 -1
- package/dist/components/registry/niko-table/core/data-table-error-boundary.js +1 -1
- package/dist/components/registry/niko-table/core/data-table-structure.js +6 -0
- package/dist/components/registry/niko-table/core/data-table.js +1 -1
- package/dist/components/registry/niko-table/filters/table-column-sort.js +2 -2
- package/dist/components/registry/niko-table/filters/table-faceted-filter.js +3 -3
- package/dist/components/registry/niko-table/lib/column-resize-handle.js +1 -1
- package/dist/components/registry/sidebar-07/nav-user.js +16 -19
- package/dist/components/siyahi/{page-hero.d.ts → page-header.d.ts} +3 -3
- package/dist/components/siyahi/{page-hero.js → page-header.js} +4 -4
- package/dist/components/siyahi/panel-grid.d.ts +5 -2
- package/dist/components/siyahi/panel-grid.js +1 -1
- package/dist/components/siyahi/range-position.js +1 -1
- package/dist/components/siyahi/scatter-chart.js +15 -2
- package/dist/components/siyahi/status-badge.js +1 -0
- package/dist/components/siyahi/target-rows.js +2 -2
- package/dist/components/siyahi/treemap.js +0 -3
- package/dist/components/ui/alert-dialog.d.ts +20 -0
- package/dist/components/ui/alert-dialog.js +94 -0
- package/dist/components/ui/aspect-ratio.d.ts +6 -0
- package/dist/components/ui/aspect-ratio.js +13 -0
- package/dist/components/ui/attachment.d.ts +25 -0
- package/dist/components/ui/attachment.js +104 -0
- package/dist/components/ui/bubble.d.ts +18 -0
- package/dist/components/ui/bubble.js +73 -0
- package/dist/components/ui/button-group.d.ts +12 -0
- package/dist/components/ui/button-group.js +41 -0
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/carousel.d.ts +30 -0
- package/dist/components/ui/carousel.js +131 -0
- package/dist/components/ui/checkbox.d.ts +5 -0
- package/dist/components/ui/checkbox.js +20 -0
- package/dist/components/ui/combobox.d.ts +26 -0
- package/dist/components/ui/combobox.js +162 -0
- package/dist/components/ui/command.js +1 -1
- package/dist/components/ui/direction.d.ts +2 -0
- package/dist/components/ui/direction.js +1 -0
- package/dist/components/ui/drawer.d.ts +18 -0
- package/dist/components/ui/drawer.js +123 -0
- package/dist/components/ui/empty.d.ts +13 -0
- package/dist/components/ui/empty.js +59 -0
- package/dist/components/ui/field.js +1 -1
- package/dist/components/ui/hover-card.d.ts +7 -0
- package/dist/components/ui/hover-card.js +36 -0
- package/dist/components/ui/input-otp.d.ts +13 -0
- package/dist/components/ui/input-otp.js +46 -0
- package/dist/components/ui/item.d.ts +24 -0
- package/dist/components/ui/item.js +121 -0
- package/dist/components/ui/kbd.d.ts +5 -0
- package/dist/components/ui/kbd.js +19 -0
- package/dist/components/ui/marker.d.ts +12 -0
- package/dist/components/ui/marker.js +43 -0
- package/dist/components/ui/menubar.d.ts +31 -0
- package/dist/components/ui/menubar.js +136 -0
- package/dist/components/ui/message-scroller.d.ts +12 -0
- package/dist/components/ui/message-scroller.js +60 -0
- package/dist/components/ui/message.d.ts +12 -0
- package/dist/components/ui/message.js +49 -0
- package/dist/components/ui/native-select.d.ts +10 -0
- package/dist/components/ui/native-select.js +38 -0
- package/dist/components/ui/navigation-menu.d.ts +13 -0
- package/dist/components/ui/navigation-menu.js +82 -0
- package/dist/components/ui/pagination.d.ts +19 -0
- package/dist/components/ui/pagination.js +80 -0
- package/dist/components/ui/questionnaire.d.ts +21 -0
- package/dist/components/ui/questionnaire.js +170 -0
- package/dist/components/ui/radio-group.d.ts +7 -0
- package/dist/components/ui/radio-group.js +26 -0
- package/dist/components/ui/resizable.d.ts +9 -0
- package/dist/components/ui/resizable.js +28 -0
- package/dist/components/ui/sidebar.js +1 -1
- package/dist/components/ui/spinner.d.ts +4 -0
- package/dist/components/ui/spinner.js +15 -0
- package/dist/components/ui/switch.d.ts +7 -0
- package/dist/components/ui/switch.js +19 -0
- package/dist/components/ui/toast.d.ts +18 -0
- package/dist/components/ui/toast.js +123 -0
- package/dist/components/ui/trace.d.ts +20 -0
- package/dist/components/ui/trace.js +75 -0
- package/dist/index.d.ts +32 -2
- package/dist/index.js +35 -5
- package/dist/lib/chart-frame.d.ts +37 -9
- package/dist/lib/chart-frame.js +60 -30
- package/dist/lib/chart-series.d.ts +3 -2
- package/dist/lib/ticks.d.ts +9 -0
- package/dist/lib/ticks.js +25 -3
- package/dist/lib/use-render-when-fonts-load.d.ts +11 -0
- package/dist/lib/use-render-when-fonts-load.js +49 -0
- package/package.json +5 -3
- package/styles/siyahi.css +224 -26
- package/agents/report-rules.json +0 -7
- package/report.css +0 -145
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { cn } from "cn";
|
|
2
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import "react";
|
|
5
|
+
//#region src/components/ui/native-select.tsx
|
|
6
|
+
function NativeSelect({ className, size = "default", ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
8
|
+
className: cn("group/native-select relative w-fit has-[select:disabled]:opacity-50", className),
|
|
9
|
+
"data-slot": "native-select-wrapper",
|
|
10
|
+
"data-size": size,
|
|
11
|
+
children: [/* @__PURE__ */ jsx("select", {
|
|
12
|
+
"data-slot": "native-select",
|
|
13
|
+
"data-size": size,
|
|
14
|
+
className: "h-8 w-full min-w-0 appearance-none rounded-lg border border-input bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
15
|
+
...props
|
|
16
|
+
}), /* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
17
|
+
className: "pointer-events-none absolute top-1/2 right-2.5 size-4 -translate-y-1/2 text-muted-foreground select-none",
|
|
18
|
+
"aria-hidden": "true",
|
|
19
|
+
"data-slot": "native-select-icon"
|
|
20
|
+
})]
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function NativeSelectOption({ className, ...props }) {
|
|
24
|
+
return /* @__PURE__ */ jsx("option", {
|
|
25
|
+
"data-slot": "native-select-option",
|
|
26
|
+
className: cn("bg-[Canvas] text-[CanvasText]", className),
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function NativeSelectOptGroup({ className, ...props }) {
|
|
31
|
+
return /* @__PURE__ */ jsx("optgroup", {
|
|
32
|
+
"data-slot": "native-select-optgroup",
|
|
33
|
+
className: cn("bg-[Canvas] text-[CanvasText]", className),
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { NavigationMenu as NavigationMenu$1 } from "@base-ui/react/navigation-menu";
|
|
2
|
+
//#region src/components/ui/navigation-menu.d.ts
|
|
3
|
+
declare function NavigationMenu({ align, className, children, ...props }: NavigationMenu$1.Root.Props & Pick<NavigationMenu$1.Positioner.Props, "align">): import("react").JSX.Element;
|
|
4
|
+
declare function NavigationMenuList({ className, ...props }: React.ComponentPropsWithRef<typeof NavigationMenu$1.List>): import("react").JSX.Element;
|
|
5
|
+
declare function NavigationMenuItem({ className, ...props }: React.ComponentPropsWithRef<typeof NavigationMenu$1.Item>): import("react").JSX.Element;
|
|
6
|
+
declare const navigationMenuTriggerStyle: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
7
|
+
declare function NavigationMenuTrigger({ className, children, ...props }: NavigationMenu$1.Trigger.Props): import("react").JSX.Element;
|
|
8
|
+
declare function NavigationMenuContent({ className, ...props }: NavigationMenu$1.Content.Props): import("react").JSX.Element;
|
|
9
|
+
declare function NavigationMenuPositioner({ className, side, sideOffset, align, alignOffset, ...props }: NavigationMenu$1.Positioner.Props): import("react").JSX.Element;
|
|
10
|
+
declare function NavigationMenuLink({ className, ...props }: NavigationMenu$1.Link.Props): import("react").JSX.Element;
|
|
11
|
+
declare function NavigationMenuIndicator({ className, ...props }: React.ComponentPropsWithRef<typeof NavigationMenu$1.Icon>): import("react").JSX.Element;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPositioner, NavigationMenuTrigger, navigationMenuTriggerStyle };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { cn } from "cn";
|
|
2
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { NavigationMenu as NavigationMenu$1 } from "@base-ui/react/navigation-menu";
|
|
6
|
+
//#region src/components/ui/navigation-menu.tsx
|
|
7
|
+
function NavigationMenu({ align = "start", className, children, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsxs(NavigationMenu$1.Root, {
|
|
9
|
+
"data-slot": "navigation-menu",
|
|
10
|
+
className: cn("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center", className),
|
|
11
|
+
...props,
|
|
12
|
+
children: [children, /* @__PURE__ */ jsx(NavigationMenuPositioner, { align })]
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function NavigationMenuList({ className, ...props }) {
|
|
16
|
+
return /* @__PURE__ */ jsx(NavigationMenu$1.List, {
|
|
17
|
+
"data-slot": "navigation-menu-list",
|
|
18
|
+
className: cn("group flex flex-1 list-none items-center justify-center gap-0", className),
|
|
19
|
+
...props
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function NavigationMenuItem({ className, ...props }) {
|
|
23
|
+
return /* @__PURE__ */ jsx(NavigationMenu$1.Item, {
|
|
24
|
+
"data-slot": "navigation-menu-item",
|
|
25
|
+
className: cn("relative", className),
|
|
26
|
+
...props
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
const navigationMenuTriggerStyle = cva("group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-lg px-2.5 py-1.5 text-sm font-medium transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted");
|
|
30
|
+
function NavigationMenuTrigger({ className, children, ...props }) {
|
|
31
|
+
return /* @__PURE__ */ jsxs(NavigationMenu$1.Trigger, {
|
|
32
|
+
"data-slot": "navigation-menu-trigger",
|
|
33
|
+
className: cn(navigationMenuTriggerStyle(), "group", className),
|
|
34
|
+
...props,
|
|
35
|
+
children: [
|
|
36
|
+
children,
|
|
37
|
+
" ",
|
|
38
|
+
/* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
39
|
+
className: "relative top-px ml-1 size-3 transition duration-300 group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180",
|
|
40
|
+
"aria-hidden": "true"
|
|
41
|
+
})
|
|
42
|
+
]
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function NavigationMenuContent({ className, ...props }) {
|
|
46
|
+
return /* @__PURE__ */ jsx(NavigationMenu$1.Content, {
|
|
47
|
+
"data-slot": "navigation-menu-content",
|
|
48
|
+
className: cn("data-ending-style:data-activation-direction=left:translate-x-[50%] data-ending-style:data-activation-direction=right:translate-x-[-50%] data-starting-style:data-activation-direction=left:translate-x-[-50%] data-starting-style:data-activation-direction=right:translate-x-[50%] h-full w-auto p-1 transition-[opacity,transform,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:ring-foreground/10 group-data-[viewport=false]/navigation-menu:duration-300 data-ending-style:opacity-0 data-starting-style:opacity-0 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95", className),
|
|
49
|
+
...props
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function NavigationMenuPositioner({ className, side = "bottom", sideOffset = 8, align = "start", alignOffset = 0, ...props }) {
|
|
53
|
+
return /* @__PURE__ */ jsx(NavigationMenu$1.Portal, { children: /* @__PURE__ */ jsx(NavigationMenu$1.Positioner, {
|
|
54
|
+
side,
|
|
55
|
+
sideOffset,
|
|
56
|
+
align,
|
|
57
|
+
alignOffset,
|
|
58
|
+
className: cn("isolate z-50 h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0", className),
|
|
59
|
+
...props,
|
|
60
|
+
children: /* @__PURE__ */ jsx(NavigationMenu$1.Popup, {
|
|
61
|
+
className: "data-[ending-style]:easing-[ease] xs:w-(--popup-width) relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) rounded-lg bg-popover text-popover-foreground shadow ring-1 ring-foreground/10 transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0",
|
|
62
|
+
children: /* @__PURE__ */ jsx(NavigationMenu$1.Viewport, { className: "relative size-full overflow-hidden" })
|
|
63
|
+
})
|
|
64
|
+
}) });
|
|
65
|
+
}
|
|
66
|
+
function NavigationMenuLink({ className, ...props }) {
|
|
67
|
+
return /* @__PURE__ */ jsx(NavigationMenu$1.Link, {
|
|
68
|
+
"data-slot": "navigation-menu-link",
|
|
69
|
+
className: cn("flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-md data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted [&_svg:not([class*='size-'])]:size-4", className),
|
|
70
|
+
...props
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function NavigationMenuIndicator({ className, ...props }) {
|
|
74
|
+
return /* @__PURE__ */ jsx(NavigationMenu$1.Icon, {
|
|
75
|
+
"data-slot": "navigation-menu-indicator",
|
|
76
|
+
className: cn("top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in", className),
|
|
77
|
+
...props,
|
|
78
|
+
children: /* @__PURE__ */ jsx("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
//#endregion
|
|
82
|
+
export { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPositioner, NavigationMenuTrigger, navigationMenuTriggerStyle };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Button } from "./button.js";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
//#region src/components/ui/pagination.d.ts
|
|
4
|
+
declare function Pagination({ className, ...props }: React$1.ComponentProps<"nav">): React$1.JSX.Element;
|
|
5
|
+
declare function PaginationContent({ className, ...props }: React$1.ComponentProps<"ul">): React$1.JSX.Element;
|
|
6
|
+
declare function PaginationItem({ ...props }: React$1.ComponentProps<"li">): React$1.JSX.Element;
|
|
7
|
+
type PaginationLinkProps = {
|
|
8
|
+
isActive?: boolean;
|
|
9
|
+
} & Pick<React$1.ComponentProps<typeof Button>, "size"> & React$1.ComponentProps<"a">;
|
|
10
|
+
declare function PaginationLink({ className, isActive, size, ...props }: PaginationLinkProps): React$1.JSX.Element;
|
|
11
|
+
declare function PaginationPrevious({ className, text, ...props }: React$1.ComponentProps<typeof PaginationLink> & {
|
|
12
|
+
text?: string;
|
|
13
|
+
}): React$1.JSX.Element;
|
|
14
|
+
declare function PaginationNext({ className, text, ...props }: React$1.ComponentProps<typeof PaginationLink> & {
|
|
15
|
+
text?: string;
|
|
16
|
+
}): React$1.JSX.Element;
|
|
17
|
+
declare function PaginationEllipsis({ className, ...props }: React$1.ComponentProps<"span">): React$1.JSX.Element;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { Button } from "./button.js";
|
|
2
|
+
import { cn } from "cn";
|
|
3
|
+
import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import "react";
|
|
6
|
+
//#region src/components/ui/pagination.tsx
|
|
7
|
+
function Pagination({ className, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx("nav", {
|
|
9
|
+
role: "navigation",
|
|
10
|
+
"aria-label": "pagination",
|
|
11
|
+
"data-slot": "pagination",
|
|
12
|
+
className: cn("mx-auto flex w-full justify-center", className),
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function PaginationContent({ className, ...props }) {
|
|
17
|
+
return /* @__PURE__ */ jsx("ul", {
|
|
18
|
+
"data-slot": "pagination-content",
|
|
19
|
+
className: cn("flex items-center gap-0.5", className),
|
|
20
|
+
...props
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function PaginationItem({ ...props }) {
|
|
24
|
+
return /* @__PURE__ */ jsx("li", {
|
|
25
|
+
"data-slot": "pagination-item",
|
|
26
|
+
...props
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function PaginationLink({ className, isActive, size = "icon", ...props }) {
|
|
30
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
31
|
+
variant: isActive ? "outline" : "ghost",
|
|
32
|
+
size,
|
|
33
|
+
className: cn(className),
|
|
34
|
+
nativeButton: false,
|
|
35
|
+
render: /* @__PURE__ */ jsx("a", {
|
|
36
|
+
"aria-current": isActive ? "page" : void 0,
|
|
37
|
+
"data-slot": "pagination-link",
|
|
38
|
+
"data-active": isActive,
|
|
39
|
+
...props
|
|
40
|
+
})
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function PaginationPrevious({ className, text = "Previous", ...props }) {
|
|
44
|
+
return /* @__PURE__ */ jsxs(PaginationLink, {
|
|
45
|
+
"aria-label": "Go to previous page",
|
|
46
|
+
size: "default",
|
|
47
|
+
className: cn("pl-1.5!", className),
|
|
48
|
+
...props,
|
|
49
|
+
children: [/* @__PURE__ */ jsx(ChevronLeftIcon, { "data-icon": "inline-start" }), /* @__PURE__ */ jsx("span", {
|
|
50
|
+
className: "hidden sm:block",
|
|
51
|
+
children: text
|
|
52
|
+
})]
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function PaginationNext({ className, text = "Next", ...props }) {
|
|
56
|
+
return /* @__PURE__ */ jsxs(PaginationLink, {
|
|
57
|
+
"aria-label": "Go to next page",
|
|
58
|
+
size: "default",
|
|
59
|
+
className: cn("pr-1.5!", className),
|
|
60
|
+
...props,
|
|
61
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
62
|
+
className: "hidden sm:block",
|
|
63
|
+
children: text
|
|
64
|
+
}), /* @__PURE__ */ jsx(ChevronRightIcon, { "data-icon": "inline-end" })]
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function PaginationEllipsis({ className, ...props }) {
|
|
68
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
69
|
+
"aria-hidden": true,
|
|
70
|
+
"data-slot": "pagination-ellipsis",
|
|
71
|
+
className: cn("flex size-8 items-center justify-center [&_svg:not([class*='size-'])]:size-4", className),
|
|
72
|
+
...props,
|
|
73
|
+
children: [/* @__PURE__ */ jsx(MoreHorizontalIcon, {}), /* @__PURE__ */ jsx("span", {
|
|
74
|
+
className: "sr-only",
|
|
75
|
+
children: "More pages"
|
|
76
|
+
})]
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
//#endregion
|
|
80
|
+
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Button } from "./button.js";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
import { Questionnaire as Questionnaire$1 } from "@shadcn/react/questionnaire";
|
|
4
|
+
//#region src/components/ui/questionnaire.d.ts
|
|
5
|
+
declare function Questionnaire({ className, ...props }: React$1.ComponentProps<typeof Questionnaire$1.Root>): React$1.JSX.Element;
|
|
6
|
+
declare function QuestionnaireProgress({ className, ...props }: React$1.ComponentProps<typeof Questionnaire$1.Progress>): React$1.JSX.Element;
|
|
7
|
+
declare function QuestionnaireItem({ className, ...props }: React$1.ComponentProps<typeof Questionnaire$1.Item>): React$1.JSX.Element;
|
|
8
|
+
declare function QuestionnaireTitle({ className, ...props }: React$1.ComponentProps<typeof Questionnaire$1.Title>): React$1.JSX.Element;
|
|
9
|
+
declare function QuestionnaireDescription({ className, ...props }: React$1.ComponentProps<typeof Questionnaire$1.Description>): React$1.JSX.Element;
|
|
10
|
+
declare function QuestionnaireChoices({ className, ...props }: React$1.ComponentProps<typeof Questionnaire$1.Choices>): React$1.JSX.Element;
|
|
11
|
+
declare function QuestionnaireChoice({ children, className, ...props }: React$1.ComponentProps<typeof Questionnaire$1.Choice>): React$1.JSX.Element;
|
|
12
|
+
declare function QuestionnaireChoiceDescription({ className, ...props }: React$1.ComponentProps<"span">): React$1.JSX.Element;
|
|
13
|
+
declare function QuestionnaireInput({ className, ...props }: React$1.ComponentProps<typeof Questionnaire$1.Input>): React$1.JSX.Element;
|
|
14
|
+
declare function QuestionnaireError({ className, ...props }: React$1.ComponentProps<typeof Questionnaire$1.Error>): React$1.JSX.Element;
|
|
15
|
+
declare function QuestionnaireActions({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
16
|
+
declare function QuestionnairePrevious({ children, className, size, variant, ...props }: React$1.ComponentProps<typeof Questionnaire$1.Previous> & Pick<React$1.ComponentProps<typeof Button>, "size" | "variant">): React$1.JSX.Element;
|
|
17
|
+
declare function QuestionnaireSkip({ children, className, size, variant, ...props }: React$1.ComponentProps<typeof Questionnaire$1.Skip> & Pick<React$1.ComponentProps<typeof Button>, "size" | "variant">): React$1.JSX.Element;
|
|
18
|
+
declare function QuestionnaireNext({ children, className, size, variant, ...props }: React$1.ComponentProps<typeof Questionnaire$1.Next> & Pick<React$1.ComponentProps<typeof Button>, "size" | "variant">): React$1.JSX.Element;
|
|
19
|
+
declare function QuestionnaireSubmit({ children, className, size, variant, ...props }: React$1.ComponentProps<typeof Questionnaire$1.Submit> & Pick<React$1.ComponentProps<typeof Button>, "size" | "variant">): React$1.JSX.Element;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { Questionnaire, QuestionnaireActions, QuestionnaireChoice, QuestionnaireChoiceDescription, QuestionnaireChoices, QuestionnaireDescription, QuestionnaireError, QuestionnaireInput, QuestionnaireItem, QuestionnaireNext, QuestionnairePrevious, QuestionnaireProgress, QuestionnaireSkip, QuestionnaireSubmit, QuestionnaireTitle };
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { buttonVariants } from "./button.js";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { CheckIcon } from "lucide-react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import "react";
|
|
7
|
+
import { Questionnaire as Questionnaire$1 } from "@shadcn/react/questionnaire";
|
|
8
|
+
//#region src/components/ui/questionnaire.tsx
|
|
9
|
+
function Questionnaire({ className, ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Root, {
|
|
11
|
+
"data-slot": "questionnaire",
|
|
12
|
+
className: cn("flex w-full min-w-0 flex-col gap-4", className),
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function QuestionnaireProgress({ className, ...props }) {
|
|
17
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Progress, {
|
|
18
|
+
"data-slot": "questionnaire-progress",
|
|
19
|
+
className: cn("min-h-[1lh] w-fit min-w-[14ch] text-xs font-medium text-muted-foreground tabular-nums", className),
|
|
20
|
+
...props
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function QuestionnaireItem({ className, ...props }) {
|
|
24
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Item, {
|
|
25
|
+
"data-slot": "questionnaire-item",
|
|
26
|
+
className: cn("flex min-w-0 flex-col gap-4 border-0 p-0 outline-none", className),
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function QuestionnaireTitle({ className, ...props }) {
|
|
31
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Title, {
|
|
32
|
+
"data-slot": "questionnaire-title",
|
|
33
|
+
className: cn("font-heading text-base leading-snug font-medium text-pretty [&:not(:has(~[data-slot=questionnaire-description]))]:mb-4", className),
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function QuestionnaireDescription({ className, ...props }) {
|
|
38
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Description, {
|
|
39
|
+
"data-slot": "questionnaire-description",
|
|
40
|
+
className: cn("text-sm text-pretty text-muted-foreground", className),
|
|
41
|
+
...props
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function QuestionnaireChoices({ className, ...props }) {
|
|
45
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Choices, {
|
|
46
|
+
"data-slot": "questionnaire-choices",
|
|
47
|
+
className: cn("group/questionnaire-choices grid min-w-0 gap-2", className),
|
|
48
|
+
...props
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function QuestionnaireChoice({ children, className, ...props }) {
|
|
52
|
+
return /* @__PURE__ */ jsxs(Questionnaire$1.Choice, {
|
|
53
|
+
"data-slot": "questionnaire-choice",
|
|
54
|
+
className: cn("group/questionnaire-choice relative flex min-h-11 cursor-pointer items-start gap-2.5 rounded-lg border border-input bg-transparent px-3 py-2.5 text-start text-sm transition-colors outline-none select-none hover:bg-muted/50 has-[>input:focus-visible]:border-ring has-[>input:focus-visible]:ring-3 has-[>input:focus-visible]:ring-ring/50 data-invalid:border-destructive dark:bg-input/20 data-checked:border-primary/40 data-checked:bg-muted dark:data-checked:bg-muted", "data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
|
|
55
|
+
...props,
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ jsx(Questionnaire$1.ChoiceInput, {
|
|
58
|
+
"data-slot": "questionnaire-choice-input",
|
|
59
|
+
className: "absolute inset-0 z-10 size-full cursor-pointer opacity-0"
|
|
60
|
+
}),
|
|
61
|
+
/* @__PURE__ */ jsxs("span", {
|
|
62
|
+
"aria-hidden": "true",
|
|
63
|
+
"data-slot": "questionnaire-choice-indicator",
|
|
64
|
+
className: "pointer-events-none relative flex size-4 shrink-0 translate-y-[--spacing(0.45)] items-center justify-center rounded-[4px] border border-input group-has-data-[slot=questionnaire-choice-description]/questionnaire-choice:translate-y-0.5 group-data-[type=radio]/questionnaire-choice:rounded-full group-data-checked/questionnaire-choice:border-primary group-data-checked/questionnaire-choice:bg-primary group-data-checked/questionnaire-choice:text-primary-foreground dark:bg-input/30 dark:group-data-checked/questionnaire-choice:bg-primary",
|
|
65
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
66
|
+
"data-slot": "questionnaire-choice-indicator-dot",
|
|
67
|
+
className: "hidden size-2 rounded-full bg-primary-foreground group-data-[type=checkbox]/questionnaire-choice:hidden group-data-checked/questionnaire-choice:block"
|
|
68
|
+
}), /* @__PURE__ */ jsx(CheckIcon, {
|
|
69
|
+
"data-slot": "questionnaire-choice-indicator-check",
|
|
70
|
+
className: "hidden size-3.5 group-data-[type=radio]/questionnaire-choice:hidden group-data-checked/questionnaire-choice:block"
|
|
71
|
+
})]
|
|
72
|
+
}),
|
|
73
|
+
/* @__PURE__ */ jsx(Questionnaire$1.ChoiceLabel, {
|
|
74
|
+
"data-slot": "questionnaire-choice-label",
|
|
75
|
+
className: "flex min-w-0 flex-1 flex-col gap-0.5 leading-snug",
|
|
76
|
+
children
|
|
77
|
+
}),
|
|
78
|
+
/* @__PURE__ */ jsx(Questionnaire$1.ChoiceShortcut, {
|
|
79
|
+
"data-slot": "questionnaire-choice-shortcut",
|
|
80
|
+
className: "pointer-events-none ms-auto hidden size-5 shrink-0 translate-y-[--spacing(0.45)] items-center justify-center rounded-md border border-input bg-background font-mono text-[0.625rem] leading-none font-medium text-muted-foreground group-has-data-[slot=questionnaire-choice-description]/questionnaire-choice:translate-y-0.5 group-data-[shortcut]/questionnaire-choice:inline-flex"
|
|
81
|
+
})
|
|
82
|
+
]
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function QuestionnaireChoiceDescription({ className, ...props }) {
|
|
86
|
+
return /* @__PURE__ */ jsx("span", {
|
|
87
|
+
"data-slot": "questionnaire-choice-description",
|
|
88
|
+
className: cn("text-muted-foreground", className),
|
|
89
|
+
...props
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
function QuestionnaireInput({ className, ...props }) {
|
|
93
|
+
return /* @__PURE__ */ jsx("div", {
|
|
94
|
+
"data-slot": "questionnaire-input-wrapper",
|
|
95
|
+
className: "group/questionnaire-input relative w-full min-w-0",
|
|
96
|
+
children: /* @__PURE__ */ jsx(Questionnaire$1.Input, {
|
|
97
|
+
"data-slot": "questionnaire-input",
|
|
98
|
+
className: cn("h-8 min-h-11 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-[color,box-shadow,background-color] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 sm:min-h-0 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", "selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground", className),
|
|
99
|
+
...props
|
|
100
|
+
})
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
function QuestionnaireError({ className, ...props }) {
|
|
104
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Error, {
|
|
105
|
+
"data-slot": "questionnaire-error",
|
|
106
|
+
className: cn("mt-2 text-sm text-destructive", className),
|
|
107
|
+
...props
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
function QuestionnaireActions({ className, ...props }) {
|
|
111
|
+
return /* @__PURE__ */ jsx("div", {
|
|
112
|
+
"data-slot": "questionnaire-actions",
|
|
113
|
+
className: cn("grid min-h-11 w-full grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-2 sm:min-h-8", className),
|
|
114
|
+
...props
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
function QuestionnairePrevious({ children, className, size = "default", variant = "outline", ...props }) {
|
|
118
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Previous, {
|
|
119
|
+
"data-slot": "questionnaire-previous",
|
|
120
|
+
"data-size": size,
|
|
121
|
+
"data-variant": variant,
|
|
122
|
+
className: cn(buttonVariants({
|
|
123
|
+
size,
|
|
124
|
+
variant
|
|
125
|
+
}), "col-start-1 row-start-1 min-h-11 justify-self-start sm:min-h-0", className),
|
|
126
|
+
...props,
|
|
127
|
+
children: children ?? "Previous"
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
function QuestionnaireSkip({ children, className, size = "default", variant = "outline", ...props }) {
|
|
131
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Skip, {
|
|
132
|
+
"data-slot": "questionnaire-skip",
|
|
133
|
+
"data-size": size,
|
|
134
|
+
"data-variant": variant,
|
|
135
|
+
className: cn(buttonVariants({
|
|
136
|
+
size,
|
|
137
|
+
variant
|
|
138
|
+
}), "col-start-2 row-start-1 min-h-11 justify-self-end sm:min-h-0", className),
|
|
139
|
+
...props,
|
|
140
|
+
children: children ?? "Skip"
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
function QuestionnaireNext({ children, className, size = "default", variant = "default", ...props }) {
|
|
144
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Next, {
|
|
145
|
+
"data-slot": "questionnaire-next",
|
|
146
|
+
"data-size": size,
|
|
147
|
+
"data-variant": variant,
|
|
148
|
+
className: cn(buttonVariants({
|
|
149
|
+
size,
|
|
150
|
+
variant
|
|
151
|
+
}), "col-start-3 row-start-1 min-h-11 justify-self-end sm:min-h-0", className),
|
|
152
|
+
...props,
|
|
153
|
+
children: children ?? "Next"
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
function QuestionnaireSubmit({ children, className, size = "default", variant = "default", ...props }) {
|
|
157
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Submit, {
|
|
158
|
+
"data-slot": "questionnaire-submit",
|
|
159
|
+
"data-size": size,
|
|
160
|
+
"data-variant": variant,
|
|
161
|
+
className: cn(buttonVariants({
|
|
162
|
+
size,
|
|
163
|
+
variant
|
|
164
|
+
}), "col-start-3 row-start-1 min-h-11 justify-self-end sm:min-h-0", className),
|
|
165
|
+
...props,
|
|
166
|
+
children: children ?? "Submit"
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
//#endregion
|
|
170
|
+
export { Questionnaire, QuestionnaireActions, QuestionnaireChoice, QuestionnaireChoiceDescription, QuestionnaireChoices, QuestionnaireDescription, QuestionnaireError, QuestionnaireInput, QuestionnaireItem, QuestionnaireNext, QuestionnairePrevious, QuestionnaireProgress, QuestionnaireSkip, QuestionnaireSubmit, QuestionnaireTitle };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Radio } from "@base-ui/react/radio";
|
|
2
|
+
import { RadioGroup as RadioGroup$1 } from "@base-ui/react/radio-group";
|
|
3
|
+
//#region src/components/ui/radio-group.d.ts
|
|
4
|
+
declare function RadioGroup({ className, ...props }: RadioGroup$1.Props): import("react").JSX.Element;
|
|
5
|
+
declare function RadioGroupItem({ className, ...props }: Radio.Root.Props): import("react").JSX.Element;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { RadioGroup, RadioGroupItem };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { cn } from "cn";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Radio } from "@base-ui/react/radio";
|
|
4
|
+
import { RadioGroup as RadioGroup$1 } from "@base-ui/react/radio-group";
|
|
5
|
+
//#region src/components/ui/radio-group.tsx
|
|
6
|
+
function RadioGroup({ className, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(RadioGroup$1, {
|
|
8
|
+
"data-slot": "radio-group",
|
|
9
|
+
className: cn("grid w-full gap-2", className),
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function RadioGroupItem({ className, ...props }) {
|
|
14
|
+
return /* @__PURE__ */ jsx(Radio.Root, {
|
|
15
|
+
"data-slot": "radio-group-item",
|
|
16
|
+
className: cn("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary", className),
|
|
17
|
+
...props,
|
|
18
|
+
children: /* @__PURE__ */ jsx(Radio.Indicator, {
|
|
19
|
+
"data-slot": "radio-group-indicator",
|
|
20
|
+
className: "flex size-4 items-center justify-center",
|
|
21
|
+
children: /* @__PURE__ */ jsx("span", { className: "absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground" })
|
|
22
|
+
})
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { RadioGroup, RadioGroupItem };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as ResizablePrimitive from "react-resizable-panels";
|
|
2
|
+
//#region src/components/ui/resizable.d.ts
|
|
3
|
+
declare function ResizablePanelGroup({ className, ...props }: ResizablePrimitive.GroupProps): import("react").JSX.Element;
|
|
4
|
+
declare function ResizablePanel({ ...props }: ResizablePrimitive.PanelProps): import("react").JSX.Element;
|
|
5
|
+
declare function ResizableHandle({ withHandle, className, ...props }: ResizablePrimitive.SeparatorProps & {
|
|
6
|
+
withHandle?: boolean;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "cn";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import * as ResizablePrimitive from "react-resizable-panels";
|
|
5
|
+
//#region src/components/ui/resizable.tsx
|
|
6
|
+
function ResizablePanelGroup({ className, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(ResizablePrimitive.Group, {
|
|
8
|
+
"data-slot": "resizable-panel-group",
|
|
9
|
+
className: cn("flex h-full w-full aria-[orientation=vertical]:flex-col", className),
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function ResizablePanel({ ...props }) {
|
|
14
|
+
return /* @__PURE__ */ jsx(ResizablePrimitive.Panel, {
|
|
15
|
+
"data-slot": "resizable-panel",
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function ResizableHandle({ withHandle, className, ...props }) {
|
|
20
|
+
return /* @__PURE__ */ jsx(ResizablePrimitive.Separator, {
|
|
21
|
+
"data-slot": "resizable-handle",
|
|
22
|
+
className: cn("relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90", className),
|
|
23
|
+
...props,
|
|
24
|
+
children: withHandle && /* @__PURE__ */ jsx("div", { className: "z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border" })
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Button } from "./button.js";
|
|
2
|
-
import { Input } from "./input.js";
|
|
3
2
|
import { Separator } from "./separator.js";
|
|
3
|
+
import { Input } from "./input.js";
|
|
4
4
|
import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from "./sheet.js";
|
|
5
5
|
import { useIsMobile } from "../../hooks/use-mobile.js";
|
|
6
6
|
import { Skeleton } from "./skeleton.js";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { cn } from "cn";
|
|
2
|
+
import { Loader2Icon } from "lucide-react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/ui/spinner.tsx
|
|
5
|
+
function Spinner({ className, ...props }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(Loader2Icon, {
|
|
7
|
+
"data-slot": "spinner",
|
|
8
|
+
role: "status",
|
|
9
|
+
"aria-label": "Loading",
|
|
10
|
+
className: cn("size-4 animate-spin", className),
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { Spinner };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Switch as Switch$1 } from "@base-ui/react/switch";
|
|
2
|
+
//#region src/components/ui/switch.d.ts
|
|
3
|
+
declare function Switch({ className, size, ...props }: Switch$1.Root.Props & {
|
|
4
|
+
size?: "sm" | "default";
|
|
5
|
+
}): import("react").JSX.Element;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { Switch };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "cn";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Switch as Switch$1 } from "@base-ui/react/switch";
|
|
5
|
+
//#region src/components/ui/switch.tsx
|
|
6
|
+
function Switch({ className, size = "default", ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(Switch$1.Root, {
|
|
8
|
+
"data-slot": "switch",
|
|
9
|
+
"data-size": size,
|
|
10
|
+
className: cn("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none group-has-[:focus-visible]/field-label:border-transparent group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
|
|
11
|
+
...props,
|
|
12
|
+
children: /* @__PURE__ */ jsx(Switch$1.Thumb, {
|
|
13
|
+
"data-slot": "switch-thumb",
|
|
14
|
+
className: "pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"
|
|
15
|
+
})
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { Switch };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import { Toast as Toast$1 } from "@base-ui/react/toast";
|
|
3
|
+
//#region src/components/ui/toast.d.ts
|
|
4
|
+
declare const toast: import("@base-ui/react").ToastManager<any>;
|
|
5
|
+
declare function ToastProvider({ ...props }: Toast$1.Provider.Props): React$1.JSX.Element;
|
|
6
|
+
declare function ToastPortal({ ...props }: Toast$1.Portal.Props): React$1.JSX.Element;
|
|
7
|
+
declare function ToastViewport({ className, ...props }: Toast$1.Viewport.Props): React$1.JSX.Element;
|
|
8
|
+
declare function Toast({ className, ...props }: Toast$1.Root.Props): React$1.JSX.Element;
|
|
9
|
+
declare function ToastContent({ className, ...props }: Toast$1.Content.Props): React$1.JSX.Element;
|
|
10
|
+
declare function ToastTitle({ className, ...props }: Toast$1.Title.Props): React$1.JSX.Element;
|
|
11
|
+
declare function ToastDescription({ className, ...props }: Toast$1.Description.Props): React$1.JSX.Element;
|
|
12
|
+
declare function ToastAction({ className, render, ...props }: Toast$1.Action.Props): React$1.JSX.Element;
|
|
13
|
+
declare function ToastClose({ className, children, render, ...props }: Toast$1.Close.Props): React$1.JSX.Element;
|
|
14
|
+
declare function Toaster({ children, toastManager, ...props }: Toast$1.Provider.Props): React$1.JSX.Element;
|
|
15
|
+
declare const createToastManager: typeof Toast$1.createToastManager;
|
|
16
|
+
declare const useToastManager: typeof Toast$1.useToastManager;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { Toast, ToastAction, ToastClose, ToastContent, ToastDescription, ToastPortal, ToastProvider, ToastTitle, ToastViewport, Toaster, createToastManager, toast, useToastManager };
|