@minutemailer/kit 1.4.1 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/details.js +2 -2
- package/components/donut-chart.js +2 -2
- package/components/engagement-chart.js +2 -2
- package/components/ui/accordion.js +1 -1
- package/components/ui/badge.js +1 -1
- package/components/ui/button.js +2 -2
- package/components/ui/calendar.js +6 -6
- package/components/ui/chart.js +1 -1
- package/components/ui/dialog.js +1 -1
- package/components/ui/dropdown-menu.js +6 -6
- package/components/ui/input.js +1 -1
- package/components/ui/pagination.js +1 -1
- package/components/ui/popover.js +1 -1
- package/components/ui/sidebar.js +18 -18
- package/components/ui/skeleton.js +1 -1
- package/components/ui/switch.d.ts +6 -0
- package/components/ui/switch.js +7 -0
- package/components/ui/textarea.js +1 -1
- package/package.json +2 -1
- package/styles.css +143 -51
package/components/details.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useRef } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { cn } from '../utils/utils.js';
|
|
4
4
|
import { useDetails } from './minutemailer-kit.js';
|
|
5
5
|
export function Details({ children }) {
|
|
6
6
|
const ref = useRef(null);
|
|
@@ -11,5 +11,5 @@ export function Details({ children }) {
|
|
|
11
11
|
}
|
|
12
12
|
return () => setMountNode(null);
|
|
13
13
|
}, [setMountNode]);
|
|
14
|
-
return (_jsx(
|
|
14
|
+
return (_jsx("div", { ref: ref, className: cn('fixed top-(--header-height) right-0 bottom-0 z-25 bg-background w-full max-w-[658px] shadow-md transition-transform duration-300 ease-out', visible ? 'translate-x-0' : 'translate-x-full'), children: children }));
|
|
15
15
|
}
|
|
@@ -3,8 +3,8 @@ import { Cell, Label, Pie, PieChart } from 'recharts';
|
|
|
3
3
|
import { ChartContainer } from '../components/ui/chart.js';
|
|
4
4
|
export function DonutChart({ percentage, size = 120 }) {
|
|
5
5
|
const COLORS = {
|
|
6
|
-
filled: '
|
|
7
|
-
unfilled: '
|
|
6
|
+
filled: 'var(--primary)',
|
|
7
|
+
unfilled: 'var(--border)',
|
|
8
8
|
};
|
|
9
9
|
// Include both filled and unfilled portions in the same data
|
|
10
10
|
const chartData = [
|
|
@@ -15,11 +15,11 @@ const defaultData = [
|
|
|
15
15
|
const chartConfig = {
|
|
16
16
|
opens: {
|
|
17
17
|
label: 'Opens',
|
|
18
|
-
color: '
|
|
18
|
+
color: 'var(--primary)',
|
|
19
19
|
},
|
|
20
20
|
clicks: {
|
|
21
21
|
label: 'Clicks',
|
|
22
|
-
color: '
|
|
22
|
+
color: 'var(--secondary)',
|
|
23
23
|
},
|
|
24
24
|
};
|
|
25
25
|
export function EngagementChart({ data = defaultData }) {
|
|
@@ -9,7 +9,7 @@ function AccordionItem({ className, ...props }) {
|
|
|
9
9
|
return (_jsx(AccordionPrimitive.Item, { "data-slot": "accordion-item", className: cn('border-b', className), ...props }));
|
|
10
10
|
}
|
|
11
11
|
function AccordionTrigger({ className, children, ...props }) {
|
|
12
|
-
return (_jsx(AccordionPrimitive.Header, { className: "flex", "data-slot": "accordion-header", children: _jsxs(AccordionPrimitive.Trigger, { "data-slot": "accordion-trigger", className: cn('flex flex-1 cursor-pointer items-center justify-between rounded-md px-4 py-5 font-medium transition-all hover:bg-
|
|
12
|
+
return (_jsx(AccordionPrimitive.Header, { className: "flex", "data-slot": "accordion-header", children: _jsxs(AccordionPrimitive.Trigger, { "data-slot": "accordion-trigger", className: cn('flex flex-1 cursor-pointer items-center justify-between rounded-md px-4 py-5 font-medium transition-all hover:bg-muted/50 [&[data-state=open]>svg]:rotate-180', className), ...props, children: [children, _jsx(ChevronDown, { className: "h-4 w-4 shrink-0 transition-transform duration-200" })] }) }));
|
|
13
13
|
}
|
|
14
14
|
function AccordionContent({ className, children, ...props }) {
|
|
15
15
|
return (_jsx(AccordionPrimitive.Content, { "data-slot": "accordion-content", className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden px-4 py-4 text-sm transition-all", ...props, children: _jsx("div", { className: cn('pb-4 pt-0', className), children: children }) }));
|
package/components/ui/badge.js
CHANGED
|
@@ -8,7 +8,7 @@ const badgeVariants = cva('inline-flex items-center justify-center rounded-full
|
|
|
8
8
|
default: 'border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90',
|
|
9
9
|
secondary: 'border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90',
|
|
10
10
|
destructive: 'border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',
|
|
11
|
-
outline: 'text-foreground [a&]:hover:bg-
|
|
11
|
+
outline: 'text-foreground [a&]:hover:bg-muted [a&]:hover:text-foreground',
|
|
12
12
|
},
|
|
13
13
|
},
|
|
14
14
|
defaultVariants: {
|
package/components/ui/button.js
CHANGED
|
@@ -7,9 +7,9 @@ const buttonVariants = cva("inline-flex items-center justify-center gap-2 whites
|
|
|
7
7
|
variant: {
|
|
8
8
|
default: 'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',
|
|
9
9
|
destructive: 'bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',
|
|
10
|
-
outline: 'border bg-background shadow-xs hover:bg-
|
|
10
|
+
outline: 'border bg-background shadow-xs hover:bg-muted hover:text-foreground dark:bg-border/30 dark:border-border dark:hover:bg-border/50',
|
|
11
11
|
secondary: 'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80',
|
|
12
|
-
ghost: 'hover:bg-
|
|
12
|
+
ghost: 'hover:bg-muted hover:text-foreground dark:hover:bg-muted/50',
|
|
13
13
|
link: 'text-primary underline-offset-4 hover:underline',
|
|
14
14
|
},
|
|
15
15
|
size: {
|
|
@@ -18,8 +18,8 @@ function Calendar({ className, classNames, showOutsideDays = true, captionLayout
|
|
|
18
18
|
button_next: cn(buttonVariants({ variant: buttonVariant }), 'size-(--cell-size) aria-disabled:opacity-50 p-0 select-none', defaultClassNames.button_next),
|
|
19
19
|
month_caption: cn('flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)', defaultClassNames.month_caption),
|
|
20
20
|
dropdowns: cn('w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5', defaultClassNames.dropdowns),
|
|
21
|
-
dropdown_root: cn('relative has-focus:border-ring border border-
|
|
22
|
-
dropdown: cn('absolute bg-
|
|
21
|
+
dropdown_root: cn('relative has-focus:border-ring border border-border shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md', defaultClassNames.dropdown_root),
|
|
22
|
+
dropdown: cn('absolute bg-card inset-0 opacity-0', defaultClassNames.dropdown),
|
|
23
23
|
caption_label: cn('select-none font-medium', captionLayout === 'label'
|
|
24
24
|
? 'text-sm'
|
|
25
25
|
: 'rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5', defaultClassNames.caption_label),
|
|
@@ -30,10 +30,10 @@ function Calendar({ className, classNames, showOutsideDays = true, captionLayout
|
|
|
30
30
|
week_number_header: cn('select-none w-(--cell-size)', defaultClassNames.week_number_header),
|
|
31
31
|
week_number: cn('text-[0.8rem] select-none text-muted-foreground', defaultClassNames.week_number),
|
|
32
32
|
day: cn('relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none', defaultClassNames.day),
|
|
33
|
-
range_start: cn('rounded-l-md bg-
|
|
33
|
+
range_start: cn('rounded-l-md bg-muted', defaultClassNames.range_start),
|
|
34
34
|
range_middle: cn('rounded-none', defaultClassNames.range_middle),
|
|
35
|
-
range_end: cn('rounded-r-md bg-
|
|
36
|
-
today: cn('bg-
|
|
35
|
+
range_end: cn('rounded-r-md bg-muted', defaultClassNames.range_end),
|
|
36
|
+
today: cn('bg-muted text-foreground rounded-md data-[selected=true]:rounded-none', defaultClassNames.today),
|
|
37
37
|
outside: cn('text-muted-foreground aria-selected:text-muted-foreground', defaultClassNames.outside),
|
|
38
38
|
disabled: cn('text-muted-foreground opacity-50', defaultClassNames.disabled),
|
|
39
39
|
hidden: cn('invisible', defaultClassNames.hidden),
|
|
@@ -68,6 +68,6 @@ function CalendarDayButton({ className, day, modifiers, ...props }) {
|
|
|
68
68
|
return (_jsx(Button, { ref: ref, variant: "ghost", size: "icon", "data-day": day.date.toLocaleDateString(), "data-selected-single": modifiers.selected &&
|
|
69
69
|
!modifiers.range_start &&
|
|
70
70
|
!modifiers.range_end &&
|
|
71
|
-
!modifiers.range_middle, "data-range-start": modifiers.range_start, "data-range-end": modifiers.range_end, "data-range-middle": modifiers.range_middle, className: cn('data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-
|
|
71
|
+
!modifiers.range_middle, "data-range-start": modifiers.range_start, "data-range-end": modifiers.range_end, "data-range-middle": modifiers.range_middle, className: cn('data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70', defaultClassNames.day, className), ...props }));
|
|
72
72
|
}
|
|
73
73
|
export { Calendar, CalendarDayButton };
|
package/components/ui/chart.js
CHANGED
|
@@ -19,7 +19,7 @@ function ChartStyle({ id, config }) {
|
|
|
19
19
|
[data-chart=${id}] {
|
|
20
20
|
${colorConfig
|
|
21
21
|
.map(([key, itemConfig]) => {
|
|
22
|
-
const color = itemConfig.theme?.light || itemConfig.color || `
|
|
22
|
+
const color = itemConfig.theme?.light || itemConfig.color || `var(--primary)`;
|
|
23
23
|
return ` --color-${key}: ${color};`;
|
|
24
24
|
})
|
|
25
25
|
.join("\n")}
|
package/components/ui/dialog.js
CHANGED
|
@@ -18,7 +18,7 @@ function DialogOverlay({ className, ...props }) {
|
|
|
18
18
|
return (_jsx(DialogPrimitive.Overlay, { "data-slot": "dialog-overlay", className: cn('data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50', className), ...props }));
|
|
19
19
|
}
|
|
20
20
|
function DialogContent({ className, children, showCloseButton = true, ...props }) {
|
|
21
|
-
return (_jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { "data-slot": "dialog-content", className: cn('bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-8 shadow-lg duration-200 sm:max-w-lg', className), ...props, children: [children, showCloseButton && (_jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", className: "ring-offset-background focus:ring-ring data-[state=open]:bg-
|
|
21
|
+
return (_jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { "data-slot": "dialog-content", className: cn('bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-8 shadow-lg duration-200 sm:max-w-lg', className), ...props, children: [children, showCloseButton && (_jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", className: "ring-offset-background focus:ring-ring data-[state=open]:bg-muted data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: "Close" })] }))] })] }));
|
|
22
22
|
}
|
|
23
23
|
function DialogHeader({ className, ...props }) {
|
|
24
24
|
return (_jsx("div", { "data-slot": "dialog-header", className: cn('flex flex-col gap-2 text-center sm:text-left', className), ...props }));
|
|
@@ -12,22 +12,22 @@ function DropdownMenuTrigger({ ...props }) {
|
|
|
12
12
|
return (_jsx(DropdownMenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", ...props }));
|
|
13
13
|
}
|
|
14
14
|
function DropdownMenuContent({ className, sideOffset = 4, ...props }) {
|
|
15
|
-
return (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { "data-slot": "dropdown-menu-content", sideOffset: sideOffset, className: cn('bg-
|
|
15
|
+
return (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { "data-slot": "dropdown-menu-content", sideOffset: sideOffset, className: cn('bg-card text-card-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md', className), ...props }) }));
|
|
16
16
|
}
|
|
17
17
|
function DropdownMenuGroup({ ...props }) {
|
|
18
18
|
return (_jsx(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props }));
|
|
19
19
|
}
|
|
20
20
|
function DropdownMenuItem({ className, inset, variant = 'default', ...props }) {
|
|
21
|
-
return (_jsx(DropdownMenuPrimitive.Item, { "data-slot": "dropdown-menu-item", "data-inset": inset, "data-variant": variant, className: cn("focus:bg-
|
|
21
|
+
return (_jsx(DropdownMenuPrimitive.Item, { "data-slot": "dropdown-menu-item", "data-inset": inset, "data-variant": variant, className: cn("focus:bg-muted focus:text-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props }));
|
|
22
22
|
}
|
|
23
23
|
function DropdownMenuCheckboxItem({ className, children, checked, ...props }) {
|
|
24
|
-
return (_jsxs(DropdownMenuPrimitive.CheckboxItem, { "data-slot": "dropdown-menu-checkbox-item", className: cn("focus:bg-
|
|
24
|
+
return (_jsxs(DropdownMenuPrimitive.CheckboxItem, { "data-slot": "dropdown-menu-checkbox-item", className: cn("focus:bg-muted focus:text-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), checked: checked, ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "size-4" }) }) }), children] }));
|
|
25
25
|
}
|
|
26
26
|
function DropdownMenuRadioGroup({ ...props }) {
|
|
27
27
|
return (_jsx(DropdownMenuPrimitive.RadioGroup, { "data-slot": "dropdown-menu-radio-group", ...props }));
|
|
28
28
|
}
|
|
29
29
|
function DropdownMenuRadioItem({ className, children, ...props }) {
|
|
30
|
-
return (_jsxs(DropdownMenuPrimitive.RadioItem, { "data-slot": "dropdown-menu-radio-item", className: cn("focus:bg-
|
|
30
|
+
return (_jsxs(DropdownMenuPrimitive.RadioItem, { "data-slot": "dropdown-menu-radio-item", className: cn("focus:bg-muted focus:text-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(CircleIcon, { className: "size-2 fill-current" }) }) }), children] }));
|
|
31
31
|
}
|
|
32
32
|
function DropdownMenuLabel({ className, inset, ...props }) {
|
|
33
33
|
return (_jsx(DropdownMenuPrimitive.Label, { "data-slot": "dropdown-menu-label", "data-inset": inset, className: cn('px-2 py-1.5 text-sm font-medium data-[inset]:pl-8', className), ...props }));
|
|
@@ -42,9 +42,9 @@ function DropdownMenuSub({ ...props }) {
|
|
|
42
42
|
return (_jsx(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props }));
|
|
43
43
|
}
|
|
44
44
|
function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
|
|
45
|
-
return (_jsxs(DropdownMenuPrimitive.SubTrigger, { "data-slot": "dropdown-menu-sub-trigger", "data-inset": inset, className: cn('focus:bg-
|
|
45
|
+
return (_jsxs(DropdownMenuPrimitive.SubTrigger, { "data-slot": "dropdown-menu-sub-trigger", "data-inset": inset, className: cn('focus:bg-muted focus:text-foreground data-[state=open]:bg-muted data-[state=open]:text-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8', className), ...props, children: [children, _jsx(ChevronRightIcon, { className: "ml-auto size-4" })] }));
|
|
46
46
|
}
|
|
47
47
|
function DropdownMenuSubContent({ className, ...props }) {
|
|
48
|
-
return (_jsx(DropdownMenuPrimitive.SubContent, { "data-slot": "dropdown-menu-sub-content", className: cn('bg-
|
|
48
|
+
return (_jsx(DropdownMenuPrimitive.SubContent, { "data-slot": "dropdown-menu-sub-content", className: cn('bg-card text-card-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg', className), ...props }));
|
|
49
49
|
}
|
|
50
50
|
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
|
package/components/ui/input.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from '../../utils/utils.js';
|
|
3
3
|
function Input({ className, type, ...props }) {
|
|
4
|
-
return (_jsx("input", { type: type, "data-slot": "input", className: cn('file:text-foreground placeholder:text-muted-foreground/70 selection:bg-primary selection:text-primary-foreground dark:bg-
|
|
4
|
+
return (_jsx("input", { type: type, "data-slot": "input", className: cn('file:text-foreground placeholder:text-muted-foreground/70 selection:bg-primary selection:text-primary-foreground dark:bg-border/30 border-border flex h-11 w-full min-w-0 rounded-md border bg-muted px-4 py-2 text-base shadow-xs transition-all outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm hover:border-muted-foreground/30 hover:bg-muted/30', 'focus-visible:border-secondary focus-visible:ring-secondary/50 focus-visible:ring-[3px]', 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive', className), ...props }));
|
|
5
5
|
}
|
|
6
6
|
export { Input };
|
|
@@ -11,7 +11,7 @@ function PaginationItem({ className, ...props }) {
|
|
|
11
11
|
return (_jsx("li", { "data-slot": "pagination-item", className: cn('', className), ...props }));
|
|
12
12
|
}
|
|
13
13
|
function PaginationLink({ className, isActive, size = 'icon', ...props }) {
|
|
14
|
-
return (_jsx("a", { "aria-current": isActive ? 'page' : undefined, "data-slot": "pagination-link", className: cn('inline-flex h-10 w-10 items-center justify-center gap-1 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-
|
|
14
|
+
return (_jsx("a", { "aria-current": isActive ? 'page' : undefined, "data-slot": "pagination-link", className: cn('inline-flex h-10 w-10 items-center justify-center gap-1 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50', isActive && 'bg-muted text-foreground', className), ...props }));
|
|
15
15
|
}
|
|
16
16
|
function PaginationPrevious({ className, ...props }) {
|
|
17
17
|
return (_jsxs(PaginationLink, { "aria-label": "Go to previous page", "data-slot": "pagination-previous", size: "default", className: cn('w-auto gap-1 px-2.5', className), ...props, children: [_jsx(ChevronLeft, { className: "h-4 w-4" }), _jsx("span", { children: "Previous" })] }));
|
package/components/ui/popover.js
CHANGED
|
@@ -8,7 +8,7 @@ function PopoverTrigger({ ...props }) {
|
|
|
8
8
|
return _jsx(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
9
9
|
}
|
|
10
10
|
function PopoverContent({ className, align = 'center', sideOffset = 4, ...props }) {
|
|
11
|
-
return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { "data-slot": "popover-content", align: align, sideOffset: sideOffset, className: cn('bg-
|
|
11
|
+
return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { "data-slot": "popover-content", align: align, sideOffset: sideOffset, className: cn('bg-card text-card-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden', className), ...props }) }));
|
|
12
12
|
}
|
|
13
13
|
function PopoverAnchor({ ...props }) {
|
|
14
14
|
return _jsx(PopoverPrimitive.Anchor, { "data-slot": "popover-anchor", ...props });
|
package/components/ui/sidebar.js
CHANGED
|
@@ -86,19 +86,19 @@ function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: set
|
|
|
86
86
|
'--sidebar-width': SIDEBAR_WIDTH,
|
|
87
87
|
'--sidebar-width-icon': SIDEBAR_WIDTH_ICON,
|
|
88
88
|
...style,
|
|
89
|
-
}, className: cn('group/sidebar-wrapper has-data-[variant=inset]:bg-
|
|
89
|
+
}, className: cn('group/sidebar-wrapper has-data-[variant=inset]:bg-card flex min-h-svh w-full', className), ...props, children: children }) }) }));
|
|
90
90
|
}
|
|
91
91
|
function Sidebar({ side = 'left', variant = 'sidebar', collapsible = 'offcanvas', className, children, ...props }) {
|
|
92
92
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
93
93
|
if (collapsible === 'none') {
|
|
94
|
-
return (_jsx("div", { "data-slot": "sidebar", className: cn('bg-
|
|
94
|
+
return (_jsx("div", { "data-slot": "sidebar", className: cn('bg-card text-card-foreground flex h-full w-(--sidebar-width) flex-col', className), ...props, children: children }));
|
|
95
95
|
}
|
|
96
96
|
if (isMobile) {
|
|
97
|
-
return (_jsx(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: _jsxs(SheetContent, { "data-sidebar": "sidebar", "data-slot": "sidebar", "data-mobile": "true", className: "bg-
|
|
97
|
+
return (_jsx(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: _jsxs(SheetContent, { "data-sidebar": "sidebar", "data-slot": "sidebar", "data-mobile": "true", className: "bg-card text-card-foreground w-(--sidebar-width) p-0 [&>button]:hidden", style: {
|
|
98
98
|
'--sidebar-width': SIDEBAR_WIDTH_MOBILE,
|
|
99
99
|
}, side: side, children: [_jsxs(SheetHeader, { className: "sr-only", children: [_jsx(SheetTitle, { children: "Sidebar" }), _jsx(SheetDescription, { children: "Displays the mobile sidebar." })] }), _jsx("div", { className: "flex h-full w-full flex-col", children: children })] }) }));
|
|
100
100
|
}
|
|
101
|
-
return (_jsxs("div", { className: "group peer text-
|
|
101
|
+
return (_jsxs("div", { className: "group peer text-card-foreground hidden sm:block", "data-state": state, "data-collapsible": state === 'collapsed' ? collapsible : '', "data-variant": variant, "data-side": side, "data-slot": "sidebar", children: [_jsx("div", { "data-slot": "sidebar-gap", className: cn('relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear', 'group-data-[collapsible=offcanvas]:w-0', 'group-data-[side=right]:rotate-180', variant === 'floating' || variant === 'inset'
|
|
102
102
|
? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]'
|
|
103
103
|
: 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)') }), _jsx("div", { "data-slot": "sidebar-container", className: cn('fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear sm:flex', side === 'left'
|
|
104
104
|
? 'left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]'
|
|
@@ -106,7 +106,7 @@ function Sidebar({ side = 'left', variant = 'sidebar', collapsible = 'offcanvas'
|
|
|
106
106
|
// Adjust the padding for floating and inset variants.
|
|
107
107
|
variant === 'floating' || variant === 'inset'
|
|
108
108
|
? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]'
|
|
109
|
-
: 'group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l', className), ...props, children: _jsx("div", { "data-sidebar": "sidebar", "data-slot": "sidebar-inner", className: "bg-
|
|
109
|
+
: 'group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l', className), ...props, children: _jsx("div", { "data-sidebar": "sidebar", "data-slot": "sidebar-inner", className: "bg-card group-data-[variant=floating]:border-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm", children: children }) })] }));
|
|
110
110
|
}
|
|
111
111
|
function SidebarTrigger({ className, onClick, ...props }) {
|
|
112
112
|
const { toggleSidebar } = useSidebar();
|
|
@@ -117,10 +117,10 @@ function SidebarTrigger({ className, onClick, ...props }) {
|
|
|
117
117
|
}
|
|
118
118
|
function SidebarRail({ className, ...props }) {
|
|
119
119
|
const { toggleSidebar } = useSidebar();
|
|
120
|
-
return (_jsx("button", { "data-sidebar": "rail", "data-slot": "sidebar-rail", "aria-label": "Toggle Sidebar", tabIndex: -1, onClick: toggleSidebar, title: "Toggle Sidebar", className: cn('hover:after:bg-
|
|
120
|
+
return (_jsx("button", { "data-sidebar": "rail", "data-slot": "sidebar-rail", "aria-label": "Toggle Sidebar", tabIndex: -1, onClick: toggleSidebar, title: "Toggle Sidebar", className: cn('hover:after:bg-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex', 'in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize', '[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize', 'hover:group-data-[collapsible=offcanvas]:bg-card group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full', '[[data-side=left][data-collapsible=offcanvas]_&]:-right-2', '[[data-side=right][data-collapsible=offcanvas]_&]:-left-2', className), ...props }));
|
|
121
121
|
}
|
|
122
122
|
function SidebarInset({ className, ...props }) {
|
|
123
|
-
return (_jsx("main", { "data-slot": "sidebar-inset", className: cn('bg-
|
|
123
|
+
return (_jsx("main", { "data-slot": "sidebar-inset", className: cn('bg-muted relative flex w-full flex-1 flex-col', 'md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2', className), ...props }));
|
|
124
124
|
}
|
|
125
125
|
function SidebarInput({ className, ...props }) {
|
|
126
126
|
return (_jsx(Input, { "data-slot": "sidebar-input", "data-sidebar": "input", className: cn('bg-background h-8 w-full shadow-none', className), ...props }));
|
|
@@ -132,7 +132,7 @@ function SidebarFooter({ className, ...props }) {
|
|
|
132
132
|
return (_jsx("div", { "data-slot": "sidebar-footer", "data-sidebar": "footer", className: cn('flex flex-col gap-2 p-2', className), ...props }));
|
|
133
133
|
}
|
|
134
134
|
function SidebarSeparator({ className, ...props }) {
|
|
135
|
-
return (_jsx(Separator, { "data-slot": "sidebar-separator", "data-sidebar": "separator", className: cn('bg-
|
|
135
|
+
return (_jsx(Separator, { "data-slot": "sidebar-separator", "data-sidebar": "separator", className: cn('bg-border mx-2 w-auto', className), ...props }));
|
|
136
136
|
}
|
|
137
137
|
function SidebarContent({ className, ...props }) {
|
|
138
138
|
return (_jsx("div", { "data-slot": "sidebar-content", "data-sidebar": "content", className: cn('flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden', className), ...props }));
|
|
@@ -142,11 +142,11 @@ function SidebarGroup({ className, ...props }) {
|
|
|
142
142
|
}
|
|
143
143
|
function SidebarGroupLabel({ className, asChild = false, ...props }) {
|
|
144
144
|
const Comp = asChild ? Slot : 'div';
|
|
145
|
-
return (_jsx(Comp, { "data-slot": "sidebar-group-label", "data-sidebar": "group-label", className: cn('text-
|
|
145
|
+
return (_jsx(Comp, { "data-slot": "sidebar-group-label", "data-sidebar": "group-label", className: cn('text-card-foreground/70 ring-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0', 'group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0', className), ...props }));
|
|
146
146
|
}
|
|
147
147
|
function SidebarGroupAction({ className, asChild = false, ...props }) {
|
|
148
148
|
const Comp = asChild ? Slot : 'button';
|
|
149
|
-
return (_jsx(Comp, { "data-slot": "sidebar-group-action", "data-sidebar": "group-action", className: cn('text-
|
|
149
|
+
return (_jsx(Comp, { "data-slot": "sidebar-group-action", "data-sidebar": "group-action", className: cn('text-card-foreground ring-ring hover:bg-muted hover:text-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',
|
|
150
150
|
// Increases the hit area of the button on mobile.
|
|
151
151
|
'after:absolute after:-inset-2 md:after:hidden', 'group-data-[collapsible=icon]:hidden', className), ...props }));
|
|
152
152
|
}
|
|
@@ -159,11 +159,11 @@ function SidebarMenu({ className, ...props }) {
|
|
|
159
159
|
function SidebarMenuItem({ className, ...props }) {
|
|
160
160
|
return (_jsx("li", { "data-slot": "sidebar-menu-item", "data-sidebar": "menu-item", className: cn('group/menu-item relative', className), ...props }));
|
|
161
161
|
}
|
|
162
|
-
const sidebarMenuButtonVariants = cva('peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-
|
|
162
|
+
const sidebarMenuButtonVariants = cva('peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-ring transition-[width,height,padding] hover:bg-muted hover:text-foreground focus-visible:ring-2 active:bg-muted active:text-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-muted font-medium data-[active=true]:text-foreground data-[state=open]:hover:bg-muted data-[state=open]:hover:text-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:mx-auto! group-data-[collapsible=icon]:p-2! group-data-[collapsible=icon]:justify-center [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0', {
|
|
163
163
|
variants: {
|
|
164
164
|
variant: {
|
|
165
|
-
default: 'hover:bg-
|
|
166
|
-
outline: 'bg-background shadow-[
|
|
165
|
+
default: 'hover:bg-muted hover:text-foreground',
|
|
166
|
+
outline: 'bg-background shadow-[0_0_0_1px_var(--border)] hover:bg-muted hover:text-foreground hover:shadow-[0_0_0_1px_var(--muted)]',
|
|
167
167
|
},
|
|
168
168
|
size: {
|
|
169
169
|
default: 'h-8 text-sm',
|
|
@@ -192,13 +192,13 @@ function SidebarMenuButton({ asChild = false, isActive = false, variant = 'defau
|
|
|
192
192
|
}
|
|
193
193
|
function SidebarMenuAction({ className, asChild = false, showOnHover = false, ...props }) {
|
|
194
194
|
const Comp = asChild ? Slot : 'button';
|
|
195
|
-
return (_jsx(Comp, { "data-slot": "sidebar-menu-action", "data-sidebar": "menu-action", className: cn('text-
|
|
195
|
+
return (_jsx(Comp, { "data-slot": "sidebar-menu-action", "data-sidebar": "menu-action", className: cn('text-card-foreground ring-ring hover:bg-muted hover:text-foreground peer-hover/menu-button:text-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',
|
|
196
196
|
// Increases the hit area of the button on mobile.
|
|
197
197
|
'after:absolute after:-inset-2 md:after:hidden', 'peer-data-[size=sm]/menu-button:top-1', 'peer-data-[size=default]/menu-button:top-1.5', 'peer-data-[size=lg]/menu-button:top-2.5', 'group-data-[collapsible=icon]:hidden', showOnHover &&
|
|
198
|
-
'peer-data-[active=true]/menu-button:text-
|
|
198
|
+
'peer-data-[active=true]/menu-button:text-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0', className), ...props }));
|
|
199
199
|
}
|
|
200
200
|
function SidebarMenuBadge({ className, ...props }) {
|
|
201
|
-
return (_jsx("div", { "data-slot": "sidebar-menu-badge", "data-sidebar": "menu-badge", className: cn('text-
|
|
201
|
+
return (_jsx("div", { "data-slot": "sidebar-menu-badge", "data-sidebar": "menu-badge", className: cn('text-card-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none', 'peer-hover/menu-button:text-foreground peer-data-[active=true]/menu-button:text-foreground', 'peer-data-[size=sm]/menu-button:top-1', 'peer-data-[size=default]/menu-button:top-1.5', 'peer-data-[size=lg]/menu-button:top-2.5', 'group-data-[collapsible=icon]:hidden', className), ...props }));
|
|
202
202
|
}
|
|
203
203
|
function SidebarMenuSkeleton({ className, showIcon = false, ...props }) {
|
|
204
204
|
// Random width between 50 to 90%.
|
|
@@ -210,13 +210,13 @@ function SidebarMenuSkeleton({ className, showIcon = false, ...props }) {
|
|
|
210
210
|
} })] }));
|
|
211
211
|
}
|
|
212
212
|
function SidebarMenuSub({ className, ...props }) {
|
|
213
|
-
return (_jsx("ul", { "data-slot": "sidebar-menu-sub", "data-sidebar": "menu-sub", className: cn('border-
|
|
213
|
+
return (_jsx("ul", { "data-slot": "sidebar-menu-sub", "data-sidebar": "menu-sub", className: cn('border-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5', 'group-data-[collapsible=icon]:hidden', className), ...props }));
|
|
214
214
|
}
|
|
215
215
|
function SidebarMenuSubItem({ className, ...props }) {
|
|
216
216
|
return (_jsx("li", { "data-slot": "sidebar-menu-sub-item", "data-sidebar": "menu-sub-item", className: cn('group/menu-sub-item relative', className), ...props }));
|
|
217
217
|
}
|
|
218
218
|
function SidebarMenuSubButton({ asChild = false, size = 'md', isActive = false, className, ...props }) {
|
|
219
219
|
const Comp = asChild ? Slot : 'a';
|
|
220
|
-
return (_jsx(Comp, { "data-slot": "sidebar-menu-sub-button", "data-sidebar": "menu-sub-button", "data-size": size, "data-active": isActive, className: cn('text-
|
|
220
|
+
return (_jsx(Comp, { "data-slot": "sidebar-menu-sub-button", "data-sidebar": "menu-sub-button", "data-size": size, "data-active": isActive, className: cn('text-card-foreground ring-ring hover:bg-muted hover:text-foreground active:bg-muted active:text-foreground [&>svg]:text-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0', 'data-[active=true]:bg-muted data-[active=true]:text-foreground', size === 'sm' && 'text-xs', size === 'md' && 'text-sm', 'group-data-[collapsible=icon]:hidden', className), ...props }));
|
|
221
221
|
}
|
|
222
222
|
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from '../../utils/utils.js';
|
|
3
3
|
function Skeleton({ className, ...props }) {
|
|
4
|
-
return (_jsx("div", { "data-slot": "skeleton", className: cn('bg-
|
|
4
|
+
return (_jsx("div", { "data-slot": "skeleton", className: cn('bg-muted animate-pulse rounded-md', className), ...props }));
|
|
5
5
|
}
|
|
6
6
|
export { Skeleton };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
3
|
+
declare function Switch({ className, size, ...props }: React.ComponentProps<typeof SwitchPrimitive.Root> & {
|
|
4
|
+
size?: 'sm' | 'default';
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export { Switch };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
3
|
+
import { cn } from '../../utils/utils.js';
|
|
4
|
+
function Switch({ className, size = 'default', ...props }) {
|
|
5
|
+
return (_jsx(SwitchPrimitive.Root, { "data-slot": "switch", "data-size": size, className: cn('peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-border focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6', className), ...props, children: _jsx(SwitchPrimitive.Thumb, { "data-slot": "switch-thumb", className: cn('bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0') }) }));
|
|
6
|
+
}
|
|
7
|
+
export { Switch };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from '../../utils/utils.js';
|
|
3
3
|
function Textarea({ className, ...props }) {
|
|
4
|
-
return (_jsx("textarea", { "data-slot": "textarea", className: cn('placeholder:text-muted-foreground/70 selection:bg-primary selection:text-primary-foreground dark:bg-
|
|
4
|
+
return (_jsx("textarea", { "data-slot": "textarea", className: cn('placeholder:text-muted-foreground/70 selection:bg-primary selection:text-primary-foreground dark:bg-border/30 border-border flex field-sizing-content min-h-16 w-full min-w-0 rounded-md border bg-muted px-4 py-2 text-base shadow-xs transition-all outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm hover:border-muted-foreground/30 hover:bg-muted/30', 'focus-visible:border-secondary focus-visible:ring-secondary/50 focus-visible:ring-[3px]', 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive', className), ...props }));
|
|
5
5
|
}
|
|
6
6
|
export { Textarea };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minutemailer/kit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Minutemailer UI Kit",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Minutemailer",
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"@radix-ui/react-popover": "^1.1.15",
|
|
54
54
|
"@radix-ui/react-separator": "^1.1.7",
|
|
55
55
|
"@radix-ui/react-slot": "^1.2.3",
|
|
56
|
+
"@radix-ui/react-switch": "^1.2.6",
|
|
56
57
|
"@radix-ui/react-tabs": "^1.1.13",
|
|
57
58
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
58
59
|
"@tailwindcss/vite": "^4.1.14",
|
package/styles.css
CHANGED
|
@@ -1,79 +1,171 @@
|
|
|
1
1
|
@custom-variant dark (&:is(.dark *));
|
|
2
2
|
|
|
3
3
|
@theme inline {
|
|
4
|
+
/* Radius */
|
|
4
5
|
--radius-sm: calc(var(--radius) - 4px);
|
|
5
6
|
--radius-md: calc(var(--radius) - 2px);
|
|
6
7
|
--radius-lg: var(--radius);
|
|
7
8
|
--radius-xl: calc(var(--radius) + 4px);
|
|
9
|
+
|
|
10
|
+
/* Base Colors - Green */
|
|
11
|
+
--color-green-100: var(--green-100);
|
|
12
|
+
--color-green-200: var(--green-200);
|
|
13
|
+
--color-green-300: var(--green-300);
|
|
14
|
+
--color-green-400: var(--green-400);
|
|
15
|
+
--color-green-500: var(--green-500);
|
|
16
|
+
|
|
17
|
+
/* Base Colors - Gray (Black scale) */
|
|
18
|
+
--color-gray-100: var(--gray-100);
|
|
19
|
+
--color-gray-200: var(--gray-200);
|
|
20
|
+
--color-gray-300: var(--gray-300);
|
|
21
|
+
--color-gray-400: var(--gray-400);
|
|
22
|
+
--color-gray-500: var(--gray-500);
|
|
23
|
+
|
|
24
|
+
/* Base Colors - Blue */
|
|
25
|
+
--color-blue-100: var(--blue-100);
|
|
26
|
+
--color-blue-200: var(--blue-200);
|
|
27
|
+
--color-blue-300: var(--blue-300);
|
|
28
|
+
--color-blue-400: var(--blue-400);
|
|
29
|
+
--color-blue-500: var(--blue-500);
|
|
30
|
+
|
|
31
|
+
/* Base Colors - Red */
|
|
32
|
+
--color-red-100: var(--red-100);
|
|
33
|
+
--color-red-200: var(--red-200);
|
|
34
|
+
--color-red-300: var(--red-300);
|
|
35
|
+
--color-red-400: var(--red-400);
|
|
36
|
+
--color-red-500: var(--red-500);
|
|
37
|
+
|
|
38
|
+
/* Base Colors - Orange */
|
|
39
|
+
--color-orange-100: var(--orange-100);
|
|
40
|
+
--color-orange-200: var(--orange-200);
|
|
41
|
+
--color-orange-300: var(--orange-300);
|
|
42
|
+
--color-orange-400: var(--orange-400);
|
|
43
|
+
--color-orange-500: var(--orange-500);
|
|
44
|
+
|
|
45
|
+
/* Base Colors - Purple */
|
|
46
|
+
--color-purple-100: var(--purple-100);
|
|
47
|
+
--color-purple-200: var(--purple-200);
|
|
48
|
+
--color-purple-300: var(--purple-300);
|
|
49
|
+
--color-purple-400: var(--purple-400);
|
|
50
|
+
--color-purple-500: var(--purple-500);
|
|
51
|
+
|
|
52
|
+
/* Semantic Colors */
|
|
8
53
|
--color-background: var(--background);
|
|
9
54
|
--color-foreground: var(--foreground);
|
|
10
55
|
--color-card: var(--card);
|
|
11
56
|
--color-card-foreground: var(--card-foreground);
|
|
12
|
-
--color-popover: var(--popover);
|
|
13
|
-
--color-popover-foreground: var(--popover-foreground);
|
|
14
57
|
--color-primary: var(--primary);
|
|
15
58
|
--color-primary-foreground: var(--primary-foreground);
|
|
16
59
|
--color-secondary: var(--secondary);
|
|
17
60
|
--color-secondary-foreground: var(--secondary-foreground);
|
|
18
|
-
--color-
|
|
61
|
+
--color-destructive: var(--destructive);
|
|
62
|
+
--color-destructive-foreground: var(--destructive-foreground);
|
|
63
|
+
--color-warning: var(--warning);
|
|
64
|
+
--color-warning-foreground: var(--warning-foreground);
|
|
65
|
+
--color-success: var(--success);
|
|
66
|
+
--color-success-foreground: var(--success-foreground);
|
|
67
|
+
--color-info: var(--info);
|
|
68
|
+
--color-info-foreground: var(--info-foreground);
|
|
19
69
|
--color-muted: var(--muted);
|
|
20
70
|
--color-muted-foreground: var(--muted-foreground);
|
|
21
|
-
--color-
|
|
22
|
-
--color-accent-foreground: var(--accent-foreground);
|
|
23
|
-
--color-destructive: var(--destructive);
|
|
71
|
+
--color-link: var(--link);
|
|
24
72
|
--color-border: var(--border);
|
|
25
|
-
--color-input: var(--input);
|
|
26
73
|
--color-ring: var(--ring);
|
|
27
|
-
--color-chart-1: var(--chart-1);
|
|
28
|
-
--color-chart-2: var(--chart-2);
|
|
29
|
-
--color-chart-3: var(--chart-3);
|
|
30
|
-
--color-chart-4: var(--chart-4);
|
|
31
|
-
--color-chart-5: var(--chart-5);
|
|
32
|
-
--color-sidebar: var(--sidebar);
|
|
33
|
-
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
34
|
-
--color-sidebar-primary: var(--sidebar-primary);
|
|
35
|
-
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
36
|
-
--color-sidebar-accent: var(--sidebar-accent);
|
|
37
|
-
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
38
|
-
--color-sidebar-border: var(--sidebar-border);
|
|
39
|
-
--color-sidebar-ring: var(--sidebar-ring);
|
|
40
74
|
}
|
|
41
75
|
|
|
42
76
|
:root {
|
|
43
77
|
--font-sans: Inter, system-ui, sans-serif;
|
|
44
78
|
--radius: 0.375rem;
|
|
79
|
+
|
|
80
|
+
/* Base Colors - Green (light to dark) */
|
|
81
|
+
--green-100: oklch(0.96 0.04 155);
|
|
82
|
+
--green-200: oklch(0.85 0.14 155);
|
|
83
|
+
--green-300: oklch(0.68 0.17 158);
|
|
84
|
+
--green-400: oklch(0.58 0.14 160);
|
|
85
|
+
--green-500: oklch(0.35 0.08 165);
|
|
86
|
+
|
|
87
|
+
/* Base Colors - Gray (light to dark) */
|
|
88
|
+
--gray-100: oklch(0.97 0 0);
|
|
89
|
+
--gray-200: oklch(0.87 0 0);
|
|
90
|
+
--gray-300: oklch(0.62 0 0);
|
|
91
|
+
--gray-400: oklch(0.42 0 0);
|
|
92
|
+
--gray-500: oklch(0.20 0 0);
|
|
93
|
+
|
|
94
|
+
/* Base Colors - Blue (light to dark) */
|
|
95
|
+
--blue-100: oklch(0.95 0.03 240);
|
|
96
|
+
--blue-200: oklch(0.88 0.08 240);
|
|
97
|
+
--blue-300: oklch(0.65 0.19 255);
|
|
98
|
+
--blue-400: oklch(0.55 0.19 255);
|
|
99
|
+
--blue-500: oklch(0.35 0.12 250);
|
|
100
|
+
|
|
101
|
+
/* Base Colors - Red (light to dark) */
|
|
102
|
+
--red-100: oklch(0.96 0.02 20);
|
|
103
|
+
--red-200: oklch(0.85 0.08 20);
|
|
104
|
+
--red-300: oklch(0.60 0.20 25);
|
|
105
|
+
--red-400: oklch(0.50 0.18 25);
|
|
106
|
+
--red-500: oklch(0.30 0.10 25);
|
|
107
|
+
|
|
108
|
+
/* Base Colors - Orange (light to dark) */
|
|
109
|
+
--orange-100: oklch(0.97 0.04 95);
|
|
110
|
+
--orange-200: oklch(0.88 0.12 95);
|
|
111
|
+
--orange-300: oklch(0.75 0.16 70);
|
|
112
|
+
--orange-400: oklch(0.60 0.14 70);
|
|
113
|
+
--orange-500: oklch(0.35 0.08 50);
|
|
114
|
+
|
|
115
|
+
/* Base Colors - Purple (light to dark) */
|
|
116
|
+
--purple-100: oklch(0.96 0.02 290);
|
|
117
|
+
--purple-200: oklch(0.85 0.06 290);
|
|
118
|
+
--purple-300: oklch(0.60 0.12 290);
|
|
119
|
+
--purple-400: oklch(0.50 0.14 290);
|
|
120
|
+
--purple-500: oklch(0.30 0.12 290);
|
|
121
|
+
|
|
122
|
+
/* Semantic Colors - Light Mode */
|
|
45
123
|
--background: oklch(1 0 0);
|
|
46
|
-
--foreground:
|
|
124
|
+
--foreground: var(--gray-500);
|
|
47
125
|
--card: oklch(1 0 0);
|
|
48
|
-
--card-foreground:
|
|
49
|
-
--
|
|
50
|
-
--
|
|
51
|
-
--
|
|
52
|
-
--
|
|
53
|
-
--
|
|
54
|
-
--
|
|
55
|
-
--
|
|
56
|
-
--
|
|
57
|
-
--
|
|
58
|
-
--
|
|
59
|
-
--
|
|
60
|
-
--
|
|
61
|
-
--
|
|
62
|
-
--
|
|
63
|
-
--
|
|
64
|
-
--
|
|
65
|
-
--
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
--
|
|
71
|
-
--
|
|
72
|
-
--
|
|
73
|
-
--
|
|
74
|
-
--
|
|
75
|
-
--
|
|
76
|
-
--
|
|
126
|
+
--card-foreground: var(--gray-500);
|
|
127
|
+
--primary: var(--green-300);
|
|
128
|
+
--primary-foreground: oklch(1 0 0);
|
|
129
|
+
--secondary: var(--blue-300);
|
|
130
|
+
--secondary-foreground: oklch(1 0 0);
|
|
131
|
+
--destructive: var(--red-300);
|
|
132
|
+
--destructive-foreground: oklch(1 0 0);
|
|
133
|
+
--warning: var(--orange-300);
|
|
134
|
+
--warning-foreground: var(--gray-500);
|
|
135
|
+
--success: var(--green-300);
|
|
136
|
+
--success-foreground: oklch(1 0 0);
|
|
137
|
+
--info: var(--blue-300);
|
|
138
|
+
--info-foreground: oklch(1 0 0);
|
|
139
|
+
--muted: var(--gray-100);
|
|
140
|
+
--muted-foreground: var(--gray-300);
|
|
141
|
+
--link: var(--blue-400);
|
|
142
|
+
--border: var(--gray-200);
|
|
143
|
+
--ring: var(--gray-300);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.dark {
|
|
147
|
+
/* Semantic Colors - Dark Mode */
|
|
148
|
+
--background: var(--gray-500);
|
|
149
|
+
--foreground: oklch(0.98 0 0);
|
|
150
|
+
--card: var(--gray-400);
|
|
151
|
+
--card-foreground: oklch(0.98 0 0);
|
|
152
|
+
--primary: var(--green-200);
|
|
153
|
+
--primary-foreground: var(--gray-500);
|
|
154
|
+
--secondary: var(--blue-200);
|
|
155
|
+
--secondary-foreground: var(--gray-500);
|
|
156
|
+
--destructive: var(--red-300);
|
|
157
|
+
--destructive-foreground: oklch(1 0 0);
|
|
158
|
+
--warning: var(--orange-200);
|
|
159
|
+
--warning-foreground: var(--gray-500);
|
|
160
|
+
--success: var(--green-200);
|
|
161
|
+
--success-foreground: var(--gray-500);
|
|
162
|
+
--info: var(--blue-200);
|
|
163
|
+
--info-foreground: var(--gray-500);
|
|
164
|
+
--muted: var(--gray-400);
|
|
165
|
+
--muted-foreground: var(--gray-200);
|
|
166
|
+
--link: var(--blue-200);
|
|
167
|
+
--border: var(--gray-300);
|
|
168
|
+
--ring: var(--gray-200);
|
|
77
169
|
}
|
|
78
170
|
|
|
79
171
|
@layer base {
|
|
@@ -81,6 +173,6 @@
|
|
|
81
173
|
@apply border-border outline-ring/50;
|
|
82
174
|
}
|
|
83
175
|
body {
|
|
84
|
-
@apply bg-
|
|
176
|
+
@apply bg-muted text-foreground;
|
|
85
177
|
}
|
|
86
178
|
}
|