@siyahi/ui 0.1.4-next.1 → 0.1.6-next.1
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/README.md +6 -2
- package/dist/components/registry/niko-table/ui/table.js +2 -2
- package/dist/components/siyahi/treemap.d.ts +9 -1
- package/dist/components/siyahi/treemap.js +54 -25
- package/dist/components/ui/alert.js +1 -1
- package/dist/components/ui/badge.js +1 -1
- package/dist/components/ui/button.js +8 -8
- package/dist/components/ui/calendar.js +2 -1
- package/dist/components/ui/card.js +5 -5
- package/dist/components/ui/chart.js +1 -2
- package/dist/components/ui/command.js +6 -7
- package/dist/components/ui/context-menu.js +7 -7
- package/dist/components/ui/dialog.js +5 -5
- package/dist/components/ui/dropdown-menu.js +9 -8
- package/dist/components/ui/input-group.js +10 -10
- package/dist/components/ui/input.js +1 -1
- package/dist/components/ui/popover.js +2 -3
- package/dist/components/ui/progress.js +2 -1
- package/dist/components/ui/select.js +7 -6
- package/dist/components/ui/separator.js +0 -1
- package/dist/components/ui/sheet.js +6 -6
- package/dist/components/ui/sidebar.js +18 -17
- package/dist/components/ui/skeleton.js +1 -1
- package/dist/components/ui/slider.js +2 -2
- package/dist/components/ui/table.js +3 -2
- package/dist/components/ui/tabs.js +2 -3
- package/dist/components/ui/textarea.js +1 -1
- package/dist/components/ui/toggle-group.js +2 -2
- package/dist/components/ui/toggle.js +5 -5
- package/dist/components/ui/tooltip.js +2 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -67,15 +67,19 @@ Every merge to `main` also attaches both tarballs to a GitHub release
|
|
|
67
67
|
|
|
68
68
|
## What is in it
|
|
69
69
|
|
|
70
|
-
- **shadcn/ui components** in the `base-
|
|
70
|
+
- **shadcn/ui components** in the `base-luma` style, installed with the shadcn
|
|
71
71
|
CLI and never edited.
|
|
72
72
|
- **Registry add-ons**, copied once with their origin and licence recorded: a
|
|
73
73
|
data table on TanStack Table, calendar, weekday and status heatmaps, a ranked
|
|
74
74
|
bar list, the `SectionCards` stat tile and the `sidebar-07` app shell.
|
|
75
75
|
- **Siyahi components**: `Delta` (a signed figure with ▲ ▼), `PriceChart`
|
|
76
76
|
(TradingView Lightweight Charts in theme colours), `Treemap` (holdings heat
|
|
77
|
-
map), `LocalTime` (a time in the configured zone with the viewer's own clock
|
|
77
|
+
map; hover or tap a tile for its figures), `LocalTime` (a time in the configured zone with the viewer's own clock
|
|
78
78
|
in a tooltip) and `SiyahiProvider`.
|
|
79
|
+
- **Cards and badges as installed**: every `Card`, stat tiles included, keeps
|
|
80
|
+
luma's `rounded-4xl`, `shadow-md` and faint ring. A category (a sector, a
|
|
81
|
+
broker, a unit's kind) is an outline `Badge`: categories stay neutral, and
|
|
82
|
+
colour is left to the four meaning colours and the charts.
|
|
79
83
|
- **Formatters**: `money`, `moneyCompact`, `pct` and `time`, or `useFormat()`
|
|
80
84
|
for the same bound to the provider's locale.
|
|
81
85
|
`useFormat().time(value, { withDate: true })` (or
|
|
@@ -52,14 +52,14 @@ function TableRow({ className, ...props }) {
|
|
|
52
52
|
function TableHead({ className, ...props }) {
|
|
53
53
|
return /* @__PURE__ */ jsx("th", {
|
|
54
54
|
"data-slot": "table-head",
|
|
55
|
-
className: cn("h-
|
|
55
|
+
className: cn("h-12 px-3 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 *:[[role=checkbox]]:translate-y-[2px]", className),
|
|
56
56
|
...props
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
function TableCell({ className, ...props }) {
|
|
60
60
|
return /* @__PURE__ */ jsx("td", {
|
|
61
61
|
"data-slot": "table-cell",
|
|
62
|
-
className: cn("p-
|
|
62
|
+
className: cn("p-3 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 *:[[role=checkbox]]:translate-y-[2px]", className),
|
|
63
63
|
...props
|
|
64
64
|
});
|
|
65
65
|
}
|
|
@@ -17,7 +17,15 @@ export interface TreemapProps<T extends TreemapItem> {
|
|
|
17
17
|
range?: number;
|
|
18
18
|
/** Gets the item under the pointer, and null when the pointer moves onto a group's name or leaves the map. */
|
|
19
19
|
onHover?: (item: T | null) => void;
|
|
20
|
+
/** The selected item, matched by key, whose tile carries a ring. Pass back what onSelect gave. */
|
|
21
|
+
selected?: T | null;
|
|
22
|
+
/**
|
|
23
|
+
* Gets the item whose tile is tapped or clicked, and null when the selected
|
|
24
|
+
* tile is tapped again or a tap lands anywhere else. On a touch screen, which
|
|
25
|
+
* has no hover, this is how a reader gets a tile's figures.
|
|
26
|
+
*/
|
|
27
|
+
onSelect?: (item: T | null) => void;
|
|
20
28
|
}
|
|
21
29
|
/** Holdings heat map: area by weight, colour by signed change, optionally grouped; hand-drawn SVG. */
|
|
22
|
-
export declare function Treemap<T extends TreemapItem>({ items, height, range, onHover }: TreemapProps<T>): import("react").JSX.Element;
|
|
30
|
+
export declare function Treemap<T extends TreemapItem>({ items, height, range, onHover, selected, onSelect }: TreemapProps<T>): import("react").JSX.Element;
|
|
23
31
|
//#endregion
|
|
@@ -1,18 +1,29 @@
|
|
|
1
1
|
import { useFormat } from "../../lib/format.js";
|
|
2
2
|
import { heat, layout } from "../../lib/treemap.js";
|
|
3
|
-
import { useLayoutEffect, useRef, useState } from "react";
|
|
3
|
+
import { useEffect, useEffectEvent, useLayoutEffect, useRef, useState } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/siyahi/treemap.tsx
|
|
6
6
|
/** Holdings heat map: area by weight, colour by signed change, optionally grouped; hand-drawn SVG. */
|
|
7
|
-
function Treemap({ items, height, range, onHover }) {
|
|
7
|
+
function Treemap({ items, height, range, onHover, selected, onSelect }) {
|
|
8
8
|
const ref = useRef(null);
|
|
9
9
|
const [width, setWidth] = useState(0);
|
|
10
|
+
const selectedKey = selected ? selected.key ?? selected.name : null;
|
|
10
11
|
const { pct } = useFormat();
|
|
11
12
|
useLayoutEffect(() => {
|
|
12
13
|
const observer = new ResizeObserver(([entry]) => setWidth(entry?.contentRect.width ?? 0));
|
|
13
14
|
if (ref.current) observer.observe(ref.current);
|
|
14
15
|
return () => observer.disconnect();
|
|
15
16
|
}, []);
|
|
17
|
+
const clearOutside = useEffectEvent((event) => {
|
|
18
|
+
const tile = event.target instanceof Element ? event.target.closest("[data-slot=\"treemap-tile\"]") : null;
|
|
19
|
+
if (!ref.current?.contains(tile)) onSelect?.(null);
|
|
20
|
+
});
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (selectedKey === null) return;
|
|
23
|
+
const onPointerDown = (event) => clearOutside(event);
|
|
24
|
+
document.addEventListener("pointerdown", onPointerDown);
|
|
25
|
+
return () => document.removeEventListener("pointerdown", onPointerDown);
|
|
26
|
+
}, [selectedKey]);
|
|
16
27
|
const { groups, tiles } = layout(items, width, height);
|
|
17
28
|
const change = (value) => value === null ? "—" : `${value > 0 ? "▲ " : value < 0 ? "▼ " : ""}${pct(Math.abs(value))}`;
|
|
18
29
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -41,29 +52,47 @@ function Treemap({ items, height, range, onHover }) {
|
|
|
41
52
|
className: "fill-muted-foreground font-medium",
|
|
42
53
|
children: group
|
|
43
54
|
})]
|
|
44
|
-
}, group)), tiles.map(({ item, ...box }) =>
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
55
|
+
}, group)), tiles.map(({ item, ...box }) => {
|
|
56
|
+
const key = item.key ?? item.name;
|
|
57
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
58
|
+
...box,
|
|
59
|
+
"data-slot": "treemap-tile",
|
|
60
|
+
"data-selected": key === selectedKey || void 0,
|
|
61
|
+
onPointerEnter: () => onHover?.(item),
|
|
62
|
+
onClick: () => onSelect?.(key === selectedKey ? null : item),
|
|
63
|
+
children: [
|
|
64
|
+
/* @__PURE__ */ jsx("rect", {
|
|
65
|
+
width: "100%",
|
|
66
|
+
height: "100%",
|
|
67
|
+
rx: 4,
|
|
68
|
+
style: { fill: heat(item.change, range) }
|
|
69
|
+
}),
|
|
70
|
+
key === selectedKey && /* @__PURE__ */ jsx("rect", {
|
|
71
|
+
x: 1,
|
|
72
|
+
y: 1,
|
|
73
|
+
width: box.width - 2,
|
|
74
|
+
height: box.height - 2,
|
|
75
|
+
rx: 3,
|
|
76
|
+
fill: "none",
|
|
77
|
+
strokeWidth: 2,
|
|
78
|
+
className: "stroke-foreground"
|
|
79
|
+
}),
|
|
80
|
+
box.width > 56 && box.height > 36 && /* @__PURE__ */ jsxs("text", {
|
|
81
|
+
x: 8,
|
|
82
|
+
y: 18,
|
|
83
|
+
className: "fill-foreground",
|
|
84
|
+
children: [/* @__PURE__ */ jsx("tspan", {
|
|
85
|
+
className: "font-medium",
|
|
86
|
+
children: item.name
|
|
87
|
+
}), /* @__PURE__ */ jsx("tspan", {
|
|
88
|
+
x: 8,
|
|
89
|
+
dy: 16,
|
|
90
|
+
children: change(item.change)
|
|
91
|
+
})]
|
|
92
|
+
})
|
|
93
|
+
]
|
|
94
|
+
}, key);
|
|
95
|
+
})]
|
|
67
96
|
})
|
|
68
97
|
});
|
|
69
98
|
}
|
|
@@ -3,7 +3,7 @@ import { cva } from "class-variance-authority";
|
|
|
3
3
|
import { cn } from "cn";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/ui/alert.tsx
|
|
6
|
-
const alertVariants = cva("group/alert relative grid w-full gap-0.5 rounded-
|
|
6
|
+
const alertVariants = cva("group/alert relative grid w-full gap-0.5 rounded-2xl border px-4 py-3 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-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", {
|
|
7
7
|
variants: { variant: {
|
|
8
8
|
default: "bg-card text-card-foreground",
|
|
9
9
|
destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"
|
|
@@ -3,7 +3,7 @@ import { cn } from "cn";
|
|
|
3
3
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
4
4
|
import { useRender } from "@base-ui/react/use-render";
|
|
5
5
|
//#region src/components/ui/badge.tsx
|
|
6
|
-
const badgeVariants = cva("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-
|
|
6
|
+
const badgeVariants = cva("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-3xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!", {
|
|
7
7
|
variants: { variant: {
|
|
8
8
|
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
9
9
|
secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
|
|
@@ -3,24 +3,24 @@ import { cn } from "cn";
|
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { Button as Button$1 } from "@base-ui/react/button";
|
|
5
5
|
//#region src/components/ui/button.tsx
|
|
6
|
-
const buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-
|
|
6
|
+
const buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-4xl border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
7
7
|
variants: {
|
|
8
8
|
variant: {
|
|
9
9
|
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
10
|
-
outline: "border-border bg-background
|
|
10
|
+
outline: "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:bg-transparent dark:hover:bg-input/30",
|
|
11
11
|
secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
12
12
|
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
13
13
|
destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
|
|
14
14
|
link: "text-primary underline-offset-4 hover:underline"
|
|
15
15
|
},
|
|
16
16
|
size: {
|
|
17
|
-
default: "h-9 gap-1.5 px-
|
|
18
|
-
xs: "h-6 gap-1
|
|
19
|
-
sm: "h-8 gap-1
|
|
20
|
-
lg: "h-10 gap-1.5 px-
|
|
17
|
+
default: "h-9 gap-1.5 px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5",
|
|
18
|
+
xs: "h-6 gap-1 px-2.5 text-xs has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3",
|
|
19
|
+
sm: "h-8 gap-1 px-3 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
20
|
+
lg: "h-10 gap-1.5 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",
|
|
21
21
|
icon: "size-9",
|
|
22
|
-
"icon-xs": "size-6
|
|
23
|
-
"icon-sm": "size-8
|
|
22
|
+
"icon-xs": "size-6 [&_svg:not([class*='size-'])]:size-3",
|
|
23
|
+
"icon-sm": "size-8",
|
|
24
24
|
"icon-lg": "size-10"
|
|
25
25
|
}
|
|
26
26
|
},
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { Button, buttonVariants } from "./button.js";
|
|
2
3
|
import * as React$1 from "react";
|
|
3
4
|
import { cn } from "cn";
|
|
@@ -9,7 +10,7 @@ function Calendar({ className, classNames, showOutsideDays = true, captionLayout
|
|
|
9
10
|
const defaultClassNames = getDefaultClassNames();
|
|
10
11
|
return /* @__PURE__ */ jsx(DayPicker, {
|
|
11
12
|
showOutsideDays,
|
|
12
|
-
className: cn("group/calendar bg-background p-3 [--cell-radius:var(--radius-
|
|
13
|
+
className: cn("group/calendar bg-background p-3 [--cell-radius:var(--radius-4xl)] [--cell-size:--spacing(8)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent", String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`, className),
|
|
13
14
|
captionLayout,
|
|
14
15
|
locale,
|
|
15
16
|
formatters: {
|
|
@@ -6,21 +6,21 @@ function Card({ className, size = "default", ...props }) {
|
|
|
6
6
|
return /* @__PURE__ */ jsx("div", {
|
|
7
7
|
"data-slot": "card",
|
|
8
8
|
"data-size": size,
|
|
9
|
-
className: cn("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-
|
|
9
|
+
className: cn("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-4xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-md ring-1 ring-foreground/5 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] dark:ring-foreground/10 *:[img:first-child]:rounded-t-4xl *:[img:last-child]:rounded-b-4xl", className),
|
|
10
10
|
...props
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
function CardHeader({ className, ...props }) {
|
|
14
14
|
return /* @__PURE__ */ jsx("div", {
|
|
15
15
|
"data-slot": "card-header",
|
|
16
|
-
className: cn("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-
|
|
16
|
+
className: cn("group/card-header @container/card-header grid auto-rows-min items-start gap-1.5 rounded-t-4xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)", className),
|
|
17
17
|
...props
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
function CardTitle({ className, ...props }) {
|
|
21
21
|
return /* @__PURE__ */ jsx("div", {
|
|
22
22
|
"data-slot": "card-title",
|
|
23
|
-
className: cn("text-base
|
|
23
|
+
className: cn("font-heading text-base font-medium", className),
|
|
24
24
|
...props
|
|
25
25
|
});
|
|
26
26
|
}
|
|
@@ -41,14 +41,14 @@ function CardAction({ className, ...props }) {
|
|
|
41
41
|
function CardContent({ className, ...props }) {
|
|
42
42
|
return /* @__PURE__ */ jsx("div", {
|
|
43
43
|
"data-slot": "card-content",
|
|
44
|
-
className: cn("
|
|
44
|
+
className: cn("px-(--card-spacing)", className),
|
|
45
45
|
...props
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
function CardFooter({ className, ...props }) {
|
|
49
49
|
return /* @__PURE__ */ jsx("div", {
|
|
50
50
|
"data-slot": "card-footer",
|
|
51
|
-
className: cn("flex items-center rounded-b-
|
|
51
|
+
className: cn("flex items-center rounded-b-4xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)", className),
|
|
52
52
|
...props
|
|
53
53
|
});
|
|
54
54
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use client";
|
|
2
1
|
import * as React$1 from "react";
|
|
3
2
|
import { cn } from "cn";
|
|
4
3
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -80,7 +79,7 @@ function ChartTooltipContent({ active, payload, className, indicator = "dot", hi
|
|
|
80
79
|
if (!active || !payload?.length) return null;
|
|
81
80
|
const nestLabel = payload.length === 1 && indicator !== "dot";
|
|
82
81
|
return /* @__PURE__ */ jsxs("div", {
|
|
83
|
-
className: cn("grid min-w-32 items-start gap-1.5 rounded-
|
|
82
|
+
className: cn("grid min-w-32 items-start gap-1.5 rounded-xl bg-popover px-2.5 py-1.5 text-xs text-popover-foreground shadow-lg ring-1 ring-foreground/5 dark:ring-foreground/10", className),
|
|
84
83
|
children: [!nestLabel ? tooltipLabel : null, /* @__PURE__ */ jsx("div", {
|
|
85
84
|
className: "grid gap-1.5",
|
|
86
85
|
children: payload.filter((item) => item.type !== "none").map((item, index) => {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use client";
|
|
2
1
|
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from "./dialog.js";
|
|
3
2
|
import { InputGroup, InputGroupAddon } from "./input-group.js";
|
|
4
3
|
import "react";
|
|
@@ -10,7 +9,7 @@ import { Command as Command$1 } from "cmdk";
|
|
|
10
9
|
function Command({ className, ...props }) {
|
|
11
10
|
return /* @__PURE__ */ jsx(Command$1, {
|
|
12
11
|
"data-slot": "command",
|
|
13
|
-
className: cn("flex size-full flex-col overflow-hidden rounded-
|
|
12
|
+
className: cn("flex size-full flex-col overflow-hidden rounded-4xl bg-popover p-1 text-popover-foreground", className),
|
|
14
13
|
...props
|
|
15
14
|
});
|
|
16
15
|
}
|
|
@@ -21,7 +20,7 @@ function CommandDialog({ title = "Command Palette", description = "Search for a
|
|
|
21
20
|
className: "sr-only",
|
|
22
21
|
children: [/* @__PURE__ */ jsx(DialogTitle, { children: title }), /* @__PURE__ */ jsx(DialogDescription, { children: description })]
|
|
23
22
|
}), /* @__PURE__ */ jsx(DialogContent, {
|
|
24
|
-
className: cn("top-1/3 translate-y-0 overflow-hidden rounded-
|
|
23
|
+
className: cn("top-1/3 translate-y-0 overflow-hidden rounded-4xl! p-0", className),
|
|
25
24
|
showCloseButton,
|
|
26
25
|
children
|
|
27
26
|
})]
|
|
@@ -32,7 +31,7 @@ function CommandInput({ className, ...props }) {
|
|
|
32
31
|
"data-slot": "command-input-wrapper",
|
|
33
32
|
className: "p-1 pb-0",
|
|
34
33
|
children: /* @__PURE__ */ jsxs(InputGroup, {
|
|
35
|
-
className: "h-
|
|
34
|
+
className: "h-9 bg-input/50",
|
|
36
35
|
children: [/* @__PURE__ */ jsx(Command$1.Input, {
|
|
37
36
|
"data-slot": "command-input",
|
|
38
37
|
className: cn("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
@@ -58,21 +57,21 @@ function CommandEmpty({ className, ...props }) {
|
|
|
58
57
|
function CommandGroup({ className, ...props }) {
|
|
59
58
|
return /* @__PURE__ */ jsx(Command$1.Group, {
|
|
60
59
|
"data-slot": "command-group",
|
|
61
|
-
className: cn("overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-
|
|
60
|
+
className: cn("overflow-hidden p-1.5 text-foreground **:[[cmdk-group-heading]]:px-3 **:[[cmdk-group-heading]]:py-2 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground", className),
|
|
62
61
|
...props
|
|
63
62
|
});
|
|
64
63
|
}
|
|
65
64
|
function CommandSeparator({ className, ...props }) {
|
|
66
65
|
return /* @__PURE__ */ jsx(Command$1.Separator, {
|
|
67
66
|
"data-slot": "command-separator",
|
|
68
|
-
className: cn("-
|
|
67
|
+
className: cn("my-1.5 h-px bg-border/50", className),
|
|
69
68
|
...props
|
|
70
69
|
});
|
|
71
70
|
}
|
|
72
71
|
function CommandItem({ className, children, ...props }) {
|
|
73
72
|
return /* @__PURE__ */ jsxs(Command$1.Item, {
|
|
74
73
|
"data-slot": "command-item",
|
|
75
|
-
className: cn("group/command-item relative flex cursor-default items-center gap-2 rounded-
|
|
74
|
+
className: cn("group/command-item relative flex cursor-default items-center gap-2 rounded-2xl px-3 py-2 text-sm font-medium outline-hidden select-none in-data-[slot=dialog-content]:rounded-3xl data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground", className),
|
|
76
75
|
...props,
|
|
77
76
|
children: [children, /* @__PURE__ */ jsx(CheckIcon, { className: "ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" })]
|
|
78
77
|
});
|
|
@@ -32,7 +32,7 @@ function ContextMenuContent({ className, align = "start", alignOffset = 4, side
|
|
|
32
32
|
sideOffset,
|
|
33
33
|
children: /* @__PURE__ */ jsx(ContextMenu$1.Popup, {
|
|
34
34
|
"data-slot": "context-menu-content",
|
|
35
|
-
className: cn("z-50 max-h-(--available-height) min-w-
|
|
35
|
+
className: cn("z-50 max-h-(--available-height) min-w-48 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-3xl bg-popover p-1.5 text-popover-foreground shadow-lg ring-1 ring-foreground/5 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
36
36
|
...props
|
|
37
37
|
})
|
|
38
38
|
}) });
|
|
@@ -47,7 +47,7 @@ function ContextMenuLabel({ className, inset, ...props }) {
|
|
|
47
47
|
return /* @__PURE__ */ jsx(ContextMenu$1.GroupLabel, {
|
|
48
48
|
"data-slot": "context-menu-label",
|
|
49
49
|
"data-inset": inset,
|
|
50
|
-
className: cn("px-
|
|
50
|
+
className: cn("px-3 py-2.5 text-xs text-muted-foreground data-inset:pl-9.5", className),
|
|
51
51
|
...props
|
|
52
52
|
});
|
|
53
53
|
}
|
|
@@ -56,7 +56,7 @@ function ContextMenuItem({ className, inset, variant = "default", ...props }) {
|
|
|
56
56
|
"data-slot": "context-menu-item",
|
|
57
57
|
"data-inset": inset,
|
|
58
58
|
"data-variant": variant,
|
|
59
|
-
className: cn("group/context-menu-item relative flex cursor-default items-center gap-2 rounded-
|
|
59
|
+
className: cn("group/context-menu-item relative flex cursor-default items-center gap-2.5 rounded-2xl px-3 py-2 text-sm font-medium outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-9.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive", className),
|
|
60
60
|
...props
|
|
61
61
|
});
|
|
62
62
|
}
|
|
@@ -70,7 +70,7 @@ function ContextMenuSubTrigger({ className, inset, children, ...props }) {
|
|
|
70
70
|
return /* @__PURE__ */ jsxs(ContextMenu$1.SubmenuTrigger, {
|
|
71
71
|
"data-slot": "context-menu-sub-trigger",
|
|
72
72
|
"data-inset": inset,
|
|
73
|
-
className: cn("flex cursor-default items-center rounded-
|
|
73
|
+
className: cn("flex cursor-default items-center rounded-2xl px-3 py-2 text-sm font-medium outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-9.5 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
74
74
|
...props,
|
|
75
75
|
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto" })]
|
|
76
76
|
});
|
|
@@ -87,7 +87,7 @@ function ContextMenuCheckboxItem({ className, children, checked, inset, ...props
|
|
|
87
87
|
return /* @__PURE__ */ jsxs(ContextMenu$1.CheckboxItem, {
|
|
88
88
|
"data-slot": "context-menu-checkbox-item",
|
|
89
89
|
"data-inset": inset,
|
|
90
|
-
className: cn("relative flex cursor-default items-center gap-2 rounded-
|
|
90
|
+
className: cn("relative flex cursor-default items-center gap-2.5 rounded-2xl py-2 pr-8 pl-3 text-sm font-medium outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-9.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
91
91
|
checked,
|
|
92
92
|
...props,
|
|
93
93
|
children: [/* @__PURE__ */ jsx("span", {
|
|
@@ -106,7 +106,7 @@ function ContextMenuRadioItem({ className, children, inset, ...props }) {
|
|
|
106
106
|
return /* @__PURE__ */ jsxs(ContextMenu$1.RadioItem, {
|
|
107
107
|
"data-slot": "context-menu-radio-item",
|
|
108
108
|
"data-inset": inset,
|
|
109
|
-
className: cn("relative flex cursor-default items-center gap-2 rounded-
|
|
109
|
+
className: cn("relative flex cursor-default items-center gap-2.5 rounded-2xl py-2 pr-8 pl-3 text-sm font-medium outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-9.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
110
110
|
...props,
|
|
111
111
|
children: [/* @__PURE__ */ jsx("span", {
|
|
112
112
|
className: "pointer-events-none absolute right-2",
|
|
@@ -117,7 +117,7 @@ function ContextMenuRadioItem({ className, children, inset, ...props }) {
|
|
|
117
117
|
function ContextMenuSeparator({ className, ...props }) {
|
|
118
118
|
return /* @__PURE__ */ jsx(ContextMenu$1.Separator, {
|
|
119
119
|
"data-slot": "context-menu-separator",
|
|
120
|
-
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
120
|
+
className: cn("-mx-1.5 my-1.5 h-px bg-border/50", className),
|
|
121
121
|
...props
|
|
122
122
|
});
|
|
123
123
|
}
|
|
@@ -32,20 +32,20 @@ function DialogClose({ ...props }) {
|
|
|
32
32
|
function DialogOverlay({ className, ...props }) {
|
|
33
33
|
return /* @__PURE__ */ jsx(Dialog$1.Backdrop, {
|
|
34
34
|
"data-slot": "dialog-overlay",
|
|
35
|
-
className: cn("fixed inset-0 isolate z-50 bg-black/
|
|
35
|
+
className: cn("fixed inset-0 isolate z-50 bg-black/30 duration-100 supports-backdrop-filter:backdrop-blur-sm data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className),
|
|
36
36
|
...props
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
function DialogContent({ className, children, showCloseButton = true, ...props }) {
|
|
40
40
|
return /* @__PURE__ */ jsxs(DialogPortal, { children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(Dialog$1.Popup, {
|
|
41
41
|
"data-slot": "dialog-content",
|
|
42
|
-
className: cn("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-
|
|
42
|
+
className: cn("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-4xl bg-popover p-6 text-sm text-popover-foreground shadow-xl ring-1 ring-foreground/5 duration-100 outline-none sm:max-w-md dark:ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
43
43
|
...props,
|
|
44
44
|
children: [children, showCloseButton && /* @__PURE__ */ jsxs(Dialog$1.Close, {
|
|
45
45
|
"data-slot": "dialog-close",
|
|
46
46
|
render: /* @__PURE__ */ jsx(Button, {
|
|
47
47
|
variant: "ghost",
|
|
48
|
-
className: "absolute top-4 right-4",
|
|
48
|
+
className: "absolute top-4 right-4 bg-secondary",
|
|
49
49
|
size: "icon-sm"
|
|
50
50
|
}),
|
|
51
51
|
children: [/* @__PURE__ */ jsx(XIcon, {}), /* @__PURE__ */ jsx("span", {
|
|
@@ -58,7 +58,7 @@ function DialogContent({ className, children, showCloseButton = true, ...props }
|
|
|
58
58
|
function DialogHeader({ className, ...props }) {
|
|
59
59
|
return /* @__PURE__ */ jsx("div", {
|
|
60
60
|
"data-slot": "dialog-header",
|
|
61
|
-
className: cn("flex flex-col gap-
|
|
61
|
+
className: cn("flex flex-col gap-1.5", className),
|
|
62
62
|
...props
|
|
63
63
|
});
|
|
64
64
|
}
|
|
@@ -76,7 +76,7 @@ function DialogFooter({ className, showCloseButton = false, children, ...props }
|
|
|
76
76
|
function DialogTitle({ className, ...props }) {
|
|
77
77
|
return /* @__PURE__ */ jsx(Dialog$1.Title, {
|
|
78
78
|
"data-slot": "dialog-title",
|
|
79
|
-
className: cn("leading-none font-medium", className),
|
|
79
|
+
className: cn("font-heading text-base leading-none font-medium", className),
|
|
80
80
|
...props
|
|
81
81
|
});
|
|
82
82
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import "react";
|
|
2
3
|
import { cn } from "cn";
|
|
3
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -31,7 +32,7 @@ function DropdownMenuContent({ align = "start", alignOffset = 0, side = "bottom"
|
|
|
31
32
|
sideOffset,
|
|
32
33
|
children: /* @__PURE__ */ jsx(Menu.Popup, {
|
|
33
34
|
"data-slot": "dropdown-menu-content",
|
|
34
|
-
className: cn("z-50 max-h-(--available-height) w-(--anchor-width) min-w-
|
|
35
|
+
className: cn("z-50 max-h-(--available-height) w-(--anchor-width) min-w-48 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-3xl bg-popover p-1.5 text-popover-foreground shadow-lg ring-1 ring-foreground/5 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
35
36
|
...props
|
|
36
37
|
})
|
|
37
38
|
}) });
|
|
@@ -46,7 +47,7 @@ function DropdownMenuLabel({ className, inset, ...props }) {
|
|
|
46
47
|
return /* @__PURE__ */ jsx(Menu.GroupLabel, {
|
|
47
48
|
"data-slot": "dropdown-menu-label",
|
|
48
49
|
"data-inset": inset,
|
|
49
|
-
className: cn("px-
|
|
50
|
+
className: cn("px-3 py-2.5 text-xs text-muted-foreground data-inset:pl-9.5", className),
|
|
50
51
|
...props
|
|
51
52
|
});
|
|
52
53
|
}
|
|
@@ -55,7 +56,7 @@ function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
|
|
|
55
56
|
"data-slot": "dropdown-menu-item",
|
|
56
57
|
"data-inset": inset,
|
|
57
58
|
"data-variant": variant,
|
|
58
|
-
className: cn("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-
|
|
59
|
+
className: cn("group/dropdown-menu-item relative flex cursor-default items-center gap-2.5 rounded-2xl px-3 py-2 text-sm font-medium outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-9.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive", className),
|
|
59
60
|
...props
|
|
60
61
|
});
|
|
61
62
|
}
|
|
@@ -69,7 +70,7 @@ function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
|
|
|
69
70
|
return /* @__PURE__ */ jsxs(Menu.SubmenuTrigger, {
|
|
70
71
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
71
72
|
"data-inset": inset,
|
|
72
|
-
className: cn("flex cursor-default items-center gap-2 rounded-
|
|
73
|
+
className: cn("flex cursor-default items-center gap-2 rounded-2xl px-3 py-2 text-sm font-medium outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-9.5 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
73
74
|
...props,
|
|
74
75
|
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto" })]
|
|
75
76
|
});
|
|
@@ -77,7 +78,7 @@ function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
|
|
|
77
78
|
function DropdownMenuSubContent({ align = "start", alignOffset = -3, side = "right", sideOffset = 0, className, ...props }) {
|
|
78
79
|
return /* @__PURE__ */ jsx(DropdownMenuContent, {
|
|
79
80
|
"data-slot": "dropdown-menu-sub-content",
|
|
80
|
-
className: cn("w-auto min-w-
|
|
81
|
+
className: cn("w-auto min-w-36 rounded-3xl bg-popover p-1.5 text-popover-foreground shadow-lg ring-1 ring-foreground/5 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
81
82
|
align,
|
|
82
83
|
alignOffset,
|
|
83
84
|
side,
|
|
@@ -89,7 +90,7 @@ function DropdownMenuCheckboxItem({ className, children, checked, inset, ...prop
|
|
|
89
90
|
return /* @__PURE__ */ jsxs(Menu.CheckboxItem, {
|
|
90
91
|
"data-slot": "dropdown-menu-checkbox-item",
|
|
91
92
|
"data-inset": inset,
|
|
92
|
-
className: cn("relative flex cursor-default items-center gap-2 rounded-
|
|
93
|
+
className: cn("relative flex cursor-default items-center gap-2.5 rounded-2xl py-2 pr-8 pl-3 text-sm font-medium outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-9.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
93
94
|
checked,
|
|
94
95
|
...props,
|
|
95
96
|
children: [/* @__PURE__ */ jsx("span", {
|
|
@@ -109,7 +110,7 @@ function DropdownMenuRadioItem({ className, children, inset, ...props }) {
|
|
|
109
110
|
return /* @__PURE__ */ jsxs(Menu.RadioItem, {
|
|
110
111
|
"data-slot": "dropdown-menu-radio-item",
|
|
111
112
|
"data-inset": inset,
|
|
112
|
-
className: cn("relative flex cursor-default items-center gap-2 rounded-
|
|
113
|
+
className: cn("relative flex cursor-default items-center gap-2.5 rounded-2xl py-2 pr-8 pl-3 text-sm font-medium outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-9.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
113
114
|
...props,
|
|
114
115
|
children: [/* @__PURE__ */ jsx("span", {
|
|
115
116
|
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
@@ -121,7 +122,7 @@ function DropdownMenuRadioItem({ className, children, inset, ...props }) {
|
|
|
121
122
|
function DropdownMenuSeparator({ className, ...props }) {
|
|
122
123
|
return /* @__PURE__ */ jsx(Menu.Separator, {
|
|
123
124
|
"data-slot": "dropdown-menu-separator",
|
|
124
|
-
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
125
|
+
className: cn("-mx-1.5 my-1.5 h-px bg-border/50", className),
|
|
125
126
|
...props
|
|
126
127
|
});
|
|
127
128
|
}
|
|
@@ -11,16 +11,16 @@ function InputGroup({ className, ...props }) {
|
|
|
11
11
|
return /* @__PURE__ */ jsx("div", {
|
|
12
12
|
"data-slot": "input-group",
|
|
13
13
|
role: "group",
|
|
14
|
-
className: cn("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-
|
|
14
|
+
className: cn("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-4xl border border-transparent bg-input/50 transition-[color,box-shadow,background-color] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-data-[align=block-end]:rounded-3xl has-data-[align=block-start]:rounded-3xl has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/30 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[textarea]:rounded-2xl has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5", className),
|
|
15
15
|
...props
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
|
-
const inputGroupAddonVariants = cva("flex h-auto cursor-text items-center justify-center gap-2 py-
|
|
18
|
+
const inputGroupAddonVariants = cva("flex h-auto cursor-text items-center justify-center gap-2 py-2 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-3xl **:data-[slot=kbd]:bg-muted-foreground/10 **:data-[slot=kbd]:px-1.5 [&>svg:not([class*='size-'])]:size-4", {
|
|
19
19
|
variants: { align: {
|
|
20
|
-
"inline-start": "order-first pl-
|
|
21
|
-
"inline-end": "order-last pr-
|
|
22
|
-
"block-start": "order-first w-full justify-start px-
|
|
23
|
-
"block-end": "order-last w-full justify-start px-
|
|
20
|
+
"inline-start": "order-first pl-3 has-[>button]:-ml-1 has-[>kbd]:-ml-1",
|
|
21
|
+
"inline-end": "order-last pr-3 has-[>button]:-mr-1 has-[>kbd]:-mr-1",
|
|
22
|
+
"block-start": "order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-3.5 [.border-b]:pb-3.5",
|
|
23
|
+
"block-end": "order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-3.5 [.border-t]:pt-3.5"
|
|
24
24
|
} },
|
|
25
25
|
defaultVariants: { align: "inline-start" }
|
|
26
26
|
});
|
|
@@ -37,11 +37,11 @@ function InputGroupAddon({ className, align = "inline-start", ...props }) {
|
|
|
37
37
|
...props
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
|
-
const inputGroupButtonVariants = cva("flex items-center gap-2 text-sm shadow-none", {
|
|
40
|
+
const inputGroupButtonVariants = cva("flex items-center gap-2 rounded-4xl text-sm shadow-none", {
|
|
41
41
|
variants: { size: {
|
|
42
|
-
xs: "h-6 gap-1 rounded-
|
|
42
|
+
xs: "h-6 gap-1 rounded-xl px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
43
43
|
sm: "",
|
|
44
|
-
"icon-xs": "size-6 rounded-
|
|
44
|
+
"icon-xs": "size-6 rounded-xl p-0 has-[>svg]:p-0",
|
|
45
45
|
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
46
46
|
} },
|
|
47
47
|
defaultVariants: { size: "xs" }
|
|
@@ -71,7 +71,7 @@ function InputGroupInput({ className, ...props }) {
|
|
|
71
71
|
function InputGroupTextarea({ className, ...props }) {
|
|
72
72
|
return /* @__PURE__ */ jsx(Textarea, {
|
|
73
73
|
"data-slot": "input-group-control",
|
|
74
|
-
className: cn("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent", className),
|
|
74
|
+
className: cn("flex-1 resize-none rounded-none border-0 bg-transparent py-2.5 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent", className),
|
|
75
75
|
...props
|
|
76
76
|
});
|
|
77
77
|
}
|
|
@@ -7,7 +7,7 @@ function Input({ className, type, ...props }) {
|
|
|
7
7
|
return /* @__PURE__ */ jsx(Input$1, {
|
|
8
8
|
type,
|
|
9
9
|
"data-slot": "input",
|
|
10
|
-
className: cn("h-9 w-full min-w-0 rounded-
|
|
10
|
+
className: cn("h-9 w-full min-w-0 rounded-3xl border border-transparent bg-input/50 px-3 py-1 text-base transition-[color,box-shadow,background-color] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
|
|
11
11
|
...props
|
|
12
12
|
});
|
|
13
13
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use client";
|
|
2
1
|
import "react";
|
|
3
2
|
import { cn } from "cn";
|
|
4
3
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -25,7 +24,7 @@ function PopoverContent({ className, align = "center", alignOffset = 0, side = "
|
|
|
25
24
|
className: "isolate z-50",
|
|
26
25
|
children: /* @__PURE__ */ jsx(Popover$1.Popup, {
|
|
27
26
|
"data-slot": "popover-content",
|
|
28
|
-
className: cn("z-50 flex w-72 origin-(--transform-origin) flex-col gap-4 rounded-
|
|
27
|
+
className: cn("z-50 flex w-72 origin-(--transform-origin) flex-col gap-4 rounded-3xl bg-popover p-4 text-sm text-popover-foreground shadow-lg ring-1 ring-foreground/5 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
29
28
|
...props
|
|
30
29
|
})
|
|
31
30
|
}) });
|
|
@@ -40,7 +39,7 @@ function PopoverHeader({ className, ...props }) {
|
|
|
40
39
|
function PopoverTitle({ className, ...props }) {
|
|
41
40
|
return /* @__PURE__ */ jsx(Popover$1.Title, {
|
|
42
41
|
"data-slot": "popover-title",
|
|
43
|
-
className: cn("font-medium", className),
|
|
42
|
+
className: cn("text-base font-medium", className),
|
|
44
43
|
...props
|
|
45
44
|
});
|
|
46
45
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { cn } from "cn";
|
|
2
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
4
|
import { Progress as Progress$1 } from "@base-ui/react/progress";
|
|
@@ -13,7 +14,7 @@ function Progress({ className, children, value, ...props }) {
|
|
|
13
14
|
}
|
|
14
15
|
function ProgressTrack({ className, ...props }) {
|
|
15
16
|
return /* @__PURE__ */ jsx(Progress$1.Track, {
|
|
16
|
-
className: cn("relative flex h-
|
|
17
|
+
className: cn("relative flex h-3 w-full items-center overflow-x-hidden rounded-full bg-muted", className),
|
|
17
18
|
"data-slot": "progress-track",
|
|
18
19
|
...props
|
|
19
20
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import "react";
|
|
2
3
|
import { cn } from "cn";
|
|
3
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -8,7 +9,7 @@ const Select = Select$1.Root;
|
|
|
8
9
|
function SelectGroup({ className, ...props }) {
|
|
9
10
|
return /* @__PURE__ */ jsx(Select$1.Group, {
|
|
10
11
|
"data-slot": "select-group",
|
|
11
|
-
className: cn("scroll-my-1 p-1", className),
|
|
12
|
+
className: cn("scroll-my-1.5 p-1.5", className),
|
|
12
13
|
...props
|
|
13
14
|
});
|
|
14
15
|
}
|
|
@@ -23,7 +24,7 @@ function SelectTrigger({ className, size = "default", children, ...props }) {
|
|
|
23
24
|
return /* @__PURE__ */ jsxs(Select$1.Trigger, {
|
|
24
25
|
"data-slot": "select-trigger",
|
|
25
26
|
"data-size": size,
|
|
26
|
-
className: cn("flex w-fit items-center justify-between gap-1.5 rounded-
|
|
27
|
+
className: cn("flex w-fit items-center justify-between gap-1.5 rounded-3xl border border-transparent bg-input/50 px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow,background-color] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
27
28
|
...props,
|
|
28
29
|
children: [children, /* @__PURE__ */ jsx(Select$1.Icon, { render: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" }) })]
|
|
29
30
|
});
|
|
@@ -39,7 +40,7 @@ function SelectContent({ className, children, side = "bottom", sideOffset = 4, a
|
|
|
39
40
|
children: /* @__PURE__ */ jsxs(Select$1.Popup, {
|
|
40
41
|
"data-slot": "select-content",
|
|
41
42
|
"data-align-trigger": alignItemWithTrigger,
|
|
42
|
-
className: cn("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-
|
|
43
|
+
className: cn("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-3xl bg-popover text-popover-foreground shadow-lg ring-1 ring-foreground/5 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
43
44
|
...props,
|
|
44
45
|
children: [
|
|
45
46
|
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
@@ -52,14 +53,14 @@ function SelectContent({ className, children, side = "bottom", sideOffset = 4, a
|
|
|
52
53
|
function SelectLabel({ className, ...props }) {
|
|
53
54
|
return /* @__PURE__ */ jsx(Select$1.GroupLabel, {
|
|
54
55
|
"data-slot": "select-label",
|
|
55
|
-
className: cn("px-
|
|
56
|
+
className: cn("px-3 py-2.5 text-xs text-muted-foreground", className),
|
|
56
57
|
...props
|
|
57
58
|
});
|
|
58
59
|
}
|
|
59
60
|
function SelectItem({ className, children, ...props }) {
|
|
60
61
|
return /* @__PURE__ */ jsxs(Select$1.Item, {
|
|
61
62
|
"data-slot": "select-item",
|
|
62
|
-
className: cn("relative flex w-full cursor-default items-center gap-2 rounded-
|
|
63
|
+
className: cn("relative flex w-full cursor-default items-center gap-2.5 rounded-2xl py-2 pr-8 pl-3 text-sm font-medium outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
|
|
63
64
|
...props,
|
|
64
65
|
children: [/* @__PURE__ */ jsx(Select$1.ItemText, {
|
|
65
66
|
className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap",
|
|
@@ -73,7 +74,7 @@ function SelectItem({ className, children, ...props }) {
|
|
|
73
74
|
function SelectSeparator({ className, ...props }) {
|
|
74
75
|
return /* @__PURE__ */ jsx(Select$1.Separator, {
|
|
75
76
|
"data-slot": "select-separator",
|
|
76
|
-
className: cn("pointer-events-none -mx-1 my-1 h-px bg-border", className),
|
|
77
|
+
className: cn("pointer-events-none -mx-1.5 my-1.5 h-px bg-border", className),
|
|
77
78
|
...props
|
|
78
79
|
});
|
|
79
80
|
}
|
|
@@ -33,7 +33,7 @@ function SheetPortal({ ...props }) {
|
|
|
33
33
|
function SheetOverlay({ className, ...props }) {
|
|
34
34
|
return /* @__PURE__ */ jsx(Dialog.Backdrop, {
|
|
35
35
|
"data-slot": "sheet-overlay",
|
|
36
|
-
className: cn("fixed inset-0 z-50 bg-black/
|
|
36
|
+
className: cn("fixed inset-0 z-50 bg-black/30 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-sm", className),
|
|
37
37
|
...props
|
|
38
38
|
});
|
|
39
39
|
}
|
|
@@ -41,13 +41,13 @@ function SheetContent({ className, children, side = "right", showCloseButton = t
|
|
|
41
41
|
return /* @__PURE__ */ jsxs(SheetPortal, { children: [/* @__PURE__ */ jsx(SheetOverlay, {}), /* @__PURE__ */ jsxs(Dialog.Popup, {
|
|
42
42
|
"data-slot": "sheet-content",
|
|
43
43
|
"data-side": side,
|
|
44
|
-
className: cn("fixed z-50 flex flex-col
|
|
44
|
+
className: cn("fixed z-50 flex flex-col bg-popover bg-clip-padding text-sm text-popover-foreground shadow-xl transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm", className),
|
|
45
45
|
...props,
|
|
46
46
|
children: [children, showCloseButton && /* @__PURE__ */ jsxs(Dialog.Close, {
|
|
47
47
|
"data-slot": "sheet-close",
|
|
48
48
|
render: /* @__PURE__ */ jsx(Button, {
|
|
49
49
|
variant: "ghost",
|
|
50
|
-
className: "absolute top-4 right-4",
|
|
50
|
+
className: "absolute top-4 right-4 bg-secondary",
|
|
51
51
|
size: "icon-sm"
|
|
52
52
|
}),
|
|
53
53
|
children: [/* @__PURE__ */ jsx(XIcon, {}), /* @__PURE__ */ jsx("span", {
|
|
@@ -60,21 +60,21 @@ function SheetContent({ className, children, side = "right", showCloseButton = t
|
|
|
60
60
|
function SheetHeader({ className, ...props }) {
|
|
61
61
|
return /* @__PURE__ */ jsx("div", {
|
|
62
62
|
"data-slot": "sheet-header",
|
|
63
|
-
className: cn("flex flex-col gap-1.5 p-
|
|
63
|
+
className: cn("flex flex-col gap-1.5 p-6", className),
|
|
64
64
|
...props
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
function SheetFooter({ className, ...props }) {
|
|
68
68
|
return /* @__PURE__ */ jsx("div", {
|
|
69
69
|
"data-slot": "sheet-footer",
|
|
70
|
-
className: cn("mt-auto flex flex-col gap-2 p-
|
|
70
|
+
className: cn("mt-auto flex flex-col gap-2 p-6", className),
|
|
71
71
|
...props
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
function SheetTitle({ className, ...props }) {
|
|
75
75
|
return /* @__PURE__ */ jsx(Dialog.Title, {
|
|
76
76
|
"data-slot": "sheet-title",
|
|
77
|
-
className: cn("font-medium text-foreground", className),
|
|
77
|
+
className: cn("font-heading text-base font-medium text-foreground", className),
|
|
78
78
|
...props
|
|
79
79
|
});
|
|
80
80
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { Button } from "./button.js";
|
|
2
3
|
import { Input } from "./input.js";
|
|
3
4
|
import { Separator } from "./separator.js";
|
|
@@ -133,7 +134,7 @@ function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas"
|
|
|
133
134
|
children: /* @__PURE__ */ jsx("div", {
|
|
134
135
|
"data-sidebar": "sidebar",
|
|
135
136
|
"data-slot": "sidebar-inner",
|
|
136
|
-
className: "flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-
|
|
137
|
+
className: "flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-2xl group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",
|
|
137
138
|
children
|
|
138
139
|
})
|
|
139
140
|
})]
|
|
@@ -174,7 +175,7 @@ function SidebarRail({ className, ...props }) {
|
|
|
174
175
|
function SidebarInset({ className, ...props }) {
|
|
175
176
|
return /* @__PURE__ */ jsx("main", {
|
|
176
177
|
"data-slot": "sidebar-inset",
|
|
177
|
-
className: cn("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-
|
|
178
|
+
className: cn("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-2xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2", className),
|
|
178
179
|
...props
|
|
179
180
|
});
|
|
180
181
|
}
|
|
@@ -182,7 +183,7 @@ function SidebarInput({ className, ...props }) {
|
|
|
182
183
|
return /* @__PURE__ */ jsx(Input, {
|
|
183
184
|
"data-slot": "sidebar-input",
|
|
184
185
|
"data-sidebar": "input",
|
|
185
|
-
className: cn("h-8 w-full bg-
|
|
186
|
+
className: cn("h-8 w-full bg-input/50 shadow-none", className),
|
|
186
187
|
...props
|
|
187
188
|
});
|
|
188
189
|
}
|
|
@@ -190,7 +191,7 @@ function SidebarHeader({ className, ...props }) {
|
|
|
190
191
|
return /* @__PURE__ */ jsx("div", {
|
|
191
192
|
"data-slot": "sidebar-header",
|
|
192
193
|
"data-sidebar": "header",
|
|
193
|
-
className: cn("flex flex-col gap-2 p-2", className),
|
|
194
|
+
className: cn("flex flex-col gap-2 p-2 [--radius:var(--radius-xl)]", className),
|
|
194
195
|
...props
|
|
195
196
|
});
|
|
196
197
|
}
|
|
@@ -214,7 +215,7 @@ function SidebarContent({ className, ...props }) {
|
|
|
214
215
|
return /* @__PURE__ */ jsx("div", {
|
|
215
216
|
"data-slot": "sidebar-content",
|
|
216
217
|
"data-sidebar": "content",
|
|
217
|
-
className: cn("no-scrollbar flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden", className),
|
|
218
|
+
className: cn("no-scrollbar flex min-h-0 flex-1 flex-col gap-2 overflow-auto [--radius:var(--radius-xl)] group-data-[collapsible=icon]:overflow-hidden", className),
|
|
218
219
|
...props
|
|
219
220
|
});
|
|
220
221
|
}
|
|
@@ -229,7 +230,7 @@ function SidebarGroup({ className, ...props }) {
|
|
|
229
230
|
function SidebarGroupLabel({ className, render, ...props }) {
|
|
230
231
|
return useRender({
|
|
231
232
|
defaultTagName: "div",
|
|
232
|
-
props: mergeProps({ className: cn("flex h-8 shrink-0 items-center rounded-
|
|
233
|
+
props: mergeProps({ className: cn("flex h-8 shrink-0 items-center rounded-xl px-3 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", className) }, props),
|
|
233
234
|
render,
|
|
234
235
|
state: {
|
|
235
236
|
slot: "sidebar-group-label",
|
|
@@ -240,7 +241,7 @@ function SidebarGroupLabel({ className, render, ...props }) {
|
|
|
240
241
|
function SidebarGroupAction({ className, render, ...props }) {
|
|
241
242
|
return useRender({
|
|
242
243
|
defaultTagName: "button",
|
|
243
|
-
props: mergeProps({ className: cn("absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-
|
|
244
|
+
props: mergeProps({ className: cn("absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-xl p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", className) }, props),
|
|
244
245
|
render,
|
|
245
246
|
state: {
|
|
246
247
|
slot: "sidebar-group-action",
|
|
@@ -260,7 +261,7 @@ function SidebarMenu({ className, ...props }) {
|
|
|
260
261
|
return /* @__PURE__ */ jsx("ul", {
|
|
261
262
|
"data-slot": "sidebar-menu",
|
|
262
263
|
"data-sidebar": "menu",
|
|
263
|
-
className: cn("flex w-full min-w-0 flex-col gap-
|
|
264
|
+
className: cn("flex w-full min-w-0 flex-col gap-0.5", className),
|
|
264
265
|
...props
|
|
265
266
|
});
|
|
266
267
|
}
|
|
@@ -272,16 +273,16 @@ function SidebarMenuItem({ className, ...props }) {
|
|
|
272
273
|
...props
|
|
273
274
|
});
|
|
274
275
|
}
|
|
275
|
-
const sidebarMenuButtonVariants = cva("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-
|
|
276
|
+
const sidebarMenuButtonVariants = cva("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-xl px-3 py-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate", {
|
|
276
277
|
variants: {
|
|
277
278
|
variant: {
|
|
278
279
|
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
279
280
|
outline: "bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"
|
|
280
281
|
},
|
|
281
282
|
size: {
|
|
282
|
-
default: "h-
|
|
283
|
-
sm: "h-
|
|
284
|
-
lg: "h-
|
|
283
|
+
default: "h-9 text-sm",
|
|
284
|
+
sm: "h-8 text-xs",
|
|
285
|
+
lg: "h-14 px-3 text-sm group-data-[collapsible=icon]:p-0!"
|
|
285
286
|
}
|
|
286
287
|
},
|
|
287
288
|
defaultVariants: {
|
|
@@ -317,7 +318,7 @@ function SidebarMenuButton({ render, isActive = false, variant = "default", size
|
|
|
317
318
|
function SidebarMenuAction({ className, render, showOnHover = false, ...props }) {
|
|
318
319
|
return useRender({
|
|
319
320
|
defaultTagName: "button",
|
|
320
|
-
props: mergeProps({ className: cn("absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-
|
|
321
|
+
props: mergeProps({ className: cn("absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-xl p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-2 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0", className) }, props),
|
|
321
322
|
render,
|
|
322
323
|
state: {
|
|
323
324
|
slot: "sidebar-menu-action",
|
|
@@ -329,7 +330,7 @@ function SidebarMenuBadge({ className, ...props }) {
|
|
|
329
330
|
return /* @__PURE__ */ jsx("div", {
|
|
330
331
|
"data-slot": "sidebar-menu-badge",
|
|
331
332
|
"data-sidebar": "menu-badge",
|
|
332
|
-
className: cn("pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-
|
|
333
|
+
className: cn("pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-xl px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground", className),
|
|
333
334
|
...props
|
|
334
335
|
});
|
|
335
336
|
}
|
|
@@ -340,10 +341,10 @@ function SidebarMenuSkeleton({ className, showIcon = false, ...props }) {
|
|
|
340
341
|
return /* @__PURE__ */ jsxs("div", {
|
|
341
342
|
"data-slot": "sidebar-menu-skeleton",
|
|
342
343
|
"data-sidebar": "menu-skeleton",
|
|
343
|
-
className: cn("flex h-8 items-center gap-2 rounded-
|
|
344
|
+
className: cn("flex h-8 items-center gap-2 rounded-xl px-2", className),
|
|
344
345
|
...props,
|
|
345
346
|
children: [showIcon && /* @__PURE__ */ jsx(Skeleton, {
|
|
346
|
-
className: "size-4 rounded-
|
|
347
|
+
className: "size-4 rounded-xl",
|
|
347
348
|
"data-sidebar": "menu-skeleton-icon"
|
|
348
349
|
}), /* @__PURE__ */ jsx(Skeleton, {
|
|
349
350
|
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
@@ -371,7 +372,7 @@ function SidebarMenuSubItem({ className, ...props }) {
|
|
|
371
372
|
function SidebarMenuSubButton({ render, size = "md", isActive = false, className, ...props }) {
|
|
372
373
|
return useRender({
|
|
373
374
|
defaultTagName: "a",
|
|
374
|
-
props: mergeProps({ className: cn("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-
|
|
375
|
+
props: mergeProps({ className: cn("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-xl px-3 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground", className) }, props),
|
|
375
376
|
render,
|
|
376
377
|
state: {
|
|
377
378
|
slot: "sidebar-menu-sub-button",
|
|
@@ -4,7 +4,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
4
4
|
function Skeleton({ className, ...props }) {
|
|
5
5
|
return /* @__PURE__ */ jsx("div", {
|
|
6
6
|
"data-slot": "skeleton",
|
|
7
|
-
className: cn("animate-pulse rounded-
|
|
7
|
+
className: cn("animate-pulse rounded-2xl bg-muted", className),
|
|
8
8
|
...props
|
|
9
9
|
});
|
|
10
10
|
}
|
|
@@ -17,14 +17,14 @@ function Slider({ className, defaultValue, value, min = 0, max = 100, ...props }
|
|
|
17
17
|
className: "relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col",
|
|
18
18
|
children: [/* @__PURE__ */ jsx(Slider$1.Track, {
|
|
19
19
|
"data-slot": "slider-track",
|
|
20
|
-
className: "relative grow overflow-hidden rounded-full bg-
|
|
20
|
+
className: "relative grow overflow-hidden rounded-full bg-input/90 select-none data-horizontal:h-2 data-horizontal:w-full data-vertical:h-full data-vertical:w-2",
|
|
21
21
|
children: /* @__PURE__ */ jsx(Slider$1.Indicator, {
|
|
22
22
|
"data-slot": "slider-range",
|
|
23
23
|
className: "bg-primary select-none data-horizontal:h-full data-vertical:w-full"
|
|
24
24
|
})
|
|
25
25
|
}), Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsx(Slider$1.Thumb, {
|
|
26
26
|
"data-slot": "slider-thumb",
|
|
27
|
-
className: "block
|
|
27
|
+
className: "block h-4 w-6 shrink-0 rounded-full bg-white shadow-md ring-1 ring-black/10 transition-[color,box-shadow,background-color] select-none not-dark:bg-clip-padding hover:ring-4 hover:ring-ring/30 focus-visible:ring-4 focus-visible:ring-ring/30 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50 data-vertical:h-6 data-vertical:w-4"
|
|
28
28
|
}, index))]
|
|
29
29
|
})
|
|
30
30
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import "react";
|
|
2
3
|
import { cn } from "cn";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -44,14 +45,14 @@ function TableRow({ className, ...props }) {
|
|
|
44
45
|
function TableHead({ className, ...props }) {
|
|
45
46
|
return /* @__PURE__ */ jsx("th", {
|
|
46
47
|
"data-slot": "table-head",
|
|
47
|
-
className: cn("h-
|
|
48
|
+
className: cn("h-12 px-3 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0", className),
|
|
48
49
|
...props
|
|
49
50
|
});
|
|
50
51
|
}
|
|
51
52
|
function TableCell({ className, ...props }) {
|
|
52
53
|
return /* @__PURE__ */ jsx("td", {
|
|
53
54
|
"data-slot": "table-cell",
|
|
54
|
-
className: cn("p-
|
|
55
|
+
className: cn("p-3 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0", className),
|
|
55
56
|
...props
|
|
56
57
|
});
|
|
57
58
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use client";
|
|
2
1
|
import { cva } from "class-variance-authority";
|
|
3
2
|
import { cn } from "cn";
|
|
4
3
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -12,7 +11,7 @@ function Tabs({ className, orientation = "horizontal", ...props }) {
|
|
|
12
11
|
...props
|
|
13
12
|
});
|
|
14
13
|
}
|
|
15
|
-
const tabsListVariants = cva("group/tabs-list inline-flex w-fit items-center justify-center rounded-
|
|
14
|
+
const tabsListVariants = cva("group/tabs-list inline-flex w-fit items-center justify-center rounded-full p-1 text-muted-foreground group-data-horizontal/tabs:h-9 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col group-data-vertical/tabs:rounded-2xl data-[variant=line]:rounded-none", {
|
|
16
15
|
variants: { variant: {
|
|
17
16
|
default: "bg-muted",
|
|
18
17
|
line: "gap-1 bg-transparent"
|
|
@@ -30,7 +29,7 @@ function TabsList({ className, variant = "default", ...props }) {
|
|
|
30
29
|
function TabsTrigger({ className, ...props }) {
|
|
31
30
|
return /* @__PURE__ */ jsx(Tabs$1.Tab, {
|
|
32
31
|
"data-slot": "tabs-trigger",
|
|
33
|
-
className: cn("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-
|
|
32
|
+
className: cn("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-2 rounded-full border border-transparent! px-3 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start group-data-vertical/tabs:rounded-2xl group-data-vertical/tabs:px-3 group-data-vertical/tabs:py-1.5 hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent", "data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground", "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100", className),
|
|
34
33
|
...props
|
|
35
34
|
});
|
|
36
35
|
}
|
|
@@ -5,7 +5,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
5
5
|
function Textarea({ className, ...props }) {
|
|
6
6
|
return /* @__PURE__ */ jsx("textarea", {
|
|
7
7
|
"data-slot": "textarea",
|
|
8
|
-
className: cn("flex field-sizing-content min-h-16 w-full rounded-
|
|
8
|
+
className: cn("flex field-sizing-content min-h-16 w-full resize-none rounded-2xl border border-transparent bg-input/50 px-3 py-3 text-base transition-[color,box-shadow,background-color] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
|
|
9
9
|
...props
|
|
10
10
|
});
|
|
11
11
|
}
|
|
@@ -20,7 +20,7 @@ function ToggleGroup({ className, variant, size, spacing = 2, orientation = "hor
|
|
|
20
20
|
"data-spacing": spacing,
|
|
21
21
|
"data-orientation": orientation,
|
|
22
22
|
style: { "--gap": spacing },
|
|
23
|
-
className: cn("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))]
|
|
23
|
+
className: cn("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] data-[spacing=0]:data-[variant=outline]:rounded-3xl data-vertical:flex-col data-vertical:items-stretch", className),
|
|
24
24
|
...props,
|
|
25
25
|
children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, {
|
|
26
26
|
value: {
|
|
@@ -40,7 +40,7 @@ function ToggleGroupItem({ className, children, variant = "default", size = "def
|
|
|
40
40
|
"data-variant": context.variant || variant,
|
|
41
41
|
"data-size": context.size || size,
|
|
42
42
|
"data-spacing": context.spacing,
|
|
43
|
-
className: cn("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-
|
|
43
|
+
className: cn("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-3 group-data-[spacing=0]/toggle-group:shadow-none focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-2.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-2.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-3xl group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-3xl group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-3xl group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-3xl data-[state=on]:bg-muted group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t", toggleVariants({
|
|
44
44
|
variant: context.variant || variant,
|
|
45
45
|
size: context.size || size
|
|
46
46
|
}), className),
|
|
@@ -4,16 +4,16 @@ import { cn } from "cn";
|
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { Toggle as Toggle$1 } from "@base-ui/react/toggle";
|
|
6
6
|
//#region src/components/ui/toggle.tsx
|
|
7
|
-
const toggleVariants = cva("group/toggle inline-flex items-center justify-center gap-1 rounded-
|
|
7
|
+
const toggleVariants = cva("group/toggle inline-flex items-center justify-center gap-1 rounded-3xl text-sm font-medium whitespace-nowrap transition-colors outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/30 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
10
10
|
default: "bg-transparent",
|
|
11
|
-
outline: "border border-input bg-transparent
|
|
11
|
+
outline: "border border-input bg-transparent hover:bg-muted"
|
|
12
12
|
},
|
|
13
13
|
size: {
|
|
14
|
-
default: "h-9 min-w-9 px-
|
|
15
|
-
sm: "h-8 min-w-8 px-
|
|
16
|
-
lg: "h-10 min-w-10 px-
|
|
14
|
+
default: "h-9 min-w-9 px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5",
|
|
15
|
+
sm: "h-8 min-w-8 px-3 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
16
|
+
lg: "h-10 min-w-10 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
defaultVariants: {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use client";
|
|
2
1
|
import { cn } from "cn";
|
|
3
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
3
|
import { Tooltip as Tooltip$1 } from "@base-ui/react/tooltip";
|
|
@@ -31,9 +30,9 @@ function TooltipContent({ className, side = "top", sideOffset = 4, align = "cent
|
|
|
31
30
|
className: "isolate z-50",
|
|
32
31
|
children: /* @__PURE__ */ jsxs(Tooltip$1.Popup, {
|
|
33
32
|
"data-slot": "tooltip-content",
|
|
34
|
-
className: cn("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-
|
|
33
|
+
className: cn("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-xl bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-lg data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
35
34
|
...props,
|
|
36
|
-
children: [children, /* @__PURE__ */ jsx(Tooltip$1.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" })]
|
|
35
|
+
children: [children, /* @__PURE__ */ jsx(Tooltip$1.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:translate-x-[1.5px] data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:translate-x-[-1.5px] data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:translate-x-[-1.5px] data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:translate-x-[1.5px] data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" })]
|
|
37
36
|
})
|
|
38
37
|
}) });
|
|
39
38
|
}
|