@dilipod/ui 0.2.7 → 0.2.9

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/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ import { clsx } from 'clsx';
5
5
  import { twMerge } from 'tailwind-merge';
6
6
  import { jsxs, jsx } from 'react/jsx-runtime';
7
7
  import * as SheetPrimitive from '@radix-ui/react-dialog';
8
- import { X, Check, CaretDown, CaretRight, Circle, Info, WarningCircle, CheckCircle } from '@phosphor-icons/react';
8
+ import { X, Check, CaretDown, CaretRight, Circle, Info, WarningCircle } from '@phosphor-icons/react';
9
9
  export { AddressBook, ArrowLeft, ArrowRight, ArrowSquareOut, ArrowUpRight, Brain, Briefcase, Buildings, Calendar, CaretDown, CaretRight, CaretUp, ChartBar, ChartLineUp, ChatCircle, Check, CheckCircle, CheckSquare, Circle, Clock, Copy, Crosshair, Database, DotsThree, DotsThreeVertical, Download, Envelope, EnvelopeSimple, Eye, EyeSlash, File, FileText, Files, FirstAid, Funnel, Gear, GearSix, Globe, Handshake, House, Info, Lightning, Link, LinkedinLogo, List, MagnifyingGlass, Minus, Pause, PencilSimple, Phone, Play, Plus, Question, Quotes, Receipt, Robot, Rocket, ShieldCheck, ShoppingCart, SignIn, SignOut, SortAscending, SortDescending, Stop, Target, Trash, TrendUp, Upload, User, UserCircleCheck, UserPlus, Users, UsersThree, VideoCamera, Wallet, Warning, WarningCircle, X, XLogo } from '@phosphor-icons/react';
10
10
  import 'react-dom';
11
11
  import * as AccordionPrimitive from '@radix-ui/react-accordion';
@@ -346,7 +346,7 @@ var Card = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
346
346
  {
347
347
  ref,
348
348
  className: cn(
349
- "rounded-sm border border-gray-200 bg-white shadow-sm",
349
+ "rounded-sm border border-gray-200 bg-white",
350
350
  className
351
351
  ),
352
352
  ...props
@@ -723,13 +723,13 @@ var Checkbox = React21.forwardRef(
723
723
  "div",
724
724
  {
725
725
  className: cn(
726
- "w-4 h-4 border-2 border-input rounded-sm flex items-center justify-center transition-colors",
727
- "peer-checked:bg-primary peer-checked:border-primary",
728
- "peer-focus-visible:outline-none peer-focus-visible:ring-2 peer-focus-visible:ring-primary peer-focus-visible:ring-offset-2",
729
- "disabled:cursor-not-allowed disabled:opacity-50",
726
+ "w-5 h-5 border border-gray-300 rounded-[2px] flex items-center justify-center transition-colors",
727
+ "peer-checked:bg-[var(--black)] peer-checked:border-[var(--black)]",
728
+ "peer-focus-visible:outline-none",
729
+ "peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
730
730
  className
731
731
  ),
732
- children: checked && /* @__PURE__ */ jsx(Check, { className: "h-3 w-3 text-white", weight: "bold" })
732
+ children: checked && /* @__PURE__ */ jsx(Check, { className: "h-3.5 w-3.5 text-white", weight: "bold" })
733
733
  }
734
734
  )
735
735
  ] });
@@ -1162,7 +1162,7 @@ var Sidebar = React21.forwardRef(
1162
1162
  {
1163
1163
  ref,
1164
1164
  className: cn(
1165
- "flex h-full w-60 flex-col border-r bg-background/50",
1165
+ "relative flex h-full w-60 flex-col border-r bg-background/50",
1166
1166
  className
1167
1167
  ),
1168
1168
  ...props,
@@ -1189,7 +1189,7 @@ var Sidebar = React21.forwardRef(
1189
1189
  item.name
1190
1190
  )) }),
1191
1191
  children,
