@minutemailer/kit 1.1.1 → 1.1.3
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/more.d.ts +13 -0
- package/components/more.js +13 -0
- package/components/ui/sidebar.js +1 -1
- package/components/ui/spinner.d.ts +2 -0
- package/components/ui/spinner.js +7 -0
- package/package.json +1 -1
- package/styles.css +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type MoreOption = {
|
|
2
|
+
value: string;
|
|
3
|
+
name: string;
|
|
4
|
+
variant?: 'default' | 'destructive';
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export interface MoreProps {
|
|
8
|
+
options: MoreOption[];
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
onChange?: (value: string) => void;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function More({ options, loading, onChange, disabled, }: MoreProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from '../components/ui/dropdown-menu.js';
|
|
3
|
+
import { Button } from '../components/ui/button.js';
|
|
4
|
+
import { Ellipsis } from 'lucide-react';
|
|
5
|
+
import Spinner from '../icons/Spinner.js';
|
|
6
|
+
export function More({ options, loading = false, onChange, disabled = false, }) {
|
|
7
|
+
const handleSelect = (value) => {
|
|
8
|
+
if (onChange) {
|
|
9
|
+
onChange(value);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", size: "icon", disabled: disabled || loading, "aria-label": "More options", children: loading ? _jsx(Spinner, {}) : _jsx(Ellipsis, {}) }) }), _jsx(DropdownMenuContent, { align: "end", children: options.map((option) => (_jsx(DropdownMenuItem, { variant: option.variant, disabled: option.disabled, onSelect: () => handleSelect(option.value), children: option.name }, option.value))) })] }));
|
|
13
|
+
}
|
package/components/ui/sidebar.js
CHANGED
|
@@ -120,7 +120,7 @@ function SidebarRail({ className, ...props }) {
|
|
|
120
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-sidebar-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-sidebar 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-accent 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 }));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Loader2Icon } from 'lucide-react';
|
|
3
|
+
import { cn } from '../../utils/utils.js';
|
|
4
|
+
function Spinner({ className, ...props }) {
|
|
5
|
+
return (_jsx(Loader2Icon, { role: "status", "aria-label": "Loading", className: cn('size-4 animate-spin', className), ...props }));
|
|
6
|
+
}
|
|
7
|
+
export { Spinner };
|
package/package.json
CHANGED
package/styles.css
CHANGED
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
--chart-3: oklch(0.398 0.07 227.392);
|
|
65
65
|
--chart-4: oklch(0.828 0.189 84.429);
|
|
66
66
|
--chart-5: oklch(0.769 0.188 70.08);
|
|
67
|
-
--sidebar: oklch(
|
|
67
|
+
--sidebar: oklch(1 0 0);
|
|
68
68
|
--sidebar-foreground: oklch(0.145 0 0);
|
|
69
69
|
--sidebar-primary: oklch(0.205 0 0);
|
|
70
70
|
--sidebar-primary-foreground: oklch(0.985 0 0);
|