1192
- (bottomNav.length > 0 || helpLink || assistantButton) && /* @__PURE__ */ jsxs("div", { className: "px-3 pb-3 space-y-1 border-t pt-3", children: [
1192
+ (bottomNav.length > 0 || helpLink) && /* @__PURE__ */ jsxs("div", { className: "px-3 pb-3 space-y-1 border-t pt-3", children: [
1193
1193
  bottomNav.map((item) => /* @__PURE__ */ jsx(
1194
1194
  SidebarNavItem,
1195
1195
  {
@@ -1199,17 +1199,6 @@ var Sidebar = React21.forwardRef(
1199
1199
  },
1200
1200
  item.name
1201
1201
  )),
1202
- assistantButton && /* @__PURE__ */ jsxs(
1203
- "button",
1204
- {
1205
- onClick: assistantButton.onClick,
1206
- className: "flex w-full items-center gap-3 rounded-sm px-3 py-2 text-sm bg-[var(--cyan)]/10 text-[var(--black)] hover:bg-[var(--cyan)]/20 transition-colors font-medium",
1207
- children: [
1208
- assistantButton.icon && /* @__PURE__ */ jsx(assistantButton.icon, { className: "h-4 w-4 text-[var(--cyan)]" }),
1209
- assistantButton.label
1210
- ]
1211
- }
1212
- ),
1213
1202
  helpLink && /* @__PURE__ */ jsxs(
1214
1203
  "a",
1215
1204
  {
@@ -1221,7 +1210,16 @@ var Sidebar = React21.forwardRef(
1221
1210
  ]
1222
1211
  }
1223
1212
  )
1224
- ] })
1213
+ ] }),
1214
+ assistantButton && /* @__PURE__ */ jsx("div", { className: "absolute bottom-4 left-4", children: /* @__PURE__ */ jsx(
1215
+ "button",
1216
+ {
1217
+ onClick: assistantButton.onClick,
1218
+ className: "flex h-10 w-10 items-center justify-center rounded-full bg-[var(--cyan)] text-white shadow-lg hover:bg-[var(--cyan)]/90 transition-colors",
1219
+ title: assistantButton.label,
1220
+ children: assistantButton.icon && /* @__PURE__ */ jsx(assistantButton.icon, { className: "h-5 w-5" })
1221
+ }
1222
+ ) })
1225
1223
  ]
1226
1224
  }
1227
1225
  );
@@ -1446,6 +1444,93 @@ var Divider = React21.forwardRef(
1446
1444
  }
1447
1445
  );
1448
1446
  Divider.displayName = "Divider";
1447
+ var Dialog = SheetPrimitive.Root;
1448
+ var DialogTrigger = SheetPrimitive.Trigger;
1449
+ var DialogPortal = SheetPrimitive.Portal;
1450
+ var DialogClose = SheetPrimitive.Close;
1451
+ var DialogOverlay = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1452
+ SheetPrimitive.Overlay,
1453
+ {
1454
+ ref,
1455
+ className: cn(
1456
+ "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
1457
+ className
1458
+ ),
1459
+ ...props
1460
+ }
1461
+ ));
1462
+ DialogOverlay.displayName = SheetPrimitive.Overlay.displayName;
1463
+ var DialogContent = React21.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
1464
+ /* @__PURE__ */ jsx(DialogOverlay, {}),
1465
+ /* @__PURE__ */ jsxs(
1466
+ SheetPrimitive.Content,
1467
+ {
1468
+ ref,
1469
+ className: cn(
1470
+ "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-white p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
1471
+ className
1472
+ ),
1473
+ ...props,
1474
+ children: [
1475
+ children,
1476
+ /* @__PURE__ */ jsxs(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-[var(--cyan)] focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-gray-100", children: [
1477
+ /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
1478
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
1479
+ ] })
1480
+ ]
1481
+ }
1482
+ )
1483
+ ] }));
1484
+ DialogContent.displayName = SheetPrimitive.Content.displayName;
1485
+ var DialogHeader = ({
1486
+ className,
1487
+ ...props
1488
+ }) => /* @__PURE__ */ jsx(
1489
+ "div",
1490
+ {
1491
+ className: cn(
1492
+ "flex flex-col space-y-1.5 text-center sm:text-left",
1493
+ className
1494
+ ),
1495
+ ...props
1496
+ }
1497
+ );
1498
+ DialogHeader.displayName = "DialogHeader";
1499
+ var DialogFooter = ({
1500
+ className,
1501
+ ...props
1502
+ }) => /* @__PURE__ */ jsx(
1503
+ "div",
1504
+ {
1505
+ className: cn(
1506
+ "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
1507
+ className
1508
+ ),
1509
+ ...props
1510
+ }
1511
+ );
1512
+ DialogFooter.displayName = "DialogFooter";
1513
+ var DialogTitle = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1514
+ SheetPrimitive.Title,
1515
+ {
1516
+ ref,
1517
+ className: cn(
1518
+ "text-lg font-semibold leading-none tracking-tight text-[var(--black)]",
1519
+ className
1520
+ ),
1521
+ ...props
1522
+ }
1523
+ ));
1524
+ DialogTitle.displayName = SheetPrimitive.Title.displayName;
1525
+ var DialogDescription = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1526
+ SheetPrimitive.Description,
1527
+ {
1528
+ ref,
1529
+ className: cn("text-sm text-muted-foreground", className),
1530
+ ...props
1531
+ }
1532
+ ));
1533
+ DialogDescription.displayName = SheetPrimitive.Description.displayName;
1449
1534
  var ToastProvider = ToastPrimitives.Provider;
1450
1535
  var ToastViewport = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1451
1536
  ToastPrimitives.Viewport,
@@ -1533,7 +1618,7 @@ ToastDescription.displayName = ToastPrimitives.Description.displayName;
1533
1618
  var ToastIcon = ({ variant }) => {
1534
1619
  switch (variant) {
1535
1620
  case "success":
1536
- return /* @__PURE__ */ jsx(CheckCircle, { size: 20, weight: "fill", className: "text-emerald-600" });
1621
+ return /* @__PURE__ */ jsx(Check, { size: 20, weight: "bold", className: "text-emerald-600" });
1537
1622
  case "error":
1538
1623
  return /* @__PURE__ */ jsx(WarningCircle, { size: 20, weight: "fill", className: "text-red-600" });
1539
1624
  case "warning":
@@ -1679,6 +1764,6 @@ function Toaster() {
1679
1764
  ] });
1680
1765
  }
1681
1766
 
1682
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, Avatar, AvatarFallback, AvatarImage, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CodeBlock, Divider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, FormField, IconBox, Input, Label2 as Label, Logo, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Progress, Separator2 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarNavItem, Stat, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tag, Textarea, Toast, ToastAction, ToastClose, ToastDescription, ToastIcon, ToastProvider, ToastTitle, ToastViewport, Toaster, alertVariants, badgeVariants, buttonVariants, cn, iconBoxVariants, navigationMenuTriggerStyle, progressVariants, statVariants, tagVariants, toast, useToast, valueVariants };
1767
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, Avatar, AvatarFallback, AvatarImage, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CodeBlock, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Divider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, FormField, IconBox, Input, Label2 as Label, Logo, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Progress, Separator2 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarNavItem, Stat, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tag, Textarea, Toast, ToastAction, ToastClose, ToastDescription, ToastIcon, ToastProvider, ToastTitle, ToastViewport, Toaster, alertVariants, badgeVariants, buttonVariants, cn, iconBoxVariants, navigationMenuTriggerStyle, progressVariants, statVariants, tagVariants, toast, useToast, valueVariants };
1683
1768
  //# sourceMappingURL=index.mjs.map
1684
1769
  //# sourceMappingURL=index.mjs.map